1!function(){"use strict";var e,t,i=Object.create,n=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,t,i)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,h=(e,t)=>{for(var i in t||={})d.call(t,i)&&p(e,i,t[i]);if(l)for(var i of l(t))u.call(t,i)&&p(e,i,t[i]);return e},f=(e,t)=>r(e,a(t)),m=(e=function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):e),g=(e,t)=>{var i={};for(var n in e)d.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&l)for(var n of l(e))t.indexOf(n)<0&&u.call(e,n)&&(i[n]=e[n]);return i},b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t,r)=>(r=null!=e?i(c(e)):{},((e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))!d.call(e,a)&&a!==i&&n(e,a,{get:()=>t[a],enumerable:!(r=s(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),v=(e,t,i)=>new Promise(((n,r)=>{var s=e=>{try{o(i.next(e))}catch(e){r(e)}},a=e=>{try{o(i.throw(e))}catch(e){r(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,a);o((i=i.apply(e,t)).next())})),w=b(((e,t)=>{(function(){var i,n="Expected a function",r="__lodash_hash_undefined__",s="__lodash_placeholder__",a=16,o=32,l=64,c=128,d=256,u=1/0,p=9007199254740991,h=NaN,f=4294967295,m=f-1,g=f>>>1,b=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",o],["partialRight",l],["rearg",d]],y="[object Arguments]",v="[object Array]",w="[object Boolean]",_="[object Date]",S="[object Error]",C="[object Function]",I="[object GeneratorFunction]",A="[object Map]",k="[object Number]",x="[object Object]",T="[object Promise]",P="[object RegExp]",E="[object Set]",D="[object String]",O="[object Symbol]",B="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",L="[object Float32Array]",F="[object Float64Array]",N="[object Int8Array]",U="[object Int16Array]",V="[object Int32Array]",q="[object Uint8Array]",$="[object Uint8ClampedArray]",j="[object Uint16Array]",z="[object Uint32Array]",W=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Q=RegExp(G.source),J=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ie=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,se=RegExp(re.source),ae=/^\s+/,oe=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 5,887 bytes, line 1
17f]/g,Se=/($^)/,Ce=/['\n\r\u2028\u2029\\]/g,Ie="\\ud800-\\udfff",Ae="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",xe="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",De="['â]",Oe="["+Ie+"]",Be="["+Ee+"]",Me="["+Ae+"]",Re="\\d+",Le="["+ke+"]",Fe="["+xe+"]",Ne="[^"+Ie+Ee+Re+ke+xe+Te+"]",Ue="\\ud83c[\\udffb-\\udfff]",Ve="[^"+Ie+"]",qe="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Te+"]",ze="\\u200d",We="(?:"+Fe+"|"+Ne+")",He="(?:"+je+"|"+Ne+")",Ye="(?:['â](?:d|ll|m|re|s|t|ve))?",Ge="(?:['â](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Me+"|"+Ue+")"+"?",Qe="["+Pe+"]?",Je=Qe+Ke+("(?:"+ze+"(?:"+[Ve,qe,$e].join("|")+")"+Qe+Ke+")*"),Ze="(?:"+[Le,qe,$e].join("|")+")"+Je,Xe="(?:"+[Ve+Me+"?",Me,qe,$e,Oe].join("|")+")",et=RegExp(De,"g"),tt=RegExp(Me,"g"),it=RegExp(Ue+"(?="+Ue+")|"+Xe+Je,"g"),nt=RegExp([je+"?"+Fe+"+"+Ye+"(?="+[Be,je,"$"].join("|")+")",He+"+"+Ge+"(?="+[Be,je+We,"$"].join("|")+")",je+"?"+We+"+"+Ye,je+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Ze].join("|"),"g"),rt=RegExp("["+ze+Ie+Ae+Pe+"]"),st=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,lt={};lt[L]=lt[F]=lt[N]=lt[U]=lt[V]=lt[q]=lt[$]=lt[j]=lt[z]=!0,lt[y]=lt[v]=lt[M]=lt[w]=lt[R]=lt[_]=lt[S]=lt[C]=lt[A]=lt[k]=lt[x]=lt[P]=lt[E]=lt[D]=lt[B]=!1;var ct={};ct[y]=ct[v]=ct[M]=ct[R]=ct[w]=ct[_]=ct[L]=ct[F]=ct[N]=ct[U]=ct[V]=ct[A]=ct[k]=ct[x]=ct[P]=ct[E]=ct[D]=ct[O]=ct[q]=ct[$]=ct[j]=ct[z]=!0,ct[S]=ct[C]=ct[B]=!1;var dt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,pt=parseInt,ht="object"==typeof global&&global&&global.Object===Object&&global,ft="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||ft||Function("return this")(),gt="object"==typeof e&&e&&!e.nodeType&&e,bt=gt&&"object"==typeof t&&t&&!t.nodeType&&t,yt=bt&&bt.exports===gt,vt=yt&&ht.process,wt=function(){try{return bt&&bt.require&&bt.require("util").types||vt&&vt.binding&&vt.binding("util")}catch{}}(),_t=wt&&wt.isArrayBuffer,St=wt&&wt.isDate,Ct=wt&&wt.isMap,It=wt&&wt.isRegExp,At=wt&&wt.isSet,kt=wt&&wt.isTypedArray;function xt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Tt(e,t,i,n){for(var r=-1,s=null==e?0:e.length;++r<s;){var a=e[r];t(n,a,i(a),e)}return n}function Pt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n&&!1!==t(e[i],i,e););return e}function Et(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function Dt(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(!t(e[i],i,e))return!1;return!0}function Ot(e,t){for(var i=-1,n=null==e?0:e.length,r=0,s=[];++i<n;){var a=e[i];t(a,i,e)&&(s[r++]=a)}return s}function Bt(e,t){return!!(null==e?0:e.length)&&jt(e,t,0)>-1}function Mt(e,t,i){for(var n=-1,r=null==e?0:e.length;++n<r;)if(i(t,e[n]))return!0;return!1}function Rt(e,t){for(var i=-1,n=null==e?0:e.length,r=Array(n);++i<n;)r[i]=t(e[i],i,e);return r}function Lt(e,t){for(var i=-1,n=t.length,r=e.length;++i<n;)e[r+i]=t[i];return e}function Ft(e,t,i,n){var r=-1,s=null==e?0:e.length;for(n&&s&&(i=e[++r]);++r<s;)i=t(i,e[r],r,e);return i}function Nt(e,t,i,n){var r=null==e?0:e.length;for(n&&r&&(i=e[--r]);r--;)i=t(i,e[r],r,e);return i}function Ut(e,t){for(var i=-1,n=null==e?0:e.length;++i<n;)if(t(e[i],i,e))return!0;return!1}var Vt=Yt("length");function qt(e,t,i){var n;return i(e,(function(e,i,r){if(t(e,i,r))return n=i,!1})),n}function $t(e,t,i,n){for(var r=e.length,s=i+(n?1:-1);n?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function jt(e,t,i){return t==t?function(e,t,i){for(var n=i-1,r=e.length;++n<r;)if(e[n]===t)return n;return-1}(e,t,i):$t(e,Wt,i)}function zt(e,t,i,n){for(var r=i-1,s=e.length;++r<s;)if(n(e[r],t))return r;return-1}function Wt(e){return e!=e}function Ht(e,t){var i=null==e?0:e.length;return i?Qt(e,t)/i:h}function Yt(e){return function(t){return null==t?i:t[e]}}function Gt(e){return function(t){return null==e?i:e[t]}}function Kt(e,t,i,n,r){return r(e,(function(e,r,s){i=n?(n=!1,e):t(i,e,r,s)})),i}function Qt(e,t){for(var n,r=-1,s=e.length;++r<s;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Jt(e,t){for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function Zt(e){return e&&e.slice(0,fi(e)+1).replace(ae,"")}function Xt(e){return function(t){return e(t)}}function ei(e,t){return Rt(t,(function(t){return e[t]}))}function ti(e,t){return e.has(t)}function ii(e,t){for(var i=-1,n=e.length;++i<n&&jt(t,e[i],0)>-1;);return i}function ni(e,t){for(var i=e.length;i--&&jt(t,e[i],0)>-1;);return i}var ri=Gt({"Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã":"A","Ã
":"A","à ":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","Ã":"C","ç":"c","Ã":"D","ð":"d","Ã":"E","Ã":"E","Ã":"E","Ã":"E","è":"e","é":"e","ê":"e","ë":"e","Ã":"I","Ã":"I","Ã":"I","Ã":"I","ì":"i","Ã":"i","î":"i","ï":"i","Ã":"N","ñ":"n","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","Ã":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ã":"U","Ã":"U","Ã":"U","Ã":"U","ù":"u","ú":"u","û":"u","ü":"u","Ã":"Y","ý":"y","ÿ":"y","Ã":"Ae","æ":"ae","Ã":"Th","þ":"th","Ã":"ss","Ä":"A","Ä":"A","Ä":"A","Ä":"a","Ä":"a","Ä
":"a","Ä":"C","Ä":"C","Ä":"C","Ä":"C","Ä":"
1c","Ä":"c","Ä":"c","Ä":"c","Ä":"D","Ä":"D","Ä":"d","Ä":"d","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"e","Ä":"G","Ä":"G","Ä ":"G","Ä¢":"G","Ä":"g","Ä":"g","Ä¡":"g","Ä£":"g","Ĥ":"H","Ħ":"H","Ä¥":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Ä®":"I","İ":"I","Ä©":"i","Ä«":"i","Ä":"i","į":"i","ı":"i","Ä´":"J","ĵ":"j","Ķ":"K","Ä·":"k","ĸ":"k","Ĺ":"L","Ä»":"L","Ľ":"L","Ä¿":"L","Å":"L","ĺ":"l","ļ":"l","ľ":"l","Å":"l","Å":"l","Å":"N","Å
":"N","Å":"N","Å":"N","Å":"n","Å":"n","Å":"n","Å":"n","Å":"O","Å":"O","Å":"O","Å":"o","Å":"o","Å":"o","Å":"R","Å":"R","Å":"R","Å":"r","Å":"r","Å":"r","Å":"S","Å":"S","Å":"S","Å ":"S","Å":"s","Å":"s","Å":"s","Å¡":"s","Å¢":"T","Ť":"T","Ŧ":"T","Å£":"t","Å¥":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Å®":"U","Ű":"U","Ų":"U","Å©":"u","Å«":"u","Å":"u","ů":"u","ű":"u","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","Å»":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Å":"Oe","Å":"oe","Å":"'n","Å¿":"s"}),si=Gt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ai(e){return"\\"+dt[e]}function oi(e){return rt.test(e)}function li(e){var t=-1,i=Array(e.size);return e.forEach((function(e,n){i[++t]=[n,e]})),i}function ci(e,t){return function(i){return e(t(i))}}function di(e,t){for(var i=-1,n=e.length,r=0,a=[];++i<n;){var o=e[i];(o===t||o===s)&&(e[i]=s,a[r++]=i)}return a}function ui(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}function pi(e){return oi(e)?function(e){for(var t=it.lastIndex=0;it.test(e);)++t;return t}(e):Vt(e)}function hi(e){return oi(e)?function(e){return e.match(it)||[]}(e):function(e){return e.split("")}(e)}function fi(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var mi=Gt({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gi=function e(t){var oe,Ie=(t=null==t?mt:gi.defaults(mt.Object(),t,gi.pick(mt,at))).Array,Ae=t.Date,ke=t.Error,xe=t.Function,Te=t.Math,Pe=t.Object,Ee=t.RegExp,De=t.String,Oe=t.TypeError,Be=Ie.prototype,Me=xe.prototype,Re=Pe.prototype,Le=t["__core-js_shared__"],Fe=Me.toString,Ne=Re.hasOwnProperty,Ue=0,Ve=(oe=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"",qe=Re.toString,$e=Fe.call(Pe),je=mt._,ze=Ee("^"+Fe.call(Ne).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=yt?t.Buffer:i,He=t.Symbol,Ye=t.Uint8Array,Ge=We?We.allocUnsafe:i,Ke=ci(Pe.getPrototypeOf,Pe),Qe=Pe.create,Je=Re.propertyIsEnumerable,Ze=Be.splice,Xe=He?He.isConcatSpreadable:i,it=He?He.iterator:i,rt=He?He.toStringTag:i,dt=function(){try{var e=hs(Pe,"defineProperty");return e({},"",{}),e}catch{}}(),ht=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,ft=Ae&&Ae.now!==mt.Date.now&&Ae.now,gt=t.setTimeout!==mt.setTimeout&&t.setTimeout,bt=Te.ceil,vt=Te.floor,wt=Pe.getOwnPropertySymbols,Vt=We?We.isBuffer:i,Gt=t.isFinite,bi=Be.join,yi=ci(Pe.keys,Pe),vi=Te.max,wi=Te.min,_i=Ae.now,Si=t.parseInt,Ci=Te.random,Ii=Be.reverse,Ai=hs(t,"DataView"),ki=hs(t,"Map"),xi=hs(t,"Promise"),Ti=hs(t,"Set"),Pi=hs(t,"WeakMap"),Ei=hs(Pe,"create"),Di=Pi&&new Pi,Oi={},Bi=Us(Ai),Mi=Us(ki),Ri=Us(xi),Li=Us(Ti),Fi=Us(Pi),Ni=He?He.prototype:i,Ui=Ni?Ni.valueOf:i,Vi=Ni?Ni.toString:i;function qi(e){if(io(e)&&!Wa(e)&&!(e instanceof Wi)){if(e instanceof zi)return e;if(Ne.call(e,"__wrapped__"))return Vs(e)}return new zi(e)}var $i=function(){function e(){}return function(t){if(!to(t))return{};if(Qe)return Qe(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function ji(){}function zi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Wi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Hi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Yi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Gi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var n=e[t];this.set(n[0],n[1])}}function Ki(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new Gi;++t<i;)this.add(e[t])}function Qi(e){var t=this.__data__=new Yi(e);this.size=t.size}function Ji(e,t){var i=Wa(e),n=!i&&za(e),r=!i&&!n&&Ka(e),s=!i&&!n&&!r&&uo(e),a=i||n||r||s,o=a?Jt(e.length,De):[],l=o.length;for(var c in e)(t||Ne.call(e,c))&&(!a||!("length"==c||r&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ws(c,l)))&&o.push(c);return o}function Zi(e){var t=e.length;return t?e[Qn(0,t-1)]:i}function Xi(e,t){return Ls(Dr(e),cn(t,0,e.length))}function en(e){return Ls(Dr(e))}function tn(e,t,n){(n!==i&&!qa(e[t],n)||n===i&&!(t in e))&&on(e,t,n)}function nn(e,t,n){var r=e[t];(!Ne.call(e,t)||!qa(r,n)||n===i&&!(t in e))&&on(e,t,n)}function rn(e,t){for(var i=e.length;i--;)if(qa(e[i][0],t))return i;return-1}function sn(e,t,i,n){return fn(e,(function(e,r,s){t(n,e,i(e),s)})),n}function an(e,t){return e&&Or(t,Bo(t),e)}
vendor: 7,021 bytes, line 1
1function on(e,t,i){"__proto__"==t&&dt?dt(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function ln(e,t){for(var n=-1,r=t.length,s=Ie(r),a=null==e;++n<r;)s[n]=a?i:To(e,t[n]);return s}function cn(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function dn(e,t,n,r,s,a){var o,l=1&t,c=2&t,d=4&t;if(n&&(o=s?n(e,r,s,a):n(e)),o!==i)return o;if(!to(e))return e;var u=Wa(e);if(u){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return Dr(e,o)}else{var p=gs(e),h=p==C||p==I;if(Ka(e))return Ar(e,l);if(p==x||p==y||h&&!s){if(o=c||h?{}:ys(e),!l)return c?function(e,t){return Or(e,ms(e),t)}(e,function(e,t){return e&&Or(t,Mo(t),e)}(o,e)):function(e,t){return Or(e,fs(e),t)}(e,an(o,e))}else{if(!ct[p])return s?e:{};o=function(e,t,i){var n=e.constructor;switch(t){case M:return kr(e);case w:case _:return new n(+e);case R:return function(e,t){var i=t?kr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case L:case F:case N:case U:case V:case q:case $:case j:case z:return xr(e,i);case A:return new n;case k:case D:return new n(e);case P:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case E:return new n;case O:return function(e){return Ui?Pe(Ui.call(e)):{}}(e)}}(e,p,l)}}a||(a=new Qi);var f=a.get(e);if(f)return f;a.set(e,o),oo(e)?e.forEach((function(i){o.add(dn(i,t,n,i,e,a))})):no(e)&&e.forEach((function(i,r){o.set(r,dn(i,t,n,r,e,a))}));var m=u?i:(d?c?as:ss:c?Mo:Bo)(e);return Pt(m||e,(function(i,r){m&&(i=e[r=i]),nn(o,r,dn(i,t,n,r,e,a))})),o}function un(e,t,n){var r=n.length;if(null==e)return!r;for(e=Pe(e);r--;){var s=n[r],a=t[s],o=e[s];if(o===i&&!(s in e)||!a(o))return!1}return!0}function pn(e,t,r){if("function"!=typeof e)throw new Oe(n);return Os((function(){e.apply(i,r)}),t)}function hn(e,t,i,n){var r=-1,s=Bt,a=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=Rt(t,Xt(i))),n?(s=Mt,a=!1):t.length>=200&&(s=ti,a=!1,t=new Ki(t));e:for(;++r<o;){var d=e[r],u=null==i?d:i(d);if(d=n||0!==d?d:0,a&&u==u){for(var p=c;p--;)if(t[p]===u)continue e;l.push(d)}else s(t,u,n)||l.push(d)}return l}qi.templateSettings={escape:Z,evaluate:X,interpolate:ee,variable:"",imports:{_:qi}},qi.prototype=ji.prototype,qi.prototype.constructor=qi,zi.prototype=$i(ji.prototype),zi.prototype.constructor=zi,Wi.prototype=$i(ji.prototype),Wi.prototype.constructor=Wi,Hi.prototype.clear=function(){this.__data__=Ei?Ei(null):{},this.size=0},Hi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hi.prototype.get=function(e){var t=this.__data__;if(Ei){var n=t[e];return n===r?i:n}return Ne.call(t,e)?t[e]:i},Hi.prototype.has=function(e){var t=this.__data__;return Ei?t[e]!==i:Ne.call(t,e)},Hi.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ei&&t===i?r:t,this},Yi.prototype.clear=function(){this.__data__=[],this.size=0},Yi.prototype.delete=function(e){var t=this.__data__,i=rn(t,e);return!(i<0)&&(i==t.length-1?t.pop():Ze.call(t,i,1),--this.size,!0)},Yi.prototype.get=function(e){var t=this.__data__,n=rn(t,e);return n<0?i:t[n][1]},Yi.prototype.has=function(e){return rn(this.__data__,e)>-1},Yi.prototype.set=function(e,t){var i=this.__data__,n=rn(i,e);return n<0?(++this.size,i.push([e,t])):i[n][1]=t,this},Gi.prototype.clear=function(){this.size=0,this.__data__={hash:new Hi,map:new(ki||Yi),string:new Hi}},Gi.prototype.delete=function(e){var t=us(this,e).delete(e);return this.size-=t?1:0,t},Gi.prototype.get=function(e){return us(this,e).get(e)},Gi.prototype.has=function(e){return us(this,e).has(e)},Gi.prototype.set=function(e,t){var i=us(this,e),n=i.size;return i.set(e,t),this.size+=i.size==n?0:1,this},Ki.prototype.add=Ki.prototype.push=function(e){return this.__data__.set(e,r),this},Ki.prototype.has=function(e){return this.__data__.has(e)},Qi.prototype.clear=function(){this.__data__=new Yi,this.size=0},Qi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Qi.prototype.get=function(e){return this.__data__.get(e)},Qi.prototype.has=function(e){return this.__data__.has(e)},Qi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Yi){var n=i.__data__;if(!ki||n.length<199)return n.push([e,t]),this.size=++i.size,this;i=this.__data__=new Gi(n)}return i.set(e,t),this.size=i.size,this};var fn=Rr(Sn),mn=Rr(Cn,!0);function gn(e,t){var i=!0;return fn(e,(function(e,n,r){return i=!!t(e,n,r)})),i}function bn(e,t,n){for(var r=-1,s=e.length;++r<s;){var a=e[r],o=t(a);if(null!=o&&(l===i?o==o&&!co(o):n(o,l)))var l=o,c=a}return c}function yn(e,t){var i=[];return fn(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i}function vn(e,t,i,n,r){var s=-1,a=e.length;for(i||(i=vs),r||(r=[]);++s<a;){var o=e[s];t>0&&i(o)?t>1?vn(o,t-1,i,n,r):Lt(r,o):n||(r[r.length]=o)}return r}var wn=Lr(),_n=Lr(!0);function Sn(e,t){return e&&wn(e,t,Bo)}function Cn(e,t){return e&&_n(e,t,Bo)}function In(e,t){return Ot(t,(function(t){return Za(e[t])}))}function An(e,t){for(var n=0,r=(t=_r(t,e)).length;null!=e&&n<r;)e=e[Ns(t[n++])];return n&&n==r?e:i}function kn(e,t,i){var n=t(e);return Wa(e)?n:Lt(n,i(e))}function xn(e){return null==e?e===i?"[object Undefined]":"[object Null]":rt&&rt in Pe(e)?function(e){var t=Ne.call(e,rt),n=e[rt];try{e[rt]=i;var r=!0}catch{}var s=qe.call(e);return r&&(t?e[rt]=n:delete e[rt]),s}(e):function(e){return qe.call(e)}(e)}function Tn(e,t){return e>t}function Pn(e,t){return null!=e&&Ne.call(e,t)}function En(e,t){return null!=e&&t in Pe(e)}function Dn(e,t,n){for(var r=n?Mt:Bt,s=e[0].length,a=e.length,o=a,l=Ie(a),c=1/0,d=[];o--;){var u=e[o];o&&t&&(u=Rt(u,Xt(t))),c=wi(u.length,c),l[o]=!n&&(t||s>=120&&u.length>=120)?new Ki(o&&u):i}u=e[0];var p=-1,h=l[0];e:for(;++p<s&&d.length<c;){var f=u[p],m=t?t(f):f;if(f=n||0!==f?f:0,!(h?ti(h,m):r(d,m,n))){for(o=a;--o;){var g=l[o];if(!(g?ti(g,m):r(e[o],m,n)))continue e}h&&h.push(m),d.push(f)}}return d}function On(e,t,n){var r=null==(e=Ps(e,t=_r(t,e)))?e:e[Ns(Js(t))];return null==r?i:xt(r,e,n)}function Bn(e){return io(e)&&xn(e)==y}function Mn(e,t,n,r,s){return e===t||(null==e||null==t||!io(e)&&!io(t)?e!=e&&t!=t:function(e,t,n,r,s,a){var o=Wa(e),l=Wa(t),c=o?v:gs(e),d=l?v:gs(t),u=(c=c==y?x:c)==x,p=(d=d==y?x:d)==x,h=c==d;if(h&&Ka(e)){if(!Ka(t))return!1;o=!0,u=!1}if(h&&!u)return a||(a=new Qi),o||uo(e)?ns(e,t,n,r,s,a):function(e,t,i,n,r,s,a){switch(i){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!s(new Ye(e),new Ye(t)));case w:case _:case k:return qa(+e,+t);case S:return e.name==t.name&&e.message==t.message;case P:case D:return e==t+"";case A:var o=li;case E:var l=1&n;if(o||(o=ui),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var d=ns(o(e),o(t),n,r,s,a);return a.delete(e),d;case O:if(Ui)return Ui.call(e)==Ui.call(t)}return!1}(e,t,c,n,r,s,a);if(!(1&n)){var f=u&&Ne.call(e,"__wrapped__"),m=p&&Ne.call(t,"__wrapped__");
vendor: 7,359 bytes, line 1
1if(f||m){var g=f?e.value():e,b=m?t.value():t;return a||(a=new Qi),s(g,b,n,r,a)}}return!!h&&(a||(a=new Qi),function(e,t,n,r,s,a){var o=1&n,l=ss(e),c=l.length,d=ss(t),u=d.length;if(c!=u&&!o)return!1;for(var p=c;p--;){var h=l[p];if(!(o?h in t:Ne.call(t,h)))return!1}var f=a.get(e),m=a.get(t);if(f&&m)return f==t&&m==e;var g=!0;a.set(e,t),a.set(t,e);for(var b=o;++p<c;){var y=e[h=l[p]],v=t[h];if(r)var w=o?r(v,y,h,t,e,a):r(y,v,h,e,t,a);if(!(w===i?y===v||s(y,v,n,r,a):w)){g=!1;break}b||(b="constructor"==h)}if(g&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof S&&S instanceof S)&&(g=!1)}return a.delete(e),a.delete(t),g}(e,t,n,r,s,a))}(e,t,n,r,Mn,s))}function Rn(e,t,n,r){var s=n.length,a=s,o=!r;if(null==e)return!a;for(e=Pe(e);s--;){var l=n[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var c=(l=n[s])[0],d=e[c],u=l[1];if(o&&l[2]){if(d===i&&!(c in e))return!1}else{var p=new Qi;if(r)var h=r(d,u,c,e,t,p);if(!(h===i?Mn(u,d,3,r,p):h))return!1}}return!0}function Ln(e){return!(!to(e)||function(e){return!!Ve&&Ve in e}(e))&&(Za(e)?ze:ye).test(Us(e))}function Fn(e){return"function"==typeof e?e:null==e?sl:"object"==typeof e?Wa(e)?jn(e[0],e[1]):$n(e):fl(e)}function Nn(e){if(!As(e))return yi(e);var t=[];for(var i in Pe(e))Ne.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Un(e){if(!to(e))return function(e){var t=[];if(null!=e)for(var i in Pe(e))t.push(i);return t}(e);var t=As(e),i=[];for(var n in e)"constructor"==n&&(t||!Ne.call(e,n))||i.push(n);return i}function Vn(e,t){return e<t}function qn(e,t){var i=-1,n=Ya(e)?Ie(e.length):[];return fn(e,(function(e,r,s){n[++i]=t(e,r,s)})),n}function $n(e){var t=ps(e);return 1==t.length&&t[0][2]?xs(t[0][0],t[0][1]):function(i){return i===e||Rn(i,e,t)}}function jn(e,t){return Ss(e)&&ks(t)?xs(Ns(e),t):function(n){var r=To(n,e);return r===i&&r===t?Po(n,e):Mn(t,r,3)}}function zn(e,t,n,r,s){e!==t&&wn(t,(function(a,o){if(s||(s=new Qi),to(a))!function(e,t,n,r,s,a,o){var l=Es(e,n),c=Es(t,n),d=o.get(c);if(d)return void tn(e,n,d);var u=a?a(l,c,n+"",e,t,o):i,p=u===i;if(p){var h=Wa(c),f=!h&&Ka(c),m=!h&&!f&&uo(c);u=c,h||f||m?Wa(l)?u=l:Ga(l)?u=Dr(l):f?(p=!1,u=Ar(c,!0)):m?(p=!1,u=xr(c,!0)):u=[]:so(c)||za(c)?(u=l,za(l)?u=vo(l):(!to(l)||Za(l))&&(u=ys(c))):p=!1}p&&(o.set(c,u),s(u,c,r,a,o),o.delete(c)),tn(e,n,u)}(e,t,o,n,zn,r,s);else{var l=r?r(Es(e,o),a,o+"",e,t,s):i;l===i&&(l=a),tn(e,o,l)}}),Mo)}function Wn(e,t){var n=e.length;if(n)return ws(t+=t<0?n:0,n)?e[t]:i}function Hn(e,t,i){t=t.length?Rt(t,(function(e){return Wa(e)?function(t){return An(t,1===e.length?e[0]:e)}:e})):[sl];var n=-1;return t=Rt(t,Xt(ds())),function(e,t){var i=e.length;for(e.sort(t);i--;)e[i]=e[i].value;return e}(qn(e,(function(e,i,r){return{criteria:Rt(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,i){for(var n=-1,r=e.criteria,s=t.criteria,a=r.length,o=i.length;++n<a;){var l=Tr(r[n],s[n]);if(l)return n>=o?l:l*("desc"==i[n]?-1:1)}return e.index-t.index}(e,t,i)}))}function Yn(e,t,i){for(var n=-1,r=t.length,s={};++n<r;){var a=t[n],o=An(e,a);i(o,a)&&tr(s,_r(a,e),o)}return s}function Gn(e,t,i,n){var r=n?zt:jt,s=-1,a=t.length,o=e;for(e===t&&(t=Dr(t)),i&&(o=Rt(e,Xt(i)));++s<a;)for(var l=0,c=t[s],d=i?i(c):c;(l=r(o,d,l,n))>-1;)o!==e&&Ze.call(o,l,1),Ze.call(e,l,1);return e}function Kn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var r=t[i];if(i==n||r!==s){var s=r;ws(r)?Ze.call(e,r,1):hr(e,r)}}return e}function Qn(e,t){return e+vt(Ci()*(t-e+1))}function Jn(e,t){var i="";if(!e||t<1||t>p)return i;do{t%2&&(i+=e),(t=vt(t/2))&&(e+=e)}while(t);return i}function Zn(e,t){return Bs(Ts(e,t,sl),e+"")}function Xn(e){return Zi($o(e))}function er(e,t){var i=$o(e);return Ls(i,cn(t,0,i.length))}function tr(e,t,n,r){if(!to(e))return e;for(var s=-1,a=(t=_r(t,e)).length,o=a-1,l=e;null!=l&&++s<a;){var c=Ns(t[s]),d=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=o){var u=l[c];(d=r?r(u,c,l):i)===i&&(d=to(u)?u:ws(t[s+1])?[]:{})}nn(l,c,d),l=l[c]}return e}var ir=Di?function(e,t){return Di.set(e,t),e}:sl,nr=dt?function(e,t){return dt(e,"toString",{configurable:!0,enumerable:!1,value:il(t),writable:!0})}:sl;function rr(e){return Ls($o(e))}function sr(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(i=i>r?r:i)<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var s=Ie(r);++n<r;)s[n]=e[n+t];return s}function ar(e,t){var i;return fn(e,(function(e,n,r){return!(i=t(e,n,r))})),!!i}function or(e,t,i){var n=0,r=null==e?n:e.length;if("number"==typeof t&&t==t&&r<=g){for(;n<r;){var s=n+r>>>1,a=e[s];null!==a&&!co(a)&&(i?a<=t:a<t)?n=s+1:r=s}return r}return lr(e,t,sl,i)}function lr(e,t,n,r){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,l=null===t,c=co(t),d=t===i;s<a;){var u=vt((s+a)/2),p=n(e[u]),h=p!==i,f=null===p,g=p==p,b=co(p);if(o)var y=r||g;else y=d?g&&(r||h):l?g&&h&&(r||!f):c?g&&h&&!f&&(r||!b):!f&&!b&&(r?p<=t:p<t);y?s=u+1:a=u}return wi(a,m)}function cr(e,t){for(var i=-1,n=e.length,r=0,s=[];++i<n;){var a=e[i],o=t?t(a):a;if(!i||!qa(o,l)){var l=o;s[r++]=0===a?0:a}}return s}function dr(e){return"number"==typeof e?e:co(e)?h:+e}function ur(e){if("string"==typeof e)return e;if(Wa(e))return Rt(e,ur)+"";if(co(e))return Vi?Vi.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}function pr(e,t,i){var n=-1,r=Bt,s=e.length,a=!0,o=[],l=o;if(i)a=!1,r=Mt;else if(s>=200){var c=t?null:Jr(e);if(c)return ui(c);a=!1,r=ti,l=new Ki}else l=t?[]:o;e:for(;++n<s;){var d=e[n],u=t?t(d):d;if(d=i||0!==d?d:0,a&&u==u){for(var p=l.length;p--;)if(l[p]===u)continue e;t&&l.push(u),o.push(d)}else r(l,u,i)||(l!==o&&l.push(u),o.push(d))}return o}function hr(e,t){return null==(e=Ps(e,t=_r(t,e)))||delete e[Ns(Js(t))]}function fr(e,t,i,n){return tr(e,t,i(An(e,t)),n)}function mr(e,t,i,n){for(var r=e.length,s=n?r:-1;(n?s--:++s<r)&&t(e[s],s,e););return i?sr(e,n?0:s,n?s+1:r):sr(e,n?s+1:0,n?r:s)}function gr(e,t){var i=e;return i instanceof Wi&&(i=i.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),i)}function br(e,t,i){var n=e.length;if(n<2)return n?pr(e[0]):[];for(var r=-1,s=Ie(n);++r<n;)for(var a=e[r],o=-1;++o<n;)o!=r&&(s[r]=hn(s[r]||a,e[o],t,i));return pr(vn(s,1),t,i)}function yr(e,t,n){for(var r=-1,s=e.length,a=t.length,o={};++r<s;){var l=r<a?t[r]:i;n(o,e[r],l)}return o}function vr(e){return Ga(e)?e:[]}function wr(e){return"function"==typeof e?e:sl}function _r(e,t){return Wa(e)?e:Ss(e,t)?[e]:Fs(wo(e))}var Sr=Zn;function Cr(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:sr(e,t,n)}var Ir=ht||function(e){return mt.clearTimeout(e)};function Ar(e,t){if(t)return e.slice();var i=e.length,n=Ge?Ge(i):new e.constructor(i);return e.copy(n),n}function kr(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function xr(e,t){var i=t?kr(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Tr(e,t){if(e!==t){var n=e!==i,r=null===e,s=e==e,a=co(e),o=t!==i,l=null===t,c=t==t,d=co(t);if(!l&&!d&&!a&&e>t||a&&o&&c&&!l&&!d||r&&o&&c||!n&&c||!s)return 1;if(!r&&!a&&!d&&e<t||d&&n&&s&&!r&&!a||l&&n&&s||!o&&s||!c)return-1}return 0}function Pr(e,t,i,n){for(var r=-1,s=e.length,a=i.length,o=-1,l=t.length,c=vi(s-a,0),d=Ie(l+c),u=!n;++o<l;)d[o]=t[o];for(;++r<a;)(u||r<s)&&(d[i[r]]=e[r]);for(;c--;)d[o++]=e[r++];return d}function Er(e,t,i,n){for(var r=-1,s=e.length,a=-1,o=i.length,l=-1,c=t.length,d=vi(s-o,0),u=Ie(d+c),p=!n;
vendor: 4,813 bytes, line 1
1++r<d;)u[r]=e[r];for(var h=r;++l<c;)u[h+l]=t[l];for(;++a<o;)(p||r<s)&&(u[h+i[a]]=e[r++]);return u}function Dr(e,t){var i=-1,n=e.length;for(t||(t=Ie(n));++i<n;)t[i]=e[i];return t}function Or(e,t,n,r){var s=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=r?r(n[l],e[l],l,n,e):i;c===i&&(c=e[l]),s?on(n,l,c):nn(n,l,c)}return n}function Br(e,t){return function(i,n){var r=Wa(i)?Tt:sn,s=t?t():{};return r(i,e,ds(n,2),s)}}function Mr(e){return Zn((function(t,n){var r=-1,s=n.length,a=s>1?n[s-1]:i,o=s>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(s--,a):i,o&&_s(n[0],n[1],o)&&(a=s<3?i:a,s=1),t=Pe(t);++r<s;){var l=n[r];l&&e(t,l,r,a)}return t}))}function Rr(e,t){return function(i,n){if(null==i)return i;if(!Ya(i))return e(i,n);for(var r=i.length,s=t?r:-1,a=Pe(i);(t?s--:++s<r)&&!1!==n(a[s],s,a););return i}}function Lr(e){return function(t,i,n){for(var r=-1,s=Pe(t),a=n(t),o=a.length;o--;){var l=a[e?o:++r];if(!1===i(s[l],l,s))break}return t}}function Fr(e){return function(t){var n=oi(t=wo(t))?hi(t):i,r=n?n[0]:t.charAt(0),s=n?Cr(n,1).join(""):t.slice(1);return r[e]()+s}}function Nr(e){return function(t){return Ft(Xo(Wo(t).replace(et,"")),e,"")}}function Ur(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=$i(e.prototype),n=e.apply(i,t);return to(n)?n:i}}function Vr(e){return function(t,n,r){var s=Pe(t);if(!Ya(t)){var a=ds(n,3);t=Bo(t),n=function(e){return a(s[e],e,s)}}var o=e(t,n,r);return o>-1?s[a?t[o]:o]:i}}function qr(e){return rs((function(t){var r=t.length,s=r,a=zi.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new Oe(n);if(a&&!l&&"wrapper"==ls(o))var l=new zi([],!0)}for(s=l?s:r;++s<r;){var c=ls(o=t[s]),d="wrapper"==c?os(o):i;l=d&&Cs(d[0])&&424==d[1]&&!d[4].length&&1==d[9]?l[ls(d[0])].apply(l,d[3]):1==o.length&&Cs(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Wa(i))return l.plant(i).value();for(var n=0,s=r?t[n].apply(this,e):i;++n<r;)s=t[n].call(this,s);return s}}))}function $r(e,t,n,r,s,a,o,l,d,u){var p=t&c,h=1&t,f=2&t,m=24&t,g=512&t,b=f?i:Ur(e);return function c(){for(var y=arguments.length,v=Ie(y),w=y;w--;)v[w]=arguments[w];if(m)var _=cs(c),S=function(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&++n;return n}(v,_);if(r&&(v=Pr(v,r,s,m)),a&&(v=Er(v,a,o,m)),y-=S,m&&y<u){var C=di(v,_);return Kr(e,t,$r,c.placeholder,n,v,C,l,d,u-y)}var I=h?n:this,A=f?I[e]:e;return y=v.length,l?v=function(e,t){for(var n=e.length,r=wi(t.length,n),s=Dr(e);r--;){var a=t[r];e[r]=ws(a,n)?s[a]:i}return e}(v,l):g&&y>1&&v.reverse(),p&&d<y&&(v.length=d),this&&this!==mt&&this instanceof c&&(A=b||Ur(A)),A.apply(I,v)}}function jr(e,t){return function(i,n){return function(e,t,i,n){return Sn(e,(function(e,r,s){t(n,i(e),r,s)})),n}(i,e,t(n),{})}}function zr(e,t){return function(n,r){var s;if(n===i&&r===i)return t;if(n!==i&&(s=n),r!==i){if(s===i)return r;"string"==typeof n||"string"==typeof r?(n=ur(n),r=ur(r)):(n=dr(n),r=dr(r)),s=e(n,r)}return s}}function Wr(e){return rs((function(t){return t=Rt(t,Xt(ds())),Zn((function(i){var n=this;return e(t,(function(e){return xt(e,n,i)}))}))}))}function Hr(e,t){var n=(t=t===i?" ":ur(t)).length;if(n<2)return n?Jn(t,e):t;var r=Jn(t,bt(e/pi(t)));return oi(t)?Cr(hi(r),0,e).join(""):r.slice(0,e)}function Yr(e){return function(t,n,r){return r&&"number"!=typeof r&&_s(t,n,r)&&(n=r=i),t=mo(t),n===i?(n=t,t=0):n=mo(n),function(e,t,i,n){for(var r=-1,s=vi(bt((t-e)/(i||1)),0),a=Ie(s);s--;)a[n?s:++r]=e,e+=i;return a}(t,n,r=r===i?t<n?1:-1:mo(r),e)}}function Gr(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=yo(t),i=yo(i)),e(t,i)}}function Kr(e,t,n,r,s,a,c,d,u,p){var h=8&t;t|=h?o:l,4&(t&=~(h?l:o))||(t&=-4);var f=[e,t,s,h?a:i,h?c:i,h?i:a,h?i:c,d,u,p],m=n.apply(i,f);return Cs(e)&&Ds(m,f),m.placeholder=r,Ms(m,e,t)}function Qr(e){var t=Te[e];return function(e,i){if(e=yo(e),(i=null==i?0:wi(go(i),292))&&Gt(e)){var n=(wo(e)+"e").split("e");return+((n=(wo(t(n[0]+"e"+(+n[1]+i)))+"e").split("e"))[0]+"e"+(+n[1]-i))}return t(e)}}var Jr=Ti&&1/ui(new Ti([,-0]))[1]==u?function(e){return new Ti(e)}:dl;function Zr(e){return function(t){var i=gs(t);return i==A?li(t):i==E?function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=[e,e]})),i}(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xr(e,t,r,u,p,h,f,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Oe(n);var b=u?u.length:0;if(b||(t&=-97,u=p=i),f=f===i?f:vi(go(f),0),m=m===i?m:go(m),b-=p?p.length:0,t&l){var y=u,v=p;u=p=i}var w=g?i:os(e),_=[e,t,r,u,p,y,v,h,f,m];
vendor: 4,315 bytes, line 1
1if(w&&function(e,t){var i=e[1],n=t[1],r=i|n,a=r<131,o=n==c&&8==i||n==c&&i==d&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==i;if(!a&&!o)return e;1&n&&(e[2]=t[2],r|=1&i?0:4);var l=t[3];if(l){var u=e[3];e[3]=u?Pr(u,l,t[4]):l,e[4]=u?di(e[3],s):t[4]}l=t[5],l&&(u=e[5],e[5]=u?Er(u,l,t[6]):l,e[6]=u?di(e[5],s):t[6]),l=t[7],l&&(e[7]=l),n&c&&(e[8]=null==e[8]?t[8]:wi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(_,w),e=_[0],t=_[1],r=_[2],u=_[3],p=_[4],!(m=_[9]=_[9]===i?g?0:e.length:vi(_[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==a?function(e,t,n){var r=Ur(e);return function s(){for(var a=arguments.length,o=Ie(a),l=a,c=cs(s);l--;)o[l]=arguments[l];var d=a<3&&o[0]!==c&&o[a-1]!==c?[]:di(o,c);return(a-=d.length)<n?Kr(e,t,$r,s.placeholder,i,o,d,i,i,n-a):xt(this&&this!==mt&&this instanceof s?r:e,this,o)}}(e,t,m):t!=o&&33!=t||p.length?$r.apply(i,_):function(e,t,i,n){var r=1&t,s=Ur(e);return function t(){for(var a=-1,o=arguments.length,l=-1,c=n.length,d=Ie(c+o),u=this&&this!==mt&&this instanceof t?s:e;++l<c;)d[l]=n[l];for(;o--;)d[l++]=arguments[++a];return xt(u,r?i:this,d)}}(e,t,r,u);else var S=function(e,t,i){var n=1&t,r=Ur(e);return function t(){return(this&&this!==mt&&this instanceof t?r:e).apply(n?i:this,arguments)}}(e,t,r);return Ms((w?ir:Ds)(S,_),e,t)}function es(e,t,n,r){return e===i||qa(e,Re[n])&&!Ne.call(r,n)?t:e}function ts(e,t,n,r,s,a){return to(e)&&to(t)&&(a.set(t,e),zn(e,t,i,ts,a),a.delete(t)),e}function is(e){return so(e)?i:e}function ns(e,t,n,r,s,a){var o=1&n,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var d=a.get(e),u=a.get(t);if(d&&u)return d==t&&u==e;var p=-1,h=!0,f=2&n?new Ki:i;for(a.set(e,t),a.set(t,e);++p<l;){var m=e[p],g=t[p];if(r)var b=o?r(g,m,p,t,e,a):r(m,g,p,e,t,a);if(b!==i){if(b)continue;h=!1;break}if(f){if(!Ut(t,(function(e,t){if(!ti(f,t)&&(m===e||s(m,e,n,r,a)))return f.push(t)}))){h=!1;break}}else if(m!==g&&!s(m,g,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function rs(e){return Bs(Ts(e,i,Hs),e+"")}function ss(e){return kn(e,Bo,fs)}function as(e){return kn(e,Mo,ms)}var os=Di?function(e){return Di.get(e)}:dl;function ls(e){for(var t=e.name+"",i=Oi[t],n=Ne.call(Oi,t)?i.length:0;n--;){var r=i[n],s=r.func;if(null==s||s==e)return r.name}return t}function cs(e){return(Ne.call(qi,"placeholder")?qi:e).placeholder}function ds(){var e=qi.iteratee||al;return e=e===al?Fn:e,arguments.length?e(arguments[0],arguments[1]):e}function us(e,t){var i=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?i["string"==typeof t?"string":"hash"]:i.map}function ps(e){for(var t=Bo(e),i=t.length;i--;){var n=t[i],r=e[n];t[i]=[n,r,ks(r)]}return t}function hs(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Ln(n)?n:i}var fs=wt?function(e){return null==e?[]:(e=Pe(e),Ot(wt(e),(function(t){return Je.call(e,t)})))}:bl,ms=wt?function(e){for(var t=[];e;)Lt(t,fs(e)),e=Ke(e);return t}:bl,gs=xn;function bs(e,t,i){for(var n=-1,r=(t=_r(t,e)).length,s=!1;++n<r;){var a=Ns(t[n]);if(!(s=null!=e&&i(e,a)))break;e=e[a]}return s||++n!=r?s:!!(r=null==e?0:e.length)&&eo(r)&&ws(a,r)&&(Wa(e)||za(e))}function ys(e){return"function"!=typeof e.constructor||As(e)?{}:$i(Ke(e))}function vs(e){return Wa(e)||za(e)||!!(Xe&&e&&e[Xe])}function ws(e,t){var i=typeof e;return!!(t=t??p)&&("number"==i||"symbol"!=i&&we.test(e))&&e>-1&&e%1==0&&e<t}function _s(e,t,i){if(!to(i))return!1;var n=typeof t;return!!("number"==n?Ya(i)&&ws(t,i.length):"string"==n&&t in i)&&qa(i[t],e)}function Ss(e,t){if(Wa(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!co(e))||(ie.test(e)||!te.test(e)||null!=t&&e in Pe(t))}function Cs(e){var t=ls(e),i=qi[t];if("function"!=typeof i||!(t in Wi.prototype))return!1;if(e===i)return!0;var n=os(i);return!!n&&e===n[0]}(Ai&&gs(new Ai(new ArrayBuffer(1)))!=R||ki&&gs(new ki)!=A||xi&&gs(xi.resolve())!=T||Ti&&gs(new Ti)!=E||Pi&&gs(new Pi)!=B)&&(gs=function(e){var t=xn(e),n=t==x?e.constructor:i,r=n?Us(n):"";if(r)switch(r){case Bi:return R;case Mi:return A;case Ri:return T;case Li:return E;case Fi:return B}return t});var Is=Le?Za:yl;function As(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function ks(e){return e==e&&!to(e)}function xs(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Pe(n)))}}
vendor: 17,521 bytes, line 1
1function Ts(e,t,n){return t=vi(t===i?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=vi(i.length-t,0),a=Ie(s);++r<s;)a[r]=i[t+r];r=-1;for(var o=Ie(t+1);++r<t;)o[r]=i[r];return o[t]=n(a),xt(e,this,o)}}function Ps(e,t){return t.length<2?e:An(e,sr(t,0,-1))}function Es(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ds=Rs(ir),Os=gt||function(e,t){return mt.setTimeout(e,t)},Bs=Rs(nr);function Ms(e,t,i){var n=t+"";return Bs(e,function(e,t){var i=t.length;if(!i)return e;var n=i-1;return t[n]=(i>1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(b,(function(i){var n="_."+i[0];t&i[1]&&!Bt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(n),i)))}function Rs(e){var t=0,n=0;return function(){var r=_i(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ls(e,t){var n=-1,r=e.length,s=r-1;for(t=t===i?r:t;++n<t;){var a=Qn(n,s),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Fs=function(e){var t=Ra(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,i,n,r){t.push(n?r.replace(he,"$1"):i||e)})),t}));function Ns(e){if("string"==typeof e||co(e))return e;var t=e+"";return"0"==t&&1/e==-u?"-0":t}function Us(e){if(null!=e){try{return Fe.call(e)}catch{}try{return e+""}catch{}}return""}function Vs(e){if(e instanceof Wi)return e.clone();var t=new zi(e.__wrapped__,e.__chain__);return t.__actions__=Dr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var qs=Zn((function(e,t){return Ga(e)?hn(e,vn(t,1,Ga,!0)):[]})),$s=Zn((function(e,t){var n=Js(t);return Ga(n)&&(n=i),Ga(e)?hn(e,vn(t,1,Ga,!0),ds(n,2)):[]})),js=Zn((function(e,t){var n=Js(t);return Ga(n)&&(n=i),Ga(e)?hn(e,vn(t,1,Ga,!0),i,n):[]}));function zs(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:go(i);return r<0&&(r=vi(n+r,0)),$t(e,ds(t,3),r)}function Ws(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r-1;return n!==i&&(s=go(n),s=n<0?vi(r+s,0):wi(s,r-1)),$t(e,ds(t,3),s,!0)}function Hs(e){return(null==e?0:e.length)?vn(e,1):[]}function Ys(e){return e&&e.length?e[0]:i}var Gs=Zn((function(e){var t=Rt(e,vr);return t.length&&t[0]===e[0]?Dn(t):[]})),Ks=Zn((function(e){var t=Js(e),n=Rt(e,vr);return t===Js(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Dn(n,ds(t,2)):[]})),Qs=Zn((function(e){var t=Js(e),n=Rt(e,vr);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Dn(n,i,t):[]}));function Js(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zs=Zn(Xs);function Xs(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var ea=rs((function(e,t){var i=null==e?0:e.length,n=ln(e,t);return Kn(e,Rt(t,(function(e){return ws(e,i)?+e:e})).sort(Tr)),n}));function ta(e){return null==e?e:Ii.call(e)}var ia=Zn((function(e){return pr(vn(e,1,Ga,!0))})),na=Zn((function(e){var t=Js(e);return Ga(t)&&(t=i),pr(vn(e,1,Ga,!0),ds(t,2))})),ra=Zn((function(e){var t=Js(e);return t="function"==typeof t?t:i,pr(vn(e,1,Ga,!0),i,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,(function(e){if(Ga(e))return t=vi(e.length,t),!0})),Jt(t,(function(t){return Rt(e,Yt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=sa(e);return null==t?n:Rt(n,(function(e){return xt(t,i,e)}))}var oa=Zn((function(e,t){return Ga(e)?hn(e,t):[]})),la=Zn((function(e){return br(Ot(e,Ga))})),ca=Zn((function(e){var t=Js(e);return Ga(t)&&(t=i),br(Ot(e,Ga),ds(t,2))})),da=Zn((function(e){var t=Js(e);return t="function"==typeof t?t:i,br(Ot(e,Ga),i,t)})),ua=Zn(sa);var pa=Zn((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,aa(e,n)}));function ha(e){var t=qi(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ma=rs((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,s=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Wi&&ws(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[s],thisArg:i}),new zi(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)}));var ga=Br((function(e,t,i){Ne.call(e,i)?++e[i]:on(e,i,1)}));var ba=Vr(zs),ya=Vr(Ws);function va(e,t){return(Wa(e)?Pt:fn)(e,ds(t,3))}function wa(e,t){return(Wa(e)?Et:mn)(e,ds(t,3))}var _a=Br((function(e,t,i){Ne.call(e,i)?e[i].push(t):on(e,i,[t])}));var Sa=Zn((function(e,t,i){var n=-1,r="function"==typeof t,s=Ya(e)?Ie(e.length):[];return fn(e,(function(e){s[++n]=r?xt(t,e,i):On(e,t,i)})),s})),Ca=Br((function(e,t,i){on(e,i,t)}));function Ia(e,t){return(Wa(e)?Rt:qn)(e,ds(t,3))}var Aa=Br((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]}));var ka=Zn((function(e,t){if(null==e)return[];var i=t.length;return i>1&&_s(e,t[0],t[1])?t=[]:i>2&&_s(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,vn(t,1),[])})),xa=ft||function(){return mt.Date.now()};function Ta(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xr(e,c,i,i,i,i,t)}function Pa(e,t){var r;if("function"!=typeof t)throw new Oe(n);return e=go(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ea=Zn((function(e,t,i){var n=1;if(i.length){var r=di(i,cs(Ea));n|=o}return Xr(e,n,t,i,r)})),Da=Zn((function(e,t,i){var n=3;if(i.length){var r=di(i,cs(Da));n|=o}return Xr(t,n,e,i,r)}));function Oa(e,t,r){var s,a,o,l,c,d,u=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new Oe(n);function m(t){var n=s,r=a;return s=a=i,u=t,l=e.apply(r,n)}function g(e){var n=e-d;return d===i||n>=t||n<0||h&&e-u>=o}function b(){var e=xa();if(g(e))return y(e);c=Os(b,function(e){var i=t-(e-d);return h?wi(i,o-(e-u)):i}(e))}function y(e){return c=i,f&&s?m(e):(s=a=i,l)}function v(){var e=xa(),n=g(e);if(s=arguments,a=this,d=e,n){if(c===i)return function(e){return u=e,c=Os(b,t),p?m(e):l}(d);if(h)return Ir(c),c=Os(b,t),m(d)}return c===i&&(c=Os(b,t)),l}return t=yo(t)||0,to(r)&&(p=!!r.leading,o=(h="maxWait"in r)?vi(yo(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),v.cancel=function(){c!==i&&Ir(c),u=0,s=d=a=c=i},v.flush=function(){return c===i?l:y(xa())},v}var Ba=Zn((function(e,t){return pn(e,1,t)})),Ma=Zn((function(e,t,i){return pn(e,yo(t)||0,i)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Oe(n);var i=function(){var n=arguments,r=t?t.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var a=e.apply(this,n);return i.cache=s.set(r,a)||s,a};return i.cache=new(Ra.Cache||Gi),i}function La(e){if("function"!=typeof e)throw new Oe(n);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Gi;var Fa=Sr((function(e,t){var i=(t=1==t.length&&Wa(t[0])?Rt(t[0],Xt(ds())):Rt(vn(t,1),Xt(ds()))).length;return Zn((function(n){for(var r=-1,s=wi(n.length,i);++r<s;)n[r]=t[r].call(this,n[r]);return xt(e,this,n)}))})),Na=Zn((function(e,t){var n=di(t,cs(Na));return Xr(e,o,i,t,n)})),Ua=Zn((function(e,t){var n=di(t,cs(Ua));return Xr(e,l,i,t,n)})),Va=rs((function(e,t){return Xr(e,d,i,i,i,t)}));function qa(e,t){return e===t||e!=e&&t!=t}var $a=Gr(Tn),ja=Gr((function(e,t){return e>=t})),za=Bn(function(){return arguments}())?Bn:function(e){return io(e)&&Ne.call(e,"callee")&&!Je.call(e,"callee")},Wa=Ie.isArray,Ha=_t?Xt(_t):function(e){return io(e)&&xn(e)==M};function Ya(e){return null!=e&&eo(e.length)&&!Za(e)}function Ga(e){return io(e)&&Ya(e)}var Ka=Vt||yl,Qa=St?Xt(St):function(e){return io(e)&&xn(e)==_};function Ja(e){if(!io(e))return!1;var t=xn(e);return t==S||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!so(e)}function Za(e){if(!to(e))return!1;var t=xn(e);return t==C||t==I||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==go(e)}function eo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function to(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function io(e){return null!=e&&"object"==typeof e}var no=Ct?Xt(Ct):function(e){return io(e)&&gs(e)==A};function ro(e){return"number"==typeof e||io(e)&&xn(e)==k}function so(e){if(!io(e)||xn(e)!=x)return!1;var t=Ke(e);if(null===t)return!0;var i=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Fe.call(i)==$e}var ao=It?Xt(It):function(e){return io(e)&&xn(e)==P};var oo=At?Xt(At):function(e){return io(e)&&gs(e)==E};function lo(e){return"string"==typeof e||!Wa(e)&&io(e)&&xn(e)==D}function co(e){return"symbol"==typeof e||io(e)&&xn(e)==O}var uo=kt?Xt(kt):function(e){return io(e)&&eo(e.length)&&!!lt[xn(e)]};var po=Gr(Vn),ho=Gr((function(e,t){return e<=t}));function fo(e){if(!e)return[];if(Ya(e))return lo(e)?hi(e):Dr(e);if(it&&e[it])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[it]());var t=gs(e);return(t==A?li:t==E?ui:$o)(e)}function mo(e){return e?(e=yo(e))===u||e===-u?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function go(e){var t=mo(e),i=t%1;return t==t?i?t-i:t:0}function bo(e){return e?cn(go(e),0,f):0}function yo(e){if("number"==typeof e)return e;if(co(e))return h;if(to(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=to(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var i=be.test(e);return i||ve.test(e)?pt(e.slice(2),i?2:8):ge.test(e)?h:+e}function vo(e){return Or(e,Mo(e))}function wo(e){return null==e?"":ur(e)}var _o=Mr((function(e,t){if(As(t)||Ya(t))Or(t,Bo(t),e);else for(var i in t)Ne.call(t,i)&&nn(e,i,t[i])})),So=Mr((function(e,t){Or(t,Mo(t),e)})),Co=Mr((function(e,t,i,n){Or(t,Mo(t),e,n)})),Io=Mr((function(e,t,i,n){Or(t,Bo(t),e,n)})),Ao=rs(ln);var ko=Zn((function(e,t){e=Pe(e);var n=-1,r=t.length,s=r>2?t[2]:i;for(s&&_s(t[0],t[1],s)&&(r=1);++n<r;)for(var a=t[n],o=Mo(a),l=-1,c=o.length;++l<c;){var d=o[l],u=e[d];(u===i||qa(u,Re[d])&&!Ne.call(e,d))&&(e[d]=a[d])}return e})),xo=Zn((function(e){return e.push(i,ts),xt(Lo,i,e)}));function To(e,t,n){var r=null==e?i:An(e,t);return r===i?n:r}function Po(e,t){return null!=e&&bs(e,t,En)}var Eo=jr((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=qe.call(t)),e[t]=i}),il(sl)),Do=jr((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=qe.call(t)),Ne.call(e,t)?e[t].push(i):e[t]=[i]}),ds),Oo=Zn(On);function Bo(e){return Ya(e)?Ji(e):Nn(e)}function Mo(e){return Ya(e)?Ji(e,!0):Un(e)}var Ro=Mr((function(e,t,i){zn(e,t,i)})),Lo=Mr((function(e,t,i,n){zn(e,t,i,n)})),Fo=rs((function(e,t){var i={};if(null==e)return i;var n=!1;t=Rt(t,(function(t){return t=_r(t,e),n||(n=t.length>1),t})),Or(e,as(e),i),n&&(i=dn(i,7,is));for(var r=t.length;r--;)hr(i,t[r]);return i}));var No=rs((function(e,t){return null==e?{}:function(e,t){return Yn(e,t,(function(t,i){return Po(e,i)}))}(e,t)}));function Uo(e,t){if(null==e)return{};var i=Rt(as(e),(function(e){return[e]}));return t=ds(t),Yn(e,i,(function(e,i){return t(e,i[0])}))}var Vo=Zr(Bo),qo=Zr(Mo);function $o(e){return null==e?[]:ei(e,Bo(e))}var jo=Nr((function(e,t,i){return t=t.toLowerCase(),e+(i?zo(t):t)}));function zo(e){return Zo(wo(e).toLowerCase())}function Wo(e){return(e=wo(e))&&e.replace(_e,ri).replace(tt,"")}var Ho=Nr((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),Yo=Nr((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),Go=Fr("toLowerCase");var Ko=Nr((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}));var Qo=Nr((function(e,t,i){return e+(i?" ":"")+Zo(t)}));var Jo=Nr((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),Zo=Fr("toUpperCase");function Xo(e,t,n){return e=wo(e),(t=n?i:t)===i?function(e){return st.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var el=Zn((function(e,t){try{return xt(e,i,t)}catch(e){return Ja(e)?e:new ke(e)}})),tl=rs((function(e,t){return Pt(t,(function(t){t=Ns(t),on(e,t,Ea(e[t],e))})),e}));function il(e){return function(){return e}}var nl=qr(),rl=qr(!0);function sl(e){return e}function al(e){return Fn("function"==typeof e?e:dn(e,1))}var ol=Zn((function(e,t){return function(i){return On(i,e,t)}})),ll=Zn((function(e,t){return function(i){return On(e,i,t)}}));function cl(e,t,i){var n=Bo(t),r=In(t,n);null==i&&(!to(t)||!r.length&&n.length)&&(i=t,t=e,e=this,r=In(t,Bo(t)));var s=!(to(i)&&"chain"in i&&!i.chain),a=Za(e);return Pt(r,(function(i){var n=t[i];e[i]=n,a&&(e.prototype[i]=function(){var t=this.__chain__;if(s||t){var i=e(this.__wrapped__);return(i.__actions__=Dr(this.__actions__)).push({func:n,args:arguments,thisArg:e}),i.__chain__=t,i}return n.apply(e,Lt([this.value()],arguments))})})),e}function dl(){}var ul=Wr(Rt),pl=Wr(Dt),hl=Wr(Ut);function fl(e){return Ss(e)?Yt(Ns(e)):function(e){return function(t){return An(t,e)}}(e)}var ml=Yr(),gl=Yr(!0);function bl(){return[]}function yl(){return!1}var vl=zr((function(e,t){return e+t}),0),wl=Qr("ceil"),_l=zr((function(e,t){return e/t}),1),Sl=Qr("floor");var Cl=zr((function(e,t){return e*t}),1),Il=Qr("round"),Al=zr((function(e,t){return e-t}),0);return qi.after=function(e,t){if("function"!=typeof t)throw new Oe(n);return e=go(e),function(){if(--e<1)return t.apply(this,arguments)}},qi.ary=Ta,qi.assign=_o,qi.assignIn=So,qi.assignInWith=Co,qi.assignWith=Io,qi.at=Ao,qi.before=Pa,qi.bind=Ea,qi.bindAll=tl,qi.bindKey=Da,qi.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},qi.chain=ha,qi.chunk=function(e,t,n){t=(n?_s(e,t,n):t===i)?1:vi(go(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var s=0,a=0,o=Ie(bt(r/t));s<r;)o[a++]=sr(e,s,s+=t);return o},qi.compact=function(e){for(var t=-1,i=null==e?0:e.length,n=0,r=[];++t<i;){var s=e[t];s&&(r[n++]=s)}return r},qi.concat=function(){var e=arguments.length;if(!e)return[];for(var t=Ie(e-1),i=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Lt(Wa(i)?Dr(i):[i],vn(t,1))},qi.cond=function(e){var t=null==e?0:e.length,i=ds();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Oe(n);return[i(e[0]),e[1]]})):[],Zn((function(i){for(var n=-1;++n<t;){var r=e[n];if(xt(r[0],this,i))return xt(r[1],this,i)}}))},qi.conforms=function(e){return function(e){var t=Bo(e);return function(i){return un(i,e,t)}}(dn(e,1))},qi.constant=il,qi.countBy=ga,qi.create=function(e,t){var i=$i(e);return null==t?i:an(i,t)},qi.curry=function e(t,n,r){var s=Xr(t,8,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},qi.curryRight=function e(t,n,r){var s=Xr(t,a,i,i,i,i,i,n=r?i:n);return s.placeholder=e.placeholder,s},qi.debounce=Oa,qi.defaults=ko,qi.defaultsDeep=xo,qi.defer=Ba,qi.delay=Ma,qi.difference=qs,qi.differenceBy=$s,qi.differenceWith=js,qi.drop=function(e,t,n){var r=null==e?0:e.length;return r?sr(e,(t=n||t===i?1:go(t))<0?0:t,r):[]},qi.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?sr(e,0,(t=r-(t=n||t===i?1:go(t)))<0?0:t):[]},qi.dropRightWhile=function(e,t){return e&&e.length?mr(e,ds(t,3),!0,!0):[]},qi.dropWhile=function(e,t){return e&&e.length?mr(e,ds(t,3),!0):[]},qi.fill=function(e,t,n,r){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&_s(e,t,n)&&(n=0,r=s),function(e,t,n,r){var s=e.length;for((n=go(n))<0&&(n=-n>s?0:s+n),(r=r===i||r>s?s:go(r))<0&&(r+=s),r=n>r?0:bo(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},qi.filter=function(e,t){return(Wa(e)?Ot:yn)(e,ds(t,3))},qi.flatMap=function(e,t){return vn(Ia(e,t),1)},qi.flatMapDeep=function(e,t){return vn(Ia(e,t),u)},qi.flatMapDepth=function(e,t,n){return n=n===i?1:go(n),vn(Ia(e,t),n)},qi.flatten=Hs,qi.flattenDeep=function(e){return(null==e?0:e.length)?vn(e,u):[]},qi.flattenDepth=function(e,t){return(null==e?0:e.length)?vn(e,t=t===i?1:go(t)):[]},qi.flip=function(e){return Xr(e,512)},qi.flow=nl,qi.flowRight=rl,qi.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,n={};++t<i;){var r=e[t];n[r[0]]=r[1]}return n},qi.functions=function(e){return null==e?[]:In(e,Bo(e))},qi.functionsIn=function(e){return null==e?[]:In(e,Mo(e))},qi.groupBy=_a,qi.initial=function(e){return(null==e?0:e.length)?sr(e,0,-1):[]},qi.intersection=Gs,qi.intersectionBy=Ks,qi.intersectionWith=Qs,qi.invert=Eo,qi.invertBy=Do,qi.invokeMap=Sa,qi.iteratee=al,qi.keyBy=Ca,qi.keys=Bo,qi.keysIn=Mo,qi.map=Ia,qi.mapKeys=function(e,t){var i={};return t=ds(t,3),Sn(e,(function(e,n,r){on(i,t(e,n,r),e)})),i},qi.mapValues=function(e,t){var i={};return t=ds(t,3),Sn(e,(function(e,n,r){on(i,n,t(e,n,r))})),i},qi.matches=function(e){return $n(dn(e,1))},qi.matchesProperty=function(e,t){return jn(e,dn(t,1))},qi.memoize=Ra,qi.merge=Ro,qi.mergeWith=Lo,qi.method=ol,qi.methodOf=ll,qi.mixin=cl,qi.negate=La,qi.nthArg=function(e){return e=go(e),Zn((function(t){return Wn(t,e)}))},qi.omit=Fo,qi.omitBy=function(e,t){return Uo(e,La(ds(t)))},qi.once=function(e){return Pa(2,e)},qi.orderBy=function(e,t,n,r){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(n=r?i:n)||(n=null==n?[]:[n]),Hn(e,t,n))},qi.over=ul,qi.overArgs=Fa,qi.overEvery=pl,qi.overSome=hl,qi.partial=Na,qi.partialRight=Ua,qi.partition=Aa,qi.pick=No,qi.pickBy=Uo,qi.property=fl,qi.propertyOf=function(e){return function(t){return null==e?i:An(e,t)}},qi.pull=Zs,qi.pullAll=Xs,qi.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Gn(e,t,ds(i,2)):e},qi.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gn(e,t,i,n):e},qi.pullAt=ea,qi.range=ml,qi.rangeRight=gl,qi.rearg=Va,qi.reject=function(e,t){return(Wa(e)?Ot:yn)(e,La(ds(t,3)))},qi.remove=function(e,t){var i=[];if(!e||!e.length)return i;var n=-1,r=[],s=e.length;for(t=ds(t,3);++n<s;){var a=e[n];t(a,n,e)&&(i.push(a),r.push(n))}return Kn(e,r),i},qi.rest=function(e,t){if("function"!=typeof e)throw new Oe(n);return Zn(e,t=t===i?t:go(t))},qi.reverse=ta,qi.sampleSize=function(e,t,n){return t=(n?_s(e,t,n
vendor: 3,815 bytes, line 1
1):t===i)?1:go(t),(Wa(e)?Xi:er)(e,t)},qi.set=function(e,t,i){return null==e?e:tr(e,t,i)},qi.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:tr(e,t,n,r)},qi.shuffle=function(e){return(Wa(e)?en:rr)(e)},qi.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&_s(e,t,n)?(t=0,n=r):(t=null==t?0:go(t),n=n===i?r:go(n)),sr(e,t,n)):[]},qi.sortBy=ka,qi.sortedUniq=function(e){return e&&e.length?cr(e):[]},qi.sortedUniqBy=function(e,t){return e&&e.length?cr(e,ds(t,2)):[]},qi.split=function(e,t,n){return n&&"number"!=typeof n&&_s(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=wo(e))&&("string"==typeof t||null!=t&&!ao(t))&&(!(t=ur(t))&&oi(e))?Cr(hi(e),0,n):e.split(t,n):[]},qi.spread=function(e,t){if("function"!=typeof e)throw new Oe(n);return t=null==t?0:vi(go(t),0),Zn((function(i){var n=i[t],r=Cr(i,0,t);return n&&Lt(r,n),xt(e,this,r)}))},qi.tail=function(e){var t=null==e?0:e.length;return t?sr(e,1,t):[]},qi.take=function(e,t,n){return e&&e.length?sr(e,0,(t=n||t===i?1:go(t))<0?0:t):[]},qi.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?sr(e,(t=r-(t=n||t===i?1:go(t)))<0?0:t,r):[]},qi.takeRightWhile=function(e,t){return e&&e.length?mr(e,ds(t,3),!1,!0):[]},qi.takeWhile=function(e,t){return e&&e.length?mr(e,ds(t,3)):[]},qi.tap=function(e,t){return t(e),e},qi.throttle=function(e,t,i){var r=!0,s=!0;if("function"!=typeof e)throw new Oe(n);return to(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),Oa(e,t,{leading:r,maxWait:t,trailing:s})},qi.thru=fa,qi.toArray=fo,qi.toPairs=Vo,qi.toPairsIn=qo,qi.toPath=function(e){return Wa(e)?Rt(e,Ns):co(e)?[e]:Dr(Fs(wo(e)))},qi.toPlainObject=vo,qi.transform=function(e,t,i){var n=Wa(e),r=n||Ka(e)||uo(e);if(t=ds(t,4),null==i){var s=e&&e.constructor;i=r?n?new s:[]:to(e)&&Za(s)?$i(Ke(e)):{}}return(r?Pt:Sn)(e,(function(e,n,r){return t(i,e,n,r)})),i},qi.unary=function(e){return Ta(e,1)},qi.union=ia,qi.unionBy=na,qi.unionWith=ra,qi.uniq=function(e){return e&&e.length?pr(e):[]},qi.uniqBy=function(e,t){return e&&e.length?pr(e,ds(t,2)):[]},qi.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?pr(e,i,t):[]},qi.unset=function(e,t){return null==e||hr(e,t)},qi.unzip=sa,qi.unzipWith=aa,qi.update=function(e,t,i){return null==e?e:fr(e,t,wr(i))},qi.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fr(e,t,wr(n),r)},qi.values=$o,qi.valuesIn=function(e){return null==e?[]:ei(e,Mo(e))},qi.without=oa,qi.words=Xo,qi.wrap=function(e,t){return Na(wr(t),e)},qi.xor=la,qi.xorBy=ca,qi.xorWith=da,qi.zip=ua,qi.zipObject=function(e,t){return yr(e||[],t||[],nn)},qi.zipObjectDeep=function(e,t){return yr(e||[],t||[],tr)},qi.zipWith=pa,qi.entries=Vo,qi.entriesIn=qo,qi.extend=So,qi.extendWith=Co,cl(qi,qi),qi.add=vl,qi.attempt=el,qi.camelCase=jo,qi.capitalize=zo,qi.ceil=wl,qi.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=yo(n))==n?n:0),t!==i&&(t=(t=yo(t))==t?t:0),cn(yo(e),t,n)},qi.clone=function(e){return dn(e,4)},qi.cloneDeep=function(e){return dn(e,5)},qi.cloneDeepWith=function(e,t){return dn(e,5,t="function"==typeof t?t:i)},qi.cloneWith=function(e,t){return dn(e,4,t="function"==typeof t?t:i)},qi.conformsTo=function(e,t){return null==t||un(e,t,Bo(t))},qi.deburr=Wo,qi.defaultTo=function(e,t){return null==e||e!=e?t:e},qi.divide=_l,qi.endsWith=function(e,t,n){e=wo(e),t=ur(t);var r=e.length,s=n=n===i?r:cn(go(n),0,r);return(n-=t.length)>=0&&e.slice(n,s)==t},qi.eq=qa,qi.escape=function(e){return(e=wo(e))&&J.test(e)?e.replace(K,si):e},qi.escapeRegExp=function(e){return(e=wo(e))&&se.test(e)?e.replace(re,"\\$&"):e},qi.every=function(e,t,n){var r=Wa(e)?Dt:gn;return n&&_s(e,t,n)&&(t=i),r(e,ds(t,3))},qi.find=ba,qi.findIndex=zs,qi.findKey=function(e,t){return qt(e,ds(t,3),Sn)},qi.findLast=ya,qi.findLastIndex=Ws,qi.findLastKey=function(e,t){return qt(e,ds(t,3),Cn)}
vendor: 13,547 bytes, line 1
1,qi.floor=Sl,qi.forEach=va,qi.forEachRight=wa,qi.forIn=function(e,t){return null==e?e:wn(e,ds(t,3),Mo)},qi.forInRight=function(e,t){return null==e?e:_n(e,ds(t,3),Mo)},qi.forOwn=function(e,t){return e&&Sn(e,ds(t,3))},qi.forOwnRight=function(e,t){return e&&Cn(e,ds(t,3))},qi.get=To,qi.gt=$a,qi.gte=ja,qi.has=function(e,t){return null!=e&&bs(e,t,Pn)},qi.hasIn=Po,qi.head=Ys,qi.identity=sl,qi.includes=function(e,t,i,n){e=Ya(e)?e:$o(e),i=i&&!n?go(i):0;var r=e.length;return i<0&&(i=vi(r+i,0)),lo(e)?i<=r&&e.indexOf(t,i)>-1:!!r&&jt(e,t,i)>-1},qi.indexOf=function(e,t,i){var n=null==e?0:e.length;if(!n)return-1;var r=null==i?0:go(i);return r<0&&(r=vi(n+r,0)),jt(e,t,r)},qi.inRange=function(e,t,n){return t=mo(t),n===i?(n=t,t=0):n=mo(n),function(e,t,i){return e>=wi(t,i)&&e<vi(t,i)}(e=yo(e),t,n)},qi.invoke=Oo,qi.isArguments=za,qi.isArray=Wa,qi.isArrayBuffer=Ha,qi.isArrayLike=Ya,qi.isArrayLikeObject=Ga,qi.isBoolean=function(e){return!0===e||!1===e||io(e)&&xn(e)==w},qi.isBuffer=Ka,qi.isDate=Qa,qi.isElement=function(e){return io(e)&&1===e.nodeType&&!so(e)},qi.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||uo(e)||za(e)))return!e.length;var t=gs(e);if(t==A||t==E)return!e.size;if(As(e))return!Nn(e).length;for(var i in e)if(Ne.call(e,i))return!1;return!0},qi.isEqual=function(e,t){return Mn(e,t)},qi.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Mn(e,t,i,n):!!r},qi.isError=Ja,qi.isFinite=function(e){return"number"==typeof e&&Gt(e)},qi.isFunction=Za,qi.isInteger=Xa,qi.isLength=eo,qi.isMap=no,qi.isMatch=function(e,t){return e===t||Rn(e,t,ps(t))},qi.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Rn(e,t,ps(t),n)},qi.isNaN=function(e){return ro(e)&&e!=+e},qi.isNative=function(e){if(Is(e))throw new ke("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ln(e)},qi.isNil=function(e){return null==e},qi.isNull=function(e){return null===e},qi.isNumber=ro,qi.isObject=to,qi.isObjectLike=io,qi.isPlainObject=so,qi.isRegExp=ao,qi.isSafeInteger=function(e){return Xa(e)&&e>=-p&&e<=p},qi.isSet=oo,qi.isString=lo,qi.isSymbol=co,qi.isTypedArray=uo,qi.isUndefined=function(e){return e===i},qi.isWeakMap=function(e){return io(e)&&gs(e)==B},qi.isWeakSet=function(e){return io(e)&&"[object WeakSet]"==xn(e)},qi.join=function(e,t){return null==e?"":bi.call(e,t)},qi.kebabCase=Ho,qi.last=Js,qi.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=r;return n!==i&&(s=(s=go(n))<0?vi(r+s,0):wi(s,r-1)),t==t?function(e,t,i){for(var n=i+1;n--;)if(e[n]===t)return n;return n}(e,t,s):$t(e,Wt,s,!0)},qi.lowerCase=Yo,qi.lowerFirst=Go,qi.lt=po,qi.lte=ho,qi.max=function(e){return e&&e.length?bn(e,sl,Tn):i},qi.maxBy=function(e,t){return e&&e.length?bn(e,ds(t,2),Tn):i},qi.mean=function(e){return Ht(e,sl)},qi.meanBy=function(e,t){return Ht(e,ds(t,2))},qi.min=function(e){return e&&e.length?bn(e,sl,Vn):i},qi.minBy=function(e,t){return e&&e.length?bn(e,ds(t,2),Vn):i},qi.stubArray=bl,qi.stubFalse=yl,qi.stubObject=function(){return{}},qi.stubString=function(){return""},qi.stubTrue=function(){return!0},qi.multiply=Cl,qi.nth=function(e,t){return e&&e.length?Wn(e,go(t)):i},qi.noConflict=function(){return mt._===this&&(mt._=je),this},qi.noop=dl,qi.now=xa,qi.pad=function(e,t,i){e=wo(e);var n=(t=go(t))?pi(e):0;if(!t||n>=t)return e;var r=(t-n)/2;return Hr(vt(r),i)+e+Hr(bt(r),i)},qi.padEnd=function(e,t,i){e=wo(e);var n=(t=go(t))?pi(e):0;return t&&n<t?e+Hr(t-n,i):e},qi.padStart=function(e,t,i){e=wo(e);var n=(t=go(t))?pi(e):0;return t&&n<t?Hr(t-n,i)+e:e},qi.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),Si(wo(e).replace(ae,""),t||0)},qi.random=function(e,t,n){if(n&&"boolean"!=typeof n&&_s(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=mo(e),t===i?(t=e,e=0):t=mo(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var s=Ci();return wi(e+s*(t-e+ut("1e-"+((s+"").length-1))),t)}return Qn(e,t)},qi.reduce=function(e,t,i){var n=Wa(e)?Ft:Kt,r=arguments.length<3;return n(e,ds(t,4),i,r,fn)},qi.reduceRight=function(e,t,i){var n=Wa(e)?Nt:Kt,r=arguments.length<3;return n(e,ds(t,4),i,r,mn)},qi.repeat=function(e,t,n){return t=(n?_s(e,t,n):t===i)?1:go(t),Jn(wo(e),t)},qi.replace=function(){var e=arguments,t=wo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qi.result=function(e,t,n){var r=-1,s=(t=_r(t,e)).length;for(s||(s=1,e=i);++r<s;){var a=null==e?i:e[Ns(t[r])];a===i&&(r=s,a=n),e=Za(a)?a.call(e):a}return e},qi.round=Il,qi.runInContext=e,qi.sample=function(e){return(Wa(e)?Zi:Xn)(e)},qi.size=function(e){if(null==e)return 0;if(Ya(e))return lo(e)?pi(e):e.length;var t=gs(e);return t==A||t==E?e.size:Nn(e).length},qi.snakeCase=Ko,qi.some=function(e,t,n){var r=Wa(e)?Ut:ar;return n&&_s(e,t,n)&&(t=i),r(e,ds(t,3))},qi.sortedIndex=function(e,t){return or(e,t)},qi.sortedIndexBy=function(e,t,i){return lr(e,t,ds(i,2))},qi.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var n=or(e,t);if(n<i&&qa(e[n],t))return n}return-1},qi.sortedLastIndex=function(e,t){return or(e,t,!0)},qi.sortedLastIndexBy=function(e,t,i){return lr(e,t,ds(i,2),!0)},qi.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var i=or(e,t,!0)-1;if(qa(e[i],t))return i}return-1},qi.startCase=Qo,qi.startsWith=function(e,t,i){return e=wo(e),i=null==i?0:cn(go(i),0,e.length),t=ur(t),e.slice(i,i+t.length)==t},qi.subtract=Al,qi.sum=function(e){return e&&e.length?Qt(e,sl):0},qi.sumBy=function(e,t){return e&&e.length?Qt(e,ds(t,2)):0},qi.template=function(e,t,n){var r=qi.templateSettings;n&&_s(e,t,n)&&(t=i),e=wo(e),t=Co({},t,r,es);var s,a,o=Co({},t.imports,r.imports,es),l=Bo(o),c=ei(o,l),d=0,u=t.interpolate||Se,p="__p += '",h=Ee((t.escape||Se).source+"|"+u.source+"|"+(u===ee?fe:Se).source+"|"+(t.evaluate||Se).source+"|$","g"),f="//# sourceURL="+(Ne.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(h,(function(t,i,n,r,o,l){return n||(n=r),p+=e.slice(d,l).replace(Ce,ai),i&&(s=!0,p+="' +\n__e("+i+") +\n'"),o&&(a=!0,p+="';\n"+o+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),d=l+t.length,t})),p+="';\n";var m=Ne.call(t,"variable")&&t.variable;if(m){if(pe.test(m))throw new ke("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(W,""):p).replace(H,"$1").replace(Y,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=el((function(){return xe(l,f+"return "+p).apply(i,c)}));if(g.source=p,Ja(g))throw g;return g},qi.times=function(e,t){if((e=go(e))<1||e>p)return[];var i=f,n=wi(e,f);t=ds(t),e-=f;for(var r=Jt(n,t);++i<e;)t(i);return r},qi.toFinite=mo,qi.toInteger=go,qi.toLength=bo,qi.toLower=function(e){return wo(e).toLowerCase()},qi.toNumber=yo,qi.toSafeInteger=function(e){return e?cn(go(e),-p,p):0===e?e:0},qi.toString=wo,qi.toUpper=function(e){return wo(e).toUpperCase()},qi.trim=function(e,t,n){if((e=wo(e))&&(n||t===i))return Zt(e);if(!e||!(t=ur(t)))return e;var r=hi(e),s=hi(t);return Cr(r,ii(r,s),ni(r,s)+1).join("")},qi.trimEnd=function(e,t,n){if((e=wo(e))&&(n||t===i))return e.slice(0,fi(e)+1);if(!e||!(t=ur(t)))return e;var r=hi(e);return Cr(r,0,ni(r,hi(t))+1).join("")},qi.trimStart=function(e,t,n){if((e=wo(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ur(t)))return e;var r=hi(e);return Cr(r,ii(r,hi(t))).join("")},qi.truncate=function(e,t){var n=30,r="...";if(to(t)){var s="separator"in t?t.separator:s;n="length"in t?go(t.length):n,r="omission"in t?ur(t.omission):r}var a=(e=wo(e)).length;if(oi(e)){var o=hi(e);a=o.length}if(n>=a)return e;var l=n-pi(r);if(l<1)return r;var c=o?Cr(o,0,l).join(""):e.slice(0,l);if(s===i)return c+r;if(o&&(l+=c.length-l),ao(s)){if(e.slice(l).search(s)){var d,u=c;for(s.global||(s=Ee(s.source,wo(me.exec(s))+"g")),s.lastIndex=0;d=s.exec(u);)var p=d.index;c=c.slice(0,p===i?l:p)}}else if(e.indexOf(ur(s),l)!=l){var h=c.lastIndexOf(s);h>-1&&(c=c.slice(0,h))}return c+r},qi.unescape=function(e){return(e=wo(e))&&Q.test(e)?e.replace(G,mi):e},qi.uniqueId=function(e){var t=++Ue;return wo(e)+t},qi.upperCase=Jo,qi.upperFirst=Zo,qi.each=va,qi.eachRight=wa,qi.first=Ys,cl(qi,function(){var e={};return Sn(qi,(function(t,i){Ne.call(qi.prototype,i)||(e[i]=t)})),e}(),{chain:!1}),qi.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qi[e].placeholder=qi})),Pt(["drop","take"],(function(e,t){Wi.prototype[e]=function(n){n=n===i?1:vi(go(n),0);var r=this.__filtered__&&!t?new Wi(this):this.clone();return r.__filtered__?r.__takeCount__=wi(n,r.__takeCount__):r.__views__.push({size:wi(n,f),type:e+(r.__dir__<0?"Right":"")}),r},Wi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var i=t+1,n=1==i||3==i;Wi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ds(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var i="take"+(t?"Right":"");Wi.prototype[e]=function(){return this[i](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");Wi.prototype[e]=function(){return this.__filtered__?new Wi(this):this[i](1)}})),Wi.prototype.compact=function(){return this.filter(sl)},Wi.prototype.find=function(e){return this.filter(e).head()},Wi.prototype.findLast=function(e){return this.reverse().find(e)},Wi.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Wi(this):this.map((function(i){return On(i,e,t)}))})),Wi.prototype.reject=function(e){return this.filter(La(ds(e)))},Wi.prototype.slice=function(e,t){e=go(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wi(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=go(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wi.prototype.toArray=function(){return this.take(f)},Sn(Wi.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),s=qi[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);s&&(qi.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,l=t instanceof Wi,c=o[0],d=l||Wa(t),u=function(e){var t=s.apply(qi,Lt([e],o));return r&&p?t[0]:t};d&&n&&"function"==typeof c&&1!=c.length&&(l=d=!1);var p=this.__chain__,h=!!this.__actions__.length,f=a&&!p,m=l&&!h;if(!a&&d){t=m?t:new Wi(this);var g=e.apply(t,o);return g.__actions__.push({func:fa,args:[u],thisArg:i}),new zi(g,p)}return f&&m?e.apply(this,o):(g=this.thru(u),f?r?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Be[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);qi.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var r=this.value();return t.apply(Wa(r)?r:[],e)}return this[i]((function(i){return t.apply(Wa(i)?i:[],e)}))}})),Sn(Wi.prototype,(function(e,t){var i=qi[t];if(i){var n=i.name+"";Ne.call(Oi,n)||(Oi[n]=[]),Oi[n].push({name:t,func:i})}})),Oi[$r(i,2).name]=[{name:"wrapper",func:i}],Wi.prototype.clone=function(){var e=new Wi(this.__wrapped__);return e.__actions__=Dr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Dr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Dr(this.__views__),e},Wi.prototype.reverse=function(){if(this.__filtered__){var e=new Wi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Wa(e),n=t<0,r=i?e.length:0,s=function(e,t,i){for(var n=-1,r=i.length;++n<r;){var s=i[n],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wi(t,e+a);break;case"takeRight":e=vi(e,t-a)}}return{start:e,end:t}}(0,r,this.__views__),a=s.start,o=s.end,l=o-a,c=n?o:a-1,d=this.__iteratees__,u=d.length,p=0,h=wi(l,this.__takeCount__);if(!i||!n&&r==l&&h==l)return gr(e,this.__actions__);var f=[];e:for(;l--&&p<h;){for(var m=-1,g=e[c+=t];++m<u;){var b=d[m],y=b.iteratee,v=b.type,w=y(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}f[p++]=g}return f},qi.prototype.at=ma,qi.prototype.chain=function(){return ha(this)},qi.prototype.commit=function(){return new zi(this.value(),this.__chain__)},qi.prototype.next=function(){this.__values__===i&&(this.__values__=fo(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},qi.prototype.plant=function(e){for(var t,n=this;n instanceof ji;){var r=Vs(n);r.__index__=0,r.__values__=i,t?s.__wrapped__=r:t=r;var s=r;n=n.__wrapped__}return s.__wrapped__=e,t},qi.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wi){var t=e;return this.__actions__.length&&(t=new Wi(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ta],thisArg:i}),new zi(t,this.__chain__)}return this.thru(ta)},qi.prototype.toJSON=qi.prototype.valueOf=qi.prototype.value=function(){return gr(this.__wrapped__,this.__actions__)},qi.prototype.first=qi.prototype.head,it&&(qi.prototype[it]=function(){return this}),qi}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(mt._=gi,define((function(){return gi}))):bt?((bt.exports=gi)._=gi,gt._=gi):mt._=gi}).call(e)})),_=b((()=>{})),S=((e,t)=>()=>(e&&(t=e(e=0)),t))((()=>{t=(e=>t=>{var i=e[t];if(i)return i();throw new Error("Module not found in bundle: "+t)})({
1"./locale/locale.js":()=>_()
1})})),C=b(((e,i)=>{S(),function(t,n){"object"==typeof e&&typeof i<"u"?i.exports=n():"function"==typeof define&&define.amd?define(n):t.moment=n()}(e,(function(){var e;function n(){return e.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(a(e,t))return;return 1}function l(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){for(var i=[],n=e.length,r=0;r<n;++r)i.push(t(e[r],r));return i}function p(e,t){for(var i in t)a(t,i)&&(e[i]=t[i]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,i,n){return Tt(e,t,i,n,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function m(e){if(null==e._isValid){var t=f(e),i=b.call(t.parsedDateParts,(function(e){return null!=e}));i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function g(e){var t=h(NaN);return null!=e?p(f(t),e):f(t).userInvalidated=!0,t}var b=Array.prototype.some||function(e){for(var t=Object(this),i=t.length>>>0,n=0;n<i;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1},y=n.momentProperties=[],v=!1;function w(e,t){var i,n,r,s=y.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=f(t)),l(t._locale)||(e._locale=t._locale),0<s)for(i=0;i<s;i++)l(r=t[n=y[i]])||(e[n]=r);return e}function _(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function S(e){return e instanceof _||null!=e&&null!=e._isAMomentObject}function C(e){!1===n.suppressDeprecationWarnings&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function I(e,t){var i=!0;return p((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),i){for(var r,s,o=[],l=arguments.length,c=0;c<l;c++){if(r="","object"==typeof arguments[c]){for(s in r+="\n["+c+"] ",arguments[0])a(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[c];o.push(r)}C(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),i=!1}return t.apply(this,arguments)}),t)}var A={};function k(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),A[e]||(C(t),A[e]=!0)}function x(e){return typeof Function<"u"&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function T(e,t){var i,n=p({},e);for(i in t)a(t,i)&&(s(e[i])&&s(t[i])?(n[i]={},p(n[i],e[i]),p(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);for(i in e)a(e,i)&&!a(t,i)&&s(e[i])&&(n[i]=p({},n[i]));return n}function P(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var E=Object.keys||function(e){var t,i=[];for(t in e)a(e,t)&&i.push(t);return i};function D(e,t,i){var n=""+Math.abs(e);return(0<=e?i?"+":"":"-")+Math.pow(10,Math.max(0,t-n.length)).toString().substr(1)+n}var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
1|x|X|zz?|ZZ?|.)/g,B=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,M={},R={};function L(e,t,i,n){var r="string"==typeof n?function(){return this[n]()}:n;e&&(R[e]=r),t&&(R[t[0]]=function(){return D(r.apply(this,arguments),t[1],t[2])}),i&&(R[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=N(t,e.localeData()),M[t]=M[t]||function(e){for(var t,i=e.match(O),n=0,r=i.length;n<r;n++)R[i[n]]?i[n]=R[i[n]]:i[n]=(t=i[n]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(t){for(var n="",s=0;s<r;s++)n+=x(i[s])?i[s].call(t,e):i[s];return n}}(t),M[t](e)):e.localeData().invalidDate()}function N(e,t){var i=5;function n(e){return t.longDateFormat(e)||e}for(B.lastIndex=0;0<=i&&B.test(e);)e=e.replace(B,n),B.lastIndex=0,--i;return e}var U={};function V(e,t){var i=e.toLowerCase();U[i]=U[i+"s"]=U[t]=e}function q(e){return"string"==typeof e?U[e]||U[e.toLowerCase()]:void 0}function $(e){var t,i,n={};for(i in e)a(e,i)&&(t=q(i))&&(n[t]=e[i]);return n}var j={};function z(e,t){j[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function H(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Y(e){var t=0;return 0!=(e=+e)&&isFinite(e)?H(e):t}function G(e,t){return function(i){return null!=i?(Q(this,e,i),n.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,i){e.isValid()&&!isNaN(i)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(i=Y(i),e._d["set"+(e._isUTC?"UTC":"")+t](i,e.month(),Ee(i,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](i))}var J=/\d/,Z=/\d\d/,X=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ie=/\d\d?/,ne=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,se=/\d{1,3}/,ae=/\d{1,4}/,oe=/[+-]?\d{1,6}/,le=/\d+/,ce=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,ue=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,i){ge[e]=x(t)?t:function(e,n){return e&&i?i:t}}function fe(e,t){return a(ge,e)?ge[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,r){return t||i||n||r}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ge={},be={};function ye(e,t){var i,n,r=t;for("string"==typeof e&&(e=[e]),c(t)&&(r=function(e,i){i[t]=Y(e)}),n=e.length,i=0;i<n;i++)be[e[i]]=r}function ve(e,t){ye(e,(function(e,i,n,r){n._w=n._w||{},t(e,n._w,n,r)}))}var we,_e=0,Se=1,Ce=2,Ie=3,Ae=4,ke=5,xe=6,Te=7,Pe=8;function Ee(e,t){if(isNaN(e)||isNaN(t))return NaN;var i=(t%(i=12)+i)%i;return e+=(t-i)/12,1==i?W(e)?29:28:31-i%7%2}we=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},L("M",["MM",2],"Mo",(function(){return this.month()+1})),L("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),L("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),V("month","M"),z("month",8),he("M",ie),he("MM",ie,Z),he("MMM",(function(e,t){return t.monthsShortRegex(e)})),he("MMMM",(function(e,t){return t.monthsRegex(e)})),ye(["M","MM"],(function(e,t){t[Se]=Y(e)-1})),ye(["MMM","MMMM"],(function(e,t,i,n){null!=(n=i._locale.monthsParse(e,n,i._strict))?t[Se]=n:f(i).invalidMonth=e}));var De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Oe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Be=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Me=pe,Re=pe;function Le(e,t){var i;if(e.isValid()){if("string"==typeof t)if(/^\d+$/.test(t))t=Y(t);else if(!c(t=e.localeData().monthsParse(t)))return;i=Math.min(e.date(),Ee(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i)}}function Fe(e){return null!=e?(Le(this,e),n.updateOffset(this,!0),this):K(this,"Month")}function Ne(){function e(e,t){return t.length-e.length}for(var t,i=[],n=[],r=[],s=0;s<12;s++)t=h([2e3,s]),i.push(this.monthsShort(t,"")),n.push(this.months(t,"")),r.push(this.months(t,"")),r.push(this.monthsShort(t,""));for(i.sort(e),n.sort(e),r.sort(e),s=0;s<12;s++)i[s]=me(i[s]),n[s]=me(n[s]);for(s=0;s<24;s++)r[s]=me(r[s]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ue(e){return W(e)?366:365}L("Y",0,0,(function(){var e=this.year();return e<=9999?D(e,4):"+"+e})),L(0,["YY",2],0,(function(){return this.year()%100})),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),V("year","y"),z("year",1),he("Y",ce),he("YY",ie,Z),he("YYYY",ae,ee),he("YYYYY",oe,te),he("YYYYYY",oe,te),ye(["YYYYY","YYYYYY"],_e),ye("YYYY",(function(e,t){t[_e]=2===e.length?n.parseTwoDigitYear(e):Y(e)})),ye("YY",(function(e,t){t[_e]=n.parseTwoDigitYear(e)}
1)),ye("Y",(function(e,t){t[_e]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return Y(e)+(68<Y(e)?1900:2e3)};var Ve=G("FullYear",!0);function qe(e,t,i,n,r,s,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,i,n,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,i,n,r,s,a),o}function $e(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function je(e,t,i){return(i=7+t-i)-(7+$e(e,0,i).getUTCDay()-t)%7-1}function ze(e,t,i,n,r){var s;i=(t=1+7*(t-1)+(7+i-n)%7+je(e,n,r))<=0?Ue(s=e-1)+t:t>Ue(e)?(s=e+1,t-Ue(e)):(s=e,t);return{year:s,dayOfYear:i}}function We(e,t,i){var n,r,s=je(e.year(),t,i);return(s=Math.floor((e.dayOfYear()-s-1)/7)+1)<1?n=s+He(r=e.year()-1,t,i):s>He(e.year(),t,i)?(n=s-He(e.year(),t,i),r=e.year()+1):(r=e.year(),n=s),{week:n,year:r}}function He(e,t,i){var n=je(e,t,i);t=je(e+1,t,i);return(Ue(e)-n+t)/7}function Ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),V("week","w"),V("isoWeek","W"),z("week",5),z("isoWeek",5),he("w",ie),he("ww",ie,Z),he("W",ie),he("WW",ie,Z),ve(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=Y(e)})),L("d",0,"do","day"),L("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),L("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),L("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),V("day","d"),V("weekday","e"),V("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),he("d",ie),he("e",ie),he("E",ie),he("dd",(function(e,t){return t.weekdaysMinRegex(e)})),he("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),he("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,i,n){null!=(n=i._locale.weekdaysParse(e,n,i._strict))?t.d=n:f(i).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,i,n){t[n]=Y(e)}));var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Je=pe,Ze=pe,Xe=pe;function et(){function e(e,t){return t.length-e.length}for(var t,i,n,r=[],s=[],a=[],o=[],l=0;l<7;l++)n=h([2e3,1]).day(l),t=me(this.weekdaysMin(n,"")),i=me(this.weekdaysShort(n,"")),n=me(this.weekdays(n,"")),r.push(t),s.push(i),a.push(n),o.push(t),o.push(i),o.push(n);r.sort(e),s.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function tt(){return this.hours()%12||12}function it(e,t){L(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function nt(e,t){return t._meridiemParse}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,tt),L("k",["kk",2],0,(function(){return this.hours()||24})),L("hmm",0,0,(function(){return""+tt.apply(this)+D(this.minutes(),2)})),L("hmmss",0,0,(function(){return""+tt.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)})),L("Hmm",0,0,(function(){return""+this.hours()+D(this.minutes(),2)})),L("Hmmss",0,0,(function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)})),it("a",!0),it("A",!1),V("hour","h"),z("hour",13),he("a",nt),he("A",nt),he("H",ie),he("h",ie),he("k",ie),he("HH",ie,Z),he("hh",ie,Z),he("kk",ie,Z),he("hmm",ne),he("hmmss",re),he("Hmm",ne),he("Hmmss",re),ye(["H","HH"],Ie),ye(["k","kk"],(function(e,t,i){e=Y(e),t[Ie]=24===e?0:e})),ye(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),ye(["h","hh"],(function(e,t,i){t[Ie]=Y(e),f(i).bigHour=!0})),ye("hmm",(function(e,t,i){var n=e.length-2;t[Ie]=Y(e.substr(0,n)),t[Ae]=Y(e.substr(n)),f(i).bigHour=!0})),ye("hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[Ie]=Y(e.substr(0,n)),t[Ae]=Y(e.substr(n,2)),t[ke]=Y(e.substr(r)),f(i).bigHour=!0})),ye("Hmm",(function(e,t,i){var n=e.length-2;t[Ie]=Y(e.substr(0,n)),t[Ae]=Y(e.substr(n))})),ye("Hmmss",(function(e,t,i){var n=e.length-4,r=e.length-2;t[Ie]=Y(e.substr(0,n)),t[Ae]=Y(e.substr(n,2)),t[ke]=Y(e.substr(r))})),pe=G("Hours",!0);var rt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:Oe,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Qe,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},at={},ot={};function lt(e){return e&&e.toLowerCase().replace("_","-")}function ct(e){var n;
1if(void 0===at[e]&&typeof i<"u"&&i&&i.exports&&null!=e.match("^[^/\\\\]*$"))try{n=rt._abbr,t("./locale/"+e),dt(n)}catch{at[e]=null}return at[e]}function dt(e,t){return e&&((t=l(t)?pt(e):ut(e,t))?rt=t:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function ut(e,t){if(null===t)return delete at[e],null;var i,n=st;if(t.abbr=e,null!=at[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=at[e]._config;else if(null!=t.parentLocale)if(null!=at[t.parentLocale])n=at[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return ot[t.parentLocale]||(ot[t.parentLocale]=[]),ot[t.parentLocale].push({name:e,config:t}),null;n=i._config}return at[e]=new P(T(n,t)),ot[e]&&ot[e].forEach((function(e){ut(e.name,e.config)})),dt(e),at[e]}function pt(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){for(var t,i,n,r,s=0;s<e.length;){for(t=(r=lt(e[s]).split("-")).length,i=(i=lt(e[s+1]))?i.split("-"):null;0<t;){if(n=ct(r.slice(0,t).join("-")))return n;if(i&&i.length>=t&&function(e,t){for(var i=Math.min(e.length,t.length),n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}(r,i)>=t-1)break;t--}s++}return rt}(e)}function ht(e){var t=e._a;return t&&-2===f(e).overflow&&(t=t[Se]<0||11<t[Se]?Se:t[Ce]<1||t[Ce]>Ee(t[_e],t[Se])?Ce:t[Ie]<0||24<t[Ie]||24===t[Ie]&&(0!==t[Ae]||0!==t[ke]||0!==t[xe])?Ie:t[Ae]<0||59<t[Ae]?Ae:t[ke]<0||59<t[ke]?ke:t[xe]<0||999<t[xe]?xe:-1,f(e)._overflowDayOfYear&&(t<_e||Ce<t)&&(t=Ce),f(e)._overflowWeeks&&-1===t&&(t=Te),f(e)._overflowWeekday&&-1===t&&(t=Pe),f(e).overflow=t),e}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,bt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],yt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((-?\d+)/i,wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,_t={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function St(e){var t,i,n,r,s,a,o=e._i,l=ft.exec(o)||mt.exec(o),c=(o=bt.length,yt.length);if(l){for(f(e).iso=!0,t=0,i=o;t<i;t++)if(bt[t][1].exec(l[1])){r=bt[t][0],n=!1!==bt[t][2];break}if(null==r)e._isValid=!1;else{if(l[3]){for(t=0,i=c;t<i;t++)if(yt[t][1].exec(l[3])){s=(l[2]||" ")+yt[t][0];break}if(null==s)return void(e._isValid=!1)}if(n||null==s){if(l[4]){if(!gt.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=r+(s||"")+(a||""),kt(e)}else e._isValid=!1}}else e._isValid=!1}function Ct(e){var t,i,n,r,s=wt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));s?(t=function(e,t,i,n,r,s){return e=[(a=e,(a=parseInt(a,10))<=49?2e3+a:a<=999?1900+a:a),Oe.indexOf(t),parseInt(i,10),parseInt(n,10),parseInt(r,10)],s&&e.push(parseInt(s,10)),e;var a}(s[4],s[3],s[2],s[5],s[6],s[7]),n=t,r=e,(i=s[1])&&Ke.indexOf(i)!==new Date(n[0],n[1],n[2]).getDay()?(f(r).weekdayMismatch=!0,r._isValid=!1):(e._a=t,e._tzm=(i=s[8],n=s[9],r=s[10],i?_t[i]:n?0:((i=parseInt(r,10))-(n=i%100))/100*60+n),e._d=$e.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0)):e._isValid=!1}function It(e,t,i){return e??t??i}function At(e){var t,i,r,s,a,o,l,c,d,u,p,h=[];if(!e._d){for(r=e,s=new Date(n.now()),i=r._useUTC?[s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()]:[s.getFullYear(),s.getMonth(),s.getDate()],e._w&&null==e._a[Ce]&&null==e._a[Se]&&(null!=(s=(r=e)._w).GG||null!=s.W||null!=s.E?(c=1,d=4,a=It(s.GG,r._a[_e],We(Pt(),1,4).year),o=It(s.W,1),((l=It(s.E,1))<1||7<l)&&(u=!0)):(c=r._locale._week.dow,d=r._locale._week.doy,p=We(Pt(),c,d),a=It(s.gg,r._a[_e],p.year),o=It(s.w,p.week),null!=s.d?((l=s.d)<0||6<l)&&(u=!0):null!=s.e?(l=s.e+c,(s.e<0||6<s.e)&&(u=!0)):l=c),o<1||o>He(a,c,d)?f(r)._overflowWeeks=!0:null!=u?f(r)._overflowWeekday=!0:(p=ze(a,o,l,c,d),r._a[_e]=p.year,r._dayOfYear=p.dayOfYear)),null!=e._dayOfYear&&(s=It(e._a[_e],i[_e]),(e._dayOfYear>Ue(s)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),u=$e(s,0,e._dayOfYear),e._a[Se]=u.getUTCMonth(),e._a[Ce]=u.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=h[t]=i[t];for(;t<7;t++)e._a[t]=h[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ie]&&0===e._a[Ae]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[Ie]=0),e._d=(e._useUTC?$e:qe).apply(null,h),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ie]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(f(e).weekdayMismatch=!0)}}function kt(e){if(e._f===n.ISO_8601)St(e);else if(e._f===n.RFC_2822)Ct(e);else{e._a=[],f(e).empty=!0;for(var t,i,r,s,o,l=""+e._i,c=l.length,d=0,u=N(e._f,e._locale).match(O)||[],p=u.length,h=0;h<p;h++)i=u[h],(t=(l.match(fe(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(t))).length&&f(e).unusedInput.push(r),l=l.slice(l.indexOf(t)+t.length),d+=t.length),R[i]?(t?f(e).empty=!1:f(e).unusedTokens.push(i),r=i,o=e,null!=(s=t)&&a(be,r)&&be[r](s,o._a,o,r)):e._strict&&!t&&f(e).unusedTokens.push(i);f(e).charsLeftOver=c-d,0<l.length&&f(e).unusedInput.push(l),e._a[Ie]<=12&&!0===f(e).bigHour&&0<e._a[Ie]&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[Ie]=(m=e._locale,g=e._a[Ie],null==(b=e._meridiem)?g:null!=m.meridiemHour?m.meridiemHour(g,b):null!=m.isPM?((m=m.isPM(b))&&g<12&&(g+=12),g=m||12!==g?g:0):g),null!==(c=f(e).era)&&(e._a[_e]=e._locale.erasConvertYear(c,e._a[_e])),At(e),ht(e)}var m,g,b}function xt(e){var t,i,a,o=e._i,h=e._f;return e._locale=e._locale||pt(e._l),null===o||void 0===h&&""===o?g({nullInput:!0}):("string"==typeof o&&(e._i=o=e._locale.preparse(o)),S(o)?new _(ht(o)):(d(o)?e._d=o:r(h)?function(e){var t,i,n,r,s,a,o=!1,l=e._f.length;if(0===l)return f(e).invalidFormat=!0,e._d=new Date(NaN);for(r=0;r<l;r++)s=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],kt(t),m(t)&&(a=!0),s=(s+=f(t).charsLeftOver)+10*f(t).unusedTokens.length,f(t).score=s,o?s<n&&(n=s,i=t):(null==n||s<n||a)&&(n=s,i=t,a&&(o=!0));p(e,i||t)}(e):h?kt(e):l(h=(o=e)._i)?o._d=new Date(n.now()):d(h)?o._d=new Date(h.valueOf()):"string"==typeof h?(i=o,null!==(t=vt.exec(i._i))?i._d=new Date(+t[1]):(St(i),!1===i._isValid&&
1(delete i._isValid,Ct(i),!1===i._isValid&&(delete i._isValid,i._strict?i._isValid=!1:n.createFromInputFallback(i))))):r(h)?(o._a=u(h.slice(0),(function(e){return parseInt(e,10)})),At(o)):s(h)?(t=o)._d||(a=void 0===(i=$(t._i)).day?i.date:i.day,t._a=u([i.year,i.month,a,i.hour,i.minute,i.second,i.millisecond],(function(e){return e&&parseInt(e,10)})),At(t)):c(h)?o._d=new Date(h):n.createFromInputFallback(o),m(e)||(e._d=null),e))}function Tt(e,t,i,n,a){var l={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(s(e)&&o(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=i,l._i=e,l._f=t,l._strict=n,(a=new _(ht(xt(a=l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Pt(e,t,i,n){return Tt(e,t,i,n,!1)}function Et(e,t){var i,n;if(!(t=1===t.length&&r(t[0])?t[0]:t).length)return Pt();for(i=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](i)||(i=t[n]);return i}n.createFromInputFallback=I("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){},ne=I("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Pt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),re=I("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Pt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:g()}));var Dt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ot(e){var t=(e=$(e)).year||0,i=e.quarter||0,n=e.month||0,r=e.week||e.isoWeek||0,s=e.day||0,o=e.hour||0,l=e.minute||0,c=e.second||0,d=e.millisecond||0;this._isValid=function(e){var t,i,n=!1,r=Dt.length;for(t in e)if(a(e,t)&&(-1===we.call(Dt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(i=0;i<r;++i)if(e[Dt[i]]){if(n)return!1;parseFloat(e[Dt[i]])!==Y(e[Dt[i]])&&(n=!0)}return!0}(e),this._milliseconds=+d+1e3*c+6e4*l+1e3*o*60*60,this._days=+s+7*r,this._months=+n+3*i+12*t,this._data={},this._locale=pt(),this._bubble()}function Bt(e){return e instanceof Ot}function Mt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Rt(e,t){L(e,0,0,(function(){var e=this.utcOffset(),i="+";return e<0&&(e=-e,i="-"),i+D(~~(e/60),2)+t+D(~~e%60,2)}))}Rt("Z",":"),Rt("ZZ",""),he("Z",ue),he("ZZ",ue),ye(["Z","ZZ"],(function(e,t,i){i._useUTC=!0,i._tzm=Ft(ue,e)}));var Lt=/([\+\-]|\d\d)/gi;function Ft(e,t){return null===(t=(t||"").match(e))?null:0===(t=60*(e=((t[t.length-1]||[])+"").match(Lt)||["-",0,0])[1]+Y(e[2]))?0:"+"===e[0]?t:-t}function Nt(e,t){var i;return t._isUTC?(t=t.clone(),i=(S(e)||d(e)?e:Pt(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+i),n.updateOffset(t,!1),t):Pt(e).local()}function Ut(e){return-Math.round(e._d.getTimezoneOffset())}function Vt(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$t=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jt(e,t){var i,n,r,s,o=e,l=null;return Bt(e)?o={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(o={},t?o[t]=+e:o.milliseconds=+e):(l=qt.exec(e))?(i="-"===l[1]?-1:1,o={y:0,d:Y(l[Ce])*i,h:Y(l[Ie])*i,m:Y(l[Ae])*i,s:Y(l[ke])*i,ms:Y(Mt(1e3*l[xe]))*i}):(l=$t.exec(e))?(i="-"===l[1]?-1:1,o={y:zt(l[2],i),M:zt(l[3],i),w:zt(l[4],i),d:zt(l[5],i),h:zt(l[6],i),m:zt(l[7],i),s:zt(l[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(n=Pt(o.from),r=Pt(o.to),t=n.isValid()&&r.isValid()?(r=Nt(r,n),n.isBefore(r)?s=Wt(n,r):((s=Wt(r,n)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(o={}).ms=t.milliseconds,o.M=t.months),l=new Ot(o),Bt(e)&&a(e,"_locale")&&(l._locale=e._locale),Bt(e)&&a(e,"_isValid")&&(l._isValid=e._isValid),l}function zt(e,t){return e=e&&parseFloat(e.replace(",",".")),(isNaN(e)?0:e)*t}function Wt(e,t){var i={};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Ht(e,t){return function(i,n){var r;return null===n||isNaN(+n)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=n,n=r),Yt(this,jt(i,n),e),this}}function Yt(e,t,i,r){var s=t._milliseconds,a=Mt(t._days);t=Mt(t._months);e.isValid()&&(r=null==r||r,t&&Le(e,K(e,"Month")+t*i),a&&Q(e,"Date",K(e,"Date")+a*i),s&&e._d.setTime(e._d.valueOf()+s*i),r&&n.updateOffset(e,a||t))}function Gt(e){return"string"==typeof e||e instanceof String}function Kt(e,t){if(e.date()<t.date())return-Kt(t,e);var i=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(i,"months");return-(i+(t=t-n<0?(t-n)/(n-e.clone().add(i-1,"months")):(t-n)/(e.clone().add(1+i,"months")-n)))||0}function Qt(e){return void 0===e?this._locale._abbr:(null!=(e=pt(e))&&(this._locale=e),this)}function Jt(){return this._locale}
1jt.fn=Ot.prototype,jt.invalid=function(){return jt(NaN)},De=Ht(1,"add"),Ge=Ht(-1,"subtract"),n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Qe=I("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));var Zt=126227808e5;function Xt(e,t){return(e%t+t)%t}function ei(e,t,i){return e<100&&0<=e?new Date(e+400,t,i)-Zt:new Date(e,t,i).valueOf()}function ti(e,t,i){return e<100&&0<=e?Date.UTC(e+400,t,i)-Zt:Date.UTC(e,t,i)}function ii(e,t){return t.erasAbbrRegex(e)}function ni(){for(var e=[],t=[],i=[],n=[],r=this.eras(),s=0,a=r.length;s<a;++s)t.push(me(r[s].name)),e.push(me(r[s].abbr)),i.push(me(r[s].narrow)),n.push(me(r[s].name)),n.push(me(r[s].abbr)),n.push(me(r[s].narrow));this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function ri(e,t){L(0,[e,e.length],0,t)}function si(e,t,i,n,r){var s;return null==e?We(this,n,r).year:(s=He(e,n,r),function(e,t,i,n,r){return t=$e((e=ze(e,t,i,n,r)).year,0,e.dayOfYear),this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=s<t?s:t,i,n,r))}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),he("N",ii),he("NN",ii),he("NNN",ii),he("NNNN",(function(e,t){return t.erasNameRegex(e)})),he("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,i,n){(n=i._locale.erasParse(e,n,i._strict))?f(i).era=n:f(i).invalidEra=e})),he("y",le),he("yy",le),he("yyy",le),he("yyyy",le),he("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],_e),ye(["yo"],(function(e,t,i,n){var r;i._locale._eraYearOrdinalRegex&&(r=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[_e]=i._locale.eraYearOrdinalParse(e,r):t[_e]=parseInt(e,10)})),L(0,["gg",2],0,(function(){return this.weekYear()%100})),L(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ri("gggg","weekYear"),ri("ggggg","weekYear"),ri("GGGG","isoWeekYear"),ri("GGGGG","isoWeekYear"),
1V("weekYear","gg"),V("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),he("G",ce),he("g",ce),he("GG",ie,Z),he("gg",ie,Z),he("GGGG",ae,ee),he("gggg",ae,ee),he("GGGGG",oe,te),he("ggggg",oe,te),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=Y(e)})),ve(["gg","GG"],(function(e,t,i,r){t[r]=n.parseTwoDigitYear(e)})),L("Q",0,"Qo","quarter"),V("quarter","Q"),z("quarter",7),he("Q",J),ye("Q",(function(e,t){t[Se]=3*(Y(e)-1)})),L("D",["DD",2],"Do","date"),V("date","D"),z("date",9),he("D",ie),he("DD",ie,Z),he("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],Ce),ye("Do",(function(e,t){t[Ce]=Y(e.match(ie)[0])})),ae=G("Date",!0),L("DDD",["DDDD",3],"DDDo","dayOfYear"),V("dayOfYear","DDD"),z("dayOfYear",4),he("DDD",se),he("DDDD",X),ye(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=Y(e)})),L("m",["mm",2],0,"minute"),V("minute","m"),z("minute",14),he("m",ie),he("mm",ie,Z),ye(["m","mm"],Ae);var ai;ee=G("Minutes",!1),L("s",["ss",2],0,"second"),V("second","s"),z("second",15),he("s",ie),he("ss",ie,Z),ye(["s","ss"],ke),oe=G("Seconds",!1);for(L("S",0,0,(function(){return~~(this.millisecond()/100)})),L(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),L(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),L(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),L(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),L(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),L(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),V("millisecond","ms"),z("millisecond",16),he("S",se,J),he("SS",se,Z),he("SSS",se,X),ai="SSSS";ai.length<=9;ai+="S")he(ai,le);function oi(e,t){t[xe]=Y(1e3*("0."+e))}for(ai="S";ai.length<=9;ai+="S")ye(ai,oi);function li(e){return e}function ci(e,t,i,n){var r=pt();n=h().set(n,t);return r[i](n,e)}function di(e,t,i){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return ci(e,t,i,"month");for(var n=[],r=0;r<12;r++)n[r]=ci(e,r,i,"month");return n}function ui(e,t,i,n){"boolean"==typeof e?c(t)&&(i=t,t=void 0):(t=e,e=!1,c(i=t)&&(i=t,t=void 0)),t=t||"";var r,s=pt(),a=e?s._week.dow:0,o=[];if(null!=i)return ci(t,(i+a)%7,n,"day");for(r=0;r<7;r++)o[r]=ci(t,(r+a)%7,n,"day");return o}te=G("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName"),(J=_.prototype).add=De,J.calendar=function(e,t){1===arguments.length&&(arguments[0]?function(e){return S(e)||d(e)||Gt(e)||c(e)||(i=r(t=e),n=!1,i&&(n=0===t.filter((function(e){return!c(e)&&Gt(t)})).length),i&&n)||function(e){var t,i=s(e)&&!o(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=r.length;for(t=0;t<l;t+=1)n=n||a(e,r[t]);return i&&n}(e)||null==e;var t,i,n}(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=s(e)&&!o(e),i=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r=0;r<n.length;r+=1)i=i||a(e,n[r]);return t&&i}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var i=Nt(e=e||Pt(),this).startOf("day");i=n.calendarFormat(this,i)||"sameElse",t=t&&(x(t[i])?t[i].call(this,e):t[i]);return this.format(t||this.localeData().calendar(i,this,Pt(e)))},J.clone=function(){return new _(this)},J.diff=function(e,t,i){var n,r,s;if(!this.isValid())return NaN;if(!(n=Nt(e,this)).isValid())return NaN;switch(r=6e4*(n.utcOffset()-this.utcOffset()),t=q(t)){case"year":s=Kt(this,n)/12;break;case"month":s=Kt(this,n);break;case"quarter":s=Kt(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-r)/864e5;break;case"week":s=(this-n-r)/6048e5;break;default:s=this-n}return i?s:H(s)},J.endOf=function(e){var t,i;if(void 0===(e=q(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ti:ei,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;
1case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},J.format=function(e){return e=F(this,e=e||(this.isUtc()?n.defaultFormatUtc:n.defaultFormat)),this.localeData().postformat(e)},J.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Pt(e).isValid())?jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.fromNow=function(e){return this.from(Pt(),e)},J.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Pt(e).isValid())?jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},J.toNow=function(e){return this.to(Pt(),e)},J.get=function(e){return x(this[e=q(e)])?this[e]():this},J.invalidAt=function(){return f(this).overflow},J.isAfter=function(e,t){return e=S(e)?e:Pt(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=q(t)||"millisecond")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},J.isBefore=function(e,t){return e=S(e)?e:Pt(e),!(!this.isValid()||!e.isValid())&&("millisecond"===(t=q(t)||"millisecond")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},J.isBetween=function(e,t,i,n){return e=S(e)?e:Pt(e),t=S(t)?t:Pt(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&("("===(n=n||"()")[0]?this.isAfter(e,i):!this.isBefore(e,i))&&(")"===n[1]?this.isBefore(t,i):!this.isAfter(t,i))},J.isSame=function(e,t){e=S(e)?e:Pt(e);return!(!this.isValid()||!e.isValid())&&("millisecond"===(t=q(t)||"millisecond")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},J.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},J.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},J.isValid=function(){return m(this)},J.lang=Qe,J.locale=Qt,J.localeData=Jt,J.max=re,J.min=ne,J.parsingFlags=function(){return p({},f(this))},J.set=function(e,t){if("object"==typeof e)for(var i=function(e){var t,i=[];for(t in e)a(e,t)&&i.push({unit:t,priority:j[t]});return i.sort((function(e,t){return e.priority-t.priority})),i}(e=$(e)),n=i.length,r=0;r<n;r++)this[i[r].unit](e[i[r].unit]);else if(x(this[e=q(e)]))return this[e](t);return this},J.startOf=function(e){var t,i;if(void 0===(e=q(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ti:ei,e){case"year":t=i(this.year(),0,1);break;case"quarter":t=i(this.year(),this.month()-this.month()%3,1);break;case"month":t=i(this.year(),this.month(),1);break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=i(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Xt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Xt(t,1e3)}return this._d.setTime(t),n.updateOffset(this,!0),this},J.subtract=Ge,J.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},J.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},J.toDate=function(){return new Date(this.valueOf())},J.toISOString=function(e){if(!this.isValid())return null;var t=(e=!0!==e)?this.clone().utc():this;return t.year()<0||9999<t.year()?F(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(t,"Z")):F(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}
1,J.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t="moment",i="";return this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+t+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+i+'[")]')},typeof Symbol<"u"&&null!=Symbol.for&&(J[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},J.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},J.eraName=function(){for(var e,t=this.localeData().eras(),i=0,n=t.length;i<n;++i)if(e=this.clone().startOf("day").valueOf(),t[i].since<=e&&e<=t[i].until||t[i].until<=e&&e<=t[i].since)return t[i].name;return""},J.eraNarrow=function(){for(var e,t=this.localeData().eras(),i=0,n=t.length;i<n;++i)if(e=this.clone().startOf("day").valueOf(),t[i].since<=e&&e<=t[i].until||t[i].until<=e&&e<=t[i].since)return t[i].narrow;return""},J.eraAbbr=function(){for(var e,t=this.localeData().eras(),i=0,n=t.length;i<n;++i)if(e=this.clone().startOf("day").valueOf(),t[i].since<=e&&e<=t[i].until||t[i].until<=e&&e<=t[i].since)return t[i].abbr;return""},J.eraYear=function(){for(var e,t,i=this.localeData().eras(),r=0,s=i.length;r<s;++r)if(e=i[r].since<=i[r].until?1:-1,t=this.clone().startOf("day").valueOf(),i[r].since<=t&&t<=i[r].until||i[r].until<=t&&t<=i[r].since)return(this.year()-n(i[r].since).year())*e+i[r].offset;return this.year()},J.year=Ve,J.isLeapYear=function(){return W(this.year())},J.weekYear=function(e){return si.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},J.isoWeekYear=function(e){return si.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},J.quarter=J.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},J.month=Fe,J.daysInMonth=function(){return Ee(this.year(),this.month())},J.week=J.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},J.isoWeek=J.isoWeeks=function(e){var t=We(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},J.weeksInYear=function(){var e=this.localeData()._week;return He(this.year(),e.dow,e.doy)},J.weeksInWeekYear=function(){var e=this.localeData()._week;return He(this.weekYear(),e.dow,e.doy)},J.isoWeeksInYear=function(){return He(this.year(),1,4)},J.isoWeeksInISOWeekYear=function(){return He(this.isoWeekYear(),1,4)},J.date=ae,J.day=J.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,i=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=i.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-n,"d")):n},J.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},J.isoWeekday=function(e){return this.isValid()?null!=e?(t=e,i=this.localeData(),i="string"==typeof t?i.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?i:i-7)):this.day()||7:null!=e?this:NaN;var t,i},J.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},J.hour=J.hours=pe,J.minute=J.minutes=ee,J.second=J.seconds=oe,J.millisecond=J.milliseconds=te,J.utcOffset=function(e,t,i){var r,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?s:Ut(this);if("string"==typeof e){if(null===(e=Ft(ue,e)))return this}else Math.abs(e)<16&&!i&&(e*=60);return!this._isUTC&&t&&(r=Ut(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),s!==e&&(!t||this._changeInProgress?Yt(this,jt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},J.utc=function(e){return this.utcOffset(0,e)},J.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},J.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):"string"==typeof this._i&&(null!=(e=Ft(de,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},J.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Pt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},J.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},J.isLocal=function(){return!!this.isValid()&&!this._isUTC},J.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},J.isUtc=Vt,J.isUTC=Vt,J.zoneAbbr=function(){return this._isUTC?"UTC":""},J.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},J.dates=I("dates accessor is deprecated. Use date instead.",ae),J.months=I("months accessor is deprecated. Use month instead",Fe),J.years=I("years accessor is deprecated. Use year instead",Ve),J.zone=I("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()})),J.isDSTShifted=I("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=xt(t))._a?(e=(t._isUTC?h:Pt)(t._a),this._isDSTShifted=this.isValid()&&0<function(e,t){for(var i=Math.min(e.length,t.length),n=Math.abs(e.length-t.length),r=0,s=0;s<i;s++)Y(e[s])!==Y(t[s])&&r++;return r+n}(t._a,e.toArray())):this._isDSTShifted=!1,this._isDSTShifted})),(Z=P.prototype).calendar=function(e,t,i){return x(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,i):e},Z.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Z.invalidDate=function(){return this._invalidDate},Z.ordinal=function(e){return this._ordinal.replace("%d",e)},Z.preparse=li,Z.postformat=li,Z.relativeTime=function(e,t,i,n){var r=this._relativeTime[i];return x(r)?r(e,t,i,n):r.replace(/%d/i,e)},Z.pastFuture=function(e,t){return x(e=this._relativeTime[0<e?"future":"past"])?e(t):e.replace(/%s/i,t)},Z.set=function(e){var t,i;for(i in e)a(e,i)&&(x(t=e[i])?this[i]=t:this["_"+i]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Z.eras=function(e,t){for(var i,r=this._eras||pt("en")._eras,s=0,a=r.length;s<a;
vendor: 5,061 bytes, line 1
1++s){if("string"==typeof r[s].since)i=n(r[s].since).startOf("day"),r[s].since=i.valueOf();switch(typeof r[s].until){case"undefined":r[s].until=1/0;break;case"string":i=n(r[s].until).startOf("day").valueOf(),r[s].until=i.valueOf()}}return r},Z.erasParse=function(e,t,i){var n,r,s,a,o,l=this.eras();for(e=e.toUpperCase(),n=0,r=l.length;n<r;++n)if(s=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),o=l[n].narrow.toUpperCase(),i)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(s===e)return l[n];break;case"NNNNN":if(o===e)return l[n]}else if(0<=[s,a,o].indexOf(e))return l[n]},Z.erasConvertYear=function(e,t){var i=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*i},Z.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||ni.call(this),e?this._erasAbbrRegex:this._erasRegex},Z.erasNameRegex=function(e){return a(this,"_erasNameRegex")||ni.call(this),e?this._erasNameRegex:this._erasRegex},Z.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||ni.call(this),e?this._erasNarrowRegex:this._erasRegex},Z.months=function(e,t){return e?(r(this._months)?this._months:this._months[(this._months.isFormat||Be).test(t)?"format":"standalone"])[e.month()]:r(this._months)?this._months:this._months.standalone},Z.monthsShort=function(e,t){return e?(r(this._monthsShort)?this._monthsShort:this._monthsShort[Be.test(t)?"format":"standalone"])[e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Z.monthsParse=function(e,t,i){var n,r;if(this._monthsParseExact)return function(e,t,i){var n,r,s;e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?-1!==(r=we.call(this._shortMonthsParse,e))?r:null:-1!==(r=we.call(this._longMonthsParse,e))?r:null:"MMM"===t?-1!==(r=we.call(this._shortMonthsParse,e))||-1!==(r=we.call(this._longMonthsParse,e))?r:null:-1!==(r=we.call(this._longMonthsParse,e))||-1!==(r=we.call(this._shortMonthsParse,e))?r:null}.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++)if(r=h([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e)||i&&"MMM"===t&&this._shortMonthsParse[n].test(e)||!i&&this._monthsParse[n].test(e))return n},Z.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Re),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Z.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Me),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Z.week=function(e){return We(e,this._week.dow,this._week.doy).week},Z.firstDayOfYear=function(){return this._week.doy},Z.firstDayOfWeek=function(){return this._week.dow},Z.weekdays=function(e,t){return t=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"],!0===e?Ye(t,this._week.dow):e?t[e.day()]:t},Z.weekdaysMin=function(e){return!0===e?Ye(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Z.weekdaysShort=function(e){return!0===e?Ye(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Z.weekdaysParse=function(e,t,i){var n,r;if(this._weekdaysParseExact)return function(e,t,i){var n,r,s;e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(r=we.call(this._weekdaysParse,e))?r:null:"ddd"===t?-1!==(r=we.call(this._shortWeekdaysParse,e))?r:null:-1!==(r=we.call(this._minWeekdaysParse,e))?r:null:"dddd"===t?-1!==(r=we.call(this._weekdaysParse,e))||-1!==(r=we.call(this._shortWeekdaysParse,e))||-1!==(r=we.call(this._minWeekdaysParse,e))?r:null:"ddd"===t?-1!==(r=we.call(this._shortWeekdaysParse,e))||-1!==(r=we.call(this._weekdaysParse,e))||-1!==(r=we.call(this._minWeekdaysParse,e))?r:null:-1!==(r=we.call(this._minWeekdaysParse,e))||-1!==(r=we.call(this._weekdaysParse,e))||-1!==(r=we.call(this._shortWeekdaysParse,e))?r:null}
1.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++)if(r=h([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e)||i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e)||i&&"dd"===t&&this._minWeekdaysParse[n].test(e)||!i&&this._weekdaysParse[n].test(e))return n},Z.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Z.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Z.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||et.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Z.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Z.meridiem=function(e,t,i){return 11<e?i?"pm":"PM":i?"am":"AM"},dt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Y(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th")}}),n.lang=I("moment.lang is deprecated. Use moment.locale instead.",dt),n.langData=I("moment.langData is deprecated. Use moment.localeData instead.",pt);var pi=Math.abs;function hi(e,t,i,n){return t=jt(t,i),e._milliseconds+=n*t._milliseconds,e._days+=n*t._days,e._months+=n*t._months,e._bubble()}function fi(e){return e<0?Math.floor(e):Math.ceil(e)}function mi(e){return 4800*e/146097}function gi(e){return 146097*e/4800}function bi(e){return function(){return this.as(e)}}function yi(e){return function(){return this.isValid()?this._data[e]:NaN}}se=bi("ms"),X=bi("s"),De=bi("m"),re=bi("h"),ne=bi("d"),Ge=bi("w"),pe=bi("M"),ee=bi("Q"),oe=bi("y");te=yi("milliseconds"),ae=yi("seconds"),Ve=yi("minutes"),Z=yi("hours");var vi=yi("days"),wi=yi("months"),_i=yi("years"),Si=Math.round,Ci={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};var Ii=Math.abs;function Ai(e){return(0<e)-(e<0)||+e}function ki(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,n,r,s,a,o=Ii(this._milliseconds)/1e3,l=Ii(this._days),c=Ii(this._months),d=this.asSeconds();return d?(e=H(o/60),t=H(e/60),o%=60,e%=60,i=H(c/12),c%=12,n=o?o.toFixed(3).replace(/\.?0+$/,""):"",r=Ai(this._months)!==Ai(d)?"-":"",s=Ai(this._days)!==Ai(d)?"-":"",a=Ai(this._milliseconds)!==Ai(d)?"-":"",(d<0?"-":"")+"P"+(i?r+i+"Y":"")+(c?r+c+"M":"")+(l?s+l+"D":"")+(t||e||o?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(o?a+n+"S":"")):"P0D"}var xi=Ot.prototype;return xi.isValid=function(){return this._isValid},xi.abs=function(){var e=this._data;return this._milliseconds=pi(this._milliseconds),this._days=pi(this._days),this._months=pi(this._months),e.milliseconds=pi(e.milliseconds),e.seconds=pi(e.seconds),e.minutes=pi(e.minutes),e.hours=pi(e.hours),e.months=pi(e.months),e.years=pi(e.years),this},xi.add=function(e,t){return hi(this,e,t,1)},xi.subtract=function(e,t){return hi(this,e,t,-1)},xi.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=q(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+mi(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(gi(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},xi.asMilliseconds=se,xi.asSeconds=X,xi.asMinutes=De,xi.asHours=re,xi.asDays=ne,xi.asWeeks=Ge,xi.asMonths=pe,xi.asQuarters=ee,xi.asYears=oe,xi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Y(this._months/12):NaN},xi._bubble=function(){var e=this._milliseconds,t=this._days,i=this._months,n=this._data;return 0<=e&&0<=t&&0<=i||e<=0&&t<=0&&i<=0||(e+=864e5*fi(gi(i)+t),i=t=0),n.milliseconds=e%1e3,e=H(e/1e3),n.seconds=e%60,e=H(e/60),n.minutes=e%60,e=H(e/60),n.hours=e%24,t+=H(e/24),i+=e=H(mi(t)),t-=fi(gi(e)),e=H(i/12),i%=12,n.days=t,n.months=i,n.years=e,this},xi.clone=function(){return jt(this)},xi.get=function(e){return e=q(e),this.isValid()?this[e+"s"]():NaN},xi.milliseconds=te,xi.seconds=ae,xi.minutes=Ve,xi.hours=Z,xi.days=vi,xi.weeks=function(){return H(this.days()/7)},xi.months=wi,xi.years=_i,xi.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var i=!1,n=Ci;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(n=Object.assign({},Ci,t),null!=t.s&&null==t.ss&&(n.ss=t.s-1)),t=function(e,t,i,n){var r=jt(e).abs(),s=Si(r.as("s")),a=Si(r.as("m")),o=Si(r.as("h")),l=Si(r.as("d")),c=Si(r.as("M")),d=Si(r.as("w"));return r=Si(r.as("y")),s=(s<=i.ss?["s",s]:s<i.s&&["ss",s])||a<=1&&["m"]||a<i.m&&["mm",a]||o<=1&&["h"]||o<i.h&&["hh",o]||l<=1&&["d"]||l<i.d&&["dd",l],(s=(s=null!=i.w?s||d<=1&&["w"]||d<i.w&&["ww",d]:s)||c<=1&&["M"]||c<i.M&&["MM",c]||r<=1&&["y"]||["yy",r])[2]=t,s[3]=0<+e,s[4]=n,function(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}.apply(null,s)}(this,!i,n,e=this.localeData()),i&&(t=e.pastFuture(+this,t)),e.postformat(t)},xi.toISOString=ki,xi.toString=ki,xi.toJSON=ki,xi.locale=Qt,xi.localeData=Jt,xi.toIsoString=I("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ki),xi.lang=Qe,L("X",0,0,"unix"),L("x",0,0,"valueOf"),he("x",ce),he("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,i){i._d=new Date(Y(e))})),n.version="2.29.4",e=Pt,n.fn=J,n.min=function(){return Et("isBefore",[].slice.call(arguments,0))},n.max=function(){return Et("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=h,n.unix=function(e){return Pt(1e3*e)},n.months=function(e,t){return di(e,t,"months")},n.isDate=d,n.locale=dt,n.invalid=g,n.duration=jt,n.isMoment=S,n.weekdays=function(e,t,i){return ui(e,t,i,"weekdays")},n.parseZone=function(){return Pt.apply(null,arguments).parseZone()},n.localeData=pt,n.isDuration=Bt,n.monthsShort=function(e,t){return di(e,t,"monthsShort")},n.weekdaysMin=function(e,t,i){return ui(e,t,i,"weekdaysMin")},n.defineLocale=ut,n.updateLocale=function(e,t){var i,n;return null!=t?(n=st,null!=at[e]&&null!=at[e].parentLocale?at[e].set(T(at[e]._config,t)):(t=T(n=null!=(i=ct(e))?i._config:n,t),null==i&&(t.abbr=e),(n=new P(t)).parentLocale=at[e],at[e]=n),dt(e)):null!=at[e]&&(null!=at[e].parentLocale?(at[e]=at[e].parentLocale,e===dt()&&dt(e)):null!=at[e]&&delete at[e]),at[e]},n.locales=function(){return E(at)},n.weekdaysShort=function(e,t,i){return ui(e,t,i,"weekdaysShort")},n.normalizeUnits=q,n.relativeTimeRounding=function(e){return void 0===e?Si:"function"==typeof e&&(Si=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==Ci[e]&&(void 0===t?Ci[e]:(Ci[e]=t,"
1s"===e&&(Ci.ss=t-1),!0))},n.calendarFormat=function(e,t){return(e=e.diff(t,"days",!0))<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse"},n.prototype=J,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}))})),I=b((()=>{})),A=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n():"function"==typeof define&&define.amd?define([],n):i.CryptoJS=n()}(e,(function(){var e=e||function(e){var t;if(typeof window<"u"&&window.crypto&&(t=window.crypto),typeof self<"u"&&self.crypto&&(t=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(t=globalThis.crypto),!t&&typeof window<"u"&&window.msCrypto&&(t=window.msCrypto),!t&&typeof global<"u"&&global.crypto&&(t=global.crypto),!t&&"function"==typeof m)try{t=I()}catch{}var i=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch{}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),r={},s=r.lib={},a=s.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),(!t.hasOwnProperty("init")||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,i=e.words,n=this.sigBytes,r=e.sigBytes;if(this.clamp(),n%4)for(var s=0;s<r;s++){var a=i[s>>>2]>>>24-s%4*8&255;t[n+s>>>2]|=a<<24-(n+s)%4*8}else for(var o=0;o<r;o+=4)t[n+o>>>2]=i[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new o.init(t,e)}}),l=r.enc={},c=l.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var s=t[r>>>2]>>>24-r%4*8&255;n.push((s>>>4).toString(16)),n.push((15&s).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n+=2)i[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new o.init(i,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r++){var s=t[r>>>2]>>>24-r%4*8&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n<t;n++)i[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new o.init(i,t)}},u=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,n=this._data,r=n.words,s=n.sigBytes,a=this.blockSize,l=s/(4*a),c=(l=t?e.ceil(l):e.max((0|l)-this._minBufferSize,0))*a,d=e.min(4*c,s);if(c){for(var u=0;u<c;u+=a)this._doProcessBlock(r,u);i=r.splice(0,c),n.sigBytes-=d}return new o.init(i,d)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(s.Hasher=p.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new h.HMAC.init(e,i).finalize(t)}}}),r.algo={});return r}(Math);return e}))})),k=b(((e,t)=>
1{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib,n=i.Base,r=i.WordArray,(s=t.x64={}).Word=n.extend({init:function(e,t){this.high=e,this.low=t}}),s.WordArray=n.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,i=[],n=0;n<t;n++){var s=e[n];i.push(s.high),i.push(s.low)}return r.create(i,this.sigBytes)},clone:function(){for(var e=n.clone.call(this),t=e.words=this.words.slice(0),i=t.length,r=0;r<i;r++)t[r]=t[r].clone();return e}}),e;var t,i,n,r,s}))})),x=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return function(){if("function"==typeof ArrayBuffer){var t=e.lib.WordArray,i=t.init,n=t.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||typeof Uint8ClampedArray<"u"&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],r=0;r<t;r++)n[r>>>2]|=e[r]<<24-r%4*8;i.call(this,n,t)}else i.apply(this,arguments)};n.prototype=t}}(),e.lib.WordArray}))})),T=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.WordArray,n=t.enc;n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],r=0;r<i;r+=2){var s=t[r>>>2]>>>16-r%4*8&65535;n.push(String.fromCharCode(s))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return i.create(n,2*t)}};function r(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16LE={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],s=0;s<i;s+=2){var a=r(t[s>>>2]>>>16-s%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],s=0;s<t;s++)n[s>>>1]|=r(e.charCodeAt(s)<<16-s%2*16);return i.create(n,2*t)}}}(),e.enc.Utf16}))})),P=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib.WordArray,t.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,n=this._map;e.clamp();for(var r=[],s=0;s<i;s+=3)for(var a=(t[s>>>2]>>>24-s%4*8&255)<<16|(t[s+1>>>2]>>>24-(s+1)%4*8&255)<<8|t[s+2>>>2]>>>24-(s+2)%4*8&255,o=0;o<4&&s+.75*o<i;o++)r.push(n.charAt(a>>>6*(3-o)&63));var l=n.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var s=0;s<n.length;s++)r[n.charCodeAt(s)]=s}var a=n.charAt(64);if(a){var o=e.indexOf(a);-1!==o&&(t=o)}return function(e,t,n){for(var r=[],s=0,a=0;a<t;a++)if(a%4){var o=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;r[s>>>2]|=o<<24-s%4*8,s++}return i.create(r,s)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.enc.Base64;var t,i}))})),E=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib.WordArray,t.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var i=e.words,n=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var s=[],a=0;a<n;a+=3)for(var o=(i[a>>>2]>>>24-a%4*8&255)<<16|(i[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|i[a+2>>>2]>>>24-(a+2)%4*8&255,l=0;l<4&&a+.75*l<n;l++)s.push(r.charAt(o>>>6*(3-l)&63));var c=r.charAt(64);if(c)for(;s.length%4;)s.push(c);return s.join("")},parse:function(e,t){void 0===t&&(t=!0);var n=e.length,r=t?this._safe_map:this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var a=0;a<r.length;a++)s[r.charCodeAt(a)]=a}var o=r.charAt(64);if(o){var l=e.indexOf(o);-1!==l&&(n=l)}return function(e,t,n){for(var r=[],s=0,a=0;a<t;a++)if(a%4){var o=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;r[s>>>2]|=o<<24-s%4*8,s++}return i.create(r,s)}(e,n,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},e.enc.Base64url;var t,i}))})),D=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return function(t){var i=e,n=i.lib,r=n.WordArray,s=n.Hasher,a=i.algo,o=[];!function(){for(var e=0;e<64;e++)o[e]=4294967296*t.abs(t.sin(e+1))|0}();var l=a.MD5=s.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var s=this._hash.words,a=e[t+0],l=e[t+1],h=e[t+2],f=e[t+3],m=e[t+4],g=e[t+5],b=e[t+6],y=e[t+7],v=e[t+8],w=e[t+9],_=e[t+10],S=e[t+11],C=e[t+12],I=e[t+13],A=e[t+14],k=e[t+15],x=s[0],T=s[1],P=s[2],E=s[3];x=c(x,T,P,E,a,7,o[0]),E=c(E,x,T,P,l,12,o[1]),P=c(P,E,x,T,h,17,o[2]),T=c(T,P,E,x,f,22,o[3]),x=c(x,T,P,E,m,7,o[4]),E=c(E,x,T,P,g,12,o[5]),P=c(P,E,x,T,b,17,o[6]),T=c(T,P,E,x,y,22,o[7]),x=c(x,T,P,E,v,7,o[8]),E=c(E,x,T,P,w,12,o[9]),P=c(P,E,x,T,_,17,o[10]),T=c(T,P,E,x,S,22,o[11]),x=c(x,T,P,E,C,7,o[12]),E=c(E,x,T,P,I,12,o[13]),P=c(P,E,x,T,A,17,o[14]),x=d(x,T=c(T,P,E,x,k,22,o[15]),P,E,l,5,o[16]),E=d(E,x,T,P,b,9,o[17]),P=d(P,E,x,T,S,14,o[18]),T=d(T,P,E,x,a,20,o[19]),x=d(x,T,P,E,g,5,o[20]),E=d(E,x,T,P,_,9,o[21]),P=d(P,E,x,T,k,14,o[22]),T=d(T,P,E,x,m,20,o[23]),x=d(x,T,P,E,w,5,o[24]),E=d(E,x,T,P,A,9,o[25]),P=d(P,E,x,T,f,14,o[26]),T=d(T,P,E,x,v,20,o[27]),x=d(x,T,P,E,I,5,o[28]),E=d(E,x,T,P,h,9,o[29]),P=d(P,E,x,T,y,14,o[30]),x=u(x,T=d(T,P,E,x,C,20,o[31]),P,E,g,4,o[32]),E=u(E,x,T,P,v,11,o[33]),P=u(P,E,x,T,S,16,o[34]),T=u(T,P,E,x,A,23,o[35]),x=u(x,T,P,E,l,4,o[36]),E=u(E,x,T,P,m,11,o[37]),P=u(P,E,x,T,y,16,o[38]),T=u(T,P,E,x,_,23,o[39]),x=u(x,T,P,E,I,4,o[40]),E=u(E,x,T,P,a,11,o[41]),P=u(P,E,x,T,f,16,o[42]),T=u(T,P,E,x,b,23,o[43]),x=u(x,T,P,E,w,4,o[44]),E=u(E,x,T,P,C,11,o[45]),P=u(P,E,x,T,k,16,o[46]),x=p(x,T=u(T,P,E,x,h,23,o[47]),P,E,a,6,o[48]),E=p(E,x,T,P,y,10,o[49]),P=p(P,E,x,T,A,15,o[50]),T=p(T,P,E,x,g,21,o[51]),x=p(x,T,P,E,C,6,o[52]),E=p(E,x,T,P,f,10,o[53]),P=p(P,E,x,T,_,15,o[54]),T=p(T,P,E,x,l,21,o[55]),x=p(x,T,P,E,v,6,o[56]),E=p(E,x,T,P,k,10,o[57]),P=p(P,E,x,T,b,15,o[58]),T=p(T,P,E,x,I,21,o[59]),x=p(x,T,P,E,m,6,o[60]),E=p(E,x,T,P,S,10,o[61]),P=p(P,E,x,T,h,15,o[62]),T=p(T,P,E,x,w,21,o[63]),s[0]=s[0]+x|0,s[1]=s[1]+T|0,s[2]=s[2]+P|0,s[3]=s[3]+E|0},_doFinalize:function(){var e=this._data,i=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;i[r>>>5]|=128<<24-r%32;var s=t.floor(n/4294967296),a=n;i[15+(r+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),i[14+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(i.length+1),this._process();for(var o=this._hash,l=o.words,c=0;c<4;c++){var d=l[c];l[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return o},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,i,n,r,s,a){var o=e+(t&i|~t&n)+r+a;return(o<<s|o>>>32-s)+t}function d(e,t,i,n,r,s,a){var o=e+(t&n|i&~n)+r+a;return(o<<s|o>>>32-s)+t}function u(e,t,i,n,r,s,a){var o=e+(t^i^n)+r+a;return(o<<s|o>>>32-s)+t}function p(e,t,i,n,r,s,a){var o=e+(i^(t|~n))+r+a;return(o<<s|o>>>32-s)+t}i.MD5=s._createHelper(l),i.HmacMD5=s._createHmacHelper(l)}(Math),e.MD5}))})),O=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib,n=i.WordArray,r=i.Hasher,s=t.algo,a=[],o=s.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=this._hash.words,n=i[0],r=i[1],s=i[2],o=i[3],l=i[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var d=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=d<<1|d>>>31}var u=(n<<5|n>>>27)+l+a[c];u+=c<20?1518500249+(r&s|~r&o):c<40?1859775393+(r^s^o):c<60?(r&s|r&o|s&o)-1894007588:(r^s^o)-899497514,l=o,o=s,s=r<<30|r>>>2,r=n,n=u}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+s|0,i[3]=i[3]+o|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(i/4294967296),t[15+(n+64>>>9<<4)]=i,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=r._createHelper(o),t.HmacSHA1=r._createHmacHelper(o),e.SHA1;var t,i,n,r,s,a,o}))}
1)),B=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return function(t){var i=e,n=i.lib,r=n.WordArray,s=n.Hasher,a=i.algo,o=[],l=[];!function(){function e(e){for(var i=t.sqrt(e),n=2;n<=i;n++)if(!(e%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)e(n)&&(r<8&&(o[r]=i(t.pow(n,.5))),l[r]=i(t.pow(n,1/3)),r++),n++}();var c=[],d=a.SHA256=s.extend({_doReset:function(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],d=i[5],u=i[6],p=i[7],h=0;h<64;h++){if(h<16)c[h]=0|e[t+h];else{var f=c[h-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[h-2],b=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[h]=m+c[h-7]+b+c[h-16]}var y=n&r^n&s^r&s,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=p+((o<<26|o>>>6)^(o<<21|o>>>11)^(o<<7|o>>>25))+(o&d^~o&u)+l[h]+c[h];p=u,u=d,d=o,o=a+w|0,a=s,s=r,r=n,n=w+(v+y)|0}i[0]=i[0]+n|0,i[1]=i[1]+r|0,i[2]=i[2]+s|0,i[3]=i[3]+a|0,i[4]=i[4]+o|0,i[5]=i[5]+d|0,i[6]=i[6]+u|0,i[7]=i[7]+p|0},_doFinalize:function(){var e=this._data,i=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=t.floor(n/4294967296),i[15+(r+64>>>9<<4)]=n,e.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}});i.SHA256=s._createHelper(d),i.HmacSHA256=s._createHmacHelper(d)}(Math),e.SHA256}))})),M=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),B()):"function"==typeof define&&define.amd?define(["./core","./sha256"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib.WordArray,n=t.algo,r=n.SHA256,s=n.SHA224=r.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=4,e}}),t.SHA224=r._createHelper(s),t.HmacSHA224=r._createHmacHelper(s),e.SHA224;var t,i,n,r,s}))})),R=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),k()):"function"==typeof define&&define.amd?define(["./core","./x64-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.Hasher,n=t.x64,r=n.Word,s=n.WordArray,a=t.algo;function o(){return r.create.apply(r,arguments)}var l=[o(1116352408,3609767458),o(1899447441,602891725),o(3049323471,3964484399),o(3921009573,2173295548),o(961987163,4081628472),o(1508970993,3053834265),o(2453635748,2937671579),o(2870763221,3664609560),o(3624381080,2734883394),o(310598401,1164996542),o(607225278,1323610764),o(1426881987,3590304994),o(1925078388,4068182383),o(2162078206,991336113),o(2614888103,633803317),o(3248222580,3479774868),o(3835390401,2666613458),o(4022224774,944711139),o(264347078,2341262773),o(604807628,2007800933),o(770255983,1495990901),o(1249150122,1856431235),o(1555081692,3175218132),o(1996064986,2198950837),o(2554220882,3999719339),o(2821834349,766784016),o(2952996808,2566594879),o(3210313671,3203337956),o(3336571891,1034457026),o(3584528711,2466948901),o(113926993,3758326383),o(338241895,168717936),o(666307205,1188179964),o(773529912,1546045734),o(1294757372,1522805485),o(1396182291,2643833823),o(1695183700,2343527390),o(1986661051,1014477480),o(2177026350,1206759142),o(2456956037,344077627),o(2730485921,1290863460),o(2820302411,3158454273),o(3259730800,3505952657),o(3345764771,106217008),o(3516065817,3606008344),o(3600352804,1432725776),o(4094571909,1467031594),o(275423344,851169720),o(430227734,3100823752),o(506948616,1363258195),o(659060556,3750685593),o(883997877,3785050280),o(958139571,3318307427),o(1322822218,3812723403),o(1537002063,2003034995),o(1747873779,3602036899),o(1955562222,1575990012),o(2024104815,1125592928),o(2227730452,2716904306),o(2361852424,442776044),o(2428436474,593698344),o(2756734187,3733110249),o(3204031479,2999351573),o(3329325298,3815920427),o(3391569614,3928383900),o(3515267271,566280711),o(3940187606,3454069534),o(4118630271,4000239992),o(116418474,1914138554),o(174292421,2731055270),o(289380356,3203993006),o(460393269,320620315),o(685471733,587496836),o(852142971,1086792851),o(1017036298,365543100),o(1126000580,2618297676),o(1288033470,3409855158),o(1501505948,4234509866),o(1607167915,987167468),o(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=o()}();var d=a.SHA512=i.extend({_doReset:function(){this._hash=new s.init([new r.init(1
1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var i=this._hash.words,n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],d=i[5],u=i[6],p=i[7],h=n.high,f=n.low,m=r.high,g=r.low,b=s.high,y=s.low,v=a.high,w=a.low,_=o.high,S=o.low,C=d.high,I=d.low,A=u.high,k=u.low,x=p.high,T=p.low,P=h,E=f,D=m,O=g,B=b,M=y,R=v,L=w,F=_,N=S,U=C,V=I,q=A,$=k,j=x,z=T,W=0;W<80;W++){var H,Y,G=c[W];if(W<16)Y=G.high=0|e[t+2*W],H=G.low=0|e[t+2*W+1];else{var K=c[W-15],Q=K.high,J=K.low,Z=(Q>>>1|J<<31)^(Q>>>8|J<<24)^Q>>>7,X=(J>>>1|Q<<31)^(J>>>8|Q<<24)^(J>>>7|Q<<25),ee=c[W-2],te=ee.high,ie=ee.low,ne=(te>>>19|ie<<13)^(te<<3|ie>>>29)^te>>>6,re=(ie>>>19|te<<13)^(ie<<3|te>>>29)^(ie>>>6|te<<26),se=c[W-7],ae=se.high,oe=se.low,le=c[W-16],ce=le.high,de=le.low;Y=(Y=(Y=Z+ae+((H=X+oe)>>>0<X>>>0?1:0))+ne+((H+=re)>>>0<re>>>0?1:0))+ce+((H+=de)>>>0<de>>>0?1:0),G.high=Y,G.low=H}var ue,pe=F&U^~F&q,he=N&V^~N&$,fe=P&D^P&B^D&B,me=E&O^E&M^O&M,ge=(P>>>28|E<<4)^(P<<30|E>>>2)^(P<<25|E>>>7),be=(E>>>28|P<<4)^(E<<30|P>>>2)^(E<<25|P>>>7),ye=(F>>>14|N<<18)^(F>>>18|N<<14)^(F<<23|N>>>9),ve=(N>>>14|F<<18)^(N>>>18|F<<14)^(N<<23|F>>>9),we=l[W],_e=we.high,Se=we.low,Ce=j+ye+((ue=z+ve)>>>0<z>>>0?1:0),Ie=be+me;j=q,z=$,q=U,$=V,U=F,V=N,F=R+(Ce=(Ce=(Ce=Ce+pe+((ue=ue+he)>>>0<he>>>0?1:0))+_e+((ue=ue+Se)>>>0<Se>>>0?1:0))+Y+((ue=ue+H)>>>0<H>>>0?1:0))+((N=L+ue|0)>>>0<L>>>0?1:0)|0,R=B,L=M,B=D,M=O,D=P,O=E,P=Ce+(ge+fe+(Ie>>>0<be>>>0?1:0))+((E=ue+Ie|0)>>>0<ue>>>0?1:0)|0}f=n.low=f+E,n.high=h+P+(f>>>0<E>>>0?1:0),g=r.low=g+O,r.high=m+D+(g>>>0<O>>>0?1:0),y=s.low=y+M,s.high=b+B+(y>>>0<M>>>0?1:0),w=a.low=w+L,a.high=v+R+(w>>>0<L>>>0?1:0),S=o.low=S+N,o.high=_+F+(S>>>0<N>>>0?1:0),I=d.low=I+V,d.high=C+U+(I>>>0<V>>>0?1:0),k=u.low=k+$,u.high=A+q+(k>>>0<$>>>0?1:0),T=p.low=T+z,p.high=x+j+(T>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(i/4294967296),t[31+(n+128>>>10<<5)]=i,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=i._createHelper(d),t.HmacSHA512=i._createHmacHelper(d)}(),e.SHA512}))})),L=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),k(),R()):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).x64,n=i.Word,r=i.WordArray,s=t.algo,a=s.SHA512,o=s.SHA384=a.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}}),t.SHA384=a._createHelper(o),t.HmacSHA384=a._createHmacHelper(o),e.SHA384;var t,i,n,r,s,a,o}))})),F=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),k()):"function"==typeof define&&define.amd?define(["./core","./x64-core"],n):n(i.CryptoJS)}(e,(function(e){return function(t){var i=e,n=i.lib,r=n.WordArray,s=n.Hasher,a=i.x64.Word,o=i.algo,l=[],c=[],d=[];!function(){for(var e=1,t=0,i=0;i<24;i++){l[e+5*t]=(i+1)*(i+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,s=0;s<24;s++){for(var o=0,u=0,p=0;p<7;p++){if(1&r){var h=(1<<p)-1;h<32?u^=1<<h:o^=1<<h-32}128&r?r=r<<1^113:r<<=1}d[s]=a.create(o,u)}}();var u=[];!function(){for(var e=0;e<25;e++)u[e]=a.create()}();var p=o.SHA3=s.extend({cfg:s.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var i=this._state,n=this.blockSize/2,r=0;r<n;r++){var s=e[t+2*r],a=e[t+2*r+1];s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=i[r]).high^=a,T.low^=s}for(var o=0;o<24;o++){for(var p=0;p<5;p++){for(var h=0,f=0,m=0;m<5;m++){h^=(T=i[p+5*m]).high,f^=T.low}var g=u[p];g.high=h,g.low=f}for(p=0;p<5;p++){var b=u[(p+4)%5],y=u[(p+1)%5],v=y.high,w=y.low;for(h=b.high^(v<<1|w>>>31),f=b.low^(w<<1|v>>>31),m=0;m<5;m++){(T=i[p+5*m]).high^=h,T.low^=f}}for(var _=1;_<25;_++){var S=(T=i[_]).high,C=T.low,I=l[_];I<32?(h=S<<I|C>>>32-I,f=C<<I|S>>>32-I):(h=C<<I-32|S>>>64-I,f=S<<I-32|C>>>64-I);var A=u[c[_]];A.high=h,A.low=f}var k=u[0],x=i[0];k.high=x.high,k.low=x.low;for(p=0;p<5;p++)for(m=0;m<5;m++){var T=i[_=p+5*m],P=u[_],E=u[(p+1)%5+5*m],D=u[(p+2)%5+5*m];T.high=P.high^~E.high&D.high,T.low=P.low^~E.low&D.low}T=i[0];var O=d[o];T.high^=O.high,T.low^=O.low}},_doFinalize:function(){var e=this._data,i=e.words,n=(this._nDataBytes,8*e.sigBytes),s=32*this.blockSize;i[n>>>5]|=1<<24-n%32,i[(t.ceil((n+1)/s)*s>>>5)-1]|=128,e.sigBytes=4*i.length,this._process();for(var a=this._state,o=this.cfg.outputLength/8,l=o/8,c=[],d=0;d<l;d++){var u=a[d],p=u.high,h=u.low;p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.push(h),c.push(p)}return new r.init(c,o)},clone:function(){for(var e=s.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e}});i.SHA3=s._createHelper(p),i.HmacSHA3=s._createHmacHelper(p)}(Math),e.SHA3}))})),N=b(((e,t)=>
1{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib,n=i.WordArray,r=i.Hasher,s=t.algo,a=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),c=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=n.create([0,1518500249,1859775393,2400959708,2840853838]),u=n.create([1352829926,1548603684,1836072691,2053994217,0]),p=s.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,r=e[n];e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var s,p,v,w,_,S,C,I,A,k,x=this._hash.words,T=d.words,P=u.words,E=a.words,D=o.words,O=l.words,B=c.words;S=s=x[0],C=p=x[1],I=v=x[2],A=w=x[3],k=_=x[4];var M;for(i=0;i<80;i+=1)M=s+e[t+E[i]]|0,M+=i<16?h(p,v,w)+T[0]:i<32?f(p,v,w)+T[1]:i<48?m(p,v,w)+T[2]:i<64?g(p,v,w)+T[3]:b(p,v,w)+T[4],M=(M=y(M|=0,O[i]))+_|0,s=_,_=w,w=y(v,10),v=p,p=M,M=S+e[t+D[i]]|0,M+=i<16?b(C,I,A)+P[0]:i<32?g(C,I,A)+P[1]:i<48?m(C,I,A)+P[2]:i<64?f(C,I,A)+P[3]:h(C,I,A)+P[4],M=(M=y(M|=0,B[i]))+k|0,S=k,k=A,A=y(I,10),I=C,C=M;M=x[1]+v+A|0,x[1]=x[2]+w+k|0,x[2]=x[3]+_+S|0,x[3]=x[4]+s+C|0,x[4]=x[0]+p+I|0,x[0]=M},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,s=r.words,a=0;a<5;a++){var o=s[a];s[a]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return r},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function h(e,t,i){return e^t^i}function f(e,t,i){return e&t|~e&i}function m(e,t,i){return(e|~t)^i}function g(e,t,i){return e&i|t&~i}function b(e,t,i){return e^(t|~i)}function y(e,t){return e<<t|e>>>32-t}t.RIPEMD160=r._createHelper(p),t.HmacRIPEMD160=r._createHmacHelper(p)}(Math),e.RIPEMD160}))})),U=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A()):"function"==typeof define&&define.amd?define(["./core"],n):n(i.CryptoJS)}(e,(function(e){var t,i,n;i=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var i=e.blockSize,r=4*i;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var s=this._oKey=t.clone(),a=this._iKey=t.clone(),o=s.words,l=a.words,c=0;c<i;c++)o[c]^=1549556828,l[c]^=909522486;s.sigBytes=a.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}})}))})),V=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),B(),U()):"function"==typeof define&&define.amd?define(["./core","./sha256","./hmac"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib,n=i.Base,r=i.WordArray,s=t.algo,a=s.SHA256,o=s.HMAC,l=s.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,n=o.create(i.hasher,e),s=r.create(),a=r.create([1]),l=s.words,c=a.words,d=i.keySize,u=i.iterations;l.length<d;){var p=n.update(t).finalize(a);n.reset();for(var h=p.words,f=h.length,m=p,g=1;g<u;g++){m=n.finalize(m),n.reset();for(var b=m.words,y=0;y<f;y++)h[y]^=b[y]}s.concat(p),c[0]++}return s.sigBytes=4*d,s}}),t.PBKDF2=function(e,t,i){return l.create(i).compute(e,t)},e.PBKDF2;var t,i,n,r,s,a,o,l}))})),q=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),O(),U()):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib,n=i.Base,r=i.WordArray,s=t.algo,a=s.MD5,o=s.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i,n=this.cfg,s=n.hasher.create(),a=r.create(),o=a.words,l=n.keySize,c=n.iterations;o.length<l;){i&&s.update(i),i=s.update(e).finalize(t),s.reset();for(var d=1;d<c;d++)i=s.finalize(i),s.reset();a.concat(i)}return a.sigBytes=4*l,a}}),t.EvpKDF=function(e,t,i){return o.create(i).compute(e,t)},e.EvpKDF;var t,i,n,r,s,a,o}))}
1)),j=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),q()):"function"==typeof define&&define.amd?define(["./core","./evpkdf"],n):n(i.CryptoJS)}(e,(function(e){var t,i,n,r,s,a,o,l,c,d,u,p,h,f,m,g,b,y;e.lib.Cipher||(i=(t=e).lib,n=i.Base,r=i.WordArray,s=i.BufferedBlockAlgorithm,(a=t.enc).Utf8,o=a.Base64,l=t.algo.EvpKDF,c=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?y:g}return function(t){return{encrypt:function(i,n,r){return e(n).encrypt(t,i,n,r)},decrypt:function(i,n,r){return e(n).decrypt(t,i,n,r)}}}}()}),i.StreamCipher=c.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),d=t.mode={},u=i.BlockCipherMode=n.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=d.CBC=function(){var e=u.extend();function t(e,t,i){var n,r=this._iv;r?(n=r,this._iv=void 0):n=this._prevBlock;for(var s=0;s<i;s++)e[t+s]^=n[s]}return e.Encryptor=e.extend({processBlock:function(e,i){var n=this._cipher,r=n.blockSize;t.call(this,e,i,r),n.encryptBlock(e,i),this._prevBlock=e.slice(i,i+r)}}),e.Decryptor=e.extend({processBlock:function(e,i){var n=this._cipher,r=n.blockSize,s=e.slice(i,i+r);n.decryptBlock(e,i),t.call(this,e,i,r),this._prevBlock=s}}),e}(),h=(t.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,n=i-e.sigBytes%i,s=n<<24|n<<16|n<<8|n,a=[],o=0;o<n;o+=4)a.push(s);var l=r.create(a,n);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.BlockCipher=c.extend({cfg:c.cfg.extend({mode:p,padding:h}),reset:function(){var e;c.reset.call(this);var t=this.cfg,i=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,i&&i.words):(this._mode=e.call(n,this,i&&i.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),f=i.CipherParams=n.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?r.create([1398893684,1701076831]).concat(i).concat(t):t).toString(o)},parse:function(e){var t,i=o.parse(e),n=i.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=r.create(n.slice(2,4)),n.splice(0,4),i.sigBytes-=16),f.create({ciphertext:i,salt:t})}},g=i.SerializableCipher=n.extend({cfg:n.extend({format:m}),encrypt:function(e,t,i,n){n=this.cfg.extend(n);var r=e.createEncryptor(i,n),s=r.finalize(t),a=r.cfg;return f.create({ciphertext:s,key:i,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,i,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(i,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,i,n,s){if(n||(n=r.random(8)),s)var a=l.create({keySize:t+i,hasher:s}).compute(e,n);else a=l.create({keySize:t+i}).compute(e,n);var o=r.create(a.words.slice(t),4*i);return a.sigBytes=4*t,f.create({key:a,iv:o,salt:n})}},y=i.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:b}),encrypt:function(e,t,i,n){var r=(n=this.cfg.extend(n)).kdf.execute(i,e.keySize,e.ivSize,n.salt,n.hasher);n.iv=r.iv;var s=g.encrypt.call(this,e,t,r.key,n);
1return s.mixIn(r),s},decrypt:function(e,t,i,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var r=n.kdf.execute(i,e.keySize,e.ivSize,t.salt,n.hasher);return n.iv=r.iv,g.decrypt.call(this,e,t,r.key,n)}}))}))})),z=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function i(e,t,i,n){var r,s=this._iv;s?(r=s.slice(0),this._iv=void 0):r=this._prevBlock,n.encryptBlock(r,0);for(var a=0;a<i;a++)e[t+a]^=r[a]}return t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;i.call(this,e,t,r,n),this._prevBlock=e.slice(t,t+r)}}),t.Decryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,s=e.slice(t,t+r);i.call(this,e,t,r,n),this._prevBlock=s}}),t}(),e.mode.CFB}))})),W=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.mode.CTR=(t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,r=this._iv,s=this._counter;r&&(s=this._counter=r.slice(0),this._iv=void 0);var a=s.slice(0);i.encryptBlock(a,0),s[n-1]=s[n-1]+1|0;for(var o=0;o<n;o++)e[t+o]^=a[o]}}),t.Decryptor=i,t),e.mode.CTR;var t,i}))})),H=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.mode.CTRGladman=function(){var t=e.lib.BlockCipherMode.extend();function i(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,i=e>>8&255,n=255&e;255===t?(t=0,255===i?(i=0,255===n?n=0:++n):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=n}return e}var n=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,s=this._iv,a=this._counter;s&&(a=this._counter=s.slice(0),this._iv=void 0),function(e){0===(e[0]=i(e[0]))&&(e[1]=i(e[1]))}(a);var o=a.slice(0);n.encryptBlock(o,0);for(var l=0;l<r;l++)e[t+l]^=o[l]}});return t.Decryptor=n,t}(),e.mode.CTRGladman}))})),Y=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.mode.OFB=(t=e.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(e,t){var i=this._cipher,n=i.blockSize,r=this._iv,s=this._keystream;r&&(s=this._keystream=r.slice(0),this._iv=void 0),i.encryptBlock(s,0);for(var a=0;a<n;a++)e[t+a]^=s[a]}}),t.Decryptor=i,t),e.mode.OFB;var t,i}))})),G=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.mode.ECB=((t=e.lib.BlockCipherMode.extend()).Encryptor=t.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),t.Decryptor=t.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),t),e.mode.ECB;var t}))})),K=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,n=4*t,r=n-i%n,s=i+r-1;e.clamp(),e.words[s>>>2]|=r<<24-s%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923}))})),Q=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.pad.Iso10126={pad:function(t,i){var n=4*i,r=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(r-1)).concat(e.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126}))})),J=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.pad.Iso97971={pad:function(t,i){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,i)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971}))}
1)),Z=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.pad.ZeroPadding={pad:function(e,t){var i=4*t;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){var t=e.words,i=e.sigBytes-1;for(i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},e.pad.ZeroPadding}))})),X=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding}))})),ee=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),j()):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return i=(t=e).lib.CipherParams,n=t.enc.Hex,t.format.Hex={stringify:function(e){return e.ciphertext.toString(n)},parse:function(e){var t=n.parse(e);return i.create({ciphertext:t})}},e.format.Hex;var t,i,n}))})),te=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.BlockCipher,n=t.algo,r=[],s=[],a=[],o=[],l=[],c=[],d=[],u=[],p=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,n=0;for(t=0;t<256;t++){var f=n^n<<1^n<<2^n<<3^n<<4;f=f>>>8^255&f^99,r[i]=f,s[f]=i;var m=e[i],g=e[m],b=e[g],y=257*e[f]^16843008*f;a[i]=y<<24|y>>>8,o[i]=y<<16|y>>>16,l[i]=y<<8|y>>>24,c[i]=y;y=16843009*b^65537*g^257*m^16843008*i;d[f]=y<<24|y>>>8,u[f]=y<<16|y>>>16,p[f]=y<<8|y>>>24,h[f]=y,i?(i=m^e[e[e[b^m]]],n^=e[e[n]]):i=n=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4,n=4*((this._nRounds=i+6)+1),s=this._keySchedule=[],a=0;a<n;a++)a<i?s[a]=t[a]:(c=s[a-1],a%i?i>6&&a%i==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=r[(c=c<<8|c>>>24)>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=f[a/i|0]<<24),s[a]=s[a-i]^c);for(var o=this._invKeySchedule=[],l=0;l<n;l++){a=n-l;if(l%4)var c=s[a];else c=s[a-4];o[l]=l<4||a<=4?c:d[r[c>>>24]]^u[r[c>>>16&255]]^p[r[c>>>8&255]]^h[r[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,o,l,c,r)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,d,u,p,h,s);i=e[t+1];e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,n,r,s,a,o){for(var l=this._nRounds,c=e[t]^i[0],d=e[t+1]^i[1],u=e[t+2]^i[2],p=e[t+3]^i[3],h=4,f=1;f<l;f++){var m=n[c>>>24]^r[d>>>16&255]^s[u>>>8&255]^a[255&p]^i[h++],g=n[d>>>24]^r[u>>>16&255]^s[p>>>8&255]^a[255&c]^i[h++],b=n[u>>>24]^r[p>>>16&255]^s[c>>>8&255]^a[255&d]^i[h++],y=n[p>>>24]^r[c>>>16&255]^s[d>>>8&255]^a[255&u]^i[h++];c=m,d=g,u=b,p=y}m=(o[c>>>24]<<24|o[d>>>16&255]<<16|o[u>>>8&255]<<8|o[255&p])^i[h++],g=(o[d>>>24]<<24|o[u>>>16&255]<<16|o[p>>>8&255]<<8|o[255&c])^i[h++],b=(o[u>>>24]<<24|o[p>>>16&255]<<16|o[c>>>8&255]<<8|o[255&d])^i[h++],y=(o[p>>>24]<<24|o[c>>>16&255]<<16|o[d>>>8&255]<<8|o[255&u])^i[h++];e[t]=m,e[t+1]=g,e[t+2]=b,e[t+3]=y},keySize:8});t.AES=i._createHelper(m)}(),e.AES}))}
1)),ie=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib,n=i.WordArray,r=i.BlockCipher,s=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c
vendor: 4,679 bytes, line 1
1=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:2
vendor: 2,950 bytes, line 1
162272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],
1d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=s.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var n=a[i]-1;t[i]=e[n>>>5]>>>31-n%32&1}for(var r=this._subKeys=[],s=0;s<16;s++){var c=r[s]=[],d=l[s];for(i=0;i<24;i++)c[i/6|0]|=t[(o[i]-1+d)%28]<<31-i%6,c[4+(i/6|0)]|=t[28+(o[i+24]-1+d)%28]<<31-i%6;c[0]=c[0]<<1|c[0]>>>31;for(i=1;i<7;i++)c[i]=c[i]>>>4*(i-1)+3;c[7]=c[7]<<5|c[7]>>>27}var u=this._invSubKeys=[];for(i=0;i<16;i++)u[i]=r[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,i){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),p.call(this,1,1431655765);for(var n=0;n<16;n++){for(var r=i[n],s=this._lBlock,a=this._rBlock,o=0,l=0;l<8;l++)o|=c[l][((a^r[l])&d[l])>>>0];this._lBlock=a,this._rBlock=s^o}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,p.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){var i=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=i,this._lBlock^=i<<e}function h(e,t){var i=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=i,this._rBlock^=i<<e}t.DES=r._createHelper(u);var f=s.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(i)),this._des3=u.createEncryptor(n.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=r._createHelper(f)}(),e.TripleDES}))})),ne=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=n.RC4=i.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes,n=this._S=[],r=0;r<256;r++)n[r]=r;r=0;for(var s=0;r<256;r++){var a=r%i,o=t[a>>>2]>>>24-a%4*8&255;s=(s+n[r]+o)%256;var l=n[r];n[r]=n[s],n[s]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=s.call(this)},keySize:8,ivSize:0});function s(){for(var e=this._S,t=this._i,i=this._j,n=0,r=0;r<4;r++){i=(i+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[i],e[i]=s,n|=e[(e[t]+e[i])%256]<<24-8*r}return this._i=t,this._j=i,n}t.RC4=i._createHelper(r);var a=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)s.call(this)}});t.RC4Drop=i._createHelper(a)}(),e.RC4}))})),re=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=[],s=[],a=[],o=n.Rabbit=i.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(t){var s=t.words,a=s[0],o=s[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=c>>>16|4294901760&d,p=d<<16|65535&c;r[0]^=c,r[1]^=u,r[2]^=d,r[3]^=p,r[4]^=c,r[5]^=u,r[6]^=d,r[7]^=p;for(i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)s[i]=t[i];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0;for(i=0;i<8;i++){var n=e[i]+t[i],r=65535&n,o=n>>>16,l=((r*r>>>17)+r*o>>>15)+o*o,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[i]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=i._createHelper(o)}(),e.Rabbit}))})),se=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.StreamCipher,n=t.algo,r=[],s=[],a=[],o=n.RabbitLegacy=i.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];
1if(t){var s=t.words,a=s[0],o=s[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),u=c>>>16|4294901760&d,p=d<<16|65535&c;n[0]^=c,n[1]^=u,n[2]^=d,n[3]^=p,n[4]^=c,n[5]^=u,n[6]^=d,n[7]^=p;for(r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8),e[t+n]^=r[n]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)s[i]=t[i];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<s[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<s[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<s[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<s[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<s[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<s[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<s[6]>>>0?1:0)|0,this._b=t[7]>>>0<s[7]>>>0?1:0;for(i=0;i<8;i++){var n=e[i]+t[i],r=65535&n,o=n>>>16,l=((r*r>>>17)+r*o>>>15)+o*o,c=((4294901760&n)*n|0)+((65535&n)*n|0);a[i]=l^c}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=i._createHelper(o)}(),e.RabbitLegacy}))})),ae=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),P(),D(),q(),j()):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],n):n(i.CryptoJS)}(e,(function(e){return function(){var t=e,i=t.lib.BlockCipher,n=t.algo;let r=16,s=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a
vendor: 11,038 bytes, line 1
1=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var
1o={pbox:[],sbox:[]};function l(e,t){let i=t>>24&255,n=t>>16&255,r=t>>8&255,s=255&t,a=e.sbox[0][i]+e.sbox[1][n];return a^=e.sbox[2][r],a+=e.sbox[3][s],a}function c(e,t,i){let n,s=t,a=i;for(let t=0;t<r;++t)s^=e.pbox[t],a=l(e,s)^a,n=s,s=a,a=n;return n=s,s=a,a=n,a^=e.pbox[r],s^=e.pbox[r+1],{left:s,right:a}}var d=n.Blowfish=i.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4;!function(e,t,i){for(let t=0;t<4;t++){e.sbox[t]=[];for(let i=0;i<256;i++)e.sbox[t][i]=a[t][i]}let n=0;for(let a=0;a<r+2;a++)e.pbox[a]=s[a]^t[n],n++,n>=i&&(n=0);let o=0,l=0,d=0;for(let t=0;t<r+2;t+=2)d=c(e,o,l),o=d.left,l=d.right,e.pbox[t]=o,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let i=0;i<256;i+=2)d=c(e,o,l),o=d.left,l=d.right,e.sbox[t][i]=o,e.sbox[t][i+1]=l}(o,t,i)}},encryptBlock:function(e,t){var i=c(o,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},decryptBlock:function(e,t){var i=function(e,t,i){let n,s=t,a=i;for(let t=r+1;t>1;--t)s^=e.pbox[t],a=l(e,s)^a,n=s,s=a,a=n;return n=s,s=a,a=n,a^=e.pbox[1],s^=e.pbox[0],{left:s,right:a}}(o,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},blockSize:2,keySize:4,ivSize:2});t.Blowfish=i._createHelper(d)}(),e.Blowfish}))})),oe=b(((e,t)=>{!function(i,n){"object"==typeof e?t.exports=e=n(A(),k(),x(),T(),P(),E(),D(),O(),B(),M(),R(),L(),F(),N(),U(),V(),q(),j(),z(),W(),H(),Y(),G(),K(),Q(),J(),Z(),X(),ee(),te(),ie(),ne(),re(),se(),ae()):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],n):i.CryptoJS=i.CryptoJS}(e,(function(e){return e}))})),le=b((e=>{e.byteLength=function(e){var t=a(e),i=t[0],n=t[1];return 3*(i+n)/4-n},e.toByteArray=function(e){var t,i,s=a(e),o=s[0],l=s[1],c=new r(function(e,t,i){return 3*(t+i)/4-i}(0,o,l)),d=0,u=l>0?o-4:o;for(i=0;i<u;i+=4)t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===l&&(t=n[e.charCodeAt(i)]<<2|n[e.charCodeAt(i+1)]>>4,c[d++]=255&t),1===l&&(t=n[e.charCodeAt(i)]<<10|n[e.charCodeAt(i+1)]<<4|n[e.charCodeAt(i+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c},e.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],a=16383,o=0,c=n-r;o<c;o+=a)s.push(l(e,o,o+a>c?c:o+a));return 1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"=")),s.join("")};var t,i=[],n=[],r=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 20,118 bytes, line 1
1+/";for(t=0,64;t<64;++t)i[t]=s[t],n[s.charCodeAt(t)]=t;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function o(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function l(e,t,i){for(var n,r=[],s=t;s<i;s+=3)n=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),r.push(o(n));return r.join("")}n[45]=62,n[95]=63})),ce=b((e=>{e.read=function(e,t,i,n,r){var s,a,o=8*r-n-1,l=(1<<o)-1,c=l>>1,d=-7,u=i?r-1:0,p=i?-1:1,h=e[t+u];for(u+=p,s=h&(1<<-d)-1,h>>=-d,d+=o;d>0;s=256*s+e[t+u],u+=p,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=n;d>0;a=256*a+e[t+u],u+=p,d-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),s-=c}return(h?-1:1)*a*Math.pow(2,s-n)},e.write=function(e,t,i,n,r,s){var a,o,l,c=8*s-r-1,d=(1<<c)-1,u=d>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(o=0,a=d):a+u>=1?(o=(t*l-1)*Math.pow(2,r),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[i+h]=255&o,h+=f,o/=256,r-=8);for(a=a<<r|o,c+=r;c>0;e[i+h]=255&a,h+=f,a/=256,c-=8);e[i+h-f]|=128*m}})),de=b((e=>{var t=le(),i=ce();e.Buffer=s,e.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},e.INSPECT_MAX_BYTES=50;var n=2147483647;function r(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,i)}function a(e,t,i){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var i=0|u(e,t),n=r(i),a=n.write(e,t);return a!==i&&(n=n.slice(0,a)),n}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),n.__proto__=s.prototype,n}(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,i);var a=function(e){if(s.isBuffer(e)){var t=0|d(e.length),i=r(t);return 0===i.length||e.copy(i,0,0,t),i}if(void 0!==e.length)return"number"!=typeof e.length||V(e.length)?r(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(a)return a;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return o(e),r(e<0?0:0|d(e))}function c(e){for(var t=e.length<0?0:0|d(e.length),i=r(t),n=0;n<t;n+=1)i[n]=255&e[n];return i}function d(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function u(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return F(e).length;default:if(r)return n?-1:L(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,i){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,i);case"utf8":case"utf-8":return C(this,t,i);case"ascii":return A(this,t,i);case"latin1":case"binary":return k(this,t,i);case"base64":return S(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function h(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function f(e,t,i,n,r){if(0===e.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),V(i=+i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,i,n,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):m(e,[t],i,n,r);throw new TypeError("val must be string, number or Buffer")}function m(e,t,i,n,r){var s,a=1,o=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,i/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(s=i;s<o;s++)if(c(e,s)===c(t,-1===d?0:s-d)){if(-1===d&&(d=s),s-d+1===l)return d*a}else-1!==d&&(s-=s-d),d=-1}else for(i+l>o&&(i=o-l),s=i;s>=0;s--){for(var u=!0,p=0;p<l;p++)if(c(e,s+p)!==c(t,p)){u=!1;break}if(u)return s}return-1}function g(e,t,i,n){i=Number(i)||0;var r=e.length-i;n?(n=Number(n))>r&&(n=r):n=r;var s=t.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(V(o))return a;e[i+a]=o}return a}function b(e,t,i,n){return N(L(t,e.length-i),e,i,n)}function y(e,t,i,n){return N(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,n)}function v(e,t,i,n){return y(e,t,i,n)}function w(e,t,i,n){return N(F(t),e,i,n)}function _(e,t,i,n){return N(function(e,t){for(var i,n,r,s=[],a=0;a<e.length&&!((t-=2)<0);++a)i=e.charCodeAt(a),n=i>>8,r=i%256,s.push(r),s.push(n);return s}(t,e.length-i),e,i,n)}function S(e,i,n){return 0===i&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(i,n))}function C(e,t,i){i=Math.min(e.length,i);for(var n=[],r=t;r<i;){var s,a,o,l,c=e[r],d=null,u=c>239?4:c>223?3:c>191?2:1;if(r+u<=i)switch(u){case 1:c<128&&(d=c);break;case 2:128==(192&(s=e[r+1]))&&((l=(31&c)<<6|63&s)>127&&(d=l));break;case 3:s=e[r+1],a=e[r+2],128==(192&s)&&128==(192&a)&&((l=(15&c)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l));break;case 4:s=e[r+1],a=e[r+2],o=e[r+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&((l=(15&c)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(d=l))}null===d?(d=65533,u=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),r+=u}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var i="",n=0;n<t;)i+=String.fromCharCode.apply(String,e.slice(n,n+=I));return i}(n)}e.kMaxLength=n,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,i){return a(e,t,i)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,i){return function(e,t,i){return o(e),e<=0?r(e):void 0!==t?"string"==typeof i?r(e).fill(t,i):r(e).fill(t):r(e)}(e,t,i)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(U(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,n=t.length,r=0,a=Math.min(i,n);r<a;++r)if(e[r]!==t[r]){i=e[r],n=t[r];break}return i<n?-1:n<i?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=s.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var a=e[i];if(U(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},s.byteLength=u,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(t+=" ... "),"<Buffer "+t+">"},s.prototype.compare=function(e,t,i,n,r){if(U(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),t<0||i>e.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&t>=i)return 0;if(n>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var a=(r>>>=0)-(n>>>=0),o=(i>>>=0)-(t>>>=0),l=Math.min(a,o),c=this.slice(n,r),d=e.slice(t,i),u=0;u<l;++u)if(c[u]!==d[u]){a=c[u],o=d[u];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},s.prototype.indexOf=function(e,t,i){return f(this,e,t,i,!0)},s.prototype.lastIndexOf=function(e,t,i){return f(this,e,t,i,!1)},s.prototype.write=function(e,t,i,n){if(void 0===t)n="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)n=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return g(this,e,t,i);case"utf8":case"utf-8":return b(this,e,t,i);case"ascii":return y(this,e,t,i);case"latin1":case"binary":return v(this,e,t,i);case"base64":return w(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function A(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(127&e[r]);return n}function k(e,t,i){var n="";i=Math.min(e.length,i);for(var r=t;r<i;++r)n+=String.fromCharCode(e[r]);return n}function x(e,t,i){var n=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>n)&&(i=n);for(var r="",s=t;s<i;++s)r+=R(e[s]);return r}function T(e,t,i){for(var n=e.slice(t,i),r="",s=0;s<n.length;s+=2)r+=String.fromCharCode(n[s]+256*n[s+1]);return r}function P(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function E(e,t,i,n,r,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(i+n>e.length)throw new RangeError("Index out of range")}function D(e,t,i,n,r,s){if(i+n>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function O(e,t,n,r,s){return t=+t,n>>>=0,s||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,s){return t=+t,n>>>=0,s||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e],r=1,s=0;++s<t&&(r*=256);)n+=this[e+s]*r;return n},s.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e+--t],r=1;t>0&&(r*=256);)n+=this[e+--t]*r;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=this[e],r=1,s=0;++s<t&&(r*=256);)n+=this[e+s]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);for(var n=t,r=1,s=this[e+--n];n>0&&(r*=256);)s+=this[e+--n]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*t)),s},s.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,i,n){(e=+e,t>>>=0,i>>>=0,n)||E(this,e,t,i,Math.pow(2,8*i)-1,0);var r=1,s=0;for(this[t]=255&e;++s<i&&(r*=256);)this[t+s]=e/r&255;return t+i},s.prototype.writeUIntBE=function(e,t,i,n){(e=+e,t>>>=0,i>>>=0,n)||E(this,e,t,i,Math.pow(2,8*i)-1,0);var r=i-1,s=1;for(this[t+r]=255&e;--r>=0&&(s*=256);)this[t+r]=e/s&255;return t+i},s.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var r=Math.pow(2,8*i-1);E(this,e,t,i,r-1,-r)}var s=0,a=1,o=0;for(this[t]=255&e;++s<i&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+i},s.prototype.writeIntBE=function(e,t,i,n){if(e=+e,t>>>=0,!n){var r=Math.pow(2,8*i-1);E(this,e,t,i,r-1,-r)}var s=i-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||E(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,i){return O(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return O(this,e,t,!1,i)},s.prototype.writeDoubleLE=function(e,t,i){return B(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return B(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&0!==n&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var r=n-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,n);else if(this===e&&i<t&&t<n)for(var a=r-1;a>=0;--a)e[a+t]=this[a+i];else Uint8Array.prototype.set.call(e,this.subarray(i,n),t);return r},s.prototype.fill=function(e,t,i,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var r=e.charCodeAt(0);("utf8"===n&&r<128||"latin1"===n)&&(e=r)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;var a;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(a=t;a<i;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,n),l=o.length;
1if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<i-t;++a)this[a+t]=o[a%l]}return this};var M=/[^+/0-9A-Za-z-_]/g;function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function L(e,t){t=t||1/0;for(var i,n=e.length,r=null,s=[],a=0;a<n;++a){if((i=e.charCodeAt(a))>55295&&i<57344){if(!r){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function F(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(M,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,i,n){for(var r=0;r<n&&!(r+i>=t.length||r>=e.length);++r)t[r+i]=e[r];return r}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}})),ue=b(((e,t)=>{!function(){var e="input is invalid type",i="object"==typeof window,n=i?window:{};n.JS_SHA256_NO_WINDOW&&(i=!1);var r=!i&&"object"==typeof self,s=!n.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&"renderer"!=process.type;s?n=global:r&&(n=self);var a=!n.JS_SHA256_NO_COMMON_JS&&"object"==typeof t&&t.exports,o="function"==typeof define&&define.amd,l=!n.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),d=[-2147483648,8388608,32768,128],u=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=["hex","array","digest","arrayBuffer"],f=[];(n.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),l&&(n.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var m=function(e,t){return function(i){return new w(t,!0).update(i)[e]()}},g=function(e){var t=m("hex",e);s&&(t=b(t,e)),t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var i=0;i<h.length;++i){var n=h[i];t[n]=m(n,e)}return t},b=function(t,i){var r,s=I(),a=de().Buffer,o=i?"sha224":"sha256";r=a.from&&!n.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)};return function(i){if("string"==typeof i)return s.createHash(o).update(i,"utf8").digest("hex");if(null==i)throw new Error(e);return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===a?s.createHash(o).update(r(i)).digest("hex"):t(i)}},y=function(e,t){return function(i,n){return new _(i,t,!0).update(n)[e]()}},v=function(e){var t=y("hex",e);t.create=function(t){return new _(t,e)},t.update=function(e,i){return t.create(e).update(i)};for(var i=0;i<h.length;++i){var n=h[i];t[n]=y(n,e)}return t};function w(e,t){t?(f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function _(t,i,n){var r,s=typeof t;if("string"===s){var a,o=[],c=t.length,d=0;for(r=0;r<c;++r)(a=t.charCodeAt(r))<128?o[d++]=a:a<2048?(o[d++]=192|a>>>6,o[d++]=128|63&a):a<55296||a>=57344?(o[d++]=224|a>>>12,o[d++]=128|a>>>6&63,o[d++]=128|63&a):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++r)),o[d++]=240|a>>>18,o[d++]=128|a>>>12&63,o[d++]=128|a>>>6&63,o[d++]=128|63&a);t=o}else{if("object"!==s)throw new Error(e);
vendor: 5,972 bytes, line 1
1if(null===t)throw new Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(e)}t.length>64&&(t=new w(i,!0).update(t).array());var u=[],p=[];for(r=0;r<64;++r){var h=t[r]||0;u[r]=92^h,p[r]=54^h}w.call(this,i,n),this.update(p),this.oKeyPad=u,this.inner=!0,this.sharedMemory=n}w.prototype.update=function(t){if(!this.finalized){var i,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(e);if(null===t)throw new Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(e);i=!0}for(var r,s,a=0,o=t.length,c=this.blocks;a<o;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),i)for(s=this.start;a<o&&s<64;++a)c[s>>>2]|=t[a]<<u[3&s++];else for(s=this.start;a<o&&s<64;++a)(r=t.charCodeAt(a))<128?c[s>>>2]|=r<<u[3&s++]:r<2048?(c[s>>>2]|=(192|r>>>6)<<u[3&s++],c[s>>>2]|=(128|63&r)<<u[3&s++]):r<55296||r>=57344?(c[s>>>2]|=(224|r>>>12)<<u[3&s++],c[s>>>2]|=(128|r>>>6&63)<<u[3&s++],c[s>>>2]|=(128|63&r)<<u[3&s++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++a)),c[s>>>2]|=(240|r>>>18)<<u[3&s++],c[s>>>2]|=(128|r>>>12&63)<<u[3&s++],c[s>>>2]|=(128|r>>>6&63)<<u[3&s++],c[s>>>2]|=(128|63&r)<<u[3&s++]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=c[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=d[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var e,t,i,n,r,s,a,o,l,c=this.h0,d=this.h1,u=this.h2,h=this.h3,f=this.h4,m=this.h5,g=this.h6,b=this.h7,y=this.blocks;for(e=16;e<64;++e)t=((r=y[e-15])>>>7|r<<25)^(r>>>18|r<<14)^r>>>3,i=((r=y[e-2])>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,y[e]=y[e-16]+t+y[e-7]+i|0;for(l=d&u,e=0;e<64;e+=4)this.first?(this.is224?(s=300032,b=(r=y[0]-1413257819)-150054599|0,h=r+24177077|0):(s=704751109,b=(r=y[0]-210244248)-1521486534|0,h=r+143694565|0),this.first=!1):(t=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),n=(s=c&d)^c&u^l,b=h+(r=b+(i=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&m^~f&g)+p[e]+y[e])|0,h=r+(t+n)|0),t=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(a=h&c)^h&d^s,g=u+(r=g+(i=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&f^~b&m)+p[e+1]+y[e+1])|0,t=((u=r+(t+n)|0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(o=u&h)^u&c^a,m=d+(r=m+(i=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&f)+p[e+2]+y[e+2])|0,t=((d=r+(t+n)|0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),n=(l=d&u)^d&h^o,f=c+(r=f+(i=(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&g^~m&b)+p[e+3]+y[e+3])|0,c=r+(t+n)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+c|0,this.h1=this.h1+d|0,this.h2=this.h2+u|0,this.h3=this.h3+h|0,this.h4=this.h4+f|0,this.h5=this.h5+m|0,this.h6=this.h6+g|0,this.h7=this.h7+b|0},w.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,r=this.h4,s=this.h5,a=this.h6,o=this.h7,l=c[e>>>28&15]+c[e>>>24&15]+c[e>>>20&15]+c[e>>>16&15]+c[e>>>12&15]+c[e>>>8&15]+c[e>>>4&15]+c[15&e]+c[t>>>28&15]+c[t>>>24&15]+c[t>>>20&15]+c[t>>>16&15]+c[t>>>12&15]+c[t>>>8&15]+c[t>>>4&15]+c[15&t]+c[i>>>28&15]+c[i>>>24&15]+c[i>>>20&15]+c[i>>>16&15]+c[i>>>12&15]+c[i>>>8&15]+c[i>>>4&15]+c[15&i]+c[n>>>28&15]+c[n>>>24&15]+c[n>>>20&15]+c[n>>>16&15]+c[n>>>12&15]+c[n>>>8&15]+c[n>>>4&15]+c[15&n]+c[r>>>28&15]+c[r>>>24&15]+c[r>>>20&15]+c[r>>>16&15]+c[r>>>12&15]+c[r>>>8&15]+c[r>>>4&15]+c[15&r]+c[s>>>28&15]+c[s>>>24&15]+c[s>>>20&15]+c[s>>>16&15]+c[s>>>12&15]+c[s>>>8&15]+c[s>>>4&15]+c[15&s]+c[a>>>28&15]+c[a>>>24&15]+c[a>>>20&15]+c[a>>>16&15]+c[a>>>12&15]+c[a>>>8&15]+c[a>>>4&15]+c[15&a];return this.is224||(l+=c[o>>>28&15]+c[o>>>24&15]+c[o>>>20&15]+c[o>>>16&15]+c[o>>>12&15]+c[o>>>8&15]+c[o>>>4&15]+c[15&o]),l},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,r=this.h4,s=this.h5,a=this.h6,o=this.h7,l=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,s>>>24&255,s>>>16&255,s>>>8&255,255&s,a>>>24&255,a>>>16&255,a>>>8&255,255&a];return this.is224||l.push(o>>>24&255,o>>>16&255,o>>>8&255,255&o),l},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},_.prototype=new w,_.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();w.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),w.prototype.finalize.call(this)}};var S=g();S.sha256=S,S.sha224=g(!0),S.sha256.hmac=v(),S.sha224.hmac=v(!0),a?t.exports=S:(n.sha256=S.sha256,n.sha224=S.sha224,o&&define((function(){return S})))}()}));function pe(e,t){return Object.is(e,t)}var he=null,fe=!1,me=1,ge=Symbol("SIGNAL");function be(e){let t=he;return he=e,t}var ye={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ve(e){if(fe)throw new Error("");
1if(null===he)return;he.consumerOnSignalRead(e);let t=he.nextProducerIndex++;if(De(he),t<he.producerNode.length&&he.producerNode[t]!==e&&Ee(he)){Pe(he.producerNode[t],he.producerIndexOfThis[t])}he.producerNode[t]!==e&&(he.producerNode[t]=e,he.producerIndexOfThis[t]=Ee(he)?Te(e,he,t):0),he.producerLastReadVersion[t]=e.version}function we(e){if((!Ee(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==me)){if(!e.producerMustRecompute(e)&&!ke(e))return e.dirty=!1,void(e.lastCleanEpoch=me);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=me}}function _e(e){if(void 0===e.liveConsumerNode)return;let t=fe;fe=!0;try{for(let t of e.liveConsumerNode)t.dirty||Ce(t)}finally{fe=t}}function Se(){return!1!==he?.consumerAllowSignalWrites}function Ce(e){e.dirty=!0,_e(e),e.consumerMarkedDirty?.(e)}function Ie(e){return e&&(e.nextProducerIndex=0),be(e)}function Ae(e,t){if(be(t),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(Ee(e))for(let t=e.nextProducerIndex;t<e.producerNode.length;t++)Pe(e.producerNode[t],e.producerIndexOfThis[t]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function ke(e){De(e);for(let t=0;t<e.producerNode.length;t++){let i=e.producerNode[t],n=e.producerLastReadVersion[t];if(n!==i.version||(we(i),n!==i.version))return!0}return!1}function xe(e){if(De(e),Ee(e))for(let t=0;t<e.producerNode.length;t++)Pe(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}function Te(e,t,i){if(Oe(e),0===e.liveConsumerNode.length&&Be(e))for(let t=0;t<e.producerNode.length;t++)e.producerIndexOfThis[t]=Te(e.producerNode[t],e,t);return e.liveConsumerIndexOfThis.push(i),e.liveConsumerNode.push(t)-1}function Pe(e,t){if(Oe(e),1===e.liveConsumerNode.length&&Be(e))for(let t=0;t<e.producerNode.length;t++)Pe(e.producerNode[t],e.producerIndexOfThis[t]);let i=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[i],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[i],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){let i=e.liveConsumerIndexOfThis[t],n=e.liveConsumerNode[t];De(n),n.producerIndexOfThis[i]=t}}function Ee(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function De(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function Oe(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function Be(e){return void 0!==e.producerNode}var Me=Symbol("UNSET"),Re=Symbol("COMPUTING"),Le=Symbol("ERRORED"),Fe=f(h({},ye),{value:Me,dirty:!0,error:null,equal:pe,producerMustRecompute:e=>e.value===Me||e.value===Re,producerRecomputeValue(e){if(e.value===Re)throw new Error("Detected cycle in computations.");let t=e.value;e.value=Re;let i,n=Ie(e);try{i=e.computation()}catch(t){i=Le,e.error=t}finally{Ae(e,n)}t!==Me&&t!==Le&&i!==Le&&e.equal(t,i)?e.value=t:(e.value=i,e.version++)}});var Ne=function(){throw new Error};function Ue(){Ne()}var Ve=null;function qe(e,t){Se()||Ue(),e.equal(e.value,t)||(e.value=t,function(e){e.version++,me++,_e(e),Ve?.()}(e))}var $e=f(h({},ye),{equal:pe,value:void 0});function je(e){return"function"==typeof e}function ze(e){let t=e((e=>{Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var We=ze((e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map(((e,t)=>`${t+1}) ${e.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t}));function He(e,t){if(e){let i=e.indexOf(t);0<=i&&e.splice(i,1)}}var Ye=class e{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let e of t)e.remove(this);else t.remove(this);let{initialTeardown:i}=this;if(je(i))try{i()}catch(t){e=t instanceof We?t.errors:[t]}let{_finalizers:n}=this;if(n){this._finalizers=null;for(let t of n)try{Qe(t)}catch(t){e=e??[],t instanceof We?e=[...e,...t.errors]:e.push(t)}}if(e)throw new We(e)}}add(t){var i;if(t&&t!==this)if(this.closed)Qe(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(i=this._finalizers)&&void 0!==i?i:[]).push(t)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&He(t,e)}remove(t){let{_finalizers:i}=this;i&&He(i,t),t instanceof e&&t._removeParent(this)}};Ye.EMPTY=(()=>{let e=new Ye;return e.closed=!0,e})();var Ge=Ye.EMPTY;function Ke(e){return e instanceof Ye||e&&"closed"in e&&je(e.remove)&&je(e.add)&&je(e.unsubscribe)}function Qe(e){je(e)?e():e.unsubscribe()}var Je={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNext
1Context:!1},Ze={setTimeout(e,t,...i){let{delegate:n}=Ze;return n?.setTimeout?n.setTimeout(e,t,...i):setTimeout(e,t,...i)},clearTimeout(e){let{delegate:t}=Ze;return(t?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Xe(e){Ze.setTimeout((()=>{let{onUnhandledError:t}=Je;if(!t)throw e;t(e)}))}function et(){}var tt=it("C",void 0,void 0);function it(e,t,i){return{kind:e,value:t,error:i}}var nt=null;function rt(e){if(Je.useDeprecatedSynchronousErrorHandling){let t=!nt;if(t&&(nt={errorThrown:!1,error:null}),e(),t){let{errorThrown:e,error:t}=nt;if(nt=null,e)throw t}}else e()}var st=class extends Ye{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Ke(e)&&e.add(this)):this.destination=pt}static create(e,t,i){return new ct(e,t,i)}next(e){this.isStopped?ut(function(e){return it("N",e,void 0)}(e),this):this._next(e)}error(e){this.isStopped?ut(function(e){return it("E",void 0,e)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?ut(tt,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},at=Function.prototype.bind;function ot(e,t){return at.call(e,t)}var lt=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(e){dt(e)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(e){dt(e)}else dt(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(e){dt(e)}}},ct=class extends st{constructor(e,t,i){let n;if(super(),je(e)||!e)n={next:e??void 0,error:t??void 0,complete:i??void 0};else{let t;this&&Je.useDeprecatedNextContext?(t=Object.create(e),t.unsubscribe=()=>this.unsubscribe(),n={next:e.next&&ot(e.next,t),error:e.error&&ot(e.error,t),complete:e.complete&&ot(e.complete,t)}):n=e}this.destination=new lt(n)}};function dt(e){Je.useDeprecatedSynchronousErrorHandling?function(e){Je.useDeprecatedSynchronousErrorHandling&&nt&&(nt.errorThrown=!0,nt.error=e)}(e):Xe(e)}function ut(e,t){let{onStoppedNotification:i}=Je;i&&Ze.setTimeout((()=>i(e,t)))}var pt={closed:!0,next:et,error:function(e){throw e},complete:et},ht="function"==typeof Symbol&&Symbol.observable||"@@observable";function ft(e){return e}function mt(e){return 0===e.length?ft:1===e.length?e[0]:function(t){return e.reduce(((e,t)=>t(e)),t)}}var gt=(()=>{class e{constructor(e){e&&(this._subscribe=e)}lift(t){let i=new e;return i.source=this,i.operator=t,i}subscribe(e,t,i){let n=function(e){return e&&e instanceof st||function(e){return e&&je(e.next)&&je(e.error)&&je(e.complete)}(e)&&Ke(e)}(e)?e:new ct(e,t,i);return rt((()=>{let{operator:e,source:t}=this;n.add(e?e.call(n,t):t?this._subscribe(n):this._trySubscribe(n))})),n}_trySubscribe(e){try{return this._subscribe(e)}catch(t){e.error(t)}}forEach(e,t){return new(t=bt(t))(((t,i)=>{let n=new ct({next:t=>{try{e(t)}catch(e){i(e),n.unsubscribe()}},error:i,complete:t});this.subscribe(n)}))}_subscribe(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)}[ht](){return this}pipe(...e){return mt(e)(this)}toPromise(e){return new(e=bt(e))(((e,t)=>{let i;this.subscribe((e=>i=e),(e=>t(e)),(()=>e(i)))}))}}return e.create=t=>new e(t),e})();function bt(e){var t;return null!==(t=e??Je.Promise)&&void 0!==t?t:Promise}function yt(e){return je(e?.lift)}function vt(e){return t=>{if(yt(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function wt(e,t,i,n,r){return new _t(e,t,i,n,r)}var _t=class extends st{constructor(e,t,i,n,r,s){super(e),this.onFinalize=r,this.shouldUnsubscribe=s,this._next=t?function(i){try{t(i)}catch(t){e.error(t)}}:super._next,this._error=n?function(t){try{n(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(t){e.error(t)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}};function St(){return vt(((e,t)=>{let i=null;e._refCount++;let n=wt(t,void 0,void 0,void 0,(()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(i=null);let n=e._connection,r=i;i=null,n&&(!r||n===r)&&n.unsubscribe(),t.unsubscribe()}));e.subscribe(n),n.closed||(i=e.connect())}
1))}var Ct=class extends gt{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,yt(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ye;let t=this.getSubject();e.add(this.source.subscribe(wt(t,void 0,(()=>{this._teardown(),t.complete()}),(e=>{this._teardown(),t.error(e)}),(()=>this._teardown())))),e.closed&&(this._connection=null,e=Ye.EMPTY)}return e}refCount(){return St()(this)}},It={schedule(e){let t=requestAnimationFrame,i=cancelAnimationFrame,{delegate:n}=It;n&&(t=n.requestAnimationFrame,i=n.cancelAnimationFrame);let r=t((t=>{i=void 0,e(t)}));return new Ye((()=>i?.(r)))},requestAnimationFrame(...e){let{delegate:t}=It;return(t?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){let{delegate:t}=It;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},At=ze((e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"})),kt=(()=>{class e extends gt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let t=new xt(this,this);return t.operator=e,t}_throwIfClosed(){if(this.closed)throw new At}next(e){rt((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let t of this.currentObservers)t.next(e)}}))}error(e){rt((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:t}=this;for(;t.length;)t.shift().error(e)}}))}complete(){rt((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:t,isStopped:i,observers:n}=this;return t||i?Ge:(this.currentObservers=null,n.push(e),new Ye((()=>{this.currentObservers=null,He(n,e)})))}_checkFinalizedStatuses(e){let{hasError:t,thrownError:i,isStopped:n}=this;t?e.error(i):n&&e.complete()}asObservable(){let e=new gt;return e.source=this,e}}return e.create=(e,t)=>new xt(e,t),e})(),xt=class extends kt{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)}error(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)}complete(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)}_subscribe(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:Ge}},Tt=class extends kt{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}},Pt={now:()=>(Pt.delegate||Date).now(),delegate:void 0},Et=class extends kt{constructor(e=1/0,t=1/0,i=Pt){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:i,_infiniteTimeWindow:n,_timestampProvider:r,_windowTime:s}=this;t||(i.push(e),!n&&i.push(r.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:i,_buffer:n}
1=this,r=n.slice();for(let t=0;t<r.length&&!e.closed;t+=i?1:2)e.next(r[t]);return this._checkFinalizedStatuses(e),t}_trimBuffer(){let{_bufferSize:e,_timestampProvider:t,_buffer:i,_infiniteTimeWindow:n}=this,r=(n?1:2)*e;if(e<1/0&&r<i.length&&i.splice(0,i.length-r),!n){let e=t.now(),n=0;for(let t=1;t<i.length&&i[t]<=e;t+=2)n=t;n&&i.splice(0,n+1)}}},Dt=class extends Ye{constructor(e,t){super()}schedule(e,t=0){return this}},Ot={setInterval(e,t,...i){let{delegate:n}=Ot;return n?.setInterval?n.setInterval(e,t,...i):setInterval(e,t,...i)},clearInterval(e){let{delegate:t}=Ot;return(t?.clearInterval||clearInterval)(e)},delegate:void 0},Bt=class extends Dt{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){var i;if(this.closed)return this;this.state=e;let n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,i=0){return Ot.setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return t;null!=t&&Ot.clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(e,t);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i,n=!1;try{this.work(e)}catch(e){n=!0,i=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i}unsubscribe(){if(!this.closed){let{id:e,scheduler:t}=this,{actions:i}=t;this.work=this.state=this.scheduler=null,this.pending=!1,He(i,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,super.unsubscribe()}}},Mt=class e{constructor(t,i=e.now){this.schedulerActionCtor=t,this.now=i}schedule(e,t=0,i){return new this.schedulerActionCtor(this,e).schedule(i,t)}};Mt.now=Pt.now;var Rt=class extends Mt{constructor(e,t=Mt.now){super(e,t),this.actions=[],this._active=!1}flush(e){let t,{actions:i}=this;if(this._active)i.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=i.shift());if(this._active=!1,t){for(;e=i.shift();)e.unsubscribe();throw t}}}},Lt=new Rt(Bt),Ft=Lt,Nt=new class extends Rt{}(class extends Bt{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,i=0){return null!=i&&i>0||null==i&&this.delay>0?super.requestAsyncId(e,t,i):(e.flush(this),0)}}),Ut=new class extends Rt{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let i,{actions:n}=this;e=e||n.shift();do{if(i=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,i){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw i}}}(class extends Bt{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return null!==i&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e._scheduled||(e._scheduled=It.requestAnimationFrame((()=>e.flush(void 0)))))}recycleAsyncId(e,t,i=0){var n;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(e,t,i);let{actions:r}=e;null!=t&&(null===(n=r[r.length-1])||void 0===n?void 0:n.id)!==t&&(It.cancelAnimationFrame(t),e._scheduled=void 0)}}),Vt=new gt((e=>e.complete()));function qt(e){return e&&je(e.schedule)}function $t(e){return e[e.length-1]}function jt(e){return je($t(e))?e.pop():void 0}function zt(e){return qt($t(e))?e.pop():void 0}function Wt(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Ht(e,t,i,n){return new(i||(i=Promise))((function(r,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){e.done?r(e.value):function(e){return e instanceof i?e:new i((function(t){t(e)}))}(e.value).then(a,o)}l((n=n.apply(e,t||[])).next())}))}function Yt(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gt(e){return this instanceof Gt?(this.v=e,this):new Gt(e)}function Kt(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=i.apply(e,t||[]),s=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),n[Symbol.asyncIterator]=function(){return this},n;function a(e,t){r[e]&&(n[e]=function(t){return new Promise((function(i,n){s.push([e,t,i,n])>1||o(e,t)}))},t&&(n[e]=t(n[e])))}function o(e,t){try{!function(e){e.value instanceof Gt?Promise.resolve(e.value.v).then(l,c):d(s[0][2],e)}(r[e](t))}catch(e){d(s[0][3],e)}}function l(e){o("next",e)}function c(e){o("throw",e)}function d(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function Qt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=Yt(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,r,(t=e[i](t)).done,t.value)}))}}}var Jt=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function Zt(e){return je(e?.then)}function Xt(e){return je(e[ht])}function ei(e){return Symbol.asyncIterator&&je(e?.[Symbol.asyncIterator])}function ti(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}var ii="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ni(e){return je(e?.[ii])}function ri(e){return Kt(this,arguments,(function*(){let t=e.getReader();try{for(;;){let{value:e,done:i}=yield Gt(t.read());if(i)return yield Gt(void 0);yield yield Gt(e)}}finally{t.releaseLock()}}))}function si(e){return je(e?.getReader)}function ai(e){if(e instanceof gt)return e;if(null!=e){if(Xt(e))return function(e){return new gt((t=>{let i=e[ht]();if(je(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}(e);if(Jt(e))return function(e){return new gt((t=>{for(let i=0;i<e.length&&!t.closed;i++)t.next(e[i]);t.complete()}))}(e);if(Zt(e))return function(e){return new gt((t=>{e.then((e=>{t.closed||(t.next(e),t.complete())}),(e=>t.error(e))).then(null,Xe)}))}(e);if(ei(e))return oi(e);if(ni(e))return function(e){return new gt((t=>{for(let i of e)if(t.next(i),t.closed)return;t.complete()}))}(e);if(si(e))return function(e){return oi(ri(e))}(e)}throw ti(e)}function oi(e){return new gt((t=>{(function(e,t){var i,n,r,s;return Ht(this,void 0,void 0,(function*(){try{for(i=Qt(e);!(n=yield i.next()).done;){let e=n.value;if(t.next(e),t.closed)return}}catch(e){r={error:e}}finally{try{n&&!n.done&&(s=i.return)&&(yield s.call(i))}finally{if(r)throw r.error}}t.complete()}))})(e,t).catch((e=>t.error(e)))}))}function li(e,t,i,n=0,r=!1){let s=t.schedule((function(){i(),r?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(s),!r)return s}function ci(e,t=0){return vt(((i,n)=>{i.subscribe(wt(n,(i=>li(n,e,(()=>n.next(i)),t)),(()=>li(n,e,(()=>n.complete()),t)),(i=>li(n,e,(()=>n.error(i)),t))))}))}function di(e,t=0){return vt(((i,n)=>{n.add(e.schedule((()=>i.subscribe(n)),t))}))}function ui(e,t){if(!e)throw new Error("Iterable cannot be null");return new gt((i=>{li(i,t,(()=>{let n=e[Symbol.asyncIterator]();li(i,t,(()=>{n.next().then((e=>{e.done?i.complete():i.next(e.value)}))}),0,!0)}))}))}function pi(e,t){if(null!=e){if(Xt(e))return function(e,t){return ai(e).pipe(di(t),ci(t))}(e,t);if(Jt(e))return function(e,t){return new gt((i=>{let n=0;return t.schedule((function(){n===e.length?i.complete():(i.next(e[n++]),i.closed||this.schedule())}))}))}(e,t);if(Zt(e))return function(e,t){return ai(e).pipe(di(t),ci(t))}(e,t);if(ei(e))return ui(e,t);if(ni(e))return function(e,t){return new gt((i=>{let n;return li(i,t,(()=>{n=e[ii](),li(i,t,(()=>{let e,t;try{({value:e,done:t}=n.next())}catch(e){return void i.error(e)}t?i.complete():i.next(e)}),0,!0)}
1)),()=>je(n?.return)&&n.return()}))}(e,t);if(si(e))return function(e,t){return ui(ri(e),t)}(e,t)}throw ti(e)}function hi(e,t){return t?pi(e,t):ai(e)}function fi(...e){return hi(e,zt(e))}function mi(e,t){let i=je(e)?e:()=>e,n=e=>e.error(i());return new gt(t?e=>t.schedule(n,0,e):n)}var gi=ze((e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}));function bi(e,t){return vt(((i,n)=>{let r=0;i.subscribe(wt(n,(i=>{n.next(e.call(t,i,r++))})))}))}var{isArray:yi}=Array;function vi(e){return bi((t=>function(e,t){return yi(t)?e(...t):e(t)}(e,t)))}var{isArray:wi}=Array,{getPrototypeOf:_i,prototype:Si,keys:Ci}=Object;function Ii(e){if(1===e.length){let t=e[0];if(wi(t))return{args:t,keys:null};if(function(e){return e&&"object"==typeof e&&_i(e)===Si}(t)){let e=Ci(t);return{args:e.map((e=>t[e])),keys:e}}}return{args:e,keys:null}}function Ai(e,t){return e.reduce(((e,i,n)=>(e[i]=t[n],e)),{})}function ki(...e){let t=zt(e),i=jt(e),{args:n,keys:r}=Ii(e);if(0===n.length)return hi([],t);let s=new gt(function(e,t,i=ft){return n=>{xi(t,(()=>{let{length:r}=e,s=new Array(r),a=r,o=r;for(let l=0;l<r;l++)xi(t,(()=>{let r=hi(e[l],t),c=!1;r.subscribe(wt(n,(e=>{s[l]=e,c||(c=!0,o--),o||n.next(i(s.slice()))}),(()=>{--a||n.complete()})))}),n)}),n)}}(n,t,r?e=>Ai(r,e):ft));return i?s.pipe(vi(i)):s}function xi(e,t,i){e?li(i,e,t):t()}function Ti(e,t,i=1/0){return je(t)?Ti(((i,n)=>bi(((e,r)=>t(i,e,n,r)))(ai(e(i,n)))),i):("number"==typeof t&&(i=t),vt(((t,n)=>function(e,t,i,n,r,s,a,o){let l=[],c=0,d=0,u=!1,p=()=>{u&&!l.length&&!c&&t.complete()},h=e=>c<n?f(e):l.push(e),f=e=>{s&&t.next(e),c++;let o=!1;ai(i(e,d++)).subscribe(wt(t,(e=>{r?.(e),s?h(e):t.next(e)}),(()=>{o=!0}),void 0,(()=>{if(o)try{for(c--;l.length&&c<n;){let e=l.shift();a?li(t,a,(()=>f(e))):f(e)}p()}catch(e){t.error(e)}})))};return e.subscribe(wt(t,h,(()=>{u=!0,p()}))),()=>{o?.()}}(t,n,e,i))))}function Pi(e=1/0){return Ti(ft,e)}function Ei(...e){return Pi(1)(hi(e,zt(e)))}function Di(e){return new gt((t=>{ai(e()).subscribe(t)}))}function Oi(...e){let t=jt(e),{args:i,keys:n}=Ii(e),r=new gt((e=>{let{length:t}=i;if(!t)return void e.complete();let r=new Array(t),s=t,a=t;for(let o=0;o<t;o++){let t=!1;ai(i[o]).subscribe(wt(e,(e=>{t||(t=!0,a--),r[o]=e}),(()=>s--),void 0,(()=>{(!s||!t)&&(a||e.next(n?Ai(n,r):r),e.complete())})))}}));return t?r.pipe(vi(t)):r}var Bi=["addListener","removeListener"],Mi=["addEventListener","removeEventListener"],Ri=["on","off"];function Li(e,t,i,n){if(je(i)&&(n=i,i=void 0),n)return Li(e,t,i).pipe(vi(n));let[r,s]=function(e){return je(e.addEventListener)&&je(e.removeEventListener)}(e)?Mi.map((n=>r=>e[n](t,r,i))):function(e){return je(e.addListener)&&je(e.removeListener)}(e)?Bi.map(Fi(e,t)):function(e){return je(e.on)&&je(e.off)}(e)?Ri.map(Fi(e,t)):[];if(!r&&Jt(e))return Ti((e=>Li(e,t,i)))(ai(e));if(!r)throw new TypeError("Invalid event target");return new gt((e=>{let t=(...t)=>e.next(1<t.length?t:t[0]);return r(t),()=>s(t)}))}function Fi(e,t){return i=>n=>e[i](t,n)}function Ni(e=0,t,i=Ft){let n=-1;return null!=t&&(qt(t)?i=t:n=t),new gt((t=>{let r=function(e){return e instanceof Date&&!isNaN(e)}(e)?+e-i.now():e;r<0&&(r=0);let s=0;return i.schedule((function(){t.closed||(t.next(s++),0<=n?this.schedule(void 0,n):t.complete())}),r)}))}function Ui(e=0,t=Lt){return e<0&&(e=0),Ni(e,e,t)}function Vi(...e){let t=zt(e),i=function(e,t){return"number"==typeof $t(e)?e.pop():t}(e,1/0),n=e;return n.length?1===n.length?ai(n[0]):Pi(i)(hi(n,t)):Vt}function qi(e,t){return vt(((i,n)=>{let r=0;i.subscribe(wt(n,(i=>e.call(t,i,r++)&&n.next(i))))}))}function $i(e){return vt(((t,i)=>{let n,r=null,s=!1;r=t.subscribe(wt(i,void 0,void 0,(a=>{n=ai(e(a,$i(e)(t))),r?(r.unsubscribe(),r=null,n.subscribe(i)):s=!0}))),s&&(r.unsubscribe(),r=null,n.subscribe(i))}))}function ji(e,t){return je(t)?Ti(e,t,1):Ti(e,1)}function zi(e,t=Lt){return vt(((i,n)=>{let r=null,s=null,a=null,o=()=>{if(r){r.unsubscribe(),r=null;let e=s;s=null,n.next(e)}};function l(){let i=a+e,s=t.now();if(s<i)return r=this.schedule(void 0,i-s),void n.add(r);o()}i.subscribe(wt(n,(i=>{s=i,a=t.now(),r||(r=t.schedule(l,e),n.add(r))}),(()=>{o(),n.complete()}),void 0,(()=>{s=r=null})))}))}function Wi(e){return vt(((t,i)=>{let n=!1;t.subscribe(wt(i,(e=>{n=!0,i.next(e)}),(()=>
1{n||i.next(e),i.complete()})))}))}function Hi(e){return e<=0?()=>Vt:vt(((t,i)=>{let n=0;t.subscribe(wt(i,(t=>{++n<=e&&(i.next(t),e<=n&&i.complete())})))}))}function Yi(e){return bi((()=>e))}function Gi(e,t){return t?i=>Ei(t.pipe(Hi(1),vt(((e,t)=>{e.subscribe(wt(t,et))}))),i.pipe(Gi(e))):Ti(((t,i)=>ai(e(t,i)).pipe(Hi(1),Yi(t))))}function Ki(e,t=Lt){let i=Ni(e,t);return Gi((()=>i))}function Qi(e,t){return vt(((i,n)=>{let r=new Set;i.subscribe(wt(n,(t=>{let i=e?e(t):t;r.has(i)||(r.add(i),n.next(t))}))),t&&ai(t).subscribe(wt(n,(()=>r.clear()),et))}))}function Ji(e,t=ft){return e=e??Zi,vt(((i,n)=>{let r,s=!0;i.subscribe(wt(n,(i=>{let a=t(i);(s||!e(r,a))&&(s=!1,r=a,n.next(i))})))}))}function Zi(e,t){return e===t}function Xi(e=en){return vt(((t,i)=>{let n=!1;t.subscribe(wt(i,(e=>{n=!0,i.next(e)}),(()=>n?i.complete():i.error(e()))))}))}function en(){return new gi}function tn(e){return vt(((t,i)=>{try{t.subscribe(i)}finally{i.add(e)}}))}function nn(e,t){let i=arguments.length>=2;return n=>n.pipe(e?qi(((t,i)=>e(t,i,n))):ft,Hi(1),i?Wi(t):Xi((()=>new gi)))}function rn(e){return e<=0?()=>Vt:vt(((t,i)=>{let n=[];t.subscribe(wt(i,(t=>{n.push(t),e<n.length&&n.shift()}),(()=>{for(let e of n)i.next(e);i.complete()}),void 0,(()=>{n=null})))}))}function sn(e=1/0){let t;t=e&&"object"==typeof e?e:{count:e};let{count:i=1/0,delay:n,resetOnSuccess:r=!1}=t;return i<=0?ft:vt(((e,t)=>{let s,a=0,o=()=>{let l=!1;s=e.subscribe(wt(t,(e=>{r&&(a=0),t.next(e)}),void 0,(e=>{if(a++<i){let i=()=>{s?(s.unsubscribe(),s=null,o()):l=!0};if(null!=n){let r="number"==typeof n?Ni(n):ai(n(e,a)),s=wt(t,(()=>{s.unsubscribe(),i()}),(()=>{t.complete()}));r.subscribe(s)}else i()}else t.error(e)}))),l&&(s.unsubscribe(),s=null,o())};o()}))}function an(e,t){return vt(function(e,t,i,n,r){return(s,a)=>{let o=i,l=t,c=0;s.subscribe(wt(a,(t=>{let i=c++;l=o?e(l,t,i):(o=!0,t),n&&a.next(l)}),r&&(()=>{o&&a.next(l),a.complete()})))}}(e,t,arguments.length>=2,!0))}function on(e,t,...i){if(!0===t)return void e();if(!1===t)return;let n=new ct({next:()=>{n.unsubscribe(),e()}});return ai(t(...i)).subscribe(n)}function ln(e,t,i){let n,r=!1;return e&&"object"==typeof e?({bufferSize:n=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:i}=e):n=e??1/0,function(e={}){let{connector:t=()=>new kt,resetOnError:i=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=e;return e=>{let s,a,o,l=0,c=!1,d=!1,u=()=>{a?.unsubscribe(),a=void 0},p=()=>{u(),s=o=void 0,c=d=!1},h=()=>{let e=s;p(),e?.unsubscribe()};return vt(((e,f)=>{l++,!d&&!c&&u();let m=o=o??t();f.add((()=>{l--,0===l&&!d&&!c&&(a=on(h,r))})),m.subscribe(f),!s&&l>0&&(s=new ct({next:e=>m.next(e),error:e=>{d=!0,u(),a=on(p,i,e),m.error(e)},complete:()=>{c=!0,u(),a=on(p,n),m.complete()}}),ai(e).subscribe(s))}))(e)}}({connector:()=>new Et(n,t,i),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function cn(...e){let t=zt(e);return vt(((i,n)=>{(t?Ei(e,i,t):Ei(e,i)).subscribe(n)}))}function dn(e,t){return vt(((i,n)=>{let r=null,s=0,a=!1,o=()=>a&&!r&&n.complete();i.subscribe(wt(n,(i=>{r?.unsubscribe();let a=0,l=s++;ai(e(i,l)).subscribe(r=wt(n,(e=>n.next(t?t(i,e,l,a++):e)),(()=>{r=null,o()})))}),(()=>{a=!0,o()})))}))}function un(e){return vt(((t,i)=>{ai(e).subscribe(wt(i,(()=>i.complete()),et)),!i.closed&&t.subscribe(i)}))}function pn(e,t=!1){return vt(((i,n)=>{let r=0;i.subscribe(wt(n,(i=>{let s=e(i,r++);(s||t)&&n.next(i),!s&&n.complete()})))}))}function hn(e,t,i){let n=je(e)||t||i?{next:e,error:t,complete:i}:e;return n?vt(((e,t)=>{var i;null===(i=n.subscribe)||void 0===i||i.call(n);let r=!0;e.subscribe(wt(t,(e=>{var i;null===(i=n.next)||void 0===i||i.call(n,e),t.next(e)}),(()=>{var e;r=!1,null===(e=n.complete)||void 0===e||e.call(n),t.complete()}),(e=>{var i;r=!1,null===(i=n.error)||void 0===i||i.call(n,e),t.error(e)}),(()=>{var e,t;r&&(null===(e=n.unsubscribe)||void 0===e||e.call(n)),null===(t=n.finalize)||void 0===t||t.call(n)})))})):ft}var fn="https://g.co/ng/security#xss",mn=class extends Error{constructor(e,t){super(function(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(e,t)),this.code=e}};function gn(e){return{toString:e}.toString()}var bn="__parameters__";function yn(e,t,i){return gn((()=>{let n=function(e){return function(...t){if(e){let i=e(...t);for(let e in i)this[e]=i[e]}}}(t);function r(...e){if(this instanceof r)return n.apply(this,e),this;let t=new r(...e);return i.annotation=t,i;function i(e,i,n){let r=e.hasOwnProperty(bn)?e[bn]:Object.defineProperty(e,bn,{value:[]})[bn];for(;r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(t),e}}return i&&(r.prototype=Object.create(i.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r}))}var vn=globalThis;function wn(e){for(let t in e)if(e[t]===wn)return t;throw Error("Could not find renamed property on target object.")}function _n(e,t){for(let i in t)t.hasOwnProperty(i)&&!e.hasOwnProperty(i)&&(e[i]=t[i])}function Sn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(Sn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;let t=e.toString();if(null==t)return""+t;let i=t.indexOf("\n");return-1===i?t:t.substring(0,i)}function Cn(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}var In=wn({__forward_ref__:wn}
1);function An(e){return e.__forward_ref__=An,e.toString=function(){return Sn(this())},e}function kn(e){return xn(e)?e():e}function xn(e){return"function"==typeof e&&e.hasOwnProperty(In)&&e.__forward_ref__===An}function Tn(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Pn(e){return{providers:e.providers||[],imports:e.imports||[]}}function En(e){return Dn(e,Bn)||Dn(e,Rn)}function Dn(e,t){return e.hasOwnProperty(t)?e[t]:null}function On(e){return e&&(e.hasOwnProperty(Mn)||e.hasOwnProperty(Ln))?e[Mn]:null}var Bn=wn({"ɵprov":wn}),Mn=wn({"ɵinj":wn}),Rn=wn({ngInjectableDef:wn}),Ln=wn({ngInjectorDef:wn}),Fn=class{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ɵprov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.ɵprov=Tn({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Nn(e){return e&&!!e.ɵproviders}var Un=wn({"ɵcmp":wn}),Vn=wn({"ɵdir":wn}),qn=wn({"ɵpipe":wn}),$n=wn({"ɵmod":wn}),jn=wn({"ɵfac":wn}),zn=wn({__NG_ELEMENT_ID__:wn}),Wn=wn({__NG_ENV_ID__:wn});function Hn(e){return"string"==typeof e?e:null==e?"":String(e)}function Yn(e,t){throw new mn(-201,!1)}var Gn,Kn=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Kn||{});function Qn(){return Gn}function Jn(e){let t=Gn;return Gn=e,t}function Zn(e,t,i){let n=En(e);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:i&Kn.Optional?null:void 0!==t?t:void Yn()}var Xn,er={},tr="__NG_DI_FLAG__",ir="ngTempTokenPath",nr=/\n/gm,rr="ɵ",sr="__source";function ar(e){let t=Xn;return Xn=e,t}function or(e,t=Kn.Default){if(void 0===Xn)throw new mn(-203,!1);return null===Xn?Zn(e,void 0,t):Xn.get(e,t&Kn.Optional?null:void 0,t)}function lr(e,t=Kn.Default){return(Qn()||or)(kn(e),t)}function cr(e,t=Kn.Default){return lr(e,dr(t))}function dr(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function ur(e){let t=[];for(let i=0;i<e.length;i++){let n=kn(e[i]);if(Array.isArray(n)){if(0===n.length)throw new mn(900,!1);let e,i=Kn.Default;for(let t=0;t<n.length;t++){let r=n[t],s=hr(r);"number"==typeof s?-1===s?e=r.token:i|=s:e=r}t.push(lr(e,i))}else t.push(lr(n))}return t}function pr(e,t){return e[tr]=t,e.prototype[tr]=t,e}function hr(e){return e[tr]}function fr(e,t,i,n){let r=e[ir];throw t[sr]&&r.unshift(t[sr]),e.message=function(e,t,i,n=null){e=e&&"\n"===e.charAt(0)&&e.charAt(1)==rr?e.slice(2):e;let r=Sn(t);if(Array.isArray(t))r=t.map(Sn).join(" -> ");else if("object"==typeof t){let e=[];for(let i in t)if(t.hasOwnProperty(i)){let n=t[i];e.push(i+":"+("string"==typeof n?JSON.stringify(n):Sn(n)))}r=`{${e.join(", ")}}`}return`${i}${n?"("+n+")":""}[${r}]: ${e.replace(nr,"\n ")}`}("\n"+e.message,r,i,n),e.ngTokenPath=r,e[ir]=null,e}var mr=pr(yn("Optional"),8),gr=pr(yn("SkipSelf"),4);function br(e,t){return e.hasOwnProperty(jn)?e[jn]:null}function yr(e,t){e.forEach((e=>Array.isArray(e)?yr(e,t):t(e)))}function vr(e,t,i){t>=e.length?e.push(i):e.splice(t,0,i)}function wr(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function _r(e,t,i){let n=Cr(e,t);return n>=0?e[1|n]=i:(n=~n,function(e,t,i,n){let r=e.length;if(r==t)e.push(i,n);else if(1===r)e.push(n,e[0]),e[0]=i;else{for(r--,e.push(e[r-1],e[r]);r>t;){let t=r-2;e[r]=e[t],r--}e[t]=i,e[t+1]=n}}(e,n,t,i)),n}function Sr(e,t){let i=Cr(e,t);if(i>=0)return e[1|i]}function Cr(e,t){return function(e,t,i){let n=0,r=e.length>>i;for(;r!==n;){let s=n+(r-n>>1),a=e[s<<i];if(t===a)return s<<i;a>t?r=s:n=s+1}return~(r<<i)}(e,t,1)}var Ir={},Ar=[],kr=new Fn(""),xr=new Fn("",-1),Tr=new Fn(""),Pr=class{get(e,t=er){if(t===er){let t=new Error(`NullInjectorError: No provider for ${Sn(e)}!`);throw t.name="NullInjectorError",t}return t}},Er=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(Er||{}),Dr=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Dr||{}),Or=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(Or||{});function Br(e,t,i){let n=e.length;for(;;){let r=e.indexOf(t,i);if(-1===r)return r;if(0===r||e.charCodeAt(r-1)<=32){let i=t.length;if(r+i===n||e.charCodeAt(r+i)<=32)return r}i=r+1}}function Mr(e,t,i){let n=0;for(;n<i.length;){let r=i[n];if("number"==typeof r){if(0!==r)break;n++;let s=i[n++],a=i[n++],o=i[n++];e.setAttribute(t,a,o,s)}else{let s=r,a=i[++n];Lr(s)?e.setProperty(t,s,a):e.setAttribute(t,s,a),n++}}return n}function Rr(e){return 3===e||4===e||6===e}function Lr(e){return 64===e.charCodeAt(0)}function Fr(e,t){if(null!==t&&0!==t.length)if(null===e||0===e.length)e=t.slice();else{let i=-1;for(let n=0;n<t.length;n++){let r=t[n];"number"==typeof r?i=r:0===i||Nr(e,i,r,null,-1===i||2===i?t[++n]:null)}}return e}function Nr(e,t,i,n,r){let s=0,a=e.length;if(-1===t)a=-1;else for(;s<e.length;){let i=e[s++];if("number"==typeof i){if(i===t){a=-1;break}if(i>t){a=s-1;break}}}for(;s<e.length;){let t=e[s];if("number"==typeof t)break;if(t===i){if(null===n)return void(null!==r&&(e[s+1]=r));if(n===e[s+1])return void(e[s+2]=r)}s++,null!==n&&s++,null!==r&&s++}-1!==a&&(e.splice(a,0,t),s=a+1),e.splice(s++,0,i),null!==n&&e.splice(s++,0,n),null!==r&&e.splice(s++,0,r)}var Ur="ng-template";function Vr(e,t,i,n){let r=0;if(n){for(;r<t.length&&"string"==typeof t[r];r+=2)if("class"===t[r]&&-1!==Br(t[r+1].toLowerCase(),i,0))return!0}else if(qr(e))return!1;if(r=t.indexOf(1,r),r>-1){let e;for(;++r<t.length&&"string"==typeof(e=t[r]);)if(e.toLowerCase()===i)return!0}return!1}function qr(e){return 4===e.type&&e.value!==Ur}function $r(e,t,i){return t===(4!==e.type||i?e.value:Ur)}function jr(e,t,i){let n=4,r=e.attrs,s=null!==r?function(e){for(let t=0;t<e.length;t++){if(Rr(e[t]))return t}return e.length}(r):0,a=!1;for(let o=0;o<t.length;o++){let l=t[o];if("number"!=typeof l){if(!a)if(4&n){if(n=2|1&n,""!==l&&!$r(e,l,i)||""===l&&1===t.length){if(zr(n))return!1;a=!0}}else if(8&n){if(null===r||!Vr(e,r,l,i)){if(zr(n))return!1;a=!0}}else{let c=t[++o],d=Wr(l,r,qr(e),i);if(-1===d){if(zr(n))return!1;a=!0;continue}if(""!==c){let e;if(e=d>s?"":r[d+1].toLowerCase(),2&n&&c!==e){if(zr(n))return!1;a=!0}}}}else{if(!a&&!zr(n)&&!zr(l))return!1;if(a&&zr(l))continue;a=!1,n=l|1&n}}return zr(n)||a}function zr(e){return!(1&e)}function Wr(e,t,i,n){if(null===t)return-1;let r=0;if(n||!i){let i=!1;for(;r<t.length;){let n=t[r];
1if(n===e)return r;if(3===n||6===n)i=!0;else{if(1===n||2===n){let e=t[++r];for(;"string"==typeof e;)e=t[++r];continue}if(4===n)break;if(0===n){r+=4;continue}}r+=i?1:2}return-1}return function(e,t){let i=e.indexOf(4);if(i>-1)for(i++;i<e.length;){let n=e[i];if("number"==typeof n)return-1;if(n===t)return i;i++}return-1}(t,e)}function Hr(e,t,i=!1){for(let n=0;n<t.length;n++)if(jr(e,t[n],i))return!0;return!1}function Yr(e,t){e:for(let i=0;i<t.length;i++){let n=t[i];if(e.length===n.length){for(let t=0;t<e.length;t++)if(e[t]!==n[t])continue e;return!0}}return!1}function Gr(e,t){return e?":not("+t.trim()+")":t}function Kr(e){let t=e[0],i=1,n=2,r="",s=!1;for(;i<e.length;){let a=e[i];if("string"==typeof a)if(2&n){let t=e[++i];r+="["+a+(t.length>0?'="'+t+'"':"")+"]"}else 8&n?r+="."+a:4&n&&(r+=" "+a);else""!==r&&!zr(a)&&(t+=Gr(s,r),r=""),n=a,s=s||!zr(n);i++}return""!==r&&(t+=Gr(s,r)),t}function Qr(e){return gn((()=>{let t=os(e),i=f(h({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Er.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||Dr.Emulated,styles:e.styles||Ar,_:null,schemas:e.schemas||null,tView:null,id:""});ls(i);let n=e.dependencies;return i.directiveDefs=cs(n,!1),i.pipeDefs=cs(n,!0),i.id=function(e){let t=0,i=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(let e of i)t=Math.imul(31,t)+e.charCodeAt(0)|0;return t+=2147483648,"c"+t}(i),i}))}function Jr(e){return ns(e)||rs(e)}function Zr(e){return null!==e}function Xr(e){return gn((()=>({type:e.type,bootstrap:e.bootstrap||Ar,declarations:e.declarations||Ar,imports:e.imports||Ar,exports:e.exports||Ar,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null})))}function es(e,t){if(null==e)return Ir;let i={};for(let n in e)if(e.hasOwnProperty(n)){let r,s,a=e[n],o=Or.None;Array.isArray(a)?(o=a[0],r=a[1],s=a[2]??r):(r=a,s=a),t?(i[r]=o!==Or.None?[n,o]:n,t[r]=s):i[r]=n}return i}function ts(e){return gn((()=>
1{let t=os(e);return ls(t),t}))}function is(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function ns(e){return e[Un]||null}function rs(e){return e[Vn]||null}function ss(e){return e[qn]||null}function as(e,t){let i=e[$n]||null;if(!i&&!0===t)throw new Error(`Type ${Sn(e)} does not have 'ɵmod' property.`);return i}function os(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Ir,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Ar,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:es(e.inputs,t),outputs:es(e.outputs),debugInfo:null}}function ls(e){e.features?.forEach((t=>t(e)))}function cs(e,t){if(!e)return null;let i=t?ss:Jr;return()=>("function"==typeof e?e():e).map((e=>i(e))).filter(Zr)}function ds(...e){return{"ɵproviders":us(!0,e),"ɵfromNgModule":!0}}function us(e,...t){let i,n=[],r=new Set,s=e=>{n.push(e)};return yr(t,(e=>{let t=e;hs(t,s,[],r)&&(i||=[],i.push(t))})),void 0!==i&&ps(i,s),n}function ps(e,t){for(let i=0;i<e.length;i++){let{ngModule:n,providers:r}=e[i];fs(r,(e=>{t(e,n)}))}}function hs(e,t,i,n){if(!(e=kn(e)))return!1;let r=null,s=On(e),a=!s&&ns(e);if(s||a){if(a&&!a.standalone)return!1;r=e}else{let t=e.ngModule;if(s=On(t),!s)return!1;r=t}let o=n.has(r);if(a){if(o)return!1;if(n.add(r),a.dependencies){let e="function"==typeof a.dependencies?a.dependencies():a.dependencies;for(let r of e)hs(r,t,i,n)}}else{if(!s)return!1;{if(null!=s.imports&&!o){let e;n.add(r);try{yr(s.imports,(r=>{hs(r,t,i,n)&&(e||=[],e.push(r))}))}finally{}void 0!==e&&ps(e,t)}if(!o){let e=br(r)||(()=>new r);t({provide:r,useFactory:e,deps:Ar},r),t({provide:Tr,useValue:r,multi:!0},r),t({provide:kr,useValue:()=>lr(r),multi:!0},r)}let a=s.providers;if(null!=a&&!o){let i=e;fs(a,(e=>{t(e,i)}))}}}return r!==e&&void 0!==e.providers}function fs(e,t){for(let i of e)Nn(i)&&(i=i.ɵproviders),Array.isArray(i)?fs(i,t):t(i)}var ms=wn({provide:String,useValue:wn});function gs(e){return null!==e&&"object"==typeof e&&ms in e}function bs(e){return"function"==typeof e}var ys,vs=new Fn(""),ws={},_s={};function Ss(){return void 0===ys&&(ys=new Pr),ys}var Cs=class{},Is=class extends Cs{get destroyed(){return this._destroyed}constructor(e,t,i,n){super(),this.parent=t,this.source=i,this.scopes=n,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Ts(e,(e=>this.processProvider(e))),this.records.set(xr,xs(void 0,this)),n.has("environment")&&this.records.set(Cs,xs(void 0,this));let r=this.records.get(vs);null!=r&&"string"==typeof r.value&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(Tr,Ar,Kn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=be(null);try{for(let e of this._ngOnDestroyHooks)e.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let t of e)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),be(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let t=ar(this),i=Jn(void 0);try{return e()}finally{ar(t),Jn(i)}}get(e,t=er,i=Kn.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(Wn))return e[Wn](this);i=dr(i);let n=ar(this),r=Jn(void 0);try{if(!(i&Kn.SkipSelf)){let t=this.records.get(e);if(void 0===t){let i=function(e){return"function"==typeof e||"object"==typeof e&&e instanceof Fn}(e)&&En(e);t=i&&this.injectableDefInScope(i)?xs(As(e),ws):null,this.records.set(e,t)}if(null!=t)return this.hydrate(e,t)}let n=i&Kn.Self?Ss():this.parent;return t=i&Kn.Optional&&t===er?null:t,n.get(e,t)}catch(t){if("NullInjectorError"===t.name){if((t[ir]=t[ir]||[]).unshift(Sn(e)),n)throw t;return fr(t,e,"R3InjectorError",this.source)}throw t}finally{Jn(r),ar(n)}}
1resolveInjectorInitializers(){let e=be(null),t=ar(this),i=Jn(void 0);try{let e=this.get(kr,Ar,Kn.Self);for(let t of e)t()}finally{ar(t),Jn(i),be(e)}}toString(){let e=[],t=this.records;for(let i of t.keys())e.push(Sn(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new mn(205,!1)}processProvider(e){let t=bs(e=kn(e))?e:kn(e&&e.provide),i=function(e){if(gs(e))return xs(void 0,e.useValue);return xs(ks(e),ws)}(e);if(!bs(e)&&!0===e.multi){let i=this.records.get(t);i||(i=xs(void 0,ws,!0),i.factory=()=>ur(i.multi),this.records.set(t,i)),t=e,i.multi.push(e)}this.records.set(t,i)}hydrate(e,t){let i=be(null);try{return t.value===ws&&(t.value=_s,t.value=t.factory()),"object"==typeof t.value&&t.value&&function(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{be(i)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=kn(e.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);-1!==t&&this._onDestroyHooks.splice(t,1)}};function As(e){let t=En(e),i=null!==t?t.factory:br(e);if(null!==i)return i;if(e instanceof Fn)throw new mn(204,!1);if(e instanceof Function)return function(e){if(e.length>0)throw new mn(204,!1);let t=function(e){return e&&(e[Bn]||e[Rn])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new mn(204,!1)}function ks(e,t,i){let n;if(bs(e)){let t=kn(e);return br(t)||As(t)}if(gs(e))n=()=>kn(e.useValue);else if(function(e){return!(!e||!e.useFactory)}(e))n=()=>e.useFactory(...ur(e.deps||[]));else if(function(e){return!(!e||!e.useExisting)}(e))n=()=>lr(kn(e.useExisting));else{let t=kn(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return br(t)||As(t);n=()=>new t(...ur(e.deps))}return n}function xs(e,t,i=!1){return{factory:e,value:t,multi:i?[]:void 0}}function Ts(e,t){for(let i of e)Array.isArray(i)?Ts(i,t):i&&Nn(i)?Ts(i.ɵproviders,t):t(i)}function Ps(e,t){e instanceof Is&&e.assertNotDestroyed();let i=ar(e),n=Jn(void 0);try{return t()}finally{ar(i),Jn(n)}}function Es(){return void 0!==Qn()||null!=Xn}var Ds=0,Os=1,Bs=2,Ms=3,Rs=4,Ls=5,Fs=6,Ns=7,Us=8,Vs=9,qs=10,$s=11,js=12,zs=13,Ws=14,Hs=15,Ys=16,Gs=17,Ks=18,Qs=19,Js=20,Zs=21,Xs=22,ea=23,ta=25,ia=1,na=7,ra=9,sa=10,aa=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(aa||{});function oa(e){return Array.isArray(e)&&"object"==typeof e[ia]}function la(e){return Array.isArray(e)&&!0===e[ia]}function ca(e){return!!(4&e.flags)}function da(e){return e.componentOffset>-1}function ua(e){return!(1&~e.flags)}function pa(e){return!!e.template}function ha(e){return!!(512&e[Bs])}var fa=class{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}};function ma(e,t,i,n){null!==t?t.applyValueToInputSignal(t,n):e[i]=n}function ga(){return ba}function ba(e){return e.type.prototype.ngOnChanges&&(e.setInput=va),ya}function ya(){let e=_a(this),t=e?.current;if(t){let i=e.previous;if(i===Ir)e.previous=t;else for(let e in t)i[e]=t[e];e.current=null,this.ngOnChanges(t)}}function va(e,t,i,n,r){let s=this.declaredInputs[n],a=_a(e)||function(e,t){return e[wa]=t}(e,{previous:Ir,current:null}),o=a.current||(a.current={}),l=a.previous,c=l[s];o[s]=new fa(c&&c.currentValue,i,l===Ir),ma(e,t,r,i)}ga.ngInherit=!0;var wa="__ngSimpleChanges__";function _a(e){return e[wa]||null}var Sa=function(e,t,i){},Ca="svg";function Ia(e){for(;Array.isArray(e);)e=e[Ds];return e}function Aa(e,t){return Ia(t[e])}function ka(e,t){return Ia(t[e.index])}function xa(e,t){return e.data[t]}function Ta(e,t){return e[t]}function Pa(e,t){let i=t[e];return oa(i)?i:i[Ds]}function Ea(e){return!(128&~e[Bs])}function Da(e,t){return null==t?null:e[t]}function Oa(e){e[Gs]=0}function Ba(e){1024&e[Bs]||(e[Bs]|=1024,Ea(e)&&La(e))}function Ma(e){return!!(9216&e[Bs]||e[ea]?.dirty)}function Ra(e){e[qs].changeDetectionScheduler?.notify(8),64&e[Bs]&&(e[Bs]|=1024),Ma(e)&&La(e)}function La(e){e[qs].changeDetectionScheduler?.notify(0);let t=Na(e);for(;null!==t&&!(8192&t[Bs])&&(t[Bs]|=8192,Ea(t));)t=Na(t)}function Fa(e,t){if(!(256&~e[Bs]))throw new mn(911,!1);null===e[Zs]&&(e[Zs]=[]),e[Zs].push(t)}function Na(e){let t=e[Ms];return la(t)?t[Ms]:t}var Ua={lFrame:fo(null),bindingsEnabled:!0,skipHydrationRootTNode:null},Va=!1;function qa(){return Ua.bindingsEnabled}function $a(){return null!==Ua.skipHydrationRootTNode}function ja(){return Ua.lFrame.lView}function za(){return Ua.lFrame.tView}function Wa(e){return Ua.lFrame.contextLView=e,e[Us]}function Ha(e){return Ua.lFrame.contextLView=null,e}function Ya(){let e=Ga();for(;null!==e&&64===e.type;)e=e.parent;return e}function Ga(){return Ua.lFrame.currentTNode}function Ka(e,t){let i=Ua.lFrame;i.currentTNode=e,i.isParent=t}function Qa(){return Ua.lFrame.isParent}function Ja(){Ua.lFrame.isParent=!1}function Za(){return Ua.lFrame.contextLView}function Xa(){return Va}function eo(e){Va=e}function to(){let e=Ua.lFrame,t=e.bindingRootIndex;
1return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function io(){return Ua.lFrame.bindingIndex}function no(){return Ua.lFrame.bindingIndex++}function ro(e){let t=Ua.lFrame,i=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,i}function so(e,t){let i=Ua.lFrame;i.bindingIndex=i.bindingRootIndex=e,ao(t)}function ao(e){Ua.lFrame.currentDirectiveIndex=e}function oo(){return Ua.lFrame.currentQueryIndex}function lo(e){Ua.lFrame.currentQueryIndex=e}function co(e){let t=e[Os];return 2===t.type?t.declTNode:1===t.type?e[Ls]:null}function uo(e,t,i){if(i&Kn.SkipSelf){let n=t,r=e;for(;(n=n.parent,null===n&&!(i&Kn.Host))&&(n=co(r),!(null===n||(r=r[Ws],10&n.type))););if(null===n)return!1;t=n,e=r}let n=Ua.lFrame=ho();return n.currentTNode=t,n.lView=e,!0}function po(e){let t=ho(),i=e[Os];Ua.lFrame=t,t.currentTNode=i.firstChild,t.lView=e,t.tView=i,t.contextLView=e,t.bindingIndex=i.bindingStartIndex,t.inI18n=!1}function ho(){let e=Ua.lFrame,t=null===e?null:e.child;return null===t?fo(e):t}function fo(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function mo(){let e=Ua.lFrame;return Ua.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var go=mo;function bo(){let e=mo();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function yo(e){return(Ua.lFrame.contextLView=function(e,t){for(;e>0;)t=t[Ws],e--;return t}(e,Ua.lFrame.contextLView))[Us]}function vo(){return Ua.lFrame.selectedIndex}function wo(e){Ua.lFrame.selectedIndex=e}function _o(){let e=Ua.lFrame;return xa(e.tView,e.selectedIndex)}function So(){Ua.lFrame.currentNamespace=Ca}function Co(){Ua.lFrame.currentNamespace=null}var Io=!0;function Ao(){return Io}function ko(e){Io=e}function xo(e,t){for(let i=t.directiveStart,n=t.directiveEnd;i<n;i++){let t=e.data[i].type.prototype,{ngAfterContentInit:n,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:a,ngOnDestroy:o}=t;n&&(e.contentHooks??=[]).push(-i,n),r&&((e.contentHooks??=[]).push(i,r),(e.contentCheckHooks??=[]).push(i,r)),s&&(e.viewHooks??=[]).push(-i,s),a&&((e.viewHooks??=[]).push(i,a),(e.viewCheckHooks??=[]).push(i,a)),null!=o&&(e.destroyHooks??=[]).push(i,o)}}function To(e,t,i){Do(e,t,3,i)}function Po(e,t,i,n){(3&e[Bs])===i&&Do(e,t,i,n)}function Eo(e,t){let i=e[Bs];(3&i)===t&&(i&=16383,i+=1,e[Bs]=i)}function Do(e,t,i,n){let r=void 0!==n?65535&e[Gs]:0,s=n??-1,a=t.length-1,o=0;for(let l=r;l<a;l++)if("number"==typeof t[l+1]){if(o=t[l],null!=n&&o>=n)break}else t[l]<0&&(e[Gs]+=65536),(o<s||-1==s)&&(Bo(e,i,t,l),e[Gs]=(4294901760&e[Gs])+l+2),l++}function Oo(e,t){Sa(4,e,t);let i=be(null);try{t.call(e)}finally{be(i),Sa(5,e,t)}}function Bo(e,t,i,n){let r=i[n]<0,s=i[n+1],a=e[r?-i[n]:i[n]];r?e[Bs]>>14<e[Gs]>>16&&(3&e[Bs])===t&&(e[Bs]+=16384,Oo(a,s)):Oo(a,s)}var Mo=-1,Ro=class{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}};var Lo={},Fo=class{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=dr(i);let n=this.injector.get(e,Lo,i);return n!==Lo||t===Lo?n:this.parentInjector.get(e,t,i)}};function No(e){return e!==Mo}function Uo(e){return 32767&e}function Vo(e,t){let i=function(e){return e>>16}(e),n=t;for(;i>0;)n=n[Ws],i--;return n}var qo=!0;function $o(e){let t=qo;return qo=e,t}var jo=255,zo=5,Wo=0,Ho={};function Yo(e,t){let i=Ko(e,t);if(-1!==i)return i;let n=t[Os];n.firstCreatePass&&(e.injectorIndex=t.length,Go(n.data,e),Go(t,null),Go(n.blueprint,null));let r=Qo(e,t),s=e.injectorIndex;if(No(r)){let e=Uo(r),i=Vo(r,t),n=i[Os].data;for(let r=0;r<8;r++)t[s+r]=i[e+r]|n[e+r]}return t[s+8]=r,s}function Go(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Ko(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function Qo(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let i=0,n=null,r=t;for(;null!==r;){if(n=ul(r),null===n)return Mo;if(i++,r=r[Ws],-1!==n.injectorIndex)return n.injectorIndex|i<<16}return Mo}function Jo(e,t,i){!function(e,t,i){let n;"string"==typeof i?n=i.charCodeAt(0)||0:i.hasOwnProperty(zn)&&(n=i[zn]),null==n&&(n=i[zn]=Wo++);let r=n&jo,s=1<<r;t.data[e+(r>>zo)]|=s}(e,t,i)}function Zo(e,t,i){if(i&Kn.Optional||void 0!==e)return e;Yn()}function Xo(e,t,i,n){if(i&Kn.Optional&&void 0===n&&(n=null),!(i&(Kn.Self|Kn.Host))){let r=e[Vs],s=Jn(void 0);try{return r?r.get(t,n,i&Kn.Optional):Zn(t,n,i&Kn.Optional)}finally{Jn(s)}}return Zo(n,0,i)}function el(e,t,i,n=Kn.Default,r){if(null!==e){if(2048&t[Bs]&&!(n&Kn.Self)){let r=function(e,t,i,n,r){let s=e,a=t;for(;null!==s&&null!==a&&2048&a[Bs]&&!(512&a[Bs]);){let e=tl(s,a,i,n|Kn.Self,Ho);if(e!==Ho)return e;let t=s.parent;if(!t){let e=a[Js];if(e){let t=e.get(i,Ho,n);if(t!==Ho)return t}t=ul(a),a=a[Ws]}s=t}return r}(e,t,i,n,Ho);if(r!==Ho)return r}let r=tl(e,t,i,n,Ho);if(r!==Ho)return r}return Xo(t,i,n,r)}function tl(e,t,i,n,r){let s=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;let t=e.hasOwnProperty(zn)?e[zn]:void 0;return"number"==typeof t?t>=0?t&jo:ll:t}(i);if("function"==typeof s){if(!uo(t,e,n))return n&Kn.Host?Zo(r,0,n):Xo(t,i,n,r);try{let e;if(e=s(n),null!=e||n&Kn.Optional)return e;Yn()}finally{go()}}else if("number"==typeof s){let r=null,a=Ko(e,t),o=Mo,l=n&Kn.Host?t[Hs][Ls]:null;for((-1===a||n&Kn.SkipSelf)&&(o=-1===a?Qo(e,t):t[a+8],o!==Mo&&al(n,!1)?(r=t[Os],a=Uo(o),t=Vo(o,t)):a=-1);-1!==a;){let e=t[Os];if(sl(s,a,e.data)){let e=il(a,t,i,r,n,l);if(e!==Ho)return e}o=t[a+8],o!==Mo&&al(n,t[Os].data[a+8]===l)&&sl(s,a,t)?(r=e,a=Uo(o),t=Vo(o,t)):a=-1}}return r}function il(e,t,i,n,r,s){let a=t[Os],o=a.data[e+8],l=nl(o,a,i,null==n?da(o)&&qo:n!=a&&!!(3&o.type),r&Kn.Host&&s===o);return null!==l?rl(t,a,l,o):Ho}function nl(e,t,i,n,r){let s=e.providerIndexes,a=t.data,o=1048575&s,l=e.directiveStart,c=e.directiveEnd,d=s>>20,u=r?o+d:c;for(let e=n?o:o+d;e<u;e++){let t=a[e];if(e<l&&i===t||e>=l&&t.type===i)return e}if(r){let e=a[l];if(e&&pa(e)&&e.type===i)return l}return null}function rl(e,t,i,n){let r=e[i],s=t.data;if(function(e){return e instanceof Ro}(r)){let a=r;a.resolving&&function(e,t){throw t&&t.join(" > "),new mn(-200,e)}(function(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():Hn(e)}(s[i]));let o=$o(a.canSeeViewProviders);a.resolving=!0;let l=a.injectImpl?Jn(a.injectImpl):null;uo(e,n,Kn.Default);try{r=e[i]=a.factory(void 0,s,e,n),t.firstCreatePass&&i>=n.directiveStart&&function(e,t,i){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(n){let n=ba(t);(i.preOrderHooks??=[]).push(e,n),(i.preOrderCheckHooks??=[]).push(e,n)}r&&(i.preOrderHooks??=[]).push(0-e,r),s&&((i.preOrderHooks??=[]).push(e,s),(i.preOrderCheckHooks??=[]).push(e,s))}(i,s[i],t)}finally{null!==l&&Jn(l),$o(o),a.resolving=!1,go()}}return r}function sl(e,t,i){let n=1<<e;return!!(i[t+(e>>zo)]&n)}function al(e,t){return!(e&Kn.Self||e&Kn.Host&&t)}var ol=class{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return el(this._tNode,this._lView,e,dr(i),t)}};function ll(){return new ol(Ya(),ja())}function cl(e){return gn((()=>{let t=e.prototype.constructor,i=t[jn]||dl(t),n=Object.prototype,r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==n;){let e=r[jn]||dl(r);
1if(e&&e!==i)return e;r=Object.getPrototypeOf(r)}return e=>new e}))}function dl(e){return xn(e)?()=>{let t=dl(kn(e));return t&&t()}:br(e)}function ul(e){let t=e[Os],i=t.type;return 2===i?t.declTNode:1===i?e[Ls]:null}function pl(e,t=null,i=null,n){let r=hl(e,t,i,n);return r.resolveInjectorInitializers(),r}function hl(e,t=null,i=null,n,r=new Set){let s=[i||Ar,ds(e)];return n=n||("object"==typeof e?void 0:Sn(e)),new Is(s,t||Ss(),n||null,r)}var fl=class e{static{this.THROW_IF_NOT_FOUND=er}static{this.NULL=new Pr}static create(e,t){if(Array.isArray(e))return pl({name:""},t,e,"");{let t=e.name??"";return pl({name:t},e.parent,e.providers,t)}}static{this.ɵprov=Tn({token:e,providedIn:"any",factory:()=>lr(xr)})}static{this.__NG_ELEMENT_ID__=-1}};new Fn("").__NG_ELEMENT_ID__=e=>{let t=Ya();if(null===t)throw new mn(204,!1);if(2&t.type)return t.value;if(e&Kn.Optional)return null;throw new mn(204,!1)};function ml(e){return e.ngOriginalError}var gl=!0,bl=(()=>{class e{static{this.__NG_ELEMENT_ID__=vl}static{this.__NG_ENV_ID__=e=>e}}return e})(),yl=class extends bl{constructor(e){super(),this._lView=e}onDestroy(e){return Fa(this._lView,e),()=>function(e,t){if(null===e[Zs])return;let i=e[Zs].indexOf(t);-1!==i&&e[Zs].splice(i,1)}(this._lView,e)}};function vl(){return new yl(ja())}var wl=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Tt(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}remove(e){this.pendingTasks.delete(e),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.ɵprov=Tn({token:e,providedIn:"root",factory:()=>new e})}}return e})(),_l=class extends kt{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,Es()&&(this.destroyRef=cr(bl,{optional:!0})??void 0,this.pendingTasks=cr(wl,{optional:!0})??void 0)}emit(e){let t=be(null);try{super.next(e)}finally{be(t)}}subscribe(e,t,i){let n=e,r=t||(()=>null),s=i;if(e&&"object"==typeof e){let t=e;n=t.next?.bind(t),r=t.error?.bind(t),s=t.complete?.bind(t)}this.__isAsync&&(r=this.wrapInTimeout(r),n&&(n=this.wrapInTimeout(n)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:n,error:r,complete:s});return e instanceof Ye&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout((()=>{e(t),void 0!==i&&this.pendingTasks?.remove(i)}))}}};function Sl(...e){}function Cl(e){let t,i;function n(){e=Sl;try{void 0!==i&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(i),void 0!==t&&clearTimeout(t)}catch{}}return t=setTimeout((()=>{e(),n()})),"function"==typeof requestAnimationFrame&&(i=requestAnimationFrame((()=>{e(),n()}))),()=>n()}function Il(e){return queueMicrotask((()=>e())),()=>{e=Sl}}var Al="isAngularZone",kl=Al+"_ID",xl=0,Tl=class e{constructor(e){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new _l(!1),this.onMicrotaskEmpty=new _l(!1),this.onStable=new _l(!1),this.onError=new _l(!1);let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:n=!1,scheduleInRootZone:r=gl}=e;if(typeof Zone>"u")throw new mn(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!n&&i,s.shouldCoalesceRunChangeDetection=n,s.callbackScheduled=!1,s.scheduleInRootZone=r,function(e){let t=()=>{!function(e){if(e.isCheckStableRunning||e.callbackScheduled)return;function t(){Cl((()=>{e.callbackScheduled=!1,Dl(e),e.isCheckStableRunning=!0,El(e),e.isCheckStableRunning=!1}))}e.callbackScheduled=!0,e.scheduleInRootZone?Zone.root.run((()=>{t()})):e._outer.run((()=>{t()})),Dl(e)}(e)},i=xl++;e._inner=e._inner.fork({name:"angular",properties:{[Al]:!0,[kl]:i,[kl+i]:!0},onInvokeTask:(i,n,r,s,a,o)=>
1{if(function(e){return Rl(e,"__ignore_ng_zone__")}(o))return i.invokeTask(r,s,a,o);try{return Ol(e),i.invokeTask(r,s,a,o)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&t(),Bl(e)}},onInvoke:(i,n,r,s,a,o,l)=>{try{return Ol(e),i.invoke(r,s,a,o,l)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function(e){return Rl(e,"__scheduler_tick__")}(o)&&t(),Bl(e)}},onHasTask:(t,i,n,r)=>{t.hasTask(n,r),i===n&&("microTask"==r.change?(e._hasPendingMicrotasks=r.microTask,Dl(e),El(e)):"macroTask"==r.change&&(e.hasPendingMacrotasks=r.macroTask))},onHandleError:(t,i,n,r)=>(t.handleError(n,r),e.runOutsideAngular((()=>e.onError.emit(r))),!1)})}(s)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get(Al)}static assertInAngularZone(){if(!e.isInAngularZone())throw new mn(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new mn(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,n){let r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+n,e,Pl,Sl,Sl);try{return r.runTask(s,t,i)}finally{r.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},Pl={};function El(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular((()=>e.onStable.emit(null)))}finally{e.isStable=!0}}}function Dl(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Ol(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Bl(e){e._nesting--,El(e)}var Ml=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new _l,this.onMicrotaskEmpty=new _l,this.onStable=new _l,this.onError=new _l}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,n){return e.apply(t,i)}};function Rl(e,t){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[t]}var Ll=class{constructor(){this._console=console}handleError(e){let t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&ml(e);for(;t&&ml(t);)t=ml(t);return t||null}},Fl=new Fn("",{providedIn:"root",factory:()=>{let e=cr(Tl),t=cr(Ll);return i=>e.runOutsideAngular((()=>t.handleError(i)))}});function Nl(){return Ul(Ya(),ja())}function Ul(e,t){return new Vl(ka(e,t))}var Vl=(()=>{class e{constructor(e){this.nativeElement=e}static{this.__NG_ELEMENT_ID__=Nl}}return e})();function ql(e){return e instanceof Vl?e.nativeElement:e}function $l(){return this._results[Symbol.iterator]()}var jl=class e{get changes(){return this._changes??=new _l}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let i=e.prototype;i[Symbol.iterator]||(i[Symbol.iterator]=$l)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=function(e){return e.flat(Number.POSITIVE_INFINITY)}(e);(this._changesDetected=!function(e,t,i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],s=t[n];if(i&&(r=i(r),s=i(s)),s!==r)return!1}return!0}(this._results,i,t))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}};function zl(e){return!(128&~e.flags)}var Wl=new Map,Hl=0;function Yl(e){Wl.delete(e[Qs])}var Gl,Kl="__ngContext__";function Ql(e,t){oa(t)?(e[Kl]=t[Qs],function(e){Wl.set(e[Qs],e)}(t)):e[Kl]=t}function Jl(e){return Xl(e[js])}function Zl(e){return Xl(e[Rs])}function Xl(e){for(;null!==e&&!la(e);)e=e[Rs];return e}function ec(){if(void 0!==Gl)return Gl;if(typeof document<"u")return document;throw new mn(210,!1)}var tc=new Fn("",{providedIn:"root",factory:()=>ic}),ic="ng",nc=new Fn(""),rc=new Fn("",{providedIn:"platform",factory:()=>"unknown"}),sc=new Fn(""),ac=new Fn("",{providedIn:"root",factory:()=>ec().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null}),oc=()=>null;function lc(e,t,i=!1){return oc(e,t,i)}var cc,dc,uc=!1,pc=new Fn("",{providedIn:"root",factory:()=>uc});function hc(e){return function(){if(void 0===cc&&(cc=null,vn.trustedTypes))try{cc=vn.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return cc}()?.createHTML(e)||e}function fc(e){return function(){if(void 0===dc&&(dc=null,vn.trustedTypes))try{dc=vn.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return dc}()?.createHTML(e)||e}var mc=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${fn})`}}
1,gc=class extends mc{getTypeName(){return"HTML"}},bc=class extends mc{getTypeName(){return"Style"}},yc=class extends mc{getTypeName(){return"Script"}},vc=class extends mc{getTypeName(){return"URL"}},wc=class extends mc{getTypeName(){return"ResourceURL"}};function _c(e){return e instanceof mc?e.changingThisBreaksApplicationSecurity:e}function Sc(e,t){let i=function(e){return e instanceof mc&&e.getTypeName()||null}(e);if(null!=i&&i!==t){if("ResourceURL"===i&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${i} (see ${fn})`)}return i===t}function Cc(e){let t=new Ac(e);return function(){try{return!!(new window.DOMParser).parseFromString(hc(""),"text/html")}catch{return!1}}()?new Ic(t):t}var Ic=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=(new window.DOMParser).parseFromString(hc(e),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},Ac=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=hc(e),t}};var kc=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function xc(e){return(e=String(e)).match(kc)?e:"unsafe:"+e}function Tc(e){let t={};for(let i of e.split(","))t[i]=!0;return t}function Pc(...e){let t={};for(let i of e)for(let e in i)i.hasOwnProperty(e)&&(t[e]=!0);return t}var Ec=Tc("area,br,col,hr,img,wbr"),Dc=Tc("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Oc=Tc("rp,rt"),Bc=Pc(Oc,Dc),Mc=Pc(Dc,Tc("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Rc=Pc(Oc,Tc("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Lc=Pc(Ec,Mc,Rc,Bc),Fc=Tc("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Nc=Tc("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Uc=Tc("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),Vc=Pc(Fc,Nc,Uc),qc=Tc("script,style,template"),$c=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0,n=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild)n.push(t),t=zc(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let e=jc(t);if(e){t=e;break}t=n.pop()}return this.buf.join("")}startElement(e){let t=Wc(e).toLowerCase();if(!Lc.hasOwnProperty(t))return this.sanitizedSomething=!0,!qc.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let e=0;e<i.length;e++){let t=i.item(e),n=t.name,r=n.toLowerCase();if(!Vc.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let s=t.value;Fc[r]&&(s=xc(s)),this.buf.push(" ",n,'="',Qc(s),'"')}return this.buf.push(">"),!0}endElement(e){let t=Wc(e).toLowerCase();Lc.hasOwnProperty(t)&&!Ec.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(Qc(e))}};function jc(e){let t=e.nextSibling;if(t&&e!==t.previousSibling)throw Hc(t);return t}function zc(e){let t=e.firstChild;if(t&&function(e,t){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,t))throw Hc(t);return t}function Wc(e){let t=e.nodeName;return"string"==typeof t?t:"FORM"}function Hc(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}var Yc,Gc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kc=/([^\#-~ |!])/g;function Qc(e){return e.replace(/&/g,"&").replace(Gc,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(Kc,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}
1function Jc(e,t){let i=null;try{Yc=Yc||Cc(e);let n=t?String(t):"";i=Yc.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=i.innerHTML,i=Yc.getInertBodyElement(n)}while(n!==s);return hc((new $c).sanitizeChildren(Zc(i)||i))}finally{if(i){let e=Zc(i)||i;for(;e.firstChild;)e.firstChild.remove()}}}function Zc(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Xc=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Xc||{});function ed(e){let t=nd();return t?fc(t.sanitize(Xc.HTML,e)||""):Sc(e,"HTML")?fc(_c(e)):Jc(ec(),Hn(e))}function td(e){let t=nd();return t?t.sanitize(Xc.STYLE,e)||"":Sc(e,"Style")?_c(e):Hn(e)}function id(e){let t=nd();return t?t.sanitize(Xc.URL,e)||"":Sc(e,"URL")?_c(e):xc(Hn(e))}function nd(){let e=ja();return e&&e[qs].sanitizer}var rd=/^>|^->|<!--|-->|--!>|<!-$/g,sd=/(<|>)/g,ad="â$1â";function od(e){return e.ownerDocument.defaultView}function ld(e){return e.ownerDocument}function cd(e){return e instanceof Function?e():e}var dd,ud=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(ud||{});function pd(e,t){return dd(e,t)}function hd(e,t,i,n,r){if(null!=n){let s,a=!1;la(n)?s=n:oa(n)&&(a=!0,n=n[Ds]);let o=Ia(n);0===e&&null!==i?null==r?Id(t,i,o):Cd(t,i,o,r||null,!0):1===e&&null!==i?Cd(t,i,o,r||null,!0):2===e?function(e,t,i){e.removeChild(null,t,i)}(t,o,a):3===e&&t.destroyNode(o),null!=s&&function(e,t,i,n,r){let s=i[na],a=Ia(i);s!==a&&hd(t,e,n,s,r);for(let r=sa;r<i.length;r++){let a=i[r];Rd(a[Os],a,e,t,n,s)}}(t,e,s,i,r)}}function fd(e,t){return e.createComment(function(e){return e.replace(rd,(e=>e.replace(sd,ad)))}(t))}function md(e,t,i){return e.createElement(t,i)}function gd(e,t){t[qs].changeDetectionScheduler?.notify(9),Rd(e,t,t[$s],2,null,null)}function bd(e,t){let i=e[ra],n=t[Ms];if(oa(n))e[Bs]|=aa.HasTransplantedViews;else{let i=n[Ms][Hs];t[Hs]!==i&&(e[Bs]|=aa.HasTransplantedViews)}null===i?e[ra]=[t]:i.push(t)}function yd(e,t){let i=e[ra],n=i.indexOf(t);i.splice(n,1)}function vd(e,t){if(e.length<=sa)return;let i=sa+t,n=e[i];if(n){let r=n[Ys];null!==r&&r!==e&&yd(r,n),t>0&&(e[i-1][Rs]=n[Rs]);let s=wr(e,sa+t);!function(e,t){gd(e,t),t[Ds]=null,t[Ls]=null}(n[Os],n);let a=s[Ks];null!==a&&a.detachView(s[Os]),n[Ms]=null,n[Rs]=null,n[Bs]&=-129}return n}function wd(e,t){if(!(256&t[Bs])){let i=t[$s];i.destroyNode&&Rd(e,t,i,3,null,null),function(e){let t=e[js];if(!t)return _d(e[Os],e);for(;t;){let i=null;if(oa(t))i=t[js];else{let e=t[sa];e&&(i=e)}if(!i){for(;t&&!t[Rs]&&t!==e;)oa(t)&&_d(t[Os],t),t=t[Ms];null===t&&(t=e),oa(t)&&_d(t[Os],t),i=t&&t[Rs]}t=i}}(t)}}function _d(e,t){if(256&t[Bs])return;let i=be(null);try{t[Bs]&=-129,t[Bs]|=256,t[ea]&&xe(t[ea]),function(e,t){let i;if(null!=e&&null!=(i=e.destroyHooks))for(let e=0;e<i.length;e+=2){let n=t[i[e]];if(!(n instanceof Ro)){let t=i[e+1];if(Array.isArray(t))for(let e=0;e<t.length;e+=2){let i=n[t[e]],r=t[e+1];Sa(4,i,r);try{r.call(i)}finally{Sa(5,i,r)}}else{Sa(4,n,t);try{t.call(n)}finally{Sa(5,n,t)}}}}}(e,t),function(e,t){let i=e.cleanup,n=t[Ns];if(null!==i)for(let e=0;e<i.length-1;e+=2)if("string"==typeof i[e]){let t=i[e+3];t>=0?n[t]():n[-t].unsubscribe(),e+=2}else{let t=n[i[e+1]];i[e].call(t)}null!==n&&(t[Ns]=null);let r=t[Zs];if(null!==r){t[Zs]=null;for(let e=0;e<r.length;e++){(0,r[e])()}}}(e,t),1===t[Os].type&&t[$s].destroy();let i=t[Ys];if(null!==i&&la(t[Ms])){i!==t[Ms]&&yd(i,t);let n=t[Ks];null!==n&&n.detachView(e)}Yl(t)}finally{be(i)}}function Sd(e,t,i){return function(e,t,i){let n=t;for(;null!==n&&168&n.type;)n=(t=n).parent;if(null===n)return i[Ds];{let{componentOffset:t}=n;if(t>-1){let{encapsulation:i}=e.data[n.directiveStart+t];if(i===Dr.None||i===Dr.Emulated)return null}return ka(n,i)}}(e,t.parent,i)}function Cd(e,t,i,n,r){e.insertBefore(t,i,n,r)}function Id(e,t,i){e.appendChild(t,i)}function Ad(e,t,i,n,r){null!==n?Cd(e,t,i,n,r):Id(e,t,i)}function kd(e,t){return e.parentNode(t)}function xd(e,t,i){return Pd(e,t,i)}var Td,Pd=function(e,t,i){return 40&e.type?ka(e,i):null};function Ed(e,t,i,n){let r=Sd(e,n,t),s=t[$s],a=xd(n.parent||t[Ls],n,t);
1if(null!=r)if(Array.isArray(i))for(let e=0;e<i.length;e++)Ad(s,r,i[e],a,!1);else Ad(s,r,i,a,!1);void 0!==Td&&Td(s,n,t,i,r)}function Dd(e,t){if(null!==t){let i=t.type;if(3&i)return ka(t,e);if(4&i)return Bd(-1,e[t.index]);if(8&i){let i=t.child;if(null!==i)return Dd(e,i);{let i=e[t.index];return la(i)?Bd(-1,i):Ia(i)}}if(128&i)return Dd(e,t.next);if(32&i)return pd(t,e)()||Ia(e[t.index]);{let i=Od(e,t);if(null!==i){if(Array.isArray(i))return i[0];return Dd(Na(e[Hs]),i)}return Dd(e,t.next)}}return null}function Od(e,t){if(null!==t){let i=e[Hs][Ls],n=t.projection;return i.projection[n]}return null}function Bd(e,t){let i=sa+e+1;if(i<t.length){let e=t[i],n=e[Os].firstChild;if(null!==n)return Dd(e,n)}return t[na]}function Md(e,t,i,n,r,s,a){for(;null!=i;){if(128===i.type){i=i.next;continue}let o=n[i.index],l=i.type;if(a&&0===t&&(o&&Ql(Ia(o),n),i.flags|=2),32&~i.flags)if(8&l)Md(e,t,i.child,n,r,s,!1),hd(t,e,r,o,s);else if(32&l){let a,l=pd(i,n);for(;a=l();)hd(t,e,r,a,s);hd(t,e,r,o,s)}else 16&l?Ld(e,t,n,i,r,s):hd(t,e,r,o,s);i=a?i.projectionNext:i.next}}function Rd(e,t,i,n,r,s){Md(i,n,e.firstChild,t,r,s,!1)}function Ld(e,t,i,n,r,s){let a=i[Hs],o=a[Ls].projection[n.projection];if(Array.isArray(o))for(let i=0;i<o.length;i++){hd(t,e,r,o[i],s)}else{let i=o,l=a[Ms];zl(n)&&(i.flags|=128),Md(e,t,i,l,r,s,!0)}}function Fd(e,t,i){""===i?e.removeAttribute(t,"class"):e.setAttribute(t,"class",i)}function Nd(e,t,i){let{mergedAttrs:n,classes:r,styles:s}=i;null!==n&&Mr(e,t,n),null!==r&&Fd(e,t,r),null!==s&&function(e,t,i){e.setAttribute(t,"style",i)}(e,t,s)}var Ud={};function Vd(e=1){qd(za(),ja(),vo()+e,!1)}function qd(e,t,i,n){if(!n)if(3&~t[Bs]){let n=e.preOrderHooks;null!==n&&Po(t,n,0,i)}else{let n=e.preOrderCheckHooks;null!==n&&To(t,n,i)}wo(i)}function $d(e,t=Kn.Default){let i=ja();return null===i?lr(e,t):el(Ya(),i,kn(e),t)}function jd(e,t,i,n,r,s){let a=be(null);try{let a=null;r&Or.SignalBased&&(a=t[n][ge]),null!==a&&void 0!==a.transformFn&&(s=a.transformFn(s)),r&Or.HasDecoratorInputTransform&&(s=e.inputTransforms[n].call(t,s)),null!==e.setInput?e.setInput(t,a,s,i,n):ma(t,a,n,s)}finally{be(a)}}function zd(e,t,i,n,r,s,a,o,l,c,d){let u=t.blueprint.slice();return u[Ds]=r,u[Bs]=204|n,(null!==c||e&&2048&e[Bs])&&(u[Bs]|=2048),Oa(u),u[Ms]=u[Ws]=e,u[Us]=i,u[qs]=a||e&&e[qs],u[$s]=o||e&&e[$s],u[Vs]=l||e&&e[Vs]||null,u[Ls]=s,u[Qs]=Hl++,u[Fs]=d,u[Js]=c,u[Hs]=2==t.type?e[Hs]:u,u}function Wd(e,t,i,n,r){let s=e.data[t];if(null===s)s=function(e,t,i,n,r){let s=Ga(),a=Qa(),o=a?s:s&&s.parent,l=e.data[t]=function(e,t,i,n,r,s){let a=t?t.injectorIndex:-1,o=0;return $a()&&(o|=128),{type:i,index:n,insertBeforeIndex:null,injectorIndex:a,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:o,providerIndexes:0,value:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o,i,t,n,r);return null===e.firstChild&&(e.firstChild=l),null!==s&&(a?null==s.child&&null!==l.parent&&(s.child=l):null===s.next&&(s.next=l,l.prev=s)),l}(e,t,i,n,r),Ua.lFrame.inI18n&&(s.flags|=32);else if(64&s.type){s.type=i,s.value=n,s.attrs=r;let e=function(){let e=Ua.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}();s.injectorIndex=null===e?-1:e.injectorIndex}return Ka(s,!0),s}function Hd(e,t,i,n){if(0===i)return-1;let r=t.length;for(let r=0;r<i;r++)t.push(n),e.blueprint.push(n),e.data.push(null);return r}function Yd(e,t,i,n,r){let s=vo(),a=2&n;try{wo(-1),a&&t.length>ta&&qd(e,t,ta,!1),Sa(a?2:0,r),i(n,r)}finally{wo(s),Sa(a?3:1,r)}}function Gd(e,t,i){if(ca(t)){let n=be(null);try{let n=t.directiveStart,r=t.directiveEnd;for(let t=n;t<r;t++){let n=e.data[t];if(n.contentQueries){let e=i[t];n.contentQueries(1,e,t)}}}finally{be(n)}}}function Kd(e,t,i){qa()&&(function(e,t,i,n){let r=i.directiveStart,s=i.directiveEnd;da(i)&&function(e,t,i){let n=ka(t,e),r=Jd(i),s=e[qs].rendererFactory,a=16;i.signals?a=4096:i.onPush&&(a=64);let o=gu(e,zd(e,r,null,a,n,t,null,s.createRenderer(n,i),null,null,null));e[t.index]=o}
1(t,i,e.data[r+i.componentOffset]),e.firstCreatePass||Yo(i,t),Ql(n,t);let a=i.initialInputs;for(let n=r;n<s;n++){let s=e.data[n],o=rl(t,e,n,i);if(Ql(o,t),null!==a&&pu(t,n-r,o,s,i,a),pa(s)){Pa(i.index,t)[Us]=rl(t,e,n,i)}}}(e,t,i,ka(i,t)),!(64&~i.flags)&&au(e,t,i))}function Qd(e,t,i=ka){let n=t.localNames;if(null!==n){let r=t.index+1;for(let s=0;s<n.length;s+=2){let a=n[s+1],o=-1===a?i(t,e):e[a];e[r++]=o}}}function Jd(e){let t=e.tView;return null===t||t.incompleteFirstPass?e.tView=Zd(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function Zd(e,t,i,n,r,s,a,o,l,c,d){let u=ta+n,p=u+r,h=function(e,t){let i=[];for(let n=0;n<t;n++)i.push(n<e?null:Ud);return i}(u,p),f="function"==typeof c?c():c;return h[Os]={type:e,blueprint:h,template:i,queries:null,viewQuery:o,declTNode:t,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:p,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof a?a():a,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1,ssrId:d}}function Xd(e,t,i,n){let r=n.get(pc,uc)||i===Dr.ShadowDom,s=e.selectRootElement(t,r);return function(e){eu(e)}(s),s}var eu=()=>null;function tu(e,t,i,n,r){for(let s in t){if(!t.hasOwnProperty(s))continue;let a=t[s];if(void 0===a)continue;n??={};let o,l=Or.None;Array.isArray(a)?(o=a[0],l=a[1]):o=a;let c=s;if(null!==r){if(!r.hasOwnProperty(s))continue;c=r[s]}0===e?iu(n,i,c,o,l):iu(n,i,c,o)}return n}function iu(e,t,i,n,r){let s;e.hasOwnProperty(i)?(s=e[i]).push(t,n):s=e[i]=[t,n],void 0!==r&&s.push(r)}function nu(e,t,i,n,r,s,a,o){let l,c=ka(t,i),d=t.inputs;!o&&null!=d&&(l=d[n])?(_u(e,i,l,n,r),da(t)&&function(e,t){let i=Pa(t,e);16&i[Bs]||(i[Bs]|=64)}(i,t.index)):3&t.type?(n=function(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(n),r=null!=a?a(r,t.value||"",n):r,s.setProperty(c,n,r)):t.type}function ru(e,t,i,n){if(qa()){let r,s,a=null===n?null:{"":-1},o=function(e,t){let i=e.directiveRegistry,n=null,r=null;if(i)for(let s=0;s<i.length;s++){let a=i[s];if(Hr(t,a.selectors,!1))if(n||(n=[]),pa(a))if(null!==a.findHostDirectiveDefs){let i=[];r=r||new Map,a.findHostDirectiveDefs(a,i,r),n.unshift(...i,a),lu(e,t,i.length)}else n.unshift(a),lu(e,t,0);else r=r||new Map,a.findHostDirectiveDefs?.(a,n,r),n.push(a)}return null===n?null:[n,r]}(e,i);null===o?r=s=null:[r,s]=o,null!==r&&su(e,t,i,r,a,s),a&&function(e,t,i){if(t){let n=e.localNames=[];for(let e=0;e<t.length;e+=2){let r=i[t[e+1]];if(null==r)throw new mn(-301,!1);n.push(t[e],r)}}}(i,n,a)}i.mergedAttrs=Fr(i.mergedAttrs,i.attrs)}function su(e,t,i,n,r,s){for(let r=0;r<n.length;r++)Jo(Yo(i,t),e,n[r].type);!function(e,t,i){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+i,e.providerIndexes=t}(i,e.data.length,n.length);for(let e=0;e<n.length;e++){let t=n[e];t.providersResolver&&t.providersResolver(t)}let a=!1,o=!1,l=Hd(e,t,n.length,null);for(let s=0;s<n.length;s++){let c=n[s];i.mergedAttrs=Fr(i.mergedAttrs,c.hostAttrs),du(e,i,t,l,c),cu(l,c,r),null!==c.contentQueries&&(i.flags|=4),(null!==c.hostBindings||null!==c.hostAttrs||0!==c.hostVars)&&(i.flags|=64);let d=c.type.prototype;!a&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((e.preOrderHooks??=[]).push(i.index),a=!0),!o&&(d.ngOnChanges||d.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(i.index),o=!0),l++}!function(e,t,i){let n=t.directiveStart,r=t.directiveEnd,s=e.data,a=t.attrs,o=[],l=null,c=null;for(let e=n;e<r;e++){let n=s[e],r=i?i.get(n):null,d=r?r.inputs:null,u=r?r.outputs:null;l=tu(0,n.inputs,e,l,d),c=tu(1,n.outputs,e,c,u);let p=null===l||null===a||qr(t)?null:hu(l,e,a);o.push(p)}null!==l&&(l.hasOwnProperty("class")&&(t.flags|=8),l.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=o,t.inputs=l,t.outputs=c}(e,i,s)}function au(e,t,i){let n=i.directiveStart,r=i.directiveEnd,s=i.index,a=Ua.lFrame.currentDirectiveIndex;try{wo(s);for(let i=n;i<r;i++){let n=e.data[i],r=t[i];ao(i),(null!==n.hostBindings||0!==n.hostVars||null!==n.hostAttrs)&&ou(n,r)}}finally{wo(-1),ao(a)}}function ou(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}
1function lu(e,t,i){t.componentOffset=i,(e.components??=[]).push(t.index)}function cu(e,t,i){if(i){if(t.exportAs)for(let n=0;n<t.exportAs.length;n++)i[t.exportAs[n]]=e;pa(t)&&(i[""]=e)}}function du(e,t,i,n,r){e.data[n]=r;let s=r.factory||(r.factory=br(r.type)),a=new Ro(s,pa(r),$d);e.blueprint[n]=a,i[n]=a,function(e,t,i,n,r){let s=r.hostBindings;if(s){let r=e.hostBindingOpCodes;null===r&&(r=e.hostBindingOpCodes=[]);let a=~t.index;(function(e){let t=e.length;for(;t>0;){let i=e[--t];if("number"==typeof i&&i<0)return i}return 0})(r)!=a&&r.push(a),r.push(i,n,s)}}(e,t,n,Hd(e,i,r.hostVars,Ud),r)}function uu(e,t,i,n,r,s){let a=ka(e,t);!function(e,t,i,n,r,s,a){if(null==s)e.removeAttribute(t,r,i);else{let o=null==a?Hn(s):a(s,n||"",r);e.setAttribute(t,r,o,i)}}(t[$s],a,s,e.value,i,n,r)}function pu(e,t,i,n,r,s){let a=s[t];if(null!==a)for(let e=0;e<a.length;){jd(n,i,a[e++],a[e++],a[e++],a[e++])}}function hu(e,t,i){let n=null,r=0;for(;r<i.length;){let s=i[r];if(0!==s)if(5!==s){if("number"==typeof s)break;if(e.hasOwnProperty(s)){null===n&&(n=[]);let a=e[s];for(let e=0;e<a.length;e+=3)if(a[e]===t){n.push(s,a[e+1],a[e+2],i[r+1]);break}}r+=2}else r+=2;else r+=4}return n}function fu(e,t,i,n){return[e,!0,0,t,null,n,null,i,null,null]}function mu(e,t){let i=e.contentQueries;if(null!==i){let n=be(null);try{for(let n=0;n<i.length;n+=2){let r=i[n],s=i[n+1];if(-1!==s){let i=e.data[s];lo(r),i.contentQueries(2,t[s],s)}}}finally{be(n)}}}function gu(e,t){return e[js]?e[zs][Rs]=t:e[js]=t,e[zs]=t,t}function bu(e,t,i){lo(0);let n=be(null);try{t(e,i)}finally{be(n)}}function yu(e){return e[Ns]??=[]}function vu(e){return e.cleanup??=[]}function wu(e,t){let i=e[Vs],n=i?i.get(Ll,null):null;n&&n.handleError(t)}function _u(e,t,i,n,r){for(let s=0;s<i.length;){let a=i[s++],o=i[s++],l=i[s++],c=t[a];jd(e.data[a],c,n,o,l,r)}}function Su(e,t,i){let n=Aa(t,e);!function(e,t,i){e.setValue(t,i)}(e[$s],n,i)}function Cu(e,t){let i=Pa(t,e),n=i[Os];!function(e,t){for(let i=t.length;i<e.blueprint.length;i++)t.push(e.blueprint[i])}(n,i);let r=i[Ds];null!==r&&null===i[Fs]&&(i[Fs]=lc(r,i[Vs])),Iu(n,i,i[Us])}function Iu(e,t,i){po(t);try{let n=e.viewQuery;null!==n&&bu(1,n,i);let r=e.template;null!==r&&Yd(e,t,r,1,i),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ks]?.finishViewCreation(e),e.staticContentQueries&&mu(e,t),e.staticViewQueries&&bu(2,e.viewQuery,i);let s=e.components;null!==s&&function(e,t){for(let i=0;i<t.length;i++)Cu(e,t[i])}(t,s)}catch(t){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),t}finally{t[Bs]&=-5,bo()}}function Au(e,t,i,n){let r=be(null);try{let r=t.tView,s=zd(e,r,i,4096&e[Bs]?4096:16,null,t,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),a=e[t.index];s[Ys]=a;let o=e[Ks];return null!==o&&(s[Ks]=o.createEmbeddedView(r)),Iu(r,s,i),s}finally{be(r)}}function ku(e,t){let i=sa+t;if(i<e.length)return e[i]}function xu(e,t){return!t||null===t.firstChild||zl(e)}function Tu(e,t,i,n=!0){let r=t[Os];if(function(e,t,i,n){let r=sa+n,s=i.length;n>0&&(i[r-1][Rs]=t),n<s-sa?(t[Rs]=i[r],vr(i,sa+n,t)):(i.push(t),t[Rs]=null),t[Ms]=i;let a=t[Ys];null!==a&&i!==a&&bd(a,t);let o=t[Ks];null!==o&&o.insertView(e),Ra(t),t[Bs]|=128}(r,t,e,i),n){let n=Bd(i,e),s=t[$s],a=kd(s,e[na]);null!==a&&function(e,t,i,n,r,s){n[Ds]=r,n[Ls]=t,Rd(e,n,i,1,r,s)}(r,e[Ls],s,t,a,n)}let s=t[Fs];null!==s&&null!==s.firstChild&&(s.firstChild=null)}function Pu(e,t){let i=vd(e,t);return void 0!==i&&wd(i[Os],i),i}function Eu(e,t,i,n,r=!1){for(;null!==i;){if(128===i.type){i=r?i.projectionNext:i.next;continue}let s=t[i.index];null!==s&&n.push(Ia(s)),la(s)&&Du(s,n);let a=i.type;if(8&a)Eu(e,t,i.child,n);else if(32&a){let e,r=pd(i,t);for(;e=r();)n.push(e)}else if(16&a){let e=Od(t,i);if(Array.isArray(e))n.push(...e);else{let i=Na(t[Hs]);Eu(i[Os],i,e,n,!0)}}i=r?i.projectionNext:i.next}return n}function Du(e,t){for(let i=sa;i<e.length;i++){let n=e[i],r=n[Os].firstChild;null!==r&&Eu(n[Os],n,r,t)}e[na]!==e[Ds]&&t.push(e[na])}var Ou=[];function Bu(e){return e[ea]??function(e){let t=Ou.pop()??Object.create(Mu);return t.lView=e,t}(e)}var Mu=f(h({},ye),{consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{La(e.lView)},consumerOnSignalRead(){this.lView[ea]=this}});var Ru=f(h({},ye),{consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let t=Na(e.lView);for(;t&&!Lu(t[Os]);)t=Na(t);t&&Ba(t)},consumerOnSignalRead(){this.lView[ea]=this}});function Lu(e){return 2!==e.type}var Fu=100;function Nu(e,t=!0,i=0){let n=e[qs],r=n.rendererFactory;r.begin?.();try{!function(e,t){let i=Xa();try{eo(!0),ju(e,t);let i=0;for(;Ma(e);){if(i===Fu)throw new mn(103,!1);i++,ju(e,1)}}finally{eo(i)}}(e,i)}catch(i){throw t&&wu(e,i),i}finally{r.end?.(),n.inlineEffectRunner?.flush()}}function Uu(e,t,i,n){let r=t[Bs];if(!(256&~r))return;t[qs].inlineEffectRunner?.flush(),po(t);let s=!0,a=null,o=null;Lu(e)?(o=Bu(t),a=Ie(o)):null===he?(s=!1,o=function(e){let t=e[ea]??Object.create(Ru);return t.lView=e,t}(t),a=Ie(o)):t[ea]&&(xe(t[ea]),t[ea]=null);try{Oa(t),function(e){Ua.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==i&&Yd(e,t,i,2,n);let s=!(3&~r);
1if(s){let i=e.preOrderCheckHooks;null!==i&&To(t,i,null)}else{let i=e.preOrderHooks;null!==i&&Po(t,i,0,null),Eo(t,0)}if(function(e){for(let t=Jl(e);null!==t;t=Zl(t)){if(!(t[Bs]&aa.HasTransplantedViews))continue;let e=t[ra];for(let t=0;t<e.length;t++){Ba(e[t])}}}(t),Vu(t,0),null!==e.contentQueries&&mu(e,t),s){let i=e.contentCheckHooks;null!==i&&To(t,i)}else{let i=e.contentHooks;null!==i&&Po(t,i,1),Eo(t,1)}!function(e,t){let i=e.hostBindingOpCodes;if(null!==i)try{for(let e=0;e<i.length;e++){let n=i[e];if(n<0)wo(~n);else{let r=n,s=i[++e],a=i[++e];so(s,r),a(2,t[r])}}}finally{wo(-1)}}(e,t);let a=e.components;null!==a&&zu(t,a,0);let o=e.viewQuery;if(null!==o&&bu(2,o,n),s){let i=e.viewCheckHooks;null!==i&&To(t,i)}else{let i=e.viewHooks;null!==i&&Po(t,i,2),Eo(t,2)}if(!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),t[Xs]){for(let e of t[Xs])e();t[Xs]=null}t[Bs]&=-73}catch(e){throw La(t),e}finally{null!==o&&(Ae(o,a),s&&function(e){e.lView[ea]!==e&&(e.lView=null,Ou.push(e))}(o)),bo()}}function Vu(e,t){for(let i=Jl(e);null!==i;i=Zl(i))for(let e=sa;e<i.length;e++){$u(i[e],t)}}function qu(e,t,i){$u(Pa(t,e),i)}function $u(e,t){Ea(e)&&ju(e,t)}function ju(e,t){let i=e[Os],n=e[Bs],r=e[ea],s=!!(0===t&&16&n);if(s||=!!(64&n&&0===t),s||=!!(1024&n),s||=!(!r?.dirty||!ke(r)),s||=!1,r&&(r.dirty=!1),e[Bs]&=-9217,s)Uu(i,e,i.template,e[Us]);else if(8192&n){Vu(e,1);let t=i.components;null!==t&&zu(e,t,1)}}function zu(e,t,i){for(let n=0;n<t.length;n++)qu(e,t[n],i)}function Wu(e,t){let i=Xa()?64:1088;for(e[qs].changeDetectionScheduler?.notify(t);e;){e[Bs]|=i;let t=Na(e);if(ha(e)&&!t)return e;e=t}return null}var Hu=class{get rootNodes(){let e=this._lView,t=e[Os];return Eu(t,e,t.firstChild,[])}constructor(e,t,i=!0){this._lView=e,this._cdRefInjectingView=t,this.notifyErrorHandler=i,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[Us]}set context(e){this._lView[Us]=e}get destroyed(){return!(256&~this._lView[Bs])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Ms];if(la(e)){let t=e[8],i=t?t.indexOf(this):-1;i>-1&&(vd(e,i),wr(t,i))}this._attachedToViewContainer=!1}wd(this._lView[Os],this._lView)}onDestroy(e){Fa(this._lView,e)}markForCheck(){Wu(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Bs]&=-129}reattach(){Ra(this._lView),this._lView[Bs]|=128}detectChanges(){this._lView[Bs]|=1024,Nu(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new mn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=ha(this._lView),t=this._lView[Ys];null!==t&&!e&&yd(t,this._lView),gd(this._lView[Os],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new mn(902,!1);this._appRef=e;let t=ha(this._lView),i=this._lView[Ys];null!==i&&!t&&bd(i,this._lView),Ra(this._lView)}},Yu=(()=>{class e{static{this.__NG_ELEMENT_ID__=Qu}}return e})(),Gu=Yu,Ku=class extends Gu{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,i){let n=Au(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:i});return new Hu(n)}};function Qu(){return Ju(Ya(),ja())}function Ju(e,t){return 4&e.type?new Ku(t,e,Ul(e,t)):null}new RegExp("^(\\d+)*(b|h)*(.*)");var Zu=()=>null;function Xu(e,t){return Zu(e,t)}var ep=class{},tp=new Fn("",{providedIn:"root",factory:()=>!1}),ip=new Fn(""),np=new Fn(""),rp=class{},sp=class{};var ap="ngComponent",op=class{resolveComponentFactory(e){throw function(e){let t=Error(`No component factory found for ${Sn(e)}.`);return t[ap]=e,t}(e)}},lp=class{static{this.NULL=new op}},cp=class{},dp=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function(){let e=ja(),t=Pa(Ya().index,e);return(oa(t)?t:e)[$s]}()}}return e})();var up=(()=>{class e{static{this.ɵprov=Tn({token:e,providedIn:"root",factory:()=>null})}}return e})();
1function pp(e,t,i){let n=i?e.styles:null,r=i?e.classes:null,s=0;if(null!==t)for(let e=0;e<t.length;e++){let i=t[e];if("number"==typeof i)s=i;else if(1==s)r=Cn(r,i);else if(2==s){n=Cn(n,i+": "+t[++e]+";")}}i?e.styles=n:e.stylesWithoutHost=n,i?e.classes=r:e.classesWithoutHost=r}var hp=class extends lp{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=ns(e);return new mp(t,this.ngModule)}};function fp(e,t){let i=[];for(let n in e){if(!e.hasOwnProperty(n))continue;let r=e[n];if(void 0===r)continue;let s=Array.isArray(r),a=s?r[0]:r,o=s?r[1]:Or.None;t?i.push({propName:a,templateName:n,isSignal:!!(o&Or.SignalBased)}):i.push({propName:a,templateName:n})}return i}var mp=class extends sp{get inputs(){let e=this.componentDef,t=e.inputTransforms,i=fp(e.inputs,!0);if(null!==t)for(let e of i)t.hasOwnProperty(e.propName)&&(e.transform=t[e.propName]);return i}get outputs(){return fp(this.componentDef.outputs,!1)}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=function(e){return e.map(Kr).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}create(e,t,i,n){let r=be(null);try{let r=(n=n||this.ngModule)instanceof Cs?n:n?.injector;r&&null!==this.componentDef.getStandaloneInjector&&(r=this.componentDef.getStandaloneInjector(r)||r);let s=r?new Fo(e,r):e,a=s.get(cp,null);if(null===a)throw new mn(407,!1);let o={rendererFactory:a,sanitizer:s.get(up,null),inlineEffectRunner:null,changeDetectionScheduler:s.get(ep,null)},l=a.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",d=i?Xd(l,i,this.componentDef.encapsulation,s):md(l,c,function(e){let t=e.toLowerCase();return"svg"===t?Ca:"math"===t?"math":null}(c)),u=512;this.componentDef.signals?u|=4096:this.componentDef.onPush||(u|=16);let p=null;null!==d&&(p=lc(d,s,!0));let h=Zd(0,null,null,1,0,null,null,null,null,null,null),f=zd(null,h,null,u,null,null,o,l,s,null,p);po(f);let m,g,b=null;try{let e,n=this.componentDef,r=null;n.findHostDirectiveDefs?(e=[],r=new Map,n.findHostDirectiveDefs(n,e,r),e.push(n)):e=[n];let s=function(e,t){let i=e[Os],n=ta;return e[n]=t,Wd(i,n,2,"#host",null)}(f,d);b=function(e,t,i,n,r,s,a){let o=r[Os];!function(e,t,i,n){for(let i of e)t.mergedAttrs=Fr(t.mergedAttrs,i.hostAttrs);null!==t.mergedAttrs&&(pp(t,t.mergedAttrs,!0),null!==i&&Nd(n,i,t))}(n,e,t,a);let l=null;null!==t&&(l=lc(t,r[Vs]));let c=s.rendererFactory.createRenderer(t,i),d=16;i.signals?d=4096:i.onPush&&(d=64);let u=zd(r,Jd(i),null,d,r[e.index],e,s,c,null,null,l);return o.firstCreatePass&&lu(o,e,n.length-1),gu(r,u),r[e.index]=u}(s,d,n,e,f,o,l),g=xa(h,ta),d&&function(e,t,i,n){if(n)Mr(e,i,["ng-version","18.2.12"]);else{let{attrs:n,classes:r}=function(e){let t=[],i=[],n=1,r=2;for(;n<e.length;){let s=e[n];if("string"==typeof s)2===r?""!==s&&t.push(s,e[++n]):8===r&&i.push(s);else{if(!zr(r))break;r=s}n++}return{attrs:t,classes:i}}(t.selectors[0]);n&&Mr(e,i,n),r&&r.length>0&&Fd(e,i,r.join(" "))}}(l,n,d,i),void 0!==t&&function(e,t,i){let n=e.projection=[];for(let e=0;e<t.length;e++){let t=i[e];n.push(null!=t?Array.from(t):null)}}(g,this.ngContentSelectors,t),m=function(e,t,i,n,r,s){let a=Ya(),o=r[Os],l=ka(a,r);su(o,r,a,i,null,n);for(let e=0;e<i.length;e++){Ql(rl(r,o,a.directiveStart+e,a),r)}au(o,r,a),l&&Ql(l,r);let c=rl(r,o,a.directiveStart+a.componentOffset,a);if(e[Us]=r[Us]=c,null!==s)for(let e of s)e(c,t);return Gd(o,a,r),c}(b,n,e,r,f,[bp]),Iu(h,f,null)}catch(e){throw null!==b&&Yl(b),Yl(f),e}finally{bo()}return new gp(this.componentType,m,Ul(g,f),f,g)}finally{be(r)}}},gp=class extends rp{constructor(e,t,i,n,r){super(),this.location=i,this._rootLView=n,this._tNode=r,this.previousInputValues=null,this.instance=t,this.hostView=this.changeDetectorRef=new Hu(n,void 0,!1),this.componentType=e}setInput(e,t){let i,n=this._tNode.inputs;if(null!==n&&(i=n[e])){if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let n=this._rootLView;_u(n[Os],n,i,e,t),this.previousInputValues.set(e,t),Wu(Pa(this._tNode.index,n),1)}}get injector(){return new ol(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function bp(){let e=Ya();xo(ja()[Os],e)}var yp=(()=>{class e{static{this.__NG_ELEMENT_ID__=vp}}return e})();function vp(){return Ip(Ya(),ja())}var wp=yp,_p=class extends wp{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}
1get element(){return Ul(this._hostTNode,this._hostLView)}get injector(){return new ol(this._hostTNode,this._hostLView)}get parentInjector(){let e=Qo(this._hostTNode,this._hostLView);if(No(e)){let t=Vo(e,this._hostLView),i=Uo(e),n=t[Os].data[i+8];return new ol(n,t)}return new ol(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=Sp(this._lContainer);return null!==t&&t[e]||null}get length(){return this._lContainer.length-sa}createEmbeddedView(e,t,i){let n,r;"number"==typeof i?n=i:null!=i&&(n=i.index,r=i.injector);let s=Xu(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},r,s);return this.insertImpl(a,n,xu(this._hostTNode,s)),a}createComponent(e,t,i,n,r){let s,a=e&&!function(e){return"function"==typeof e}(e);if(a)s=t;else{let e=t||{};s=e.index,i=e.injector,n=e.projectableNodes,r=e.environmentInjector||e.ngModuleRef}let o=a?e:new mp(ns(e)),l=i||this.parentInjector;if(!r&&null==o.ngModule){let e=(a?l:this.parentInjector).get(Cs,null);e&&(r=e)}let c=ns(o.componentType??{}),d=Xu(this._lContainer,c?.id??null),u=d?.firstChild??null,p=o.create(l,n,u,r);return this.insertImpl(p.hostView,s,xu(this._hostTNode,d)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let n=e._lView;if(function(e){return la(e[Ms])}(n)){let t=this.indexOf(e);if(-1!==t)this.detach(t);else{let t=n[Ms],i=new _p(t,t[Ls],t[Ms]);i.detach(i.indexOf(e))}}let r=this._adjustIndex(t),s=this._lContainer;return Tu(s,n,r,i),e.attachToViewContainerRef(),vr(Cp(s),r,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=Sp(this._lContainer);return null!==t?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=vd(this._lContainer,t);i&&(wr(Cp(this._lContainer),t),wd(i[Os],i))}detach(e){let t=this._adjustIndex(e,-1),i=vd(this._lContainer,t);return i&&null!=wr(Cp(this._lContainer),t)?new Hu(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function Sp(e){return e[8]}function Cp(e){return e[8]||(e[8]=[])}function Ip(e,t){let i,n=t[e.index];return la(n)?i=n:(i=fu(n,t,null,e),t[e.index]=i,gu(t,i)),Ap(i,t,e,n),new _p(i,e,t)}var Ap=function(e,t,i,n){if(e[na])return;let r;r=8&i.type?Ia(n):function(e,t){let i=e[$s],n=i.createComment(""),r=ka(t,e);return Cd(i,kd(i,r),n,function(e,t){return e.nextSibling(t)}(i,r),!1),n}(t,i),e[na]=r},kp=()=>!1;var xp=class e{constructor(e){this.queryList=e,this.matches=null}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},Tp=class e{constructor(e=[]){this.queries=e}createEmbeddedView(t){let i=t.queries;if(null!==i){let n=null!==t.contentQueries?t.contentQueries[0]:i.length,r=[];for(let e=0;e<n;e++){let t=i.getByIndex(e),n=this.queries[t.indexInDeclarationView];r.push(n.clone())}return new e(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==Np(e,t).matches&&this.queries[t].setDirty()}},Pp=class{constructor(e,t,i=null){this.flags=t,this.read=i,this.predicate="string"==typeof e?function(e){return e.split(",").map((e=>e.trim()))}(e):e}},Ep=class e{constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(t){let i=null;for(let e=0;e<this.length;e++){let n=null!==i?i.length:0,r=this.getByIndex(e).embeddedTView(t,n);r&&(r.indexInDeclarationView=e,null!==i?i.push(r):i=[r])}return null!==i?new e(i):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Dp=class e{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(t,i){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,i),new e(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&1&~this.metadata.flags){let t=this._declarationNodeIndex,i=e.parent;for(;null!==i&&8&i.type&&i.index!==t;)i=i.parent;return t===(null!==i?i.index:-1)}return this._appliesToNextNode}
1matchTNode(e,t){let i=this.metadata.predicate;if(Array.isArray(i))for(let n=0;n<i.length;n++){let r=i[n];this.matchTNodeWithReadOption(e,t,Op(t,r)),this.matchTNodeWithReadOption(e,t,nl(t,e,r,!1,!1))}else i===Yu?4&t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,nl(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(null!==i){let n=this.metadata.read;if(null!==n)if(n===Vl||n===yp||n===Yu&&4&t.type)this.addMatch(t.index,-2);else{let i=nl(t,e,n,!1,!1);null!==i&&this.addMatch(t.index,i)}else this.addMatch(t.index,i)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}};function Op(e,t){let i=e.localNames;if(null!==i)for(let e=0;e<i.length;e+=2)if(i[e]===t)return i[e+1];return null}function Bp(e,t,i,n){return-1===i?function(e,t){return 11&e.type?Ul(e,t):4&e.type?Ju(e,t):null}(t,e):-2===i?function(e,t,i){if(i===Vl)return Ul(t,e);if(i===Yu)return Ju(t,e);if(i===yp)return Ip(t,e)}(e,t,n):rl(e,e[Os],i,t)}function Mp(e,t,i,n){let r=t[Ks].queries[n];if(null===r.matches){let n=e.data,s=i.matches,a=[];for(let e=0;null!==s&&e<s.length;e+=2){let r=s[e];if(r<0)a.push(null);else{let o=n[r];a.push(Bp(t,o,s[e+1],i.metadata.read))}}r.matches=a}return r.matches}function Rp(e,t,i,n){let r=e.queries.getByIndex(i),s=r.matches;if(null!==s){let a=Mp(e,t,r,i);for(let e=0;e<s.length;e+=2){let i=s[e];if(i>0)n.push(a[e/2]);else{let r=s[e+1],a=t[-i];for(let e=sa;e<a.length;e++){let t=a[e];t[Ys]===t[Ms]&&Rp(t[Os],t,r,n)}if(null!==a[ra]){let e=a[ra];for(let t=0;t<e.length;t++){let i=e[t];Rp(i[Os],i,r,n)}}}}}return n}function Lp(e,t,i){let n=new jl(!(4&~i));return function(e,t,i,n){let r=yu(t);r.push(i),e.firstCreatePass&&vu(e).push(n,r.length-1)}(e,t,n,n.destroy),(t[Ks]??=new Tp).queries.push(new xp(n))-1}function Fp(e,t,i){let n=za();return n.firstCreatePass&&(function(e,t,i){null===e.queries&&(e.queries=new Ep),e.queries.track(new Dp(t,i))}(n,new Pp(e,t,i),-1),!(2&~t)&&(n.staticViewQueries=!0)),Lp(n,ja(),t)}function Np(e,t){return e.queries.getByIndex(t)}function Up(e,t){let i=e[Os],n=Np(i,t);return n.crossesNgTemplate?Rp(i,e,t,[]):Mp(i,e,n,t)}var Vp=new Set;function qp(e){Vp.has(e)||(Vp.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function $p(e,t){qp("NgSignals");let i=function(e){let t=Object.create($e);t.value=e;let i=()=>(ve(t),t.value);return i[ge]=t,i}(e),n=i[ge];return t?.equal&&(n.equal=t.equal),i.set=e=>qe(n,e),i.update=e=>function(e,t){Se()||Ue(),qe(e,t(e.value))}(n,e),i.asReadonly=jp.bind(i),i}function jp(){let e=this[ge];if(void 0===e.readonlyFn){let t=()=>this();t[ge]=e,e.readonlyFn=t}return e.readonlyFn}function zp(e){return function(e){return"function"==typeof e&&void 0!==e[ge]}(e)&&"function"==typeof e.set}new Map,new Set;function Wp(e){let t=function(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),i=!0,n=[e];for(;t;){let r;if(pa(e))r=t.ɵcmp||t.ɵdir;else{if(t.ɵcmp)throw new mn(903,!1);r=t.ɵdir}if(r){if(i){n.push(r);let t=e;t.inputs=Yp(e.inputs),t.inputTransforms=Yp(e.inputTransforms),t.declaredInputs=Yp(e.declaredInputs),t.outputs=Yp(e.outputs);let i=r.hostBindings;i&&Qp(e,i);let s=r.viewQuery,a=r.contentQueries;if(s&&Gp(e,s),a&&Kp(e,a),Hp(e,r),_n(e.outputs,r.outputs),pa(r)&&r.data.animation){let t=e.data;t.animation=(t.animation||[]).concat(r.data.animation)}}let t=r.features;if(t)for(let n=0;n<t.length;n++){let r=t[n];r&&r.ngInherit&&r(e),r===Wp&&(i=!1)}}t=Object.getPrototypeOf(t)}!function(e){let t=0,i=null;for(let n=e.length-1;n>=0;n--){let r=e[n];r.hostVars=t+=r.hostVars,r.hostAttrs=Fr(r.hostAttrs,i=Fr(i,r.hostAttrs))}}(n)}function Hp(e,t){for(let i in t.inputs){if(!t.inputs.hasOwnProperty(i)||e.inputs.hasOwnProperty(i))continue;let n=t.inputs[i];if(void 0!==n&&(e.inputs[i]=n,e.declaredInputs[i]=t.declaredInputs[i],null!==t.inputTransforms)){let i=Array.isArray(n)?n[0]:n;if(!t.inputTransforms.hasOwnProperty(i))continue;e.inputTransforms??={},e.inputTransforms[i]=t.inputTransforms[i]}}}function Yp(e){return e===Ir?{}:e===Ar?[]:e}function Gp(e,t){let i=e.viewQuery;e.viewQuery=i?(e,n)=>{t(e,n),i(e,n)}:t}function Kp(e,t){let i=e.contentQueries;e.contentQueries=i?(e,n,r)=>{t(e,n,r),i(e,n,r)}:t}function Qp(e,t){let i=e.hostBindings;e.hostBindings=i?(e,n)=>{t(e,n),i(e,n)}:t}var Jp=class{},Zp=class{},Xp=class extends Jp{constructor(e,t,i,n=!0){super(),this.ngModuleType=e,this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new hp(this);let r=as(e);this._bootstrapComponents=cd(r.bootstrap),this._r3Injector=hl(e,t,[{provide:Jp,useValue:this},{provide:lp,useValue:this.componentFactoryResolver},...i],Sn(e),new Set(["environment"])),n&&this.resolveInjectorInitializer
1s()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach((e=>e())),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},eh=class extends Zp{constructor(e){super(),this.moduleType=e}create(e){return new Xp(this.moduleType,e,[])}};var th=class extends Jp{constructor(e){super(),this.componentFactoryResolver=new hp(this),this.instance=null;let t=new Is([...e.providers,{provide:Jp,useValue:this},{provide:lp,useValue:this.componentFactoryResolver}],e.parent||Ss(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ih(e,t,i=null){return new th({providers:e,parent:t,debugName:i,runEnvironmentInitializers:!0}).injector}function nh(e){return!!rh(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function rh(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function sh(e,t,i){return e[t]=i}function ah(e,t){return e[t]}function oh(e,t,i){let n=e[t];return!Object.is(n,i)&&(e[t]=i,!0)}function lh(e,t,i,n){let r=oh(e,t,i);return oh(e,t+1,n)||r}function ch(e,t,i,n,r){let s=lh(e,t,i,n);return oh(e,t+2,r)||s}function dh(e,t,i,n,r,s){let a=lh(e,t,i,n);return lh(e,t+2,r,s)||a}function uh(e,t,i,n,r,s,a,o,l,c){let d=i+ta,u=t.firstCreatePass?function(e,t,i,n,r,s,a,o,l){let c=t.consts,d=Wd(t,e,4,a||null,o||null);ru(t,i,d,Da(c,l)),xo(t,d);let u=d.tView=Zd(2,d,n,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return null!==t.queries&&(t.queries.template(t,d),u.queries=t.queries.embeddedTView(d)),d}(d,t,e,n,r,s,a,o,l):t.data[d];Ka(u,!1);let p=hh(t,e,u,i);Ao()&&Ed(t,e,p,u),Ql(p,e);let h=fu(p,e,p,u);return e[d]=h,gu(e,h),function(e,t,i){kp(e,t,i)}(h,u,e),ua(u)&&Kd(t,e,u),null!=l&&Qd(e,u,c),u}function ph(e,t,i,n,r,s,a,o){let l=ja(),c=za();return uh(l,c,e,t,i,n,r,Da(c.consts,s),a,o),ph}var hh=function(e,t,i,n){return ko(!0),t[$s].createComment("")};var fh=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(fh||{}),mh=(()=>{class e{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.ɵprov=Tn({token:e,providedIn:"root",factory:()=>new e})}}return e})();(class e{constructor(){this.ngZone=cr(Tl),this.scheduler=cr(ep),this.errorHandler=cr(Ll,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[fh.EarlyRead,fh.Write,fh.MixedReadWrite,fh.Read]}execute(){this.executing=!0;for(let t of e.PHASES)for(let e of this.sequences)if(!e.erroredOrDestroyed&&e.hooks[t])try{e.pipelinedValue=this.ngZone.runOutsideAngular((()=>e.hooks[t](e.pipelinedValue)))}catch(t){e.erroredOrDestroyed=!0,this.errorHandler?.handleError(t)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&(this.sequences.delete(e),e.destroy());for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(e){this.executing?this.deferredRegistrations.add(e):(this.sequences.add(e),this.scheduler.notify(6))}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}static{this.ɵprov=Tn({token:e,providedIn:"root",factory:()=>new e})}});function gh(e,t,i,n){let r=ja();if(oh(r,no(),t)){za();uu(_o(),r,e,t,i,n)}return gh}function bh(e,t,i,n){return oh(e,no(),i)?t+Hn(i)+n:Ud}function yh(e,t,i,n,r,s){let a=lh(e,io(),i,r);return ro(2),a?t+Hn(i)+n+Hn(r)+s:Ud}function vh(e,t,i,n,r,s,a,o){let l=ch(e,io(),i,r,a);return ro(3),l?t+Hn(i)+n+Hn(r)+s+Hn(a)+o:Ud}function wh(e,t,i,n,r,s,a,o,l,c){let d=dh(e,io(),i,r,a,l);return ro(4),d?t+Hn(i)+n+Hn(r)+s+Hn(a)+o+Hn(l)+c:Ud}function _h(e,t,i,n,r,s){let a=ja(),o=bh(a,t,i,n);if(o!==Ud){uu(_o(),a,e,o,r,s)}return _h}function Sh(e,t,i,n,r,s,a,o){let l=ja(),c=yh(l,t,i,n,r,s);if(c!==Ud){uu(_o(),l,e,c,a,o)}return Sh}function Ch(e,t,i,n,r,s,a,o,l,c){let d=ja(),u=vh(d,t,i,n,r,s,a,o);if(u!==Ud){uu(_o(),d,e,u,l,c)}return Ch}function Ih(e,t,i,n,r,s,a,o,l,c,d,u){let p=ja(),h=wh(p,t,i,n,r,s,a,o,l,c);if(h!==Ud){uu(_o(),p,e,h,d,u)}return Ih}function Ah(e,t,i,n,r,s,a,o,l,c,d,u,p,h){let f=ja(),m=function(e,t,i,n,r,s,a,o,l,c,d,u){let p=io(),h=dh(e,p,i,r,a,l);return h=oh(e,p+4,d)||h,ro(5),h?t+Hn(i)+n+Hn(r)+s+Hn(a)+o+Hn(l)+c+Hn(d)+u:Ud}(f,t,i,n,r,s,a,o,l,c,d,u);if(m!==Ud){uu(_o(),f,e,m,p,h)}return Ah}function kh(e,t){return e<<17|t<<2}function xh(e){return e>>17&32767}function Th(e){return 2|e}function Ph(e){return(131068&e)>>2}function Eh(e,t){return-131069&e|t<<2}function Dh(e){return 1|e}function Oh(e,t,i,n,r,s){let a=s?t.classBindings:t.styleBindings,o=xh(a),l=Ph(a);e[n]=i;let c,d=!1;if(Array.isArray(i)){let e=i;c=e[1],(null===c||Cr(e,c)>0)&&(d=!0)}else c=i;if(r)if(0!==l){let t=xh(e[o+1]);e[n+1]=kh(t,o),0!==t&&(e[t+1]=Eh(e[t+1],n)),e[o+1]=function(e,t){return 131071&e|t<<17}(e[o+1],n)}else e[n+1]=kh(o,0),0!==o&&(e[o+1]=Eh(e[o+1],n)),o=n;else e[n+1]=kh(l,0),0===o?o=n:e[l+1]=Eh(e[l+1],n),l=n;d&&(e[n+1]=Th(e[n+1])),Bh(e,c,n,!0),Bh(e,c,n,!1),function(e,t,i,n,r){let s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof t&&Cr(s,t)>=0&&(i[n+1]=Dh(i[n+1]))}(t,c,e,n,s),a=kh(o,l),s?t.classBindings=a:t.styleBindings=a}function Bh(e,t,i,n){let r=e[i+1],s=null===t,a=n?xh(r):Ph(r),o=!1;for(;0!==a&&(!1===o||s);){let i=e[a],r=e[a+1];Mh(i,t)&&(o=!0,e[a+1]=n?Dh(r):Th(r)),a=n?xh(r):Ph(r)}o&&(e[i+1]=n?Th(r):Dh(r))}function Mh(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Cr(e,t)>=0}var Rh={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0}
1;function Lh(e){return e.substring(Rh.key,Rh.keyEnd)}function Fh(e){return e.substring(Rh.value,Rh.valueEnd)}function Nh(e,t){let i=Rh.textEnd;return i===t?-1:(t=Rh.keyEnd=function(e,t,i){for(;t<i&&e.charCodeAt(t)>32;)t++;return t}(e,Rh.key=t,i),qh(e,t,i))}function Uh(e,t){let i=Rh.textEnd,n=Rh.key=qh(e,t,i);return i===n?-1:(n=Rh.keyEnd=function(e,t,i){let n;for(;t<i&&(45===(n=e.charCodeAt(t))||95===n||(-33&n)>=65&&(-33&n)<=90||n>=48&&n<=57);)t++;return t}(e,n,i),n=$h(e,n,i,58),n=Rh.value=qh(e,n,i),n=Rh.valueEnd=function(e,t,i){let n=-1,r=-1,s=-1,a=t,o=a;for(;a<i;){let l=e.charCodeAt(a++);if(59===l)return o;34===l||39===l?o=a=jh(e,l,a,i):t===a-4&&85===s&&82===r&&76===n&&40===l?o=a=jh(e,41,a,i):l>32&&(o=a),s=r,r=n,n=-33&l}return o}(e,n,i),$h(e,n,i,59))}function Vh(e){Rh.key=0,Rh.keyEnd=0,Rh.value=0,Rh.valueEnd=0,Rh.textEnd=e.length}function qh(e,t,i){for(;t<i&&e.charCodeAt(t)<=32;)t++;return t}function $h(e,t,i,n){return(t=qh(e,t,i))<i&&t++,t}function jh(e,t,i,n){let r=-1,s=i;for(;s<n;){let i=e.charCodeAt(s++);if(i==t&&92!==r)return s;r=92==i&&92===r?0:i}throw new Error}function zh(e,t,i){let n=ja();if(oh(n,no(),t)){nu(za(),_o(),n,e,t,n[$s],i,!1)}return zh}function Wh(e,t,i,n,r){let s=r?"class":"style";_u(e,i,t.inputs[s],s,n)}function Hh(e,t,i){return Jh(e,t,i,!1),Hh}function Yh(e,t){return Jh(e,t,null,!0),Yh}function Gh(e,t){for(let i=function(e){return Vh(e),Uh(e,qh(e,0,Rh.textEnd))}(t);i>=0;i=Uh(t,i))rf(e,Lh(t),Fh(t))}function Kh(e){Zh(sf,Qh,e,!0)}function Qh(e,t){for(let i=function(e){return Vh(e),Nh(e,qh(e,0,Rh.textEnd))}(t);i>=0;i=Nh(t,i))_r(e,Lh(t),!0)}function Jh(e,t,i,n){let r=ja(),s=za(),a=ro(2);if(s.firstUpdatePass&&ef(s,e,a,n),t!==Ud&&oh(r,a,t)){af(s,s.data[vo()],r,r[$s],e,r[a+1]=function(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=Sn(_c(e)))),e}(t,i),n,a)}}function Zh(e,t,i,n){let r=za(),s=ro(2);r.firstUpdatePass&&ef(r,null,s,n);let a=ja();if(i!==Ud&&oh(a,s,i)){let o=r.data[vo()];if(cf(o,n)&&!Xh(r,s)){let e=n?o.classesWithoutHost:o.stylesWithoutHost;null!==e&&(i=Cn(e,i||"")),Wh(r,o,a,i,n)}else!function(e,t,i,n,r,s,a,o){r===Ud&&(r=Ar);let l=0,c=0,d=0<r.length?r[0]:null,u=0<s.length?s[0]:null;for(;null!==d||null!==u;){let p,h=l<r.length?r[l+1]:void 0,f=c<s.length?s[c+1]:void 0,m=null;d===u?(l+=2,c+=2,h!==f&&(m=u,p=f)):null===u||null!==d&&d<u?(l+=2,m=d):(c+=2,m=u,p=f),null!==m&&af(e,t,i,n,m,p,a,o),d=l<r.length?r[l]:null,u=c<s.length?s[c]:null}}(r,o,a,a[$s],a[s+1],a[s+1]=function(e,t,i){if(null==i||""===i)return Ar;let n=[],r=_c(i);if(Array.isArray(r))for(let t=0;t<r.length;t++)e(n,r[t],!0);else if("object"==typeof r)for(let t in r)r.hasOwnProperty(t)&&e(n,t,r[t]);else"string"==typeof r&&t(n,r);return n}(e,t,i),n,s)}}function Xh(e,t){return t>=e.expandoStartIndex}function ef(e,t,i,n){let r=e.data;if(null===r[i+1]){let s=r[vo()],a=Xh(e,i);cf(s,n)&&null===t&&!a&&(t=!1),t=function(e,t,i,n){let r=function(e){let t=Ua.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e),s=n?t.residualClasses:t.residualStyles;if(null===r)0===(n?t.classBindings:t.styleBindings)&&(i=tf(null,e,t,i,n),i=nf(i,t.attrs,n),s=null);else{let a=t.directiveStylingLast;if(-1===a||e[a]!==r)if(i=tf(r,e,t,i,n),null===s){let i=function(e,t,i){let n=i?t.classBindings:t.styleBindings;if(0!==Ph(n))return e[xh(n)]}(e,t,n);void 0!==i&&Array.isArray(i)&&(i=tf(null,e,t,i[1],n),i=nf(i,t.attrs,n),function(e,t,i,n){let r=i?t.classBindings:t.styleBindings;e[xh(r)]=n}(e,t,n,i))}else s=function(e,t,i){let n,r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<r;s++){n=nf(n,e[s].hostAttrs,i)}return nf(n,t.attrs,i)}(e,t,n)}return void 0!==s&&(n?t.residualClasses=s:t.residualStyles=s),i}(r,s,t,n),Oh(r,s,t,i,a,n)}}function tf(e,t,i,n,r){let s=null,a=i.directiveEnd,o=i.directiveStylingLast;for(-1===o?o=i.directiveStart:o++;o<a&&(s=t[o],n=nf(n,s.hostAttrs,r),s!==e);)o++;return null!==e&&(i.directiveStylingLast=o),n}function nf(e,t,i){let n=i?1:2,r=-1;if(null!==t)for(let s=0;s<t.length;s++){let a=t[s];"number"==typeof a?r=a:r===n&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),_r(e,a,!!i||t[++s]))}return void 0===e?null:e}function rf(e,t,i){_r(e,t,_c(i))}function sf(e,t,i){let n=String(t);""!==n&&!n.includes(" ")&&_r(e,n,i)}function af(e,t,i,n,r,s,a,o){if(!(3&t.type))return;let l=e.data,c=l[o+1],d=function(e){return!(1&~e)}(c)?of(l,t,i,r,Ph(c),a):void 0;if(!lf(d)){lf(s)||function(e){return!(2&~e)}(c)&&(s=of(l,null,i,r,o,a)),function(e,t,i,n,r){if(t)r?e.addClass(i,n):e.removeClass(i,n);else{let t=-1===n.indexOf("-")?void 0:ud.DashCase;null==r?e.removeStyle(i,n,t):("string"==typeof r&&r.endsWith("!important")&&(r=r.slice(0,-10),t|=ud.Important),e.setStyle(i,n,r,t))}}
1(n,a,Aa(vo(),i),r,s)}}function of(e,t,i,n,r,s){let a,o=null===t;for(;r>0;){let t=e[r],s=Array.isArray(t),l=s?t[1]:t,c=null===l,d=i[r+1];d===Ud&&(d=c?Ar:void 0);let u=c?Sr(d,n):l===n?d:void 0;if(s&&!lf(u)&&(u=Sr(t,n)),lf(u)&&(a=u,o))return a;let p=e[r+1];r=o?xh(p):Ph(p)}if(null!==t){let e=s?t.residualClasses:t.residualStyles;null!=e&&(a=Sr(e,n))}return a}function lf(e){return void 0!==e}function cf(e,t){return!!(e.flags&(t?8:16))}function df(e,t,i){Zh(_r,Qh,bh(ja(),e,t,i),!0)}function uf(e,t,i,n,r){Zh(_r,Qh,yh(ja(),e,t,i,n,r),!0)}var pf=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),n=Math.max(e,t),r=this.detach(n);if(n-i>1){let e=this.detach(i);this.attach(i,r),this.attach(n,e)}else this.attach(i,r)}move(e,t){this.attach(t,this.detach(e))}};function hf(e,t,i,n,r){return e===i&&Object.is(t,n)?1:Object.is(r(e,t),r(i,n))?-1:0}function ff(e,t,i,n){return!(void 0===t||!t.has(n))&&(e.attach(i,t.get(n)),t.delete(n),!0)}function mf(e,t,i,n,r){if(ff(e,t,n,i(n,r)))e.updateValue(n,r);else{let t=e.create(n,r);e.attach(n,t)}}function gf(e,t,i,n){let r=new Set;for(let s=t;s<=i;s++)r.add(n(s,e.at(s)));return r}var bf=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return void 0!==this._vMap&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);void 0===this._vMap&&(this._vMap=new Map);let n=this._vMap;for(;n.has(i);)i=n.get(i);n.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),void 0!==this._vMap){let n=this._vMap;for(;n.has(i);)i=n.get(i),e(i,t)}}};function yf(e,t){qp("NgControlFlow");let i=ja(),n=no(),r=i[n]!==Ud?i[n]:-1,s=-1!==r?If(i,ta+r):void 0;if(oh(i,n,e)){let n=be(null);try{if(void 0!==s&&Pu(s,0),-1!==e){let n=ta+e,r=If(i,n),s=Af(i[Os],n),a=Xu(r,s.tView.ssrId);Tu(r,Au(i,s,t,{dehydratedView:a}),0,xu(s,a))}}finally{be(n)}}else if(void 0!==s){let e=ku(s,0);void 0!==e&&(e[Us]=t)}}var vf=class{constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-sa}},wf=class{constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function _f(e,t,i,n,r,s,a,o,l,c,d,u,p){qp("NgControlFlow");let h=ja(),f=za(),m=void 0!==l,g=ja(),b=o?a.bind(g[Hs][Us]):a,y=new wf(m,b);g[ta+e]=y,uh(h,f,e+1,t,i,n,r,Da(f.consts,s)),m&&uh(h,f,e+2,l,c,d,u,Da(f.consts,p))}var Sf=class extends pf{constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-sa}at(e){return this.getLView(e)[Us].$implicit}attach(e,t){let i=t[Fs];this.needsIndexUpdate||=e!==this.length,Tu(this.lContainer,t,e,xu(this.templateTNode,i))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,function(e,t){return vd(e,t)}(this.lContainer,e)}create(e,t){let i=Xu(this.lContainer,this.templateTNode.tView.ssrId),n=Au(this.hostLView,this.templateTNode,new vf(this.lContainer,t,e),{dehydratedView:i});return this.operationsCounter?.recordCreate(),n}destroy(e){wd(e[Os],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[Us].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Us].$index=e}getLView(e){return function(e,t){return ku(e,t)}(this.lContainer,e)}};function Cf(e){let t=be(null),i=vo();try{let t=ja(),n=t[Os],r=t[i],s=i+1,a=If(t,s);if(void 0===r.liveCollection){let e=Af(n,s);r.liveCollection=new Sf(a,t,e)}else r.liveCollection.reset();let o=r.liveCollection;if(function(e,t,i){let n,r,s=0,a=e.length-1;if(Array.isArray(t)){let o=t.length-1;for(;s<=a&&s<=o;
1){let l=e.at(s),c=t[s],d=hf(s,l,s,c,i);if(0!==d){d<0&&e.updateValue(s,c),s++;continue}let u=e.at(a),p=t[o],h=hf(a,u,o,p,i);if(0!==h){h<0&&e.updateValue(a,p),a--,o--;continue}let f=i(s,l),m=i(a,u),g=i(s,c);if(Object.is(g,m)){let t=i(o,p);Object.is(t,f)?(e.swap(s,a),e.updateValue(a,p),o--,a--):e.move(a,s),e.updateValue(s,c),s++}else if(n??=new bf,r??=gf(e,s,a,i),ff(e,n,s,g))e.updateValue(s,c),s++,a++;else if(r.has(g))n.set(f,e.detach(s)),a--;else{let i=e.create(s,t[s]);e.attach(s,i),s++,a++}}for(;s<=o;)mf(e,n,i,s,t[s]),s++}else if(null!=t){let o=t[Symbol.iterator](),l=o.next();for(;!l.done&&s<=a;){let t=e.at(s),c=l.value,d=hf(s,t,s,c,i);if(0!==d)d<0&&e.updateValue(s,c),s++,l=o.next();else{n??=new bf,r??=gf(e,s,a,i);let d=i(s,c);if(ff(e,n,s,d))e.updateValue(s,c),s++,a++,l=o.next();else if(r.has(d)){let r=i(s,t);n.set(r,e.detach(s)),a--}else e.attach(s,e.create(s,c)),s++,a++,l=o.next()}}for(;!l.done;)mf(e,n,i,e.length,l.value),l=o.next()}for(;s<=a;)e.destroy(e.detach(a--));n?.forEach((t=>{e.destroy(t)}))}(o,e,r.trackByFn),o.updateIndexes(),r.hasEmptyBlock){let e=no(),r=0===o.length;if(oh(t,e,r)){let e=i+2,s=If(t,e);if(r){let i=Af(n,e),r=Xu(s,i.tView.ssrId);Tu(s,Au(t,i,void 0,{dehydratedView:r}),0,xu(i,r))}else Pu(s,0)}}}finally{be(t)}}function If(e,t){return e[t]}function Af(e,t){return xa(e,t)}function kf(e,t,i,n){let r=ja(),s=za(),a=ta+e,o=r[$s],l=s.firstCreatePass?function(e,t,i,n,r,s){let a=t.consts,o=Wd(t,e,2,n,Da(a,r));return ru(t,i,o,Da(a,s)),null!==o.attrs&&pp(o,o.attrs,!1),null!==o.mergedAttrs&&pp(o,o.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,o),o}(a,s,r,t,i,n):s.data[a],c=Pf(s,r,l,o,t,e);r[a]=c;let d=ua(l);return Ka(l,!0),Nd(o,c,l),!function(e){return!(32&~e.flags)}(l)&&Ao()&&Ed(s,r,c,l),0===Ua.lFrame.elementDepthCount&&Ql(c,r),Ua.lFrame.elementDepthCount++,d&&(Kd(s,r,l),Gd(s,l,r)),null!==n&&Qd(r,l),kf}function xf(){let e=Ya();Qa()?Ja():(e=e.parent,Ka(e,!1));let t=e;(function(e){return Ua.skipHydrationRootTNode===e})(t)&&(Ua.skipHydrationRootTNode=null),Ua.lFrame.elementDepthCount--;let i=za();return i.firstCreatePass&&(xo(i,e),ca(e)&&i.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return!!(8&e.flags)}(t)&&Wh(i,t,ja(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return!!(16&e.flags)}(t)&&Wh(i,t,ja(),t.stylesWithoutHost,!1),xf}function Tf(e,t,i,n){return kf(e,t,i,n),xf(),Tf}var Pf=(e,t,i,n,r,s)=>(ko(!0),md(n,r,Ua.lFrame.currentNamespace));function Ef(e,t,i){let n=ja(),r=za(),s=e+ta,a=r.firstCreatePass?function(e,t,i,n,r){let s=t.consts,a=Da(s,n),o=Wd(t,e,8,"ng-container",a);return null!==a&&pp(o,a,!0),ru(t,i,o,Da(s,r)),null!==t.queries&&t.queries.elementStart(t,o),o}(s,r,n,t,i):r.data[s];Ka(a,!0);let o=Bf(r,n,a,e);return n[s]=o,Ao()&&Ed(r,n,o,a),Ql(o,n),ua(a)&&(Kd(r,n,a),Gd(r,a,n)),null!=i&&Qd(n,a),Ef}function Df(){let e=Ya(),t=za();return Qa()?Ja():(e=e.parent,Ka(e,!1)),t.firstCreatePass&&(xo(t,e),ca(e)&&t.queries.elementEnd(e)),Df}function Of(e,t,i){return Ef(e,t,i),Df(),Of}var Bf=(e,t,i,n)=>(ko(!0),fd(t[$s],""));function Mf(){return ja()}var Rf=void 0;var Lf=["en",[["a","p"],["AM","PM"],Rf],[["AM","PM"],Rf,Rf],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Rf,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Rf,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Rf,"{1} 'at' {0}",Rf],[".",",",";","%","+","-","E","Ã","â°","â","NaN",":"],["#,##0.###","#,##0%","¤#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){let t=Math.floor(Math.abs(e)),i=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===i?1:5}],Ff={};function Nf(e){let t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e),i=Uf(t);if(i)return i;let n=t.split("-")[0];if(i=Uf(n),i)return i;if("en"===n)return Lf;throw new mn(701,!1)}function Uf(e){return e in Ff||(Ff[e]=vn.ng&&vn.ng.common&&vn.ng.common.locales&&vn.ng.common.locales[e]),Ff[e]}var Vf=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Vf||{});var qf="en-US";var $f=(e,t,i)=>{};function jf(e,t,i,n){let r=ja(),s=za(),a=Ya();return zf(s,r,r[$s],a,e,t,n),jf}function zf(e,t,i,n,r,s,a){let o=ua(n),l=e.firstCreatePass&&vu(e),c=t[Us],d=yu(t),u=!0;if(3&n.type||a){let p=ka(n,t),h=a?a(p):p,f=d.length,m=a?e=>a(Ia(e[n.index])):n.index,g=null;if(!a&&o&&(g=function(e,t,i,n){let r=e.cleanup;if(null!=r)for(let e=0;e<r.length-1;e+=2){let s=r[e];if(s===i&&r[e+1]===n){let i=t[Ns],n=r[e+2];return i.length>n?i[n]:null}"string"==typeof s&&(e+=2)}return null}(e,t,r,n.index)),null!==g){(g.__ngLastListenerFn__||g).__ngNextListenerFn__=s,g.__ngLastListenerFn__=s,u=!1}else{s=Hf(n,t,c,s),$f(p,r,s);let e=i.listen(h,r,s);d.push(s,e),l&&l.push(r,m,f,f+1)}}else s=Hf(n,t,c,s);let p,h=n.outputs;if(u&&null!==h&&(p=h[r])){let e=p.length;if(e)for(let i=0;i<e;i+=2){let e=p[i],a=p[i+1],o=t[e][a].subscribe(s),c=d.length;d.push(s,o),l&&l.push(r,n.index,c,-(c+1))}}}function Wf(e,t,i,n){let r=be(null);try{return Sa(6,t,i),!1!==i(n)}
1catch(t){return wu(e,t),!1}finally{Sa(7,t,i),be(r)}}function Hf(e,t,i,n){return function r(s){if(s===Function)return n;Wu(e.componentOffset>-1?Pa(e.index,t):t,5);let a=Wf(t,i,n,s),o=r.__ngNextListenerFn__;for(;o;)a=Wf(t,i,o,s)&&a,o=o.__ngNextListenerFn__;return a}}function Yf(e=1){return yo(e)}function Gf(e,t){let i=null,n=function(e){let t=e.attrs;if(null!=t){let e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(e);for(let r=0;r<t.length;r++){let s=t[r];if("*"!==s){if(null===n?Hr(e,s,!0):Yr(n,s))return r}else i=r}return i}function Kf(e){let t=ja()[Hs][Ls];if(!t.projection){let i=e?e.length:1,n=t.projection=function(e,t){let i=[];for(let n=0;n<e;n++)i.push(t);return i}(i,null),r=n.slice(),s=t.child;for(;null!==s;){if(128!==s.type){let t=e?Gf(s,e):0;null!==t&&(r[t]?r[t].projectionNext=s:n[t]=s,r[t]=s)}s=s.next}}}function Qf(e,t=0,i,n,r,s){let a=ja(),o=za(),l=n?e+1:null;null!==l&&uh(a,o,l,n,r,s,null,i);let c=Wd(o,ta+e,16,null,i||null);null===c.projection&&(c.projection=t),Ja();let d=!a[Fs]||$a();null===a[Hs][Ls].projection[c.projection]&&null!==l?function(e,t,i){let n=ta+i,r=t.data[n],s=e[n],a=Xu(s,r.tView.ssrId),o=Au(e,r,void 0,{dehydratedView:a});Tu(s,o,0,xu(r,a))}(a,o,l):d&&32&~c.flags&&function(e,t,i){Ld(t[$s],0,t,i,Sd(e,i,t),xd(i.parent||t[Ls],i,t))}(o,a,c)}function Jf(e,t,i){return Zf(e,"",t,"",i),Jf}function Zf(e,t,i,n,r){let s=ja(),a=bh(s,t,i,n);if(a!==Ud){nu(za(),_o(),s,e,a,s[$s],r,!1)}return Zf}function Xf(e,t,i,n,r,s,a){let o=ja(),l=yh(o,t,i,n,r,s);if(l!==Ud){nu(za(),_o(),o,e,l,o[$s],a,!1)}return Xf}function em(e,t,i,n,r,s,a,o,l,c,d){let u=ja(),p=wh(u,t,i,n,r,s,a,o,l,c);if(p!==Ud){nu(za(),_o(),u,e,p,u[$s],d,!1)}return em}function tm(e,t,i){Fp(e,t,i)}function im(e){let t=ja(),i=za(),n=oo();lo(n+1);let r=Np(i,n);if(e.dirty&&function(e){return!(4&~e[Bs])}(t)===!(2&~r.metadata.flags)){if(null===r.matches)e.reset([]);else{let i=Up(t,n);e.reset(i,ql),e.notifyOnChanges()}return!0}return!1}function nm(){return function(e,t){return e[Ks].queries[t].queryList}(ja(),oo())}function rm(e,t,i,n){i>=e.data.length&&(e.data[i]=null,e.blueprint[i]=null),t[i]=n}function sm(e){return Ta(Za(),ta+e)}function am(e,t=""){let i=ja(),n=za(),r=e+ta,s=n.firstCreatePass?Wd(n,r,1,t,null):n.data[r],a=om(n,i,s,t,e);i[r]=a,Ao()&&Ed(n,i,a,s),Ka(s,!1)}var om=(e,t,i,n,r)=>(ko(!0),function(e,t){return e.createText(t)}(t[$s],n));function lm(e){return cm("",e,""),lm}function cm(e,t,i){let n=ja(),r=bh(n,e,t,i);return r!==Ud&&Su(n,vo(),r),cm}function dm(e,t,i,n,r){let s=ja(),a=yh(s,e,t,i,n,r);return a!==Ud&&Su(s,vo(),a),dm}function um(e,t,i,n,r,s,a){let o=ja(),l=vh(o,e,t,i,n,r,s,a);return l!==Ud&&Su(o,vo(),l),um}function pm(e,t,i,n,r,s,a,o,l){let c=ja(),d=wh(c,e,t,i,n,r,s,a,o,l);return d!==Ud&&Su(c,vo(),d),pm}function hm(e,t,i){zp(t)&&(t=t());let n=ja();if(oh(n,no(),t)){nu(za(),_o(),n,e,t,n[$s],i,!1)}return hm}function fm(e,t){let i=zp(e);return i&&e.set(t),i}function mm(e,t){let i=ja(),n=za(),r=Ya();return zf(n,i,i[$s],r,e,t),mm}var gm={};function bm(e){let t=za(),i=ja(),n=e+ta;return Ka(Wd(t,n,128,null,null),!1),rm(t,i,n,gm),bm}function ym(e){return qp("NgLet"),rm(za(),ja(),vo(),e),e}function vm(e){let t=Ta(Za(),ta+e);if(t===gm)throw new mn(314,!1);return t}function wm(e,t,i,n,r){if(e=kn(e),Array.isArray(e))for(let s=0;s<e.length;s++)wm(e[s],t,i,n,r);else{let s=za(),a=ja(),o=Ya(),l=bs(e)?e:kn(e.provide),c=ks(e),d=1048575&o.providerIndexes,u=o.directiveStart,p=o.providerIndexes>>20;if(bs(e)||!e.multi){let n=new Ro(c,r,$d),h=Cm(l,t,r?d:d+p,u);-1===h?(Jo(Yo(o,a),s,l),_m(s,e,t.length),t.push(l),o.directiveStart++,o.directiveEnd++,r&&(o.providerIndexes+=1048576),i.push(n),a.push(n)):(i[h]=n,a[h]=n)}else{let h=Cm(l,t,d+p,u),f=Cm(l,t,d,d+p),m=h>=0&&i[h],g=f>=0&&i[f];if(r&&!g||!r&&!m){Jo(Yo(o,a),s,l);let d=function(e,t,i,n,r){let s=new Ro(e,i,$d);return s.multi=[],s.index=t,s.componentProviders=0,Sm(s,r,n&&!i),s}(r?Am:Im,i.length,r,n,c);!r&&g&&(i[f].providerFactory=d),_m(s,e,t.length,0),t.push(l),o.directiveStart++,o.directiveEnd++,r&&(o.providerIndexes+=1048576),i.push(d),a.push(d)}else{_m(s,e,h>-1?h:f,Sm(i[r?f:h],c,!r&&n))}!r&&n&&g&&i[f].componentProviders++}}}function _m(e,t,i,n){let r=bs(t),s=function(e){return!!e.useClass}(t);if(r||s){let a=(s?kn(t.useClass):t).prototype.ngOnDestroy;if(a){let s=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){let e=s.indexOf(i);-1===e?s.push(i,[n,a]):s[e+1].push(n,a)}else s.push(i,a)}}}function Sm(e,t,i){return i&&e.componentProviders++,e.multi.push(t)-1}function Cm(e,t,i,n){for(let r=i;r<n;r++)if(t[r]===e)return r;return-1}function Im(e,t,i,n){return km(this.multi,[])}function Am(e,t,i,n){let r,s=this.multi;if(this.providerFactory){let e=this.providerFactory.componentProviders,t=rl(i,i[Os],this.providerFactory.index,n);r=t.slice(0,e),km(s,r);for(let i=e;i<t.length;i++)r.push(t[i])}else r=[],km(s,r);return r}function km(e,t){for(let i=0;i<e.length;i++){let n=e[i];t.push(n())}return t}function xm(e,t=[]){return i=>{i.providersResolver=(i,n)=>function(e,t,i){let n=za();if(n.firstCreatePass){let r=pa(e);wm(i,n.data,n.blueprint,r,!0),wm(t,n.data,n.blueprint,r,!1)}}(i,n?n(e):e,t)}}var Tm=(()=>{class e{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let t=us(0,e.type),i=t.length>0?ih([t],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,i)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}static{this.ɵprov=Tn({token:e,providedIn:"environment",factory:()=>new e(lr(Cs))})}}return e})();function Pm(e){qp("NgStandalone"),e.getStandaloneInjector=t=>t.get(Tm).getOrCreateStandaloneInjector(e)}function Em(e,t,i){let n=e.ɵcmp;n.directiveDefs=cs(t,!1),n.pipeDefs=cs(i,!0)}function Dm(e,t,i){let n=to()+e,r=ja();return r[n]===Ud?sh(r,n,i?t.call(i):t()):ah(r,n)}
1function Om(e,t,i,n){return Um(ja(),to(),e,t,i,n)}function Bm(e,t,i,n,r){return Vm(ja(),to(),e,t,i,n,r)}function Mm(e,t,i,n,r,s){return function(e,t,i,n,r,s,a,o){let l=t+i;return ch(e,l,r,s,a)?sh(e,l+3,o?n.call(o,r,s,a):n(r,s,a)):Nm(e,l+3)}(ja(),to(),e,t,i,n,r,s)}function Rm(e,t,i,n,r,s,a){return function(e,t,i,n,r,s,a,o,l){let c=t+i;return dh(e,c,r,s,a,o)?sh(e,c+4,l?n.call(l,r,s,a,o):n(r,s,a,o)):Nm(e,c+4)}(ja(),to(),e,t,i,n,r,s,a)}function Lm(e,t,i,n,r,s,a,o){let l=to()+e,c=ja(),d=dh(c,l,i,n,r,s);return oh(c,l+4,a)||d?sh(c,l+5,o?t.call(o,i,n,r,s,a):t(i,n,r,s,a)):ah(c,l+5)}function Fm(e,t,i,n,r,s,a,o,l){let c=to()+e,d=ja(),u=dh(d,c,i,n,r,s);return lh(d,c+4,a,o)||u?sh(d,c+6,l?t.call(l,i,n,r,s,a,o):t(i,n,r,s,a,o)):ah(d,c+6)}function Nm(e,t){let i=e[t];return i===Ud?void 0:i}function Um(e,t,i,n,r,s){let a=t+i;return oh(e,a,r)?sh(e,a+1,s?n.call(s,r):n(r)):Nm(e,a+1)}function Vm(e,t,i,n,r,s,a){let o=t+i;return lh(e,o,r,s)?sh(e,o+2,a?n.call(a,r,s):n(r,s)):Nm(e,o+2)}function qm(e,t){let i,n=za(),r=e+ta;n.firstCreatePass?(i=function(e,t){if(t)for(let i=t.length-1;i>=0;i--){let n=t[i];if(e===n.name)return n}}(t,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks??=[]).push(r,i.onDestroy)):i=n.data[r];let s=i.factory||(i.factory=br(i.type)),a=Jn($d);try{let e=$o(!1),t=s();return $o(e),rm(n,ja(),r,t),t}finally{Jn(a)}}function $m(e,t,i){let n=e+ta,r=ja(),s=Ta(r,n);return zm(r,n)?Um(r,to(),t,s.transform,i,s):s.transform(i)}function jm(e,t,i,n){let r=e+ta,s=ja(),a=Ta(s,r);return zm(s,r)?Vm(s,to(),t,a.transform,i,n,a):a.transform(i,n)}function zm(e,t){return e[Os].data[t].pure}function Wm(e,t){return Ju(e,t)}var Hm,Ym=(()=>{class e{log(e){console.log(e)}warn(e){console.warn(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),Gm=new Fn(""),Km=new Fn(""),Qm=(()=>{class e{constructor(e,t,i){this._ngZone=e,this.registry=t,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,Hm||(function(e){Hm=e}(i),i.addToWindow(t)),this._watchAngularEvents(),e.run((()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")}))}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular((()=>{this._ngZone.onStable.subscribe({next:()=>{Tl.assertNotInAngularZone(),queueMicrotask((()=>{this._isZoneStable=!0,this._runCallbacksIfReady()}))}})}))}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask((()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}}));else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter((t=>!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map((e=>({source:e.source,creationLocation:e.creationLocation,data:e.data}))):[]}addCallback(e,t,i){let n=-1;t&&t>0&&(n=setTimeout((()=>{this._callbacks=this._callbacks.filter((e=>e.timeoutId!==n)),e()}),t)),this._callbacks.push({doneCb:e,timeoutId:n,updateCb:i})}whenStable(e,t,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,t,i),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,t,i){return[]}static{this.ɵfac=function(t){return new(t||e)(lr(Tl),lr(Jm),lr(Km))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Jm=(()=>{class e{constructor(){this._applications=new Map}registerApplication(e,t){this._applications.set(e,t)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,t=!0){return Hm?.findTestabilityInTree(this,e,t)??null}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})();function Zm(e){return!!e&&"function"==typeof e.then}function Xm(e){return!!e&&"function"==typeof e.subscribe}var eg=new Fn(""),tg=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise(((e,t)=>{this.resolve=e,this.reject=t})),this.appInits=cr(eg,{optional:!0})??[]}
1runInitializers(){if(this.initialized)return;let e=[];for(let t of this.appInits){let i=t();if(Zm(i))e.push(i);else if(Xm(i)){let t=new Promise(((e,t)=>{i.subscribe({complete:e,error:t})}));e.push(t)}}let t=()=>{this.done=!0,this.resolve()};Promise.all(e).then((()=>{t()})).catch((e=>{this.reject(e)})),0===e.length&&t(),this.initialized=!0}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),ig=new Fn("");function ng(){!function(e){Ne=e}((()=>{throw new mn(600,!1)}))}function rg(e,t){return Array.isArray(t)?t.reduce(rg,e):h(h({},e),t)}var sg=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=cr(Fl),this.afterRenderManager=cr(mh),this.zonelessEnabled=cr(tp),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new kt,this.afterTick=new kt,this.componentTypes=[],this.components=[],this.isStable=cr(wl).hasPendingTasks.pipe(bi((e=>!e))),this._injector=cr(Cs)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let e;return new Promise((t=>{e=this.isStable.subscribe({next:e=>{e&&t()}})})).finally((()=>{e.unsubscribe()}))}get injector(){return this._injector}bootstrap(e,t){let i,n=e instanceof sp;if(!this._injector.get(tg).done){!n&&function(e){let t=ns(e)||rs(e)||ss(e);null!==t&&t.standalone}(e);throw new mn(405,!1)}i=n?e:this._injector.get(lp).resolveComponentFactory(e),this.componentTypes.push(i.componentType);let r=function(e){return e.isBoundToModule}(i)?void 0:this._injector.get(Jp),s=t||i.selector,a=i.create(fl.NULL,[],s,r),o=a.location.nativeElement,l=a.injector.get(Gm,null);return l?.registerApplication(o),a.onDestroy((()=>{this.detachView(a.hostView),ag(this.components,a),l?.unregisterApplication(o)})),this._loadComponent(a),a}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new mn(101,!1);let e=be(null);try{this._runningTick=!0,this.synchronize()}catch(e){this.internalErrorHandler(e)}finally{this._runningTick=!1,be(e),this.afterTick.next()}}synchronize(){let e=null;this._injector.destroyed||(e=this._injector.get(cp,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let t=0;for(;0!==this.dirtyFlags&&t++<10;)this.synchronizeOnce(e)}synchronizeOnce(e){if(this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0,7&this.dirtyFlags){let e=!!(1&this.dirtyFlags);this.dirtyFlags&=-8,this.dirtyFlags|=8,this.beforeRender.next(e);for(let{_lView:t,notifyErrorHandler:i}of this._views)og(t,i,e,this.zonelessEnabled);if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),7&this.dirtyFlags)return}else e?.begin?.(),e?.end?.();8&this.dirtyFlags&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){this.allViews.some((({_lView:e})=>Ma(e)))?this.dirtyFlags|=2:this.dirtyFlags&=-8}attachView(e){let t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){let t=e;ag(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);let t=this._injector.get(ig,[]);[...this._bootstrapListeners,...t].forEach((t=>t(e)))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach((e=>e())),this._views.slice().forEach((e=>e.destroy()))}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>ag(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new mn(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function ag(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}function og(e,t,i,n){(i||Ma(e))&&Nu(e,t,i&&!n?0:1)}var lg=class{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},cg=(()=>{class e{compileModuleSync(e){return new eh(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let t=this.compileModuleSync(e),i=cd(as(e).declarations).reduce(((e,t)=>{let i=ns(t);return i&&e.push(new mp(i)),e}),[]);return new lg(t,i)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();new Fn("");var dg=(()=>{class e{constructor(){this.zone=cr(Tl),this.changeDetectionScheduler
1=cr(ep),this.applicationRef=cr(sg)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run((()=>{this.applicationRef.tick()}))}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function ug({ngZoneFactory:e,ignoreChangesOutsideZone:t,scheduleInRootZone:i}){return e??=()=>new Tl(f(h({},pg()),{scheduleInRootZone:i})),[{provide:Tl,useFactory:e},{provide:kr,multi:!0,useFactory:()=>{let e=cr(dg,{optional:!0});return()=>e.initialize()}},{provide:kr,multi:!0,useFactory:()=>{let e=cr(hg);return()=>{e.initialize()}}},!0===t?{provide:ip,useValue:!0}:[],{provide:np,useValue:i??gl}]}function pg(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}var hg=(()=>{class e{constructor(){this.subscription=new Ye,this.initialized=!1,this.zone=cr(Tl),this.pendingTasks=cr(wl)}initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular((()=>{this.subscription.add(this.zone.onStable.subscribe((()=>{Tl.assertNotInAngularZone(),queueMicrotask((()=>{null!==e&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)}))})))})),this.subscription.add(this.zone.onUnstable.subscribe((()=>{Tl.assertInAngularZone(),e??=this.pendingTasks.add()})))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),fg=(()=>{class e{constructor(){this.appRef=cr(sg),this.taskService=cr(wl),this.ngZone=cr(Tl),this.zonelessEnabled=cr(tp),this.disableScheduling=cr(ip,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Ye,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(kl):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(cr(np,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe((()=>{this.runningTick||this.cleanup()}))),this.subscriptions.add(this.ngZone.onUnstable.subscribe((()=>{this.runningTick||this.cleanup()}))),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Ml||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&5===e)return;switch(e){case 0:this.appRef.dirtyFlags|=2;break;case 3:case 2:case 4:case 5:case 1:this.appRef.dirtyFlags|=4;break;case 7:this.appRef.deferredDirtyFlags|=8;break;default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;let t=this.useMicrotaskScheduler?Il:Cl;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run((()=>t((()=>this.tick())))):this.cancelScheduledCallback=this.ngZone.runOutsideAngular((()=>t((()=>this.tick()))))}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(kl+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&7&this.appRef.dirtyFlags&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run((()=>{this.runningTick=!0,this.appRef._tick()}),void 0,this.schedulerTickApplyArgs)}catch(t){throw this.taskService.remove(e),t}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Il((()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)}))}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();var mg=new Fn("",{providedIn:"root",factory:()=>cr(mg,Kn.Optional|Kn.SkipSelf)||typeof $localize<"u"&&$localize.locale||qf}),gg=new Fn("",{providedIn:"root",factory:()=>"USD"}),bg=new Fn("");function yg(e){return!e.moduleRef}function vg(e){let t=yg(e)?e.r3Injector:e.moduleRef.injector,i=t.get(Tl);return i.run((()=>
1{yg(e)?e.r3Injector.resolveInjectorInitializers():e.moduleRef.resolveInjectorInitializers();let n,r=t.get(Ll,null);if(i.runOutsideAngular((()=>{n=i.onError.subscribe({next:e=>{r.handleError(e)}})})),yg(e)){let i=()=>t.destroy(),r=e.platformInjector.get(bg);r.add(i),t.onDestroy((()=>{n.unsubscribe(),r.delete(i)}))}else{let t=()=>e.moduleRef.destroy(),i=e.platformInjector.get(bg);i.add(t),e.moduleRef.onDestroy((()=>{ag(e.allPlatformModules,e.moduleRef),n.unsubscribe(),i.delete(t)}))}return function(e,t,i){try{let n=i();return Zm(n)?n.catch((i=>{throw t.runOutsideAngular((()=>e.handleError(i))),i})):n}catch(i){throw t.runOutsideAngular((()=>e.handleError(i))),i}}(r,i,(()=>{let i=t.get(tg);return i.runInitializers(),i.donePromise.then((()=>{if(function(e){"string"==typeof e&&e.toLowerCase().replace(/_/g,"-")}(t.get(mg,qf)||qf),yg(e)){let i=t.get(sg);return void 0!==e.rootComponent&&i.bootstrap(e.rootComponent),i}return function(e,t){let i=e.injector.get(sg);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach((e=>i.bootstrap(e)));else{if(!e.instance.ngDoBootstrap)throw new mn(-403,!1);e.instance.ngDoBootstrap(i)}t.push(e)}(e.moduleRef,e.allPlatformModules),e.moduleRef}))}))}))}var wg=(()=>{class e{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,t){let i=t?.scheduleInRootZone,n=t?.ignoreChangesOutsideZone,r=[ug({ngZoneFactory:()=>function(e="zone.js",t){return"noop"===e?new Ml:"zone.js"===e?new Tl(t):e}(t?.ngZone,f(h({},pg({eventCoalescing:t?.ngZoneEventCoalescing,runCoalescing:t?.ngZoneRunCoalescing})),{scheduleInRootZone:i})),ignoreChangesOutsideZone:n}),{provide:ep,useExisting:fg}],s=function(e,t,i){return new Xp(e,t,i,!1)}(e.moduleType,this.injector,r);return vg({moduleRef:s,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,t=[]){let i=rg({},t);return function(e,t,i){let n=new eh(i);return Promise.resolve(n)}(this.injector,0,e).then((e=>this.bootstrapModuleFactory(e,i)))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new mn(404,!1);this._modules.slice().forEach((e=>e.destroy())),this._destroyListeners.forEach((e=>e()));let e=this._injector.get(bg,null);e&&(e.forEach((e=>e())),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.ɵfac=function(t){return new(t||e)(lr(fl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),_g=null,Sg=new Fn("");function Cg(e){if(_g&&!_g.get(Sg,!1))throw new mn(400,!1);ng(),_g=e;let t=e.get(wg);return function(e){e.get(nc,null)?.forEach((e=>e()))}(e),t}function Ig(e,t,i=[]){let n=`Platform: ${t}`,r=new Fn(n);return(t=[])=>{let s=Ag();if(!s||s.injector.get(Sg,!1)){let s=[...i,...t,{provide:r,useValue:!0}];e?e(s):Cg(function(e=[],t){return fl.create({name:t,providers:[{provide:vs,useValue:"platform"},{provide:bg,useValue:new Set([()=>_g=null])},...e]})}(s,n))}return function(){let e=Ag();if(!e)throw new mn(401,!1);return e}()}}function Ag(){return _g?.get(wg)??null}var kg=(()=>{class e{static{this.__NG_ELEMENT_ID__=xg}}return e})();function xg(e){return function(e,t,i){if(da(e)&&!i){let i=Pa(e.index,t);return new Hu(i,i)}if(175&e.type){let e=t[Hs];return new Hu(e,t)}return null}(Ya(),ja(),!(16&~e))}var Tg=class{constructor(){}supports(e){return nh(e)}create(e){return new Eg(e)}},Pg=(e,t)=>t,Eg=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Pg}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,n=0,r=null;for(;t||i;){let s=!i||t&&t.currentIndex<Mg(i,n,r)?t:i,a=Mg(s,n,r),o=s.currentIndex;if(s===i)n--,i=i._nextRemoved;else if(t=t._next,null==s.previousIndex)n++;else{r||(r=[]);let e=a-n,t=o-n;
1if(e!=t){for(let i=0;i<e;i++){let n=i<r.length?r[i]:r[i]=0,s=n+i;t<=s&&s<e&&(r[i]=n+1)}r[s.previousIndex]=t-e}}a!==o&&e(s,a,o)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!nh(e))throw new mn(900,!1);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t,i,n,r=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(let t=0;t<this.length;t++)i=e[t],n=this._trackByFn(t,i),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,i,n,t)),Object.is(r.item,i)||this._addIdentityChange(r,i)):(r=this._mismatch(r,i,n,t),s=!0),r=r._next}else t=0,function(e,t){if(Array.isArray(e))for(let i=0;i<e.length;i++)t(e[i]);else{let i,n=e[Symbol.iterator]();for(;!(i=n.next()).done;)t(i.value)}}(e,(e=>{n=this._trackByFn(t,e),null!==r&&Object.is(r.trackById,n)?(s&&(r=this._verifyReinsertion(r,e,n,t)),Object.is(r.item,e)||this._addIdentityChange(r,e)):(r=this._mismatch(r,e,n,t),s=!0),r=r._next,t++})),this.length=t;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,n){let r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,n)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(i,n))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,n)):e=this._addAfter(new Dg(t,i),r,n),e}_verifyReinsertion(e,t,i,n){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==r?e=this._reinsertAfter(r,e._prev,n):e.currentIndex!=n&&(e.currentIndex=n,this._addToMoves(e,n)),e}_truncate(e){for(;null!==e;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);let n=e._prevRemoved,r=e._nextRemoved;return null===n?this._removalsHead=r:n._nextRemoved=r,null===r?this._removalsTail=n:r._prevRemoved=n,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){let n=null===t?this._itHead:t._next;return e._next=n,e._prev=t,null===n?this._itTail=e:n._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new Bg),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);let t=e._prev,i=e._next;return null===t?this._itHead=i:t._next=i,null===i?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Bg),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},Dg=class{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},Og=class{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===t||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){let t=e._prevDup,i=e._nextDup;return null===t?this._head=i:t._nextDup=i,null===i?this._tail=t:i._prevDup=t,null===this._head}},Bg=class{constructor(){this.map=new Map}put(e){let t=e.trackById,i=this.map.get(t);i||(i=new Og,this.map.set(t,i)),i.add(e)}get(e,t){let i=e,n=this.map.get(i);return n?n.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}};function Mg(e,t,i){let n=e.previousIndex;if(null===n)return n;let r=0;return i&&n<i.length&&(r=i[n]),n+t+r}var Rg=class{constructor(){}supports(e){return e instanceof Map||rh(e)}create(){return new Lg}},Lg=class{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||rh(e)))throw new mn(900,!1)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;
1if(this._appendAfter=null,this._forEach(e,((e,i)=>{if(t&&t.key===i)this._maybeAddToChanges(t,e),this._appendAfter=t,t=t._next;else{let n=this._getOrCreateRecordForKey(i,e);t=this._insertBeforeOrAppend(t,n)}})),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let e=t;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let i=this._records.get(e);this._maybeAddToChanges(i,t);let n=i._prev,r=i._next;return n&&(n._next=r),r&&(r._prev=n),i._next=null,i._prev=null,i}let i=new Fg(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach((i=>t(e[i],i)))}},Fg=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function Ng(){return new Ug([new Tg])}var Ug=(()=>{class e{static{this.ɵprov=Tn({token:e,providedIn:"root",factory:Ng})}constructor(e){this.factories=e}static create(t,i){if(null!=i){let e=i.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:i=>e.create(t,i||Ng()),deps:[[e,new gr,new mr]]}}find(e){let t=this.factories.find((t=>t.supports(e)));if(null!=t)return t;throw new mn(901,!1)}}return e})();function Vg(){return new qg([new Rg])}var qg=(()=>{class e{static{this.ɵprov=Tn({token:e,providedIn:"root",factory:Vg})}constructor(e){this.factories=e}static create(t,i){if(i){let e=i.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:i=>e.create(t,i||Vg()),deps:[[e,new gr,new mr]]}}find(e){let t=this.factories.find((t=>t.supports(e)));if(t)return t;throw new mn(901,!1)}}return e})(),$g=Ig(null,"core",[]),jg=(()=>{class e{constructor(e){}static{this.ɵfac=function(t){return new(t||e)(lr(sg))}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({})}}return e})();function zg(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function Wg(e,t){qp("NgSignals");let i=function(e){let t=Object.create(Fe);t.computation=e;let i=()=>{if(we(t),ve(t),t.value===Le)throw t.error;return t.value};return i[ge]=t,i}(e);return t?.equal&&(i[ge].equal=t.equal),i}function Hg(e){let t=be(null);try{return e()}finally{be(t)}}var Yg=null;function Gg(){return Yg}var Kg=class{},Qg=new Fn(""),Jg=(()=>{class e{historyGo(e){throw new Error("")}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(Zg),providedIn:"platform"})}}return e})(),Zg=(()=>{class e extends Jg{constructor(){super(),this._doc=cr(Qg),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Gg().getBaseHref(this._doc)}onPopState(e){let t=Gg().getGlobalEventTarget(this._doc,"window");return t.addEventListener("popstate",e,!1),()=>t.removeEventListener("popstate",e)}onHashChange(e){let t=Gg().getGlobalEventTarget(this._doc,"window");return t.addEventListener("hashchange",e,!1),()=>t.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,t,i){this._history.pushState(e,t,i)}replaceState(e,t,i){this._history.replaceState(e,t,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>new e,providedIn:"platform"})}}return e})();function Xg(e,t){if(0==e.length)return t;if(0==t.length)return e;let i=0;return e.endsWith("/")&&i++,t.startsWith("/")&&i++,2==i?e+t.substring(1):1==i?e+t:e+"/"+t}function eb(e){let t=e.match(/#|\?|$/),i=t&&t.index||e.length,n=i-("/"===e[i-1]?1:0);return e.slice(0,n)+e.slice(i)}function tb(e){return e&&"?"!==e[0]?"?"+e:e}var ib=(()=>{class e{historyGo(e){throw new Error("")}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(rb),providedIn:"root"})}}return e})(),nb=new Fn(""),rb=(()=>{class e extends ib{constructor(e,t){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=t??this._platformLocation.getBaseHrefFromDOM()??cr(Qg).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.on
1HashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Xg(this._baseHref,e)}path(e=!1){let t=this._platformLocation.pathname+tb(this._platformLocation.search),i=this._platformLocation.hash;return i&&e?`${t}${i}`:t}pushState(e,t,i,n){let r=this.prepareExternalUrl(i+tb(n));this._platformLocation.pushState(e,t,r)}replaceState(e,t,i,n){let r=this.prepareExternalUrl(i+tb(n));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static{this.ɵfac=function(t){return new(t||e)(lr(Jg),lr(nb,8))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),sb=(()=>{class e{constructor(e){this._subject=new _l,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;let t=this._locationStrategy.getBaseHref();this._basePath=function(e){if(new RegExp("^(https?:)?//").test(e)){let[,t]=e.split(/\/\/[^\/]+/);return t}return e}(eb(ab(t))),this._locationStrategy.onPopState((e=>{this._subject.emit({url:this.path(!0),pop:!0,state:e.state,type:e.type})}))}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+tb(t))}normalize(t){return e.stripTrailingSlash(function(e,t){if(!e||!t.startsWith(e))return t;let i=t.substring(e.length);return""===i||["/",";","?","#"].includes(i[0])?i:t}(this._basePath,ab(t)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,t="",i=null){this._locationStrategy.pushState(i,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+tb(t)),i)}replaceState(e,t="",i=null){this._locationStrategy.replaceState(i,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+tb(t)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe((e=>{this._notifyUrlChangeListeners(e.url,e.state)})),()=>{let t=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(t,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach((i=>i(e,t)))}subscribe(e,t,i){return this._subject.subscribe({next:e,error:t,complete:i})}static{this.normalizeQueryParams=tb}static{this.joinWithSlash=Xg}static{this.stripTrailingSlash=eb}static{this.ɵfac=function(t){return new(t||e)(lr(ib))}}static{this.ɵprov=Tn({token:e,factory:()=>new sb(lr(ib)),providedIn:"root"})}}return e})();function ab(e){return e.replace(/\/index.html$/,"")}var ob={ADP:[void 0,void 0,0],AFN:[void 0,"Ø",0],ALL:[void 0,void 0,0],AMD:[void 0,"Ö",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"â¼"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"à§³"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CNÂ¥","Â¥"],COP:[void 0,"$",2],CRC:[void 0,"â¡",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"KÄ",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E£"],ESP:[void 0,"â§",0],EUR:["â¬"],FJD:[void 0,"$"],FKP:[void 0,"£"],GBP:["£"],GEL:[void 0,"â¾"],GHS:[void 0,"GHâµ"],GIP:[void 0,"£"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["âª"],INR:["â¹"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["Â¥",void 0,0],KHR:[void 0,"á"],KMF:[void 0,"CF",0],KPW:[void 0,"â©",0],KRW:["â©",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"â¸"],LAK:[void 0,"â",0],LBP:[void 0,"L£",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"â®",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"â¦"],N
1IO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["â±"],PKR:[void 0,"Rs",2],PLN:[void 0,"zÅ"],PYG:[void 0,"â²",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"â½"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"£"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"£"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"£",0],THB:[void 0,"฿"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"âº"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"â´"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["â«",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["Fâ¯CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["¤"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},lb=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(lb||{}),cb=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(cb||{}),db=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(db||{}),ub=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(ub||{}),pb={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function hb(e,t){return vb(Nf(e)[Vf.DateFormat],t)}function fb(e,t){return vb(Nf(e)[Vf.TimeFormat],t)}function mb(e,t){return vb(Nf(e)[Vf.DateTimeFormat],t)}function gb(e,t){let i=Nf(e),n=i[Vf.NumberSymbols][t];if(typeof n>"u"){if(t===pb.CurrencyDecimal)return i[Vf.NumberSymbols][pb.Decimal];if(t===pb.CurrencyGroup)return i[Vf.NumberSymbols][pb.Group]}return n}function bb(e,t){return Nf(e)[Vf.NumberFormats][t]}function yb(e){if(!e[Vf.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Vf.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function vb(e,t){for(let i=t;i>-1;i--)if(typeof e[i]<"u")return e[i];throw new Error("Locale data API: locale data undefined")}function wb(e){let[t,i]=e.split(":");return{hours:+t,minutes:+i}}function _b(e,t,i="en"){let n=function(e){return Nf(e)[Vf.Currencies]}(i)[e]||ob[e]||[],r=n[1];return"narrow"===t&&"string"==typeof r?r:n[0]||e}var Sb=2;var Cb=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ib={},Ab=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,kb=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(kb||{}),xb=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(xb||{}),Tb=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(Tb||{});function Pb(e,t,i,n){let r=function(e){if(zb(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){let[t,i=1,n=1]=e.split("-").map((e=>+e));return Eb(t,i-1,n)}let t,i=parseFloat(e);if(!isNaN(e-i))return new Date(i);if(t=e.match(Cb))return function(e){let t=new Date(0),i=0,n=0,r=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(i=Number(e[9]+e[10]),n=Number(e[9]+e[11])),r.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));let a=Number(e[4]||0)-i,o=Number(e[5]||0)-n,l=Number(e[6]||0),c=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return s.call(t,a,o,l,c),t}(t)}let t=new Date(e);if(!zb(t))throw new Error(`Unable to convert "${e}" into a date`);return t}(e);t=Db(i,t)||t;let s,a=[];for(;t;){if(s=Ab.exec(t),!s){a.push(t);break}{a=a.concat(s.slice(1));let e=a.pop();if(!e)break;t=e}}let o=r.getTimezoneOffset();n&&(o=jb(n,o),r=function(e,t,i){let n=i?-1:1,r=e.getTimezoneOffset(),s=jb(t,r);return function(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}(e,n*(s-r))}(r,n,!0));let l="";return a.forEach((e=>{let t=function(e){if($b[e])return $b[e];let t;switch(e){case"G":case"GG":case"GGG":t=Rb(Tb.Eras,db.Abbreviated);break;case"GGGG":t=Rb(Tb.Eras,db.Wide);break;case"GGGGG":t=Rb(Tb.Eras,db.Narrow);break;case"y":t=Mb(xb.FullYear,1,0,!1,!0);break;case"yy":t=Mb(xb.FullYear,2,0,!0,!0);break;case"yyy":t=Mb(xb.FullYear,3,0,!1,!0);break;case"yyyy":t=Mb(xb.FullYear,4,0,!1,!0);break;case"Y":t=qb(1);break;case"YY":t=qb(2,!0);break;case"YYY":t=qb(3);break;case"YYYY":t=qb(4);break;case"M":case"L":t=Mb(xb.Month,1,1);break;case"MM":case"LL":t=Mb(xb.Month,2,1);break;case"MMM":t=Rb(Tb.Months,db.Abbreviated);break;case"MMMM":t=Rb(Tb.Months,db.Wide);break;case"MMMMM":t=Rb(Tb.Months,db.Narrow);break;case"LLL":t=Rb(Tb.Months,db.Abbreviated,cb.Standalone);break;case"LLLL":t=Rb(Tb.Months,db.Wide,cb.Standalone);break;case"LLLLL":t=Rb(Tb.Months,db.Narrow,cb.Standalone);break;case"w":t=Vb(1);break;case"ww":t=Vb(2);break;case"W":t=Vb(1,!0);break;case"d":t=Mb(xb.Date,1);break;case"dd":t=Mb(xb.Date,2);break;case"c":case"cc":t=Mb(xb.Day,1);break;case"ccc":t=Rb(Tb.Days,db.Abbreviated,cb.Standalone);break;case"cccc":t=Rb(Tb.Days,db.Wide,cb.Standalone);break;case"ccccc":t=Rb(Tb.Days,db.Narrow,cb.Standalone);break;case"cccccc":t=Rb(Tb.Days,db.Short,cb.Standalone);break;case"E":case"EE":case"EEE":t=Rb(Tb.Days,db.Abbreviated);break;case"EEEE":t=Rb(Tb.Days,db.Wide);break;case"EEEEE":t=Rb(Tb.Days,db.Narrow);break;case"EEEEEE":t=Rb(Tb.Days,db.Short);break;case"a":case"aa":case"aaa":t=Rb(Tb.DayPeriods,db.Abbreviated);break;case"aaaa":t=Rb(Tb.DayPeriods,db.Wide);break;
1case"aaaaa":t=Rb(Tb.DayPeriods,db.Narrow);break;case"b":case"bb":case"bbb":t=Rb(Tb.DayPeriods,db.Abbreviated,cb.Standalone,!0);break;case"bbbb":t=Rb(Tb.DayPeriods,db.Wide,cb.Standalone,!0);break;case"bbbbb":t=Rb(Tb.DayPeriods,db.Narrow,cb.Standalone,!0);break;case"B":case"BB":case"BBB":t=Rb(Tb.DayPeriods,db.Abbreviated,cb.Format,!0);break;case"BBBB":t=Rb(Tb.DayPeriods,db.Wide,cb.Format,!0);break;case"BBBBB":t=Rb(Tb.DayPeriods,db.Narrow,cb.Format,!0);break;case"h":t=Mb(xb.Hours,1,-12);break;case"hh":t=Mb(xb.Hours,2,-12);break;case"H":t=Mb(xb.Hours,1);break;case"HH":t=Mb(xb.Hours,2);break;case"m":t=Mb(xb.Minutes,1);break;case"mm":t=Mb(xb.Minutes,2);break;case"s":t=Mb(xb.Seconds,1);break;case"ss":t=Mb(xb.Seconds,2);break;case"S":t=Mb(xb.FractionalSeconds,1);break;case"SS":t=Mb(xb.FractionalSeconds,2);break;case"SSS":t=Mb(xb.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=Lb(kb.Short);break;case"ZZZZZ":t=Lb(kb.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=Lb(kb.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=Lb(kb.Long);break;default:return null}return $b[e]=t,t}(e);l+=t?t(r,i,o):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")})),l}function Eb(e,t,i){let n=new Date(0);return n.setFullYear(e,t,i),n.setHours(0,0,0),n}function Db(e,t){let i=function(e){return Nf(e)[Vf.LocaleId]}(e);if(Ib[i]??={},Ib[i][t])return Ib[i][t];let n="";switch(t){case"shortDate":n=hb(e,ub.Short);break;case"mediumDate":n=hb(e,ub.Medium);break;case"longDate":n=hb(e,ub.Long);break;case"fullDate":n=hb(e,ub.Full);break;case"shortTime":n=fb(e,ub.Short);break;case"mediumTime":n=fb(e,ub.Medium);break;case"longTime":n=fb(e,ub.Long);break;case"fullTime":n=fb(e,ub.Full);break;case"short":let t=Db(e,"shortTime"),i=Db(e,"shortDate");n=Ob(mb(e,ub.Short),[t,i]);break;case"medium":let r=Db(e,"mediumTime"),s=Db(e,"mediumDate");n=Ob(mb(e,ub.Medium),[r,s]);break;case"long":let a=Db(e,"longTime"),o=Db(e,"longDate");n=Ob(mb(e,ub.Long),[a,o]);break;case"full":let l=Db(e,"fullTime"),c=Db(e,"fullDate");n=Ob(mb(e,ub.Full),[l,c])}return n&&(Ib[i][t]=n),n}function Ob(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,(function(e,i){return null!=t&&i in t?t[i]:e}))),e}function Bb(e,t,i="-",n,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=i));let a=String(e);for(;a.length<t;)a="0"+a;return n&&(a=a.slice(a.length-t)),s+a}function Mb(e,t,i=0,n=!1,r=!1){return function(s,a){let o=function(e,t){switch(e){case xb.FullYear:return t.getFullYear();case xb.Month:return t.getMonth();case xb.Date:return t.getDate();case xb.Hours:return t.getHours();case xb.Minutes:return t.getMinutes();case xb.Seconds:return t.getSeconds();case xb.FractionalSeconds:return t.getMilliseconds();case xb.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}(e,s);if((i>0||o>-i)&&(o+=i),e===xb.Hours)0===o&&-12===i&&(o=12);else if(e===xb.FractionalSeconds)return function(e,t){return Bb(e,3).substring(0,t)}(o,t);let l=gb(a,pb.MinusSign);return Bb(o,t,l,n,r)}}function Rb(e,t,i=cb.Format,n=!1){return function(r,s){return function(e,t,i,n,r,s){switch(i){case Tb.Months:return function(e,t,i){let n=Nf(e),r=vb([n[Vf.MonthsFormat],n[Vf.MonthsStandalone]],t);return vb(r,i)}(t,r,n)[e.getMonth()];case Tb.Days:return function(e,t,i){let n=Nf(e),r=vb([n[Vf.DaysFormat],n[Vf.DaysStandalone]],t);return vb(r,i)}(t,r,n)[e.getDay()];case Tb.DayPeriods:let a=e.getHours(),o=e.getMinutes();if(s){let e=function(e){let t=Nf(e);return yb(t),(t[Vf.ExtraData][2]||[]).map((e=>"string"==typeof e?wb(e):[wb(e[0]),wb(e[1])]))}(t),i=function(e,t,i){let n=Nf(e);yb(n);let r=vb([n[Vf.ExtraData][0],n[Vf.ExtraData][1]],t)||[];return vb(r,i)||[]}(t,r,n),s=e.findIndex((e=>{if(Array.isArray(e)){let[t,i]=e,n=a>=t.hours&&o>=t.minutes,r=a<i.hours||a===i.hours&&o<i.minutes;if(t.hours<i.hours){if(n&&r)return!0}else if(n||r)return!0}else if(e.hours===a&&e.minutes===o)return!0;return!1}));if(-1!==s)return i[s]}return function(e,t,i){let n=Nf(e),r=vb([n[Vf.DayPeriodsFormat],n[Vf.DayPeriodsStandalone]],t);return vb(r,i)}(t,r,n)[a<12?0:1];case Tb.Eras:return function(e,t){return vb(Nf(e)[Vf.Eras],t)}(t,n)[e.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${i}`)}}(r,s,e,t,i,n)}}
1function Lb(e){return function(t,i,n){let r=-1*n,s=gb(i,pb.MinusSign),a=r>0?Math.floor(r/60):Math.ceil(r/60);switch(e){case kb.Short:return(r>=0?"+":"")+Bb(a,2,s)+Bb(Math.abs(r%60),2,s);case kb.ShortGMT:return"GMT"+(r>=0?"+":"")+Bb(a,1,s);case kb.Long:return"GMT"+(r>=0?"+":"")+Bb(a,2,s)+":"+Bb(Math.abs(r%60),2,s);case kb.Extended:return 0===n?"Z":(r>=0?"+":"")+Bb(a,2,s)+":"+Bb(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}var Fb=0,Nb=4;function Ub(e){let t=e.getDay(),i=0===t?-3:Nb-t;return Eb(e.getFullYear(),e.getMonth(),e.getDate()+i)}function Vb(e,t=!1){return function(i,n){let r;if(t){let e=new Date(i.getFullYear(),i.getMonth(),1).getDay()-1,t=i.getDate();r=1+Math.floor((t+e)/7)}else{let e=Ub(i),t=function(e){let t=Eb(e,Fb,1).getDay();return Eb(e,0,1+(t<=Nb?Nb:Nb+7)-t)}(e.getFullYear()),n=e.getTime()-t.getTime();r=1+Math.round(n/6048e5)}return Bb(r,e,gb(n,pb.MinusSign))}}function qb(e,t=!1){return function(i,n){return Bb(Ub(i).getFullYear(),e,gb(n,pb.MinusSign),t)}}var $b={};function jb(e,t){e=e.replace(/:/g,"");let i=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(i)?t:i}function zb(e){return e instanceof Date&&!isNaN(e.valueOf())}var Wb=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Hb=22,Yb=".",Gb="0",Kb=";",Qb=",",Jb="#";function Zb(e,t,i,n,r,s,a=!1){let o="",l=!1;if(isFinite(e)){let c=function(e){let t,i,n,r,s,a=Math.abs(e)+"",o=0;for((i=a.indexOf(Yb))>-1&&(a=a.replace(Yb,"")),(n=a.search(/e/i))>0?(i<0&&(i=n),i+=+a.slice(n+1),a=a.substring(0,n)):i<0&&(i=a.length),n=0;a.charAt(n)===Gb;n++);if(n===(s=a.length))t=[0],i=1;else{for(s--;a.charAt(s)===Gb;)s--;for(i-=n,t=[],r=0;n<=s;n++,r++)t[r]=Number(a.charAt(n))}return i>Hb&&(t=t.splice(0,Hb-1),o=i-1,i=1),{digits:t,exponent:o,integerLen:i}}(e);a&&(c=function(e){if(0===e.digits[0])return e;let t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===t?e.digits.push(0,0):1===t&&e.digits.push(0),e.integerLen+=2),e}(c));let d=t.minInt,u=t.minFrac,p=t.maxFrac;if(s){let e=s.match(Wb);if(null===e)throw new Error(`${s} is not a valid digit info`);let t=e[1],i=e[3],n=e[5];null!=t&&(d=ty(t)),null!=i&&(u=ty(i)),null!=n?p=ty(n):null!=i&&u>p&&(p=u)}!function(e,t,i){if(t>i)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${i}).`);let n=e.digits,r=n.length-e.integerLen,s=Math.min(Math.max(t,r),i),a=s+e.integerLen,o=n[a];if(a>0){n.splice(Math.max(e.integerLen,a));for(let e=a;e<n.length;e++)n[e]=0}else{r=Math.max(0,r),e.integerLen=1,n.length=Math.max(1,a=s+1),n[0]=0;for(let e=1;e<a;e++)n[e]=0}if(o>=5)if(a-1<0){for(let t=0;t>a;t--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[a-1]++;for(;r<Math.max(0,s);r++)n.push(0);let l=0!==s,c=t+e.integerLen,d=n.reduceRight((function(e,t,i,n){return t+=e,n[i]=t<10?t:t-10,l&&(0===n[i]&&i>=c?n.pop():l=!1),t>=10?1:0}),0);d&&(n.unshift(d),e.integerLen++)}(c,u,p);let h=c.digits,f=c.integerLen,m=c.exponent,g=[];for(l=h.every((e=>!e));f<d;f++)h.unshift(0);for(;f<0;f++)h.unshift(0);f>0?g=h.splice(f,h.length):(g=h,h=[0]);let b=[];for(h.length>=t.lgSize&&b.unshift(h.splice(-t.lgSize,h.length).join(""));h.length>t.gSize;)b.unshift(h.splice(-t.gSize,h.length).join(""));h.length&&b.unshift(h.join("")),o=b.join(gb(i,n)),g.length&&(o+=gb(i,r)+g.join("")),m&&(o+=gb(i,pb.Exponential)+"+"+m)}else o=gb(i,pb.Infinity);return o=e<0&&!l?t.negPre+o+t.negSuf:t.posPre+o+t.posSuf,o}function Xb(e,t,i,n,r){let s=ey(bb(t,lb.Currency),gb(t,pb.MinusSign));return s.minFrac=function(e){let t,i=ob[e];return i&&(t=i[2]),"number"==typeof t?t:Sb}(n),s.maxFrac=s.minFrac,Zb(e,s,t,pb.CurrencyGroup,pb.CurrencyDecimal,r).replace("¤",i).replace("¤","").trim()}function ey(e,t="-"){let i={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=e.split(Kb),r=n[0],s=n[1],a=-1!==r.indexOf(Yb)?r.split(Yb):[r.substring(0,r.lastIndexOf(Gb)+1),r.substring(r.lastIndexOf(Gb)+1)],o=a[0],l=a[1]||"";i.posPre=o.substring(0,o.indexOf(Jb));for(let e=0;e<l.length;e++){let t=l.charAt(e);t===Gb?i.minFrac=i.maxFrac=e+1:t===Jb?i.maxFrac=e+1:i.posSuf+=t}let c=o.split(Qb);if(i.gSize=c[1]?c[1].length:0,i.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,s){let e=r.length-i.posPre.length-i.posSuf.length,t=s.indexOf(Jb);i.negPre=s.substring(0,t).replace(/'/g,""),i.negSuf=s.slice(t+e).replace(/'/g,"")}else i.negPre=t+i.posPre,i.negSuf=i.posSuf;return i}function ty(e){let t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}function iy(e,t){t=encodeURIComponent(t);for(let i of e.split(";")){let e=i.indexOf("="),[n,r]=-1==e?[i,""]:[i.slice(0,e),i.slice(e+1)];if(n.trim()===t)return decodeURIComponent(r)}return null}var ny=/\s+/,ry=[],sy=(()=>{class e{constructor(e,t){this._ngEl=e,this._renderer=t,this.initialClasses=ry,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(ny):ry}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(ny):e}ngDoCheck(){for(let e of this.initialClasses)this._updateState(e,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let t of e)this._updateState(t,!0);else if(null!=e)for(let t of Object.keys(e))this._updateState(t,!!e[t]);this._applyStateDiff()}_updateState(e,t){let i=this.stateMap.get(e);void 0!==i?(i.enabled!==t&&(i.changed=!0,i.enabled=t),i.touched=!0):this.stateMap.set(e,{enabled:t,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let t=e[0],i=e[1];i.changed?(this._toggleClass(t,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(t,!1),this.stateMap.delete(t)),i.touched=!1}}_toggleClass(e,t){(e=e.trim()).length>
10&&e.split(ny).forEach((e=>{t?this._renderer.addClass(this._ngEl.nativeElement,e):this._renderer.removeClass(this._ngEl.nativeElement,e)}))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(dp))}}static{this.ɵdir=ts({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})(),ay=class{constructor(e,t,i,n){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=n}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}},oy=(()=>{class e{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,t,i){this._viewContainer=e,this._template=t,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let t=this._viewContainer;e.forEachOperation(((e,i,n)=>{if(null==e.previousIndex)t.createEmbeddedView(this._template,new ay(e.item,this._ngForOf,-1,-1),null===n?void 0:n);else if(null==n)t.remove(null===i?void 0:i);else if(null!==i){let r=t.get(i);t.move(r,n),ly(r,e)}}));for(let e=0,i=t.length;e<i;e++){let n=t.get(e).context;n.index=e,n.count=i,n.ngForOf=this._ngForOf}e.forEachIdentityChange((e=>{ly(t.get(e.currentIndex),e)}))}static ngTemplateContextGuard(e,t){return!0}static{this.ɵfac=function(t){return new(t||e)($d(yp),$d(Yu),$d(Ug))}}static{this.ɵdir=ts({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function ly(e,t){e.context.$implicit=t.item}var cy=(()=>{class e{constructor(e,t){this._viewContainer=e,this._context=new dy,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){uy("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){uy("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,t){return!0}static{this.ɵfac=function(t){return new(t||e)($d(yp),$d(Yu))}}static{this.ɵdir=ts({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})(),dy=class{constructor(){this.$implicit=null,this.ngIf=null}};function uy(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Sn(t)}'.`)}var py=class{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},hy=(()=>{class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let t=e===this._ngSwitch;return this._lastCasesMatched||=t,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),t}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let t of this._defaultViews)t.enforceState(e)}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵdir=ts({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}}return e})(),fy=(()=>{class e{constructor(e,t,i){this.ngSwitch=i,i._addCase(),this._view=new py(e,t)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static{this.ɵfac=function(t){return new(t||e)($d(yp),$d(Yu),$d(hy,9))}}static{this.ɵdir=ts({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}}return e})(),my=(()=>{class e{constructor(e,t,i){i._addDefault(new py(e,t))}static{this.ɵfac=function(t){return new(t||e)($d(yp),$d(Yu),$d(hy,9))}}static{this.ɵdir=ts({type:e,selectors:[["","ngSwitchDefault",""]],standalone:!0})}}return e})(),gy=(()=>{class e{constructor(e,t,i){this._ngEl=e,this._differs=t,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,t){let[i,n]=e.split("."),r=-1===i.indexOf("-")?void 0:ud.DashCase;null!=t?this._renderer.setStyle(this._ngEl.nativeElement,i,n?`${t}${n}`:t,r):this._renderer.removeStyle(this._ngEl.nativeElement,i,r)}_applyChanges(e){e.forEachRemovedItem((e=>this._setStyle(e.key,null))),e.forEachAddedItem((e=>this._setStyle(e.key,e.currentValue))),e.forEachChangedItem((e=>this._setStyle(e.key,e.currentValue)))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(qg),$d(dp))}}static{this.ɵdir=ts({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0})}}return e})(),by=(()=>
1{class e{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(this._shouldRecreateView(e)){let e=this._viewContainerRef;if(this._viewRef&&e.remove(e.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);let t=this._createContextForwardProxy();this._viewRef=e.createEmbeddedView(this.ngTemplateOutlet,t,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,t,i)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,t,i),get:(e,t,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,t,i)}})}static{this.ɵfac=function(t){return new(t||e)($d(yp))}}static{this.ɵdir=ts({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[ga]})}}return e})();function yy(e,t){return new mn(2100,!1)}var vy=new class{createSubscription(e,t){return e.then(t,(e=>{throw e}))}dispose(e){}},wy=new class{createSubscription(e,t){return Hg((()=>e.subscribe({next:t,error:e=>{throw e}})))}dispose(e){Hg((()=>e.unsubscribe()))}},_y=(()=>{class e{constructor(e){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,(t=>this._updateLatestValue(e,t)))}_selectStrategy(e){if(Zm(e))return vy;if(Xm(e))return wy;throw yy()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,t){e===this._obj&&(this._latestValue=t,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static{this.ɵfac=function(t){return new(t||e)($d(kg,16))}}static{this.ɵpipe=is({name:"async",type:e,pure:!1,standalone:!0})}}return e})(),Sy=(()=>{class e{transform(e){if(null==e)return null;if("string"!=typeof e)throw yy();return e.toLowerCase()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"lowercase",type:e,pure:!0,standalone:!0})}}return e})(),Cy=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u
10EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,Iy=(()=>{class e{transform(e){if(null==e)return null;if("string"!=typeof e)throw yy();
1return e.replace(Cy,(e=>e[0].toUpperCase()+e.slice(1).toLowerCase()))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"titlecase",type:e,pure:!0,standalone:!0})}}return e})(),Ay=(()=>{class e{transform(e){if(null==e)return null;if("string"!=typeof e)throw yy();return e.toUpperCase()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"uppercase",type:e,pure:!0,standalone:!0})}}return e})(),ky=new Fn(""),xy=new Fn(""),Ty=(()=>{class e{constructor(e,t,i){this.locale=e,this.defaultTimezone=t,this.defaultOptions=i}transform(e,t,i,n){if(null==e||""===e||e!=e)return null;try{let r=t??this.defaultOptions?.dateFormat??"mediumDate",s=i??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Pb(e,r,n||this.locale,s)}catch(e){throw yy(0,e.message)}}static{this.ɵfac=function(t){return new(t||e)($d(mg,16),$d(ky,24),$d(xy,24))}}static{this.ɵpipe=is({name:"date",type:e,pure:!0,standalone:!0})}}return e})(),Py=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"json",type:e,pure:!1,standalone:!0})}}return e})();var Ey=(()=>{class e{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=Dy}transform(e,t=Dy){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ??=this.differs.find(e).create();let i=this.differ.diff(e),n=t!==this.compareFn;return i&&(this.keyValues=[],i.forEachItem((e=>{this.keyValues.push(function(e,t){return{key:e,value:t}}(e.key,e.currentValue))}))),(i||n)&&(this.keyValues.sort(t),this.compareFn=t),this.keyValues}static{this.ɵfac=function(t){return new(t||e)($d(qg,16))}}static{this.ɵpipe=is({name:"keyvalue",type:e,pure:!1,standalone:!0})}}return e})();function Dy(e,t){let i=e.key,n=t.key;if(i===n)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(null===i)return 1;if(null===n)return-1;if("string"==typeof i&&"string"==typeof n)return i<n?-1:1;if("number"==typeof i&&"number"==typeof n)return i-n;if("boolean"==typeof i&&"boolean"==typeof n)return i<n?-1:1;let r=String(i),s=String(n);return r==s?0:r<s?-1:1}var Oy=(()=>{class e{constructor(e){this._locale=e}transform(e,t,i){if(!My(e))return null;i||=this._locale;try{return function(e,t,i){return Zb(e,ey(bb(t,lb.Decimal),gb(t,pb.MinusSign)),t,pb.Group,pb.Decimal,i)}(Ry(e),i,t)}catch(e){throw yy(0,e.message)}}static{this.ɵfac=function(t){return new(t||e)($d(mg,16))}}static{this.ɵpipe=is({name:"number",type:e,pure:!0,standalone:!0})}}return e})(),By=(()=>{class e{constructor(e,t="USD"){this._locale=e,this._defaultCurrencyCode=t}transform(e,t=this._defaultCurrencyCode,i="symbol",n,r){if(!My(e))return null;r||=this._locale,"boolean"==typeof i&&(i=i?"symbol":"code");let s=t||this._defaultCurrencyCode;"code"!==i&&(s="symbol"===i||"symbol-narrow"===i?_b(s,"symbol"===i?"wide":"narrow",r):i);try{return Xb(Ry(e),r,s,t,n)}catch(e){throw yy(0,e.message)}}static{this.ɵfac=function(t){return new(t||e)($d(mg,16),$d(gg,16))}}static{this.ɵpipe=is({name:"currency",type:e,pure:!0,standalone:!0})}}return e})();function My(e){return!(null==e||""===e||e!=e)}function Ry(e){if("string"==typeof e&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if("number"!=typeof e)throw new Error(`${e} is not a number`);return e}var Ly=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({})}}return e})(),Fy="browser";function Ny(e){return e===Fy}function Uy(e){return"server"===e}var Vy=class{},qy=class{},$y=class{},jy=class e{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?"string"==typeof e?this.lazyInit=()=>{this.headers=new Map,e.split("\n").forEach((e=>{let t=e.indexOf(":");if(t>0){let i=e.slice(0,t),n=i.toLowerCase(),r=e.slice(t+1).trim();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(r):this.headers.set(n,[r])}}))}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach(((e,t)=>{this.setHeaderEntries(t,e)}))):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach((([e,t])=>{this.setHeaderEntries(e,t)}))}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach((e=>this.applyUpdate(e))),this.lazyUpdate=null))}
1copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach((t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))}))}clone(t){let i=new e;return i.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,i.lazyUpdate=(this.lazyUpdate||[]).concat([t]),i}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(e.name,t);let n=("a"===e.op?this.headers.get(t):void 0)||[];n.push(...i),this.headers.set(t,n);break;case"d":let r=e.value;if(r){let e=this.headers.get(t);if(!e)return;e=e.filter((e=>-1===r.indexOf(e))),0===e.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,e)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map((e=>e.toString())),n=e.toLowerCase();this.headers.set(n,i),this.maybeSetNormalizedName(e,n)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach((t=>e(this.normalizedNames.get(t),this.headers.get(t))))}},zy=class{encodeKey(e){return Yy(e)}encodeValue(e){return Yy(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};var Wy=/%(\d[a-f0-9])/gi,Hy={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Yy(e){return encodeURIComponent(e).replace(Wy,((e,t)=>Hy[t]??e))}function Gy(e){return`${e}`}var Ky=class e{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new zy,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){let i=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach((e=>{let n=e.indexOf("="),[r,s]=-1==n?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,n)),t.decodeValue(e.slice(n+1))],a=i.get(r)||[];a.push(s),i.set(r,a)})),i}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach((t=>{let i=e.fromObject[t],n=Array.isArray(i)?i.map(Gy):[Gy(i)];this.map.set(t,n)}))):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach((i=>{let n=e[i];Array.isArray(n)?n.forEach((e=>{t.push({param:i,value:e,op:"a"})})):t.push({param:i,value:n,op:"a"})})),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map((e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map((e=>t+"="+this.encoder.encodeValue(e))).join("&")})).filter((e=>""!==e)).join("&")}clone(t){let i=new e({encoder:this.encoder});return i.cloneFrom=this.cloneFrom||this,i.updates=(this.updates||[]).concat(t),i}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach((e=>this.map.set(e,this.cloneFrom.map.get(e)))),this.updates.forEach((e=>{switch(e.op){case"a":case"s":let t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(Gy(e.value)),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let t=this.map.get(e.param)||[],i=t.indexOf(Gy(e.value));-1!==i&&t.splice(i,1),t.length>0?this.map.set(e.param,t):this.map.delete(e.param)}}})),this.cloneFrom=this.updates=null)}},Qy=class{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function Jy(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function Zy(e){return typeof Blob<"u"&&e instanceof Blob}function Xy(e){return typeof FormData<"u"&&e instanceof FormData}var ev=class e{constructor(e,t,i,n){let r;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==i?i:null,r=n):r=i,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),this.transferCache=r.transferCache),this.headers??=new jy,this.context??=new Qy,this.params){let e=this.params.toString();if(0===e.length)this.urlWithParams=t;else{let i=t.indexOf("?"),n=-1===i?"?":i<t.length-1?"&":"";this.urlWithParams=t+n+e}}else this.params=new Ky,this.urlWithParams=t}serializeBody(){return null===this.body?null:"string"==typeof this.body||Jy(this.body)||Zy(this.body)||Xy(this.body)||function(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}(this.body)?this.body:this.body instanceof Ky?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||Xy(this.body)?null:Zy(this.body)?this.body.type||null:Jy(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Ky?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(t={}){let i=t.method||this.method,n=t.url||this.url,r=t.responseType||this.responseType,s=t.transferCache??this.transferCache,a=void 0!==t.body?t.body:this.body,o=t.withCredentials??this.withCredentials,l=t.reportProgress??this.reportProgress,c=t.headers||this.headers,d=t.params||this.params,u=t.context??this.context;return void 0!==t.setHeaders&&(c=Object.keys(t.setHeaders).reduce(((e,i)=>e.set(i,t.setHeaders[i])),c)),t.setParams&&(d=Object.keys(t.setParams).reduce(((e,i)=>e.set(i,t.setParams[i])),d)),new e(i,n,a,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:o,transferCache:s})}}
1,tv=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(tv||{}),iv=class{constructor(e,t=200,i="OK"){this.headers=e.headers||new jy,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},nv=class e extends iv{constructor(e={}){super(e),this.type=tv.ResponseHeader}clone(t={}){return new e({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},rv=class e extends iv{constructor(e={}){super(e),this.type=tv.Response,this.body=void 0!==e.body?e.body:null}clone(t={}){return new e({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},sv=class extends iv{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}};function av(e,t){return{body:t,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}var ov=(()=>{class e{constructor(e){this.handler=e}request(e,t,i={}){let n;if(e instanceof ev)n=e;else{let r,s;r=i.headers instanceof jy?i.headers:new jy(i.headers),i.params&&(s=i.params instanceof Ky?i.params:new Ky({fromObject:i.params})),n=new ev(e,t,void 0!==i.body?i.body:null,{headers:r,context:i.context,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache})}let r=fi(n).pipe(ji((e=>this.handler.handle(e))));if(e instanceof ev||"events"===i.observe)return r;let s=r.pipe(qi((e=>e instanceof rv)));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return s.pipe(bi((e=>{if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body})));case"blob":return s.pipe(bi((e=>{if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body})));case"text":return s.pipe(bi((e=>{if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body})));default:return s.pipe(bi((e=>e.body)))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:(new Ky).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,i={}){return this.request("PATCH",e,av(i,t))}post(e,t,i={}){return this.request("POST",e,av(i,t))}put(e,t,i={}){return this.request("PUT",e,av(i,t))}static{this.ɵfac=function(t){return new(t||e)(lr(qy))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),lv=/^\)\]\}',?\n/;function cv(e){if(e.url)return e.url;let t="X-Request-URL".toLocaleLowerCase();return e.headers.get(t)}var dv=(()=>{class e{constructor(){this.fetchImpl=cr(uv,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e)),this.ngZone=cr(Tl)}handle(e){return new gt((t=>{let i=new AbortController;return this.doRequest(e,i.signal,t).then(pv,(e=>t.error(new sv({error:e})))),()=>i.abort()}))}doRequest(e,t,i){return v(this,null,(function*(){let n,r=this.createRequestInit(e);try{let s=this.ngZone.runOutsideAngular((()=>this.fetchImpl(e.urlWithParams,h({signal:t},r))));(function(e){e.then(pv,pv)})(s),i.next({type:tv.Sent}),n=yield s}catch(t){return void i.error(new sv({error:t,status:t.status??0,statusText:t.statusText,url:e.urlWithParams,headers:t.headers}))}let s=new jy(n.headers),a=n.statusText,o=cv(n)??e.urlWithParams,l=n.status,c=null;if(e.reportProgress&&i.next(new nv({headers:s,status:l,statusText:a,url:o})),n.body){let t,r,s=n.headers.get("content-length"),a=[],o=n.body.getReader(),l=0,d=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular((()=>v(this,null,(function*(){for(;;){let{done:n,value:c}=yield o.read();if(n)break;if(a.push(c),l+=c.length,e.reportProgress){r="text"===e.responseType?(r??"")+(t??=new TextDecoder).decode(c,{stream:!0}):void 0;let n=()=>i.next({type:tv.DownloadProgress,total:s?+s:void 0,loaded:l,partialText:r});d?d.run(n):n()}}}))));let u=this.concatChunks(a,l);try{let t=n.headers.get("Content-Type")??"";c=this.parseBody(e,u,t)}catch(t){return void i.error(new sv({error:t,headers:new jy(n.headers),status:n.status,statusText:n.statusText,url:cv(n)??e.urlWithParams}))}}0===l&&(l=c?200:0),l>=200&&l<300?(i.next(new rv({body:c,headers:s,status:l,statusText:a,url:o})),i.complete()):i.error(new sv({error:c,headers:s,status:l,statusText:a,url:o}))}))}parseBody(e,t,i){switch(e.responseType){case"json":let e=(new TextDecoder).decode(t).replace(lv,"");return""===e?null:JSON.parse(e);case"text":return(new TextDecoder).decode(t);case"blob":return new Blob([t],{type:i});case"arraybuffer":return t.buffer}}createRequestInit(e){let t={},i=e.withCredentials?"include":void 0;
1if(e.headers.forEach(((e,i)=>t[e]=i.join(","))),e.headers.has("Accept")||(t.Accept="application/json, text/plain, */*"),!e.headers.has("Content-Type")){let i=e.detectContentTypeHeader();null!==i&&(t["Content-Type"]=i)}return{body:e.serializeBody(),method:e.method,headers:t,credentials:i}}concatChunks(e,t){let i=new Uint8Array(t),n=0;for(let t of e)i.set(t,n),n+=t.length;return i}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),uv=class{};function pv(){}function hv(e,t){return t(e)}function fv(e,t){return(i,n)=>t.intercept(i,{handle:t=>e(t,n)})}var mv=new Fn(""),gv=new Fn(""),bv=new Fn(""),yv=new Fn("",{providedIn:"root",factory:()=>!0});function vv(){let e=null;return(t,i)=>{null===e&&(e=(cr(mv,{optional:!0})??[]).reduceRight(fv,hv));let n=cr(wl);if(cr(yv)){let r=n.add();return e(t,i).pipe(tn((()=>n.remove(r))))}return e(t,i)}}var wv=(()=>{class e extends qy{constructor(e,t){super(),this.backend=e,this.injector=t,this.chain=null,this.pendingTasks=cr(wl),this.contributeToStability=cr(yv)}handle(e){if(null===this.chain){let e=Array.from(new Set([...this.injector.get(gv),...this.injector.get(bv,[])]));this.chain=e.reduceRight(((e,t)=>function(e,t,i){return(n,r)=>Ps(i,(()=>t(n,(t=>e(t,r)))))}(e,t,this.injector)),hv)}if(this.contributeToStability){let t=this.pendingTasks.add();return this.chain(e,(e=>this.backend.handle(e))).pipe(tn((()=>this.pendingTasks.remove(t))))}return this.chain(e,(e=>this.backend.handle(e)))}static{this.ɵfac=function(t){return new(t||e)(lr($y),lr(Cs))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),_v=/^\)\]\}',?\n/;var Sv=(()=>{class e{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new mn(-2800,!1);let t=this.xhrFactory;return(t.ɵloadImpl?hi(t.ɵloadImpl()):fi(null)).pipe(dn((()=>new gt((i=>{let n=t.build();if(n.open(e.method,e.urlWithParams),e.withCredentials&&(n.withCredentials=!0),e.headers.forEach(((e,t)=>n.setRequestHeader(e,t.join(",")))),e.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let t=e.detectContentTypeHeader();null!==t&&n.setRequestHeader("Content-Type",t)}if(e.responseType){let t=e.responseType.toLowerCase();n.responseType="json"!==t?t:"text"}let r=e.serializeBody(),s=null,a=()=>{if(null!==s)return s;let t=n.statusText||"OK",i=new jy(n.getAllResponseHeaders()),r=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(n)||e.url;return s=new nv({headers:i,status:n.status,statusText:t,url:r}),s},o=()=>{let{headers:t,status:r,statusText:s,url:o}=a(),l=null;204!==r&&(l=typeof n.response>"u"?n.responseText:n.response),0===r&&(r=l?200:0);let c=r>=200&&r<300;if("json"===e.responseType&&"string"==typeof l){let e=l;l=l.replace(_v,"");try{l=""!==l?JSON.parse(l):null}catch(t){l=e,c&&(c=!1,l={error:t,text:l})}}c?(i.next(new rv({body:l,headers:t,status:r,statusText:s,url:o||void 0})),i.complete()):i.error(new sv({error:l,headers:t,status:r,statusText:s,url:o||void 0}))},l=e=>{let{url:t}=a(),r=new sv({error:e,status:n.status||0,statusText:n.statusText||"Unknown Error",url:t||void 0});i.error(r)},c=!1,d=t=>{c||(i.next(a()),c=!0);let r={type:tv.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(r.total=t.total),"text"===e.responseType&&n.responseText&&(r.partialText=n.responseText),i.next(r)},u=e=>{let t={type:tv.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),i.next(t)};return n.addEventListener("load",o),n.addEventListener("error",l),n.addEventListener("timeout",l),n.addEventListener("abort",l),e.reportProgress&&(n.addEventListener("progress",d),null!==r&&n.upload&&n.upload.addEventListener("progress",u)),n.send(r),i.next({type:tv.Sent}),()=>{n.removeEventListener("error",l),n.removeEventListener("abort",l),n.removeEventListener("load",o),n.removeEventListener("timeout",l),e.reportProgress&&(n.removeEventListener("progress",d),null!==r&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})))))}static{this.ɵfac=function(t){return new(t||e)(lr(Vy))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Cv=new Fn(""),Iv=new Fn("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),Av=new Fn("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"}),kv=class{},xv=(()=>{class e{constructor(e,t,i){this.doc=e,this.platform=t,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=iy(e,this.cookieName),this.lastCookieString=e),this.lastToken}static{this.ɵfac=function(t){return new(t||e)(lr(Qg),lr(rc),lr(Iv))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function Tv(e,t){let i=e.url.toLowerCase();if(!cr(Cv)||"GET"===e.method||"HEAD"===e.method||i.startsWith("http://")||i.startsWith("https://"))return t(e);let n=cr(kv).getToken(),r=cr(Av);return null!=n&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),t(e)}var Pv=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Pv||{});function Ev(...e){let t=[ov,Sv,wv,{provide:qy,useExisting:wv},{provide:$y,useFactory:()=>cr(dv,{optional:!0})??cr(Sv)},{provide:gv,useValue:Tv,multi:!0},{provide:Cv,useValue:!0},{provide:kv,useClass:xv}];for(let i of e)t.push(...i.ɵproviders);return function(e){return{"ɵproviders":e}}(t)}var Dv=new Fn("");function Ov(){return function(e,t){return{"ɵkind":e,"ɵproviders":t}}(Pv.LegacyInterceptors,[{provide:Dv,useFactory:vv},{provide:gv,useExisting:Dv,multi:!0}])}var Bv=class extends Kg{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Mv=class e extends Bv{static makeCurrent(){!function(e){Yg??=e}(new e)}onAndCancel(e,t,i){return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}
1isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getBaseHref(e){let t=(Rv=Rv||document.querySelector("base"))?Rv.getAttribute("href"):null;return null==t?null:function(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Rv=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return iy(document.cookie,e)}},Rv=null;var Lv=(()=>{class e{build(){return new XMLHttpRequest}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Fv=new Fn(""),Nv=(()=>{class e{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach((e=>{e.manager=this})),this._plugins=e.slice().reverse()}addEventListener(e,t,i){return this._findPluginFor(t).addEventListener(e,t,i)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find((t=>t.supports(e))),!t)throw new mn(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.ɵfac=function(t){return new(t||e)(lr(Fv),lr(Tl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Uv=class{constructor(e){this._doc=e}},Vv="ng-app-id",qv=(()=>{class e{constructor(e,t,i,n={}){this.doc=e,this.appId=t,this.nonce=i,this.platformId=n,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Uy(n),this.resetHostNodes()}addStyles(e){for(let t of e)1===this.changeUsageCount(t,1)&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach((e=>e.remove())),e.clear());for(let e of this.getAllStyles())this.onStyleRemoved(e);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach((e=>e.remove())),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${Vv}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach((e=>{null!=e.textContent&&t.set(e.textContent,e)})),t}return null}changeUsageCount(e,t){let i=this.styleRef;if(i.has(e)){let n=i.get(e);return n.usage+=t,n.usage}return i.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let i=this.styleNodesInDOM,n=i?.get(t);if(n?.parentNode===e)return i.delete(t),n.removeAttribute(Vv),n;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(Vv,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let i=this.getStyleElement(e,t),n=this.styleRef,r=n.get(t)?.elements;r?r.push(i):n.set(t,{elements:[i],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.ɵfac=function(t){return new(t||e)(lr(Qg),lr(tc),lr(ac,8),lr(rc))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),$v={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},jv=/%COMP%/g,zv="%COMP%",Wv=`_nghost-${zv}`,Hv=`_ngcontent-${zv}`,Yv=new Fn("",{providedIn:"root",factory:()=>true});function Gv(e,t){return t.map((t=>t.replace(jv,e)))}var Kv=(()=>{class e{constructor(e,t,i,n,r,s,a,o=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=i,this.removeStylesOnCompDestroy=n,this.doc=r,this.platformId=s,this.ngZone=a,this.nonce=o,this.rendererByCompId=new Map,this.platformIsServer=Uy(s),this.defaultRenderer=new Qv(e,r,a,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===Dr.ShadowDom&&(t=f(h({},t),{encapsulation:Dr.Emulated}));let i=this.getOrCreateRenderer(e,t);
1return i instanceof ew?i.applyToHost(e):i instanceof Xv&&i.applyStyles(),i}getOrCreateRenderer(e,t){let i=this.rendererByCompId,n=i.get(t.id);if(!n){let r=this.doc,s=this.ngZone,a=this.eventManager,o=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,c=this.platformIsServer;switch(t.encapsulation){case Dr.Emulated:n=new ew(a,o,t,this.appId,l,r,s,c);break;case Dr.ShadowDom:return new Zv(a,o,e,t,r,s,this.nonce,c);default:n=new Xv(a,o,t,l,r,s,c)}i.set(t.id,n)}return n}ngOnDestroy(){this.rendererByCompId.clear()}static{this.ɵfac=function(t){return new(t||e)(lr(Nv),lr(qv),lr(tc),lr(Yv),lr(Qg),lr(rc),lr(Tl),lr(ac))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Qv=class{constructor(e,t,i,n){this.eventManager=e,this.doc=t,this.ngZone=i,this.platformIsServer=n,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,t){return t?this.doc.createElementNS($v[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Jv(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(Jv(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i="string"==typeof e?this.doc.querySelector(e):e;if(!i)throw new mn(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,n){if(n){t=n+":"+t;let r=$v[n];r?e.setAttributeNS(r,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let n=$v[i];n?e.removeAttributeNS(n,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,n){n&(ud.DashCase|ud.Important)?e.style.setProperty(t,i,n&ud.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&ud.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){null!=e&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i){if("string"==typeof e&&!(e=Gg().getGlobalEventTarget(this.doc,e)))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,this.decoratePreventDefault(i))}decoratePreventDefault(e){return t=>{if("__ngUnwrap__"===t)return e;!1===(this.platformIsServer?this.ngZone.runGuarded((()=>e(t))):e(t))&&t.preventDefault()}}};function Jv(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}var Zv=class extends Qv{constructor(e,t,i,n,r,s,a,o){super(e,r,s,o),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=Gv(n.id,n.styles);for(let e of l){let t=document.createElement("style");a&&t.setAttribute("nonce",a),t.textContent=e,this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Xv=class extends Qv{constructor(e,t,i,n,r,s,a,o){super(e,r,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=n,this.styles=o?Gv(o,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},ew=class extends Xv{constructor(e,t,i,n,r,s,a,o){let l=n+"-"+i.id;super(e,t,i,r,s,a,o,l),this.contentAttr=function(e){return Hv.replace(jv,e)}(l),this.hostAttr=function(e){return Wv.replace(jv,e)}(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}},tw=(()=>{class e extends Uv{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,i){return e.addEventListener(t,i,!1),()=>this.removeEventListener(e,t,i)}removeEventListener(e,t,i){return e.removeEventListener(t,i)}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),iw=["alt","control","meta","shift"],nw={"\b":"Backspace","\t":"Tab","�":"Delete","�":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},rw={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},sw=(()=>{class e extends Uv{constructor(e){super(e)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,i,n){let r=e.parseEventName(i),s=e.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular((()=>Gg().onAndCancel(t,r.domEventName,s)))}static parseEventName(t){let i=t.toLowerCase().split("."),n=i.shift();if(0===i.length||"keydown"!==n&&"keyup"!==n)return null;let r=e._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),iw.forEach((e=>{let t=i.indexOf(e);t>-1&&(i.splice(t,1),s+=e+".")})),s+=r,0!=i.length||0===r.length)return null;let o={};return o.domEventName=n,o.fullKey=s,o}static matchEventFullKeyCode(e,t){let i=nw[e.key]||e.key,n="";return t.indexOf("code.")>-1&&(i=e.code,n="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),iw.forEach((t=>{if(t!==i){(0,rw[t])(e)&&(n+=t+".")}})),n+=i,n===t)}static eventCallback(t,i,n){return r=>{e.matchEventFullKeyCode(r,t)&&n.runGuarded((()=>i(r)))}}static _normalizeKey(e){return"esc"===e?"escape":e}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();var aw=[{provide:rc,useValue:Fy},{provide:nc,useValue:function(){Mv.makeCurrent()},multi:!0},{provide:Qg,useFactory:function(){return function(e){Gl=e}(document),document},deps:[]}],ow=Ig($g,"browser",aw),lw=new Fn(""),cw=[{provide:Km,useClass:class{addToWindow(e){vn.getAngularTestability=(t,i=!0)=>{let n=e.findTestabilityInTree(t,i);if(null==n)throw new mn(5103,!1);return n},vn.getAllAngularTestabilities=()=>e.getAllTestabilities(),vn.getAllAngularRootElements=()=>e.getAllRootElements();vn.frameworkStabilizers||(vn.frameworkStabilizers=[]),vn.frameworkStabilizers.push((e=>{let t=vn.getAllAngularTestabilities(),i=t.length,n=function(){i--,0==i&&e()};t.forEach((e=>{e.whenStable(n)}))}))}findTestabilityInTree(e,t,i){if(null==t)return null;return e.getTestability(t)??(i?Gg().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},deps:[]},{provide:Gm,useClass:Qm,deps:[Tl,Jm,Km]},{provide:Qm,useClass:Qm,deps:[Tl,Jm,Km]}],dw=[{provide:vs,useValue:"root"},{provide:Ll,useFactory:function(){return new Ll},deps:[]},{provide:Fv,useClass:tw,multi:!0,deps:[Qg,Tl,rc]},{provide:Fv,useClass:sw,multi:!0,deps:[Qg]}
1,Kv,qv,Nv,{provide:cp,useExisting:Kv},{provide:Vy,useClass:Lv,deps:[]},[]],uw=(()=>{class e{constructor(e){}static withServerTransition(t){return{ngModule:e,providers:[{provide:tc,useValue:t.appId}]}}static{this.ɵfac=function(t){return new(t||e)(lr(lw,12))}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[...dw,...cw],imports:[Ly,jg]})}}return e})(),pw=(()=>{class e{constructor(e){this._doc=e,this._dom=Gg()}addTag(e,t=!1){return e?this._getOrCreateElement(e,t):null}addTags(e,t=!1){return e?e.reduce(((e,i)=>(i&&e.push(this._getOrCreateElement(i,t)),e)),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];let t=this._doc.querySelectorAll(`meta[${e}]`);return t?[].slice.call(t):[]}updateTag(e,t){if(!e)return null;t=t||this._parseSelector(e);let i=this.getTag(t);return i?this._setMetaElementAttributes(e,i):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,t=!1){if(!t){let t=this._parseSelector(e),i=this.getTags(t).filter((t=>this._containsAttributes(e,t)))[0];if(void 0!==i)return i}let i=this._dom.createElement("meta");return this._setMetaElementAttributes(e,i),this._doc.getElementsByTagName("head")[0].appendChild(i),i}_setMetaElementAttributes(e,t){return Object.keys(e).forEach((i=>t.setAttribute(this._getMetaKeyMap(i),e[i]))),t}_parseSelector(e){let t=e.name?"name":"property";return`${t}="${e[t]}"`}_containsAttributes(e,t){return Object.keys(e).every((i=>t.getAttribute(this._getMetaKeyMap(i))===e[i]))}_getMetaKeyMap(e){return hw[e]||e}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),hw={httpEquiv:"http-equiv"},fw=(()=>{class e{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),mw=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:function(t){let i=null;return i=t?new(t||e):lr(gw),i},providedIn:"root"})}}return e})(),gw=(()=>{class e extends mw{constructor(e){super(),this._doc=e}sanitize(e,t){if(null==t)return null;switch(e){case Xc.NONE:return t;case Xc.HTML:return Sc(t,"HTML")?_c(t):Jc(this._doc,String(t)).toString();case Xc.STYLE:return Sc(t,"Style")?_c(t):t;case Xc.SCRIPT:if(Sc(t,"Script"))return _c(t);throw new mn(5200,!1);case Xc.URL:return Sc(t,"URL")?_c(t):xc(String(t));case Xc.RESOURCE_URL:if(Sc(t,"ResourceURL"))return _c(t);throw new mn(5201,!1);default:throw new mn(5202,!1)}}bypassSecurityTrustHtml(e){return function(e){return new gc(e)}(e)}bypassSecurityTrustStyle(e){return function(e){return new bc(e)}(e)}bypassSecurityTrustScript(e){return function(e){return new yc(e)}(e)}bypassSecurityTrustUrl(e){return function(e){return new vc(e)}(e)}bypassSecurityTrustResourceUrl(e){return function(e){return new wc(e)}(e)}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),bw=y(w(),1),yw=class{constructor(e){Object.assign(this,e)}},vw=(()=>{class e{constructor(){this._abTargetLoadedState=new Tt(!1),this.abTargetLoadedState$=this._abTargetLoadedState.asObservable(),this.setGRSSpecificParamsInLS=function(){window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableGrsEndpoint")&&!window.SWY.CONFIGSERVICE.featureToggleConfig.disableGrsEndpoint&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_1835&&"a"===window.analyticsSwy.testFlags.EOT_1835.toLowerCase()&&(window.AB.COMMON.setUpdateVisitorIdForGrs(),window.AB.COMMON.setSessionIdForGrs())},this.isTargetLoadComplete()?this._abTargetLoadedState.next(!0):(console.warn("========> AB TESTING ====> target flag is not loaded"),window.addEventListener("AdobeTarget-Complete",(e=>{console.warn("========> AB TESTING ====> AdobeTarget-Complete event listener called"),this.setGRSSpecificParamsInLS(),this._abTargetLoadedState.next(!0)}),{once:!0}))}isTargetLoadComplete(){let e=!1,t=window.AB.COMMON.getURLParameterByName("mboxDisable");return(t&&(1===t||!0===t)||window.analyticsSwy&&window.analyticsSwy.testFlags&&1==window.analyticsSwy.testFlags["AdobeTarget-Complete"])&&(e=!0),e}isABTestingDisabled(){let e=!1,t=new URLSearchParams(window.location.search).get("mboxDisable");return t&&("1"==t||"true"==t.toLowerCase())&&(e=!0),e}getTargetFlagValue(e){return window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags[e]}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),ww=(()=>{class e{setConfig(e){console.log("ConfigService:SetConfig"),console.log(e),this._config=h({},e)}getProductConfig(){return this._config&&this._config.product?h({},this._config.product):{}}getCookiesConfig(){return this._config&&this._config.cookies?h({},this._config.cookies):{}}constructor(){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),_w=(()=>{class e{constructor(){this.cartModified=new kt,this.$cartModified=this.cartModified.asObservable(),this.getUserChannel=function(){let e=this.getPreference();switch(e=e?e.toLowerCase():void 0,e){case"delivery":return"delivery";case"dug":return"pickup";case"j4u":return"instore";default:return""}},window.userInfoServiceRefAL={service:this}}setUserSession(e){this._userSession=h({},e)}initUserSession(){let{branchId:e,preferenceMode:t,j4u:i,zipcode:n,clubCard:r}=window.AB.userInfo,s=f(h({},window.AB.userInfo),{shopStoreId:e,shopZipcode:n,preference:t,clubCardNumber:r,j4uStoreId:i.storeId,j4uZipcode:i.zipcode});this.setUserSession(s)}getUserSession(){return this._userSession}getSWY_SHOP_TOKEN(){return this._userSession.SWY_SHOP_TOKEN}setSWY_SHOP_TOKEN(e){this._userSession.SWY_SHOP_TOKEN=e}getUUID(){return this._userSession.UUID}getBanner(){return this._userSession.banner}getClubCardNumber(){return this._userSession.clubCardNumber}getCustomerId(){return this._userSession.customerId}getSiteType(){return this._userSession.siteType}getDisplayableBanner(){return this._userSession.displayableBanner}getEmail(){return this._userSession.email}getExpireTime(){return this._userSession.expireTime}getFirstName(){return this._userSession.firstName}getJ4uStoreId(){return this._userSession.j4uStoreId}getJ4uZipcode(){return this._userSession.j4uZipcode}getPreference(){return this._userSession?.preference}getShopStoreId(){return this._userSession.shopStoreId}getStoreId(){return this._userSession.storeId}getShopZipcode(){return this._userSession.shopZipcode}getUserType(){return this._userSession.userType}getWfcStoreId(){return this._userSession.wfcStoreId}getHouseId(){return this._userSession.houseId}getUnattendedDeliveryIsEnabled(){return this._userSession.unattendedDeliveryIsEnabled}getCustomerType(){return this._userSession?.customerType}isAuthorized(){let e=this.getUserType().toUpperCase();return"R"===e||"C"===e}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Sw=(()=>{class e{constructor(e,t){this._configService=e,this._userInfoService=t,this._isLSEnabled=void 0,this.isCookieEnabled=function(){let e=!!navigator.cookieEnabled;return typeof navigator.cookieEnabled>"u"&&!e&&(document.cookie="testcookie",e=-1!=document.cookie.indexOf("testcookie")),e},this.checkAuthorizedCookie=function(){let e=this.getCookie("SWY_SHARED_SESSION_INFO"),t=!1,i={};try{e&&(i=JSON.parse(e),t="object"==typeof i)}catch{t=!1}return t}
1,this.updateTokenRefreshProperty=function(){let e=this.getCookie("SWY_SHARED_SESSION_INFO");if(""!=e&&(e=decodeURI(e),e=JSON.parse(e),!this.isEmpty(e.info)&&!this.isEmpty(e.info.SHOP))){let t=e.info.SHOP,i=void 0!==t.userType?t.userType:"",n=f(h({},this._userInfoService.getUserSession()),{userType:i});if(t.userData){let e=void 0!==t.userData.expireTime?t.userData.expireTime:"";n.expireTime=e}this._userInfoService.setUserSession(n)}},this.isTokenActive=function(){let e=null,t=null,i=!1;return this._userInfoService.getExpireTime()&&(e=(new Date).getTime(),t=parseInt(this._userInfoService.getExpireTime()),t>e&&(i=!0)),i}}isEmpty(e){if(null==e)return!0;if(e.length>0)return!1;if(0===e.length||"object"!=typeof e)return!0;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}getCookie(e){let t="";if(this.isCookieEnabled()){let i=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "==r.charAt(0);)r=r.substring(1);0==r.indexOf(i)&&(t=r.substring(i.length,r.length))}}else{let i=this._configService.getCookiesConfig().cookiesStorage[e];typeof i<"u"&&0==this.hasTimeExpired(i.expires)&&(t=decodeURIComponent(i.value))}return t}setCookie(e,t,i,n){let r=new Date,s="",a=!1;if(n&&"true"===n?(s=i,a=!0):(r.setTime(r.getTime()+24*i*60*60*1e3),s="expires="+r.toUTCString()),this.isCookieEnabled())i>0||a?this.tagCookiesSecure()?document.cookie=e+"="+t+";"+s+";path=/;secure;":document.cookie=e+"="+t+";"+s+";path=/":this.tagCookiesSecure()?document.cookie=e+"="+t+";path=/;secure;":document.cookie=e+"="+t+";path=/";else{this._configService.getCookiesConfig().cookiesStorage[e]={value:t,expires:r.toUTCString()}}}hasTimeExpired(e){let t=!1,i=null,n=null;try{e&&(i=(new Date).getTime(),n=new Date(e).getTime(),t=i>n)}catch{t=!0}return t}tagCookiesSecure(){let e=this._configService.getCookiesConfig().cookiesSecureFlag;return!(typeof e<"u"&&null!==e&&""!==e&&"false"===e)}isLSEnabled(){return this._isLSEnabled}setIsLSEnabled(e){this._isLSEnabled=e}isLSCompatible(){let e="test";try{typeof this.isLSEnabled()>"u"&&(localStorage.setItem(e,e),localStorage.removeItem(e),console.log("==== LOCAL STORAGE IS ENABLED ===="),this.setIsLSEnabled(!0))}catch{console.log("==== LOCAL STORAGE IS DISABLED ===="),this.setIsLSEnabled(!1)}return this.isLSEnabled()}getParams(e){let t=new URLSearchParams(window.location.search);return t.get(e)?t.get(e):null}getGRSearchParams(e){let t='&fq=inventoryAvailable:"1"OR"2"';return window.analyticsSwy?.testFlags?.EOT3079&&("pickup"===e?t='&fq=pickupInventory:"1"OR"2"':"delivery"===e&&(t='&fq=deliveryInventory:"1"OR"2"'),t+="&variant="+window.analyticsSwy?.testFlags?.EOT3079?.toLowerCase(),window.AB.COMMON.getCookie("absVisitorId")&&(t+="&visitorId="+window.AB.COMMON.getCookie("absVisitorId")),window.AB.userInfo.UUID&&(t+="&uuid="+window.AB.userInfo.UUID)),t}readElement(e){let t=$(e);return t&&t.length?t:null}readOneElement(e){let t=$(e);return t&&t.length?t[0]:null}getElement(e){let t=this.readElement(e);if(null===t)throw new Error("Cannot find element: "+e);return t}getMetaElementContent(e){let t=$("meta[name="+e+"]");if(null===t)throw new Error("Cannot find element: "+e);return t.attr("content")}nativeFind(e,t){let i;if("object"==typeof t)return e.forEach((e=>{this.matches(e,t)&&(i=e)})),i}matches(e,t){for(let i in t)if(t.hasOwnProperty(i))if("object"==typeof t[i]&&null!==t[i]){if(!this.matches(e[i],t[i]))return!1}else if(!e.hasOwnProperty(i)||e[i]!==t[i])return!1;return!0}static{this.ɵfac=function(t){return new(t||e)(lr(ww),lr(_w))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Cw=(()=>{class e{constructor(e,t,i){this._configService=e,this._userInfoService=t,this._utilService=i}getXPIgalleryPath(){return window.AB.xAPIgalleryPath}getInstantAllocation(){return window.AB.instantAllocation}getCompanionOffersxAPIHttpOptions(){return window.AB.companionOffersxAPIHttpOptions}getGalleryRegisterPath(){return window.AB.galleryRegisterPath}getJ4uHttpOptions(){return window.AB.j4uHttpOptions}getJ4uHttpOptions11(){return window.AB.j4uHttpOptions11}getPreUcaHttpOptions(){return window.AB.preUcaHttpOptions}getLoyaltyPartnersPath(){return window.AB.loyaltyPartnersPath}removeHistoryAction(){return window.AB.removeHistoryAction}
1getSearchRank(){return window.AB.searchRank}setSearchRank(e){window.AB.searchRank=e}getDealsFilter(){return window.AB.dealsFilter}getCartApimKey(){return window.AB.cartapimkey}getCartApimTrace(){return window.AB.cartapimtrace}getCartBaseUrl(){return window.AB.cartbaseurl}getCartUrl(){return window.AB.carturl}getCartByCustUrl(){return window.AB.getcartbycusturl}getAddToCartPath(){return window.AB.addToCartPath}getDMTProductCard(){return this._configService.getProductConfig().productImageUrl}getDMTMiniCart(){return window.AB.dMTMiniCart}getRemoveProductHistoryPath(){return window.AB.removeProductHistoryPath}getAttendDeliveryTxt(){return window.AB.attendDeliveryTxt}getCouponClipPath(){return window.AB.couponClipPath}getCouponUnclipPath(){return window.AB.couponUnclipPath}getMiniCartPath(){return window.AB.miniCartPath}getProductGridPage(){return window.AB.productGridPage}getItemNotAvailableTxt(){return window.AB.itemNotAvailableTxt}getAvailableSorts(){return window.AB.availableSorts}getHeaderType(){return window.AB.headerType}getDefaultSort(){return window.AB.defaultSort}getOfferId(){return window.AB.offerId}getGridDataURL(){return window.AB.gridDataURL}getGridDataURLNoParam(){return window.AB.gridDataURLNoParam}getAisleHTMLPath(){return window.AB.aisleHTMLPath}getAisleHTMLTitlePath(){return window.AB.aisleHTMLTitlePath}getLastOrderErumsHttpOptions(){return window.AB.lastOrderErumsHttpOptions}getAemAislePath(){return window.AB.aemAislePath}getErrorText(){return window.AB.errorText}getCatalogXapiProductsBpnEndpoint(){return window.AB.catalogXapiProductsBpnEndpoint}getCatalogXapiProductsUpcEndpoint(){return window.AB.catalogXapiProductsUpcEndpoint}initLazyLoad(){window.AB.LAZYLOAD&&window.AB.LAZYLOAD.init()}mergeCart(){window.AB.CART._mergeCart()}getUserInfo(){return window.AB?window.AB.userInfo:void 0}getCustomerId(){return window.AB.userInfo.customerId}getBranchId(){return window.AB.userInfo.branchId}getPreferenceMode(){return window.AB.userInfo.preferenceMode}getBoxTopAuth(){return window.AB.userInfo.boxTopAuth}setBoxTopAuth(e){window.AB.userInfo.boxTopAuth=e}getSWY_SHOP_TOKEN(){return window.AB.userInfo.SWY_SHOP_TOKEN}clubCard(){return window.AB.userInfo.clubCard}getBanner(){return window.AB.userInfo.banner}getBoxTopCalled(){return window.AB.userInfo.boxTopCalled}setBoxTopCalled(e){window.AB.userInfo.boxTopCalled=e}getStoreId(){return window.AB.userInfo.j4u.storeId}getHouseId(){return window.AB.userInfo.houseId}unattendedDeliveryIsEnabled(){return window.AB.userInfo.unattendedDeliveryIsEnabled}getURLParameterByName(e,t){return window.AB.COMMON.getURLParameterByName(e,t)}authorize(){return window.AB.COMMON.authorize()}isProductCardABtestEnabled(){return!(!window.AB.COMMON||!window.AB.COMMON.isProductCardABtestEnbaled)&&window.AB.COMMON.isProductCardABtestEnbaled()}sessionNotExpired(){return!0}checkCartId(e){return window.AB.COMMON.checkCartId(e)}getCartId(e){return window.AB.COMMON.getCartId(e)}setCartId(e,t){window.AB.COMMON.setCartId(e,t)}invalidateCartId(){window.AB.COMMON.invalidateCartId()}isLSCompatible(){return window.AB.COMMON.isLSCompatible()}getStoreStatus(){window.AB.COMMON&&window.AB.COMMON.getStoreStatus&&window.AB.COMMON.getStoreStatus()}ucaAPIPathWithCustomerId(e){return window.AB.COMMON.ucaAPIPathWithCustomerId(e)}showCreateAccountModalJ4U(e,t){window.AB.COMMON.showCreateAccontModalJ4U(e,t)}getCookie(e){return window.AB.COMMON.getCookie(e)}getSlotIdCookie(){return"B"===this._userInfoService.getSiteType()?this._utilService.getCookie("B_SlotInfo"):this._utilService.getCookie("SlotInfo")}getOrderNumberCookie(){return"B"===this._userInfoService.getSiteType()?this._utilService.getCookie("B_OrderNumber"):this._utilService.getCookie("OrderNumber")}getOrderStoredIdCookie(){return"B"===this._userInfoService.getSiteType()?this._utilService.getCookie("B_OrderStoreId"):this._utilService.getCookie("OrderStoreId")}getOrderPreferenceCookie(){return"B"===this._userInfoService.getSiteType()?this._utilService.getCookie("B_OrderPreference"):this._utilService.getCookie("OrderPreference")}setCookie(e,t,i){window.AB.COMMON.setCookie(e,t,i)}getUserChannel(){return window.AB.COMMON&&window.AB.COMMON.getUserChannel?window.AB.COMMON.getUserChannel():""}checkUnAttendedDelivery(){return window.AB.COMMON.checkUnAttendedDelivery()}
1getBreakpoint(){return window.AB.COMMON.getBreakpoint()}getAisleLevel3Id(){return window.AB.aisleLevel3Id}getAvailabilityCheck(){return"true"===this.getURLParameterByName("availability",!0)}loadCartPrice(){window.AB.MINICART.loadCartPrice()}getBaseURLeRUMS(){return window.AB.MINICART.getBaseURLeRUMS()}checkReserveTime(){window.AB.ALERT.checkReserveTime()}updateReInitSite(e){window.SWY.ENFORCEMENTUTILS.updateReInitSite(e)}checkAuthorizedCookie(){return window.SWY.ENFORCEMENT.checkAuthorizedCookie()}isTokenActive(){return window.SWY.ENFORCEMENT.isTokenActive()}featureToggleConfig(){return window.SWY.CONFIGSERVICE.featureToggleConfig}getProp65Details(){return window.SWY.CONFIGSERVICE.getProp65Details()}getDisableInStoreChannelCheck(){return!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableInStoreChannelCheck"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableInStoreChannelCheck}getDnfEligilityDisabledCheck(){return!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("dnfEligibilityDisabled"))||window.SWY.CONFIGSERVICE.featureToggleConfig.dnfEligibilityDisabled}getDisableEcomGalleryApi(){return!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableEcomGalleryApi"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableEcomGalleryApi}getApimSubscriptionKey(){return window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.searchConfig?window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey:void 0}getApimSearchPath(){return window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath}getApimSearchSponsoredCarouselEndpoint(){return window.SWY.CONFIGSERVICE.searchConfig.apimSearchSponsoredCarouselEndpoint}getApimCatalogPath(){return window.SWY.CONFIGSERVICE.catalogConfig["apim.api.catalog.path"]}getApimCatalogDepartmentsEndpoint(){return window.SWY.CONFIGSERVICE.catalogConfig["apim.api.catalog.departments.endpoint"]}getEditOrderOldVersion(){return window.SWY.CONFIGSERVICE.erumsConfig["editorder.oldversion"]}getCouponImageBaseUrl(){return window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl}getCouponTypes(){return window.SWY.CONFIGSERVICE.nimbusConfig.couponTypes}getXApiKey(){return window.SWY.CONFIGSERVICE.wcaxXapiConfig["wcax.xapi.apim.key"]}getUidValue(){return document.cookie.match("(^|;)\\s*_br_uid_2\\s*=\\s*([^;]+)")||""}isAllowWiremockService(){return window.AB.allowWiremockService}getWcaxXapiApimKey(){return window.AB.wcaxXapiApimKey}getFeatureFlagBase(){return window.SWY?.CONFIGSERVICE?.featureToggleConfig}getFeatureFlagByNameDisable(e){let t=h({},this.getFeatureFlagBase());return!0===(t[e]&&t[e])}setDomainCookie(e,t,i){window.SWY.CONFIGSERVICE.setDomainCookie(e,t,window.SWY.CONFIGSERVICE.resolvedBanner+".com",i)}getArFlag(){return window.AB.arFlag}isArFlagLoaded(){return window.AB.arFlagLoaded}isThemeBuilderEnabled(){return window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.isThemeBuilderEnabled}getSnsOffer(){return window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.bannerConventionsJson&&window.SWY.CONFIGSERVICE.bannerConventionsJson.snsOffer?window.SWY.CONFIGSERVICE.bannerConventionsJson.snsOffer:"5%"}getBundlesEstimatedTotalEndpoint(){return window.SWY.CONFIGSERVICE.wcaxXapiConfig["bundlesEstimatedTotal.endpoint"]}getBundlesEstimatedTotalSubscriptionKey(){return window.SWY.CONFIGSERVICE.wcaxXapiConfig["bundlesEstimatedTotal.subkey"]}isLSEnabled(){return window.AB.isLSEnabled}_isWineShopEnabledForStore(){let e=window.AB.storeFlagsData;return!!(e&&e.flags&&e.flags.ecomStore&&e.flags.ecomStore.storeFeatures&&!0===e.flags.ecomStore.storeFeatures.isWineD2CEnabled)}static{this.ɵfac=function(t){return new(t||e)(lr(ww),lr(_w),lr(Sw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Iw={dev1:{currentEnv:"dev1",baseURL:"https://www-dev1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},searchProductsAPIDetails:{searchProductsAPI:"abs/acceptancepub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"282a6d0c0ff142e485e58154cd248c2d"}},subscriptionAPIDetails:{subscriptionApi:"/abs/qapub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"051db3bccc0f490aad2be512ca4f4fe2"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},apimBasePath:"/abs/qapub",cartV2API:"/abs/qapub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"acceptance.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/acceptancepub/catalog/catalogservice","swy.api.catalog.service.apim.key":"061d4366162045c6879eca9eab9b7e89","apim.api.catalog.path":"/abs/acceptancepub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deal
1s.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/devpub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"cc18c4fbb7f540099142b1f9adb2558f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"133050c8da964dafb63bcb6c6aba00a0","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"652b1bdf-df33-43e2-81e3-278fecf91c5c","X-IBM-Client-Secret":"kY5pU2cW4gS0cF3wD1oF0dT2hX1lL3yP1fT3pY3nB2tH0hU5hY",clipPath:"/abs/qa1pub/web/j4u/api/offers/clip",unclipPath:"/abs/qa1pub/web/j4u/api/offers/unclip"},offerDetailAPIDetails:{offerDetailPath:"/abs/acceptancepub/xapi/offers",upcsByOfferIds:"/abs/acceptancepub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/qapub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/devpub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"49c7b49a2bf94a5ca7e318c84ca9cbb2",snsEndpointAllSubscriptionsKey:"64e226bfbc1148d3b3f076a33d654595",arAuthorizeBasePath:"/abs/acceptancepub",arScriptBasePath:"/abs/acceptancepub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},wiremockAPIDetails:{allowWiremockService:!0,subscriptionKey:"35570fd5f27f4d69948bafbb4dd4f878",playbackBaseUrl:"/abs/acceptancepub/mock-playback/mockinator/playback",recorderBaseUrl:"/abs/acceptancepub/mock-recorder/mockinator"},snsConfig:{url:"/abs/acceptancepub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},productsApiDetails:{subscriptionKey:{value:"91630a74fd484185bc2fc20fff6cd057"}},domsApiDetails:{url:"/abs/qapub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e3805df8a69a41c3811c068c8a9263ca"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABSStage"},dev2:{currentEnv:"qa1",baseURL:"https://www-dev2.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},searchProductsAPIDetails:{searchProductsAPI:"abs/acceptancepub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"282a6d0c0ff142e485e58154cd248c2d"}},subscriptionAPIDetails:{subscriptionApi:"/abs/qapub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"051db3bccc0f490aad2be512ca4f4fe2"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},apimBasePath:"/abs/qapub",cartV2API:"/abs/qapub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"acceptance.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/acceptancepub/catalog/catalogservice","swy.api.catalog.service.apim.key":"061d4366162045c6879eca9eab9b7e89","apim.api.catalog.path":"/abs/acceptancepub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deal
1s.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"acceptance.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/acceptancepub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"061d4366162045c6879eca9eab9b7e89","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"133050c8da964dafb63bcb6c6aba00a0","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"652b1bdf-df33-43e2-81e3-278fecf91c5c","X-IBM-Client-Secret":"kY5pU2cW4gS0cF3wD1oF0dT2hX1lL3yP1fT3pY3nB2tH0hU5hY",clipPath:"/abs/qa1pub/web/j4u/api/offers/clip",unclipPath:"/abs/qa1pub/web/j4u/api/offers/unclip"},offerDetailAPIDetails:{offerDetailPath:"/abs/acceptancepub/xapi/offers",upcsByOfferIds:"/abs/acceptancepub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/qapub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/devpub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"45000d8081a744fb858f26f463d4f5ae",snsEndpointAllSubscriptionsKey:"64e226bfbc1148d3b3f076a33d654595",arAuthorizeBasePath:"/abs/acceptancepub",arScriptBasePath:"/abs/acceptancepub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},wiremockAPIDetails:{allowWiremockService:!0,subscriptionKey:"35570fd5f27f4d69948bafbb4dd4f878",playbackBaseUrl:"/abs/acceptancepub/mock-playback/mockinator/playback",recorderBaseUrl:"/abs/acceptancepub/mock-recorder/mockinator"},snsConfig:{url:"/abs/acceptancepub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},productsApiDetails:{subscriptionKey:{value:"91630a74fd484185bc2fc20fff6cd057"}},domsApiDetails:{url:"/abs/qapub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e3805df8a69a41c3811c068c8a9263ca"}}},dev3:{currentEnv:"qa1",baseURL:"https://www-dev3.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},searchProductsAPIDetails:{searchProductsAPI:"abs/acceptancepub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"282a6d0c0ff142e485e58154cd248c2d"}},subscriptionAPIDetails:{subscriptionApi:"/abs/qapub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"051db3bccc0f490aad2be512ca4f4fe2"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},apimBasePath:"/abs/qapub",cartV2API:"/abs/qapub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/devpub/catalog/catalogservice","swy.api.catalog.service.apim.key":"cc18c4fbb7f540099142b1f9adb2558f","apim.api.catalog.path":"/abs/devpub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deal
1s.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/devpub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"cc18c4fbb7f540099142b1f9adb2558f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"cc18c4fbb7f540099142b1f9adb2558f","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"b5d01bd0-3c93-46cb-a63e-7dced08b617d","X-IBM-Client-Secret":"xC6lD4nL7hY4cF6pJ6dO8fV5vM1aA6lL6hT4lX1rV0lV1vQ0hU",clipPath:"/abs/dvpub/web/j4u/api/offers/clip",unclipPath:"/abs/dvpub/web/j4u/api/offers/unclip"},offerDetailAPIDetails:{offerDetailPath:"/abs/devpub/xapi/offers",upcsByOfferIds:"/abs/devpub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/qapub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/devpub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"45000d8081a744fb858f26f463d4f5ae",snsEndpointAllSubscriptionsKey:"64e226bfbc1148d3b3f076a33d654595",arAuthorizeBasePath:"/abs/acceptancepub",arScriptBasePath:"/abs/acceptancepub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"6125bedf8ff9460aa41739349be602db"},wiremockAPIDetails:{allowWiremockService:!1,subscriptionKey:"",playbackBaseUrl:"",recorderBaseUrl:""},snsConfig:{url:"/abs/devpub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},productsApiDetails:{subscriptionKey:{value:"91630a74fd484185bc2fc20fff6cd057"}},domsApiDetails:{url:"/abs/qapub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e3805df8a69a41c3811c068c8a9263ca"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABSStage"},qa1:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"8ca6295a55f54368844b5982edc1cc01"}},searchAPIDetails:{searchAPI:"/abs/qapub/xapi/search/substitute",searchParam:"https://www-qa1.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"a6bbc777a82f45a9b1413af0ce35604f"}},searchProductsAPIDetails:{searchProductsAPI:"abs/qapub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"ae53203f912448a7a13c70272d5c75fb"}},subscriptionAPIDetails:{subscriptionApi:"/abs/qapub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"6952f7ab5d204b73a8c514c71fcc68c5"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},apimBasePath:"/abs/qapub",cartV2API:"/abs/qapub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"qa.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/qapub/catalog/catalogservice","swy.api.catalog.service.apim.ke
1y":"b0f931272efc4766a535e6030b79574d","apim.api.catalog.path":"/abs/qapub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deals.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"qa.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/qapub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"a6bbc777a82f45a9b1413af0ce35604f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"b0f931272efc4766a535e6030b79574d","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"9b1d97cf-4ddc-4e81-95e5-035c204c4ef6","X-IBM-Client-Secret":"G1oW7jM5jF5nV7lR8rC6dU4wG1qS8uC5iD7rB5eJ0tD4eO0cJ6","X-SWY_BANNER":"safeway","x-swy-correlation-id":"01e7b8fd-f501-4519-886c-daf340fa6967","X-SWY_API_KEY":"emjou","X-SWY-APPLICATION-TYPE":"web","X-SWY_VERSION_Offers":"1.1",clipPath:"/abs/qapub/web/j4u/api/offers/clip",unclipPath:"/abs/qapub/web/j4u/api/offers/unclip",galleryPath:"/abs/qapub/web/j4u/api/offers/gallery",instantAllocation:"/abs/qapub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/qapub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/qapub/xapi/offers",upcsByOfferIds:"/abs/qapub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/qapub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/qapub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"6173c51c68254b0dada9ce698e96d2f3",snsEndpointAllSubscriptionsKey:"267402756dc5413ab6ec8bc403100042",arAuthorizeBasePath:"/abs/qapub",arScriptBasePath:"/abs/qapub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"b63410670d33422186409d4ad55c9030"},wiremockAPIDetails:{allowWiremockService:!0,subscriptionKey:"8ca6295a55f54368844b5982edc1cc01",playbackBaseUrl:"/abs/qapub/mock-playback/mockinator/playback",recorderBaseUrl:"/abs/qapub/mock-recorder/mockinator"},snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},productsApiDetails:{subscriptionKey:{value:"2df5532da15c4218b46d35ecd6c6a699"}},domsApiDetails:{url:"/abs/qapub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e3805df8a69a41c3811c068c8a9263ca"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABSStage"},qa2:{currentEnv:"qa2",baseURL:"https://www-qa2.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/acceptancepub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"35570fd5f27f4d69948bafbb4dd4f878"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",searchParam:"https://www-qa2.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},searchProductsAPIDetails:{searchProductsAPI:"abs/acceptancepub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"282a6d0c0ff142e485e58154cd248c2d"}},subscriptionAPIDetails:{subscriptionApi:"/abs/acceptancepub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"cbca35c27eab4e57924becd81cee41c9"}},cartAPIDetails:{cartAPI:"/abs/acceptancepub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/acceptancepub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"26dfa6ab7afe4a88805ce9f5351b78b4"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"ab4d24c982614a3ba20e1ae0593ed3b5"},apimBasePath:"/abs/acceptancepub",cartV2API:"/abs/acceptancepub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"acceptance.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/acceptancepub/catalog/catalogservice","swy.api.catalog.service.apim.key":"061d4366162045c6879eca9eab9b7e89","apim.api.catalog.path":"/abs/acceptancepub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deal
1s.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"acceptance.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/acceptancepub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"061d4366162045c6879eca9eab9b7e89","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"133050c8da964dafb63bcb6c6aba00a0","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"652b1bdf-df33-43e2-81e3-278fecf91c5c","X-IBM-Client-Secret":"kY5pU2cW4gS0cF3wD1oF0dT2hX1lL3yP1fT3pY3nB2tH0hU5hY",clipPath:"/abs/qa1pub/web/j4u/api/offers/clip",unclipPath:"/abs/qa1pub/web/j4u/api/offers/unclip",galleryPath:"/abs/qa1pub/web/j4u/api/offers/gallery",instantAllocation:"/abs/acceptancepub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/acceptancepub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/acceptancepub/xapi/offers",upcsByOfferIds:"/abs/acceptancepub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/acceptancepub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/acceptancepub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"49c7b49a2bf94a5ca7e318c84ca9cbb2",snsEndpointAllSubscriptionsKey:"64e226bfbc1148d3b3f076a33d654595",arAuthorizeBasePath:"/abs/acceptancepub",arScriptBasePath:"/abs/acceptancepub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},wiremockAPIDetails:{allowWiremockService:!0,subscriptionKey:"35570fd5f27f4d69948bafbb4dd4f878",playbackBaseUrl:"/abs/acceptancepub/mock-playback/mockinator/playback",recorderBaseUrl:"/abs/acceptancepub/mock-recorder/mockinator"},snsConfig:{url:"/abs/acceptancepub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"64e226bfbc1148d3b3f076a33d654595"},productsApiDetails:{subscriptionKey:{value:"91630a74fd484185bc2fc20fff6cd057"}},domsApiDetails:{url:"/abs/acceptancepub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"f41f3f42af6c45dba291b8598b1af99e"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABSStage"},qa3:{currentEnv:"qa3",baseURL:"https://www-qa3.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/perfpub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"6eb4decfcd01473aa5ee0a690cc39006"}},searchAPIDetails:{searchAPI:"/abs/perfpub/xapi/search/substitute",searchParam:"https://www-qa3.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"49384d1586e9426ab1ab525c95cf18ff"}},searchProductsAPIDetails:{searchProductsAPI:"abs/perfpub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"a51715bbe5a64a9bb5c008d80d38e362"}},subscriptionAPIDetails:{subscriptionApi:"/abs/perfpub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"656233f099754e94b1e1e42f71c4677f"}},cartAPIDetails:{cartAPI:"/abs/perfpub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/perfpub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b029945667514b5a887e4764fa1f6df9"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"abb0423b458e4cf6a1f1dad5666a5127"},apimBasePath:"/abs/perfpub",cartV2API:"/abs/perfpub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"perf.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/perfpub/catalog/catalogservice","swy.api.catalog.service.apim.ke
1y":"49384d1586e9426ab1ab525c95cf18ff","apim.api.catalog.path":"/abs/perfpub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deals.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"perf.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/perfpub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"49384d1586e9426ab1ab525c95cf18ff","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"19e5b39b4afc425bba33841a60a9dcd5","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"f537e42e-b56e-4c08-b4cf-159735dc889b","X-IBM-Client-Secret":"eL0uY3yM2lF6kJ7jN2fO5jA0qP3lK2vX3pX5hM1cX3nS7uJ3mA",clipPath:"/abs/qa1pub/web/j4u/api/offers/clip",unclipPath:"/abs/qa1pub/web/j4u/api/offers/unclip",galleryPath:"/abs/qa1pub/web/j4u/api/offers/gallery",instantAllocation:"/abs/perfpub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/perfpub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/perfpub/xapi/offers",upcsByOfferIds:"/abs/perfpub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/perfpub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/perfpub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"c8a4300d1b5048c5946b6b11e5bd9919",snsEndpointAllSubscriptionsKey:"46d30fd9331a4faa9dd20dce1d4db0f3",arAuthorizeBasePath:"/abs/perfpub",arScriptBasePath:"/abs/perfpub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"2af9cc1fbd3348f1bf4c47ee480542e5"},wiremockAPIDetails:{allowWiremockService:!1,subscriptionKey:"",playbackBaseUrl:"",recorderBaseUrl:""},snsConfig:{url:"/abs/perfpub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"46d30fd9331a4faa9dd20dce1d4db0f3"},productsApiDetails:{subscriptionKey:{value:"65658511817643ecb6de198796934cea"}},domsApiDetails:{url:"/abs/perfpub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"9d74e4b228194e65b8c103cf7a7bb72b"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABS"},stage:{currentEnv:"stage",baseURL:"https://www-stage.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/stgpub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"f8bee8d7e7d14a11ac8197d3088cbe3b"}},searchAPIDetails:{searchAPI:"/abs/stgpub/xapi/search/substitute",searchParam:"https://www-stage.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"f42494b71bf94bd1b87f937a60ee990e"}},searchProductsAPIDetails:{searchProductsAPI:"abs/stagepub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"b47044a7120d4a25aba1738170f979aa"}},subscriptionAPIDetails:{subscriptionApi:"/abs/stgpub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e4c13d90a2c04e858e9327d9908caaa0"}},cartAPIDetails:{cartAPI:"/abs/stgpub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/stgpub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b67277d0d0d04e0da852c5e79b19b025"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"221f4ec2121a4e79a2676ffb0dae44e0"},apimBasePath:"/abs/stgpub",cartV2API:"/abs/stgpub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"stage.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/stagepub/catalog/catalogservice","swy.api.catalog.service.apim.ke
1y":"f42494b71bf94bd1b87f937a60ee990e","apim.api.catalog.path":"/abs/stgpub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deals.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"stage.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/stagepub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"f42494b71bf94bd1b87f937a60ee990e","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"f8bee8d7e7d14a11ac8197d3088cbe3b","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"b09e2ed0-494d-44da-bb90-70de110efb31","X-IBM-Client-Secret":"P1wX4nX1dG1iG2kM0sY0sB0rJ4oT0jT2
1wC1mG1vF7uY7kL3yE7",clipPath:"/abs/stgpub/web/j4u/api/offers/clip",unclipPath:"/abs/stgpub/web/j4u/api/offers/unclip",galleryPath:"/abs/stgpub/web/j4u/api/offers/gallery",instantAllocation:"/abs/stgpub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/stgpub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/stgpub/xapi/offers",upcsByOfferIds:"/abs/stgpub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/stgpub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpc:"/abs/pub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"0c289898aecf49079e191d369ac648ae",snsEndpointAllSubscriptionsKey:"b47044a7120d4a25aba1738170f979aa",arAuthorizeBasePath:"/abs/stagepub",arScriptBasePath:"/abs/stgpub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"38c2e3420b8b450d9ffd5564ff22c4f0"},wiremockAPIDetails:{allowWiremockService:!1,subscriptionKey:"",playbackBaseUrl:"",recorderBaseUrl:""},snsConfig:{url:"/abs/stagepub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"b47044a7120d4a25aba1738170f979aa"},productsApiDetails:{subscriptionKey:{value:"7d8e333208044063949a4ae9a8837b0d"}},domsApiDetails:{url:"/abs/stagepub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"4dcf2a6910e84631b442b91197a282a8"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABS"},betaprod:{currentEnv:"prod",baseURL:"https://www-beta.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/pub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"7bad9afbb87043b28519c4443106db06"}},searchAPIDetails:{searchAPI:"/abs/pub/xapi/search/substitute",searchParam:"https://www-beta.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e914eec9448c4d5eb672debf5011cf8f"}},searchProductsAPIDetails:{searchProductsAPI:"abs/pub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"5e790236c84e46338f4290aa1050cdd4"}},subscriptionAPIDetails:{subscriptionApi:"/abs/pub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"f775c6e1cecf4ec5849ea7fb1add9114"}},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/pub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"c645e9387c654aa8ae253045f648bfac"},apimBasePath:"/abs/pub",cartV2API:"/abs/pub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"prod.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/pub/catalog/catalogservice","swy.api.catalog.service.apim.key":"e914eec9448c4d5eb672debf5011cf8f","apim.api.catalog.path":"/abs/pub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deal
1s.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"prod.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/pub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"e914eec9448c4d5eb672debf5011cf8f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"7bad9afbb87043b28519c4443106db06","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"306b9569-2a31-4fb9-93aa-08332ba3c55d","X-IBM-Client-Secret":"N4tK3pW7pP6nB4kL6vN4kW0rS5lE4qH2fY0aB2rK1eP5gK4yV5",clipPath:"/abs/pub/web/j4u/api/offers/clip",unclipPath:"/abs/pub/web/j4u/api/offers/unclip",galleryPath:"/abs/pub/web/j4u/api/offers/gallery",instantAllocation:"/abs/pub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/pub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/pub/xapi/offers",upcsByOfferIds:"/abs/pub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/pub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/pub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABS/",arSubscriptionKey:"fee1766a73bf47e49fa1e6a02b53308c",snsEndpointAllSubscriptionsKey:"379d5b830a494af18fb37cb379afb675",arAuthorizeBasePath:"/abs/pub",arScriptBasePath:"/abs/pub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"1d8f9e6f8b0d4ce29468d6d82f5847b8"},wiremockAPIDetails:{allowWiremockService:!1,subscriptionKey:"",playbackBaseUrl:"",recorderBaseUrl:""},snsConfig:{url:"/abs/pub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"379d5b830a494af18fb37cb379afb675"},productsApiDetails:{subscriptionKey:{value:"6c21edb7bcda4f0e918348db16147431"}},domsApiDetails:{url:"/abs/pub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"281a87fa52ad4a9d8c4190482d0ea660"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABS"},prod:{currentEnv:"prod",baseURL:"https://www.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/pub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"7bad9afbb87043b28519c4443106db06"}},searchAPIDetails:{searchAPI:"/abs/pub/xapi/search/substitute",searchParam:"https://www.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e914eec9448c4d5eb672debf5011cf8f"}},searchProductsAPIDetails:{searchProductsAPI:"abs/pub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"5e790236c84e46338f4290aa1050cdd4"}},subscriptionAPIDetails:{subscriptionApi:"/abs/pub/erums/subscriptionservice/api/v1/subscription/user/get/{gid}",subscriptionKey:{key:"ocp-apim-subscription-key",value:"f775c6e1cecf4ec5849ea7fb1add9114"}},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/pub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"c645e9387c654aa8ae253045f648bfac"},apimBasePath:"/abs/pub",cartV2API:"/abs/pub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"prod.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/pub/catalog/catalogservice","swy.api.catalog.service.apim.ke
1y":"e914eec9448c4d5eb672debf5011cf8f","apim.api.catalog.path":"/abs/pub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deals.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"prod.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/pub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"e914eec9448c4d5eb672debf5011cf8f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"7bad9afbb87043b28519c4443106db06","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"306b9569-2a31-4fb9-93aa-08332ba3c55d","X-IBM-Client-Secret":"N4tK3pW7pP6nB4kL6vN4kW0rS5lE4qH2fY0aB2rK1eP5gK4yV5",clipPath:"/abs/pub/web/j4u/api/offers/clip",unclipPath:"/abs/pub/web/j4u/api/offers/unclip",galleryPath:"/abs/pub/web/j4u/api/offers/gallery",instantAllocation:"/abs/pub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/pub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/pub/xapi/offers",upcsByOfferIds:"/abs/pub/dce/offergallery/J4UProgram1/offer/upcs",offerDetailsPzn:"/abs/pub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/pub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABS/",arSubscriptionKey:"fee1766a73bf47e49fa1e6a02b53308c",snsEndpointAllSubscriptionsKey:"379d5b830a494af18fb37cb379afb675",arAuthorizeBasePath:"/abs/pub",arScriptBasePath:"/abs/pub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"9e38e3f1d32a4279a49a264e0831ea46"},wiremockAPIDetails:{allowWiremockService:!1,subscriptionKey:"",playbackBaseUrl:"",recorderBaseUrl:""},snsConfig:{url:"/abs/pub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"379d5b830a494af18fb37cb379afb675"},productsApiDetails:{subscriptionKey:{value:"6c21edb7bcda4f0e918348db16147431"}},domsApiDetails:{url:"/abs/pub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"281a87fa52ad4a9d8c4190482d0ea660"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABS"},local:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"8ca6295a55f54368844b5982edc1cc01"}},searchAPIDetails:{searchAPI:"/abs/qapub/xapi/search/substitute",searchParam:"https://www-qa1.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},searchProductsAPIDetails:{searchProductsAPI:"abs/qapub/xapi/pgmsearch/v1/search/products",subscriptionKey:{key:"ocp-apim-subscription-key",value:"ae53203f912448a7a13c70272d5c75fb"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},subscriptionKeyV2:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"},apimBasePath:"/abs/qapub",cartV2API:"/abs/qapub/erums/cartservice/api/v2/cart/",guestCartBasePath:"/erums/guestcartservice/api/v2/guest/"},catalogConfig:{"catalog.service.enable":"true","catalog.xapi.enable":"true","swy.api.apim.catalog.service.baseurl":"qa.apim.azwestus.stratus.albertsons.com","swy.api.catalog.service.endpoint":"/abs/qapub/catalog/catalogservice","swy.api.catalog.service.apim.ke
1y":"b0f931272efc4766a535e6030b79574d","apim.api.catalog.path":"/abs/qapub/xapi","apim.api.catalog.virtual.shelf.endpoint":"/catalog-deals/virtual-shelf","apim.api.catalog.departments.endpoint":"/catalog-deals/departments","apim.api.catalog.deals.endpoint":"/catalog-deals/deals","apim.api.catalog.product.bpn.endpoint":"/catalog/products-by-bpn","apim.api.catalog.product.upc.endpoint":"/catalog/products-by-upc","apim.api.catalog.increment.price.list.endpoint":"/catalog/incrementPriceList","apim.api.catalog.cba.endpoint":"/catalog-deals/channel-based-availability","mockinator.brand.index.service.baseurl":"dev1.apim.azwestus.stratus.albertsons.com","mockinator.brand.index.service.api.key":"cc18c4fbb7f540099142b1f9adb2558f","mockinator.brand.index.endpoint":"/abs/devpub/mock-playback/mockinator/playback/brandIndexSearch","apim.api.brand.index.service.baseurl":"qa.apim.azwestus.stratus.albertsons.com","apim.api.brand.index.service.path":"/abs/qapub/xapi","apim.api.brand.index.service.endpoint":"/v1/aisles/brandindex","apim.api.brand.index.service.key":"a6bbc777a82f45a9b1413af0ce35604f","api.catalog.timeout.product.by.bpn":"1000","api.catalog.timeout.brand.index":"3000","swy.api.product.service.apim.key":"b0f931272efc4766a535e6030b79574d","api.catalog.timeout.pdp.data":"1500"},j4uAPIDetails:{"X-SWY_VERSION":"1.0","X-IBM-Client-Id":"9b1d97cf-4ddc-4e81-95e5-035c204c4ef6","X-IBM-Client-Secret":"G1oW7jM5jF5nV7lR8rC6dU4wG1qS8uC5iD7rB5eJ0tD4eO0cJ6","X-SWY_BANNER":"safeway","x-swy-correlation-id":"01e7b8fd-f501-4519-886c-daf340fa6967","X-SWY_API_KEY":"emjou","X-SWY-APPLICATION-TYPE":"web","X-SWY_VERSION_Offers":"1.1",clipPath:"/abs/qapub/web/j4u/api/offers/clip",unclipPath:"/abs/qapub/web/j4u/api/offers/unclip",galleryPath:"/abs/qapub/web/j4u/api/offers/gallery",instantAllocation:"/abs/qapub/xapi/offers/instantAllocationGallery",companionGalleryApi:"/abs/qapub/xapi/offers/companiongalleryoffer"},offerDetailAPIDetails:{offerDetailPath:"/abs/qapub/xapi/offers",offerDetailsPzn:"/abs/qapub/dce/offergallery/J4UProgram1/services/gallery/offer/detail",offersByUpcPath:"/abs/qapub/dce/offergallery/J4UProgram1/erums/services/gallery/offers"},nimbusConfig:{"coupon.image.base.url":"https://images.albertsons-media.com/is/image/ABSStage/",arSubscriptionKey:"49c7b49a2bf94a5ca7e318c84ca9cbb2",snsEndpointAllSubscriptionsKey:"64e226bfbc1148d3b3f076a33d654595",arAuthorizeBasePath:"/abs/acceptancepub",arScriptBasePath:"/abs/acceptancepub",couponTypes:{PD:"Personalized Deal",MF:"Coupon",SC:"Coupon",CC:"Coupon",GR:"Grocery Reward",TR:"Monopoly Prize",WS:"Weekly Ad"},couponActionTypes:{CL:"Clip",CLD:"Clipped",AC:"ADD",ADC:"ADDED",CLC:"Clip Coupon",CLCUDC:"Clip Offer",SCC:"Activate",CC:"Bonus Path Completed"}},datapowerConfig:{cncSubscriptionKey:"d8c6d7783b604f618dd446e7c39c7c08"},wiremockAPIDetails:{allowWiremockService:!0,subscriptionKey:"8ca6295a55f54368844b5982edc1cc01",playbackBaseUrl:"/abs/qapub/mock-playback/mockinator/playback",recorderBaseUrl:"/abs/qapub/mock-recorder/mockinator"},snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},productsApiDetails:{subscriptionKey:{value:"2df5532da15c4218b46d35ecd6c6a699"}},domsApiDetails:{url:"/abs/qapub/osco/manageorderservice/api/v1",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e3805df8a69a41c3811c068c8a9263ca"}},baseImageUrl:"//images.albertsons-media.com/is/image/ABSStage"},userInfoPath:"/bin/safeway/unified/userinfo?rand=659323&banner=safeway",offerDisclaimerPath:"/content/experience-fragments/www/Disclaimers/Offer-Disclaimer/offer-disclaimer.content.html"},Aw={"Fruits & Vegetables":"Fruits & Vegetables","Dairy, Eggs & Cheese":"Dairy, Eggs & Cheese","Bread & Bakery":"Bread & Bakery","Meat & Seafood":"Meat & Seafood",Deli:"Deli","Breakfast & Cereal":"Breakfast & Cereal","Canned Goods & Soups":"Canned Goods & Soups","Condiments, Spice & Bake":"Condiments, Spices & Bake","Cookies, Snacks & Candy":"Cookies, Snacks & Candy","Grains, Pasta & Sides":"Grains, Pasta & Sides","International Cuisine":"International Cuisine",Beverages:"Beverages","Wine, Beer & Spirits":"Wine, Beer & Spirits","Frozen Foods":"Frozen Foods","Baby Care":"Baby Care","Paper, Cleaning & Home":"Paper, Cleaning & Home","Personal Care & Health":"Personal Care & Health","Pet Care":"Pet Care","Flowers, Cards, Occasion":"Flowers & Decor","Special Offers":"Special Offers"},kw=(()=>{class e{constructor(){}setError(e,t,i){window.AB.DATALAYER.setError(e,t,i)}getDataLayer(){return window.AB&&window.AB.DATALAYER}removeItemFromCart(e,t){window.AB.DATALAYER.removeItemFromCart(e,t)}addItemToCart(e,t){window.AB.DATALAYER.addItemToCart(e,t)}increaseItemQuantity(e,t){window.AB.DATALAYER.increaseItemQuantity(e,t)}decreaseItemQuantity(e,t){window.AB.DATALAYER.decreaseItemQuantity(e,t)}updateCartId(e){window.AB.DATALAYER.updateCartId(e)}updateCart(e,t,i){window.AB.DATALAYER.updateCart(e,t,i)}updateCartSummary(e){window.AB.CART.updateCartSummary(e)}recommendationInfo(e){window.AB.DATALAYER.recommendationInfo(e)}productInfo(e){window.AB.DATALAYER.productInfo(e)}setCarouselName(e){window.AB.DATALAYER.setCarouselName(e)}isRecipesPage(){return window.AB.DATALAYER.isRecipesPage()}clipCoupon(e,t){window.AB.DATALAYER.clipCoupon(e,t)}unClipCoupon(e){window.AB.DATALAYER.unClipCoupon(e)}
1setLinkClickOfferDrawer(e,t){window.AB.DATALAYER.setLinkClickOfferDrawer(e,t)}setLinkClickEvents(e){window.AB.DATALAYER.setLinkClickEvents(e)}setModalClickEvents(e,t,i){window.AB.DATALAYER.setModalClickEvents(e,t,i)}getDrawerStatus(e){return window.AB.DATALAYER.getDrawerStatus(e)}setPastPurchasedImpressions(e){window.AB.DATALAYER.setPastPurchasedImpressions("aisles")}updateCartSavings(e,t,i){window.AB.DATALAYER.updateCartSavings(e,t,i)}updateSearch(e,t){window.AB.DATALAYER.updateSearch(e,t)}setModalClickEventsSubstitution(e,t,i,n){t&&(t.productID=window.sessionStorage.getItem("analytics_subs_prodId")||""),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalClickEventsSubstitution(e,t,i,n)}setSnsLinkClick(e){window.AB.DATALAYER.setSnsLinkClick(e)}setAnalyticsCrossPageData(e,t,i,n){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setAnalyticsCrossPageData({action:e,name:t,data:i,isAcrossPages:n})}setModalClickSubstitutionAllItems(e,t){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalClickSubstitutionAllItems&&window.AB.DATALAYER.setModalClickSubstitutionAllItems(e,t)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),xw={ea:"Each",oz:"Ounce",fz:"Fluid Ounce",lb:"Pound",ct:"Count",ml:"Milliliter",lt:"Liter",in:"Inch",ga:"Gallon",pt:"Pint",qt:"Quart",pr:"Pair",gr:"Grams",st:"Stem",rl:"Roll",hg:"Half gallon",pk:"Pack",pc:"Piece",sf:"Square Feet",cf:"Cubic Feet",yd:"Yards",dz:"Dozen",bg:"Bag",ft:"Feet",bu:"Bunch",kg:"Kilograms",fl:"Fluid Ounce",bx:"Box",ca:"Centare",ci:"Cigar",mr:"Meter",cg:"Cigarettes",cl:"Centiliter",bl:"Barrell",sh:"Sheets",g:"Grams",mg:"Milligrams",mcg:"Micrograms",cal:"Calories",kcal:"Kilocalories",floz:"fluid ounces"},Tw="Pickup only",Pw="Delivery only",Ew="In-store only",Dw=(()=>{class e{constructor(e){this.aemService=e}getProductDisplayableElementsByProgramType(e){let t={mkp:{estimateLabel:!1,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!0,prop65Title:!0,nestedFulfillment:!1,promoText:!0,snapEligible:!1},wineshop:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!1},abs:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!0},"bia-category-carousel":{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!1,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!0},"1P_B2B":{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,snapEligible:!1},"1P_B2B_bia-category-carousel":{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!1,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,snapEligible:!1},weeklyAd:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,snapEligible:!1},"wine-carousel":{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!1,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!1,scheduleNSave:!1,buyItAgain:!1,starRating:!1,price:!1,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!1},"mkp-carousel":{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!0,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!1,starRating:!0,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!0,prop65Title:!0,nestedFulfillment:!1,promoText:!0,snapEligible:!1},"light-weight":{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!1,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!1,starRating:!1,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!1,prop65Title:!1,nestedFulfillment:!1,promoText:!1,snapEligible:!1},"1P_SNS":{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!1,coupons:!0,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!0,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!0},"light-weight-sponsored":{estimateLabel:!1,sponsoredLabel:!0,itemNotAvailable:!1,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!0,addToCart:!0,scheduleNSave:!1,buyItAgain:!1,starRating:!1,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!1,prop65Title:!1,nestedFulfillment:!1,promoText:!1,snapEligible:!1},dnf:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!1,starRating:!1,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0,snapEligible:!0}};return e?t[e]:t.abs}getBannerDomainUrl(e){let{banner:t}=window.AB.userInfo;return e?.bannerDomain?e?.bannerDomain?.replace("${banner}",t):""}formatTime24to12(e){let[t,i]=e.split(":").map(Number),n=t>=12?"PM":"AM";return`${t%12||12}${0===i?"":`:${i.toString().padStart(2,"0")}`} ${n}`}getAvailabilityTimes(e){let t,i,n=e?.fulfillmentStartTime,r=e?.fulfillmentEndTime,s={Saturday:{start:e?.fulfillmentStartTimeSaturday,end:e?.fulfillmentEndTimeSaturday},Sunday:{start:e?.fulfillmentStartTimeSunday,end:e?.fulfillmentEndTimeSunday}}
1,a=(new Date).toLocaleString("en-US",{weekday:"long"});if("Saturday"===a||"Sunday"===a?(t=s[a]?.start,i=s[a]?.end):(t=n,i=r),!t||!i||"00:00"===t&&"00:00"===i)return"";let o="00:00"===t?"Before":this.formatTime24to12(t),l="23:59"===i?"After":this.formatTime24to12(i);return"00:00"===t?`${o} ${l} only`:"23:59"===i?`${l} ${o} only`:`${o}â${l} only`}productTagElements(e,t,i){let n=[];if(this.aemService.getFeatureFlagByNameDisable("isMtoChannelEligibilityEnabled")){let{dispItemPackageQty:r,dispItemPackageUOM:s,dispItemSizeQty:a,dispUnitOfMeasure:o,isMtoProduct:l,mtoTagText:c,mtoDisplyableTime:d,snapEligible:u,fulfillmentStartTime:p,fulfillmentEndTime:h,fulfillmentStartTimeSaturday:f,fulfillmentEndTimeSaturday:m,fulfillmentStartTimeSunday:g,fulfillmentEndTimeSunday:b}=e;if(r>1&&n.push({type:"packageqty",displayableText:`${r} ${s?s.toLocaleLowerCase():"ct"}`,srOnlyText:`${r} count`,qaAttribute:"prd-itm-pqty"}),a>0&&o){let e=xw[o.replace(" ","").toLocaleLowerCase()];n.push({type:"sqty",displayableText:`${parseFloat(a.toString())} ${o.toLocaleLowerCase()}`,srOnlyText:`${parseFloat(a.toString())} ${e}`,qaAttribute:"prd-itm-sqty"})}t?.mto&&l&&c&&n.push({type:"mto",displayableText:c,srOnlyText:`${d} preparation time`,qaAttribute:"qty-stppr-mto"});let y=this.getAvailabilityTimes({fulfillmentStartTime:p,fulfillmentEndTime:h,fulfillmentStartTimeSaturday:f,fulfillmentEndTimeSaturday:m,fulfillmentStartTimeSunday:g,fulfillmentEndTimeSunday:b});y&&n.push({type:"availability",displayableText:y,srOnlyText:`Available ${y.replace("â"," to ")}`,qaAttribute:"prd-itm-availability"}),t?.snapEligible&&u&&!i&&n.push({type:"snap",displayableText:"SNAP",qaAttribute:"prd-itm-snap"})}else n=this.productTagElementsFromLabels(e,t);return i?n.slice(0,2):n.slice(0,3)}productTagElementsFromLabels(e,t){let i=[],{fulfillmentStartTime:n,fulfillmentEndTime:r,fulfillmentStartTimeSaturday:s,fulfillmentEndTimeSaturday:a,fulfillmentStartTimeSunday:o,fulfillmentEndTimeSunday:l,labels:c}=e;return c&&c.length>0&&c.forEach((t=>{if(t.isLabelAppOnly)return;let c=t.labelName,d=t.accessibilityText,u=`prd-itm-${c.toLocaleLowerCase().replace(/\s+/g,"-")}`;d||(d=c),t.replacePlaceholder&&("(availabilityText)"===c?(c=this.getAvailabilityTimes({fulfillmentStartTime:n,fulfillmentEndTime:r,fulfillmentStartTimeSaturday:s,fulfillmentEndTimeSaturday:a,fulfillmentStartTimeSunday:o,fulfillmentEndTimeSunday:l}),d=`Available ${c.replace("â"," to ")}`,u="prd-itm-availability"):"(channelAvailability)"===c&&(c=this.getChannelAvailabilityLabel(e),d=c,u="prd-itm-fulfillment-type")),c&&i.push({displayableText:c,srOnlyText:d,qaAttribute:u})})),i}getChannelAvailabilityLabel(e){if(!e.isMtoProduct)return"";let t=this.getCurrentChannel(),i=e.channelEligibility?.inStore,n=e.channelEligibility?.delivery,r=e.channelEligibility?.pickUp;switch(t){case"instore":return this.getInStoreLabel(i,r,n);case"delivery":return this.getDeliveryLabel(n,r,i);case"pickup":return this.getPickupLabel(r,n,i);default:return""}}getCurrentChannel(){let e=this.aemService.getUserChannel();if(this.aemService.getOrderStoredIdCookie()&&this.aemService.getOrderNumberCookie()){let t=this.aemService.getOrderPreferenceCookie();t&&(e=t.toLowerCase(),"dug"===e&&(e="pickup"))}return e}getInStoreLabel(e,t,i){return e?"":t&&!i?Tw:i&&!t?Pw:""}getDeliveryLabel(e,t,i){return e?"":t?Tw:i?Ew:""}getPickupLabel(e,t,i){return e?"":t?Pw:i?Ew:""}isSlotValidAtCurrentTime(e,t,i){if(!e||!t)return!0;let n=localStorage.getItem(i),r=n?JSON.parse(n):{};if(!r?.timeSlot)return!0;let s=e?.find((e=>e?.departmentName?.toLowerCase()===t?.toLowerCase()));return!s||!s?.dayOfWeek||this.isSlotWithinOperatingHours(s,r)}isSlotWithinOperatingHours(e,t){if(!t?.timeSlot)return!0;let i=new Date(t.timeSlot),n=i.toLocaleString("en-US",{weekday:"long"}),r=60*i.getHours()+i.getMinutes(),s=e.dayOfWeek.find((e=>e?.day===n));if(!s||!s.startHour||!s.endHour)return!0;let a=this.convertTimeStringToMinutes(s.startHour),o=this.convertTimeStringToMinutes(s.endHour);return r>=a&&r<o}convertTimeStringToMinutes(e){return 60*parseInt(e.substring(0,2),10)+parseInt(e.substring(2),10)}getBadgeToDisplay(e,t){return e?{badgeName:"Subscribed",color:"neutral",isStrikethrough:!1,isBoldText:!1}:t?.badges?.[0]||{}}showDisplayHoursForDeli(e,t,i){let n=e?.find((e=>e?.departmentName?.toLowerCase()===t.toLowerCase())),r=localStorage.getItem(i),s=r?JSON.parse(r):{}
1,a=new Date(s?.timeSlot).toLocaleString("en-US",{weekday:"long"}),o=n?.dayOfWeek?.find((e=>e?.day===a));return{startHour:o?.startHour,endHour:o?.endHour}}formatTimeSlots(e){let{startHour:t,endHour:i}=this.showDisplayHoursForDeli(window.AB?.storeFlagsData?.flags?.departmentsDetail,"Deli",e)||{},n=(e,t=!1)=>{let i;i=parseInt(e?.slice(0,2),10);let n=parseInt(e?.slice(2),10),r=i>=12?"PM":"AM";return i=i%12||12,t?`${i}:${n?.toString().padStart(2,"0")} ${r}`:`${i} ${r}`};return{shortFormat:`${n(t)} to ${n(i)}`,longFormat:`${n(t,!0)} - ${n(i,!0)}`,hyphinFormat:`${n(t)}-${n(i)}`}}static{this.ɵfac=function(t){return new(t||e)(lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function Ow(){return window}var Bw=(()=>{class e{static{this.CRITEO_CLICK_ALLOWED_ROUTES=["/loyalty/discovery"]}constructor(e,t,i,n,r,s,a){this.http=e,this._aemService=i,this._datalayerService=n,this._utilService=r,this._userInfoService=s,this._productUtilService=a,this.config=Iw,this._disableInStoreChannelCheck=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableInStoreChannelCheck"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableInStoreChannelCheck,this._enableMFC2=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("isMFC2disabled")&&!1===window.SWY.CONFIGSERVICE.featureToggleConfig.isMFC2disabled,this._disableMto=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableMto"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableMto,this.rewardGridPath="/content/www/{banner}/en/justforyou/rewards/rewards-details",this._arrPromoRule=[],this.objPageCoupons={offers:{},offersByUpc:{}},this.shopCouponRefreshSource=new Tt({}),this.rewardsRefreshSource=new kt,this.rewardsRefresh=this.rewardsRefreshSource.asObservable(),this.postUserInfoSource=new kt,this.userInfoRefresh=this.postUserInfoSource.asObservable(),this._postUserInfoSource=new Tt(""),this._userInfoRefresh=this._postUserInfoSource.asObservable(),this.manualBootstrapSource=new kt,this.manualBootstrap=this.manualBootstrapSource.asObservable(),this.hideStepperButtons=new kt,this.$hide
1StepperButtons=this.hideStepperButtons.asObservable(),this.rightDrawerSource=new kt,this.$rightDrawerSource=this.rightDrawerSource.asObservable(),this.upcs=new kt,this.$upcs=this.upcs.asObservable(),this.customizationData=$p({isUpdated:!1,selectedOptions:null,selectedQuantity:null,productId:null,comments:null}),this.bxgyOffer=new kt,this.$bxgyOffer=this.bxgyOffer.asObservable(),this.arSubscriptions=new Tt(null),this.$arSubscriptions=this.arSubscriptions.asObservable(),this.showHeaderTooltip=new Tt(!1),this.crossSellTargetSource=new kt,this.$crossSellTarget=this.crossSellTargetSource.asObservable(),this.crossSellCloseSource=new kt,this.$crossSellClose=this.crossSellCloseSource.asObservable(),this._validateSession=new Tt({}),this.validateSession$=this._validateSession.asObservable(),this._updateBiaAddAllBtn=new kt,this.updateBiaAddAllBtn$=this._updateBiaAddAllBtn.asObservable(),this._cartObjSource=new Tt({}),this.currentCartObj=this._cartObjSource.asObservable(),this._toasterInteractiveElement=new Tt(!1),this._products=new Tt(null),this.products$=this._products.asObservable(),this.isABFlagDisabledEvent=new kt,this.isABFlagDisabledEvent$=this.isABFlagDisabledEvent.asObservable(),this.slotDisplay="#poDeliveryDate",this.reviewCTA="#poCancelLink",this.editOrderRowUI="#pendingOrderAlert",this.reserveTimeEl="#reserveCon",this.reserveNavEl=".reserve-nav",this.slotCookie="SlotInfo",this.orderStoreCookie="OrderStoreId",this.orderNumberCookie="OrderNumber",this.isSyndicatedHeader="syndicatedHeader",this.eRumsDeliveryType="eRumsDeliveryType",this.duplicateProductsObj={},this.checkBoxTopRegistered=function(){this._aemService.authorize()&&this.userInfoRefresh.subscribe((e=>{if("initFunc"==e&&this._aemService.authorize()&&!this._aemService.getBoxTopCalled())if(this._aemService.setBoxTopCalled(!0),localStorage.getItem("loyaltyPartners")){let e=JSON.parse(localStorage.getItem("loyaltyPartners"));e.loyaltyPartners&&e.loyaltyPartners.forEach((function(e){e&&"GeneralMills"==e.name&&e.planNumber&&e.planNumber.length>1&&this._aemService.setBoxTopAuth(!0)}))}else this.objBoxTop.getGeneralMillsId().subscribe((e=>{localStorage.setItem("loyaltyPartners",JSON.stringify(e)),e.loyaltyPartners&&e.loyaltyPartners.forEach((function(e){e&&"GeneralMills"==e.name&&e.planNumber&&e.planNumber.length>1&&this._aemService.setBoxTopAuth(!0)}))}))}))},this.checkPendingOrder=function(){let e=this._aemService.getOrderNumberCookie();return!(!this._aemService.getOrderStoredIdCookie()||!e)},this.__encode=function(e){let t="",i=e.length;for(let n=0;n<i;n++)t+=e.charCodeAt(n).toString(10);return Number(t)},this.checkCartId=function(e){return this._utilService.isLSCompatible()?void 0!==localStorage.getItem(e)&&null!==localStorage.getItem(e):void 0!==this._utilService.getCookie(e)&&null!==this._utilService.getCookie(e)},this.getCartId=function(e){return this.getCartIdV2(e)},this.setCartId=function(e,t){this.setCartIdV2(e,t)},this.getCartIdV2=function(e,t){let i=this.getCartIdObjV2(e);if(i)return i[t||"abs"]},this.setCartIdV2=function(e,t,i){let n=this.getCartIdObjV2(e);n[i||"abs"]=t,this.setCartIdObjV2(e,n)},this.getCartIdObjV2=function(e){let t;if(t=this._utilService.isLSCompatible()?localStorage.getItem(e):this._utilService.getCookie(e),t)try{return JSON.parse(t)}catch(e){return console.warn("migrating old cart id",e),{abs:t}}return{}},this.setCartIdObjV2=function(e,t){let i=JSON.stringify(t);this._utilService.isLSCompatible()?localStorage.setItem(e,i):this._utilService.setCookie(e,i,-1)},this.getValidProductPrice=e=>null===e?0:!1===this.hasPromotion(e)||this.isProductPromoActive(e)?e.price:e.basePrice,this._arrPromoRule=Ow().SWY.CONFIGSERVICE.getConfigforPromoDesc(),this.isCateringEnabled=!this._aemService.getFeatureFlagByNameDisable("isCateringDisabled")}getHiddenInputs(){let e=$(".js-gridDataParse");$('input[type="hidden"]',e).each((function(e,t){let i=$(t),n=i.val(),r=i.attr("name");if(n)switch(r){case"gridDataSource":window.AB[r]=JSON.parse(n);break;case"availableSorts":window.AB[r]=[],n.split(",").map((function(e){window.AB[r].push(e.trim())}));break;default:window.AB[r]=n.toString()}}))}getPromorulesArray(){return this._arrPromoRule}getBogoLabel(){return Ow().SWY.CONFIGSERVICE.getBannerConventions().buy_one_get_one_free}getPromoDescription(){return Ow().SWY.CONFIGSERVICE.getBannerConventions().promoDescription}getPromoDescriptionAPI(e){if(this.isProductPromoActive(e))switch(e.promoType){case"P":e.promoTitle=this.getPromoDescription(),e.offerText="";break;case"B":case"M":e.promoTitle=this.getBogoLabel(),e.offerText=e.promoText}}getPromoDescriptionAPIMealsRecipe(e){if(this.isProductPromoActive(e))switch(e.promoType){case"P":e.promoTitle=this.getPromoDescription(),e.offerText="";break;case"B":case"M":e.promoTitle=this.getBogoLabel(),e.offerText=e.promoText}return e}getAppContext(){return Ow().AB}getProductDetailPath(e){return"wineshop"===e?Ow().AB.winePdpPath:"mkp"===e?Ow().AB.mkpPdpPath:Ow().AB.htmlProductDetailPath}isSeoEnabled(){return!0===(window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig)?.isSeoEnabled}generateSeoSlug(e){if(!e||""===e.trim())return"product";let t={"fluid oz":"fl-oz","fl oz":"fl-oz","fluid ounces":"fl-oz","fluid ounce"
1:"fl-oz",ounces:"oz",ounce:"oz",pounds:"lb",pound:"lb",count:"ct",pk:"pack"},i=e.toLowerCase().replace(/[\u2122\u00ae\u00a9]/g,"").replace(/&/g," and ").replace(/[\u2018\u2019'`]/g,"").replace(/\//g,"-").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/(\d)\.(\d)/g,"$1-$2").replace(/([a-z0-9])\s*\+/g,"$1 plus ").replace(/(\d)\s*%/g,"$1 percent ").replace(/#\s*(\d+)/g," number $1").replace(/[.,;:"()[\]{}!?@$^*=~<>|\\]/g," ").replace(/[^a-z0-9\s-]/g," ");if(Object.keys(t).forEach((e=>{i=i.replace(new RegExp("\\b"+e+"\\b","g"),t[e])})),i=i.replace(/\b(a|an|the)\b/g," ").replace(/\b(\d+)\s*pack\b/g,"$1-pack").replace(/\b(\d+)\s*ct\b/g,"$1-ct").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""),i.length>120){let e=i.substring(0,120),t=e.lastIndexOf("-");i=t>0?e.substring(0,t):e}return i||"product"}buildSeoPdpUrl(e,t){return`/shop/pd/${this.generateSeoSlug(e)}/${t}`}getCouponDetailPathShop(){return Ow().AB.htmlOfferDetailPathShop}getCouponDetailPathWww(){return Ow().AB.htmlOfferDetailPathWww}getRewardGridPathWww(){return Ow().AB.htmlRewardDetailPathWww}promoDescription(e){let t="promoDescriptionVal",i="priceColor",n=e.promoDescription,r=!1;if(n){console.log("PRODUCT DESCRIPTION - DATA: "+n);for(let s=0;s<this._arrPromoRule.length&&!1===r;s++){let a=this._arrPromoRule[s];n.match(a.rule)&&(e[t]=a.value,e[i]=a.priceColor,e.offerText=a.offerText,r=!0,1==a.showStrikeThrough&&this.checkStrikeThrough(e),console.log("PRODUCT DESCRIPTION - MODIFIED: "+e[t]))}!1===r&&(e[t]=Ow().SWY.CONFIGSERVICE.getBannerConventions().promoDescription,console.log("PRODUCT DESCRIPTION - DEFAULT: "+e[t]),e[i]=!0,this.checkStrikeThrough(e),e.offerText="")}}checkStrikeThrough(e){this.isProductPromoActive(e)&&"P"===e.promoType&&null!=e.basePrice&&e.price>0&&e.basePrice>0&&e.price<e.basePrice?e.showStrikeThrough=!0:this.setStrikeThroughFromBadge(e)}setStrikeThroughFromBadge(e){e?.badges?.forEach((t=>{t?.isStrikethrough&&(e.showStrikeThrough=!0,e.basePrice=e.previousBasePrice,e.priceHighlight=!1,e.priceIndicator="Now")}))}checkStrikeThroughSponsored(e){this.isProductPromoActive(e)&&null!=e.basePrice&&e.price>0&&e.basePrice>0&&e.price<e.basePrice?e.showStrikeThrough=!0:e.showStrikeThrough=!1}getUidValue(){return document.cookie.match("(^|;)\\s*_br_uid_2\\s*=\\s*([^;]+)")||""}_hasLSRewards(){let e=this._getRewards();return!(!e||!e.grOffers)}_hasLSArSubscriptions(){let e=Date.now(),t=this._getArSubscriptions();return t&&t.arSavedTime>e}_getArSubscriptions(){let e=localStorage.getItem("abNgSubscriptions"),t={};try{t=JSON.parse(e)}catch(e){console.error("ERROR: AR SUBSCRIPTIONS - GETTING FROM LOCAL STORAGE"),console.error(e)}return t}_getRewards(){let e=localStorage.getItem("abRewards"),t={};try{t=JSON.parse(e)}catch(e){console.error("ERROR: REWARDS - GETTING FROM LOCAL STORAGE"),console.error(e)}return t}_hasLSDeals(){return!!this._getDeals()}_getDeals(){let e=localStorage.getItem("abDeals"),t={};try{t=JSON.parse(e)}catch(e){console.error("ERROR: DEAL - GETTING FROM LOCAL STORAGE"),console.error(e)}return t}loadRemoteCouponsV2(e){let t="";if(e=Aw[e]||e,Ow().AB.COMMON.authorize())t=Ow().AB.offerGalleryFilterPath;else{let e=Ow().SWY.CONFIGSERVICE.getDatapowerConfig();t=e.clientHost+e.datapowerxAPIBasePath+"/dce/offergallery/anonymous/offers/filter"}return t+="?storeId="+Ow().AB.userInfo.branchId,this.getRemoteCouponsV2(t,e)}getRemoteCouponsV2(e,t){let i={"Content-Type":"application/json","X-SWY_API_KEY":"emju","X-SWY_VERSION":"3.0","Ocp-Apim-Subscription-Key":this._aemService.getApimSubscriptionKey()};Ow().AB.COMMON.authorize()&&this._userInfoService.getSWY_SHOP_TOKEN()&&(i.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let n={headers:new jy(i)},r={primaryCategoryNm:[t]};return this.http.post(e,r,n)}isEmpty(e){if(null==e)return!0;if(e.length>0)return!1;if(0===e.length||"object"!=typeof e)return!0;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}getOfferWithDeliveryChannelEC(e,t,i){if(this.isEmpty(e))return null;let n=null,r=e?.upcs?.[t]?.offers;if(r&&(n=this.findOfferWithDeliveryChannelEC(r),null!==n))return n;let s=e?.departments?.[i]?.offers;return s&&(n=this.findOfferWithDeliveryChannelEC(s)),n}findOfferWithDeliveryChannelEC(e){if(this.isEmpty(e))return null;for(let t in e){let i=e[t];if("EC"===i?.deliveryChannel)return i}return null}isCouponExpired(e){let t=new Date,i=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),s=new Date(`${n}/${i}/${r}`),a=parseInt(e.endDate),o=new Date(a),l=o.getDate(),c=o.getMonth()+1,d=o.getFullYear();return new Date(`${c}/${l}/${d}`)<s}checkUnAttendedDelivery(e){return!!(this.checkPendingOrder()&&this._aemService.checkUnAttendedDelivery()&&e.restrictedValue&&e.restrictedValue>0)}getOffersByUpc(e,t){let i=e.upc;return t?.upcs?.[i]??{}}getCouponType(e){let t=this._aemService.getCouponTypes();
1return null==t[e]?"":t[e]}prop65WarningMessage(e){let t=this._aemService.getProp65Details();e.prop65WarningTextDetails="",t.prop65Flag&&(e.prop65Title="",e.prop65PdpTitle="",null!=e.prop65WarningText&&""!=e.prop65WarningText&&(e.prop65Title=t.prop65Title,e.prop65PdpTitle=t.prop65PDPTitle,e.prop65WarningTextDetails=e.prop65WarningText))}initServiceCall(){console.log("ANGULAR - REQUESTED SERVICE CALL"),this.postUserInfoSource.next("initAngular")}initJ4UModal(){console.log("ANGULAR - OPENING THE J4U MODAL");this.manualBootstrapSource.next({manualComponentId:"j4uModal",contextId:"offerDetailModal"})}clipEcomGalleryCoupon(e){this.shopCouponRefreshSource.next({id:e,deleted:!1,status:"C"})}unclipEcomGalleryCoupon(e){this.shopCouponRefreshSource.next({id:e,deleted:!0,status:"U"})}isProductPromoActive(e){let t=!1;if(e.hasOwnProperty("promoEndDate")&&e.promoEndDate){let i=new Date,n=i.getDate(),r=i.getMonth()+1,s=i.getFullYear();new Date(`${r}/${n}/${s}`)<=new Date(e.promoEndDate)&&(t=!0)}return t}hasPromotion(e){let t=!1;return e.hasOwnProperty("promoType")&&e.promoType&&("P"===e.promoType||"B"===e.promoType||"M"===e.promoType)&&(t=!0),t}showCrossSell(e,t,i,n){let r=this._aemService.getBranchId();if(t&&r&&e){let s=this._aemService.getApimSearchPath(),a=this._aemService.getApimSearchSponsoredCarouselEndpoint(),o=encodeURIComponent(this._aemService.getCookie("_elevaate_session_id")),l=$(window).width(),c=this._aemService.clubCard()?encodeURIComponent(this._aemService.clubCard()):"",d=this._aemService.getBanner(),u=e,p="";n||(n="cross-sell"),i.length>0&&i.forEach((function(e){u=u+","+e})),p=`${window.location.origin}${s}${a}?storeid=${r}&featuredsessionid=${o}&screenwidth=${l}&userid=${c}&banner=${d}&max-result=8&pagename=${n}&exclude-bpn=${u}&bpn=${e}&category-id=${t}`,p=this.generateCBAUrl(p);let h={headers:new jy({"Ocp-Apim-Subscription-Key":this._aemService.getApimSubscriptionKey()})};this.http.get(p,h).subscribe((t=>{if(t.response?.docs){let i={products:t.response?.docs,bpn:e};this.sendSponsoredProductsOnloadEvent(t.response?.docs,"crossSellComponent"),this.crossSellTargetSource.next(i)}}))}}closeCrossSell(e){document.getElementsByClassName("cross-sell-product-"+e)[0]&&this.crossSellCloseSource.next(!0)}isGuestUser(){let e=this._aemService.featureToggleConfig(),t=!e||!e.hasOwnProperty("disableGuestCart")||e.disableGuestCart;return"g"==String(Ow().AB.userInfo.userType).toLowerCase()&&!t}isItemAvailable(e){e.disableInStoreUICheck=!0;let t=this._aemService.getUserChannel(),i=(()=>{switch(!0){case"pickup"===t:return"pickUp";case"delivery"===t:return"delivery";case!this._disableInStoreChannelCheck&&"instore"===t:return"inStore";default:return""}})();this._disableInStoreChannelCheck&&"instore"===t&&(t="");let n=e.channelEligibility,r=!(!n||!n[i])&&n[i];switch(!0){case!this._disableInStoreChannelCheck&&"instore"===t:return r?(!n.delivery&&!n.pickUp&&(e.disableInStoreUICheck=!1),this.checkItemAvailability(e,t)):(e.itemNotAvailableTxt="This item is not offered for in-store.",!1);case["pickup","delivery"].includes(t):return r?this.checkItemAvailability(e,t):(e.itemNotAvailableTxt=`This item is not offered for ${t}.`,!1);case!t:return this.checkItemAvailability(e,t);default:return!1}}checkItemAvailability(e,t){if(e)switch(!0){case!this._disableInStoreChannelCheck&&"instore"===t&&e.price>0:case["pickup","delivery"].includes(t)&&e.price>0&&"1"===e.inventoryAvailable:case!t&&e.price>0:return e.itemAvailable=!0,!0;default:return e.itemAvailable=!1,e.itemNotAvailableTxt="This item is out of stock",e.disableInStoreUICheck=!0,!1}return!1}generateCBAUrl(e){if(""!==e){let t="",i=this._aemService.getUserChannel();switch(this._disableInStoreChannelCheck&&"instore"===i&&(i=""),!0){case"delivery"===i:case"pickup"===i:case!this._disableInStoreChannelCheck&&"instore"===i:t=e.indexOf("?")<0?`${e}?channel=${i}`:`${e}&channel=${i}`;break;default:t=e}return t}}isObjectValid(e){return e&&e.constructor===Object&&!!Object.keys(e).length}canTriggerProductsCall(){let e=window.SWY.CONFIGSERVICE.featureToggleConfig;return e&&e.arEnable&&window.AB.COMMON.authorize()}isItemAvailable_v2(e,t){e.disableInStoreUICheck=!0;let i=this._userInfoService.getUserChannel();i="wineshop"===t||"wine-carousel"===t?"shipping":i;let n=(()=>{switch(!0){case"shipping"===i:return"shipping";case"pickup"===i:return"pickUp";case"delivery"===i:return"delivery";case"instore"===i:return"inStore";default:return""}})(),r=e.channelEligibility,s=!(!r||!r[n])&&r[n];if(typeof e.status<"u"&&"inactive"==e.status)e.itemAvailable=!1,e.itemNotAvailableTxt="This item is out of stock",e.disableInStoreUICheck=!0;else{if(!this.isFeatureEnabled("isMtoChannelEligibilityEnabled")&&e.isMtoProduct)return this.checkItemAvailability_v2(e,i);switch(!0){case"instore"===i:return s?(!r.delivery&&!r.pickUp&&(e.disableInStoreUICheck=!1),this.checkItemAvailability_v2(e,i)):(e.itemNotAvailableTxt="This item is not offered for in-store.",!1);case["pickup","delivery","shipping"].includes(i):return s?this.checkItemAvailability_v2(e,i):(e.itemNotAvailableTxt=`This item is not offered for ${i}.`,!1);case!i:return this.checkItemAvailability_v2(e,i);default:return!1}}}isItemAvailable_v3(e,t,i=!1,n=!1,r=!1){e.disableInStoreUICheck=!0;let s=i?"Out of stock":"Out of Stock",a=i?"Pickup only":"Only Available for Drive-up and go.",o=i?"In-store only":"Only Available In-Store.",l=i?"Delivery only":"Only Available for Delivery.",c=i?"Delivery and Pickup only":"Only Available for Delivery or Drive-up and go.",d=i?"In-store and Delivery only":"Only Available In-Store or for Delivery.",u=i?"In-store and Pickup only":"Only Available In-Store or for Drive-up and go.",p=this._userInfoService.getUserChannel();if(p="wineshop"===t||"wine-carousel"===t?"shipping":p,this.checkPendingOrder()){let e=localStorage.getItem("abSlotEditOrder");p=JSON.parse(e)?.serviceType??p}let h=(()=>{switch(!0){case"shipping"===p:return"shipping";case"pickup"===p:return"pickUp";case"delivery"===p:return"delivery";case"instore"===p:return"inStore";default:return""}})(),f=e.channelEligibility,m=!(!f||!f[h])&&f[h];if(typeof e.status<"u"&&"inactive"==e.status)e.itemAvailable=!1,e.itemNotAvailableTxt=s,e.disableInStoreUICheck=!0;else{if(!this.isFeatureEnabled("isMtoChannelEligibilityEnabled")&&e.isMtoProduct)return this.checkItemAvailability_v3(e,p,s);switch(!0){case n&&!r:return this.checkItemAvailability_v3(e,p,o,n);case"instore"===p:if(m)return!f.delivery&&!f.pickUp&&(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=o),this.checkItemAvailability_v3(e,p,s);{let t=f?.delivery&&this.checkItemAvailability_v3(e,"delivery",s),i=f?.pickUp&&this.checkItemAvailability_v3(e,"pickup",s);t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=c):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=a):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=l):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=s)}return!1;case"pickup"===p:if(m)return this.checkItemAvailability_v3(e,p,s);{let t=f?.delivery&&this.checkItemAvailability_v3(e,"delivery",s),i=f?.inStore&&this.checkItemAvailability_v3(e,"instore",s);t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=d):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=o):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=l):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=s)}return!1;case"delivery"===p:if(m)return this.checkItemAvailability_v3(e,p,s);{let t=f?.pickUp&&this.checkItemAvailability_v3(e,"pickup",s),i=f?.inStore&&this.checkItemAvailability_v3(e,"instore",s);t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=u):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=a):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=o):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt=s)}return!1;case"shipping"===p:if(m)return this.checkItemAvailability_v3(e,p,s);e.itemNotAvailableTxt=`This item is not offered for ${p}.`;case!p:return this.checkItemAvailability_v3(e,p,s);default:return!1}}}checkItemAvailability_v2(e,t,i=!0){if(e&&e.channelInventory&&e.channelInventory[t]){let n=e.channelInventory[t];switch(!0){case"instore"===t&&e.price>0:case["pickup","delivery","shipping"].includes(t)&&(!i||e.price>0)&&!["",null,void 0,"0"].includes(n):case!t&&e.price>0:if(e.isMtoProduct&&e.preparationTime)if(Number(e.preparationTime)>0){let t=this.prepTimeMinToHoursMins(e.preparationTime);e.mtoDisplyableTime=t,e.mtoText="Takes "+t+" to prepare"}else e.mtoDisplyableTime=null,e.mtoText=null;return e.itemAvailable=!0,!0;case e.price<=0:case["",null,void 0,"0"].includes(n)&&["pickup","delivery","shipping"].includes(t):return e.itemAvailable=!1,e.itemNotAvailableTxt="This item is out of stock",e.disableInStoreUICheck=!0,!1;default:return!0}}return!1}getProductInventoryAvailability(e,t){let i;return i=this._enableMFC2&&e.channelInventory&&t?e.channelInventory[t]:e.inventoryAvailable,i}isActiveProduct(e){return!(e.status&&"inactive"===e.status)}isLoggedIn(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}checkAnalyticsSwyObject(){return!(!window.analyticsSwy||!window.analyticsSwy.storedData)&&
1!!window.analyticsSwy.storedData.ids}validateSession(e){return v(this,null,(function*(){if(this._userInfoService.isAuthorized())if(this._utilService.isTokenActive()&&this._userInfoService.getSWY_SHOP_TOKEN())e&&e();else if(this._utilService.checkAuthorizedCookie())try{let t=yield this.http.get(this.config.userInfoPath).toPromise();this._userInfoService.setSWY_SHOP_TOKEN(t.SWY_SHOP_TOKEN),this._utilService.updateTokenRefreshProperty(),this._utilService.isTokenActive()?e&&e():$("#sessionTimeoutModal").modal({show:!0})}catch(e){console.error("qty-stepper",e),$("#sessionTimeoutModal").modal({show:!0})}else $("#sessionTimeoutModal").modal({show:!0})}))}generateUUID(e,t){let i=(new Date).getTime(),n=Math.floor(performance.now()*i);return e&&e.length>0&&!isNaN(e)&&(n+=Number(e)),t&&t.length>0&&(n+=this.__encode(t)),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/([xy])/g,(function(e){let t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)}))}getCurrentEnviorment(){let e="";return e=window.location.origin.indexOf("dev1")>0||window.location.origin.indexOf("dev2")>0||window.location.origin.indexOf("dev3")>0||window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?"qa1":window.location.origin.indexOf("beta")>0?"betaprod":"prod",e}getWineShopSearchResultsPage(){return Ow().AB.wineShopSearchResultsPath}getMarketPlaceCrossSellerSearchResultsPath(){return Ow().AB.marketPlaceCrossSellerSearchResultsPath}getSellerLandingPath(e){let t=$(".menu-nav__wrapper").attr("data-mktp-sellers-url");try{let i=JSON.parse(t);return i[e]?i[e]:""}catch{return""}}checkPendingOrderAlert(){let e=this._utilService.readElement(this.reserveNavEl),t=this._aemService.getOrderNumberCookie();if(""!==t&&this._aemService.authorize())if(e&&e.length>0&&(e=this._utilService.getElement(this.reserveNavEl),e.hide()),this.checkForEditOrderMode()){if("true"!==this._utilService.getMetaElementContent(this.isSyndicatedHeader)){let e=this._utilService.getElement(this.slotDisplay),i=this._utilService.getElement(this.reviewCTA),n=this._utilService.getElement(this.editOrderRowUI);i&&i.attr("href",Ow().SWY.CONFIGSERVICE.erumsConfig["spa.editorder.endpoint"]+"/cart/"+this.orderStoreId+"/"+t),e&&e.html(this.slotInfo),i&&i.prop("onclick",null).off("click"),n&&n.removeClass("mask")}this.eRumsDeliveryCheckCall(t)}else this.eRumsDeliveryCheckCall(t);else{localStorage.getItem(this.eRumsDeliveryType)&&localStorage.removeItem(this.eRumsDeliveryType);let e=$(this.reserveTimeEl);e?e.show():console.error("reserve-nav class not found")}}checkForEditOrderMode(){let e=!1,t=this._aemService.getSlotIdCookie(),i=this._aemService.getOrderStoredIdCookie();return"undefined"!==t&&"undefined"!==i&&""!==t&&""!==i&&(this.slotInfo=t,this.orderStoreId=i,e=!0),e}eRumsDeliveryCheckCall(e){let t=this,i="";if(localStorage.getItem(this.eRumsDeliveryType)&&(i=JSON.parse(localStorage.getItem(this.eRumsDeliveryType))),""!=i&&i.orderId==e&&"Unattended"==i.deliveryType)this.unattendedDeliveryWrapper(i.deliveryType);else{let i=this.config[this.getCurrentEnviorment()]?.baseURL?.replace("{banner}",this._userInfoService.getBanner());if(!0===this._aemService.getEditOrderOldVersion()){let n=i+Ow().AB.erumsOrderDelivery,r=Ow().AB.ecommHttpOptionsErums;$.ajax({headers:r,url:n+e,dataType:"json",success:function(e){localStorage.setItem(t.eRumsDeliveryType,JSON.stringify({orderId:e.order.orderId,deliveryType:e.order.deliveryType})),t.setABCartLS(e),t.unattendedDeliveryWrapper(e.order.deliveryType)},error:function(e,t,i){}})}else if(!1===this._aemService.getEditOrderOldVersion()){this.orderStoreId=this._aemService.getOrderStoredIdCookie();let n=i+Ow().AB.erumsOrderDelivery,r=Ow().AB.ecommHttpOptionsErums;$.ajax({headers:r,url:n+this.orderStoreId+"/"+e,dataType:"json",success:function(e){let i,n,r;if(localStorage.setItem(t.eRumsDeliveryType,JSON.stringify({orderId:e.orderId,deliveryType:e.deliveryType})),t.setABCartLS(e),e&&e.deliveryInfo&&e.deliveryInfo.slotInfo){let t=e.deliveryInfo.slotInfo;t.displayStartTS&&(i=t.displayStartTS,i=Date.parse(i)),t.slotId&&(n=t.slotId)}e&&e.serviceType&&(r=e.serviceType.toLowerCase(),r="dug"===r?"pickup":"delivery"),localStorage.setItem("abSlotEditOrder",JSON.stringify({timeSlot:i,slotId:n,serviceType:r})),t.editOrderZipCodeUpdate(e.customerInfo.zipCode),t.editOrderPreferenceUpdate(e.deliveryType),t.unattendedDeliveryWrapper(e.deliveryType)},error:function(e,t,i){}})}}}editOrderZipCodeUpdate(e){let t={info:{COMMON:{},J4U:{},SHOP:{}}};t.info.COMMON.zipcode=e,t.info.J4U.zipcode=e,t.info.SHOP.zipcode=e,Ow().AB.COMMON.updateUserSession(t,!1),this._userInfoService.setUserSession(f(h({},this._userInfoService.getUserSession()),{shopZipcode:e,j4uZipcode:e}))}editOrderPreferenceUpdate(e){let t={info:{COMMON:{},J4U:{},SHOP:{}}},i="";i=e?"delivery":"dug",Ow().AB.userInfo.preferenceMode=i,t.info.COMMON.preference=i,Ow().AB.COMMON.updateUserSession(t,!1),this._userInfoService.setUserSession(f(h({},this._userInfoService.getUserSession()),{preference:i}))}unattendedDeliveryWrapper(e){this.checkUnAttendedEditOrderDelivery(e)}
1checkUnAttendedEditOrderDelivery(e){"Unattended"==e&&(Ow().AB.unattendedDeliveryIsEnabled=!0,this.updateProductRelatedComponents())}updateProductRelatedComponents(){null!=window.productGenericGridCompRef&&window.productGenericGridCompRef.zone.run((function(){window.productGenericGridCompRef.component.checkRestrictedItems()})),null!=window.productSearchGridCompRef&&window.productSearchGridCompRef.zone.run((function(){window.productSearchGridCompRef.component.checkRestrictedItems()})),null!=window.productHybridGridCompRef&&window.productHybridGridCompRef.zone.run((function(){window.productHybridGridCompRef.component.checkRestrictedItems()})),null!=window.productDynamicGridCompRef&&window.productDynamicGridCompRef.zone.run((function(){window.productDynamicGridCompRef.component.checkRestrictedItems()})),$("product-carousel, product-detail").each((function(){let e=$(this).attr("id");null!=window[e+"_CompRef"]&&window[e+"_CompRef"].zone.run((function(){window[e+"_CompRef"].component.checkRestrictedItems()}))}))}setABCartLS(e){localStorage.setItem("abCart",JSON.stringify({branchId:e.storeId?e.storeId:"",cartItems:e.orderItems?e.orderItems:[],cartPrice:e.orderSummary?.estimatedSubTotal||e.wysiwygOrderSummary?.estimatedSubTotal||"",cartQty:e.orderSummary?.totalItemQuantity||e.wysiwygOrderSummary?.totalItemQuantity||0,erumsStore:!0,isWYSIWYGEnabled:e.isWYSIWYGEnabled,orderNumber:e.orderId?e.orderId:""})),this.loadPendingOrderData()}loadPendingOrderData(){null!=window.cartServiceRefAL&&window.cartServiceRefAL.zone.run((function(){window.cartServiceRefAL.service.loadPendingOrderData()}))}checkItemAvailability_v3(e,t,i="Out of Stock",n=!1){if(e&&e.channelInventory&&e.channelInventory[t]){let r=e.channelInventory[t];switch(!0){case n:if(!this.isCateringEnabled)return e.itemAvailable=!1,e.itemNotAvailableTxt=i,e.disableInStoreUICheck=!0,!1;case"instore"===t&&e.price>0:case["pickup","delivery","shipping"].includes(t)&&e.price>0&&!["",null,void 0,"0"].includes(r):case!t&&e.price>0:if(e.isMtoProduct&&e.preparationTime)if(Number(e.preparationTime)>0){let t=this.prepTimeMinToHoursMins(e.preparationTime),i=this.prepTimeMinToHoursMins(e.preparationTime,!0);e.mtoDisplyableTime=t,e.mtoText="Takes "+t+" to prepare",e.mtoTagText=i}else e.mtoDisplyableTime=null,e.mtoText=null,e.mtoTagText=null;return e.itemAvailable=!0,!0;case e.price<=0:case["",null,void 0,"0"].includes(r)&&["pickup","delivery","shipping"].includes(t):return e.itemAvailable=!1,e.itemNotAvailableTxt=i,e.disableInStoreUICheck=!0,!1;default:return!0}}return!1}prepTimeMinToHoursMins(e,t=!1){let i=Number(e),n=Math.floor(i/60),r=i%60;return t?n>0?n+(n>1?" hrs":" hr")+(r>0?" "+r+" mins":"")+" prep":"Made to Order":n>0?n+(n>1?" Hours":" Hour")+(r>0?" "+r+" Minutes":""):r+" Minutes"}removeCartId(e,t){if(t){let i=this.getCartIdObjV2(e);i.hasOwnProperty(t)&&delete i[t],this.setCartIdObjV2(e,i)}else this._aemService.isLSCompatible()?localStorage.removeItem(e):document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"}getB2BCartList(){return Ow().SWY.CONFIGSERVICE?.bannerConventionsJson?.B2BCartList}getCartList(){return Ow().SWY.CONFIGSERVICE?.bannerConventionsJson?.cartList}getParams(e){let t=new URLSearchParams(window.location.search);return t.get(e)?t.get(e):null}showBiaLPCrossSell(e,t=!1){let i,n="",r=window.location.origin+this._aemService.getApimSearchPath(),s=this._userInfoService.getHouseId()?this._userInfoService.getHouseId():"",a=this._userInfoService.getShopStoreId()?this._userInfoService.getShopStoreId():"",o=this._userInfoService.getUserChannel(),l=encodeURIComponent(this._aemService.getCookie("_br_uid_2")),c=window.location.hostname;e&&s&&a&&o&&(n=`${r}/pdreco/substitution?bpn=${e}&storeId=${a}&hhid=${s}&channel=${o}&bruid=${l}&pageurl=${c}&availabilityCheck=true&placement=bia`,i={headers:new jy({"Ocp-Apim-Subscription-Key":this._aemService.getXApiKey(),accept:"application/json"})},this._userInfoService.getSiteType()&&"B"===this._userInfoService.getSiteType().toUpperCase()&&(i.headers=i.headers.set("pgm","1P_B2B")),this.http.get(n,i).subscribe((i=>{if(i&&i.productsinfo){let n={products:i?.productsinfo,bpn:e,isDynamicGridFlow:t,placement:"bia-lp"};this.crossSellTargetSource.next(n),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.getBiaOosAdobeMetrics(i.productsinfo)}else{let i={products:[],bpn:e,isDynamicGridFlow:t,placement:"bia-lp"};this.crossSellTargetSource.next(i)}}),(t=>{let i={products:[],bpn:e,placement:"bia-lp"};this.crossSellTargetSource.next(i)})))}recordRelevanceImpression(e,t,i){if(this.isSearchPage()){let n=this._utilService.getCookie("AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg"),r={item:e.id,price:e.price,quantity:"1",environment:"d","retailer-visitor-id":n?n?.match(/MCMID\|\d+(?=\|)/)[0]?.split("|")[1]:null};r=f(h({},r),"viewProductDetails"==i?{"page-id":"viewItem_API_desktop","event-type":"viewItem",availability:"1",category:e?.aisleId?.replaceAll("_",">")}:{"page-id":"viewSearchResult_API_desktop","event-type":"addToCart"}),r&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&window.citrusAdTracker(r,"AD_RELEVANCE",{component:t,context:i})}}isSearchPage(){return-1!=window.location.pathname?.toLowerCase().indexOf("shop/search-results")}sendSponsoredProductsOnloadEvent(e,t,i){if(e&&e.length>0){let n=e.map((e=>e.eventTracking)).filter((e=>null!=e));n&&n.length>0&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&window.citrusAdTracker(n,"AD_ONLOAD",{component:t,context:i||"sponsoredProductsLoaded"})}}
1sendSponsoredProductClickEvent(e,t,i){let n=e.adId||e.eventTracking;if(n&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker){if(this.duplicateProductsObj[e.pid])return;this.duplicateProductsObj[e.pid]=!0,window.citrusAdTracker(n,"AD_CLICK",{component:t,context:i})}}sendSponsoredProductClickEventForAllowedRoutes(t,i,n){if(!t||typeof window>"u"||!window.location)return;let r=window.location.pathname||"";r&&e.CRITEO_CLICK_ALLOWED_ROUTES.some((e=>"string"==typeof e&&e.length>0&&r.startsWith(e)))&&this.sendSponsoredProductClickEvent(t,i,n)}debounce(e,t=600){let i,n=!1;return function(...r){let s=this;clearTimeout(i),i=setTimeout((()=>{n&&(e.apply(s,r),n=!1)}),t),n=!0}}dispatchCustomOneTimeEvent(e,t,i){window.dispatchEvent(new CustomEvent(e,{detail:h({type:t},i)}))}hasPageV2Theme(){let e=!1;return"true"===this.getPageAttribute("data-enablev2theme")&&(e=!0),e}getPageAttribute(e){return this.getHeaderElement().attr(e)}getHeaderElement(){return $(".main-wrapper.www-wrapper")}handleTabFocus(e,t,i,n){let r=i.querySelector(t).querySelectorAll(n),s=[];r.forEach((e=>{$(e).is(":visible")&&s.push(e)}));let a=s[0],o=s[s.length-1];("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===a&&(o.focus(),e.preventDefault()):document.activeElement===o&&(a.focus(),e.preventDefault()))}preparationTimeExceedsPrebook(e,t){let i=localStorage.getItem(t);if(!i)return!1;let n=JSON.parse(i),r=parseInt(n.timeSlot,0);if(e.isPreOrderItem&&e.itemEffectiveStartDate){let t=new Date(r).toISOString()?.slice(0,10);return t<e.itemEffectiveStartDate.slice(0,10)}if(r&&e.preparationTime){let t=r-Date.now();return 60*e.preparationTime*1e3>t}return!1}listenToABXTestingFlag(e,t,i,n=5e3){if(this._aemService.getFeatureFlagByNameDisable(t))localStorage.removeItem(e),this.isABFlagDisabledEvent.next({flagName:t,testValue:"a"});else{let r=localStorage.getItem(e);if(r)this.isABFlagDisabledEvent.next({flagName:t,testValue:r});else if(window?.analyticsSwy?.testFlags?.[i]){let e=window.analyticsSwy.testFlags[i];this.isABFlagDisabledEvent.next({flagName:t,testValue:e})}else{let e,r=n=>{clearTimeout(e);let r=n.detail[i];this.isABFlagDisabledEvent.next({flagName:t,testValue:r})};window.addEventListener(i,r,{once:!0}),e=setTimeout((()=>{window.removeEventListener(i,r),this.isABFlagDisabledEvent.next({flagName:t,testValue:"a"})}),n)}}}getIsOfferEligibleBXGY(e){return"BUYX_GETY"===e?.offerProtoType&&!e?.offerDetail?.isClippable&&"M"!==e?.offerDetail?.promoType&&"B"!==e?.offerDetail?.promoType}isCustomizableProduct(e){return!(!e.isMtoProduct||!e.isCustomizable)}isProductEligibleForCustomization(e,t){let i=e?.flags?.departmentsDetail;return this.isCustomizableProduct(t)&&(i?.[0]?.acuview1POrderprep??!1)}getIsEcomEnabled(e){if(this.isCateringEnabled){let t=window.AB?.storeFlagsData?.flags?.departmentsDetail?.find((t=>t?.departmentId===e?.serviceDeptNum)),i=!!e?.isCateringProduct,n=!!e?.isCustomCake;return t&&e?.isMtoProduct&&(i||n||e?.isCustomizable)?!(typeof t?.isCateringEnabled>"u"||typeof t?.isECOM1PEnabled>"u"||typeof t?.serviceDepartEnabled>"u")&&(!t?.serviceDepartEnabled||i||n||t?.isECOM1PEnabled||e?.multiCustomizations?!!t?.serviceDepartEnabled&&(i?t?.isCateringEnabled:t?.isECOM1PEnabled):null):null}window.AB?.storeFlagsData?.flags?.departmentsDetail?.find((e=>"deli"===e?.departmentName?.toLowerCase()))}isDigitalDeliProductStoreNotEligible(e){let t=!this._aemService.getFeatureFlagByNameDisable("isDigitalDeliDisabled"),{isMtoProduct:i=!1,isCustomizable:n=!1,multiCustomizations:r=!1}=e||{},s=this.getIsEcomEnabled(e);return t&&!s&&i&&n&&r}isEligibleCustomCakeProduct(e){let t=!this._aemService.getFeatureFlagByNameDisable("isCustomCakesDisabled"),i=this.getIsEcomEnabled(e),{isMtoProduct:n=!1,isCustomizable:r=!1,isCustomCake:s=!1}=e||{};return t&&n&&r&&s&&i}cloneDeep(e){if(void 0!==e)return JSON.parse(JSON.stringify(e))}updateCustomizationData(e){this.customizationData.update((t=>f(h(h({},t),e),{isUpdated:!0})))}resetCustomizationData(){this.customizationData.set({isUpdated:!1,selectedOptions:null,selectedQuantity:null,productId:null,comments:null})}getExperimentIdData(e,t=!1){return v(this,null,(function*(){try{if(!this.isExperimentModuleAvailable())return null;let i=yield window.AB.experimentation.getExperimentByID(e,t);return i?.features&&Array.isArray(i?.features)&&i?.features?.length>0&&i?.features?.find((t=>t?.featureId===e))||null}catch(e){return console.error("A/B Test SDK error:",e),null}}))}isExperimentModuleAvailable(){return!(!window.AB||!window.AB.experimentation||"function"!=typeof window.AB.experimentation.getExperimentByID)}isMaxQuantityReachedForModifier(e,t){if(!e?.options||!t||!e?.maxSelect)return!1;let i=0;
1for(let n of e.options){let e=t.find((e=>e?.upcId===n?.upcId));i+="number"==typeof e?.qty?e.qty:e?.isSelected?1:0}return i>=e.maxSelect}isMinSelectSatisfied(e,t){if(!e?.options||!t)return!1;if(!e?.minSelect||e.minSelect<1)return!0;let i=0;for(let n of e.options){let e=t.find((e=>e?.upcId===n?.upcId));i+="number"==typeof e?.qty?e.qty:e?.isSelected?1:0}return i>=e.minSelect}isFeatureEnabled(e){return!0===this._aemService.getFeatureFlagBase()?.[e]}updateViewAllExperimentRoute(){return v(this,null,(function*(){let e="ACIP548280",t=window.AB&&window.AB.experimentation,i=window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig,n=i?i.enableSavingsHub:void 0;if(!t||"function"!=typeof t.getExperimentByID||!n)return null;try{let i=yield t.getExperimentByID(e,!1),n=(i&&Array.isArray(i.features)?i.features:[]).find((function(t){return t&&t.featureId===e}))||null;return n&&n.eligible&&"C"===n.group?"/loyalty/discovery":null}catch{return null}}))}byPassReserveSlotCheck(e){if(this.isFeatureEnabled("isMtoChannelEligibilityEnabled")||!e.isMtoProduct)return!1;let t=this._userInfoService.getPreference(),i={DELIVERY:"delivery",DUG:"pickUp",J4U:"inStore",SHIPPING:"shipping"}[t?.toUpperCase()];if(!i)return!1;let n=e.channelEligibility;return!!n&&!1===n[i]}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Tl),lr(Cw),lr(kw),lr(Sw),lr(_w),lr(Dw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Mw=(()=>{class e{constructor(e,t,i,n,r,s){this._http=e,this._commonService=t,this._aemService=i,this._userInfoService=n,this._utilService=r,this.cartbaseUrl="",this.cartEditOrderUrl="",this.config=Iw,this._abCart="",this.currentEnv="",this.setCartIdObjV2=function(e,t){let i=JSON.stringify(t);this._utilService.isLSCompatible()?localStorage.setItem(e,i):this._utilService.setCookie(e,i,-1)},this.mapErumsItems=function(e){return e?e.map((e=>({id:e.itemId,name:e.name,quantity:e.qty,price:e.price,basePrice:e.basePrice,pricePerUnit:e.unitPrice,unitType:e.unitQuantity,totalPrice:e.totalPrice,clubCardSaving:e.clubCardSaving?e.clubCardSaving:0,isAvailable:e.isAvailable?e.isAvailable:"",isFound:e.isFound?e.isFound:"",savings:e.savings?e.savings:[],clipped:e.clipped?e.clipped:[],maxPurchaseQty:e.maxPurchaseQty,departmentName:e.departmentName}))):[]},this.updateStoreForExistingCartV2=function(e,t,i,n=!1){let r="preferences",s=this.generateApiUrl(r,!1,{programType:"1P"},n),a=this.getRequestPayLoad("wineshop",null,n,r);return this._http.put(s,a,h(h({},this.getHeaders(this._commonService.getParams("mode"),{programType:"1P"},n)),this.getParams(null,!1,{programType:""},e,t,i,n,r))).pipe(bi((i=>this.transformMulticartResponse(i,e,t))),$i(this.handleError))},this.currentEnv=this._commonService.getCurrentEnviorment(),this.cartUrl=this.config[this.currentEnv].cartAPIDetails.cartV2API,this.guestCartUrl=this.config[this.currentEnv].cartAPIDetails.apimBasePath+this.config[this.currentEnv].cartAPIDetails.guestCartBasePath,this.cartEditOrderUrl=this.config[this.currentEnv]?.cartAPIDetails?.editCartAPI,this.itemsUrl="items",this.orderItemsUrl="orderItems"}getHeaders(e,t,i,n){let r="",s=this;r=!this._aemService.isAllowWiremockService()||"record"!==e&&"playback"!==e?"1P_SNS"===t?.programType?s.config[this.currentEnv]?.snsConfig.apimSubscriptionKeyValue:"1P_OA"===t?.appName?s.config[this.currentEnv]?.domsApiDetails.subscriptionKey.value:s.config[this.currentEnv].cartAPIDetails.subscriptionKeyV2.value:this._aemService.getWcaxXapiApimKey();let a={"ocp-apim-subscription-key":r,Authorization:"Bearer "+s._userInfoService.getSWY_SHOP_TOKEN()},o={};return"1P_SNS"===t?.programType?o={"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json","x-swy-date":(new Date).toUTCString(),"x-swy-banner":s._userInfoService.getBanner(),"x-swy-client-name":"web-portal/mobile",subscriptionsource:"onetimeadd","x-swy-correlation-id":s._userInfoService.getUUID()??""}:"1P_OA"===t?.appName?o={"Content-Type":"application/json",Accept:"application/json","Channel-Type":"web"}:i?(delete a.Authorization,o={"Sort-Order":"date","x-swy-client-id":"web-portal"}):o={"Content-Type":"application/json","Sort-Order":"date",slotsRequired:"true","ocp-apim-trace":`${this._aemService.getCartApimTrace()}`},!0===n&&(o=f(h({},o),{Selectivecart:"true"})),{headers:new jy(h(h({},a),o))}}generateAbsCart(e,t,i){let n,r,s,a=this,o=e.isWYSIWYGEnabled;n=e.cartItemsList?e.cartItemsList:e.orderItems?e.orderItems:void 0,e.wysiwygOrderSummary?(r=!1===a._commonService.isEmpty(e.wysiwygOrderSummary.totalEstimatedPrice)?0:e.wysiwygOrderSummary.totalEstimatedPrice,s=a._commonService.isEmpty(e.wysiwygOrderSummary.totalItemQuantity)?e.wysiwygOrderSummary.totalItemQuantity:0):(r=!1===a._commonService.isEmpty(e.summary&&e.summary.transactionTotal)?0:e.summary.transactionTotal,s=a._commonService.isEmpty(e.summary&&e.summary.totalItemQuantity)?e.summary.totalItemQuantity:0);let l=e,{cartItemsList:c}=l,d=g(l,["cartItemsList"]),u=f(h(f(h({},d),{cartItems:n,branchId:t||a._userInfoService.getShopStoreId()}),e.guestCartId?{guestCartId:e.guestCartId}:{}),{orderNumber:a._commonService.checkPendingOrder()?a._aemService.getOrderNumberCookie():"",isWYSIWYGEnabled:o,channel:i?"dug"===i.toString()?"pickup":i:a._userInfoService.getUserChannel(),erumsStore:!0,cartPrice:r,cartQty:s}
1);return e.hasOwnProperty("isMTOOrder")&&(u.isMTOOrder=e.isMTOOrder,u.isMTOOrder&&(u.mtoMaxPrepTime=e.mtoMaxPrepTime)),u}updateCartIdFromResponse(e){e&&Object.keys(e).length>0?this.setCartIdObjV2("cartId",e):this.invalidateCartId()}invalidateCartId(){this._commonService.removeCartId("cartId")}generateApiUrl(e,t=!1,i,n,r){let s=this._utilService.getParams("mode"),a=this.config[this.currentEnv]?.wiremockAPIDetails,o=this.config[this.currentEnv]?.snsConfig?.url,l=this.config[this.currentEnv]?.domsApiDetails?.url,c="weeklyAd"===i?.programType?this.config[this.currentEnv]?.baseURL?.replace("{banner}",this._userInfoService.getBanner()):"",d="",u=()=>n?this.guestCartUrl+"cart/":this.cartUrl,p=()=>"preferences"===e||r?`${this.guestCartUrl}${e}`:`${this.guestCartUrl}cart/${e}`;if(a?.allowWiremockService){let r=a.recorderBaseUrl,c=a.playbackBaseUrl,h="",f="";if("1P_SNS"===i?.programType)h=`${r}${o}${e}`,f=`${c}${o}${e}`;else if("1P_OA"===i?.appName)h=`${r}${l}${e}`,f=`${c}${l}${e}`;else{let t=u();h=`${r}${t}${e}`,f=`${c}${t}${e}`}d="record"===s?t?`${r}${this.cartEditOrderUrl}${e}`:h:"playback"===s?t?`${c}${this.cartEditOrderUrl}${e}`:f:t?`${this.cartEditOrderUrl}${e}`:"1P_SNS"===i?.programType?`${o}${e}`:"1P_OA"===i?.appName?`${l}${e}`:n?p():`${this.cartUrl}${e}`}else d=t?`${this.cartEditOrderUrl}${e}`:"1P_SNS"===i?.programType?`${o}${e}`:"1P_OA"===i?.appName?`${l}${e}`:n?p():`${this.cartUrl}${e}`;return c?c+d:d}addOrUpdateProductQuantity(e,t,i,n,r,s=!1,a,o,l=!1,c=null,d,u=!1){let p,m="",g=!!this._commonService.checkPendingOrder();if("1P_OA"===o?.appName){let t=this._commonService.orderAmendsCurrentOrderData;if(this._commonService.isEmpty(t))return mi((()=>new Error("No current order data available")));p=this.getRequestPayloadForOrderAmendsOTA({product:e,currentOrderData:t,quantity:i,isLBProduct:s}),m=this.generateApiUrl("/manageOrderItem",!1,o,l)}else{let r;if(n)r=i;else{let e={itemId:t,[s?"selectedWeight":"qty"]:i};if(c?(c.modifierOptionUPCs&&c?.modifierOptionUPCs?.upcs?.length>0&&(e.modifierOptionUPCs=c.modifierOptionUPCs.upcs),c.entryId&&(e.entryId=c.entryId),c.comments&&(e.comments=c.comments),c.options&&c.options.length>0&&(e.options=c.options)):d&&(e.entryId=d),u&&(e.selectedItem=!0),!this._commonService.isEmpty(a)){let{isChecked:t,selectedFrequency:i,isFirstTimeSnsSub:n}=a;switch(t){case!0:e=f(h({},e),{isFirstTimeSnsSub:n,isSnsSub:!0,snsFrequency:{unit:"WEEK",count:i}});break;case!1:e=f(h({},e),{isSnsSub:!1})}}r=[e]}p=g?JSON.stringify(h(h(h({[s?"selectedWeight":"quantity"]:i,isCustomizable:e?.isCustomizable,multiCustomizations:e?.multiCustomizations,isMtoProduct:e?.isMtoProduct},c&&c.entryId||!c&&d?{entryId:c?c.entryId:d}:{}),c?.comments&&{comments:c.comments}),c?.modifierOptionUPCs?.upcs?.length?{options:c.modifierOptionUPCs.upcs.map((e=>({upcId:e})))}:c?.options?.length?{options:c.options}:[])):this.getRequestPayLoad(o?.programType,r,l);let b="",y=this._userInfoService.getUUID()??"";if(g){b=`${this._aemService.getOrderStoredIdCookie()}/${this._aemService.getOrderNumberCookie()}/${this.orderItemsUrl}/${t}`}else b="1P_SNS"===o?.programType?`/${y}/oneTimeItems`:this.itemsUrl;m=this.generateApiUrl(b,g,o,l)}return this._http.post(m,p,h(h({},this.getHeaders(this._utilService.getParams("mode"),o,l,u)),this.getParams(r,g,o,"","","",l))).pipe(bi((t=>{if("1P_OA"===o?.appName){if(t&&!this._commonService.isEmpty(this._commonService.orderAmendsCurrentOrderData?.orderItems))return this.refreshOrderAmendsOTAOrderData({product:e,quantity:i}),t;$i((e=>this.handleError(e,o?.appName)))}return this.transformMulticartResponse(t)})),$i((e=>this.handleError(e,o?.appName?o?.appName:o?.programType))))}refreshOrderAmendsOTAOrderData({product:e,quantity:t}){if(this._commonService.isEmpty(e))return;let i=this.getOrderItem(e,t),n=this._commonService.orderAmendsCurrentOrderData.orderItems.findIndex((t=>t.bpnNum===e.id));n>=0?this._commonService.orderAmendsCurrentOrderData.orderItems[n]=h(h({},this._commonService.orderAmendsCurrentOrderData.orderItems[n]),i):this._commonService.orderAmendsCurrentOrderData.orderItems.push(f(h({},i),{isNewlyAdded:!0}))}getOrderItem(e,t){return this._commonService.isEmpty(e)?{}:{itemName:e.name,itemDescription:e.name,itemCode:e.upc,quantity:t??0,quantityType:e.unitQuantity,itemTotal:(e.price*t).toFixed(2),bpnNum:e.id,isRestrictedItem:2===e.restrictedValue,currency:"USD",isReplenishItem:!1,isArProduct:e.isArProduct,displayType:e.dis
1playType,orderedWeight:t,sellByWeightIndicator:e.sellByWeight,pickStatus:"IN_PROGRESS"}}getRequestPayloadForOrderAmendsOTA({product:e,currentOrderData:t,quantity:i,isLBProduct:n}){if(this._commonService.isEmpty(e))return{};let r=t?.orderItems?.find((t=>t.bpnNum===e.id)),s=!this._commonService.isEmpty(r)&&!r.isNewlyAdded,a={orderNumber:t?.orderId,fulfillmentOrderNumber:t?.orderId+"011",storeNumber:t?.storeNumber,versionNumber:1,requestedTs:(new Date).toISOString()};return s?a.items=[{itemId:e.id,source:"PXP",actionCode:"UPDATE"}]:(a.items=[{itemId:e.id,itemDescription:e.name,itemCode:e.upc,basePrice:e.basePrice,price:e.price,pricePer:e.pricePer,sellByWeight:e.sellByWeight,restrictedValue:e.restrictedValue,snapEligible:e.snapEligible,itemSizeQty:e.itemSizeQty??e.dispItemSizeQty,displayType:e.displayType,unitOfMeasure:e.unitOfMeasure,itemPackageQty:e.itemPackageQty??e.dispItemPackageQty,isArProduct:e.isArProduct,isMtoProduct:e.isMtoProduct,basePricePer:e.basePricePer,source:"PXP",actionCode:"ADD",department:{id:e.idOfDepartment,name:e.departmentName},aisle:{id:e.aisleId,name:e.aisleName},shelf:{id:e.idOfShelf,name:e.shelfName}}],null!=e.alcoholVolumePct&&(a.items[0].alcoholVolumePct=e.alcoholVolumePct),null!=e.containsAlcohol&&(a.items[0].containsAlcohol=e.containsAlcohol)),n?(a.items[0].orderedWeight=i,a.items[0].orderedQuantity=1,a.items[0].minWeight=e.minWeight):a.items[0].orderedQuantity=i,a}getRequestPayLoad(e="abs",t,i,n){let r,s="",a="",o=this.getCartDetail()?.guestCartId??"",l="B"===this._userInfoService.getSiteType();if(i&&"preferences"===n)return{preferenceList:[{cartCategory:"1P",guestCartId:o}]};l&&"1P_B2B"===e?(s=e,a=this._userInfoService.getShopStoreId()):(s="1P_WINE",a=this._userInfoService.getWfcStoreId());let c=[],d={cartCategory:s,storeId:a};return c=[d],t?(r={preferenceList:c,cartItemsList:t},("1P_SNS"===e||i)&&delete r.preferenceList,r.cartCategory="wineshop"===e?s:i?"1P":e||""):((i||o)&&(c=[f(h({cartCategory:"1P"},this._userInfoService.isAuthorized()&&{storeId:this._userInfoService.getShopStoreId()}),{guestCartId:o}),d]),r={preferenceList:c}),r}removeProduct(e,t,i,n,r=!1,s,a=!1){let o,l=!!this._commonService.checkPendingOrder(),c=[{itemId:t}];s&&(c[0].entryId=s),o=l?null:this.getRequestPayLoad(n?.programType,c,r);let d="",u=this._userInfoService.getUUID()??"";if(l){d=`${this._aemService.getOrderStoredIdCookie()}/${this._aemService.getOrderNumberCookie()}/${this.orderItemsUrl}/${t}`}else d="1P_SNS"===n?.programType?`/${u}/oneTimeItems`:this.itemsUrl;let p=this.generateApiUrl(d,l,n,r);return this._http.request("delete",p,f(h(h({},this.getHeaders(this._utilService.getParams("mode"),n,r,a)),this.getParams(i,l,n,"","","",r)),{body:o})).pipe(bi((e=>this.transformMulticartResponse(e))),$i((e=>this.handleError(e,n?.appName?n?.appName:n?.programType))))}updateCartSummary(e){return this.mapErumsItems(e.cartItems)}getParams(e=null,t,i,n,r,s,a,o){if(!t){if("1P_SNS"===i?.programType)return{params:{banner:this._userInfoService.getBanner()}};if("1P_OA"===i?.appName)return{params:{}};r=r||("dug"===this._userInfoService.getPreference().toLowerCase()?"Dug":"Delivery");let t={storeId:n||this._userInfoService.getShopStoreId(),serviceType:r};if(t.zipCode=s||this._userInfoService.getShopZipcode(),a){let e=this.getCartDetail();return"preferences"!==o&&(t.guestCartId=e?.guestCartId??""),{params:t}}e&&(t.sellerId=e);let l="1P,3P_MARKETPLACE,1P_Wine";return l="B"===this._userInfoService.getSiteType()?this._commonService.getB2BCartList()??"1P_B2B":this._commonService.getCartList()??l,t.cartCategoryList=l,{params:t}}}handleResponseForPendingOrder(e){if(this._commonService.checkPendingOrder()&&!this._aemService.getEditOrderOldVersion()){let t=h({},e);return t.hasOwnProperty("orderSummary")&&delete t.orderSummary,f(h({},t),{totalAmount:e.orderSummary?e.orderSummary.totalEstimatedPrice:null,subscriptionDetails:e.orderSummary?e.orderSummary.subscriptionDetails:null,totalOfferSavings:e.orderSummary?e.orderSummary.totalSavings:null,payments:e.payments&&e.payments.length?t.payments.map((e=>{let t=e.subType;return delete e.subType,f(h({},e),{subtype:t})})):e.payments,orderSummary:h({},e.orderSummary),isWYSIWYGEnabled:e.isWYSIWYGEnabled,wysiwygOrderSummary:h({},e.wysiwygOrderSummary)})}return e}transformMulticartResponse(e,t,i){let n,r={};if(e.carts&&0!==e.carts.length||e.hasOwnProperty("orderItems")){let s={},a=[];a=e.hasOwnProperty("orderItems")?[h({},e)]:e.carts,a.forEach((e=>{switch(!0){case"ABS"===e.cartSource&&(!e.cartCategory||"1P"===e.cartCategory)||e.hasOwnProperty("orderItems"):let n=this.generateAbsCart(e,t,i);s.abs=n,r.abs=n.cartId;break;case e.cartCategory&&"1P"!==e.cartCategory||e.hasOwnProperty("seller"):let a=e,{cartItemsList:o}=a,l=g(a,["cartItemsList"]),c="";c="3P_MARKETPLACE"===e.cartCategory||e.hasOwnProperty("seller")?e.seller.sellerId:e.cartCategory,s[c]=f(h({},l),{cartItems:o}),r[c]=e.cartId;break;default:console.warn("CART V2: transformMulticartResponse -- Malformed cart response")}})),this.updateCartIdFromResponse(r);let o=this.getV2EmptyCartsLSObj(t,i),{multiCartSummary:l,cart:c}=o,d=g(o,["multiCartSummary","cart"]);if(n=h({cart:s},s.abs?s.abs:h({},d)),!this._commonService.checkPendingOrder()){let t={finalTransactionTotal:e.multiCartSummary.finalTransactionTotal?e.multiCartSummary.finalTransactionTotal:0,totalAvailableCarts:e.multiCartSummary.totalAvailableCarts?e.multiCartSummary.totalAvailableCarts:0,totalAvailableItems:e.multiCartSummary.totalAvailableItems?e.multiCartSummary.totalAvailableItems:0,totalAvailableQuantity:e.multiCartSummary.totalAvailableQuantity?e.multiCartSummary.totalAvailableQuantity:0};n.multiCartSummary=t}}else n=this.getV2EmptyCartsLSObj(),this.updateCartIdFromResponse(r);return n}fetchCartDetailsFromResponse(e,t){return e.cart&&e.cart[t]?e.cart[t]:"abs"===t||"1P_B2B"===t&&this._commonService.checkPendingOrder()?e:(console.warn("Seller cart is not available"),{})}getV2EmptyCartsLSObj(e,t){return{multiCartSummary:{finalTransactionTotal:0,totalAvailableCarts:0,totalAvailableItems:0,totalAvailableQuantity:0},cart:{},cartItems:[],branchId:e||this._aemService.getBranchId(),channel:t?String("dug"===t?"pickup":t):this._aemService.getUserChannel(),orderNumber:this._aemService.getOrderNumberCookie(),erumsStore:!0,cartPrice:0,cartQty:0,isMTOOrder:!1,isWYSIWYGEnabled:!0}}getCartV2(e,t,i){let n="1P_B2B"===t?.programType?t.programType:"wineshop",r=this.getRequestPayLoad(n,void 0,i),s=i?"carts":`customer/${e}`;return this._http.post(this.generateApiUrl(s,!1,t,i,!0),r,h(h({},this.getHeaders(this._commonService.getParams("mode"),t,i)),this.getParams(null,!1,t))).pipe(bi((e=>this.transformMulticartResponse(e))),$i(this.handleError))}handleError(e,t){if("1P_SNS"===t&&this._commonService.dispatchCustomOneTimeEvent("snsOneTime","productQtyUpdateError",{}),!(e.error instanceof ErrorEvent)&&e.error)return console.error(`status: ${e.status}, ${e.statusText}`),mi("Apologies, our site is currently experiencing technical difficulties, please try again later.")}
1getCartName(e,t){let i;switch(!0){case("mkp"===e||"mkp-carousel"===e)&&t?.length>0:i=t;break;case"wineshop"===e:i="1P_WINE";break;case"1P_SNS"===e:case"1P_B2B"===e:i=e;break;default:i="abs"}return i}getCartFullName(e){let t="";if(!0==("1P_WINE"===e))t="Vine and Cellar";return t}getIncrementPriceList(e){let t=this.config[this.currentEnv]?.wiremockAPIDetails,i=this.config[this.currentEnv]?.catalogConfig,n=this._utilService.getParams("mode"),r=i["apim.api.catalog.path"]+i["apim.api.catalog.increment.price.list.endpoint"];t?.allowWiremockService&&("record"===n?r=`${t?.recorderBaseUrl}${r}`:"playback"===n&&(r=`${t?.playbackBaseUrl}${r}`));let s={headers:new jy({"Content-Type":"application/json","ocp-apim-subscription-key":"record"===n||"playback"===n?t?.subscriptionKey:i["apim.api.brand.index.service.key"]})},a=r+`?upcIds=${e}&storeId=${this._userInfoService.getShopStoreId()}`;return this._http.get(a,s).pipe(sn(1))}getCartDetail(){let e=localStorage.getItem("abCart");return e?JSON.parse(e):null}getPrefCustomizations(e,t){if(!e||!t)return void console.error(`getPrefCustomizations: Missing required parameter(s). bpn: ${e}, storeId: ${t}`);let i=this.config[this.currentEnv]?.productsApiDetails,n=this.config[this.currentEnv]?.catalogConfig["apim.api.catalog.path"],r=n+`/product/getPrefCustomizations?bpn=${e}&storeId=${t}`,s={headers:new jy({"Content-Type":"application/json","ocp-apim-subscription-key":i?.subscriptionKey?.value})};return this._http.get(r,s)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(Cw),lr(_w),lr(Sw),lr(Tl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Rw=(()=>{class e{constructor(e,t,i,n,r,s,a){this.configObjFromModule=e,this._http=t,this._commonService=i,this._aemService=n,this._userInfoService=r,this._cartV2Service=s,this._abCart="",this._eventDispatched=!1,this.rightDrawerEvent=new kt,this.$rightDrawerEvent=this.rightDrawerEvent.asObservable(),this.isGuestAddToCartTestValue="a",this.updateStoreForExistingCart=function(e,t,i,n,r,s){this.processStoreUpdateV2(e,t,n,r,s)},this.refreshCart=function(e={},t="abs"){switch(console.log("CART Refresh by: ",e),this.rightDrawerEvent.next({event:"refreshCart",data:e}),!0){case void 0!==e&&e.hasOwnProperty("cart"):case void 0!==e&&Array.isArray(e.cartItems):this._set(e),this.setAriaLiveCart("idAriaCartMsg",e,t);break;case!this._commonService.checkPendingOrder():console.log("REFRESH CART - REMOTE ERUMS CART"),this._loadERUMSRemoteCart();break;default:console.log("REFRESH CART - REMOTE ECOM CART"),this._loadRemoteCart()}},this.mapErumsItems=function(e){return e?e.map((e=>({id:e.itemId,name:e.name,quantity:e.qty,price:e.price,basePrice:e.basePrice,pricePerUnit:e.unitPrice,unitType:e.unitQuantity,totalPrice:e.totalPrice,clubCardSaving:e.clubCardSaving?e.clubCardSaving:0,isAvailable:e.isAvailable?e.isAvailable:"",isFound:e.isFound?e.isFound:"",savings:e.savings?e.savings:[],clipped:e.clipped?e.clipped:[],maxPurchaseQty:e.maxPurchaseQty,departmentName:e.departmentName}))):[]},this.updateCartHeader=(e,t,i)=>{let n=!1;window.SWY&&window.SWY.CONFIGSERVICE?.featureToggleConfig?n=!(window.SWY&&window.SWY.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled):window.SWY.configService?.isNavigationEngineDisabled&&"false"===window.SWY.configService?.isNavigationEngineDisabled&&(n=!0),i&&Object.keys(i).length>0?i?.totalAvailableQuantity?i?.totalAvailableQuantity<=99?($(".badge-icon").removeClass("d-none badge-icon-plus"),$(".badge-text").removeClass("badge-text-plus").text(`${i?.totalAvailableQuantity}`),n&&($(".badge-icon").removeClass("s_badge-icon-plus"),$(".badge-text").removeClass("s_badge-text-plus"))):i?.totalAvailableQuantity>99&&($(".badge-icon").removeClass("d-none").addClass("badge-icon-plus"),$(".badge-text").addClass("badge-text-plus").text("99+"),n&&($(".badge-icon").addClass("s_badge-icon-plus"),$(".badge-text").addClass("s_badge-text-plus"))):($(".badge-text").text(""),$(".badge-icon").addClass("d-none")):e?e<=99?($(".badge-icon").removeClass("d-none badge-icon-plus"),$(".badge-text").removeClass("badge-text-plus").text(`${e}`),n&&($(".badge-icon").removeClass("s_badge-icon-plus"),$(".badge-text").removeClass("s_badge-text-plus"))):e>99&&($(".badge-icon").removeClass("d-none").addClass("badge-icon-plus"),$(".badge-text").addClass("badge-text-plus").text("99+"),n&&($(".badge-icon").addClass("s_badge-icon-plus"),$(".badge-text").addClass("s_badge-text-plus"))):($(".badge-text").text(""),$(".badge-icon").addClass("d-none"))},this._loadCartPrice=function(){let e="0.00",t=0,i=this._get();i.cartPrice&&(e=Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(i.cartPrice)),i.cartQty&&(t=i.cartQty),"J4U"!==this._userInfoService.getPreference().toUpperCase()&&($(".ab-cart a").attr("aria-label",`Shopping Cart, ${t} items, Total ${e}`),this.updateCartHeader(t,e,i.multiCartSummary))},window.cartServiceRefAL={zone:a,service:this},this._commonService._userInfoRefresh.subscribe((e=>{if("initFunc"===e){this.configObj=this.configObjFromModule?this.configObjFromModule:{};let e="B"===this._userInfoService.getSiteType();this.configObj.programType=e?"1P_B2B":this.configObj?.programType,this._init()}}))}_init(){this._aemService.getStoreStatus();let e=this._get();this.isGuestAddToCartABSubscription=this._commonService.isABFlagDisabledEvent$.pipe(nn((e=>"isGuestAddToCartDisabled"===e.flagName))).subscribe((e=>{this.isGuestAddToCart=!("a"===e.testValue||this._userInfoService.isAuthorized()||this.configObj.programType&&"abs"!==this.configObj.programType),this.isGuestAddToCartTestValue=e.testValue})),this._commonService.listenToABXTestingFlag("abACIP295974","isGuestAddToCartDisabled","ACIP295974",300),!this._aemService.isLSCompatible()||!this._lsHasValidErumsData(e)||this._userInfoService.isAuthorized()&&e.guestCartId?("J4U"!==this._userInfoService.getPreference()&&(this._userInfoService.isAuthorized()&&!this._commonService.checkPendingOrder()&&(!this.configObj?.appName||"dnf"!==this.configObj?.appName)&&this._aemService.checkReserveTime(),this._commonService.checkPendingOrderAlert()),this._commonService.checkPendingOrder()||this._loadERUMSRemoteCart()):("J4U"
1!==this._userInfoService.getPreference()&&(this._userInfoService.isAuthorized()&&!this._commonService.checkPendingOrder()&&(!this.configObj?.appName||"dnf"!==this.configObj?.appName)&&this._aemService.checkReserveTime(),this._commonService.checkPendingOrderAlert()),"j4u"!==this._userInfoService.getPreference().toLowerCase()&&(this._commonService._cartObjSource.next(e),this._loadCartPrice())),this.objRefreshInterval&&clearInterval(this.objRefreshInterval),this.objRefreshInterval=setInterval((()=>{console.log("CART - INIIATING THE CART REFRESH"),this._aemService.checkAuthorizedCookie()&&this._aemService.isTokenActive()&&this._aemService.authorize()&&this._aemService.isLSCompatible()&&"J4U"!==this._userInfoService.getPreference()?(console.log("CART - REFRESH CART"),this.refreshCart()):(console.log("CART - TIMER IS NOT REQUIRED"),clearInterval(this.objRefreshInterval))}),9e5)}_loadRemoteCart(){if(this._aemService.authorize()&&this._aemService.checkAuthorizedCookie()){let e=`?rand=${Math.floor(1e6*Math.random())}`,t=this._aemService.getOrderNumberCookie();e+=""!==t&&null!=t?`&id=${t}`:"";let i=this._http.get(`${this._aemService.getMiniCartPath()}${e}`);console.log("CART ANGULAR: INITIATED"),i.subscribe((e=>{if(!e.ack){let i=this._commonService.isEmpty(e.cartSummary.cost)?e.cartSummary.cost:0,n=this._commonService.isEmpty(e.cartSummary.itemsCount)?e.cartSummary.itemsCount:0,r={cartItems:e.cartItems,branchId:this._userInfoService.getShopStoreId(),channel:this._userInfoService.getUserChannel(),orderNumber:t,erumsStore:!1,isWYSIWYGEnabled:e.isWYSIWYGEnabled,cartPrice:i,cartQty:n};e.hasOwnProperty("isMTOOrder")&&(r.isMTOOrder=e.isMTOOrder,r.isMTOOrder&&(r.mtoMaxPrepTime=e.mtoMaxPrepTime)),console.log("CART ANGULAR: RESPONSE RECEIVED",e.cartItems),this._set(r),this._loadCartPrice()}}))}}_loadERUMSRemoteCart(){this.processGetCartV2()}processGetCartV2(){if("a"===this.isGuestAddToCartTestValue&&this._get().guestCartId&&localStorage.removeItem("abCart"),this._aemService.authorize()||this.isGuestAddToCart&&this._get().guestCartId){let e=this._userInfoService.getCustomerId();if(e||this.isGuestAddToCart){let t=this._cartV2Service.getCartV2(e,this.configObj,this.isGuestAddToCart);this.processObsResponse(t)}}}getIntendPreferenceParam(){let e="";switch(this._userInfoService.getUserChannel()){case"pickup":e="&serviceType=DUG";break;case"delivery":e="&serviceType=Delivery&deliveryType="+(!0===this._userInfoService.getUnattendedDeliveryIsEnabled()?"Unattended":"Attended");break;case"instore":e="&serviceType=inStore"}return e}_set(e){e.updatedTime=JSON.stringify(new Date);let t=JSON.stringify(e);if(this._aemService.isLSCompatible()){if(localStorage.setItem("abCart",t),!this._eventDispatched){let e=new Event("cartSavedToLS");document.dispatchEvent(e),this._eventDispatched=!0}if(window.location.href.includes("erums/store/prebook")||window.location.href.includes("erums/cart/dnf")||window.location.href.includes("/product")){let t=new CustomEvent("cartUpdated",{detail:e});document.dispatchEvent(t)}}else this._abCart=t;"j4u"!==this._userInfoService.getPreference().toLowerCase()&&(this._commonService._cartObjSource.next(e),this._loadCartPrice(),window.location.href.includes("view=instantCart")&&this._commonService._updateBiaAddAllBtn.next(!0))}_get(e){let t={},i="";if("j4u"!==(e??this._userInfoService.getPreference().toLowerCase())){i=this._aemService.isLSCompatible()?localStorage.getItem("abCart"):this._abCart;try{if(i)try{t=JSON.parse(i)}catch{t={}}}catch(e){console.error("ERROR: COUPON - GETTING FROM LOCAL STORAGE"),console.error(e)}}return t}_lsValidErumsData(e){let t=!1;if(!this._commonService.isEmpty(e)){this._aemService.getFeatureFlagByNameDisable("isGuestAddToCartDisabled")||this._userInfoService.isAuthorized()||this.configObj.programType&&this.configObj.programType;if(this._commonService.checkPendingOrder()?(t=e.branchId===this._aemService.getOrderStoredIdCookie(),t=e.orderNumber===this._aemService.getOrderNumberCookie()):(t=e.branchId===this._userInfoService.getShopStoreId(),t=e.channel===this._userInfoService.getUserChannel()),t&&!this._commonService.checkPendingOrder())if(void 0!==e.updatedTime){let i=Date.parse(JSON.parse(e.updatedTime));t=(Date.parse(JSON.parse(JSON.stringify(new Date)))-i)/6e4<(this.isGuestAddToCart?14400:15)}else t=!1}return t}_lsHasValidErumsData(e){let t=!1;return this._lsValidErumsData(e)&&(e.erumsStore||this._aemService.authorize()&&this._aemService.checkAuthorizedCookie())&&(t=!0),t}processStoreUpdateV2(e,t,i,n,r){let s=this._get(t);if(this.isGuestAddToCart&&s?.guestCartId||!this.isGuestAddToCart){let s=this._cartV2Service.updateStoreForExistingCartV2(e,t,r,this.isGuestAddToCart);this.processObsResponse(s,i,n)}else"function"==typeof n&&n({ack:!0})}processObsResponse(e,t,i){e.subscribe((e=>{e&&!t&&(this._set(e),this._loadCartPrice()),"function"==typeof i&&i(e)}),(e=>{console.warn("========= CART API FAILED ========",e),this._aemService.invalidateCartId(),this._set(this._cartV2Service.getV2EmptyCartsLSObj()),this._loadCartPrice(),"function"==typeof i&&i({ack:!0})}))}setAriaLiveCart(e,t,i){let n=$(`#${e}`);if(!this._commonService.isEmpty(t?.cart)&&i in t.cart&&t.cart?.[i]?.summary&&t.cart?.[i].summary.itemCount&&t.cart?.[i].summary.finalTransactionTotal&&t.cart?.[i].summary.totalItemQuantity){let e="";e=["1P_WINE"].includes(i)?`${t.cart?.[i].summary.itemCount} products added to your cart from ${this._cartV2Service.getCartFullName(i)}. ${t.cart?.[i].summary.totalItemQuantity} total items in your cart. Estimated total $${t.cart?.[i].summary.finalTransactionTotal}.`:`${t.cart?.[i].summary.itemCount} products added to your cart from ${this._aemService.getBanner()} banner. ${t.cart?.[i].summary.totalItemQuantity} total items in your cart. Estimated total $${t.cart?.[i].summary.finalTransactionTotal}.`,n.html(e)}setTimeout((()=>{n.html("")}),3e3)}processOfferComplete(e,t,i){if(e&&e.isWYSIWYGEnabled&&e.isWYSIWYGEnabled&&e.cartItems){let n,r=e.cartItems;i.id?n=r.find((e=>e.itemId.toString()===i.id.toString())):i.itemId&&(n=r.find((e=>e.itemId.toString()===i.itemId.toString()))),n&&n.savings&&n.savings.length>0?t.forEach((e=>{let t=n.savings.find((t=>t.omsOfferId===e.offerId));e.offerComplete=!(!t||!t.display)})):t.forEach((e=>e.offerComplete=!1))}else t.forEach((e=>e.offerComplete=!1));return t}processBOGOComplete(e,t){if(e&&e.isWYSIWYGEnabled&&e.isWYSIWYGEnabled){if(e&&e.cartItems){let i,n=e.cartItems;if(("M"===t.promoType||"B"===t.promoType)&&this._commonService.isProductPromoActive(t)&&(t.id?i=n.find((e=>e.itemId.toString()===t.id.toString())):t.itemId&&(i=n.find((e=>e.itemId.toString()===t.itemId.toString())))),i){let e=i.savings&&i.savings.length>0?i.savings.find((e=>"CMS"===e.source&&e.linkPluNumber)):{};
1t.offerComplete=!(!e||!e.display)}else t.offerComplete=!1}}else t.offerComplete=!1}getImageUrl(e,t){let i="";return this._commonService.checkPendingOrder()&&this._aemService.getDMTMiniCart()&&e&&e.id?(i=this._aemService.getDMTMiniCart().replace("${product.id}",e.id),i=i.replace("${viewport}",t)):this._aemService.getDMTMiniCart()&&e&&e.itemId&&(i=this._aemService.getDMTMiniCart().replace("${product.id}",e.itemId),i=i.replace("${viewport}",t)),i}loadPendingOrderData(){this._commonService._cartObjSource.next(this._get()),this._loadCartPrice()}static{this.ɵfac=function(t){return new(t||e)(lr("configObj"),lr(ov),lr(Bw),lr(Cw),lr(_w),lr(Mw),lr(Tl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Lw=(()=>{class e{constructor(e,t,i,n,r){this.http=e,this._commonService=t,this._userInfoService=i,this._http=n,this._utilService=r,this.currentEnv="",this.clipDigitalCouponSubject=new kt,this.clipDigitalCouponEvent$=this.clipDigitalCouponSubject.asObservable(),this.config=Iw,this.disableNDC=!1,this.currentEnv=this._commonService.getCurrentEnviorment()}getOffersClipped(e){let t=0;return e.forEach((e=>{("C"===e.status&&!1===e.deleted||!1===e.isClippable)&&t++})),t}getCouponsCompletedCounter(e){let t=0;return e.forEach((e=>{(!1===e.isClippable&&!0===e.offerComplete||"C"===e.status&&!1===e.deleted&&!0===e.offerComplete)&&t++})),t}_checkLocalStorage(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch{return!1}}isCouponExpired(e){let t=new Date,i=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),s=new Date(`${n}/${i}/${r}`),a=parseInt(e.endDate),o=new Date(a),l=o.getDate(),c=o.getMonth()+1,d=o.getFullYear();return new Date(`${c}/${l}/${d}`)<s}clipDigitalCoupon(e){this.clipDigitalCouponSubject.next(e)}clipCoupon(e,t,i,n){let r={headers:new jy({"Content-Type":"application/json",SWY_SSO_TOKEN:this._userInfoService.getSWY_SHOP_TOKEN(),"X-IBM-Client-Id":this.config[this.currentEnv].j4uAPIDetails["X-IBM-Client-Id"],"X-IBM-Client-Secret":this.config[this.currentEnv].j4uAPIDetails["X-IBM-Client-Secret"],"X-SWY_API_KEY":"emjou","X-SWY_BANNER":"safeway","X-SWY_VERSION":"1.0","X-swyConsumerDirectoryPro":this._userInfoService.getSWY_SHOP_TOKEN(),"x-swy-correlation-id":this._commonService.generateUUID()})},s=this.config[this.currentEnv].j4uAPIDetails.clipPath+"?storeId="+this._userInfoService.getShopStoreId();i&&i.bannerDomain&&(s=i.bannerDomain+s);let a=Di((()=>fi({}))),o={};return o=e.deleted?{items:[{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]}:{items:[{clipType:"C",itemId:e.offerId,itemType:e.offerPgm},{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]},a=this.http.post(s,o,r).pipe(bi((t=>{if(console.warn("clip response",t),t&&t.items)if(1==t.items[0].status){e.status="C",e.deleted=!1,this._commonService.clipEcomGalleryCoupon(e.offerId);let t={brand:e.instantAllocation?"welcome-offer-clip":e.brand,offerType:e.offerPgm,offerId:e.offerId,offerPrice:e.offerPrice,carouselSection:window&&window.digitalData&&window.digitalData.productInfo&&window.digitalData.productInfo.carouselSection||""};window&&window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.clipCoupon(t,n)}else if(0==t.items[0].status){$("#errorModal").modal({show:!0});let e="200: Coupon Expired";t.items[0].errorCd&&t.items[0].errorMsg&&(e+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg)}else{$("#errorModal").modal({show:!0});let e="200: Coupon Clip failed - status is not either 0 or 1";t.items[0].errorCd&&t.items[0].errorMsg&&(e+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg)}else{$("#errorModal").modal({show:!0});let e="200: Coupon Clip failed - items is not defined ";t.errorCd&&t.errorMsg&&(e+=" "+t.errorCd+" "+t.errorMsg)}return t})),$i((e=>{console.error("clip error",e);let t=e.status+": Coupon Clip failed";return"object"==typeof e.error&&Array.isArray(e.error.errors)&&e.error.errors.length>0&&(t+=" "+e.error.errors[0].code+" "+e.error.errors[0].msg),null}))),a}unclipCoupon(e){let t={headers:new jy(window.AB.j4uHttpOptions)},i=window.AB.couponUnclipPath,n=Di((()=>fi({}))),r={items:[{id:e.id}]};return n=this.http.post(i,r,t).pipe(bi((t=>{this._commonService.unclipEcomGalleryCoupon(e.referenceId);let i={brand:e.title,offerType:e.itemType,offerId:e.referenceId,offerPrice:e.savingsValue};return window.AB.DATALAYER.unClipCoupon(i),window.SWY.ENFORCEMENTUTILS.updateReInitSite("ecoupon"),t})),$i((e=>{console.error("Unclip error",e);let t=e.status+": Coupon UnClip failed";return"object"==typeof e.error&&Array.isArray(e.error.errors)&&e.error.errors.length>0&&(t+=" "+e.error.errors[0].code+" "+e.error.errors[0].msg),null}))),n}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(_w),lr(ov),lr(Sw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Fw=(()=>{class e{constructor(e,t,i,n,r,s){this.http=e,this._commonService=t,this._userInfoService=i,this._http=n,this._utilService=r,this._aemService=s,this.config=Iw,this.currentEnv="",this.couponUpdated=new Tt({}),this.currentEnv=this._commonService.getCurrentEnviorment()}getOfferDetailData(e,t,i){let n=this._userInfoService.getShopStoreId(),r=this.config[this.currentEnv].offerDetailAPIDetails.offerDetailPath+`?offerId=${e}&storeId=${n}&offerPgm=${t}&includeUpc=y`,s={"Content-Type":"application/json","X-SWY-APPLICATION-TYPE":"web","X-SWY_API_KEY":"emjou","X-SWY_VERSION":"2.1"},a=this.config[this.currentEnv].wiremockAPIDetails;if(a?.allowWiremockService){let e=this._utilService.getParams("mode"),t=a?.subscriptionKey;"playback"===e?(r=a?.playbackBaseUrl+r,s["Ocp-Apim-Subscription-Key"]=t):"record"===e&&(r=a?.recorderBaseUrl+r,s["Ocp-Apim-Subscription-Key"]=t)}this._userInfoService.getSWY_SHOP_TOKEN()&&(s.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let o={headers:new jy(s)};return i&&i.bannerDomain&&(r=i.bannerDomain+r),this._http.get(r,o).pipe(bi((e=>(this._commonService.getIsOfferEligibleBXGY(e)&&(this._commonService.isEmpty(i?.programType)||"abs"===i?.programType)?(this._commonService.bxgyOffer.next({upcList:e.upcList,eligibleUpcList:e.getEligibleUpcList,offerDetail:e.offerDetail,offerProgramType:e.offerProgramType,offerProtoType:e.offerProtoType}),e.upcList?.length?this._commonService.upcs.next(e.upcList):this._commonService.upcs.next(e.getEligibleUpcList)):this._commonService.upcs.next(e.upcList),e))),$i((e=>(this._commonService.upcs.next([]),this._commonService.bxgyOffer.next({}),fi({})))))}getOfferDisclaimerTemplate(e,t){return t&&t.bannerDomain&&(e=t.bannerDomain+e),this._http.get(e,{responseType:"text"})}getCMSOfferData(e,t){let i=this._userInfoService.getShopStoreId(),n=`${this.config[this.currentEnv].offerDetailAPIDetails.upcsByOfferIds}?storeId=${i}&offerId=${e}`;t&&t.bannerDomain&&(n=t.bannerDomain+n);let r={"Content-Type":"application/json;charset=utf-8","X-SWY_API_KEY":"emjou","X-SWY_APP_ID":"emjou","X-SWY-BANNER":"safeway","X-SWY_VERSION":"1.0"};this._userInfoService.getSWY_SHOP_TOKEN()&&(r.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let s={headers:new jy(r)};return this._http.get(n,s).pipe(bi((e=>(this._commonService.upcs.next(this.transformData(e)),e))),$i((e=>(this._commonService.upcs.next([]),fi({})))))}getOfferDetailsDataPzn(e,t,i,n){let r=this.config[this.currentEnv].baseURL;r=r.replace("{banner}",this._userInfoService.getBanner());let s=`${r}${this.config[this.currentEnv].offerDetailAPIDetails.offerDetailsPzn}?storeId=${t}&offerId=${e}&includeUpc=y&source=${n}`,a={"Content-Type":"application/json;charset=utf-8","X-SWY_API_KEY":"emju","X-SWY_VERSION":"3.0","Ocp-Apim-Subscription-Key":"xyz"};this._userInfoService.getSWY_SHOP_TOKEN()&&(a.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let o={headers:new jy(a)};return this._http.get(s,o).pipe(bi((e=>(e&&e.upcList?this._commonService.upcs.next(e.upcList):this._commonService.upcs.next([]),e))),$i((e=>(this._commonService.upcs.next([]),fi({})))))}transformData(e){return e.offerUPCList.map((e=>e.upcList)).join().split(",")}addToList(e){let t=this.config[this.currentEnv].baseURL;t=t.replace("{banner}",this._userInfoService.getBanner());let i=this._userInfoService.getShopStoreId(),n=t+this.config[this.currentEnv].j4uAPIDetails.clipPath+"?storeId="+i,r={"Content-Type":"application/json;charset=utf-8","X-SWY_API_KEY":"emjou","X-SWY_VERSION":"2.0"};this._userInfoService.getSWY_SHOP_TOKEN()&&(r.SWY_sso_token=`${this._userInfoService.getSWY_SHOP_TOKEN()}`,r.Swyconsumerdirectorypro=`${this._userInfoService.getSWY_SHOP_TOKEN()}`);let s={headers:new jy(r)};return this._http.post(n,e,s).pipe(bi((e=>e)))}removeFromList(e){let t=this.config[this.currentEnv].baseURL;t=t.replace("{banner}",this._userInfoService.getBanner());this._userInfoService.getShopStoreId();let i=t+this.config[this.currentEnv].j4uAPIDetails.unclipPath,n={"Content-Type":"application/json;charset=utf-8","X-SWY_API_KEY":"emjou","X-SWY_VERSION":"1.2","X-SWY_BANNER":"safeway"};this._userInfoService.getSWY_SHOP_TOKEN()&&(n.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let r={headers:new jy(n)};
1return this._http.post(i,e,r).pipe(bi((e=>e)))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(_w),lr(ov),lr(Sw),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Nw=(()=>{class e{constructor(e,t,i,n){this._http=e,this._userInfoService=t,this._aemService=i,this._commonService=n,this._config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment()}getTotalOffersCompleted(e,t){let i=0;return e.forEach((e=>{("C"===e.status&&1==e.offerComplete||!1===e.isClippable&&1==e.offerComplete)&&i++})),1==t.offerComplete&&i++,i}getOffersByUpc(e){let t=this._userInfoService.getShopStoreId(),i=[e],n={"Content-Type":"application/json","X-SWY-APPLICATION-TYPE":"web","X-SWY_API_KEY":"emjou","X-SWY_VERSION":"3.0"},r=this._config[this.currentEnv].baseURL.replace("{banner}",this._userInfoService.getBanner());r+=this._config[this.currentEnv].offerDetailAPIDetails.offersByUpcPath+"?storeId="+t+"&offerPgm=CC-PD",this._userInfoService.getSWY_SHOP_TOKEN()&&(n.Authorization=`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`);let s={headers:new jy(n)};return this._http.post(r,i,s).pipe($i((e=>mi(new Error("Error in getting offers by upc")))))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(_w),lr(Cw),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Uw=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._userInfoService=t,this._commonService=i,this._aemService=n,this._utilService=r,this.arSubscriptionList={isLoaded:!1,isCheckboxFirstTimeChecked:!1,showHeaderTooltip:!1},this.isArEnable=!1,this.subscription=new Ye,this.currentEnv="",this.snsApiBasepath=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.SWY.CONFIGSERVICE.wcaxXapiConfig["sns.arauthorize.basepath"]:"",this.snsApiSubKey=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.SWY.CONFIGSERVICE.wcaxXapiConfig["sns.arservice.apim.subkey"]:"",this.snsApi=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.SWY.CONFIGSERVICE.wcaxXapiConfig["sns.arservice.all.endpoint"]:"",this.snsApiSubKeyHeader=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.SWY.CONFIGSERVICE.wcaxXapiConfig["sns.arservice.apim.subkeyHeader"]:"",this.snsApiContentTypeHeader=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.SWY.CONFIGSERVICE.wcaxXapiConfig["sns.arservice.apim.contentTypeHeader"]:"",this.httpOptions={headers:new jy({})},this.currentEnv=this._commonService.getCurrentEnviorment(),this._aemService.isArFlagLoaded()?(this.isArEnable=this._aemService.getArFlag()?.display,this.isArEnable?this.get
1SubscriptionsInfo():this._commonService.arSubscriptions.next({})):this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{let t=e&&e.detail&&e.detail.arFlag;t&&(this.isArEnable=t.display),this.isArEnable?this.getSubscriptionsInfo():this._commonService.arSubscriptions.next({})})))}getArSubscriptions(){return this.arSubscriptionList}getKeyValuePairSubs(e){let t={};for(let i in e)t[e[i].productId?e[i].productId:e[i].productBpn]=e[i];return t}setArSubscription(e){null!=e&&"object"==typeof e?(this.arSubscriptionList.arSavedTime=this.getArSavedTime(),this.arSubscriptionList.isLoaded=!0,this.arSubscriptionList.isCheckboxFirstTimeChecked=!1,this._commonService.showHeaderTooltip.subscribe((e=>{this.arSubscriptionList.showHeaderTooltip=1==e})),this.arSubscriptionList.customerId=e.customerId?e.customerId:e.customerUUID,this.arSubscriptionList.fulfillmentType=e.fulfillmentType,this.arSubscriptionList.subscribedItems=this.getKeyValuePairSubs(e.subscribedItems?e.subscribedItems:e.itemsSubscribed),e.hasOwnProperty("snsFrequencies")&&(this.arSubscriptionList.snsFrequencies=e.snsFrequencies),e.hasOwnProperty("isNewSnSUser")&&(this.arSubscriptionList.isNewSnSUser=e.isNewSnSUser),e.hasOwnProperty("fulfillment")&&(this.arSubscriptionList.fulfillment=e.fulfillment),this._setSubscriptionsToLS(this.arSubscriptionList),this._commonService.arSubscriptions.next(this.arSubscriptionList)):this._commonService.arSubscriptions.next({})}getArSavedTime(){return Date.now()+9e5}fetchArSubscriptions(){let e=this._userInfoService.getUUID(),t=h({},this.httpOptions);if(t.headers=t.headers.set(this.snsApiSubKeyHeader,this.snsApiSubKey),t.headers=t.headers.set(this.snsApiContentTypeHeader,"application/vnd.safeway.v1+json"),t.headers=t.headers.set("x-swy-correlation-id",this._userInfoService.getUUID()),t.headers=t.headers.set("Authorization",`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`),t.headers=t.headers.set("x-swy-banner",this._userInfoService.getBanner()),t.headers=t.headers.set("x-swy-client-name","safeway"),e&&this.isArEnable){let e=`${this.snsApiBasepath}${this.snsApi}${this._userInfoService.getUUID()}/allsubscriptions?banner=${this._userInfoService.getBanner()}`;this._http.get(e,t).subscribe((e=>{this.setArSubscription(e)}),(e=>{this.setArSubscription(null)}))}}_setSubscriptionsToLS(e){this._utilService.isLSCompatible()&&localStorage.setItem("abNgSubscriptions",JSON.stringify(e))}getSubscriptionsInfo(){if(this._commonService._hasLSArSubscriptions()){let e=localStorage.getItem("abNgSubscriptions");this._commonService.arSubscriptions.next(JSON.parse(e))}else this.fetchArSubscriptions()}buildAndPostAddSubscription(e){let t={},i="",n=h({},this.httpOptions);return n.headers=n.headers.set("x-swy-banner",this._userInfoService.getBanner()),n.headers=n.headers.set("Accept","application/vnd.safeway.v1+json"),n.headers=n.headers.set(this.snsApiContentTypeHeader,"application/json"),n.headers=n.headers.set(this.snsApiSubKeyHeader,this.snsApiSubKey),n.headers=n.headers.set("x-swy-client-name","WEB-PORTAL"),n.headers=n.headers.set("subscriptionSource","pdp"==e.subscriptionSource.toLowerCase()?"pdp":"productcard"),n.headers=n.headers.set("Authorization",`Bearer ${this._userInfoService.getSWY_SHOP_TOKEN()}`),n.headers=n.headers.set("x-swy-correlation-id",this._userInfoService.getUUID()),n.headers=n.headers.set("x-swy-date",(new Date).toUTCString()),t={isNewSnSUser:!1,originationStoreId:this._userInfoService.getShopStoreId(),subscriptionItems:[{productBpn:e.bpn,productUpc:e.upc,quantity:Number(e.quantity),startDateTime:e.startDate,isSubstitutable:!0,productDesc:e?.productTitle,originalPrice:e?.originalPrice?.toString(),frequency:{count:Number(e.frequency),unit:"WEEK"}}]},i=`${this.snsApiBasepath}${this.snsApi}${this._userInfoService.getUUID()}/addsubscription`,this._http.post(i,t,n)}getStaticFrequencyList(){return[{unit:"WEEK",count:1,isDefault:!0,displayFrequency:"week"}]}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(_w),lr(Bw),lr(Cw),lr(Sw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Vw=(()=>{class e{setConfig(e){this._config=h({},e)}isDesignMode(){return this._config&&"themedesigner"===this._config.consumer}constructor(){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),qw=(()=>{class e{constructor(e,t,i,n){this._http=e,this._userInfoService=t,this._commonService=i,this._aemService=n,this.config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment()}getGeneralMillsId(){let e={headers:new jy(this.getPreUcaHttpOptions())},t=this._aemService.getLoyaltyPartnersPath(),i=this._userInfoService.getCustomerId()?this._userInfoService.getCustomerId():"1";return t?.replace("{customerId}",i),this._http.get(t,e)}getPreUcaHttpOptions(){let e=new Date,t=this.config[this.currentEnv]?.datapowerConfig?.cncSubscriptionKey;return{Accept:"application/vnd.safeway.v1+json","X-SWY_BANNER":this._userInfoService.getBanner(),"Ocp-Apim-Subscription-Key":t,"Content-Type":"application/vnd.safeway.v1+json","x-swy-client-id":"web-portal","x-swy-correlation-id":this._commonService.generateUUID(),"x-swy-date":e.toString(),"Cache-Control":"no-cache"}}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(_w),lr(Bw),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),$w=(()=>{class e{constructor(e,t,i,n){this._http=e,this._aemService=t,this._userInfoService=i,this._commonService=n,this.departmentSource=new Tt([]),this.currentDepartment=this.departmentSource.asObservable(),this.brandSource=new Tt([]),this.currentBrand=this.brandSource.asObservable(),this.filterAisleParamSource=new Tt(""),this.currentFilterAisle=this.filterAisleParamSource.asObservable(),this.filterBrandParamSource=new Tt(""),this.currentFilterBrand=this.filterBrandParamSource.asObservable(),this._departments=[],this._brands=[],this._dealsCurrentFilter=new Tt(null),this.dealsCurrentFilter$=this._dealsCurrentFilter.asObservable(),this.objDeals={isDeals:"",apiKey:""},this.config=Iw,this.currentEnv=""}addDepartment(e){let t=encodeURIComponent(e);
1if(0==this.isExist(this._departments,t).length){let i={query:t,text:e};this._departments.push(i),this.departmentSource.next(this._departments)}}addBrand(e){let t=encodeURIComponent(e);if(0==this.isExist(this._brands,t).length){let i={query:t,text:e};this._brands.push(i),this.brandSource.next(this._brands)}}isExist(e,t){return e.filter((function(e){return e.query.toLowerCase().indexOf(t.toLowerCase())>-1}))}addFilterAisleParam(e){this.filterAisleParamSource.next(e)}addFilterBrandParam(e){this.filterBrandParamSource.next(e)}getDealsDepartments(){if(this.currentEnv=this._commonService.getCurrentEnviorment(),"c-bogo"==this.objDeals.isDeals||"c-club-card"==this.objDeals.isDeals){let e={headers:new jy({"ocp-apim-subscription-key":this._aemService.getApimSubscriptionKey()})},t=this.config[this.currentEnv].catalogConfig["apim.api.catalog.path"]+this.config[this.currentEnv].catalogConfig["apim.api.catalog.departments.endpoint"]+"?key="+this.objDeals.apiKey+"&storeId="+this._userInfoService.getShopStoreId();return this._http.get(t,e)}{let e=this._aemService.getDealsFilter()+"?key="+this._aemService.getProductGridPage()+"&storeId="+this._userInfoService.getShopStoreId();return this._http.get(e)}}setCurrentFilterDeals(e){e&&(e=e.replace(/& |,/g,"").replace(/ /g,"-"),this._dealsCurrentFilter.next(e))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(_w),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),jw=(()=>{class e{constructor(e,t){this.utilService=e,this._aemService=t,this.trackedImpressions=[],this.numOfTrackedBottomImpressions=0,this.numOfTrackedTopImpressions=0}createObserver(e,t,i,n){if(this.clearTrackedImpressions(),["product-item-al-v1","product-carousel-item-al-v1","product-item-al-v2","product-carousel-item-al-v2"].includes(e.nodeName.toLowerCase())){let i=new IntersectionObserver((n=>this.handlePCintersect(n,t,e,i)),{root:null,rootMargin:"0px",threshold:.5});i.observe(e)}else if(["product-carousel-al-v1"].includes(e.nodeName.toLowerCase())){new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&n(e,i)}))}),{root:null,rootMargin:"0px",threshold:.5}).observe(e.children[0])}}clearTrackedImpressions(){this.trackedImpressions=[],this.numOfTrackedBottomImpressions=0,this.numOfTrackedTopImpressions=0}handlePCintersect(e,t,i,n){let r=!1;if(e.forEach((e=>{let s=t.adId||t.eventTracking;e.isIntersecting&&s&&this.isImpressionTacked(s)&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&(["product-item-al-v1","product-carousel-item-al-v1","product-item-al-v2","product-carousel-item-al-v2"].includes(i.nodeName.toLowerCase())&&(window.citrusAdTracker(s,"AD_IMPRESSION"),r=t.featured&&t.placementBeacons,console.warn("productCard","AD_IMPRESSION",s)),"top"===t?.eventTracking?.placementType&&this.numOfTrackedTopImpressions++,"bottom"===t?.eventTracking?.placementType&&this.numOfTrackedBottomImpressions++,this.trackedImpressions.push(s),n.unobserve(i))})),r){let e=["product-item-al-v2","product-item-al-v1"].includes(i.nodeName.toLowerCase()),n=t.placementBeacons;e&&(n.placementOnViewBeacon_top||n.placementOnViewBeacon_bottom)?(1===this.numOfTrackedTopImpressions&&(window.citrusAdTracker({beacons:n,disableTracking:t?.disableTracking},"AD_IMPRESSION_PLACEMENT_TOP"),this.numOfTrackedTopImpressions++),1===this.numOfTrackedBottomImpressions&&(window.citrusAdTracker({beacons:n,disableTracking:t?.disableTracking},"AD_IMPRESSION_PLACEMENT_BOTTOM"),this.numOfTrackedBottomImpressions++)):this.trackedImpressions.length<2&&window.citrusAdTracker({beacons:n,disableTracking:t?.disableTracking},"AD_IMPRESSION_PLACEMENT")}}isImpressionTacked(e){return!this.trackedImpressions.includes(e)||"object"==typeof e&&void 0===this.utilService.nativeFind(this.trackedImpressions,e)}static{this.ɵfac=function(t){return new(t||e)(lr(Sw),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),zw=(()=>{class e{initRules(){return{"a-z":{field:"name",rule:[{field:"name",direction:-1,type:"string"}],label:"Alphabetical A - Z",sort_at:"client"},"a-z-description":{field:"description",rule:[{field:"description",direction:-1,type:"string"}],label:"Alphabetically",sort_at:"client"},"z-a":{field:"name",rule:[{field:"name",direction:-1,type:"string"}],label:"Alphabetical Z - A",sort_at:"client"},"search-rank":{field:"searchRank",rule:[{field:"searchRank",direction:-1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Search Ranking",sort_at:"client"},"most-popular":{field:"salesRank",rule:[{field:"salesRank",direction:1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Most Popular",sort_at:"client"},"price-low-high":{field:"price",rule:[{field:"price",direction:1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Price - Low to High",sort_at:"client"},"purchase-history":{field:"purchaseRank",rule:[{field:"purchaseRank",direction:-1,type:"string"}],label:"Purchase History",sort_at:"client"},"new-offers":{field:"arrivalRank",rule:[{field:"arrivalRank",direction:1,type:"string"}],label:"New Offers",sort_at:"client"},"about-to-expire":{field:"expiryRank",rule:[{field:"expiryRank",direction:1,type:"string"}],label:"About to Expire",sort_at:"client"},category:{field:"categoryId",rule:[{field:"categoryId",direction:1,type:"string"}],label:"Category",sort_at:"client"},"expiry-date":{field:"endDate",rule:[{field:"endDate",direction:1,type:"string"}],label:"Expiry Date",sort_at:"client"},"added-date":{field:"addedDate",rule:[{field:"addedDate",direction:1,type:"string"}],label:"Added Date",sort_at:"client"},"reward-card-specials":{field:"promoDescription",rule:[{field:"promoDescription",direction:-1,type:"custom",callback:(e,t)=>this.isPromoMatch(e[t.field])?"AAA":"ZZZ"},{field:"name",direction:-1,type:"string"}],label:this._commonService.getPromoDescription(),sort_at:"client"},aisles:{field:"groupByTemplate",rule:[],label:"Aisles",sort_at:"client"},aisles_departmentName:{field:"departmentName",rule:[{field:"departmentName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},aisles_aisleName:{field:"aisleName",rule:[{field:"aisleName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"}
1,aisles_shelfName:{field:"shelfName",rule:[{field:"shelfName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},"bloomreach-top-sellers":{field:"salesRank+asc",rule:null,label:"Top sellers",sort_at:"server"},"bloomreach-price-low-high":{field:"price+asc",rule:null,label:"Price low to high",sort_at:"server"},"bloomreach-best-match":{field:"",rule:null,label:"Best Match",sort_at:"server"},"bloomreach-club-card":{field:"promoType+asc",rule:null,label:this._commonService.getPromoDescription(),sort_at:"server"},aisles_coupons:{field:"purchaseInd",rule:[{field:"purchaseInd",direction:-1,type:"string"}],label:"Type of Coupons",sort_at:"client"},FREQUENCY:{field:"FREQUENCY",rule:null,label:"Frequently Purchased",sort_at:"server"},PURCHASE_DATE:{field:"PURCHASE_DATE",rule:null,label:"Purchase Date",sort_at:"server"},RECOMMENDED:{field:"RECOMMENDED",rule:null,label:"Recommended",sort_at:"server"},RECENTLY_PURCHASED:{field:"PURCHASE_DATE",rule:null,label:"Recently Purchased",sort_at:"server"}}}isPromoMatch(e){let t=this._commonService.getPromorulesArray();if(!t||0===t.length)return!1;let i=!1;return t.forEach((function(t){e&&e.length>0&&e.match(t.rule)&&(i=!0)})),i}constructor(e){this._commonService=e,this.sorts=new Array,this.rules=this.initRules(),this.available=window.AB.availableSorts||[],this.hasSort()&&this.generate()}setAvailableSort(e){this.available=e}getDefaultSort(){return this.default||(this.available.filter((e=>"a-z"===e)).length>0?this.default=this.getSortByName("a-z"):this.default=this.available[0]?this.getSortByName(this.available[0]):this.getSortByName("a-z")),this.default}getDefaultSortForConfigurableSort(e){return this.available.filter((t=>t===e)).length>0?this.default=this.getSortByName(e):this.default=this.available[0]?this.getSortByName(this.available[0]):this.getSortByName(e),this.default}hasSort(){return!!this.available.length}getSortByName(e){return this.rules[e]}getSortOptions(e){let t=[];return e&&e.split(",").forEach(((e,i)=>{let n=this.getSortByName(e.trim());n&&t.push(new yw(n))})),t}getDPGSortOptions(e){let t=[];return e&&e.forEach((e=>{let i={field:e.attribute,rule:null,label:e.name,sort_at:"server",selected:e?.defaultValue};
1i&&t.push(new yw(i))})),t}getSorts(){return this.sorts}sort(e,t){let i=e&&e.rule?e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})):"",n=e&&e.rule?e.rule.map((e=>1===e.direction?"asc":"desc")):"";return bw.sortBy(t,i,n)}couponsSort(e,t){let i=e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})),n=e.rule.map((e=>1===e.direction?"asc":"desc"));return bw.sortBy(t,i,n)}generate(){0!==this.available.length&&(this.sorts=[],this.available.forEach(((e,t)=>{let i=this.rules[e];if(i){if("groupByTemplate"===i.field){let e="aisles_"+window.AB.headerType;i.rule=this.rules[e]?this.rules[e].rule:""}this.sorts.push(new yw(i)),void 0===this.default&&e===window.AB.defaultSort&&(this.default=i)}})))}static{this.ɵfac=function(t){return new(t||e)(lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Ww=(()=>{class e{constructor(){this.onLoadFirstPage$=new Tt(1),this.pageNumber=1,this.numberOfItems=6,this.pageByScroll$=Li(window,"scroll").pipe(bi((()=>window.scrollTo(0,0))),qi((function(e){let t=document.querySelector("loading-spinner");return!!("number"==typeof e&&t&&t instanceof HTMLElement)&&e>=t.offsetTop-window.innerHeight})),Qi(),zi(200),bi((()=>(this.pageNumber++,this.pageNumber)))),this.pageToLoad$=Vi(this.onLoadFirstPage$,this.pageByScroll$).pipe(Qi()),this.backToTopScroll$=Li(window,"scroll").pipe(zi(500),bi((()=>window.scrollY)))}getNumberOfItems(){return this.numberOfItems}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Hw=(()=>{class e{constructor(){this.loaderSubject=new kt,this.loaderState=this.loaderSubject.asObservable()}show(){this.loaderSubject.next({show:!0})}hide(){this.loaderSubject.next({show:!1})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Yw=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this.commonService=t,this.utilService=i,this._userInfoService=n,this.aemService=r,this.config=Iw,this.currentEnv="",this.GALLERY_API="",this.SUBSCRIPTION_API="",this.HTTP_OPTIONS={},this.p13nApi=window.SWY.CONFIGSERVICE?.wcaxXapiConfig?window.location.origin+window.SWY.CONFIGSERVICE.wcaxXapiConfig["p13n.loyaltyCarousel.basePath"]:"",this.additionalCouponsAmount=10,this.objCoupons={},this.instantEventName=window.AB.COMMON.getURLParameterByName("eventName"),this.instantEventDateTime=window.AB.COMMON.getURLParameterByName("eventDateTime"),this.instantCorrelationId=window.AB.COMMON.getURLParameterByName("eventCorrelationId"),this.isDataCached=!1,this.rewardProtoTypes=["REWARDS_FLAT","REWARDS_ACCUMULATION"],this.instantAllocationReqBody={},this.defaultModUnitImage={src:null,alt:null,openNewTab:null,dataSrc:null,target:null},this.isBonusPathPage=!1,this._companionGalleryOfferPOST=new kt,this.listenCompanionGalleryOfferPOST$=this._companionGalleryOfferPOST.asObservable(),this.onCouponsAndDealsPageReload=!1,this.isMockP13nCarouselDataEnabled=!1,this.additionalResponseCount=0,this.mockInitialResponse=[{offerId:"44770823",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950273756",description:"Postman $0.66 when you buy 1 Postman Any variety.",startDate:"1645988400000",endDate:"1735585200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/20f7e4d5-08e7-4714-886b-779cd6464eb3.gif",limits:"O",name:"ALEN Pinalen",brand:"ALEN Pinalen",offerPgm:"MF",offerPrice:"$0.96 OFF",offerSubPgm:"09",offerTs:"1668557706000",purchaseInd:"L",purchaseRank:"39",status:"C",usageType:"O",arrivalRank:"39",expiryRank:"39",companionOfferIds:[],disclaimer:"Test Legal stuff goes here",deleted:!0,imageId:"20f7e4d5-08e7-4714-886b-779cd6464eb3",extlOfferId:"22238-27024-20",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"48407035",categoryType:"Personal Care & Health",category:"Personal Care & Health",clipTs:"1705950245604",description:"$3.00 OFF when you buy TWO(2) Gillette Razor/Blade Refill Valid on Gillette Razor OR Blade Refill 4 ct or larger. Items must appear on the same receipt.",startDate:"1685728800000",endD
1ate:"1717178400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4.gif",limits:"O",name:"Gillete",brand:"Gillete",offerPgm:"MF",offerPrice:"$3.00 OFF",offerSubPgm:"09",offerTs:"1687542958000",offerProgramType:"MUST_BUY",offerProtoType:"MUST_BUY",purchaseInd:"L",purchaseRank:"48",status:"C",usageType:"O",arrivalRank:"48",expiryRank:"48",companionOfferIds:[],disclaimer:"Legal Description",deleted:!0,imageId:"d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4",extlOfferId:"00123-47400-19",hierarchies:{categories:["Personal Care & Health"],events:[]},etag:"default"},{offerId:"49237635",categoryType:"Dairy, Eggs & Cheese",category:"Dairy, Eggs & Cheese",clipTs:"1705950329002",description:"P13N-BIA",startDate:"1679940000000",endDate:"1711908000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"O",name:"Buy 1 Get 1",brand:"Buy 1 Get 1",offerPgm:"SC",offerPrice:"Buy 1 Get 1",offerSubPgm:"02",offerTs:"1679958107000",offerProgramType:"BUYX_GETX",offerProtoType:"BUYX_GETX",purchaseInd:"L",purchaseRank:"18",status:"C",usageType:"O",arrivalRank:"18",expiryRank:"18",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"49237635-D",hierarchies:{categories:["Dairy, Eggs & Cheese","Frozen Foods"],events:[]},etag:"default"},{offerId:"50043380",categoryType:"Beverages",category:"Beverages",clipTs:"1705950312700",description:"Free Pepsi Drink when you buy THREE(3) Pepsi Drink Any variety. Items must appear on the same receipt.",startDate:"1646161200000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free Pepsi Drink",offerSubPgm:"09",offerTs:"1656499966000",purchaseInd:"L",purchaseRank:"22",status:"C",usageType:"O",arrivalRank:"22",expiryRank:"22",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-23322-03",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"50043586",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1705950277345",description:"Free Tostitos Salsa when you buy ONE(1) Tostitos Chips Any variety.",startDate:"1654106400000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/20f7e4d5-08e7-4714-886b-779cd6464eb3.gif",limits:"O",name:"Tostitos",brand:"Tostitos",offerPgm:"MF",offerPrice:"Free Tostitos Salsa",offerSubPgm:"09",offerTs:"1658934698000",purchaseInd:"L",purchaseRank:"35",status:"C",usageType:"O",arrivalRank:"35",expiryRank:"35",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"20f7e4d5-08e7-4714-886b-779cd6464eb3",extlOfferId:"00219-23222-01",hierarchies:{categories:["Cookies, Snacks & Candy"],events:[]},etag:"default"},{offerId:"50044189",categoryType:"Beverages",category:"Beverages",clipTs:"1705950311494",description:"Free Pepsi Drink when you buy THREE(3) Pepsi Drink Any variety. Items must appear on the same receipt.",startDate:"1646161200000",endD
1ate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free Pepsi Drink",offerSubPgm:"09",offerTs:"1656500085000",purchaseInd:"L",purchaseRank:"23",status:"C",usageType:"O",arrivalRank:"23",expiryRank:"23",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-23322-00",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"50044195",categoryType:"Beverages",category:"Beverages",clipTs:"1705950306020",description:"Free Pepsi Drink when you buy THREE(3) Pepsi Drink Any variety. Items must appear on the same receipt.",startDate:"1646161200000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free Pepsi Drink",offerSubPgm:"09",offerTs:"1656500214000",purchaseInd:"L",purchaseRank:"24",status:"C",usageType:"O",arrivalRank:"24",expiryRank:"24",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-23322-05",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"50044386",categoryType:"Beverages",category:"Beverages",clipTs:"1705950304944",description:"Free Pepsi Drink when you buy THREE(3) Pepsi Drink Any variety. Items must appear on the same receipt.",startDate:"1646161200000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free Pepsi Drink",offerSubPgm:"09",offerTs:"1656500117000",purchaseInd:"L",purchaseRank:"25",status:"C",usageType:"O",arrivalRank:"25",expiryRank:"25",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-23322-06",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"54078384",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950272166",description:"Postman 22 $0.66 when you buy 1 Postman Any variety.",startDate:"1645988400000",endDate:"1735585200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/20f7e4d5-08e7-4714-886b-779cd6464eb3.gif",limits:"O",name:"ALEN Pinalen",brand:"ALEN Pinalen",offerPgm:"MF",offerPrice:"$0.96 OFF",offerSubPgm:"09",offerTs:"1669295601000",purchaseInd:"L",purchaseRank:"40",status:"C",usageType:"O",arrivalRank:"40",expiryRank:"40",companionOfferIds:[],disclaimer:"Test Legal stuff goes here",deleted:!0,imageId:"20f7e4d5-08e7-4714-886b-779cd6464eb3",extlOfferId:"22238-27024-23",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"54682067",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950263927",description:"Test Cancel $2.59 OFF Huggies Baby Wipes 1X when you buy ONE(1) Huggies Little Movers or Little Snugglers Diapers Valid on Giga Pack (44 - 72 ct.).",startDate:"1670007600000",endD
1ate:"1717178400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/a8daa138-26e6-4d17-a054-0220a8892bce.gif",limits:"O",name:"Huggies",brand:"Huggies",offerPgm:"MF",offerPrice:"$2.59 OFF Huggies Baby Wipes 1X",offerSubPgm:"09",offerTs:"1688756795000",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"44",status:"C",usageType:"O",arrivalRank:"44",expiryRank:"44",companionOfferIds:[],disclaimer:"Reproduction, alteration, proliferation, or sale of this coupon or its contents is strictly prohibited. Civil and criminal penalties up to $2,000,000 and/or imprisonment may apply. CONSUMER: LIMIT ONE (1) COUPON PER PURCHASE on product/quantity specified. Only 1 coupon per product purchased CANNOT BE COMBINED with any other coupon. Any other use constitutes fraud. VOID IF COPIED, SCANNED, TRANSFERRED, MODIFIED, AUCTIONED, PURCHASED OR SOLD. No cash or credit in excess of shelf price after discounts may be returned to consumer or applied to the transaction. CIC® Member Coupon Integrity Program. RETAILER: K-C will reimburse you the face value of this coupon plus $.08 handling if submitted in compliance with our Coupon Redemption Policy. Mail coupons or requests for Policy to: Kimberly-Clark 1112, P.O. Box 880001, El Paso, TX 88588-0001. Void where prohibited or restricted. Cash value 1/100 cent. Valid only in the USA, its Territories and Possessions. ® Registered Trademark and TM Trademark of Kimberly-Clark Worldwide, Inc. © KCWW.",deleted:!0,imageId:"a8daa138-26e6-4d17-a054-0220a8892bce",extlOfferId:"17546-201072-15",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"56869509",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1705950276480",description:"Free Tostitos Salsa when you buy ONE(1) Tostitos Chips Any variety.",startDate:"1654106400000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/90174cad-c248-452d-9b8a-63e44af82962.gif",limits:"O",name:"Tostitos",brand:"Tostitos",offerPgm:"MF",offerPrice:"Free Tostitos Salsa",offerSubPgm:"09",offerTs:"1662509989000",purchaseInd:"L",purchaseRank:"36",status:"C",usageType:"O",arrivalRank:"36",expiryRank:"36",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"90174cad-c248-452d-9b8a-63e44af82962",extlOfferId:"00219-23222-02",hierarchies:{categories:["Cookies, Snacks & Candy"],events:[]},etag:"default"},{offerId:"57365527",categoryType:"International Cuisine",category:"International Cuisine",clipTs:"1705950281885",description:"Free New Pepsi when you buy TWO(2) New Pepsi Any variety. Items must appear on the same receipt.",startDate:"1669662000000",endDate:"1732820400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free New Pepsi",offerSubPgm:"09",offerTs:"1670260206000",purchaseInd:"L",purchaseRank:"30",status:"C",usageType:"O",arrivalRank:"30",expiryRank:"30",companionOfferIds:[],disclaimer:"CONSUMER: LIMIT ONE (1) COUPON PER PURCHASE OF PRODUCT & QUANTITY STATED. No more than two (2) identical coupons for same product in same day. Do not send this coupon to ColgatePalmolive. Void if transferred, sold, auctioned, reproduced or altered from original. You must pay any sales tax. RETAILER: ColgatePalmolive will reimburse the face value plus up to 10.5¢ handling if submitted in accordance with our Redemption Policy. For policy and/or coupon redemption send to: Colgate-Palmolive 1119, P.O. Box 880001, El Paso, TX 88588-0001. Cash Value 1/100¢. No cash or credit in excess of shelf price may be returned to consumer or applied to transaction. Coupon may not be bought, reproduced, transferred or sold. Void where prohibited or if transferred to any person, firm or group prior to store redemption. Valid only in the USA (not in Puerto Rico). Redeemable at Food, Drug, Discount & other stores accepting coupons. Colgate-Palmolive participates in the CIC® member Coupon Integrity Program.",deleted:!0,imageId:"Pepsi",extlOfferId:"00123-053715-58",hierarchies:{categories:["International Cuisine"],events:[]},etag:"default"}
1,{offerId:"59458603",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1705950275595",description:"$1.00 OFF when you buy ONE(1) Tostitos Chips Any variety.",startDate:"1646161200000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/chipsSalsa.gif",limits:"O",name:"Tostitos",brand:"Tostitos",offerPgm:"MF",offerPrice:"$1.00 OFF",offerSubPgm:"09",offerTs:"1656500010000",purchaseInd:"L",purchaseRank:"37",status:"C",usageType:"O",arrivalRank:"37",expiryRank:"37",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"chipsSalsa",extlOfferId:"00219-22222-00",hierarchies:{categories:["Cookies, Snacks & Candy"],events:[]},etag:"default"},{offerId:"60709623",categoryType:"Paper, Cleaning & Home",category:"Paper, Cleaning & Home",clipTs:"1705950283697",description:"$ 1.00 OFF - When Buy 2 Limit 1 / P13N -SPA-DFTA - Offer-Test",startDate:"1696010400000",endDate:"1719770400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"U",name:"$ 1.00 OFF",brand:"$ 1.00 OFF",offerPgm:"SC",offerPrice:"$1.00 OFF",offerSubPgm:"02",offerTs:"1696010497324",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"28",status:"C",usageType:"U",arrivalRank:"28",expiryRank:"28",companionOfferIds:[],disclaimer:"$ 1.00 OFF - When Buy 2 Limit 1 / P13N -SPA-DFTA - Offer-Test",deleted:!0,imageId:"2",extlOfferId:"60709623-D",hierarchies:{categories:["Paper, Cleaning & Home"],events:[]},etag:"default"},{offerId:"60844906",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950354722",description:"Offer Request Test Automation NIA",startDate:"1703098800000",endDate:"1736449200000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"OMS Offer Request test Automation HeadLine NIA",brand:"OMS Offer Request test Automation HeadLine NIA",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703112972578",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"14",status:"C",usageType:"O",arrivalRank:"14",expiryRank:"14",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"60844906-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"63129370",categoryType:"Frozen Foods",category:"Frozen Foods",clipTs:"1705950346983",description:"BIA on sale Item discount",startDate:"1687543200000",endDate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"U",name:"BIA on Sale",brand:"BIA on Sale",offerPgm:"SC",offerPrice:"$0.49 Off",offerSubPgm:"02",offerTs:"1687557995000",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"17",status:"C",usageType:"U",arrivalRank:"17",expiryRank:"17",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"63129370-D",hierarchies:{categories:["Frozen Foods"],events:[]},etag:"default"},{offerId:"70502927",categoryType:"Beverages",category:"Beverages",clipTs:"1706550940988",description:"Free Pepsi Drink when you buy ONE(1) Pepsi Drink Any variety.",startDate:"1646161200000",endD
1ate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free Pepsi Drink",offerSubPgm:"09",offerTs:"1656500035000",purchaseInd:"L",purchaseRank:"8",status:"C",usageType:"O",arrivalRank:"8",expiryRank:"8",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-221212-01",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"72715826",categoryType:"Fruits & Vegetables",category:"Fruits & Vegetables",clipTs:"1705950279918",description:"flkds",startDate:"1704913200000",endDate:"1746468000000",events:["$5 Friday"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/7.gif",limits:"U",name:"fljksd",brand:"fljksd",offerPgm:"SC",offerPrice:"fsdlk",offerSubPgm:"02",offerTs:"1702969593129",offerProgramType:"REWARDS_ACCUMULATION",offerProtoType:"REWARDS_ACCUMULATION",purchaseInd:"L",purchaseRank:"32",status:"C",usageType:"U",arrivalRank:"32",expiryRank:"32",companionOfferIds:[],disclaimer:"fljksd",deleted:!0,imageId:"7",extlOfferId:"72715826-D",hierarchies:{categories:["Fruits & Vegetables"],events:["$5 Friday"]},etag:"default"},{offerId:"79319623",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1705950274681",description:"Free Tostitos Salsa when you buy ONE(1) Tostitos Chips Any variety.",startDate:"1654106400000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/90174cad-c248-452d-9b8a-63e44af82962.gif",limits:"O",name:"Tostitos",brand:"Tostitos",offerPgm:"MF",offerPrice:"Free Tostitos Salsa",offerSubPgm:"09",offerTs:"1663064210000",purchaseInd:"L",purchaseRank:"38",status:"C",usageType:"O",arrivalRank:"38",expiryRank:"38",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"90174cad-c248-452d-9b8a-63e44af82962",extlOfferId:"00219-23222-04",hierarchies:{categories:["Cookies, Snacks & Candy"],events:[]},etag:"default"},{offerId:"80127773",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1706550930444",description:"Free Tostitos Salsa when you buy ONE(1) Tostitos Chips Any variety.",startDate:"1654106400000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/90174cad-c248-452d-9b8a-63e44af82962.gif",limits:"O",name:"Tostitos",brand:"Tostitos",offerPgm:"MF",offerPrice:"Free Tostitos Salsa",offerSubPgm:"09",offerTs:"1665522449000",purchaseInd:"L",purchaseRank:"9",status:"C",usageType:"O",arrivalRank:"9",expiryRank:"9",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"90174cad-c248-452d-9b8a-63e44af82962",extlOfferId:"00219-23222-05",hierarchies:{categories:["Cookies, Snacks & Candy"],events:[]},etag:"default"},{offerId:"80849349",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950352691",description:"erums nonhealth1",startDate:"1703098800000",endD
1ate:"1767726000000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"erums nonhealth1",brand:"erums nonhealth1",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703117130219",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"15",status:"C",usageType:"O",arrivalRank:"15",expiryRank:"15",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"80849349-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"81912468",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950364905",description:"erums nonhealth4",startDate:"1703098800000",endDate:"1720116000000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"erums nonhealth4",brand:"erums nonhealth4",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703116991471",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"11",status:"C",usageType:"O",arrivalRank:"11",expiryRank:"11",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"81912468-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"82302573",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950365920",description:"erums nonhealth2",startDate:"1703098800000",endDate:"1726164000000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"erums nonhealth2",brand:"erums nonhealth2",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703117091589",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"10",status:"C",usageType:"O",arrivalRank:"10",expiryRank:"10",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"82302573-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"84441570",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950268610",description:"test ttl",startDate:"1698775200000",endD
1ate:"1731006000000",events:["$3.50 off"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"test ttl",brand:"test ttl",offerPgm:"SC",offerPrice:"test ttl",offerSubPgm:"02",offerTs:"1698777925180",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"43",status:"C",usageType:"O",arrivalRank:"43",expiryRank:"43",companionOfferIds:[],disclaimer:"test ttl",deleted:!0,imageId:"9",extlOfferId:"84441570-D",hierarchies:{categories:["Wine, Beer & Spirits"],events:["$3.50 off"]},etag:"default"},{offerId:"84859477",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950271149",description:"Postman 22 $0.66 when you buy 1 Postman Any variety.",startDate:"1645988400000",endDate:"1735585200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/20f7e4d5-08e7-4714-886b-779cd6464eb3.gif",limits:"O",name:"ALEN Pinalen",brand:"ALEN Pinalen",offerPgm:"MF",offerPrice:"$0.96 OFF",offerSubPgm:"09",offerTs:"1669213538000",purchaseInd:"L",purchaseRank:"41",status:"C",usageType:"O",arrivalRank:"41",expiryRank:"41",companionOfferIds:[],disclaimer:"Test Legal stuff goes here",deleted:!0,imageId:"20f7e4d5-08e7-4714-886b-779cd6464eb3",extlOfferId:"22238-27024-22",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"85223932",categoryType:"Beverages",category:"Beverages",clipTs:"1705950314702",description:"$2.00 OFF when you buy ONE(1) Starbucks Espresso 4-pack Valid on 6.5 fl. oz. 4 pack.",startDate:"1670007600000",endDate:"1717178400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2fbfceb2-0ac9-4ff0-bcc1-4e221b9e469b.gif",limits:"O",name:"Starbucks",brand:"Starbucks",offerPgm:"MF",offerPrice:"$2.00 OFF",offerSubPgm:"09",offerTs:"1688756308000",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"21",status:"C",usageType:"O",arrivalRank:"21",expiryRank:"21",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Inmar Brand Solutions Dept. 12000 Mfr Rcv Office 801 UNION PACIFIC BLVD STE 5 LAREDO TX 78045-9475. Coupon expires 12/27/2022.",deleted:!0,imageId:"2fbfceb2-0ac9-4ff0-bcc1-4e221b9e469b",extlOfferId:"00219-118570-54",hierarchies:{categories:["Beverages"],events:[]},etag:"default"},{offerId:"86268740",categoryType:"Paper, Cleaning & Home",category:"Paper, Cleaning & Home",clipTs:"1705950282801",description:"$ 1.00 OFF - When Buy 2 Limit 1 / P13N -SPA-BIA -Offer-Test",startDate:"1696010400000",endDate:"1719770400000",events:["Flavor Adventure"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"U",name:"SPA-Test",brand:"SPA-Test",offerPgm:"SC",offerPrice:"$1 OFF",offerSubPgm:"02",offerTs:"1696012662977",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"29",status:"C",usageType:"U",arrivalRank:"29",expiryRank:"29",companionOfferIds:[],disclaimer:"$ 1.00 OFF - When Buy 2 Limit 1 / P13N -SPA-BIA - Offer-Test",deleted:!0,imageId:"2",extlOfferId:"86268740-D",hierarchies:{categories:["Paper, Cleaning & Home","Personal Care & Health"],events:["Flavor Adventure"]},etag:"default"},{offerId:"87601587",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950262734",description:"$5.00 REBATE via PayPal when you buy TWO(2) Bread & Butter Wine Valid on TWO (2) 750mL bottles of Bread & Butter Wine and ONE (1) bread item. Items must appear on the same receipt.",startDate:"1685728800000",endDate:"1717178400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/814c98f1-c84b-4f98-a000-61324db5b53c.gif",limits:"O",name:"Bread & Butter Wine",brand:"Bread & Butter Wine",offerPgm:"MF",offerPrice:"$5.00 REBATE via PayPal",offerSubPgm:"09",offerTs:"1687556052000",offerProgramType:"CUSTOM",offerProtoType:"CUSTOM",purchaseInd:"L",purchaseRank:"45",status:"C",usageType:"O",arrivalRank:"45",expiryRank:"45",companionOfferIds:[],disclaimer:"Purchase required. Items must appear on the same receipt. Offer expires 12/31/22. Purchase must occur between 11/1/22 - 12/31/22. Limit one rebate per household. VALID ONLY TO LEGAL RESIDENTS OF AR, CA, CO, CT, DC, IA, ID, IL, LA, MA, MD, ME, NE, NY, OR, S
1D, VA, WY. AGE 21 YEARS OR OLDER. Void where prohibited by law. This rebate may not be combined with any other offer. Proof of purchase must accompany rebate submission. Receipt photo must include retailer name, date & time of purchase, product name or item code for required purchase item. Rebate payment sent via PayPal. If you do not have a PayPal account, you will receive an email notification from PayPal with instructions to create a PayPal account and must accept the payment via PayPal within 30 days or rebate funds will be forfeited. This rebate is void if assigned, sold, transferred, duplicated or reproduced in any way. Tax remains the responsibility of the consumer. Requests from groups, clubs, organizations or any other group purchase will not be honored or returned. REDEMPTION OR HANDLING OF THIS COUPON NOT ACCORDING TO ITS TERMS CONSTITUTES FRAUD. Employees and officers of Winery Exchange, affiliated companies, licensed retailers, distributors and family members residing in the same household as any of the above are not eligible. Winery Exchange reserves the right to require additional information/identification prior to honoring rebate request and to reject non-conforming rebate requests without liability of any kind. \nAdd offers to your loyalty account prior to in-store or online check-out, then redeem in the store where you regularly shop. Offers are personalized to the loyalty account holder and store associated with the holderâs loyalty account. Offers cannot be assigned or transferred and may not be redeemable in other store locations. Offers are limited to one per customer unless otherwise stated and cannot be applied to previous purchases. Using multiple accounts to exceed limits on offers and promotions is not permitted. We reserve the right to terminate accounts if we believe they are used for such activities. Offers do not apply to online orders scheduled for delivery or pickup after the offer expiration dates. Offers cannot be doubled or combined with any other offer, savings, coupon or discount. Internet/digital coupons cannot be doubled except manufacturersâ coupons, where permitted by the issuing manufacturer and accepted by participating store locations. In the event of product return, savings may be deducted from refund. All rebate offers are subject to applicable manufacturerâs additional terms. You pay applicable taxes, bottle/can deposits, and bag fees on purchased and free items. Prices may change and vary among store locations. Prices effective on the date you place an online order may not be the same on your scheduled order delivery or pickup date. Prices for products you order online generally are higher than in our physical store locations and may vary by fulfillment method chosen. Online promotions, discounts and offers may differ from those in our physical store locations. Not all items/varieties available in all store locations. Quantities limited to inventory on hand and subject to availability. Sales in retail quantities only. Some items may be subject to manufacturersâ limitations and other requirements. While supplies last. Transactional limits may apply. No rainchecks. We reserve the right to modify or cancel offers and/or correct typographical, pictorial and other ad or pricing errors. Offer void where prohibited by law and has no cash value. Add Rebate to your Digital Account â Use Your Digital Account at time of purchase â Purchase Required Product(s) â Receive your Rebate Via PayPal in 3 to 5 Business Days. Rebate payment will be made directly to the shopperâs registered email address via PayPal within 3-5 business days. If shoppers do not have a PayPal account, they receive an email at the registered address from PayPal with prompts to set up an account and claim their rebate. In the event that shopper does not claim their funds in PayPal within 30 days of receiving confirmation email, payment will be cancelled. Processing and redemption of rebates is handled by CB Neptune Holdings LLC. For any questions or inquiries regarding redemptions, please contact Albertsonâs Support: https://www.albertsons.com/contact-us.html or 1-877-723-3929 or M.S 10501 P.O Box 29093, Phoenix, AZ 85038",deleted:!0,imageId:"814c98f1-c84b-4f98-a000-61324db5b53c",extlOfferId:"22275-22638-14",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"89960562",categoryType:"Dairy, Eggs & Cheese",category:"Dairy, Eggs & Cheese",clipTs:"1705950328153",description:"P13N-BIA",startDate:"1680112800000",endD
1ate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"U",name:"Buy 1 Get 1",brand:"Buy 1 Get 1",offerPgm:"SC",offerPrice:"Buy 1 Get 1",offerSubPgm:"02",offerTs:"1680117044000",offerProgramType:"BUYX_GETX",offerProtoType:"BUYX_GETX",purchaseInd:"L",purchaseRank:"19",status:"C",usageType:"U",arrivalRank:"19",expiryRank:"19",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"89960562-D",hierarchies:{categories:["Dairy, Eggs & Cheese"],events:[]},etag:"default"},{offerId:"90798093",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950363921",description:"erums nonhealth5",startDate:"1703098800000",endDate:"1720116000000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"erums nonhealth5",brand:"erums nonhealth5",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703116925944",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"12",status:"C",usageType:"O",arrivalRank:"12",expiryRank:"12",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"90798093-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"92687859",categoryType:"International Cuisine",category:"International Cuisine",clipTs:"1705950280912",description:"Free New Pepsi when you buy TWO(2) New Pepsi Any variety. Items must appear on the same receipt.",startDate:"1669662000000",endDate:"1732820400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"Free New Pepsi",offerSubPgm:"09",offerTs:"1669673980000",purchaseInd:"L",purchaseRank:"31",status:"C",usageType:"O",arrivalRank:"31",expiryRank:"31",companionOfferIds:[],disclaimer:"CONSUMER: LIMIT ONE (1) COUPON PER PURCHASE OF PRODUCT & QUANTITY STATED. No more than two (2) identical coupons for same product in same day. Do not send this coupon to ColgatePalmolive. Void if transferred, sold, auctioned, reproduced or altered from original. You must pay any sales tax. RETAILER: ColgatePalmolive will reimburse the face value plus up to 10.5¢ handling if submitted in accordance with our Redemption Policy. For policy and/or coupon redemption send to: Colgate-Palmolive 1119, P.O. Box 880001, El Paso, TX 88588-0001. Cash Value 1/100¢. No cash or credit in excess of shelf price may be returned to consumer or applied to transaction. Coupon may not be bought, reproduced, transferred or sold. Void where prohibited or if transferred to any person, firm or group prior to store redemption. Valid only in the USA (not in Puerto Rico). Redeemable at Food, Drug, Discount & other stores accepting coupons. Colgate-Palmolive participates in the CIC® member Coupon Integrity Program.",deleted:!0,imageId:"Pepsi",extlOfferId:"00123-053715-57",hierarchies:{categories:["International Cuisine"],events:[]},etag:"default"},{offerId:"93443272",categoryType:"Personal Care & Health",category:"Personal Care & Health",clipTs:"1705950251053",description:"$1.50 OFF when you buy ONE(1) ARM & HAMMER⢠Toothpaste Valid on single or twin pack.",startDate:"1669662000000",endD
1ate:"1732820400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/d71511d6-9ebd-4603-9214-ba48523c88a9.gif",limits:"O",name:"Arm & Hammer",brand:"Arm & Hammer",offerPgm:"MF",offerPrice:"$1.50 OFF",offerSubPgm:"09",offerTs:"1669673689000",purchaseInd:"L",purchaseRank:"46",status:"C",usageType:"O",arrivalRank:"46",expiryRank:"46",companionOfferIds:[],disclaimer:"Legal Description",deleted:!0,imageId:"d71511d6-9ebd-4603-9214-ba48523c88a9",extlOfferId:"00123-33200-04",hierarchies:{categories:["Personal Care & Health"],events:[]},etag:"default"},{offerId:"93585785",categoryType:"Wine, Beer & Spirits",category:"Wine, Beer & Spirits",clipTs:"1705950270022",description:"Postman $0.66 when you buy 1 Postman Any variety.",startDate:"1645988400000",endDate:"1735585200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/20f7e4d5-08e7-4714-886b-779cd6464eb3.gif",limits:"O",name:"ALEN Pinalen",brand:"ALEN Pinalen",offerPgm:"MF",offerPrice:"$0.96 OFF",offerSubPgm:"09",offerTs:"1669040020000",purchaseInd:"L",purchaseRank:"42",status:"C",usageType:"O",arrivalRank:"42",expiryRank:"42",companionOfferIds:[],disclaimer:"Test Legal stuff goes here",deleted:!0,imageId:"20f7e4d5-08e7-4714-886b-779cd6464eb3",extlOfferId:"22238-27024-21",hierarchies:{categories:["Wine, Beer & Spirits"],events:[]},etag:"default"},{offerId:"93656047",categoryType:"Deli",category:"Deli",clipTs:"1705950279005",description:"P13N-BIA",startDate:"1679940000000",endDate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"O",name:"$ 0.99 Off",brand:"$ 0.99 Off",offerPgm:"SC",offerPrice:"$ 0.99 Off",offerSubPgm:"02",offerTs:"1679957211000",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"33",status:"C",usageType:"O",arrivalRank:"33",expiryRank:"33",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"93656047-D",hierarchies:{categories:["Deli"],events:[]},etag:"default"},{offerId:"93683315",categoryType:"Deli",category:"Deli",clipTs:"1705950278198",description:"P13N-BIA",startDate:"1679940000000",endDate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"O",name:"Buy 1 Get 1",brand:"Buy 1 Get 1",offerPgm:"SC",offerPrice:"Buy 1 Get 1",offerSubPgm:"02",offerTs:"1679956930000",offerProgramType:"BUYX_GETX",offerProtoType:"BUYX_GETX",purchaseInd:"L",purchaseRank:"34",status:"C",usageType:"O",arrivalRank:"34",expiryRank:"34",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"93683315-D",hierarchies:{categories:["Deli"],events:[]},etag:"default"},{offerId:"95874947",categoryType:"Pet Care",category:"Pet Care",clipTs:"1705950292757",description:"Automation Testing",startDate:"1706295600000",endDate:"1738090800000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/test.gif",limits:"O",name:"Rukshesh API Auto Test MF Offer J4U API Test offers - MF Scenario",brand:"Rukshesh API Auto Test MF Offer J4U API Test offers - MF Scenario",offerPgm:"SC",offerPrice:"Save $1.00",offerTs:"1675014018000",priceType:"PP",purchaseInd:"L",purchaseRank:"27",status:"C",usageType:"O",arrivalRank:"27",expiryRank:"27",companionOfferIds:[],disclaimer:"Disclaimer",deleted:!0,imageId:"test",extlOfferId:"95874947-D",hierarchies:{categories:["Bread & Bakery","Pet Care"],events:[]},etag:"default"},{offerId:"96016184",categoryType:"Baby Care",category:"Baby Care",clipTs:"1705950356402",description:"erums nonhealth3",startDate:"1703098800000",endDate:"1735066800000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/9.gif",limits:"O",name:"erums nonhealth3",brand:"erums nonhealth3",offerPgm:"SC",offerPrice:"$15 Savings Value",offerSubPgm:"02",offerTs:"1703117045616",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"13",status:"C",usageType:"O",arrivalRank:"13",expiryRank:"13",companionOfferIds:[],disclaimer:"Save $A when you spend $X, or Save $B when you spend $Y, or Save $C when you spend $Z or more in qualifying purchases in a single transaction using your just for U account ($X or $Y or $Z minimum purchase calculated after deduction of promotional and loyalty card savings, coupons and all other discounts, offers and savings). Offer is valid [INSERT START DATE] - [INSERT END DATE] only at participating Safeway and Albertsons stores located in Colorado, Nebraska, South Dakota, Eastern Wyoming, Farmington, NM and Aztec, NM. Qualifying purchases exclude: alcoholic beverages, tobacco products, fluid dairy, fuel, prescription items and co-payments, fishing/hunting licenses and tags, postage stamps, money orders/transfers, bus/commuter passes, amusement park/ski/event/lottery tickets, phone cards, gift cards/certificates and applicable taxes, bottle/container deposits and bag fees.",deleted:!0,imageId:"9",extlOfferId:"96016184-D",hierarchies:{categories:["Baby Care"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"97118533",categoryType:"Personal Care & Health",category:"Personal Care & Health",clipTs:"1705950247794",description:"$3.00 OFF when you buy TWO(2) Gillette Razor/Blade Refill Valid on Gillette Razor OR Blade Refill 4 ct or larger. Items must appear on the same receipt.",startDate:"1669662000000",endD
1ate:"1732820400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4.gif",limits:"O",name:"Gillete",brand:"Gillete",offerPgm:"MF",offerPrice:"$3.00 OFF",offerSubPgm:"09",offerTs:"1670462662000",purchaseInd:"L",purchaseRank:"47",status:"C",usageType:"O",arrivalRank:"47",expiryRank:"47",companionOfferIds:[],disclaimer:"Legal Description",deleted:!0,imageId:"d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4",extlOfferId:"00123-47400-12",hierarchies:{categories:["Personal Care & Health"],events:[]},etag:"default"},{offerId:"97321602",categoryType:"Personal Care & Health",category:"Personal Care & Health",clipTs:"1705950243847",description:"$3.00 OFF when you buy TWO(2) Gillette Razor/Blade Refill Valid on Gillette Razor OR Blade Refill 4 ct or larger. Items must appear on the same receipt.",startDate:"1685728800000",endDate:"1717178400000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4.gif",limits:"O",name:"Gillete",brand:"Gillete",offerPgm:"MF",offerPrice:"$3.00 OFF",offerSubPgm:"09",offerTs:"1688755972000",offerProgramType:"MUST_BUY",offerProtoType:"MUST_BUY",purchaseInd:"L",purchaseRank:"49",status:"C",usageType:"O",arrivalRank:"49",expiryRank:"49",companionOfferIds:[],disclaimer:"Legal Description",deleted:!0,imageId:"d2c4d7b1-1cda-4c8b-870a-015d2eaf26f4",extlOfferId:"00123-47400-20",hierarchies:{categories:["Personal Care & Health"],events:[]},etag:"default"},{offerId:"97689274",categoryType:"Dairy, Eggs & Cheese",category:"Dairy, Eggs & Cheese",clipTs:"1705950327223",description:"P13N-BIA",startDate:"1679940000000",endDate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"O",name:"$ 0.99 Off",brand:"$ 0.99 Off",offerPgm:"SC",offerPrice:"$ 0.99 Off",offerSubPgm:"02",offerTs:"1679958546000",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"20",status:"C",usageType:"O",arrivalRank:"20",expiryRank:"20",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"97689274-D",hierarchies:{categories:["Bread & Bakery","Dairy, Eggs & Cheese"],events:[]},etag:"default"},{offerId:"98272723",categoryType:"Frozen Foods",category:"Frozen Foods",clipTs:"1705950349056",description:"BIA on Sale Buy X Get Y",startDate:"1687543200000",endDate:"1711735200000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/2.gif",limits:"U",name:"BIA on Sale",brand:"BIA on Sale",offerPgm:"SC",offerPrice:"Buy X GET Y",offerSubPgm:"02",offerTs:"1687558385000",offerProgramType:"BUYX_GETY",offerProtoType:"BUYX_GETY",purchaseInd:"L",purchaseRank:"16",status:"C",usageType:"U",arrivalRank:"16",expiryRank:"16",companionOfferIds:[],deleted:!0,imageId:"2",extlOfferId:"98272723-D",hierarchies:{categories:["Frozen Foods"],events:[]},etag:"default"},{offerId:"99127449",categoryType:"Grains, Pasta & Sides",category:"Grains, Pasta & Sides",clipTs:"1705950240386",description:"$1.00 OFF when you buy ONE(1) Success® Rice or Quinoa Any variety.",startDate:"1685642400000",endDate:"1734634800000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/0cf87a57-53bd-4bbd-8c21-35c4ecc6a972.gif",limits:"O",name:"Success®",brand:"Success®",offerPgm:"MF",offerPrice:"$1.00 OFF",offerSubPgm:"09",offerTs:"1687542341000",offerProgramType:"ITEM_DISCOUNT",offerProtoType:"ITEM_DISCOUNT",purchaseInd:"L",purchaseRank:"50",status:"C",usageType:"O",arrivalRank:"50",expiryRank:"50",companionOfferIds:[],disclaimer:"Consumer: Limit one (1) coupon per purchase and quantity stated. No more than one (1) coupon for the same product in the same transaction. Retailer: Coupon will be redeemed for face value plus 8¢ handling if terms of offer have been met. Any other use constitutes fraud. VALID ONLY ON STATED PRODUCT(S). Coupon must be presented at time of purchase and prior to its expiry date. Customer must pay sales tax. No cash back or credit if coupon exceeds selling price. Void if prohibited, altered, transferred, sold, exchanged, taxed, copied or reproduced. Limit one coupon per purchase. Coupons submitted become property of the manufacturer. Reimbursement will be made only to retailer who redeemed the coupon. Cash value 1/20¢. Mail coupons to: Riviana Foods 742, P.O. Box 880001, El Paso, TX 88588-0001.",deleted:!0,imageId:"0cf87a57-53bd-4bbd-8c21-35c4ecc6a972",extlOfferId:"00227-047893-14",hierarchies:{categories:["Grains, Pasta & Sides"],events:[]},etag:"default"},{offerId:"375225581",categoryType:"Special Offers",category:"Special Offers",clipTs:"1653320178650",de
1scription:"This is a new offer",startDate:"1612292400000",endDate:"1706727600000",events:["Weekly Ad Coupons"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/99999.gif",limits:"U",name:"New offer Feb 2021",brand:"New offer Feb 2021",offerPgm:"SC",offerPrice:"$2.95 each",offerSubPgm:"02",offerTs:"1613083100000",purchaseInd:"L",purchaseRank:"52",status:"C",usageType:"U",arrivalRank:"52",expiryRank:"52",companionOfferIds:[],disclaimer:"This is a disclaimer",deleted:!0,imageId:"99999",extlOfferId:"375225581-D",hierarchies:{categories:["Special Offers"],events:["Weekly Ad Coupons"]},etag:"default"},{offerId:"624266723",categoryType:"Cookies, Snacks & Candy",category:"Cookies, Snacks & Candy",clipTs:"1692208855153",description:"30-50ct Selected Varieties Lim2",startDate:"1550862000000",endDate:"1924974000000",events:["2000NewEvent2"],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/999999.gif",limits:"U",name:"Polaris SC offer 41",brand:"Polaris SC offer 41",offerPgm:"SC",offerPrice:"$1.00 each",offerSubPgm:"01",offerTs:"1578091640000",purchaseInd:"L",purchaseRank:"51",status:"C",usageType:"U",arrivalRank:"51",expiryRank:"51",companionOfferIds:[],deleted:!0,imageId:"999999.gif",extlOfferId:"OMSPOL00041",hierarchies:{categories:["Cookies, Snacks & Candy"],events:["2000NewEvent2"]},etag:"default"},{offerId:"1096879833",categoryType:"Beverages",category:"Beverages",clipTs:"1705950299308",description:"$1.00 OFF when you buy TWO(2) Pepsi Drink Any variety. Items must appear on the same receipt.",startDate:"1646161200000",endDate:"1714500000000",events:[],image:"https://ngcp-qa2.safeway.com/CMS/j4u/offers/images/Pepsi.gif",limits:"O",name:"Pepsi",brand:"Pepsi",offerPgm:"MF",offerPrice:"$1.00 OFF",offerSubPgm:"09",offerTs:"1665086964000",purchaseInd:"L",purchaseRank:"26",status:"C",usageType:"O",arrivalRank:"26",expiryRank:"26",companionOfferIds:[],disclaimer:"CONSUMER: Only one coupon per purchase. You pay sales tax and/or deposit charge, where applicable. Coupon may not be assigned, transferred or reproduced. Any other use constitutes fraud. Cash value 1/100¢. RETAILER: We will reimburse you for the face value plus 8¢ handling if you and the consumer have complied with our Coupon Redemption Policy available at the redemption address. Mail coupons to: Pepsi-Cola Company, Inmar Brand Solutions Dept. 12000, Mfr Rcv Office, 801 Union Pacific Boulevard, STE 5, Laredo, TX 78045-9475. Coupon Expires: 4/17/2022",deleted:!0,imageId:"Pepsi",extlOfferId:"00219-23222-00",hierarchies:{categories:["Beverages"],events:[]},etag:"default"}],this.isMockP13nCarouselDataEnabled=!(!window||!window.SWY||0!=window.SWY?.CONFIGSERVICE?.featureToggleConfig?.disableMockP13nCarouselData),this.currentEnv=this.commonService.getCurrentEnviorment(),this.GALLERY_API=this.config[this.currentEnv].baseURL}
1getData(e,t,i=!1){let n=this._userInfoService.getJ4uStoreId()||this._userInfoService.getShopStoreId()||this._userInfoService.getStoreId(),r=this._userInfoService.getBanner();return i?this.GALLERY_API="https://"+this.getLocationHost():(this.GALLERY_API=this.config[this.currentEnv].baseURL,this.GALLERY_API=this.GALLERY_API.replace("{banner}",r)),"new_registration"==this.instantEventName&&null!=this.instantEventDateTime&&null!=this.instantCorrelationId?(this.GALLERY_API+=this.config[this.currentEnv].j4uAPIDetails.instantAllocation,this.isInstantBitlyFlow()):(this.GALLERY_API+=this.config[this.currentEnv].j4uAPIDetails.companionGalleryApi+"?storeId="+n+"&rand="+Math.floor(1e6*Math.random())+"&includeRedmBonusPathFPOffers=true",i&&(this.isBonusPathPage=i,this.GALLERY_API=`${this.GALLERY_API}&includeOnlyBonusOffer=y`)),this.HTTP_OPTIONS={headers:this.aemService.getCompanionOffersxAPIHttpOptions()},this.getDataUsingCache(e,t)}getP13nData(e,t){let i=this.get("p13nCoupons"),n=i?.dealsInfo,r=i?.arrClippedCoupons?.length,s=(new Date).getTime();return!n||this.isLocalP13nDataInvalid(i,s,e)?this.getP13nRemoteData(Number(e),t):n?.length-r<=Number(e)?(this.additionalResponseCount++,this.getP13nRemoteData(Number(e),t,!0)):fi(this.processAndCacheP13nCoupons(i,e))}processAndCacheP13nCoupons(e,t){let i=this.processP13nCoupons(e);return this.set("p13nCoupons",i),i.dealsInfo.slice(0,t)}getApiData(e,t){let i=this._userInfoService.getShopStoreId(),n=this._userInfoService.getBanner();return this.GALLERY_API=this.GALLERY_API.replace("{banner}",n),"new_registration"==this.instantEventName&&null!=this.instantEventDateTime&&null!=this.instantCorrelationId?(this.GALLERY_API+=this.config[this.currentEnv].j4uAPIDetails.instantAllocation,this.isInstantBitlyFlow()):(this.GALLERY_API+=this.config[this.currentEnv].j4uAPIDetails.companionGalleryApi+"?storeId="+i+"&includeRedmBonusPathFPOffers=true",!1===window.AB.COMMON.authorize()?this.GALLERY_API+="&hpGuest=true":this.GALLERY_API+="&rand="+Math.floor(1e6*Math.random()),e&&99999!=e&&(this.GALLERY_API+="&limit="+e)),this.HTTP_OPTIONS={headers:this.aemService.getCompanionOffersxAPIHttpOptions()},this.getRemoteAPIData(this.GALLERY_API,this.HTTP_OPTIONS,e,t,!1)}isInstantBitlyFlow(){let e=window.AB.COMMON.getURLParameterByName("externalOfferId"),t=window.AB.COMMON.getURLParameterByName("offerId"),i=window.AB.COMMON.getURLParameterByName("division"),n={customerId:window.AB.userInfo.customerId,householdId:window.AB.userInfo.houseId,eventCorrelationId:this.instantCorrelationId,eventDateTime:this.instantEventDateTime,eventName:this.instantEventName,storeId:window.AB.COMMON.getURLParameterByName("storeId")?window.AB.COMMON.getURLParameterByName("storeId"):window.AB.userInfo.j4u.storeId};t&&e&&(n.offers=[{externalOfferId:e,offerId:t}]),i&&(n.division=window.AB.COMMON.getURLParameterByName("division")),this.instantAllocationReqBody=n}getDataUsingCache(e=99999,t=!1){let i=this.get("abJ4uCoupons");this.isDataCached=!0;let n=new Date;return n=Date.parse(n),!i||i.isHiddenEvents||this.isBonusPathPage||this.isLocalDataInvalid(i,n,e)?this.getRemoteData(this.GALLERY_API,this.HTTP_OPTIONS,e,t,!1):window.location.href.includes("coupons-deals")||window.location.href.includes("discovery")?(this.onCouponsAndDealsPageReload=!1,this.getRemoteData(`${this.GALLERY_API}`,this.HTTP_OPTIONS,e,t,!1)):fi(this.returnFromLocalStorage(t,i,e))}returnFromLocalStorage(e,t,i){return e?t.instantAllocOffer:i?this.sortMappedCoupons(t.objCoupons).splice(0,i):this.sortMappedCoupons(t.objCoupons)}getLocationHost(){return window.location.host}sortMappedCoupons(e){let t=Object.values(e).sort(((e,t)=>e.purchaseRank-t.purchaseRank)),i=[],n=[],r=[],s=[];return t.forEach((e=>{"C"===e.status&&i.push(e),"U"===e.status&&(n.push(e),"PD"===e.offerType?r.push(e):s.push(e))})),[...r,...s,...i]}processP13nCoupons(e,t){let i=e?.dealsInfo??[],n=e?.arrClippedCoupons??[],r=new Map(i.map((e=>[e.offerId,e]))),s=this.mapP13nCoupons(t),a=this.removeDuplicates(s,r),o=[...n,...a.clippedCoupons??[]],l=[];o.forEach((e=>{let t=r.get(e);t&&l.push(t)}));let c=i.filter((e=>"U"===e.status)),d=t?[...c,...a.coupons]:c,u=e??{};return u.dealsInfo=[...d,...l],u}removeDuplicates(e,t){let i=e?.clippedCoupons??[],n=e?.coupons??[];return i=i.filter((e=>!t.has(e))),n=n.filter((e=>!t.has(e.offerId))),{coupons:n,clippedCoupons:i}}sortByPurchaseRank(e){return Object.values(e).sort(((e,t)=>e.purchaseRank-t.purchaseRank))}isLocalDataInvalid(e,t,i){let n=window.AB.COMMON.getURLParameterByName("couponsClipped");return isNaN(parseInt(n))&&(n="0"),null==e.objCoupons||""==e.updatedTime||(t-Number(e.savedTime))/1e3/60>120||e.storeId!=window.AB.userInfo.j4u.storeId||parseInt(n)>0||e.authorize!=window.AB.COMMON.authorize()||e.carouselLimitItems<i}isLocalP13nDataInvalid(e,t,i){let n=window.AB.COMMON.getURLParameterByName("couponsClipped");return isNaN(parseInt(n))&&(n="0"),null==e.dealsInfo||""==e.updatedTime||(t-Number(e.savedTime))/1e3/60>120||e.storeId!=window.AB.userInfo.j4u.storeId||parseInt(n)>0||e.authorize!=window.AB.COMMON.authorize()||e.carouselLimitItems<i}getRemoteData(e,t,i,n,r){this.isDataCached=!1;let s=Di((()=>fi([]))),a=window.AB.COMMON.authorize();return s=0!==Object.keys(this.instantAllocationReqBody).length?this._http.post(this.GALLERY_API,this.instantAllocationReqBody,this.HTTP_OPTIONS).pipe(bi((e=>{if(e){let t=this.instantAllocationReqBody.storeId?this.instantAllocationReqBody.storeId:window.AB.userInfo.j4u.storeId,s=new Date;s=Date.parse(s);let o=this.mapCoupons(e),l=o.coupons,c=o.instantAllocOffer,d={storeId:t,updatedTime:s,objCoupons:l,arrClippedCoupons:o.couponsClipped,instantAllocOffer:c,isHiddenEvents:r,authorize:a,carouselLimitItems:i};this.updateabJ4uCoupons(e,d);let u=this.sortMappedCoupons(l);if(this.onCouponsAndDealsPageReload){this.onCouponsAndDealsPageReload=!1;let e=JSON.parse(localStorage.getItem("abJ4uCoupons"));return this.returnFromLocalStorage(n,e,i)}return n?c:i?u.splice(0,i):u}return""}))):this._http.get(e,t).pipe(bi((e=>{if(e){let t=window.AB.userInfo.j4u.storeId,s=new Date;s=Date.parse(s);let o=this.mapCoupons(e),l=o.coupons,c=o.instantAllocOffer,d={storeId:t,updatedTime:s,objCoupons:l,arrClippedCoupons:o.couponsClipped,instantAllocOffer:c,isHiddenEvents:r,authorize:a,carouselLimitItems:i};this.updateabJ4uCoupons(e,d);let u=this.sortMappedCoupons(l);if(window.AB?.DATALAYER?.setP13nExperimentExposure?window.AB?.DATALAYER.setP13nExperimentExposure(e,"deal
1s"):window.AB?.DATALAYER?.setP13nImpressions&&window.AB?.DATALAYER.setP13nImpressions(e,"deals"),this.onCouponsAndDealsPageReload){this.onCouponsAndDealsPageReload=!1;let e=JSON.parse(localStorage.getItem("abJ4uCoupons"));return this.returnFromLocalStorage(n,e,i)}return n?c:i?u.splice(0,i):u}return""}))),s}createP13nSavingData(e,t){let i=window.AB.COMMON.authorize(),n=window.AB.userInfo.branchId,r=new Date;r=Date.parse(r);let s=this.mapP13nCoupons(e).coupons,a=e?.arrClippedCoupons?e.arrClippedCoupons:[],o=this.handleDynamicP13nFields(e);return h({storeId:n,updatedTime:r,dealsInfo:s,arrClippedCoupons:a,isHiddenEvents:!1,authorize:i,carouselLimitItems:t},o)}handleDynamicP13nFields(e){let t={};return this.setDynamicP13nField(t,"carouselTitle",e?.title),this.setDynamicP13nField(t,"webCtaText",e?.ctaText),this.setDynamicP13nField(t,"webCtaLink",e?.ctaLink),t}setDynamicP13nField(e,t,i){i&&(e[t]=i)}getP13nRemoteData(e,t,i){let n={headers:new jy(window.AB.p13nxApiHttpOptions)};this.isDataCached=!1;let r=this.get("p13nCoupons"),s=i?this.additionalCouponsAmount:e+this.additionalCouponsAmount,a=this.createP13nBody(s,t);return this._http.post(this.p13nApi,a,n).pipe(bi((t=>{if(this.isMockP13nCarouselDataEnabled&&(t=this.getMockP13nCarouselData(i,e)),!this.isValidP13nResponse(t))return this.handleP13nRemoteDataError(r,e);let n=i?r:t,s=this.createP13nSavingData(n,e);if(i){let e=this.processP13nCoupons(s,t);s.dealsInfo=e.dealsInfo}return this.set("p13nCoupons",s),window.AB?.DATALAYER?.setP13nExperimentExposure?window.AB?.DATALAYER.setP13nExperimentExposure(t,"deals"):window.AB?.DATALAYER?.setP13nImpressions&&window.AB?.DATALAYER.setP13nImpressions(t,"deals"),s.dealsInfo.slice(0,e)})),$i((t=>(this.additionalResponseCount--,fi(this.handleP13nRemoteDataError(r,e))))))}getMockP13nCarouselData(e,t){return e?{dealsInfo:this.mockInitialResponse.slice(t+this.additionalCouponsAmount*this.additionalResponseCount,t+this.additionalCouponsAmount*(1+this.additionalResponseCount))}:{dealsInfo:this.mockInitialResponse.slice(0,t+this.additionalCouponsAmount)}}isValidP13nResponse(e){return null!=e?.dealsInfo&&e?.dealsInfo?.length>0}handleP13nRemoteDataError(e,t){return e?.dealsInfo?this.processAndCacheP13nCoupons(e,t):[]}createP13nBody(e,t){let i=window.AB;return{modelConfigurationId:t,assortmentChannel:i.COMMON.getUserChannel(),banner:i.userInfo.banner,storeId:i.userInfo.branchId,householdId:i.userInfo.houseId,uiPageSize:e,zipCode:i.userInfo.zipcode,host:window.location.origin,platform:"web"}}updateabJ4uCoupons(e,t){if(this.isBonusPathPage||!this.isBonusPathPage&&window.location.href.includes("coupons-deals")&&"{}"!=JSON.stringify(this.get("abJ4uCoupons"))){let t=JSON.parse(localStorage.getItem("abJ4uCoupons"));if(t&&e&&e.companionGalleryOffer){for(let i in e.companionGalleryOffer)t.objCoupons[i]&&t.objCoupons[i].offerId===i?t.objCoupons[i]=f(h(h(h({},t.objCoupons[i]),t?.objCoupons?.[i]?.continuity&&e.companionGalleryOffer[i]?.continuity&&{continuity:f(h({},e.companionGalleryOffer[i]?.continuity),{progressValue:e?.companionGalleryOffer[i]?.continuity?.progressValue,targetValue:e?.companionGalleryOffer[i]?.continuity?.targetValue})}),e.companionGalleryOffer[i]?.bonusPathStatus&&{bonusPathStatus:e.companionGalleryOffer[i].bonusPathStatus}),{status:e.companionGalleryOffer[i].status,deleted:e.companionGalleryOffer[i].deleted}):t.objCoupons[i]=e.companionGalleryOffer[i];this.set("abJ4uCoupons",t)}}else this.set("abJ4uCoupons",t)}getRemoteAPIData(e,t,i,n,r){this.isDataCached=!1;let s=Di((()=>fi([])));return s=0!==Object.keys(this.instantAllocationReqBody).length?this._http.post(this.GALLERY_API,this.instantAllocationReqBody,this.HTTP_OPTIONS).pipe(bi((e=>{if(e){let t,r=this.mapCoupons(e);t=window.AB.COMMON.authorize()?this.sortByPurchaseRank(r.coupons):Object.values(r.coupons);let s=r.instantAllocOffer;return n?s:i?t.splice(0,i):t}return""}))):this._http.get(e,t).pipe(bi((e=>{if(e){let t;return t=window.AB.COMMON.authorize()?this.sortByPurchaseRank(e.companionGalleryOffer):Object.values(e.companionGalleryOffer),t}return""}))),s}getHiddenEventsMapping(e){let t=[],i=[];
1return e&&e.offers&&(e.offers.forEach((e=>{if(e.clipStatus=e.deleted?"U":e.clipStatus,"C"==e.clipStatus){let t=typeof e.couponID>"u"?e.offerId:e.couponID;i=[...i,t]}let t=e.offerEndDt;e.status=e.clipStatus?e.clipStatus:"",e.category=e.category?e.category:"",e.events=e.events?e.events:[],e.brand=(e.titleDsc1?e.titleDsc1:"")+(e.titleDsc2?" "+e.titleDsc2:"")+(e.titleDsc3?" "+e.titleDsc3:""),e.description=(e.prodDsc1?e.prodDsc1:"")+(e.prodDsc2?" "+e.prodDsc2:"")+(e.prodDsc3?" "+e.prodDsc3:""),-1!==t.indexOf("-")?e.endDate=t.split("-")[1]+"/"+t.split("-")[2]+"/"+t.split("-")[0]:e.endDate=t?new Date(t).getTime():"",e.startDate=e.offerStartDt?new Date(e.offerStartDt).getTime():"",e.offerPrice=e.savingsValue?e.savingsValue:"",e.imageId=e.imageId?e.imageId:"",e.image=window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+e.imageId})),t=e.offers),t}mapCoupons(e){let t=[],i=[],n=[],r=e.companionGalleryOffer;if(null!=r){for(let e in r){let i=r[e];if(null!=i)if(i.status=i.deleted?"U":i.status,i.offerType="PD"==i.offerPgm?"PD":"CC",i.category=i.category?i.category:i.categoryType,i.brand=i.brand?i.brand:i.name,i.events=i.events?i.events:[],i.image=i.image?i.image:window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+i.imageId,"C"==i.status)t=[...t,i.offerId];else for(let e of i.events)"Welcome Offers"==e&&(n.push(i),i.instantAllocation=!0)}i=r}else e&&null!=e.offers&&(i=this.getHiddenEventsMapping(e));return{coupons:i,instantAllocOffer:n,couponsClipped:t}}mapP13nCoupons(e){let t=e?.dealsInfo,i=[],n=[];return t?.forEach((e=>{if(e){let t=f(h({},e),{status:e.deleted?"U":e.status,offerType:"PD"==e.offerPgm?"PD":"CC",category:e.category??e.categoryType,brand:e.brand??e.name,events:e.events??[],image:e.image??window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+e.imageId});"C"==t.status&&i.push(t.offerId),n.push(t)}})),{coupons:n,clippedCoupons:i}}getSubscriptionApiData(){let e=this._userInfoService.getBanner();this.SUBSCRIPTION_API=this.config[this.currentEnv].baseURL,this.SUBSCRIPTION_API=this.SUBSCRIPTION_API.replace("{banner}",e),this.SUBSCRIPTION_API+=this.config[this.currentEnv].subscriptionAPIDetails.subscriptionApi,this.SUBSCRIPTION_API=this.SUBSCRIPTION_API.replace("{gid}",window.AB.userInfo.UUID);let t={Authorization:"Bearer "+window.AB.userInfo.SWY_SHOP_TOKEN,Accept:"application/vnd.safeway.v2+json",banner:window.SWY.CONFIGSERVICE.getResolvedBanner(),"ocp-apim-subscription-key":this.config[this.currentEnv].subscriptionAPIDetails.subscriptionKey.value,"Content-Type":"application/json","x-swy-client-id":"web-portal","X-SWY_BANNER":window.SWY.CONFIGSERVICE.getResolvedBanner(),"cache-control":"no-cache"};return this._http.get(this.SUBSCRIPTION_API,{headers:t})}set(e,t){if(this.utilService.isLSCompatible())try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error("ERROR: WWW COUPON - SETTING IN LOCAL STORAGE",e)}else this.objCoupons=t}get(e){if(this.objCoupons={},this.utilService.isLSCompatible()&&0===Object.keys(this.objCoupons).length){let t=localStorage.getItem(e);try{t&&(this.objCoupons=JSON.parse(t))}catch(e){console.error("ERROR: WWW COUPON - GETTING FROM LOCAL STORAGE",e)}}return this.objCoupons}changeBannerOnFilter(e,t){let i={};try{i=JSON.parse($(".just-for-you-category-mapping-json").text().trim())}catch{i={}}let n=[];$("#filter_by_coupon_category :checked").each(((e,t)=>{n.push($(t).attr("id"))})),$("#filter_by_coupon_events :checked").each(((e,t)=>{n.push($(t).attr("id"))}));let r=null;for(let e of n)if(Object.keys(i.categoryMapping).includes(e)){r=e;break}null==this.defaultModUnitImage.src&&(this.defaultModUnitImage.src=$(".mod-unit img").attr("src"),this.defaultModUnitImage.alt=$(".mod-unit img").attr("alt"),this.defaultModUnitImage.openNewTab=$(".mod-unit img").attr("openNewTab"),this.defaultModUnitImage.dataSrc=$(".mod-unit img").attr("data-src"),this.defaultModUnitImage.target=$(".mod-unit a").first().attr("href"));let s="https://images.albertsons-media.com/is/image/ABS/";r?($(".mod-unit img").attr({src:s+i.categoryMapping[r].imageName+"?"+t,alt:i.categoryMapping[r].imageAltText,openNewTab:i.categoryMapping[r].openNewTab}),$(".mod-unit img").attr("data-src",s+i.categoryMapping[r].imageName+"?"+t),$(".mod-unit a").first().attr({href:i.categoryMapping[r].targetURL}),$(".text-plate-container").hide(),$(".mod-unit__card").hide()):(null!=this.defaultModUnitImage.src&&($(".mod-unit img").attr({src:this.defaultModUnitImage.src,alt:this.defaultModUnitImage.alt,openNewTab:this.defaultModUnitImage.openNewTab}),$(".mod-unit img").attr("data-src",this.defaultModUnitImage.dataSrc),$(".mod-unit a").first().attr({href:this.defaultModUnitImage.target})),$(".text-plate-container").show(),$(".mod-unit__card").show())}initialBannerChange(e,t){let i=window.AB.COMMON.getURLParameterByName(e)?window.AB.COMMON.getURLParameterByName(e).split(","):"",n=JSON.parse($(".just-for-you-category-mapping").text().trim()),r=Object.keys(n.categoryMapping).find((e=>e===i.toString())),s="https://images.albertsons-media.com/is/image/ABS/";r&&this.getURLParameter()&&($(".mod-unit img").attr({src:s+n.categoryMapping[r].imageName+"?"+t,alt:n.categoryMapping[r].imageAltText,openNewTab:n.categoryMapping[r].openNewTab}),$(".mod-unit img").attr("data-src",s+n.categoryMapping[r].imageName+"?"+t),$(".mod-unit a").first().attr({href:n.categoryMapping[r].targetURL}),$(".text-plate-container").hide())}getURLParameter(){let e=window.AB.COMMON.getURLParameterByName("category")?window.AB.COMMON.getURLParameterByName("category"):"",t=window.AB.COMMON.getURLParameterByName("event")?window.AB.COMMON.getURLParameterByName("event"):"",i=window.AB.COMMON.getURLParameterByName("offerPgm")?window.AB.COMMON.getURLParameterByName("offerPgm"):"",n=[];return e&&n.push(e),t&&n.push(t),i&&n.push(i),n.length<2}clipCoupon(e,t,i,n,r){let s={headers:new jy(this.aemService.getJ4uHttpOptions())},a=this._userInfoService.getBanner(),o=window.location.host.includes("business")?window.location.origin:this.config[this.currentEnv].baseURL.replace("{banner}",a);o+=this.config[this.currentEnv].j4uAPIDetails.clipPath+"?storeId="+t;let l=Di((()=>fi({}))),c={};return c=e.deleted?{items:[{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]}:{items:[{clipType:"C",itemId:e.offerId,itemType:e.offerPgm},{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]},l=this._http.post(o,c,s).pipe(bi((t=>{if(console.warn("clip response",t),t&&t.items)if(1==t.items[0].status){e.status="C",e.deleted=!1,this.updateLocalStorage("abJ4uCoupons",!0,e),this.updateP13nLocalStorage(!0,e),this.commonService.clipEcomGalleryCoupon(e.offerId);let t={brand:e.instantAllocation?"welcome-offer-clip":e.brand,offerType:e.offerPgm,offerId:e.offerId,offerPrice:e.offerPrice,carouselSection:window&&window.digitalData&&window.digitalData.productInfo&&window.digitalData.productInfo.carouselSection||""};window&&window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.clipCoupon(t,r)}
1else if(0==t.items[0].status){$("#errorModal").modal({show:!0});let i="200: Coupon Expired";t.items[0].errorCd&&t.items[0].errorMsg&&(i+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}else{$("#errorModal").modal({show:!0});let i="200: Coupon Clip failed - status is not either 0 or 1";t.items[0].errorCd&&t.items[0].errorMsg&&(i+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}else if(0==t.items[0].status){$("#errorModal").modal({show:!0});let i="200: Coupon Expired";t.items[0].errorCd&&t.items[0].errorMsg&&(i+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}else{$("#errorModal").modal({show:!0});let i="200: Coupon Clip failed - items is not defined ";t.errorCd&&t.errorMsg&&(i+=" "+t.errorCd+" "+t.errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}return t})),$i((t=>{console.error("clip error",t);let i=t.status+": Coupon Clip failed";return"object"==typeof t.error&&Array.isArray(t.error.errors)&&t.error.errors.length>0&&(i+=" "+t.error.errors[0].code+" "+t.error.errors[0].msg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i),null}))),(""===window.AB.userInfo.profileEmail||""===window.AB.userInfo.profilePhone)&&this.triggerProgressiveProfile(n),l}unclipCoupon(e){let t={headers:new jy(this.aemService.getJ4uHttpOptions())},i=this._userInfoService.getBanner(),n=this.config[this.currentEnv].baseURL.replace("{banner}",i);n+=this.config[this.currentEnv].j4uAPIDetails.unclipPath;let r=Di((()=>fi({}))),s={items:[{id:e.id}]};return r=this._http.post(n,s,t).pipe(bi((t=>{this.updateLocalStorage("abJ4uCoupons",!1,e),this.commonService.unclipEcomGalleryCoupon(e.referenceId);let i={brand:e.title,offerType:e.itemType,offerId:e.referenceId,offerPrice:e.savingsValue};return window.AB.DATALAYER.unClipCoupon(i),window.SWY.ENFORCEMENTUTILS.updateReInitSite("ecoupon"),t})),$i((t=>{console.error("Unclip error",t);let i=t.status+": Coupon UnClip failed";return"object"==typeof t.error&&Array.isArray(t.error.errors)&&t.error.errors.length>0&&(i+=" "+t.error.errors[0].code+" "+t.error.errors[0].msg),window.AB.DATALAYER.setError(e.id.toString(),"coupon clipping",i),null}))),r}updateLocalStorage(e,t,i){if(this.utilService.isLSCompatible()&&null!=localStorage[e]){let n=JSON.parse(localStorage[e]);if(n){n.updatedOn=(new Date).toLocaleString();let r=n.objCoupons;if(r&&null!=r[t?i.offerId:i.referenceId]){let e=r[t?i.offerId:i.referenceId];e.status=t?"C":"U",e.deleted=!t,1==e.instantAllocation&&t?(n.instantAllocOffer=[],e.instantAllocation=void 0):e.events.includes("Welcome Offers")&&!t&&(e.instantAllocation=!0,n.instantAllocOffer=[e])}n.arrClippedCoupons=t?[...n.arrClippedCoupons,i.offerId]:n.arrClippedCoupons.filter((e=>e!=i.referenceId)),localStorage[e]=JSON.stringify(n)}}}updateP13nLocalStorage(e,t){let i="p13nCoupons";if(this.utilService.isLSCompatible()&&null!=localStorage[i]){let n=JSON.parse(localStorage[i]);if(n){let r=n.dealsInfo,s=r&&r.find((e=>e.offerId===t.offerId));if(!s)return;n.updatedOn=(new Date).toLocaleString(),s.status=e?"C":"U",s.deleted=!e;let a=n.arrClippedCoupons||[];n.arrClippedCoupons=e?[...a,t.offerId]:a.filter((e=>e!=t.referenceId)),localStorage[i]=JSON.stringify(n)}}}broadcastCompanionGalleryOfferPOST(e){this._companionGalleryOfferPOST.next(e)}convertJsonArrayToStringArray(e){return e.split(/[{}]/).map((e=>e.toLowerCase())).filter((e=>e)).filter((e=>","!==e))}findIconToDisplay(e){if(e.iconImage||(e.iconImage=""),e.logoSVGCouponItemImageEnable&&(e.iconImage="LastBeforeDefaultIconImage"),e.freshPassEnable&&e.freshPassCouponEventListener&&e.freshPassCouponEventListener.length>0&&Array.isArray(e.events)){let t=!1;for(let i in e.events){if(-1===e.freshPassCouponEventListener.map((e=>e.toLowerCase())).indexOf(e.events[i].toLowerCase())){t=!1;break}t=!0}t&&(e.iconImage="FreshPassIconImage")}e.UDCDealsEnable&&(e.iconImage="UDCDealIconImage")}triggerProgressiveProfile(e){let t,i=e?"p13nCoupons":"abJ4uCoupons";try{t=JSON.parse(localStorage.getItem(i))}catch{t=""}
1null!=t&&""!=t?t.arrClippedCoupons&&0==t.arrClippedCoupons.length&&this.showProgressiveProfile():this.getMyListData().subscribe((e=>{e&&""==(e.shoppingLists&&e.shoppingLists[0]&&e.shoppingLists[0].items?e.shoppingLists[0].items:"")&&this.showProgressiveProfile()}),(e=>{console.log(e)}))}getMyListData(){let e=Date.now(),t={headers:new jy(this.aemService.getJ4uHttpOptions11())};return this._http.get(window.AB.myListPath+"?storeId="+window.AB.userInfo.j4u.storeId+"&_ws_as_ff=y&"+e,t)}showProgressiveProfile(){if($("#modalProfile").modal({show:!0}),window.AB.DIVISIONAL.modalTrapKeyboard("#modalProfile"),setTimeout((function(){document.getElementById("ppUsername").focus()}),500),window.AB.DATALAYER){let e=""===window.AB.userInfo.profilePhone?"enter-mobile":"enter-email";window.AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:e,topNav:"cta:clip-coupon"})}}isRewardCoupon(e){return e.offerProgramType&&this.rewardProtoTypes.includes(e.offerProgramType)||e.offerProtoType&&this.rewardProtoTypes.includes(e.offerProtoType)}getLogoList(){let e=`${window.location.origin}/content/experience-fragments/xf/foru/logos/master.caas.json`;return window.location.href.includes("local")&&(e=`https://www-qa1.${window.AB.userInfo.banner}.com/content/experience-fragments/xf/foru/logos/master.caas.json`),this._http.get(e).pipe(bi((e=>{let t=e.root.responsivegrid.j4u_logos;return{FreshPassIconImage:{logo:window.location.href.includes("local")?`https://www-qa1.${window.AB.userInfo.banner}.com/${t.freshPassLogo}`:t.freshPassLogo,altText:"Just 4 U Freshpass logo"},LastBeforeDefaultIconImage:{logo:window.location.href.includes("local")?`https://www-qa1.${window.AB.userInfo.banner}.com/${t.forULogo}`:t.forULogo,altText:"For U logo"},RewardsIconImage:{logo:window.location.href.includes("local")?`https://www-qa1.${window.AB.userInfo.banner}.com/${t.rewardsLogo}`:t.rewardsLogo,altText:"Rewards logo"},defaultIconImage:{logo:window.location.href.includes("local")?`https://www-qa1.${window.AB.userInfo.banner}.com/${t.forULogo}`:t.forULogo,altText:"Just 4 U logo"}}})),$i(this.handleError))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error)return mi("error")}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(Sw),lr(_w),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Gw=(()=>{class e{constructor(e,t,i,n){this._http=e,this._commonService=t,this._aemService=i,this._j4uV1Service=n,this.AB=window.AB,this.coupons=[],this.offersData=new Tt({}),this.offersDataSource=this.offersData.asObservable(),this.slickChanges=new kt,this.slickChanges$=this.slickChanges.asObservable()}getData(e){switch(e.carouselFilter){case"aisle":if(this._aemService.getDisableEcomGalleryApi())return this._commonService.loadRemoteCouponsV2(e.includePageName);break;case"qualifyingoffers":return this._j4uV1Service.getData();case"j4uGallery":return e.carouselOfferLimit=e.carouselOfferLimit?Number(e.carouselOfferLimit):12,e.offerCarouselApiBased?this._j4uV1Service.getApiData(e.carouselOfferLimit):this._j4uV1Service.getData(e.carouselOfferLimit);case"p13n":return this._j4uV1Service.getP13nData(e.carouselOfferLimit,e.modelConfigurationId)}return fi(undefined)}getQualifyingOffers(e,t){let i=[],n=e.find((function(e){return(null==e.offerId?e.couponID:e.offerId)===t}));if(void 0!==n){n=n.category;for(let r in e){let s=e[r];s.category===n&&(null===s.offerId?s.couponID:s.offerId)!==t&&("B"===s.purchaseInd?i.unshift(s):i.push(s))}}return i.splice(0,12)}setAriaLabelForCouponCarousel(e,t){let i=e.querySelector(".slick-next"),n=e.querySelector(".slick-prev"),r="Next "+t,s="Previous "+t;null!=i&&(i.setAttribute("aria-label",r),n.setAttribute("aria-label",s))}setOffersData(e){this.offersData.next(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(Cw),lr(Yw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Kw=(()=>{class e{static{this.QUICK_ADD_BANNER_CONST="quickAddBasket"}constructor(){this._instantGroceryBasketQty=new kt,this.instantGroceryBasketQty$=this._instantGroceryBasketQty.asObservable(),this._selectAllItems=new kt,this.selectAllItems$=this._selectAllItems.asObservable(),this._redirectToLandingPage=new kt,this.redirectToLandingPage$=this._redirectToLandingPage.asObservable(),this._isUserInGroup=new kt,this.isUserInGroup$=this._isUserInGroup.asObservable()}initializeQuickAddBasket(e){return{cartItemsList:e.map((e=>{let t={itemId:e.id,qty:1,selected:!0};return"W"===e?.sellByWeight&&"3"===e?.displayType&&(t.selectedWeight=Number(e.minWeight).toFixed(2)),t}))}}processQuickAddBasket(t){let i=JSON.parse(localStorage.getItem(e.QUICK_ADD_BANNER_CONST));i&&""!=i?(i.cartItemsList=i.cartItemsList.filter((e=>t.some((t=>e.itemId==t.id)))),t.forEach((e=>{let t=e.id,n=e?.minWeight;0==i.cartItemsList.filter((t=>t.itemId==e.id)).length&&("W"===e?.sellByWeight&&"3"===e?.displayType?i.cartItemsList.push({itemId:t,qty:1,selectedWeight:Number(n).toFixed(2),selected:!0}):i.cartItemsList.push({itemId:t,qty:1,selected:!0}))}
1))):i=this.initializeQuickAddBasket(t),this.setQuickAddBasket(i)}getAllSelectedProducts(){return this.quickAddBasketObject.cartItemsList.filter((e=>e.selected)).map((e=>e?.selectedWeight?{itemId:e.itemId,selectedWeight:e.selectedWeight}:{itemId:e.itemId,qty:e.qty}))}areAllProductsSelected(){return this.quickAddBasketObject.cartItemsList.every((e=>e.selected))}clearQuickAddBasket(){localStorage.removeItem(e.QUICK_ADD_BANNER_CONST),this.quickAddBasketObject=null}isProductSelected(e){return 1==this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e))?.selected}setQuickAddBasketSelectedProperty(e,t){this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e)).selected=t,this.setQuickAddBasket(this.quickAddBasketObject)}updateQuickAddBasketSelectedProperty(e,t){this.setQuickAddBasketSelectedProperty(e,t)}setQuickAddBasketItemQuantity(e,t){this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e)).qty=t,this.setQuickAddBasket(this.quickAddBasketObject)}getQuickAddBasketItemQuantity(e){return this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e))?.qty}setQuickAddBasketItemWeight(e,t){this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e)).selectedWeight=t.toFixed(2),this.setQuickAddBasket(this.quickAddBasketObject)}getQuickAddBasketItemWeight(e){return this.quickAddBasketObject.cartItemsList.find((t=>t.itemId==e)).selectedWeight}getAmountOfQuickAddItems(){return this.quickAddBasketObject.cartItemsList.length}unselectAllItems(){this.quickAddBasketObject.cartItemsList=this.quickAddBasketObject.cartItemsList.map((e=>f(h({},e),{selected:!1}))),this.setQuickAddBasket(this.quickAddBasketObject),this._selectAllItems.next(!1)}selectAllItems(){this.quickAddBasketObject.cartItemsList=this.quickAddBasketObject.cartItemsList.map((e=>f(h({},e),{selected:!0}))),this.setQuickAddBasket(this.quickAddBasketObject),this._selectAllItems.next(!0)}redirectToLandingPage(){this._redirectToLandingPage.next(!0)}setQuickAddBasket(e){this.quickAddBasketObject=e,this.setQuickAddBasketLocalStorageObject(e),this._instantGroceryBasketQty.next(this.calculateTotalQuickAddBasketQty(e))}setQuickAddBasketLocalStorageObject(t){localStorage.setItem(e.QUICK_ADD_BANNER_CONST,JSON.stringify(t))}calculateTotalQuickAddBasketQty(e){return e.cartItemsList.filter((e=>e.selected)).reduce(((e,t)=>e+t.qty),0)}notifyUserInGroup(e){this._isUserInGroup.next(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Qw=(()=>{class e{constructor(e,t,i,n){this._http=e,this._commonService=t,this._userInfoService=i,this._aemService=n}getP13nProductsRecommendation(e){let t=this.generateProductRecommendationsRequestOptions(),i=window.location.origin+window.SWY.CONFIGSERVICE.wcaxXapiConfig["p13n.genericCarousel.basePath"];return i+=(i.includes("?")?"&":"?")+"includeOffer=true",this._http.post(i,e,t)}generateProductsRequestPayload(e){let t=f(h({},e),{bruid:this._aemService.getCookie("_br_uid_2"),assortmentChannel:e?.assortmentChannel??this._userInfoService.getUserChannel(),banner:e?.banner??this._userInfoService.getBanner(),storeId:e?.storeId??this._userInfoService.getShopStoreId(),host:e?.host??"www."+this._userInfoService.getBanner()+".com",pageURL:e.pageURL??"https://www."+this._userInfoService.getBanner()+".com"+window.location.pathname});if(this._commonService.checkAnalyticsSwyObject()){let e=window.analyticsSwy.storedData.ids;t.sessionId=e.sessionId?e.sessionId:"",t.tntId=e.tntId?e.tntId:"",t.marketingCloudVisitorId=e.marketingCloudVisitorId?e.marketingCloudVisitorId:"",t.mboxMCSDID=e.mboxMCSDID?e.mboxMCSDID:"",t.edgeHost=e.edgeHost?e.edgeHost:""}let i=[];return this._aemService.authorize()&&!window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isBPNArrayP13nDisabled&&(i=this.getProductBPNFromCartObj(),i.length>0&&(t.cartItems=i)),t}addAmvcCookieInfo(e){if(!e?.marketingCloudVisitorId){let t=this._aemService.getCookie("AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg");if(t){let i=t.split("|");i&&i?.indexOf("MCMID")>0&&(e.marketingCloudVisitorId=i[i?.indexOf("MCMID")+1])}}}generateProductRecommendationsRequestOptions(){let e={headers:new jy({"Content-Type":"application/vnd.safeway.v2+json","Ocp-Apim-Subscription-Key":window.SWY.CONFIGSERVICE.searchConfig.apimP13nSubscriptionKey,platform:"web"})};return this._aemService.authorize()&&(e.headers=e.headers.set("X-access-token",window.AB.userInfo.SWY_SHOP_TOKEN)),window.AB?.COMMON.isB2BSite()&&(e.headers=e.headers.set("pgm","1P_B2B")),e}getProductBPNFromCartObj(){let e=localStorage.getItem("abCart"),t=[];if(e){let i=JSON.parse(e);i.cartItems?.length>0&&"ABS"==i.cartSource&&"1P"==i.cartCategory&&i.cartItems.forEac
1h((e=>{if(e.itemId){let i={bpn:e.itemId.toString()};t.push(i)}}))}return t}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(_w),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Jw=(()=>{class e{constructor(e,t,i,n){this.http=e,this.aemService=t,this.userInfoService=i,this._commonService=n,this.myListHttpHeaders={},this.config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment()}getMyList(e,t){let i=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString();this.myListHttpHeaders=h({},this.aemService.getJ4uHttpOptions11()),this.userInfoService.getSWY_SHOP_TOKEN()&&(this.myListHttpHeaders.SWY_sso_token=`${this.userInfoService.getSWY_SHOP_TOKEN()}`,this.myListHttpHeaders.Swyconsumerdirectorypro=`${this.userInfoService.getSWY_SHOP_TOKEN()}`),t&&(delete this.myListHttpHeaders["X-SWY_VERSION"],this.myListHttpHeaders["X-Swy_version"]="4.0");let n={headers:h({},this.myListHttpHeaders),params:{storeId:e,rand:i},withCredentials:!0},r=this.userInfoService.getBanner()||window.AB.userInfo.banner;return this.url=window.SWY.CONFIGSERVICE.bannerDomainMap["www-"+r]+window.AB.myListPath,this.http.get(this.url,n)}getMyListSync(e,t){let i=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString();this.myListHttpHeaders=h({},window.AB.j4uHttpOptions11),this.userInfoService.getSWY_SHOP_TOKEN()&&(this.myListHttpHeaders.SWY_sso_token=`${this.userInfoService.getSWY_SHOP_TOKEN()}`,this.myListHttpHeaders.Swyconsumerdirectorypro=`${this.userInfoService.getSWY_SHOP_TOKEN()}`),t&&(delete this.myListHttpHeaders["X-SWY_VERSION"],this.myListHttpHeaders["X-Swy_version"]="4.0");let n=this.userInfoService.getBanner()||window.AB.userInfo.banner;this.url=window.SWY.CONFIGSERVICE.bannerDomainMap["www-"+n]+window.AB.myListPath+"?storeId="+e+"&rand="+i;let r=new XMLHttpRequest;return r.open("GET",this.url,!1),Object.keys(this.myListHttpHeaders).forEach((e=>{console.warn(e+" : "+this.myListHttpHeaders[e]),r.setRequestHeader(e,this.myListHttpHeaders[e])})),r.withCredentials=!0,r.send(null),200==r.status?r.responseText:"{}"}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(_w),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Zw=(()=>{class e{constructor(e,t,i){this._http=e,this._commonService=t,this._aemService=i,this.setEndpoints(),this.setSubscriptionKeys()}setEndpoints(){this.endpoints={landingPageEndpoint:window?.AB?.targetedContentLandingEndpoint}}setSubscriptionKeys(){this.subscriptionKeys={landingPageSubscriptionKey:window?.AB?.targetedContentLandingEndpointSubkey}}generateHttpOptions(e){return{headers:new jy({"Content-Type":"application/json","Ocp-Apim-Subscription-Key":this.subscriptionKeys.landingPageSubscriptionKey,zone:e?.zone,storeId:e?.storeId,banner:e?.banner,"x-swy-correlation-id":this._commonService.generateUUID()})}}getLandingPageZoneContent(e){e.screenName="landing-pages",e.cartItems||delete e.cartItems;let t=this.generateHttpOptions(e);return this._http.post(this.endpoints.landingPageEndpoint,e,t)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Xw=(()=>{class e{constructor(e){this.document=e,this.populateZone=null,this.bootstrapAngular=null,this.window=this.document.defaultView||window,this.zoneComponent=this.window.zoneTargetedContentV2Comp,this.populateZone=this.zoneComponent?this.zoneComponent.populateZone.bind(this.zoneComponent):null,this.bootstrapAngular=this.zoneComponent?this.zoneComponent.bootstrapAngular.bind(this.zoneComponent):null}renderGridZone(e,t,i=!1){if(this.populateZone){if(this.isSponsoredCarousel(t?.items?.[0])){let i=e.parentElement;if(i){let n=this.document.createElement("div"),r=e.id;return n.innerHTML=this.generateSpaCarouselInnerHtml(t.items?.[0],r),i.appendChild(n),e.remove(),void(this.bootstrapAngular&&this.bootstrapAngular())}}this.zoneComponent.wrapperName="targeted-wrapper",this.zoneComponent.wrapperAttribute="data-targeted-component",this.populateZone(e,t,!0,i)}}
1generateSpaCarouselInnerHtml(e,t){let i=JSON.stringify(e).replace(/'/g,"'");return`<div class="col-12 bia-spa-carousel-container sponsored-container">\n <span class="bia-spa-carousel-container-header">${e.carouselTitle||""}</span>\n <div id=${t}>\n <div class="slick-product-carousel">\n <targeted-wrapper\n data-targeted-component="product-carousel"\n data-home-targeted="true"\n data-carousel-type="generic-products"\n data-carousel-title="${e.carouselTitle||""}"\n data-carousel-users="${"mask"==e.hideOnLoading?e.userType:"false"}"\n data-carousel-action="${null==e.actionButton?"qty-stepper":e.actionButton}"\n data-carousel-behaviour="bia-spaCarousel"\n data-experimentation="${e.webExperimentation||""}"\n data-experimentation-id="${e.webExperimentationId||""}"\n data-experimentation-type="${e.webExperimentationType||""}"\n data-impression-tracking="${e.webIsImpTrackEnabled||""}"\n data-products='${i}'\n data-carousel-max-products="${e.maxNumOfProducts||""}"\n data-navigation-type="${e.navigationType||""}"\n data-cart-type="${e.cartType||""}"\n data-filter-cart-items="${e.filterCartItems||""}"\n data-seller-type="${e.sellerType||""}"\n data-carousel-pdp="false"\n data-is-dynamic-grid-flow="true"\n id="${e.itemName||""}">\n </targeted-wrapper>\n </div>\n </div>\n </div>`}isSponsoredCarousel(e){return"master-product-carousel"===e?.type&&"650a2c73537e397683690448"===e?.modelId}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),e_=(()=>{class e{constructor(){this._isChecked=new Tt(!1),this.isChecked$=this._isChecked.asObservable()}setCheckboxState(e){this._isChecked.next(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),t_=(()=>{class e{constructor(e,t,i){this._httpClient=e,this._commonService=t,this._userInfoService=i,this.endpointPaths={smartbasket:"/purchasehistory/smartbasket/",productgrid:"/purchasehistory/product-grid"}}fetchPurchasesGridEndpointData(e){let{apimKey:t,request:i,basePath:n}=e,r=this.createPurchasesGridEndpointHttpOptions(t);return this._httpClient.post(n+this.endpointPaths.productgrid,i,r)}createPurchasesGridEndpointHttpOptions(e){return{headers:new jy({"Content-Type":"application/json",platform:"web","Ocp-Apim-Subscription-Key":e})}}fetchSmartBasketResponse(e){let t=this.createHttpOptions(e?.headers),i=this.createSmartBasketParams(e?.filterParams,e?.banner),n=this.createBaseSmartBasketUrl(e?.basePath,e?.hhid,i),r=this._commonService.generateCBAUrl(n);return this._httpClient.get(r,t)}createHttpOptions(e){let t=new jy({"ocp-apim-subscription-key":e.apimKey,Authorization:`Bearer ${e.bearerToken}`,accept:"application/json"});return void 0!==e.pgm&&(t=t.set("pgm",e.pgm)),{headers:t}}createSmartBasketParams(e,t){return`availabilityCheck=true&storeId=${e.branchId}&pageNo=${e.pageNumber}&pageSize=50&excludeCartItems=true&placement=webquickadd&banner=${t}`}createBaseSmartBasketUrl(e,t,i){return`${e}${this.endpointPaths.smartbasket}${t}?${i}`}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(_w))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),i_=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[Rw,{provide:"configObj",useValue:t}]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[vw,Cw,Rw,Mw,Bw,ww,kw,Sw,_w,Lw,Fw,Nw,Dw,Vw,Uw,qw,$w,jw,zw,Ww,Hw,Yw,Kw,Qw,Zw,Xw,Gw,Jw,t_,{provide:"EnviormentConfig",useValue:Iw}],imports:[Ly]})}}return e})(),n_=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}setProperty(e,t){this._renderer.setProperty(this._elementRef.nativeElement,e,t)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Vl))}}static{this.ɵdir=ts({type:e})}}return e})(),r_=(()=>{class e extends n_{static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,features:[Wp]})}}return e})(),s_=new Fn(""),a_={provide:s_,useExisting:An((()=>o_)),multi:!0},o_=(()=>{class e extends r_{writeValue(e){this.setProperty("checked",e)}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&jf("change",(function(e){return t.onChange(e.target.checked)}))("blur",(function(){return t.onTouched()}))},features:[xm([a_]),Wp]})}}return e})(),l_={provide:s_,useExisting:An((()=>d_)),multi:!0};var c_=new Fn(""),d_=(()=>{class e extends n_{constructor(e,t,i){super(e,t),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){let e=Gg()?Gg().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){let t=e??"";this.setProperty("value",t)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Vl),$d(c_,8))}}static{this.ɵdir=ts({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&jf("input",(function(e){return t._handleInput(e.target.value)}))("blur",(function(){return t.onTouched()}))("compositionstart",(function(){return t._compositionStart()}))("compositionend",(function(e){return t._compositionEnd(e.target.value)}))},features:[xm([l_]),Wp]})}}return e})();function u_(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function p_(e){return null!=e&&"number"==typeof e.length}var h_=new Fn(""),f_=new Fn(""),m_=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,g_=class{static min(e){return b_(e)}static max(e){return y_(e)}static required(e){return v_(e)}static requiredTrue(e){return function(e){return!0===e.value?null:{required:!0}}(e)}static email(e){return function(e){return u_(e.value)||m_.test(e.value)?null:{email:!0}}(e)}static minLength(e){return function(e){return t=>u_(t.value)||!p_(t.value)?null:t.value.length<e?{minlength:{requiredLength:e,actualLength:t.value.length}}:null}(e)}static maxLength(e){return w_(e)}static pattern(e){return function(e){if(!e)return __;let t,i;return"string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),t=new RegExp(i)):(i=e.toString(),t=e),e=>{if(u_(e.value))return null;let n=e.value;return t.test(n)?null:{pattern:{requiredPattern:i,actualValue:n}}}}(e)}static nullValidator(e){return null}static compose(e){return x_(e)}static composeAsync(e){return P_(e)}};function b_(e){return t=>{if(u_(t.value)||u_(e))return null;let i=parseFloat(t.value);return!isNaN(i)&&i<e?{min:{min:e,actual:t.value}}:null}}function y_(e){return t=>{if(u_(t.value)||u_(e))return null;let i=parseFloat(t.value);return!isNaN(i)&&i>e?{max:{max:e,actual:t.value}}:null}}function v_(e){return u_(e.value)?{required:!0}:null}function w_(e){return t=>p_(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}function __(e){return null}function S_(e){return null!=e}function C_(e){return Zm(e)?hi(e):e}function I_(e){let t={};return e.forEach((e=>{t=null!=e?h(h({},t),e):t})),0===Object.keys(t).length?null:t}function A_(e,t){return t.map((t=>t(e)))}function k_(e){return e.map((e=>function(e){return!e.validate}(e)?e:t=>e.validate(t)))}function x_(e){if(!e)return null;let t=e.filter(S_);return 0==t.length?null:function(e){return I_(A_(e,t))}}function T_(e){return null!=e?x_(k_(e)):null}function P_(e){if(!e)return null;let t=e.filter(S_);return 0==t.length?null:function(e){return Oi(A_(e,t).map(C_)).pipe(bi(I_))}}function E_(e){return null!=e?P_(k_(e)):null}function D_(e,t){return null===e?[t]:Array.isArray(e)?[...e,t]:[e,t]}function O_(e){return e._rawValidators}function B_(e){return e._rawAsyncValidators}function M_(e){return e?Array.isArray(e)?e:[e]:[]}function R_(e,t){return Array.isArray(e)?e.includes(t):e===t}function L_(e,t){let i=M_(t);return M_(e).forEach((e=>{R_(i,e)||i.push(e)})),i}function F_(e,t){return M_(t).filter((t=>!R_(e,t)))}var N_=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=T_(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=E_(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach((e=>e())),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}},U_=class extends N_{get formDirective(){return null}get path(){return null}},V_=class extends N_{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},q_=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}
1get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},$_=(f(h({},{"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"}),{"[class.ng-submitted]":"isSubmitted"}),(()=>{class e extends q_{constructor(e){super(e)}static{this.ɵfac=function(t){return new(t||e)($d(V_,2))}}static{this.ɵdir=ts({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&Yh("ng-untouched",t.isUntouched)("ng-touched",t.isTouched)("ng-pristine",t.isPristine)("ng-dirty",t.isDirty)("ng-valid",t.isValid)("ng-invalid",t.isInvalid)("ng-pending",t.isPending)},features:[Wp]})}}return e})()),j_=(()=>{class e extends q_{constructor(e){super(e)}static{this.ɵfac=function(t){return new(t||e)($d(U_,10))}}static{this.ɵdir=ts({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,t){2&e&&Yh("ng-untouched",t.isUntouched)("ng-touched",t.isTouched)("ng-pristine",t.isPristine)("ng-dirty",t.isDirty)("ng-valid",t.isValid)("ng-invalid",t.isInvalid)("ng-pending",t.isPending)("ng-submitted",t.isSubmitted)},features:[Wp]})}}return e})(),z_="VALID",W_="INVALID",H_="PENDING",Y_="DISABLED",G_=class{},K_=class extends G_{constructor(e,t){super(),this.value=e,this.source=t}},Q_=class extends G_{constructor(e,t){super(),this.pristine=e,this.source=t}},J_=class extends G_{constructor(e,t){super(),this.touched=e,this.source=t}},Z_=class extends G_{constructor(e,t){super(),this.status=e,this.source=t}},X_=class extends G_{constructor(e){super(),this.source=e}},eS=class extends G_{constructor(e){super(),this.source=e}};function tS(e){return(nS(e)?e.validators:e)||null}function iS(e,t){return(nS(t)?t.asyncValidators:e)||null}function nS(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function rS(e,t,i){let n=e.controls;if(!(t?Object.keys(n):n).length)throw new mn(1e3,"");if(!n[i])throw new mn(1001,"")}function sS(e,t,i){e._forEachChild(((e,t)=>{if(void 0===i[t])throw new mn(1002,"")}))}var aS=class{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Wg((()=>this.statusReactive())),this.statusReactive=$p(void 0),this._pristine=Wg((()=>this.pristineReactive())),this.pristineReactive=$p(!0),this._touched=Wg((()=>this.touchedReactive())),this.touchedReactive=$p(!1),this._events=new kt,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Hg(this.statusReactive)}set status(e){Hg((()=>this.statusReactive.set(e)))}get valid(){return this.status===z_}get invalid(){return this.status===W_}get pending(){return this.status==H_}get disabled(){return this.status===Y_}get enabled(){return this.status!==Y_}get pristine(){return Hg(this.pristineReactive)}set pristine(e){Hg((()=>this.pristineReactive.set(e)))}get dirty(){return!this.pristine}get touched(){return Hg(this.touchedReactive)}set touched(e){Hg((()=>this.touchedReactive.set(e)))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(L_(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(L_(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(F_(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(F_(e,this._rawAsyncValidators))}hasValidator(e){return R_(this._rawValidators,e)}hasAsyncValidator(e){return R_(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=!1===this.touched;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(f(h({},e),{sourceControl:i})),t&&!1!==e.emitEvent&&this._events.next(new J_(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}
1),this._forEachChild((t=>t.markAllAsTouched(e)))}markAsUntouched(e={}){let t=!0===this.touched;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild((t=>{t.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})})),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),t&&!1!==e.emitEvent&&this._events.next(new J_(!1,i))}markAsDirty(e={}){let t=!0===this.pristine;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(f(h({},e),{sourceControl:i})),t&&!1!==e.emitEvent&&this._events.next(new Q_(!1,i))}markAsPristine(e={}){let t=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild((t=>{t.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})})),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),t&&!1!==e.emitEvent&&this._events.next(new Q_(!0,i))}markAsPending(e={}){this.status=H_;let t=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new Z_(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(f(h({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Y_,this.errors=null,this._forEachChild((t=>{t.disable(f(h({},e),{onlySelf:!0}))})),this._updateValue();let i=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new K_(this.value,i)),this._events.next(new Z_(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(f(h({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach((e=>e(!0)))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=z_,this._forEachChild((t=>{t.enable(f(h({},e),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(f(h({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach((e=>e(!1)))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let t=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===z_||this.status===H_)&&this._runAsyncValidator(t,e.emitEvent)}let t=e.sourceControl??this;!1!==e.emitEvent&&(this._events.next(new K_(this.value,t)),this._events.next(new Z_(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(f(h({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild((t=>t._updateTreeValidity(e))),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Y_:z_}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=H_,this._hasOwnPendingAsyncValidator={emitEvent:!1!==t};let i=C_(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe((i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:t,shouldHaveEmitted:e})}))}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent,this,t.shouldHaveEmitted)}get(e){let t=e;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce(((e,t)=>e&&e._find(t)),this)}getError(e,t){let i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new Z_(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new _l,this.statusChanges=new _l}_calculateStatus(){return this._allControlsDisabled()?Y_:this.errors?W_:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(H_)?H_:this._anyControlsHaveStatus(W_)?W_:z_}_anyControlsHaveStatus(e){return this._anyControls((t=>t.status===e))}_anyControlsDirty(){return this._anyControls((e=>e.dirty))}_anyControlsTouched(){return this._anyControls((e=>e.touched))}_updatePristine(e,t){let i=!this._anyControlsDirty(),n=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),n&&this._events.next(new Q_(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new J_(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){nS(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}
1_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function(e){return Array.isArray(e)?T_(e):e||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function(e){return Array.isArray(e)?E_(e):e||null}(this._rawAsyncValidators)}},oS=class extends aS{constructor(e,t,i){super(tS(t),iS(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange((()=>{})),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange((()=>{})),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){sS(this,0,e),Object.keys(e).forEach((i=>{rS(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(Object.keys(e).forEach((i=>{let n=this.controls[i];n&&n.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})})),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild(((i,n)=>{i.reset(e?e[n]:null,{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},((e,t,i)=>(e[i]=t.getRawValue(),e)))}_syncPendingControls(){let e=this._reduceChildren(!1,((e,t)=>!!t._syncPendingControls()||e));return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach((t=>{let i=this.controls[t];i&&e(i,t)}))}_setUpControls(){this._forEachChild((e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}))}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},((e,t,i)=>((t.enabled||this.disabled)&&(e[i]=t.value),e)))}_reduceChildren(e,t){let i=e;return this._forEachChild(((e,n)=>{i=t(i,e,n)})),i}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}},lS=class extends oS{},cS=new Fn("CallSetDisabledState",{providedIn:"root",factory:()=>dS}),dS="always";function uS(e,t){return[...t.path,e]}function pS(e,t,i=dS){mS(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||"always"===i)&&t.valueAccessor.setDisabledState?.(e.disabled),function(e,t){t.valueAccessor.registerOnChange((i=>{e._pendingValue=i,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&bS(e,t)}))}(e,t),function(e,t){let i=(e,i)=>{t.valueAccessor.writeValue(e),i&&t.viewToModelUpdate(e)};e.registerOnChange(i),t._registerOnDestroy((()=>{e._unregisterOnChange(i)}))}(e,t),function(e,t){t.valueAccessor.registerOnTouched((()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&bS(e,t),"submit"!==e.updateOn&&e.markAsTouched()}))}(e,t),function(e,t){if(t.valueAccessor.setDisabledState){let i=e=>{t.valueAccessor.setDisabledState(e)};e.registerOnDisabledChange(i),t._registerOnDestroy((()=>{e._unregisterOnDisabledChange(i)}))}}(e,t)}function hS(e,t,i=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),gS(e,t),e&&(t._invokeOnDestroyCallbacks(),e._registerOnCollectionChange((()=>{})))}function fS(e,t){e.forEach((e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)}
1))}function mS(e,t){let i=O_(e);null!==t.validator?e.setValidators(D_(i,t.validator)):"function"==typeof i&&e.setValidators([i]);let n=B_(e);null!==t.asyncValidator?e.setAsyncValidators(D_(n,t.asyncValidator)):"function"==typeof n&&e.setAsyncValidators([n]);let r=()=>e.updateValueAndValidity();fS(t._rawValidators,r),fS(t._rawAsyncValidators,r)}function gS(e,t){let i=!1;if(null!==e){if(null!==t.validator){let n=O_(e);if(Array.isArray(n)&&n.length>0){let r=n.filter((e=>e!==t.validator));r.length!==n.length&&(i=!0,e.setValidators(r))}}if(null!==t.asyncValidator){let n=B_(e);if(Array.isArray(n)&&n.length>0){let r=n.filter((e=>e!==t.asyncValidator));r.length!==n.length&&(i=!0,e.setAsyncValidators(r))}}}let n=()=>{};return fS(t._rawValidators,n),fS(t._rawAsyncValidators,n),i}function bS(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function yS(e,t){mS(e,t)}function vS(e,t){if(!e.hasOwnProperty("model"))return!1;let i=e.model;return!!i.isFirstChange()||!Object.is(t,i.currentValue)}function wS(e,t){e._syncPendingControls(),t.forEach((e=>{let t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)}))}function _S(e,t){if(!t)return null;let i,n,r;return Array.isArray(t),t.forEach((e=>{e.constructor===d_?i=e:function(e){return Object.getPrototypeOf(e.constructor)===r_}(e)?n=e:r=e})),r||n||i||null}var SS={provide:U_,useExisting:An((()=>IS))},CS=Promise.resolve(),IS=(()=>{class e extends U_{get submitted(){return Hg(this.submittedReactive)}constructor(e,t,i){super(),this.callSetDisabledState=i,this._submitted=Wg((()=>this.submittedReactive())),this.submittedReactive=$p(!1),this._directives=new Set,this.ngSubmit=new _l,this.form=new oS({},T_(e),E_(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){CS.then((()=>{let t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),pS(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)}))}getControl(e){return this.form.get(e.path)}
1removeControl(e){CS.then((()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name),this._directives.delete(e)}))}addFormGroup(e){CS.then((()=>{let t=this._findContainer(e.path),i=new oS({});yS(i,e),t.registerControl(e.name,i),i.updateValueAndValidity({emitEvent:!1})}))}removeFormGroup(e){CS.then((()=>{let t=this._findContainer(e.path);t&&t.removeControl(e.name)}))}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){CS.then((()=>{this.form.get(e.path).setValue(t)}))}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),wS(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static{this.ɵfac=function(t){return new(t||e)($d(h_,10),$d(f_,10),$d(cS,8))}}static{this.ɵdir=ts({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&jf("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[xm([SS]),Wp]})}}return e})();function AS(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}function kS(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}var xS=class extends aS{constructor(e=null,t,i){super(tS(t),iS(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),nS(t)&&(t.nonNullable||t.initialValueIsDefault)&&(kS(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach((e=>e(this.value,!1!==t.emitViewToModelChange))),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){AS(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){AS(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){kS(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},TS={provide:V_,useExisting:An((()=>ES))},PS=Promise.resolve(),ES=(()=>{class e extends V_{constructor(e,t,i,n,r,s){super(),this._changeDetectorRef=r,this.callSetDisabledState=s,this.control=new xS,this._registered=!1,this.name="",this.update=new _l,this._parent=e,this._setValidators(t),this._setAsyncValidators(i),this.valueAccessor=_S(0,n)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let t=e.name.previousValue;this.formDirective.removeControl({name:t,path:this._getPath(t)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),vS(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){pS(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){PS.then((()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()}))}_updateDisabled(e){let t=e.isDisabled.currentValue,i=0!==t&&zg(t);PS.then((()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()}))}_getPath(e){return this._parent?uS(e,this._parent):[e]}static{this.ɵfac=function(t){return new(t||e)($d(U_,9),$d(h_,10),$d(f_,10),$d(s_,10),$d(kg,8),$d(cS,8))}}static{this.ɵdir=ts({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[xm([TS]),Wp,ga]})}}return e})(),DS=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵdir=ts({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return e})(),OS={provide:s_,useExisting:An((()=>BS)),multi:!0},BS=(()=>{class e extends r_{writeValue(e){let t=e??"";this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{e(""==t?null:parseFloat(t))}}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&jf("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[xm([OS]),Wp]})}}return e})(),MS={provide:s_,useExisting:An((()=>LS)),multi:!0},RS=(()=>{class e{constructor(){this._accessors=[]}add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}
1select(e){this._accessors.forEach((t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)}))}_isSameGroup(e,t){return!!e[0].control&&(e[0]._parent===t._control._parent&&e[1].name===t.name)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),LS=(()=>{class e extends r_{constructor(e,t,i,n){super(e,t),this._registry=i,this._injector=n,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=cr(cS,{optional:!0})??dS}ngOnInit(){this._control=this._injector.get(V_),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Vl),$d(RS),$d(fl))}}static{this.ɵdir=ts({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&jf("change",(function(){return t.onChange()}))("blur",(function(){return t.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[xm([MS]),Wp]})}}return e})(),FS=new Fn(""),NS={provide:U_,useExisting:An((()=>US))},US=(()=>{class e extends U_{get submitted(){return Hg(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,t,i){super(),this.callSetDisabledState=i,this._submitted=Wg((()=>this._submittedReactive())),this._submittedReactive=$p(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new _l,this._setValidators(e),this._setAsyncValidators(t)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(gS(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange((()=>{})))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let t=this.form.get(e.path);return pS(t,e,this.callSetDisabledState),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}
1removeControl(e){hS(e.control||null,e,!1),function(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,t){this.form.get(e.path).setValue(t)}onSubmit(e){return this._submittedReactive.set(!0),wS(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new X_(this.control)),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new eS(this.form))}_updateDomValue(){this.directives.forEach((e=>{let t=e.control,i=this.form.get(e.path);t!==i&&(hS(t||null,e),(e=>e instanceof xS)(i)&&(pS(i,e,this.callSetDisabledState),e.control=i))})),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let t=this.form.get(e.path);yS(t,e),t.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let t=this.form.get(e.path);t&&function(e,t){return gS(e,t)}(t,e)&&t.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange((()=>{}))}_updateValidators(){mS(this.form,this),this._oldForm&&gS(this._oldForm,this)}_checkFormPresent(){this.form}static{this.ɵfac=function(t){return new(t||e)($d(h_,10),$d(f_,10),$d(cS,8))}}static{this.ɵdir=ts({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&jf("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[xm([NS]),Wp,ga]})}}return e})(),VS={provide:V_,useExisting:An((()=>qS))},qS=(()=>{class e extends V_{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,t,i,n,r){super(),this._ngModelWarningConfig=r,this._added=!1,this.name=null,this.update=new _l,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(t),this._setAsyncValidators(i),this.valueAccessor=_S(0,n)}ngOnChanges(e){this._added||this._setUpControl(),vS(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return uS(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.ɵfac=function(t){return new(t||e)($d(U_,13),$d(h_,10),$d(f_,10),$d(s_,10),$d(FS,8))}}static{this.ɵdir=ts({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[xm([VS]),Wp,ga]})}}return e})(),$S={provide:s_,useExisting:An((()=>zS)),multi:!0};function jS(e,t){return null==e?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}var zS=(()=>{class e extends r_{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let t=jS(this._getOptionId(e),e);this.setProperty("value",t)}registerOnChange(e){this.onChange=t=>{this.value=this._getOptionValue(t),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let t of this._optionMap.keys())if(this._compareWith(this._optionMap.get(t),e))return t;return null}_getOptionValue(e){let t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&jf("change",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[xm([$S]),Wp]})}}return e})(),WS=(()=>{class e{constructor(e,t,i){this._element=e,this._renderer=t,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(jS(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id
1),this._select.writeValue(this._select.value))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(dp),$d(zS,9))}}static{this.ɵdir=ts({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})(),HS={provide:s_,useExisting:An((()=>GS)),multi:!0};function YS(e,t){return null==e?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}var GS=(()=>{class e extends r_{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let t;if(this.value=e,Array.isArray(e)){let i=e.map((e=>this._getOptionId(e)));t=(e,t)=>{e._setSelected(i.indexOf(t.toString())>-1)}}else t=(e,t)=>{e._setSelected(!1)};this._optionMap.forEach(t)}registerOnChange(e){this.onChange=t=>{let i=[],n=t.selectedOptions;if(void 0!==n){let e=n;for(let t=0;t<e.length;t++){let n=e[t],r=this._getOptionValue(n.value);i.push(r)}}else{let e=t.options;for(let t=0;t<e.length;t++){let n=e[t];if(n.selected){let e=this._getOptionValue(n.value);i.push(e)}}}this.value=i,e(i)}}_registerOption(e){let t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}_getOptionId(e){for(let t of this._optionMap.keys())if(this._compareWith(this._optionMap.get(t)._value,e))return t;return null}_getOptionValue(e){let t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&jf("change",(function(e){return t.onChange(e.target)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[xm([HS]),Wp]})}}return e})(),KS=(()=>{class e{constructor(e,t,i){this._element=e,this._renderer=t,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(YS(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(YS(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(dp),$d(GS,9))}}static{this.ɵdir=ts({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();function QS(e){return"number"==typeof e?e:parseFloat(e)}var JS=(()=>{class e{constructor(){this._validator=__}ngOnChanges(e){if(this.inputName in e){let t=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(t),this._validator=this._enabled?this.createValidator(t):__,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵdir=ts({type:e,features:[ga]})}}return e})(),ZS={provide:h_,useExisting:An((()=>XS)),multi:!0},XS=(()=>{class e extends JS{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>QS(e),this.createValidator=e=>y_(e)}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&gh("max",t._enabled?t.max:null)},inputs:{max:"max"},features:[xm([ZS]),Wp]})}}return e})(),eC={provide:h_,useExisting:An((()=>tC)),multi:!0},tC=(()=>{class e extends JS{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>QS(e),this.createValidator=e=>b_(e)}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&gh("min",t._enabled?t.min:null)},inputs:{min:"min"},features:[xm([eC]),Wp]})}}return e})(),iC={provide:h_,useExisting:An((()=>nC)),multi:!0},nC=(()=>{class e extends JS{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=zg,this.createValidator=e=>v_}
1enabled(e){return e}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,t){2&e&&gh("required",t._enabled?"":null)},inputs:{required:"required"},features:[xm([iC]),Wp]})}}return e})(),rC={provide:h_,useExisting:An((()=>sC)),multi:!0},sC=(()=>{class e extends JS{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>function(e){return"number"==typeof e?e:parseInt(e,10)}(e),this.createValidator=e=>w_(e)}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵdir=ts({type:e,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,t){2&e&&gh("maxlength",t._enabled?t.maxlength:null)},inputs:{maxlength:"maxlength"},features:[xm([rC]),Wp]})}}return e})(),aC=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({})}}return e})(),oC=class extends aS{constructor(e,t,i){super(tS(t),iS(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange((()=>{})),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange((()=>{})),this.controls.splice(n,1),t&&(this.controls.splice(n,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){sS(this,0,e),e.forEach(((e,i)=>{rS(this,!1,i),this.at(i).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})})),this.updateValueAndValidity(t)}patchValue(e,t={}){null!=e&&(e.forEach(((e,i)=>{this.at(i)&&this.at(i).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})})),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild(((i,n)=>{i.reset(e[n],{onlySelf:!0,emitEvent:t.emitEvent})})),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map((e=>e.getRawValue()))}clear(e={}){this.controls.length<1||(this._forEachChild((e=>e._registerOnCollectionChange((()=>{})))),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce(((e,t)=>!!t._syncPendingControls()||e),!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach(((t,i)=>{e(t,i)}))}_updateValue(){this.value=this.controls.filter((e=>e.enabled||this.disabled)).map((e=>e.value))}_anyControls(e){return this.controls.some((t=>t.enabled&&e(t)))}_setUpControls(){this._forEachChild((e=>this._registerControl(e)))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function lC(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}var cC=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){let t=new e;return t.useNonNullable=!0,t}group(e,t=null){let i=this._reduceControls(e),n={};return lC(t)?n=t:null!==t&&(n.validators=t.validator,n.asyncValidators=t.asyncValidator),new oS(i,n)}record(e,t=null){let i=this._reduceControls(e);return new lS(i,t)}control(e,t,i){let n={};return this.useNonNullable?(lC(t)?n=t:(n.validators=t,n.asyncValidators=i),new xS(e,f(h({},n),{nonNullable:!0}))):new xS(e,t,i)}array(e,t,i){let n=e.map((e=>this._createControl(e)));return new oC(n,t,i)}_reduceControls(e){let t={};return Object.keys(e).forEach((i=>{t[i]=this._createControl(e[i])})),t}_createControl(e){if(e instanceof xS)return e;if(e instanceof aS)return e;if(Array.isArray(e)){let t=e[0],i=e.length>1?e[1]:null,n=e.length>2?e[2]:null;return this.control(t,i,n)}return this.control(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),dC=(()=>{class e extends cC{group(e,t=null){return super.group(e,t)}control(e,t,i){return super.control(e,t,i)}array(e,t,i){return super.array(e,t,i)}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),uC=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:cS,useValue:t.callSetDisabledState??dS}]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[aC]})}}return e})(),pC=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:FS,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:cS,useValue:t.callSetDisabledState??dS}]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[aC]})}}return e})(),hC={dev1:{currentEnv:"dev1",baseURL:"https://www-dev1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3de9c228a6c54067a4d1206635490f46"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/qapub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},phoneValidationApiConfig:{url:"/abs/qapub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"2c14fc21f1fa4808a4d0ba3bb340993f"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/qapub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ac88959aa3e7454f8101e750db268046",occasionsApimSubscriptionKeyValue:"fd12929140674f72b330b66dbb25e281"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"}},dev2:{currentEnv:"qa1",baseURL:"https://www-dev2.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3de9c228a6c54067a4d1206635490f46"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/qapub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},phoneValidationApiConfig:{url:"/abs/qapub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"2c14fc21f1fa4808a4d0ba3bb340993f"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/qapub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ac88959aa3e7454f8101e750db268046",occasionsApimSubscriptionKeyValue:"fd12929140674f72b330b66dbb25e281"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"}},dev3:{currentEnv:"qa1",baseURL:"https://www-dev3.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"cb8c6ba089134b799a5892ed7bb5dae9"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3de9c228a6c54067a4d1206635490f46"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/qapub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},phoneValidationApiConfig:{url:"/abs/qapub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"2c14fc21f1fa4808a4d0ba3bb340993f"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/qapub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ac88959aa3e7454f8101e750db268046",occasionsApimSubscriptionKeyValue:"fd12929140674f72b330b66dbb25e281"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"}},qa1:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",b2bURL:"https://business-qa1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"8ca6295a55f54368844b5982edc1cc01"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"493fe3f7844743df9ab27e7567c1ad4c"}},searchAPIDetails:{searchAPI:"/abs/qapub/xapi/search/substitute",searchParam:"https://www-qa1.{banner}.com",b2bSearchParam:"https://business-qa1.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"a6bbc777a82f45a9b1413af0ce35604f"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/qapub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},phoneValidationApiConfig:{url:"/abs/qapub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"e5de187e228548f6b45582598772ba0f"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/qapub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ac88959aa3e7454f8101e750db268046",occasionsApimSubscriptionKeyValue:"fd12929140674f72b330b66dbb25e281"},giftingServiceApiConfig:{url:"/abs/qapub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ba6c31c29bf942be8b1c6e2827659ca9"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"}},qa2:{currentEnv:"qa2",baseURL:"https://www-qa2.{banner}.com",b2bURL:"https://business-qa2.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/acceptancepub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"35570fd5f27f4d69948bafbb4dd4f878"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3a263a69aa984aa8ad5de53cca713221"}}
1,searchAPIDetails:{searchAPI:"/abs/acceptancepub/xapi/search/substitute",searchParam:"https://www-qa2.{banner}.com",b2bSearchParam:"https://business-qa2.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/acceptancepub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/acceptancepub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/acceptancepub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/acceptancepub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"26dfa6ab7afe4a88805ce9f5351b78b4"}},phoneValidationApiConfig:{url:"/abs/acceptancepub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"c4f7716ed68742cca9df7c00464f3b5d"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/acceptancepub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/acceptancepub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"df44d1ac74334df29eb18b3839bf5219",occasionsApimSubscriptionKeyValue:"d8c6d7783b604f618dd446e7c39c7c08"}},qa3:{currentEnv:"qa3",baseURL:"https://www-qa3.{banner}.com",b2bURL:"https://business-qa3.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/perfpub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"6eb4decfcd01473aa5ee0a690cc39006"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"264af10b2f75481f9ec25a2f063bd5b4"}},searchAPIDetails:{searchAPI:"/abs/perfpub/xapi/search/substitute",searchParam:"https://www-qa3.{banner}.com",b2bSearchParam:"https://business-qa3.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/perfpub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/perfpub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/perfpub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/perfpub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b029945667514b5a887e4764fa1f6df9"}},phoneValidationApiConfig:{url:"/abs/perfpub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"53ab6a95bc08480b9c8cedbbb11e9a27"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/perfpub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ac88959aa3e7454f8101e750db268046",occasionsApimSubscriptionKeyValue:"2da4442dd7fb43168a48531d63d27e0e"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"}},stage:{currentEnv:"stage",baseURL:"https://www-stage.{banner}.com",b2bURL:"https://business-stage.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/stgpub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"f8bee8d7e7d14a11ac8197d3088cbe3b"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"c75c6d07b4224d71b55b6bc257444724"}},searchAPIDetails:{searchAPI:"/abs/stgpub/xapi/search/substitute",searchParam:"https://www-stage.{banner}.com",b2bSearchParam:"https://business-stage.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"f42494b71bf94bd1b87f937a60ee990e"}},cartAPIDetails:{cartAPI:"/abs/stgpub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/stgpub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/stgpub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/stgpub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b67277d0d0d04e0da852c5e79b19b025"}},phoneValidationApiConfig:{url:"/abs/stgpub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"bed3466331d44e8daabc962503e0144a"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/stgpub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"0b29dc856d2e435fbd15dc9eb0736b7d",occasionsApimSubscriptionKeyValue:"2da4442dd7fb43168a48531d63d27e0e"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ea626f2cef694e27b2a09e68be854bcf"}},betaprod:{currentEnv:"prod",baseURL:"https://www-beta.{banner}.com",b2bURL:"https://business-beta.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/pub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"7bad9afbb87043b28519c4443106db06"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3de9c228a6c54067a4d1206635490f46"}},searchAPIDetails:{searchAPI:"/abs/pub/xapi/search/substitute",searchParam:"https://www-beta.{banner}.com",b2bSearchParam:"https://business-beta.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e914eec9448c4d5eb672debf5011cf8f"}},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/pub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/pubpub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/pub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"}},phoneValidationApiConfig:{url:"/abs/pub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"12cd42a69de6407fb55e61f8b57507ff"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/pub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"93ea2bc0cb144d7fa501fbb33288baa8",occasionsApimSubscriptionKeyValue:"2da4442dd7fb43168a48531d63d27e0e"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8cbb4e2e1c2748a8af03905fd1d99bab"}},prod:{currentEnv:"prod",baseURL:"https://www.{banner}.com",b2bURL:"https://business.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/pub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"7bad9afbb87043b28519c4443106db06"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""}
1,subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"0e9416f34249491ebed42fad1cad9681"}},searchAPIDetails:{searchAPI:"/abs/pub/xapi/search/substitute",searchParam:"https://www.{banner}.com",b2bSearchParam:"https://business.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"e914eec9448c4d5eb672debf5011cf8f"}},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/pub/erums/orderservice/api/v2/orders/",giftCartAPI:"/abs/pub/erums/cartservice/api/v2/cart/",editGiftCartAPI:"/abs/pub/erums/orderservice/api/v1/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"}},phoneValidationApiConfig:{url:"/abs/pub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"12ce42a69de6407fb55e61f8b57507ff"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/pub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/pub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"93ea2bc0cb144d7fa501fbb33288baa8",occasionsApimSubscriptionKeyValue:"1d8f9e6f8b0d4ce29468d6d82f5847b8"},giftingServiceApiConfig:{url:"/abs/pub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8cbb4e2e1c2748a8af03905fd1d99bab"}},local:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",substitutionAPIDetails:{substitutionAPI:"/abs/qapub/xapi/pdreco/substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"8ca6295a55f54368844b5982edc1cc01"}},autoClipSubstitutionApiConfig:{substitutionAPI:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",xtokenHeader:{key:"X-access-token",value:""},subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3de9c228a6c54067a4d1206635490f46"}},searchAPIDetails:{searchAPI:"/abs/qapub/xapi/search/substitute",searchParam:"https://www-qa1.{banner}.com",subscriptionKey:{key:"ocp-apim-subscription-key",value:"061d4366162045c6879eca9eab9b7e89"}},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v2/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},phoneValidationApiConfig:{url:"/abs/qapub/cnc/ccvsservice",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"e5de187e228548f6b45582598772ba0f"},loggerAPIDetails:{loggerAPI:"/erums/checkout/api/logger"},giftingServiceApiConfig:{url:"/abs/acceptancepub/erums/giftingservice/api/v1/gifts",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"fcc2fda7701b466c8198b8089cd32c7d"},giftingAiApi:{toneUrl:"/content/dam/gifting/tones-mapping.json",occasionsUrl:"/abs/qapub/cnc/ucaservice/api/uca/metadata/occasions/guest",aiMessageUrl:"/abs/pub/erums/genaicomposer/api/v1/message/rephrase",apimSubscriptionKeyHeader:"ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"ba6c31c29bf942be8b1c6e2827659ca9"}}},fC=(()=>{class e{static{this.SUTRO_BANNERS=["kingsfoodmarkets","albertsons","shopalbertsonsmarket","shopunitedsupermarkets"]}static{this.PRESIDIO_BANNERS=["andronicos","starmarket","haggen","shaws","shopamigos"]}static{this.FORT_POINT_BANNERS=["balduccis"]}static{this.BAKER_BANNERS=["pavilions"]}static{this.REDWOOD_BANNERS=["shopmarketstreet"]}buildHeaders(){let e=this.httpOptions;return e.headers=e.headers.set("Ocp-Apim-Subscription-Key",this.config[this.env].searchAPIDetails.subscriptionKey.value),e}buildHeaderForSubstitutionBpn(){let e=this.httpOptions;return e.headers=e.headers.set(this.config[this.env].substitutionAPIDetails.subscriptionKey.key,this.config[this.env].substitutionAPIDetails.subscriptionKey.value),e}buildHeadersForSavingNote(e,t,i,n,r){let s=this.httpOptions;return s.headers=s.headers.set("Ocp-Apim-Subscription-Key",r?i[t].giftingServiceApiConfig.apimSubscriptionKeyValue:i[t].cartAPIDetails.subscriptionKey.value),r&&(s.headers=s.headers.set("Context","CARTUI")),s.headers=s.headers.set("authorization","Bearer "+e),s.headers=s.headers.set("slotsRequired","true"),s}buildAutoClipSubstitutionHeaders(e,t,i){let n=this.httpOptions;return n.headers=n.headers.set(i[t].autoClipSubstitutionApiConfig.subscriptionKey.key,i[t].autoClipSubstitutionApiConfig.subscriptionKey.value),n.headers=n.headers.set("authorization","Bearer "+e),n.headers=n.headers.set("platform","web"),n}buildPhoneValidationHeaders(e,t,i,n){let r={headers:new jy({"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json","x-swy-banner":t,"x-swy-client-name":"osms-web","x-swy-correlation-id":this.create_sessionid()})};return null!==n[i].phoneValidationApiConfig.apimSubscriptionKeyValue&&(r.headers=r.headers.set(n[i].phoneValidationApiConfig.apimSubscriptionKeyHeader,n[i].phoneValidationApiConfig.apimSubscriptionKeyValue)),null!=e&&(r.headers=r.headers.set("Authorization","Bearer "+e)),r}buildHeaderForAiMessageApi(e,t,i){let n=this.httpOptions;return n.headers=n.headers.set(i[t].giftingAiApi.apimSubscriptionKeyHeader,i[t].giftingAiApi.apimSubscriptionKeyValue),n.headers=n.headers.set("authorization","Bearer "+e),n.headers=n.headers.set("platform","web"),n}buildHeadersForOccasion(e,t,i,n){let r=this.httpOptions,s=i[t].giftingAiApi;return r.headers=r.headers.set(s.apimSubscriptionKeyHeader,s.occasionsApimSubscriptionKeyValue).set("authorization",`Bearer ${e}`).set("platform","web").set("accept","application/vnd.safeway.v1+json").set("x-swy-banner",n).set("x-swy-client-name","web-portal").set("x-swy-correlation-id",this.create_sessionid()),r}buildHeadersForGifting(e,t,i){let n={headers:new jy({"Content-Type":"application/json","Cach-Control":"no-cache","x-swy-client-name":"web-portal",Context:t?"EDITORDERUI":"CARTUI"})};return e&&(n.headers=n.headers.set("Authorization","Bearer "+e)),i[this.env].giftingServiceApiConfig.apimSubscriptionKeyValue&&(n.headers=n.headers.set(i[this.env].giftingServiceApiConfig.apimSubscriptionKeyHeader,i[this.env].giftingServiceApiConfig.apimSubscriptionKeyValue)),n}constructor(e,t,i){this.http=e,this._aemService=t,this._utilService=i,this.rightDrawer=new kt,this.$rightDrawer=this.rightDrawer.asObservable(),this.config=hC,this.$prevItemID=new Tt(0),this.prevItemID=this.$prevItemID.asObservable(),this.$subErrorEvent=ne
1w kt,this.subErrorEvent=this.$subErrorEvent.asObservable(),this.accessToken="",this.httpOptions={headers:new jy({"Content-Type":"application/json","Cache-Control":"no-cache"})},window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?this.env="qa1":window.location.origin.indexOf("beta")>0?this.env="betaprod":this.env="prod"}create_sessionid(){let e=(new Date).getTime();return"xxxHxxxx-xxxx-Pxxx-yxxx-yyxy-xxxxxxx_xxxx".replace(/[xy]/g,(function(t){let i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))}getSearchItem(e,t,i,n,r,s,a,o){if(a){let t,s=this.buildAutoClipSubstitutionHeaders(o,this.env,this.config),a=this.config[this.env].autoClipSubstitutionApiConfig.searchAutoClipSub;try{t=JSON.parse(window.SWY?.CONFIGSERVICE?.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.houseId||JSON.parse(this.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.houseId}catch(e){t="350021886020",console.log("getSubstitutionProducts",e)}let l={storeId:i,hhid:t,channel:"dug"===r?"pickup":r,banner:n,includeOffer:"true",requestId:Math.floor(1e13*Math.random()),url:window.location.hostname,pageurl:window.location.hostname,searchText:e};return this.http.post(a,l,s).pipe(bi((e=>e.productsInfo?(e.response={},e.response.docs=e.productsInfo[0].substituteList,e.response.numFound=e.productsInfo[0].substituteList.length,e):[])))}{let a=this._aemService.getUserChannel()?this._aemService.getUserChannel():"dug"===r?"pickup":r,o=this._aemService.getDisableInStoreChannelCheck(),l=this._aemService.getUidValue()?this._aemService.getUidValue():"";o&&"instore"===a&&(a="");let c=this._utilService.getGRSearchParams(a);return this.http.get(this.config[this.env].searchAPIDetails.searchAPI+"?request-id="+Math.floor(1e13*Math.random())+"&url="+("1P_B2B"===s?this.config[this.env].searchAPIDetails.b2bSearchParam.replace(/\{banner\}/g,n):this.config[this.env].searchAPIDetails.searchParam.replace(/\{banner\}/g,n))+"&pageurl="+("1P_B2B"===s?this.config[this.env].searchAPIDetails.b2bSearchParam.replace(/\{banner\}/g,n):this.config[this.env].searchAPIDetails.searchParam.replace(/\{banner\}/g,n))+"&pagename=search&rows=7&start="+t+"&search-type=keyword&storeid="+i+"&featured=true&search-uid="+l+"&q="+e+(a.length?`&channel=${a}`:"")+"&banner="+n+c,this.buildHeaders())}}saveItemNote(e,t,i,n,r,s,a,o,l,c,d,u,p,h){let f="1P_B2B"===d?this.config[this.env].b2bURL.replace(/\{banner\}/g,a):this.config[this.env].baseURL.replace(/\{banner\}/g,a);if(n)return this.http.post(f+this.config[this.env].cartAPIDetails.editCartAPI+r+"/"+s+"/orderItems/"+t+"?module=EDITCART",i,this.buildHeadersForSavingNote(o,this.env,this.config,h,""));{let e="b"===window.analyticsSwy?.testFlags?.abACIP141528;return this.http.post(f+this.config[this.env].cartAPIDetails.cartAPI+"items?serviceType="+l+"&storeId="+r+"&zipCode="+c+("1P_B2B"===d?"&cartCategoryList=1P_B2B":"&cartCategoryList=1P,3P_MARKETPLACE,1P_Wine")+"&expressChk=true"+(e?"&tax=true":""),i,this.buildHeadersForSavingNote(o,this.env,this.config,h,""))}}getAccessToken(){return this._aemService.getSWY_SHOP_TOKEN()?this._aemService.getSWY_SHOP_TOKEN():this.accessToken}getSubstitutionProducts(e,t,i,n,r,s,a,o,l,c){let d;a||JSON.parse(window.SWY?.CONFIGSERVICE?.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.preference.toLowerCase();try{d=JSON.parse(window.SWY?.CONFIGSERVICE?.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.houseId||JSON.parse(this.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.houseId}catch(e){d="350021886020",console.log("getSubstitutionProducts",e)}if(l){let t=this.buildAutoClipSubstitutionHeaders(c,this.env,this.config),n=this.config[this.env].autoClipSubstitutionApiConfig.substitutionAPI,r={bpn:e,storeId:i,hhid:d,placement:"cart",banner:"safeway",channel:a,includeOffer:"true"};return this.http.post(n,r,t).pipe(bi((e=>o?e:0==e.ack&&e.productsInfo?e.productsInfo:[])))}{let n=this.buildHeaderForSubstitutionBpn();window.sessionStorage.setItem("analytics_subs_prodId",e);let l=this.getSubstitutionEndpoint(e,t,i,d,r,s,a);return this.http.get(l,n).pipe(bi((e=>o?e:0==e.ack&&e.productsinfo?e.productsinfo:[])))}}getSubstitutionEndpoint(e,t,i,n,r,s,a){return`${this.config[this.env].substitutionAPIDetails.substitutionAPI}?storeId=${i}&bpn=${e}&hhid=${n}${t&&t.length?`&substituteBpn=${t}`:""}${r?`&includeOffer=${r}`:""}${a&&a.length?`&channel=${a}`:""}${s?`&availabilityCheck=${s}`:""}`}updateGiftDetails(e,t,i,n,r,s,a,o){if(r)return this.http.put(this.config[this.env].cartAPIDetails.editGiftCartAPI+"gift",t,this.buildHeadersForSavingNote(i,this.env,this.config,[],s));if(s){if("delete"===o)return this.http.delete(this.config[this.env].giftingServiceApiConfig.url+"/correlation/"+a,this.buildHeadersForGifting(i,r,this.config));if("submit"===o)return this.http.post(this.config[this.env].giftingServiceApiConfig.url,t,this.buildHeadersForGifting(i,r,this.config))}return this.http.post(this.config[this.env].cartAPIDetails.giftCartAPI+e+"/gift",t,this.buildHeadersForSavingNote(i,this.env,this.config,[],s))}giftingPartialUpdate(e,t,i,n,r,s,a){return a=r?e:a,this.http.put(this.config[this.env].giftingServiceApiConfig.url+"/correlation/"+a,t,this.buildHeadersForGifting(i,r,this.config))}validatePhoneNumber(e,t,i,n){return this.http.post(this.config[this.env].phoneValidationApiConfig.url+"/api/ccvs/customers/"+e+"/validate-phone",t,this.buildPhoneValidationHeaders(i,n,this.env,this.config))}getGiftingAiTones(){return this.http.get(this.config[this.env].giftingAiApi.toneUrl)}getGiftingOccasions(e,t){return this.http.get(this.config[this.env].giftingAiApi.occasionsUrl,this.buildHeadersForOccasion(e,this.env,this.config,t))}
1rephraseGiftMessage(e,t){return this.http.post(this.config[this.env].giftingAiApi.aiMessageUrl,e,this.buildHeaderForAiMessageApi(t,this.env,this.config))}getDynamicStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#fff",color:"#004488",border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#fff",color:"#1F520E",border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#fff",color:"#A83111",border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#fff",color:"#484440",border:"solid 1px #484440"}:e.REDWOOD_BANNERS.includes(i)?{"background-color":"#fff",color:"#D44406",border:"solid 1px #D44406"}:{"background-color":"#fff",color:"#8C0E12",border:"solid 1px #8C0E12"}}getDynamicSelectedStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#004488",color:"#fff",border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#1F520E",color:"#fff",border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#A83111",color:"#fff",border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#484440",color:"#fff",border:"solid 1px #484440"}:e.REDWOOD_BANNERS.includes(i)?{"background-color":"#D44406",color:"#fff",border:"solid 1px #D44406"}:{"background-color":"#8C0E12",color:"#fff",border:"solid 1px #8C0E12"}}getPrimaryColor(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{color:"#004488"}:e.PRESIDIO_BANNERS.includes(i)?{color:"#1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{color:"#A83111"}:e.BAKER_BANNERS.includes(i)?{color:"#484440"}:e.REDWOOD_BANNERS.includes(i)?{color:"#D44406"}:{color:"#8C0E12"}}getBackgroundPrimaryColor(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#484440"}:e.REDWOOD_BANNERS.includes(i)?{"background-color":"#D44406"}:{"background-color":"#8C0E12"}}getBorderPrimaryColor(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"border-color":"#004488"}:e.PRESIDIO_BANNERS.includes(i)?{"border-color":"#1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"border-color":"#A83111"}:e.BAKER_BANNERS.includes(i)?{"border-color":"#484440"}:e.REDWOOD_BANNERS.includes(i)?{"border-color":"#D44406"}:{"border-color":"#8C0E12"}}getConfirmButtonStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#004488",color:"#fff",border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#1F520E",color:"#fff",border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#A83111",color:"#fff",border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#484440",color:"#fff",border:"solid 1px #484440"}:e.REDWOOD_BANNERS.includes(i)?{"background-color":"#D44406",color:"#fff",border:"solid 1px #D44406"}:{"background-color":"#8C0E12",color:"#fff",border:"solid 1px #8C0E12"}}getContainerHeight(e){let t="",i=document.getElementById("substitution-modal");i?(i.classList.remove("subs-modal-minicart","subs-modal-cart"),t=e?"subs-modal-minicart":"subs-modal-cart",i.classList.add(t)):console.warn("substitution-modal element not found in DOM")}readMessage(e,t=0){let i=document.createElement("div"),n="speak-"+Date.now();i.setAttribute("id",n),i.setAttribute("role","alert"),i.setAttribute("aria-live","assertive"),i.classList.add("sr-only"),document.body.appendChild(i),window.setTimeout((function(){document.getElementById(n).innerHTML=e}),t),window.setTimeout((function(){document.body.removeChild(document.getElementById(n))}),t+1500)}setTrapFocus(e,t=!0){let i='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), span[role="button"], a[role="button"], img[role="button"]',n=document.querySelector(e),r=n.querySelectorAll(i)[0],s=n.querySelectorAll(i),a=s[s.length-1];document.addEventListener("keydown",(function(e){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===r&&(a.focus(),e.preventDefault()):document.activeElement===a&&(r.focus(),e.preventDefault()))})),t&&this.setFocusableItem(r)}setFocusableItem(e){e&&setTimeout((()=>{e.focus()}),100)}getCookie(e){let t=(e=this.validateBizCookie(e))+"=",i=decodeURIComponent(document.cookie).split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return""}
1validateBizCookie(e){return e.startsWith("B_")?e:window.isBizDomain?`B_${e}`:e}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(Sw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),mC=e=>({"py-3 px-1 px-sm-3 selected-item mx-0":e}),gC=(e,t)=>({clipped:e,"not-clipped":t});function bC(e,t){1&e&&(kf(0,"span",13),am(1,"Past choice"),xf())}function yC(e,t){if(1&e&&(kf(0,"span")(1,"span"),am(2," / "),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(3).$implicit;Vd(4),lm(e.displayUnitQuantityText)}}function vC(e,t){if(1&e&&(kf(0,"div",17)(1,"b",18),am(2),qm(3,"currency"),ph(4,yC,5,1,"span",2),xf(),kf(5,"span",19),am(6),qm(7,"currency"),xf(),kf(8,"s",20),am(9),qm(10,"currency"),xf(),kf(11,"span",21),am(12),qm(13,"currency"),xf()()),2&e){let e,t=Yf(2).$implicit;Vd(2),cm(" ",jm(3,6,t.price,"USD")," "),Vd(2),zh("ngIf",null==t?null:t.displayUnitQuantityText),Vd(2),dm("",jm(7,9,t.price,"USD")," ","ea"===t.displayUnitQuantityText?"each":"per "+(null!==(e=t.displayUnitQuantityText)&&void 0!==e?e:"")," "),Vd(3),lm(jm(10,12,t.basePrice,"USD")),Vd(3),cm(" deleted ",jm(13,15,t.basePrice,"USD"),"")}}function wC(e,t){if(1&e&&(kf(0,"span",24),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),lm(e.displayUnitQuantityText)}}function _C(e,t){if(1&e&&(kf(0,"label",22),am(1),qm(2,"currency"),ph(3,wC,2,1,"span",23),xf()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),cm("",jm(2,2,e.basePrice,"USD")," "),Vd(2),zh("ngIf",t.isMultiSelect)}}function SC(e,t){if(1&e&&(kf(0,"label",25),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm("($",e.pricePer," "),Vd(5),cm(" ",e.unitQuantity,")")}}function CC(e,t){if(1&e&&(Ef(0),ph(1,vC,14,18,"div",14)(2,_C,4,5,"ng-template",null,0,Wm),kf(4,"label",15),am(5),xf(),ph(6,SC,7,2,"label",16),Df()),2&e){let e=sm(3),t=Yf().$implicit,i=Yf(3);Vd(),zh("ngIf",t.price<t.basePrice)("ngIfElse",e),Vd(3),Yh("multi-sub",i.isMultiSelect),Vd(),cm("",t.name," "),Vd(),zh("ngIf",!i.isMultiSelect)}}function IC(e,t){if(1&e&&(kf(0,"span")(1,"span"),am(2," / "),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(4).$implicit;Vd(4),lm(e.itemPrice.displayUnitQuantityText)}}function AC(e,t){if(1&e&&(kf(0,"div",17)(1,"b",28)(2,"span",20),am(3),qm(4,"currency"),ph(5,IC,5,1,"span",2),xf(),kf(6,"span",19),am(7),qm(8,"currency"),xf()(),kf(9,"s",20),am(10),xf(),kf(11,"span",21),am(12),qm(13,"currency"),xf()()),2&e){let e,t=Yf(3).$implicit;Vd(3),cm(" ",jm(4,6,t.itemPrice.price,"USD")," "),Vd(2),zh("ngIf",null==t.itemPrice?null:t.itemPrice.displayUnitQuantityText),Vd(2),dm("",jm(8,9,t.price,"USD")," ","ea"===t.displayUnitQuantityText?"each":"per "+(null!==(e=t.displayUnitQuantityText)&&void 0!==e?e:"")," "),Vd(3),cm("$",t.itemPrice.basePrice,""),Vd(2),cm(" deleted ",jm(13,12,t.basePrice,"USD"),"")}}function kC(e,t){if(1&e&&(kf(0,"label",22),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm("$ ",e.itemPrice?e.itemPrice.basePrice:e.basePrice,"")}}function xC(e,t){if(1&e&&(kf(0,"div"),ph(1,AC,14,15,"div",14)(2,kC,2,1,"ng-template",null,0,Wm),xf()),2&e){let e=sm(3),t=Yf(2).$implicit;Vd(),zh("ngIf",t.itemPrice.price<t.itemPrice.basePrice)("ngIfElse",e)}}function TC(e,t){1&e&&(kf(0,"span",26),am(1," per "),xf())}function PC(e,t){if(1&e&&(kf(0,"span")(1,"span",20),am(2," / "),xf(),ph(3,TC,2,0,"span",30),kf(4,"span",20),am(5),xf(),kf(6,"span",26),am(7),xf()()),2&e){let e=Yf(4).$implicit;Vd(3),zh("ngIf","ea"!==e.displayUnitQuantityText),Vd(2),lm(e.displayUnitQuantityText),Vd(2),cm(" ","ea"===e.displayUnitQuantityText?"each":e.displayUnitQuantityText,"")}}function EC(e,t){if(1&e&&(kf(0,"div",17)(1,"b",28),Tf(2,"span",26),am(3),qm(4,"currency"),ph(5,PC,8,3,"span",2),xf(),kf(6,"s",29),Tf(7,"span",26),am(8),xf()()),2&e){let e=Yf(3).$implicit;Vd(3),cm(" ",jm(4,3,e.price,"USD")," "),Vd(2),zh("ngIf",null==e?null:e.displayUnitQuantityText),Vd(3),cm(" $",e.basePrice," ")}}function DC(e,t){if(1&e&&(kf(0,"label",22),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm("$ ",e.basePrice,"")}}function OC(e,t){if(1&e&&(kf(0,"div"),ph(1,EC,9,6,"div",14)(2,DC,2,1,"ng-template",null,0,Wm),xf()),2&e){let e=sm(3),t=Yf(2).$implicit;Vd(),zh("ngIf",t.price<t.basePrice)("ngIfElse",e)}}function BC(e,t){if(1&e&&(kf(0,"label",25),am(1),kf(2,"span",20),am(3," / "),xf(
1),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm("$ ",e.itemPrice.pricePer," "),Vd(5),cm(" ",e.itemPrice.unitQuantity,"")}}function MC(e,t){if(1&e&&(kf(0,"label",25),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm("($ ",e.pricePer," "),Vd(5),cm(" ",e.unitQuantity,")")}}function RC(e,t){if(1&e&&(Ef(0),ph(1,xC,4,2,"div",2)(2,OC,4,2,"div",2),kf(3,"label",15),am(4),xf(),ph(5,BC,7,2,"label",27)(6,MC,7,2,"ng-template",null,1,Wm),Df()),2&e){let e=sm(7),t=Yf().$implicit;Vd(),zh("ngIf",t.itemPrice),Vd(),zh("ngIf",!t.itemPrice),Vd(2),cm("",t.itemPrice?t.itemDescription:t.name," "),Vd(),zh("ngIf",t.itemPrice)("ngIfElse",e)}}function LC(e,t){if(1&e&&Tf(0,"img",38),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function FC(e,t){if(1&e&&Tf(0,"img",39),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function NC(e,t){if(1&e&&(kf(0,"div",40)(1,"label",41),am(2),xf()()),2&e){let e=Yf(2).$implicit,t=Yf(3);Jf("id","collapse"+e.id),Vd(2),lm(t.prop65Text)}}function UC(e,t){if(1&e){let e=Mf();kf(0,"div",31),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).toggleCollapse(t))})),Tf(1,"img",32),kf(2,"span",33)(3,"label",34),am(4,"Prop 65 WARNING"),xf(),ph(5,LC,1,1,"img",35)(6,FC,1,1,"img",36),xf(),ph(7,NC,3,2,"div",37),xf()}if(2&e){let e=Yf().$implicit;Vd(),gh("data-target","#collapse"+e.id),Vd(),gh("data-target","#collapse"+e.id),Vd(3),zh("ngIf",!e.prop65Open),Vd(),zh("ngIf",e.prop65Open),Vd(),zh("ngIf",e.prop65Open)}}function VC(e,t){if(1&e){let e=Mf();kf(0,"button",46),jf("click",(function(t){Wa(e);let i=Yf(2).$implicit;return Ha(Yf(3).selectedItem(t,i))}
1)),am(1,"Select"),xf()}if(2&e){let e=Yf(2).$implicit;zh("ngStyle",Yf(3).getDynamicStyle()),gh("aria-label","select "+e.name)}}function qC(e,t){if(1&e&&(kf(0,"button",47),am(1,"Selected"),xf()),2&e){gh("aria-label","Selected "+Yf(2).$implicit.name)}}function $C(e,t){if(1&e){let e=Mf();kf(0,"a",48),jf("click",(function(t){Wa(e);let i=Yf(5);return Ha(i.changeSelectedItem(t,i.originalProduct))}))("keyup.enter",(function(t){Wa(e);let i=Yf(5);return Ha(i.changeSelectedItem(t,i.originalProduct))})),am(1,"Change"),Tf(2,"img",49),xf()}if(2&e){let e=Yf(2).$implicit;Zf("id","change-substitute-ada-",e.id,""),gh("aria-label","Change Substitute Item "+e.name)}}function jC(e,t){if(1&e&&(Ef(0),kf(1,"div",42),ph(2,VC,2,2,"button",43)(3,qC,2,1,"button",44)(4,$C,3,3,"a",45),xf(),Df()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(),Yh("text-right",t.isMultiSelect),Jf("id",e.id),Vd(),zh("ngIf",!t.isMultiSelect&&!e.isSelected),Vd(),zh("ngIf",!t.isMultiSelect&&e.isSelected),Vd(),zh("ngIf",t.isMultiSelect)}}function zC(e,t){if(1&e){let e=Mf();kf(0,"div",42)(1,"button",51),jf("click",(function(t){Wa(e);let i=Yf(2).$implicit;return Ha(Yf(3).selectedItem(t,i))}
1)),am(2,"Select"),xf()()}if(2&e){let e=Yf(2).$implicit,t=Yf(3);Jf("id",e.id),Vd(),zh("ngStyle",t.getDynamicStyle()),gh("aria-label","select "+e.name)}}function WC(e,t){if(1&e&&(kf(0,"div",42)(1,"button",52),am(2,"Selected"),xf()()),2&e){let e=Yf(2).$implicit;Zf("id","S",e.id,""),Vd(),gh("aria-label","Selected "+e.name)}}function HC(e,t){if(1&e&&(Ef(0),ph(1,zC,3,3,"div",50)(2,WC,3,3,"div",50),Df()),2&e){let e=Yf().$implicit;Vd(),zh("ngIf",!e.Subflag),Vd(),zh("ngIf",e.Subflag)}}function YC(e,t){if(1&e&&(kf(0,"div",6)(1,"div",7),ph(2,bC,2,0,"span",8),xf(),kf(3,"div",9),Tf(4,"img",10),xf(),kf(5,"div",11)(6,"div"),ph(7,CC,7,6,"ng-container",2)(8,RC,8,5,"ng-container",2)(9,UC,8,5,"div",12),xf()(),ph(10,jC,5,6,"ng-container",2)(11,HC,3,2,"ng-container",2),xf()),2&e){let e=t.$implicit,i=t.index,n=Yf(3);zh("ngClass",Om(10,mC,n.isMultiSelect)),Vd(2),zh("ngIf","selected"===(null==e?null:e.algoType)||"preferred"===(null==e?null:e.algoType)),Vd(2),Zf("id","subs-result-",i,""),Jf("src",e.thumnailUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Vd(3),zh("ngIf",!n.editOrderFlag),Vd(),zh("ngIf",n.editOrderFlag),Vd(),zh("ngIf",e&&e.prop65WarningIconRequired&&("true"===e.prop65WarningIconRequired||!0===e.prop65WarningIconRequired)),Vd(),zh("ngIf",n.isMultiSubSearch||n.isMultiSelect),Vd(),zh("ngIf",!n.isMultiSubSearch&&!n.isMultiSelect)}}function GC(e,t){if(1&e&&(Ef(0),kf(1,"form",3)(2,"span",4),am(3),xf(),ph(4,YC,12,12,"div",5),xf(),Df()),2&e){let e=Yf(2);Vd(),zh("formGroup",e.myform),Vd(2),cm("",e.adaStatusMessage," "),Vd(),zh("ngForOf",e.substitutionResponse)}}function KC(e,t){1&e&&(kf(0,"span",13),am(1,"Past choice"),xf())}function QC(e,t){if(1&e&&(kf(0,"span")(1,"span"),am(2," / "),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(3).$implicit;Vd(4),lm(e.displayUnitQuantityText)}}function JC(e,t){if(1&e&&(kf(0,"label",59),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm("($",e.pricePer," "),Vd(5),cm(" ",e.unitQuantity,")")}}function ZC(e,t){if(1&e&&(kf(0,"div",17)(1,"b",18),am(2),qm(3,"currency"),ph(4,QC,5,1,"span",2),xf(),kf(5,"span",19),am(6),qm(7,"currency"),xf(),kf(8,"s",20),am(9),qm(10,"currency"),xf(),kf(11,"span",21),am(12),qm(13,"currency"),xf(),ph(14,JC,7,2,"label",58),xf()),2&e){let e,t=Yf(2).$implicit,i=Yf(3);
1Vd(2),cm(" ",jm(3,7,t.price,"USD")," "),Vd(2),zh("ngIf",null==t?null:t.displayUnitQuantityText),Vd(2),dm("",jm(7,10,t.price,"USD")," ","ea"===t.displayUnitQuantityText?"each":"per "+(null!==(e=t.displayUnitQuantityText)&&void 0!==e?e:"")," "),Vd(3),lm(jm(10,13,t.basePrice,"USD")),Vd(3),cm(" deleted ",jm(13,16,t.basePrice,"USD"),""),Vd(2),zh("ngIf",!i.isMultiSelect)}}function XC(e,t){if(1&e&&(kf(0,"span",24),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),lm(e.displayUnitQuantityText)}}function eI(e,t){if(1&e&&(kf(0,"label",59),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm("($",e.pricePer," "),Vd(5),cm(" ",e.unitQuantity,")")}}function tI(e,t){if(1&e&&(kf(0,"button",47),am(1,"Selected"),xf()),2&e){gh("aria-label","Selected "+Yf(4).$implicit.name)}}function iI(e,t){if(1&e){let e=Mf();kf(0,"a",48),jf("click",(function(t){Wa(e);let i=Yf(7);return Ha(i.changeSelectedItem(t,i.originalProduct))}))("keyup.enter",(function(t){Wa(e);let i=Yf(7);return Ha(i.changeSelectedItem(t,i.originalProduct))})),am(1,"Change"),Tf(2,"img",49),xf()}if(2&e){let e=Yf(4).$implicit;Zf("id","change-substitute-ada-",e.id,""),gh("aria-label","Change Substitute Item "+e.name)}}function nI(e,t){if(1&e&&(Ef(0),kf(1,"div",61),ph(2,tI,2,1,"button",44)(3,iI,3,3,"a",45),xf(),Df()),2&e){let e=Yf(3).$implicit,t=Yf(3);Vd(),Yh("text-right",t.isMultiSelect),Jf("id",e.id),Vd(),zh("ngIf",!t.isMultiSelect&&e.isSelected),Vd(),zh("ngIf",t.isMultiSelect)}}function rI(e,t){if(1&e&&(kf(0,"label",60),am(1),qm(2,"currency"),ph(3,XC,2,1,"span",23),xf(),ph(4,eI,7,2,"label",58)(5,nI,4,5,"ng-container",2)),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),cm("",jm(2,4,e.basePrice,"USD")," "),Vd(2),zh("ngIf",t.isMultiSelect),Vd(),zh("ngIf",!t.isMultiSelect),Vd(),zh("ngIf",t.isMultiSubSearch||t.isMultiSelect)}}function sI(e,t){1&e&&Tf(0,"img",67)}function aI(e,t){1&e&&Tf(0,"img",68)}function oI(e,t){if(1&e&&(kf(0,"div",63),ph(1,sI,1,0,"img",64)(2,aI,1,0,"img",65),kf(3,"span",26),am(4),xf(),kf(5,"label",66),am(6),xf()()),2&e){let e=Yf().$implicit;Vd(),zh("ngIf","C"===(null==e?null:e.status)||!(null!=e&&e.isClippable)),Vd(),zh("ngIf","U"===(null==e?null:e.status)),Vd(2),dm("",null==e?null:e.ecomDescription," ","C"!==(null==e?null:e.status)&&null!=e&&e.isClippable?"U"===(null==e?null:e.status)?"coupon unclipped":"":"coupon clipped",""),Vd(),zh("ngClass",Bm(6,gC,"C"===(null==e?null:e.status)||!(null!=e&&e.isClippable),"U"===(null==e?null:e.status))),Vd(),lm(null==e?null:e.ecomDescription)}}function lI(e,t){if(1&e&&(kf(0,"div"),ph(1,oI,7,9,"div",62),xf()),2&e){let e=t.$implicit;Vd(),zh("ngIf",null==e?null:e.isDisplayable)}}function cI(e,t){if(1&e){let e=Mf();kf(0,"div",70)(1,"button",51),jf("click",(function(t){Wa(e);let i=Yf(3).$implicit;return Ha(Yf(3).selectedItem(t,i))}
1)),am(2,"Select"),xf()()}if(2&e){let e=Yf(3).$implicit,t=Yf(3);Jf("id",e.id),Vd(),zh("ngStyle",t.getDynamicStyle()),gh("aria-label","select "+e.name)}}function dI(e,t){if(1&e&&(kf(0,"div",70)(1,"button",52),am(2,"Selected"),xf()()),2&e){let e=Yf(3).$implicit;Zf("id","S",e.id,""),Vd(),gh("aria-label","Selected "+e.name)}}function uI(e,t){if(1&e&&(Ef(0),ph(1,cI,3,3,"div",69)(2,dI,3,3,"div",69),Df()),2&e){let e=Yf(2).$implicit;Vd(),zh("ngIf",!e.Subflag),Vd(),zh("ngIf",e.Subflag)}}function pI(e,t){if(1&e){let e=Mf();kf(0,"button",46),jf("click",(function(t){Wa(e);let i=Yf(3).$implicit;return Ha(Yf(3).selectedItem(t,i))})),am(1,"Select"),xf()}if(2&e){let e=Yf(3).$implicit;zh("ngStyle",Yf(3).getDynamicStyle()),gh("aria-label","select "+e.name)}}function hI(e,t){if(1&e&&(Ef(0),kf(1,"div",61),ph(2,pI,2,2,"button",43),xf(),Df()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),Yh("text-right",t.isMultiSelect),Jf("id",e.id),Vd(),zh("ngIf",!t.isMultiSelect&&!e.isSelected)}}function fI(e,t){if(1&e&&(Ef(0),ph(1,ZC,15,19,"div",14)(2,rI,6,7,"ng-template",null,0,Wm),kf(4,"label",15),am(5),xf(),kf(6,"div",54)(7,"div",55),ph(8,lI,2,1,"div",56),xf(),kf(9,"div",57),ph(10,uI,3,2,"ng-container",2),xf()(),ph(11,hI,3,4,"ng-container",2),Df()),2&e){let e=sm(3),t=Yf().$implicit,i=Yf(3);Vd(),zh("ngIf",t.price<t.basePrice)("ngIfElse",e),Vd(3),Yh("multi-sub",i.isMultiSelect),Vd(),cm("",t.name," "),Vd(3),zh("ngForOf",t.offers),Vd(2),zh("ngIf",!i.isMultiSubSearch&&!i.isMultiSelect),Vd(),zh("ngIf",i.isMultiSubSearch||i.isMultiSelect)}}function mI(e,t){if(1&e&&(kf(0,"span")(1,"span"),am(2," / "),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(4).$implicit;Vd(4),lm(e.itemPrice.displayUnitQuantityText)}}function gI(e,t){if(1&e&&(kf(0,"div",17)(1,"b",28)(2,"span",20),am(3),qm(4,"currency"),ph(5,mI,5,1,"span",2),xf(),kf(6,"span",19),am(7),qm(8,"currency"),xf()(),kf(9,"s",20),am(10),xf(),kf(11,"span",21),am(12),qm(13,"currency"),xf()()),2&e){let e,t=Yf(3).$implicit;Vd(3),cm(" ",jm(4,6,t.itemPrice.price,"USD")," "),Vd(2),zh("ngIf",null==t.itemPrice?null:t.itemPrice.displayUnitQuantityText),Vd(2),dm("",jm(8,9,t.price,"USD")," ","ea"===t.displayUnitQuantityText?"each":"per "+(null!==(e=t.displayUnitQuantityText)&&void 0!==e?e:"")," "),Vd(3),cm("$",t.itemPrice.basePrice,""),Vd(2),cm(" deleted ",jm(13,12,t.basePrice,"USD"),"")}}function bI(e,t){if(1&e&&(kf(0,"label",22),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm("$ ",e.itemPrice?e.itemPrice.basePrice:e.basePrice,"")}}function yI(e,t){if(1&e&&(kf(0,"div"),ph(1,gI,14,15,"div",14)(2,bI,2,1,"ng-template",null,0,Wm),xf()),2&e){let e=sm(3),t=Yf(2).$implicit;Vd(),zh("ngIf",t.itemPrice.price<t.itemPrice.basePrice)("ngIfElse",e)}}function vI(e,t){1&e&&(kf(0,"span",26),am(1," per "),xf())}function wI(e,t){if(1&e&&(kf(0,"span")(1,"span",20),am(2," / "),xf(),ph(3,vI,2,0,"span",30),kf(4,"span",20),am(5),xf(),kf(6,"span",26),am(7),xf()()),2&e){let e=Yf(4).$implicit;Vd(3),zh("ngIf","ea"!==e.displayUnitQuantityText),Vd(2),lm(e.displayUnitQuantityText),Vd(2),cm(" ","ea"===e.displayUnitQuantityText?"each":e.displayUnitQuantityText,"")}}function _I(e,t){if(1&e&&(kf(0,"div",17)(1,"b",28),Tf(2,"span",26),am(3),qm(4,"currency"),ph(5,wI,8,3,"span",2),xf(),kf(6,"s",29),Tf(7,"span",26),am(8),xf()()),2&e){let e=Yf(3).$implicit;Vd(3),cm(" ",jm(4,3,e.price,"USD")," "),Vd(2),zh("ngIf",null==e?null:e.displayUnitQuantityText),Vd(3),cm(" $",e.basePrice," ")}}function SI(e,t){if(1&e&&(kf(0,"label",59),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(4).$implicit;Vd(),cm("$ ",e.itemPrice.pricePer," "),Vd(5),cm(" ",e.itemPrice.unitQuantity,"")}}function CI(e,t){if(1&e&&(kf(0,"label",25),am(1),kf(2,"span",20),am(3," / "),xf(),kf(4,"span",26),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf(4).$implicit;Vd(),cm("($ ",e.pricePer," "),Vd(5),cm(" ",e.unitQuantity,")")}}function II(e,t){if(1&e&&(kf(0,"label",60),am(1),xf(),ph(2,SI,7,2,"label",72)(3,CI,7,2,"ng-template",null,1,Wm)),2&e){let e=sm(4),t=Yf(3).$implicit;Vd(),cm("$ ",t.basePrice,""),Vd(),zh("ngIf",t.itemPrice)("ngIfElse",e)}}function AI(e,t){if(1&e&&(kf(0,"div"),ph(1,_I,9,6,"div",14)(2,II,5,3,"ng-template",null,0,Wm),xf()),2&e){let e=sm(3),t=Yf(2).$implicit;Vd(),zh("ngIf",t.price<t.basePrice)("ngIfElse",e)}}function kI(e,t){if(1&e){let e=Mf();kf(0,"button",46),jf("click",(function(t){Wa(e);let i=Yf(3).$implicit;return Ha(Yf(3).selectedItem(t,i))}
1)),am(1,"Select"),xf()}if(2&e){let e=Yf(3).$implicit;zh("ngStyle",Yf(3).getDynamicStyle()),gh("aria-label","select "+e.name)}}function xI(e,t){if(1&e&&(kf(0,"button",47),am(1,"Selected"),xf()),2&e){gh("aria-label","Selected "+Yf(3).$implicit.name)}}function TI(e,t){if(1&e){let e=Mf();kf(0,"a",48),jf("click",(function(t){Wa(e);let i=Yf(6);return Ha(i.changeSelectedItem(t,i.originalProduct))}))("keyup.enter",(function(t){Wa(e);let i=Yf(6);return Ha(i.changeSelectedItem(t,i.originalProduct))})),am(1,"Change"),Tf(2,"img",49),xf()}if(2&e){let e=Yf(3).$implicit;Zf("id","change-substitute-ada-",e.id,""),gh("aria-label","Change Substitute Item "+e.name)}}function PI(e,t){if(1&e&&(Ef(0),kf(1,"div",73),ph(2,kI,2,2,"button",43)(3,xI,2,1,"button",44)(4,TI,3,3,"a",45),xf(),Df()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),Yh("text-right",t.isMultiSelect),Jf("id",e.id),Vd(),zh("ngIf",!t.isMultiSelect&&!e.isSelected),Vd(),zh("ngIf",!t.isMultiSelect&&e.isSelected),Vd(),zh("ngIf",t.isMultiSelect)}}function EI(e,t){1&e&&Tf(0,"img",67)}function DI(e,t){1&e&&Tf(0,"img",68)}function OI(e,t){if(1&e&&(kf(0,"div",63),ph(1,EI,1,0,"img",64)(2,DI,1,0,"img",65),kf(3,"span",26),am(4),xf(),kf(5,"label",66),am(6),xf()()),2&e){let e=Yf().$implicit;Vd(),zh("ngIf","C"===(null==e?null:e.status)||!(null!=e&&e.isClippable)),Vd(),zh("ngIf","U"===(null==e?null:e.status)),Vd(2),dm("",null!=e&&e.ecomDescription?null==e?null:e.ecomDescription:null==e?null:e.displayOfferTxt," ","C"!==(null==e?null:e.status)&&null!=e&&e.isClippable?"U"===(null==e?null:e.status)?"coupon unclipped":"":"coupon clipped",""),Vd(),zh("ngClass",Bm(6,gC,"C"===(null==e?null:e.status)||!(null!=e&&e.isClippable),"U"===(null==e?null:e.status))),Vd(),lm(null!=e&&e.ecomDescription?null==e?null:e.ecomDescription:null==e?null:e.displayOfferTxt)}}function BI(e,t){if(1&e&&(kf(0,"div"),ph(1,OI,7,9,"div",62),xf()),2&e){let e=t.$implicit;Vd(),zh("ngIf",null==e?null:e.isDisplayable)}}function MI(e,t){if(1&e){let e=Mf();kf(0,"div",75)(1,"button",51),jf("click",(function(t){Wa(e);let i=Yf(3).$implicit;return Ha(Yf(3).selectedItem(t,i))}
1)),am(2,"Select"),xf()()}if(2&e){let e=Yf(3).$implicit,t=Yf(3);Jf("id",e.id),Vd(),zh("ngStyle",t.getDynamicStyle()),gh("aria-label","select "+e.name)}}function RI(e,t){if(1&e&&(kf(0,"div",75)(1,"button",52),am(2,"Selected"),xf()()),2&e){let e=Yf(3).$implicit;Zf("id","S",e.id,""),Vd(),gh("aria-label","Selected "+e.name)}}function LI(e,t){if(1&e&&(Ef(0),ph(1,MI,3,3,"div",74)(2,RI,3,3,"div",74),Df()),2&e){let e=Yf(2).$implicit;Vd(),zh("ngIf",!e.Subflag),Vd(),zh("ngIf",e.Subflag)}}function FI(e,t){if(1&e&&(Ef(0),ph(1,yI,4,2,"div",2)(2,AI,4,2,"div",2),kf(3,"label",15),am(4),xf(),kf(5,"div",71),ph(6,PI,5,6,"ng-container",2),xf(),kf(7,"div",54)(8,"div",55),ph(9,BI,2,1,"div",56),xf(),kf(10,"div",57),ph(11,LI,3,2,"ng-container",2),xf()(),Df()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(),zh("ngIf",e.itemPrice),Vd(),zh("ngIf",!e.itemPrice),Vd(2),cm("",e.itemPrice?e.itemDescription:e.name," "),Vd(2),zh("ngIf",t.isMultiSubSearch||t.isMultiSelect),Vd(3),zh("ngForOf",e.offers),Vd(2),zh("ngIf",!t.isMultiSubSearch&&!t.isMultiSelect)}}function NI(e,t){if(1&e&&Tf(0,"img",38),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function UI(e,t){if(1&e&&Tf(0,"img",39),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function VI(e,t){if(1&e&&(kf(0,"div",40)(1,"label",41),am(2),xf()()),2&e){let e=Yf(2).$implicit,t=Yf(3);Jf("id","collapse"+e.id),Vd(2),lm(t.prop65Text)}}function qI(e,t){if(1&e){let e=Mf();kf(0,"div",31),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).toggleCollapse(t))})),Tf(1,"img",32),kf(2,"span",33)(3,"label",34),am(4,"Prop 65 WARNING"),xf(),ph(5,NI,1,1,"img",35)(6,UI,1,1,"img",36),xf(),ph(7,VI,3,2,"div",37),xf()}if(2&e){let e=Yf().$implicit;Vd(),gh("data-target","#collapse"+e.id),Vd(),gh("data-target","#collapse"+e.id),Vd(3),zh("ngIf",!e.prop65Open),Vd(),zh("ngIf",e.prop65Open),Vd(),zh("ngIf",e.prop65Open)}}function $I(e,t){if(1&e&&(kf(0,"div",6)(1,"div",7),ph(2,KC,2,0,"span",8),xf(),kf(3,"div",9),Tf(4,"img",10),xf(),kf(5,"div",53)(6,"div"),ph(7,fI,12,8,"ng-container",2)(8,FI,12,6,"ng-container",2)(9,qI,8,5,"div",12),xf()()()),2&e){let e=t.$implicit,i=t.index,n=Yf(3);zh("ngClass",Om(8,mC,n.isMultiSelect)),Vd(2),zh("ngIf","selected"===(null==e?null:e.algoType)||"preferred"===(null==e?null:e.algoType)),Vd(2),Zf("id","subs-result-",i,""),Jf("src",e.thumnailUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Vd(3),zh("ngIf",!n.editOrderFlag),Vd(),zh("ngIf",n.editOrderFlag),Vd(),zh("ngIf",e&&e.prop65WarningIconRequired&&("true"===e.prop65WarningIconRequired||!0===e.prop65WarningIconRequired))}}function jI(e,t){if(1&e&&(Ef(0),kf(1,"form",3)(2,"span",4),am(3),xf(),ph(4,$I,10,10,"div",5),xf(),Df()),2&e){let e=Yf(2);Vd(),zh("formGroup",e.myform),Vd(2),cm("",e.adaStatusMessage," "),Vd(),zh("ngForOf",e.substitutionResponse)}}function zI(e,t){if(1&e&&(kf(0,"div"),ph(1,GC,5,3,"ng-container",2)(2,jI,5,3,"ng-container",2),xf()),2&e){let e=Yf();Vd(),zh("ngIf",!e.isAutoClipEnabled),Vd(),zh("ngIf",e.isAutoClipEnabled)}}var WI=(()=>{class e{constructor(e,t){this.substitutionService=e,this._datalayerService=t,this.itemSelect=!0,this.itemSelected=new _l,this.changeItem=new _l,this.prop65Open=!1,this.prevID="",this.todaysDate=Date.now(),this.prop65Text="Drinking Distilled Spirits, Beer, Coolers, Wine and Other Alcoholic Beverages May Increase Cancer Risk, and, During Pregnancy, Can Cause Birth Defects.",this.adaStatusMessage="",this.myform=new oS({selected:new xS("",g_.required)})}ngOnInit(){this.substitutionFinalResponse=this.substitutionResponse}ngOnChanges(){let e=this.substitutionResponse;e.length>0&&(e.map(((t,i)=>{t.id===this.searchedItem?.toString()&&e.splice(i,1)})),this.substitutionFinalResponse=e)}announceForAccessiblity(e){this.adaStatusMessage=e,setTimeout((()=>{this.adaStatusMessage=""}),100)}changeSelectedItem(e,t){e.stopPropagation(),this.changeItem.emit(t)}selectedItem(e,t){let i;this.itemSelected.emit(t),this.substitutionResponse.map(((e,n)=>{e.id===t.id&&(this.substitutionResponse.splice(n,1),i=n+1)})),this.substitutionResponse.unshift(t);let n={productID:t?.id,isSubstitution:"true",substitutionOption:`${"selected"===t?.algoType?"past-choice":"substitute"}:${t?.id}`,rowSlot:i?`R0${i}#S01`:"",isAutoClipEnabled:this.isAutoClipEnabled},r=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:this.sourceItem;this._datalayerService.setModalClickEventsSubstitution("substitute",n,t,r),e.stopPropagation()}toggleCollapse(e){e.prop65Open=!e.prop65Open,e.prop65Open&&this.announceForAccessiblity(this.prop65Text)}getDynamicStyle(e){return e?{}:this.substitutionService.getDynamicStyle(this.banner)}getPrimaryColor(){return this.substitutionService.getPrimaryColor(this.banner)}static{this.ɵfac=function(t){return new(t||e)($d(fC),$d(kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["substitution-item-dst"]],inputs:{substitutionResponse:"substitutionResponse",editOrderFlag:"editOrderFlag",originalItemURL:"originalItemURL",banner:"banner",isMultiSelect:"isMultiSelect",originalProduct:"originalProduct",isMultiSubSearch:"isMultiSubSearch",searchedItem:"searchedItem",product:"product",sourceItem:"sourceItem",isAutoClipEnabled:"isAutoClipEnabled"},outputs:{itemSelected:"itemSelected",changeItem:"changeItem"},features:[ga],decls:1,vars:1,consts:[["generalPrice",""],["non_edit_label",""],[4,"ngIf"],[3,"formGroup"],["aria-live","polite",1,"sr-only"],["class","col-12 pb-3 pr-0 row",3,"ngClass",4,"ngFor","ngForOf"],[1,"col-12","pb-3","pr-0","row",3,"ngClass"],[1,"past-choice-container"],["aria-label","Past choice","class","past-choice-text",4,"ngIf"],[1,"col-2","col-md-2","pr-0","pl-0","inline"],["alt","",1,"product-image",3,"id","src"],[1,"col-7","col-md-7","pl-3","inline"],["class","sub-prop65","tabindex","0",3,"click",4,"ngIf"],["aria-label","Past choice",1,"past-choice-text"],["class","pl-2",4,"ngIf","ngIfElse"],[1,"item-name"],["class","item-unit",4,"ngIf"],[1,"pl-2"],["aria-hidden","true",1,"pr-1","strike-through-color"],["aria-hidden","false",1,"sr-strike-through","sr-only"],["aria-hidden","true"],["aria-hidden","false",1,"sr-base-price","sr-only"],[1,"price"],["class","unit-quantity",4,"ngIf"],[1,"unit-quantity"],[1,"item-unit"],[1,"sr-only"],["class","item-unit",4,"ngIf","ngIfElse"],[1,"pr-1","strike-through-color"],[1,"pl-1"],["class","sr-only",4,"ngIf"],["tabindex","0",1,"sub-prop65",3,"click"],["src","https://www-qa2.safeway.com/erums/cart/dist/assets/images/icons-universal-warning.svg","alt","",1,"Icons-Web-substitution","chevron-icon","pr-1"],["data-toggle","collapse","aria-expanded","fal
1se","aria-controls","collapse","role","button"],[1,"prop65-warning-text"],["class","chevron-icon","src","https://www-qa2.safeway.com/erums/cart/dist/assets/images/grey_down_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",4,"ngIf"],["class","chevron-icon","src","https://www-qa2.safeway.com/erums/cart/dist/assets/images/grey_up_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",4,"ngIf"],["tabindex","0",3,"id",4,"ngIf"],["src","https://www-qa2.safeway.com/erums/cart/dist/assets/images/grey_down_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",1,"chevron-icon"],["src","https://www-qa2.safeway.com/erums/cart/dist/assets/images/grey_up_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",1,"chevron-icon"],["tabindex","0",3,"id"],["for","",1,"prop65-text"],[1,"col-3","col-md-3","inline","pt-2","pl-0",3,"id"],["role","button","class","btn s-select select-button","tabindex","0",3,"ngStyle","click",4,"ngIf"],["role","button","aria-disabled","true","class","btn s-selected item-selected","disabled","",4,"ngIf"],["role","link","class","change-substitution","tabindex","0",3,"id","click","keyup.enter",4,"ngIf"],["role","button","tabindex","0",1,"btn","s-select","select-button",3,"click","ngStyle"],["role","button","aria-disabled","true","disabled","",1,"btn","s-selected","item-selected"],["role","link","tabindex","0",1,"change-substitution",3,"click","keyup.enter","id"],["aria-hidden","true","src","/erums/cart/dist/assets/images/caret-right.svg",1,"change-caret"],["class","col-3 col-md-3 inline pt-2 pl-0",3,"id",4,"ngIf"],["tabindex","0",1,"btn","s-select",3,"click","ngStyle"],["disabled","",1,"btn","s-selected"],[1,"col-10","col-md-10","pl-3","inline"],[1,"d-flex","col-12","col-md-12","mr-0","pr-0","pl-0","ml-0"],[1,"float-left","col-8","col-md-9","pl-0","ml-0","mt-2"],[4,"ngFor","ngForOf"],[1,"col-4","col-md-3","mr-0","pr-0"],["class","item-unit d-inline",4,"ngIf"],[1,"item-unit","d-inline"],[1,"price","d-inline"],[1,"float-right","inline","pl-0",3,"id"],["class","ml-2",4,"ngIf"],[1,"ml-2"],["src","/erums/cart/dist/assets/images/autoclip-check.svg","alt","","class","d-inline mr-1",4,"ngIf"],["src","/erums/cart/dist/assets/images/autoclip-scs.svg","alt","","class","d-inline mr-1",4,"ngIf"],["for","","aria-hidden","true",1,"d-inline",3,"ngClass"],["src","/erums/cart/dist/assets/images/autoclip-check.svg","alt","",1,"d-inline","mr-1"],["src","/erums/cart/dist/assets/images/autoclip-scs.svg","alt","",1,"d-inline","mr-1"],["class","float-right inline pt-2 pl-0",3,"id",4,"ngIf"],[1,"float-right","inline","pt-2","pl-0",3,"id"],[1,"d-flex","float-right"],["class","item-unit d-inline",4,"ngIf","ngIfElse"],[1,"col-12","col-md-12","inline","pt-2","pl-0",3,"id"],["class","inline pt-2 pl-0 float-right",3,"id",4,"ngIf"],[1,"inline","pt-2","pl-0","float-right",3,"id"]],template:function(e,t){1&e&&ph(0,zI,3,2,"div",2),2&e&&zh("ngIf",t.substitutionResponse.length>0)},dependencies:[DS,j_,sy,oy,cy,gy,US,By],styles:['.price[_ngcontent-%COMP%]{width:100%;margin:0 0 0 11px;font-size:16px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal}.unit-quantity[_ngcontent-%COMP%]{text-transform:lowercase}.clipped[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-positive, #04633C);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-text-XS, 10px);font-style:normal;font-weight:400;line-height:120%}.not-clipped[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-text-XS, 10px);font-style:normal;font-weight:400;line-height:120%}.product-image[_ngcontent-%COMP%]{width:60px!important;height:60px!important;margin-left:1em}.notavailable-label[_ngcontent-%COMP%]{width:500px}@media screen and (max-width: 767px){.notavailable-label[_ngcontent-%COMP%]{width:100%}}.no-data-product-image[_ngcontent-%COMP%]{width:48px!important;height:48px!important;margin-left:.5em}
1.item-name[_ngcontent-%COMP%]{width:100%;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:normal;color:#4b4b4b;padding-left:10px;margin-bottom:0!important}.item-name.multi-sub[_ngcontent-%COMP%]{font-size:16px;line-height:24px}.item-unit[_ngcontent-%COMP%]{width:100%;height:12px;margin:6px 40px 8px 12px;font-size:12px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.15px;color:#6c757d!important}.visibility[_ngcontent-%COMP%]{visibility:hidden}.sub-label[_ngcontent-%COMP%]{height:25px;margin:0 5px 0 4px;font-size:15px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#4b4b4b;width:290px}.sub-label-low[_ngcontent-%COMP%]{height:22px;margin:0 144px 1px 3px;font-size:14.5px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal;color:#4b4a4b;width:280px}.s-select[_ngcontent-%COMP%]{height:2.4em;font-size:16px;width:100px;border:1px solid #8C0E12;border-radius:100px;color:#8c0e12}.change-substitution[_ngcontent-%COMP%]{cursor:pointer;font-size:16px;font-weight:600;line-height:24px;color:#8c0e12}.change-caret[_ngcontent-%COMP%]{width:10px;height:10px;margin-bottom:3px}.select-button[_ngcontent-%COMP%]{font-size:12px;line-height:18px;font-weight:600;height:3em}.selected-item[_ngcontent-%COMP%]{background-color:#faf9f8}.strike-through-color[_ngcontent-%COMP%]{color:#dd1e25}.sr-strike-through[_ngcontent-%COMP%]{left:21px!important;height:25px!important;width:52px!important}.sr-base-price[_ngcontent-%COMP%]{left:73px!important;height:25px!important;width:52px!important}.load-more[_ngcontent-%COMP%]{font-size:16px;display:flex;align-items:center;justify-content:center;text-align:center;padding:10px 16px;font-weight:600;line-height:24px;color:#8c0e12;border:1px solid #DDD9D5;border-radius:100px;position:relative;transform:translate(-50%);left:50%;min-width:180px}.s-selected[_ngcontent-%COMP%]{border-radius:100px;background-color:#dedede;border-color:#dedede;color:#4b4b4b;border:solid 2px #dedede;height:2.4em;font-size:18px;width:100px}.s-selected[_ngcontent-%COMP%]:disabled{opacity:1}.item-selected[_ngcontent-%COMP%]{font-weight:600;font-size:12px;line-height:14px;background:#f1f0ee;border-radius:64px;border:0;height:3em}.sub-prop65[_ngcontent-%COMP%]{width:280px;padding-left:12px}.chevron-icon[_ngcontent-%COMP%]{height:20px;width:20px;position:absolute;z-index:999;margin:0 4px 0 0;object-fit:contain}.prop65-text[_ngcontent-%COMP%]{margin:7px 8px 8px 0;font-size:12px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4b4b4b}.prop65-warning-text[_ngcontent-%COMP%]{height:20px;margin:0 5px 0 20px;font-size:14px;font-weight:700;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:normal;color:#343a40}@media screen and (max-width: 374px){.sub-label-low[_ngcontent-%COMP%]{word-wrap:break-word;width:200px!important}}@media (min-width: 569px) and (max-width: 767px){.prop65-text[_ngcontent-%COMP%]{width:100%}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}.s-selected[_ngcontent-%COMP%]{margin-left:-1em}.s-select[_ngcontent-%COMP%]{margin-left:-.8em}}@media (min-width: 768px) and (max-width: 1024px){.prop65-text[_ngcontent-%COMP%]{width:100%}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;padding-left:75%;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}}@media screen and (min-width: 1440px){.prop65-text[_ngcontent-%COMP%]{width:100%}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}}input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:relative;margin-left:5px;width:20px;height:20px}input[type=radio][_ngcontent-%COMP%]:before{content:"";visibility:visible;position:absolute;border:1px solid #7D7B78;border-radius:50%;box-sizing:border-box;inset:0;background:#fff}input[type=radio][_ngcontent-%COMP%]:checked:before{background-color:#8c0e12;outline:1px solid #7D7B78;box-shadow:inset 0 0 0 2.5px #fff}.past-choice-text[_ngcontent-%COMP%]{font-family:Nunito Sans;font-size:10px;font-style:normal;font-weight:400;line-height:12px;background-color:#fee0d5;border-radius:4px;padding:2px 4px;color:#1f1e1e;text-align:center;margin-left:1.5em}.past-choice-container[_ngcontent-%COMP%]{width:100%}.not-clipped-icon-box[_ngcontent-%COMP%]{border-radius:50%;background-color:#fef173;height:16px;width:16px;line-height:16px}.not-clipped-icon[_ngcontent-%COMP%]{height:10px}']})}}return e})(),HI=["inputRef"];function YI(e,t){if(1&e){let e=Mf();kf(0,"button",23),jf("keyup.enter",(function(){return Wa(e),Ha(Yf().clear())}))("click",(function(){return Wa(e),Ha(Yf().clear())})),So(),kf(1,"svg",24),Tf(2,"path",25),xf()()}}function GI(e,t){if(1&e){let e=Mf();kf(0,"button",26),jf("keyup.enter",(function(){return Wa(e),Ha(Yf().cancel())}
1))("click",(function(){return Wa(e),Ha(Yf().cancel())})),am(1,"Cancel"),xf()}}function KI(e,t){if(1&e&&(kf(0,"span",37),am(1),qm(2,"currency"),xf()),2&e){let e=Yf().$implicit;Vd(),dm("",jm(2,2,e.pricePer,"USD")," / ",e.displayUnitQuantityText,"")}}function QI(e,t){if(1&e&&Tf(0,"img",45),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function JI(e,t){if(1&e&&Tf(0,"img",46),2&e){gh("data-target","#collapse"+Yf(2).$implicit.id)}}function ZI(e,t){if(1&e&&(kf(0,"div",47)(1,"label",48),am(2),xf()()),2&e){let e=Yf(2).$implicit,t=Yf(2);Jf("id","collapse"+e.id),Vd(2),lm(t.prop65Text)}}function XI(e,t){if(1&e){let e=Mf();kf(0,"div",38),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).toggleCollapse(t))})),Tf(1,"img",39),kf(2,"span",40)(3,"label",41),am(4,"Prop 65 WARNING"),xf(),ph(5,QI,1,1,"img",42)(6,JI,1,1,"img",43),xf(),ph(7,ZI,3,2,"div",44),xf()}if(2&e){let e=Yf().$implicit;Vd(),gh("data-target","#collapse"+e.id),Vd(),gh("data-target","#collapse"+e.id),Vd(3),zh("ngIf",!e.prop65Open),Vd(),zh("ngIf",e.prop65Open),Vd(),zh("ngIf",e.prop65Open)}}function eA(e,t){if(1&e){let e=Mf();kf(0,"li",29),Tf(1,"img",30),kf(2,"div",31)(3,"div",32)(4,"span",10),am(5),qm(6,"currency"),xf(),ph(7,KI,3,5,"span",33),xf(),kf(8,"h4",34),am(9),xf(),ph(10,XI,8,5,"div",35),xf(),kf(11,"button",36),jf("click",(function(t){let i=Wa(e).$implicit;return Ha(Yf(2).onSelectFromSearch(t,i))})),am(12),xf()()}if(2&e){let e=t.$implicit;Vd(),zh("src",e.imageUrl,id)("alt",e.name),Vd(4),lm(jm(6,8,e.price,"USD")),Vd(2),zh("ngIf",e.displayUnitQuantityText),Vd(2),lm(e.name),Vd(),zh("ngIf",e&&e.prop65WarningIconRequired&&("true"===e.prop65WarningIconRequired||!0===e.prop65WarningIconRequired)),Vd(),gh("aria-label",e.selected?e.name+" selected":"Select "+e.name),Vd(),cm(" ",e.selected?"Selected":"Select"," ")}}function tA(e,t){if(1&e&&(kf(0,"ul",27),ph(1,eA,13,11,"li",28),xf()),2&e){let e=Yf();Vd(),zh("ngForOf",e.searchResponse)}}function iA(e,t){if(1&e){let e=Mf();kf(0,"div",49)(1,"button",50),jf("keyup.enter",(function(){return Wa(e),Ha(Yf().saveSubstituteChanges())}))("click",(function(){return Wa(e),Ha(Yf().saveSubstituteChanges())})),am(2,"Confirm"),xf(),kf(3,"a",51),jf("keydown",(function(t){return Wa(e),Ha(Yf().onSaveSubstitutionKeydown(t))}))("keyup.enter",(function(){return Wa(e),Ha(Yf().saveSubstituteChanges())}))("click",(function(){return Wa(e),Ha(Yf().saveSubstituteChanges())})),am(4,"Don't Substitute"),xf()()}if(2&e){let e=Yf();Hh("bottom",e.miniCartFlag?"0":"6em"),Vd(),zh("disabled",e.selectedItemFlag)}}function nA(e,t){1&e&&Tf(0,"div",52)}var rA=(()=>{class e{constructor(e){this.substitutionService=e,this.submitting=!1,this.submitted=new _l,this.cancelled=new _l,this.closeSearch=new _l,this.triggerSearchConfirm=new _l,this.loaderFlag=!1,this.query="",this.focused=!1,this.selectedItem=null,this.selectedItemFlag=!0,this.prop65Text="Drinking Distilled Spirits, Beer, Coolers, Wine and Other Alcoholic Beverages May Increase Cancer Risk, and, During Pregnancy, Can Cause Birth Defects."}ngOnInit(){console.log(this.product)}onFocus(){console.log("onFocus called"),this.focusTimeout&&clearTimeout(this.focusTimeout),this.focused=!0}onBlur(){console.log("onBlur called"),this.focusTimeout=setTimeout((()=>{this.query||(this.focused=!1)}),100)}onClose(e){e&&(e.stopPropagation(),e.preventDefault()),this.multiSubstitutionEnabled&&this.selectedItem?this.triggerSearchConfirm.emit(this.selectedItem):this.closeSearch.emit()}onEnter(){this.loaderFlag=!0,this.focused=!1,this.searchingItem&&this.searchingItem.trim().length>0&&this.substitutionService.getSearchItem(this.searchingItem.trim(),"10",this.storeId,this.banner,this.serviceType,this.cartCategory,!0,this.token).subscribe((e=>{e.response.docs.length&&(this.searchResponse=e.response.docs),this.loaderFlag=!1}),(e=>{this.loaderFlag=!1,this.substitutionService.$subErrorEvent.next(e)}))}onSelectFromSearch(e,t){this.multiSubstitutionEnabled?(this.selectedItem=t,this.searchResponse.forEach((e=>e.selected=!1)),t.selected=!0,this.onClose(e)):(this.selectedItem=t,this.searchResponse.forEach((e=>e.selected=!1)),t.selected=!0),this.selectedItemFlag=!1}saveSubstituteChanges(){this.loaderFlag=!0,this.triggerSearchConfirm.emit(this.selectedItem?this.selectedItem:null)}clear(){this.query="",this.inputRef?.nativeElement.focus(),this.focused=!0}cancel(){this.query="",this.focused=!1,this.cancelled.emit(),this.inputRef?.nativeElement.blur()}get showCancel(){return this.focused&&!this.submitting}onCloseButtonKeydown(e){if("Tab"===e.key&&e.shiftKey){e.preventDefault();let t=document.getElementById("save-substitution");t&&t.focus()}}toggleCollapse(e){e.prop65Open=!e.prop65Open,e.prop65Open&&this.announceForAccessiblity(this.prop65Text)}announceForAccessiblity(e){this.adaStatusMessage=e,setTimeout((()=>{this.adaStatusMessage=""}),100)}onSaveSubstitutionKeydown(e){if("Tab"===e.key&&!e.shiftKey){e.preventDefault();let t=document.getElementById("close-search-button");t&&t.focus()}}static{this.ɵfac=function(t){return new(t||e)($d(fC))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-substitute-search"]],viewQuery:function(e,t){if(1&e&&tm(HI,5),2&e){let e;im(e=nm())&&(t.inputRef=e.first)}},inputs:{product:"product",token:"token",storeId:"storeId",banner:"banner",cartCategory:"cartCategory",serviceType:"serviceType",miniCartFlag:"miniCartFlag",submitting:"submitting",multiSubstitutionEnabled:"multiSubstitutionEnabled"},outputs:{submitted:"submitted",cancelled:"cancelled",closeSearch:"closeSearch",triggerSearchConfirm:"triggerSearchConfirm"},decls:26,vars:10,consts:[["inputRef",""],[1,"col-12","p-0"],[1,"header-row",2,"display","flex","align-items","center","justify-content","center","position","relative","padding","16px 0"],[2,"margin","0 auto","font-size","1.5rem","font-weight","600"],["id","close-search-button","type","button","aria-label","Close","tabindex","0",2,"position","absolute","left","0","background","none","border","none","cursor","pointer",3,"keydown","keyup.enter","click"],["role","button","src","/erums/cart/dist/assets/images/gray_arrow_left.png","alt","close Button"],[1,"search-product"],[1,"search-product-head"],["alt","",3,"src"],[1,"title"],[1,"price"],[1,"search-row","pt-3"],[1,"input-wrap"],["viewBox","0 0 24 24","aria-hidden","true","tabindex","0",1,"icon-search",3,"click","keydown.enter"],["cx","11","cy","11","r","7","fill","none","stroke","currentColor","stroke-width","2"],["d","M20 20l-4.2-4.2","stroke","currentColor","stroke-width","2","stroke-linecap","round"],["type","text","spellcheck","fal
1se","autocomplete","off","aria-label","Search for substitutes",3,"ngModelChange","focus","blur","keydown.enter","placeholder","ngModel"],["type","button","class","clear","aria-label","Clear search","tabindex","0",3,"keyup.enter","click",4,"ngIf"],["type","button","class","cancel","tabindex","0",3,"keyup.enter","click",4,"ngIf"],[1,"results-container"],["class","results",4,"ngIf"],["class","substitution-wrapper-parity",3,"bottom",4,"ngIf"],["class","sub-loader","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],["type","button","aria-label","Clear search","tabindex","0",1,"clear",3,"keyup.enter","click"],["viewBox","0 0 24 24","aria-hidden","true"],["d","M6 6l12 12M18 6L6 18","stroke","currentColor","stroke-width","2","stroke-linecap","round"],["type","button","tabindex","0",1,"cancel",3,"keyup.enter","click"],[1,"results"],["class","result",4,"ngFor","ngForOf"],[1,"result"],[1,"thumb",3,"src","alt"],[1,"meta","pl-3"],[1,"price-row"],["class","per",4,"ngIf"],[1,"name"],["class","sub-prop65 pl-0 pb-2","tabindex","0",3,"click",4,"ngIf"],["type","button",1,"select","mt-0","mb-2",3,"click"],[1,"per"],["tabindex","0",1,"sub-prop65","pl-0","pb-2",3,"click"],["src","/erums/cart/dist/assets/images/icons-universal-warning.svg","alt","",1,"Icons-Web-substitution","chevron-icon","pr-1","warning-height"],["data-toggle","collapse","aria-expanded","false","aria-controls","collapse","role","button"],[1,"prop65-warning-text"],["class","chevron-icon warning-height","src","/erums/cart/dist/assets/images/grey_down_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",4,"ngIf"],["class","chevron-icon warning-height","src","/erums/cart/dist/assets/images/grey_up_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",4,"ngIf"],["tabindex","0",3,"id",4,"ngIf"],["src","/erums/cart/dist/assets/images/grey_down_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",1,"chevron-icon","warning-height"],["src","/erums/cart/dist/assets/images/grey_up_2X.png","alt","","data-toggle","collapse","aria-expanded","false","aria-controls","collapse",1,"chevron-icon","warning-height"],["tabindex","0",3,"id"],["for","",1,"prop65-text"],[1,"substitution-wrapper-parity"],["tabindex","0",1,"save-button","pds-btn-filled--primary",3,"keyup.enter","click","disabled"],["id","save-substitution","tabindex","0",1,"link","links__action",3,"keydown","keyup.enter","click"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",1)(1,"div",2)(2,"h2",3),am(3,"Substitution preference"),xf(),kf(4,"button",4),jf("keydown",(function(i){return Wa(e),Ha(t.onCloseButtonKeydown(i))}))("keyup.enter",(function(i){return Wa(e),Ha(t.onClose(i))}))("click",(function(i){return Wa(e),Ha(t.onClose(i))})),Tf(5,"img",5),xf()(),kf(6,"div",6)(7,"div",7),Tf(8,"img",8),kf(9,"div",9),am(10),xf(),kf(11,"div",10),am(12),xf()(),kf(13,"div",11)(14,"div",12),So(),kf(15,"svg",13),jf("click",(function(){return Wa(e),Ha(t.onEnter())}))("keydown.enter",(function(){return Wa(e),Ha(t.onEnter())})),Tf(16,"circle",14)(17,"path",15),xf(),Co(),kf(18,"input",16,0),mm("ngModelChange",(function(i){return Wa(e),fm(t.searchingItem,i)||(t.searchingItem=i),Ha(i)})),jf("focus",(function(){return Wa(e),Ha(t.onFocus())}))("blur",(function(){return Wa(e),Ha(t.onBlur())}))("keydown.enter",(function(){return Wa(e),Ha(t.onEnter())})),xf(),ph(20,YI,3,0,"button",17),xf(),ph(21,GI,2,0,"button",18),xf(),kf(22,"div",19),ph(23,tA,2,1,"ul",20),xf()(),ph(24,iA,5,3,"div",21),xf(),ph(25,nA,1,0,"div",22)}2&e&&(Vd(8),zh("src",t.product.imageUrl,id),Vd(2),lm(t.product.name),Vd(2),lm(t.product.price),Vd(6),zh("placeholder",t.focused?"":"Search for substitutes"),hm("ngModel",t.searchingItem),Vd(2),zh("ngIf",t.query),Vd(),zh("ngIf",t.showCancel),Vd(2),zh("ngIf",null==t.searchResponse?null:t.searchResponse.length),Vd(),zh("ngIf",!t.multiSubstitutionEnabled),Vd(),zh("ngIf",t.loaderFlag))},dependencies:[d_,$_,ES,oy,cy,By],styles:['@charset "UTF-8";[_ngcontent-%COMP%]:root{--bg: #ffe7f6;--chip: #ffffff;--text: #1f2937;--muted: #6b7280;--ring: #a5b4fc;--border: #e5e7eb;--radius: 12px}.search-product[_ngcontent-%COMP%]{background:var(--bg);padding-bottom:120px;padding:clamp(10px,2.5vw,16px)}.search-product-head[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;margin-bottom:10px}.search-product-head[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:28px;object-fit:cover;border-radius:6px;box-shadow:0 0 0 1px #0000000d}.search-product-head[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#000;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-product-head[_ngcontent-%COMP%] .price[_ngcontent-%COMP%]{color:#000;opacity:.8;font-weight:600;white-space:nowrap;margin-left:8px}.search-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.input-wrap[_ngcontent-%COMP%]{position:relative;flex:1 1 220px;max-width:100%}.input-wrap[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;background:var(--chip);border:1px solid #e5e4e3;border-radius:999px;
1height:44px;padding:0 40px 0 42px;color:var(--text);font:inherit;outline:none;transition:box-shadow .15s ease,border-color .15s ease}.input-wrap[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--muted)}.input-wrap[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:transparent;box-shadow:0 0 0 3px var(--ring);border:1px solid #e5e4e3}.icon-search[_ngcontent-%COMP%]{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:#6b7280}.clear[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:999px;border:none;background:transparent;color:#9ca3af;cursor:pointer}.clear[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px}.clear[_ngcontent-%COMP%]:hover{background:#f3f4f6;color:#6b7280}.clear[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ring);outline-offset:2px}.cancel[_ngcontent-%COMP%]{border:none;background:transparent;color:#000;font-weight:600;cursor:pointer;padding:8px 4px;white-space:nowrap;margin-left:auto}.cancel[_ngcontent-%COMP%]:hover{color:#111827}.cancel[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ring);border-radius:6px}@media (max-width: 420px){.price[_ngcontent-%COMP%]{font-weight:500}.card-head[_ngcontent-%COMP%], .search-row[_ngcontent-%COMP%]{gap:8px}}.results[_ngcontent-%COMP%]{margin-top:clamp(10px,2.5vw,18px);display:grid;gap:clamp(10px,2.5vw,16px);padding:0;list-style:none}.result[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr auto;align-items:center;border-bottom:1px solid #e5e4e3;background:transparent}.thumb[_ngcontent-%COMP%]{width:clamp(72px,9vw,72px);height:clamp(72px,9vw,72px);object-fit:contain}.meta[_ngcontent-%COMP%]{min-width:0}.price-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:clamp(6px,1.2vw,10px)}.price[_ngcontent-%COMP%]{font-weight:600;font-size:clamp(15px,2.6vw,15px);line-height:1.05;color:var(--text, #111827)}.per[_ngcontent-%COMP%]{font-size:clamp(12px,1.8vw,14px);color:var(--muted, #6b7280)}.name[_ngcontent-%COMP%]{font-weight:600;font-size:clamp(15px,2.2vw,15px);color:var(--text, #111827);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.select[_ngcontent-%COMP%]{background:#fff9;border-radius:100px;padding:clamp(8px,1.8vw,12px) clamp(14px,3vw,22px);font-weight:600;color:#8c0e12;border:1px solid #8C0E12;cursor:pointer;white-space:nowrap;transition:background .15s ease,box-shadow .15s ease,transform .05s ease}.select[_ngcontent-%COMP%]:hover{background:#ffffffe6}.select[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--ring, #a5b4fc);outline-offset:2px}.select[_ngcontent-%COMP%]:active{transform:translateY(1px)}@media (max-width: 520px){.result[_ngcontent-%COMP%]{grid-template-columns:auto 1fr;grid-template-areas:"thumb meta" "thumb button"}.meta[_ngcontent-%COMP%]{grid-area:meta}.select[_ngcontent-%COMP%]{grid-area:button;justify-self:end;margin-top:6px}}.substitution-wrapper-parity[_ngcontent-%COMP%]{position:fixed!important;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:16px;padding:10px;background-color:#fff;font-family:sans-serif;box-shadow:0 -2px 10px #00000026;border-top:1px solid #e0e0e0;z-index:9999;padding-bottom:calc(20px + env(safe-area-inset-bottom))}.save-button[_ngcontent-%COMP%]{color:#fff;border:none;padding:14px 32px;border-radius:999px;font-size:16px;font-weight:500;cursor:pointer;width:100%;max-width:400px}.save-button[_ngcontent-%COMP%]:disabled{background-color:#d6d6d6;color:#9e9e9e;cursor:not-allowed}.link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;font-size:14px}.results-container[_ngcontent-%COMP%]{max-height:55vh;overflow-y:auto;scroll-behavior:smooth}.results-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.results-container[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.results-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}.results-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#a8a8a8}.sub-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}.sub-prop65[_ngcontent-%COMP%]{width:280px;padding-left:12px}.prop65-text[_ngcontent-%COMP%]{margin:7px 8px 8px 0;font-size:12px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;color:#4b4b4b}.prop65-warning-text[_ngcontent-%COMP%]{height:20px;margin:0 5px 0 2px;font-size:14px;font-weight:700;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:normal;color:#343a40}.warning-height[_ngcontent-%COMP%]{height:1.25em}']})}}return e})(),sA=["carousel"],aA=e=>({"multisub-border":e}),oA=e=>({selected:e}),lA=(e,t)=>
1({clipped:e,"not-clipped":t});function cA(e,t){1&e&&(kf(0,"div",52)(1,"span",53),am(2,"Past choice"),xf()())}function dA(e,t){if(1&e&&(kf(0,"span")(1,"span"),am(2," / "),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(2).$implicit;Vd(4),lm(e.displayUnitQuantityText)}}function uA(e,t){if(1&e&&(kf(0,"span")(1,"b",54),am(2),qm(3,"currency"),ph(4,dA,5,1,"span",3),xf(),kf(5,"span",55),am(6),qm(7,"currency"),xf(),kf(8,"s",56),am(9),qm(10,"currency"),xf(),kf(11,"span",57),am(12),qm(13,"currency"),xf()()),2&e){let e,t=Yf().$implicit;Vd(2),cm(" ",jm(3,6,t.price,"USD")," "),Vd(2),zh("ngIf",null==t?null:t.displayUnitQuantityText),Vd(2),dm(" ",jm(7,9,t.price,"USD")," ","ea"===t.displayUnitQuantityText?"each":"per "+(null!==(e=t.displayUnitQuantityText)&&void 0!==e?e:"")," "),Vd(3),lm(jm(10,12,t.basePrice,"USD")),Vd(3),cm(" deleted ",jm(13,15,t.basePrice,"USD"),"")}}function pA(e,t){if(1&e&&(kf(0,"span",60),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),lm(e.displayUnitQuantityText)}}function hA(e,t){if(1&e&&(kf(0,"label",58),am(1),qm(2,"currency"),ph(3,pA,2,1,"span",59),xf()),2&e){let e=Yf().$implicit,t=Yf(4);Vd(),cm("",jm(2,2,e.basePrice,"USD")," "),Vd(2),zh("ngIf",t.isMultiSelect)}}function fA(e,t){if(1&e&&(kf(0,"label",61),am(1),kf(2,"span",56),am(3," / "),xf(),kf(4,"span",62),am(5," per "),xf(),am(6),xf()),2&e){let e=Yf().$implicit;Vd(),cm(" ($",e.pricePer," "),Vd(5),cm("",e.unitQuantity,") ")}}function mA(e,t){1&e&&(kf(0,"span",70),Tf(1,"img",71),xf())}function gA(e,t){1&e&&(kf(0,"span",72),Tf(1,"span",73),xf())}function bA(e,t){if(1&e&&(kf(0,"div")(1,"div",64)(2,"p",65)(3,"span",62),am(4),xf(),kf(5,"label",66),am(6),xf()(),kf(7,"div",67),ph(8,mA,2,0,"span",68)(9,gA,2,0,"span",69),xf()()()),2&e){let e=Yf().$implicit;Vd(4),dm(" ",null==e?null:e.ecomDescription," ","C"!==(null==e?null:e.status)&&null!=e&&e.isClippable?"U"===(null==e?null:e.status)?"coupon unclipped":"":"coupon clipped"," "),Vd(),zh("ngClass",Bm(6,lA,"C"===(null==e?null:e.status)||!(null!=e&&e.isClippable),"U"===(null==e?null:e.status))),Vd(),cm(" ",null==e?null:e.ecomDescription," "),Vd(2),zh("ngIf","C"===(null==e?null:e.status)||!(null!=e&&e.isClippable)),Vd(),zh("ngIf","U"===(null==e?null:e.status))}}function yA(e,t){if(1&e&&(kf(0,"div",63),ph(1,bA,10,9,"div",3),xf()),2&e){let e=t.$implicit;Vd(),zh("ngIf",null==e?null:e.isDisplayable)}}function vA(e,t){if(1&e){let e=Mf();kf(0,"div",41)(1,"div",42),ph(2,cA,3,0,"div",43),Tf(3,"img",44),kf(4,"button",45),jf("keyup.enter",(function(){let t=Wa(e).$implicit,i=Yf(2),n=i.$implicit,r=i.index;return Ha(Yf(2).selectProduct(t,r,n))}))("click",(function(){let t=Wa(e).$implicit,i=Yf(2),n=i.$implicit,r=i.index;return Ha(Yf(2).selectProduct(t,r,n))})),am(5),xf()(),kf(6,"div",46)(7,"small"),am(8,"approx."),xf(),kf(9,"h3",47),ph(10,uA,14,18,"span",48)(11,hA,4,5,"ng-template",null,1,Wm),xf(),kf(13,"span"),am(14,"Schedule & Save 5%"),xf(),kf(15,"p",47)(16,"label",49),am(17),ph(18,fA,7,2,"label",50),xf()(),ph(19,yA,2,1,"div",51),xf()()}if(2&e){let e=t.$implicit,i=sm(12),n=Yf(2).index,r=Yf(2);Hh("height","auto"),Vd(2),zh("ngIf","selected"===(null==e?null:e.algoType)||"preferred"===(null==e?null:e.algoType)),Vd(),zh("src",e.imageUrl,id),Vd(),zh("ngClass",Om(13,oA,(null==r.selectedProducts[n]?null:r.selectedProducts[n].product)===e))("ngStyle",(null==r.selectedProducts[n]?null:r.selectedProducts[n].product)===e?r.getDynamicSelectedStyle():r.getDynamicStyle()),gh("aria-label",(null==r.selectedProducts[n]?null:r.selectedProducts[n].product)===e?e.name+" selected":"Select "+e.name),Vd(),cm(" ",(null==r.selectedProducts[n]?null:r.selectedProducts[n].product)===e?"Selected":"Select"," "),Vd(5),zh("ngIf",e.price<e.basePrice)("ngIfElse",i),Vd(7),lm(e.name),Vd(),zh("ngIf",!r.isMultiSelect&&void 0!==e.pricePer&&void 0!==e.unitQuantity),Vd(),zh("ngForOf",e.offers)}}function wA(e,t){if(1&e&&(kf(0,"div",38)(1,"div",39,0),ph(3,vA,20,15,"div",40),xf()()),2&e){let e=Yf(),t=e.$implicit,i=e.index;Vd(),gh("data-index",i),Vd(2),zh("ngForOf",t.substituteData)}}function _A(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",13)(2,"div",14),Tf(3,"img",15),kf(4,"div",16)(5,"div",17),am(6),xf()(),kf(7,"div",18),am(8),qm(9,"currency"),xf()(),kf(10,"div",19)(11,"fieldset",20)(12,"div",21)(13,"div",22)(14,"label",23)(15,"input",24),mm("ngModelChange",(function(t){let i=Wa(e).index,n=Yf(2);return fm(n.substitutionPreferences[i],t)||(n.substitutionPreferences[i]=t),Ha(t)})),jf("keyup.enter",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Substitute With",i,n))}))("change",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Substitute With",i,n))})),xf(),Tf(16,"span",25),kf(17,"span",26),am(18),xf()()(),kf(19,"div",27)(20,"button",28),jf("click",(function(t){let i=Wa(e).index;return Ha(Yf(2).onSearchClick(t,i))})),Tf(21,"img",29),xf()()(),ph(22,wA,4,2,"div",30),kf(23,"legend",31),am(24,"Substitution preference"),xf(
1),kf(25,"label",32)(26,"input",33),mm("ngModelChange",(function(t){let i=Wa(e).index,n=Yf(2);return fm(n.substitutionPreferences[i],t)||(n.substitutionPreferences[i]=t),Ha(t)})),jf("keyup.enter",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Best Available",i,n))}))("change",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Best Available",i,n))})),xf(),Tf(27,"span",34),kf(28,"span",35)(29,"span",26),am(30,"Substitute with best match"),xf(),kf(31,"span",36),am(32,"You'll be able to review the item."),xf()()(),kf(33,"label",23)(34,"input",37),mm("ngModelChange",(function(t){let i=Wa(e).index,n=Yf(2);return fm(n.substitutionPreferences[i],t)||(n.substitutionPreferences[i]=t),Ha(t)})),jf("keyup.enter",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Do Not Substitute",i,n))}))("change",(function(){let t=Wa(e),i=t.$implicit,n=t.index;return Ha(Yf(2).onSubstitutionPreferenceChange("Do Not Substitute",i,n))})),xf(),Tf(35,"span",34),kf(36,"span",35)(37,"span",26),am(38,"Do not substitute"),xf(),kf(39,"span",36),am(40,"Item will be refunded, not replaced."),xf()()()()()(),Df()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),zh("ngClass",Om(14,aA,n.multiSubstitutionEnabled)),Vd(2),zh("src",e.imageUrl,id),Vd(3),lm(e.name),Vd(2),cm("",$m(9,12,e.price)," ea"),Vd(7),zh("name","subsPref_"+i),hm("ngModel",n.substitutionPreferences[i]),Vd(3),cm(" ",(null==e||null==e.substituteData?null:e.substituteData.length)>0?"Substitute with a specific item":"Search to replace with a specific item"," "),Vd(4),zh("ngIf",(null==e.substituteData?null:e.substituteData.length)>0),Vd(4),zh("name","subsPref_"+i),hm("ngModel",n.substitutionPreferences[i]),Vd(8),zh("name","subsPref_"+i),hm("ngModel",n.substitutionPreferences[i])}}function SA(e,t){if(1&e){let e=Mf();kf(0,"a",77),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(3).setSubstitutionsForAll())}))("click",(function(){return Wa(e),Ha(Yf(3).setSubstitutionsForAll())}))("keydown.tab",(function(t){return Wa(e),Ha(Yf(3).focusCloseImage(t))})),am(1," Set substitutions for all items "),xf()}}function CA(e,t){if(1&e){let e=Mf();kf(0,"div",74)(1,"button",75),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).saveSubstituteChanges())}))("click",(function(){return Wa(e),Ha(Yf(2).saveSubstituteChanges())})),am(2,"Save substitution"),xf(),ph(3,SA,2,0,"a",76),xf()}if(2&e){let e=Yf(2);Vd(),zh("disabled",!e.hasAnySelectedProducts()),Vd(2),zh("ngIf",!e.editOrderFlag)}}function IA(e,t){if(1&e){let e=Mf();kf(0,"div",74)(1,"button",75),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).saveSubstituteChanges())}))("click",(function(){return Wa(e),Ha(Yf(2).saveSubstituteChanges())})),am(2,"Save substitutions"),xf(),kf(3,"a",78),jf("keydown.tab",(function(t){return Wa(e),Ha(Yf(2).focusCloseImage(t))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(2).dontSubstituteForAll())}))("click",(function(){return Wa(e),Ha(Yf(2).dontSubstituteForAll())})),am(4,"Do not substitute all items"),xf()()}if(2&e){let e=Yf(2);Vd(),zh("disabled",!e.hasAnySelectedProducts())}}function AA(e,t){if(1&e){let e=Mf();kf(0,"div",5)(1,"div",6)(2,"div",7)(3,"img",8),jf("keydown",(function(t){return Wa(e),Ha(Yf().onCloseImageKeydown(t))}))("keyup.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){return Wa(e),Ha(Yf().closeModal())})),xf(),kf(4,"h2",9),am(5,"If item is out of stock..."),xf()()(),kf(6,"div",10),ph(7,_A,41,16,"ng-container",11),xf(),ph(8,CA,4,2,"div",12)(9,IA,5,1,"div",12),xf()}if(2&e){let e=Yf();Vd(7),zh("ngForOf",e.cartItems),Vd(),zh("ngIf",!e.multiSubstitutionEnabled),Vd(),zh("ngIf",e.multiSubstitutionEnabled)}}function kA(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"app-substitute-search",79),jf("triggerSearchConfirm",(function(t){return Wa(e),Ha(Yf().confirmSubstitutionFromSearch(t))}))("closeSearch",(function(){return Wa(e),Ha(Yf().closeSearch())})),xf()()}if(2&e){let e=Yf();Vd(),zh("multiSubstitutionEnabled",e.multiSubstitutionEnabled)("product",e.mainProduct)("token",e.token)("miniCartFlag",e.miniCartFlag)("storeId",e.storeId)("banner",e.banner)("cartCategory",e.cartCategory)("serviceType",e.serviceType)}}function xA(e,t){1&e&&Tf(0,"div",80)}var TA=(()=>{class e{constructor(e,t){this.substitutionService=e,this._datalayerService=t,this.isMultiSelect=!1,this.editOrderFlag=!1,this.isAutoClipEnabled=!1,this.miniCartFlag=!1,this.itemSelected=new _l,this.closeSubstitutions=new _l,this.dontSubstituteitem=new _l,this.setSubstitutionsForAllItems=new _l,this.substitutionSearchFlag=!1,this.isSubstitutionEnabled=!1,this.userHasInteracted=!1,this.carouselScroll=[],this.dontSubstituteFlag=!1,this.loaderFlag=!1,this.currentSearchItemIndex=0,this.selectedProducts={},this.substitutionPreferences={}}ngOnInit(){if(this.substitutionPreferences={},this.selectedProducts={},this.multiSubstitutionEnabled){let e=JSON.parse(JSON.stringify(this.substitutionResponse));e.forEach((e=>{e.substituteData=e.substituteItems,e.imageUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id}
1)),this.cartItems=e}else this.substitutionResponse.length>0?this.product.substituteData=this.substitutionResponse:this.product.substituteData=this.product.substituteItems,this.cartItems=[this.product];this.cartItems.forEach(((e,t)=>{this.initializeRadioButtonState(e,t);let i=this.substitutionPreferences[t];e.substitutionPreferenceV2=i,"Substitute With"!==i&&(e.substituteItems=[]);let n=e.substituteData?.find((e=>!0===e.Subflag));n&&(this.selectedProducts[t]={product:n,mainItem:e})}))}initializeRadioButtonState(e,t){let i=e.substitutionPreferenceV2;this.substitutionPreferences[t]=this.getNormalizedPreference(i)}getNormalizedPreference(e){return"Substitute With"===e||"substitute-with"===e?"Substitute With":"Do Not Substitute"===e||"dont-substitute"===e?"Do Not Substitute":"Best Available"}closeSearch(){this.substitutionSearchFlag=!1,this.mainProduct=null}closeModal(){window.dispatchEvent(new CustomEvent("smartSubstitutionCloseTriggered",{detail:!0}))}onSearchClick(e,t){e.stopPropagation(),this.currentSearchItemIndex=t||0,this.substitutionSearchFlag=!0,this.mainProduct=this.cartItems[t||0]}onSubstitutionPreferenceChange(e,t,i){if(void 0!==i&&(this.substitutionPreferences[i]=e),"Substitute With"===e){let e=!!this.selectedProducts[i??0];this.isSubstitutionEnabled=!0,this.dontSubstituteFlag=!1,this.userHasInteracted=e}else if("Best Available"===e)this.userHasInteracted=!0,this.isSubstitutionEnabled=!0,this.dontSubstituteFlag=!1,void 0!==i&&(this.selectedProducts[i]=null,this.multiSubstitutionEnabled&&(this.cartItems[i].substituteItems=[],this.cartItems[i].substitutionPreferenceV2="Best Available"));else if("Do Not Substitute"===e){if(this.userHasInteracted=!0,void 0!==i&&(this.selectedProducts[i]=null,this.multiSubstitutionEnabled)){this.cartItems[i].substituteItems=[],this.cartItems[i].substitutionPreferenceV2="Do Not Substitute";let e=this.substitutionResponse.findIndex((e=>e.id===this.cartItems[i].id));-1!==e&&(this.substitutionResponse[e].substituteItems=[],this.substitutionResponse[e].substitutionPreferenceV2="Do Not Substitute")}this.multiSubstitutionEnabled||(this.isSubstitutionEnabled=!1,this.dontSubstituteFlag=!0)}}selectProduct(e,t,i){if(this.userHasInteracted=!0,this.selectedProducts[t]&&this.selectedProducts[t].product===e)if(this.selectedProducts[t]=null,this.multiSubstitutionEnabled){this.cartItems[t].substituteItems=[],this.cartItems[t].substitutionPreferenceV2="Best Available",this.substitutionPreferences[t]="Best Available";let e=this.substitutionResponse.findIndex((e=>e.id===this.cartItems[t].id));-1!==e&&(this.substitutionResponse[e].substituteItems=[],this.substitutionResponse[e].substitutionPreferenceV2="Best Available")}else this.substitutionPreferences[t]="Best Available";else if(this.selectedProducts[t]={product:e,mainItem:i,itemIndex:t},this.multiSubstitutionEnabled){this.cartItems[t].substituteItems=[e],this.cartItems[t].substitutionPreferenceV2="Substitute With",this.substitutionPreferences[t]="Substitute With";let n=this.substitutionResponse.findIndex((e=>e.id===this.cartItems[t].id));-1!==n&&(this.substitutionResponse[n].substituteItems=[e],this.substitutionResponse[n].substitutionPreferenceV2="Substitute With"),setTimeout((()=>{this.onSubstitutionPreferenceChange("Substitute With",i,t)}),0)}else setTimeout((()=>{this.onSubstitutionPreferenceChange("Substitute With",i,t)}),0);console.log("Selected product:",this.selectedProducts),console.log("Updated substitution preferences:",this.substitutionPreferences)}hasAnySelectedProducts(){return this.userHasInteracted}confirmSubstitutionFromSearch(e){if(!e)return this.dontSubstituteFlag=!0,void this.saveSubstituteChanges();if(this.multiSubstitutionEnabled){if(this.substitutionSearchFlag=!1,void 0!==this.currentSearchItemIndex){this.selectedProducts[this.currentSearchItemIndex]={product:e,mainItem:this.cartItems[this.currentSearchItemIndex],itemIndex:this.currentSearchItemIndex},this.cartItems[this.currentSearchItemIndex].substituteItems=[e],this.cartItems[this.currentSearchItemIndex].substituteData=[e],this.cartItems[this.currentSearchItemIndex].substitutionPreferenceV2="Substitute With",this.substitutionPreferences[this.currentSearchItemIndex]="Substitute With";let t=this.substitutionResponse.findIndex((e=>e.id===this.cartItems[this.currentSearchItemIndex].id));-1!==t&&(this.substitutionResponse[t].substituteItems=[e],this.substitutionResponse[t].substituteData=[e],this.substitutionResponse[t].substitutionPreferenceV2="Substitute With"),this.onSubstitutionPreferenceChange("Substitute With",this.cartItems[this.currentSearchItemIndex],this.currentSearchItemIndex)}}else{this.itemSelected.emit(e);let t={productID:e?.id,isSubstitution:"true"},i=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:null;this._datalayerService.setAnalyticsCrossPageData("set","analyticsFeatureTracking","subsUpdateACIP468396"),this._datalayerService.setAnalyticsCrossPageData("set","subsShouldSendCartEvent",!0);let n=e;this._datalayerService.setModalClickEventsSubstitution("substitute-with-specific-item:save-substitution",t,n,i)}}saveSubstituteChanges(e){this.loaderFlag=!0;let t=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:null,i={isSubstitution:"true",isAutoClipEnabled:this.isAutoClipEnabled,cartItems:this.cartItems};if(this._datalayerService.setAnalyticsCrossPageData("set","analyticsFeatureTracking","subsUpdateACIP468396"),this._datalayerService.setAnalyticsCrossPageData("set","subsShouldSendCartEvent","false"),this.multiSubstitutionEnabled)this.cartItems.forEac
1h(((e,t)=>{let i=this.substitutionPreferences[t]||this.getNormalizedPreference(e.substitutionPreferenceV2);e.substitutionPreferenceV2=i,"Substitute With"!==i&&(e.substituteItems=[]),"Best Available"===i&&(e.substituteData=[])})),this.itemSelected.emit(this.cartItems),this._datalayerService.setModalClickSubstitutionAllItems(e?"dont-substitute-for-all-items":"save-substitution-for-all-items",i);else{if(this.dontSubstituteFlag)return void this.dontSubstituteitem.emit({event:"dontsubstitute"});let e=Object.keys(this.selectedProducts).find((e=>null!==this.selectedProducts[e])),n=void 0!==e&&this.selectedProducts[e],r=this.substitutionPreferences[0];n?this.itemSelected.emit(this.selectedProducts[e].product):"Best Available"===r?this.itemSelected.emit({substitutionPreferenceV2:"Best Available"}):"Do Not Substitute"===r?this.dontSubstituteitem.emit({event:"dontsubstitute"}):this.itemSelected.emit({substitutionPreferenceV2:"Best Available"}),this._datalayerService.setModalClickEventsSubstitution(`substitute-with-${"Best Available"===r?"next-best-match":"specific-item"}:save-substitution`,i,this.selectedProducts&&this.selectedProducts[e]&&this.selectedProducts[e].product,t)}}dontSubstitute(e,t){this.dontSubstituteFlag=!t}setSubstitutionsForAll(){this.miniCartFlag?window.dispatchEvent(new CustomEvent("smartSubstitutionTriggered",{detail:!0})):(this._datalayerService.setAnalyticsCrossPageData("set","analyticsFeatureTracking","subsUpdateACIP468396"),this._datalayerService.setModalClickEvents("sub-pref|set-substitutions-for-all-items"),this.setSubstitutionsForAllItems.emit(""))}dontSubstituteForAll(){this.multiSubstitutionEnabled&&(this.cartItems.forEach(((e,t)=>{this.substitutionPreferences[t]="Do Not Substitute",this.selectedProducts[t]=null,e.substituteItems=[],e.substitutionPreferenceV2="Do Not Substitute";let i=this.substitutionResponse.findIndex((t=>t.id===e.id));-1!==i&&(this.substitutionResponse[i].substituteItems=[],this.substitutionResponse[i].substitutionPreferenceV2="Do Not Substitute")})),this.userHasInteracted=!0),this.saveSubstituteChanges(!0)}getDynamicStyle(){return this.substitutionService.getDynamicStyle(this.banner)}getDynamicSelectedStyle(){return this.substitutionService.getDynamicSelectedStyle(this.banner)}focusCloseImage(e){e&&e.preventDefault();let t=document.getElementById("close-parity");t&&t.focus()}onCloseImageKeydown(e){if("Tab"===e.key&&e.shiftKey){e.preventDefault();let t=null;t=this.multiSubstitutionEnabled?document.getElementById("dont-substitute-all"):document.getElementById("set-all-substitutions"),t&&t.focus()}}static{this.ɵfac=function(t){return new(t||e)($d(fC),$d(kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-substitutions-view"]],viewQuery:function(e,t){if(1&e&&tm(sA,5),2&e){let e;im(e=nm())&&(t.carousels=e)}},inputs:{product:"product",token:"token",storeId:"storeId",banner:"banner",cartCategory:"cartCategory",serviceType:"serviceType",substitutionResponse:"substitutionResponse",multiSubstitutionEnabled:"multiSubstitutionEnabled",isMultiSelect:"isMultiSelect",editOrderFlag:"editOrderFlag",isAutoClipEnabled:"isAutoClipEnabled",miniCartFlag:"miniCartFlag"},outputs:{itemSelected:"itemSelected",closeSubstitutions:"closeSubstitutions",dontSubstituteitem:"dontSubstituteitem",setSubstitutionsForAllItems:"setSubstitutionsForAllItems"},decls:3,vars:3,consts:[["carousel",""],["generalProductPrice",""],["class","smart-subs-container",4,"ngIf"],[4,"ngIf"],["class","sub-loader","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],[1,"smart-subs-container"],[1,"col-12","pl-3","pt-1"],[1,"d-inline","back","back-carot"],["id","close-parity","role","button","tabindex","0","src","/erums/cart/dist/assets/images/gray_arrow_left.png","alt","",3,"keydown","keyup.enter","click"],[1,"subs-preference"],[1,"scrollable-content"],[4,"ngFor","ngForOf"],["class","substitution-wrapper",4,"ngIf"],[1,"col-12",3,"ngClass"],[1,"product-row","pl-0"],["alt","Product Image",1,"main-product-image",3,"src"],[1,"product-details"],[1,"product-name"],[1,"product-price"],[1,"substitute-item-container"],["role","radiogroup","aria-labelledby","rg-title",1,"rg"],[1,"col-12","search-bar","row","pr-0","pt-2"],[1,"col-10","pt-2","pl-0"],[1,"rg__option"],["tabindex","0","type","radio","value","Substitute With",1,"rg__native",3,"ngModelChange","keyup.enter","change","name","ngModel"],["aria-hidden","true",1,"rg__radio","mt-1"],[1,"rg__title"],[1,"col-2","pr-0","pt-3"],["type","button","aria-label","Search to replace item",1,"float-right","search-icon-btn",3,"click"],["src","/erums/cart/dist/assets/images/subs-search-icon.svg","alt","",1,"pr-1","search-icon-subs"],["class","carousel-wrapper pb-0",4,"ngIf"],["id","rg-title",1,"sr-only"],[1,"rg__option_best"],["tabindex","0","type","radio","value","Best Available",1,"rg__native",3,"ngModelChange","keyup.enter","change","name","ngModel"],["aria-hidden","true",1,"rg__radio","mt-2"],[1,"rg__text"],[1,"rg__desc"],["tabindex","0","type","radio","value","Do Not Substitute",1,"rg__native",3,"ngModelChange","keyup.enter","change","name","ngModel"],[1,"carousel-wrapper","pb-0"],[1,"pb-0","carousel-inner","d-flex","flex-row","overflow-auto",2,"display","flex","flex-direction","row","overflow-x","auto","gap","16px"],["class","product-card",3,"height",4,"ngFor","ngForOf"],[1,"product-card"],[1,"position-relative"],["class","past-choice-container position-absolute","style","top: 0; left: 0; z-index: 10;",4,"ngIf"],["alt","Product",1,"product-image",3,"src"],["tabindex","0",1,"select-button","mr-2",3,"keyup.enter","click","ngClass","ngStyle"],[1,"product-info"],[1,"mb-0","pt-1"],[4,"ngIf","ngIfElse"],[1,"item-name"],["class","item-unit d-inline",4,"ngIf"],["class","discount-badge",4,"ngFor","ngForOf"],[1,"past-choice-container","position-absolute",2,"top","0","left","0","z-index","10"],["aria-label","Past choice",1,"past-choice-text"],["aria-hidden","true",1,"pr-1","strike-through-color"],["aria-hidden","false",1,"sr-strike-through","sr-only"],["aria-hidden","true"],["aria-hidden","false",1,"sr-base-price","sr-only"],[1,"generic-price"],["class","unit-quantity",4,"ngIf"],[1,"unit-quantity"],[1,"item-unit","d-inline"],[1,"sr-only"],[1,"discount-badge"],[1,"d-flex","justify-content-between","align-items-center"],[1,"mb-0","flex-grow-1",2,"white-space","normal","word-break","break-word"],["aria-hidden","true",1,"d-inline",3,"ngClass"],[1,"d-flex","align-items-center","ml-2"],["class","icon","style","display: inline-block; border: 2px dotted #000; border-radius: 50%; padding: 4px;",4,"ngIf"],["class","product-coupon__icon-circle rounded-circle p-0 d-flex justify-content-center align-items-center",4,"ngIf"],[1,"icon",2,"display","inline-block","border","2px dotted #000","border-radius","50%","padding","4px"],["src","/erums/cart/dist/assets/images/autoclip-check.svg","alt","",1,"icon-position"],[1,"product-coupon__icon-circle","rounded-circle","p-0","d-flex","justify-content-center","align-items-center"],[1,"svg-scissor","background-color-primary-default","m-0"],[1,"substitution-wrapper"],["tabindex","0",1,"save-button","pds-btn-filled--primary",3,"keyup.enter","click","disabled"],["tabindex","0","class","link links__action","id","set-all-substitutions",3,"keyup.enter","click","keydown.tab",4,"ngIf"],["tabindex","0","id","set-all-substitutions",1,"link","links__action",3,"keyup.enter","click","keydown.tab"],["tabindex","0","id","dont-substitute-all",1,"link","links__action",3,"keydown.tab","keyup.enter","click"],[3,"triggerSearchConfirm","closeSearch","multiSubstitutionEnabled","product","token","miniCartFlag","storeId","banner","cartCategory","serviceType"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader"]],template:function(e,t){1&e&&ph(0,AA,10,3,"div",2)(1,kA,2,8,"div",3)(2,xA,1,0,"div",4),2&e&&(zh("ngIf",!t.substitutionSearchFlag),V
1d(),zh("ngIf",t.substitutionSearchFlag),Vd(),zh("ngIf",t.loaderFlag))},dependencies:[d_,LS,$_,ES,sy,oy,cy,gy,rA,By],styles:['.product-row[_ngcontent-%COMP%]{height:7em;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:10px;font-family:sans-serif;border-bottom:1px solid #e5e4e3}.main-product-image[_ngcontent-%COMP%]{width:64px;height:64px;object-fit:contain;flex-shrink:0}.product-details[_ngcontent-%COMP%]{flex:1;min-width:0}.product-name[_ngcontent-%COMP%]{word-wrap:break-word;color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-border-radius-300-large, 14px);font-style:normal;font-weight:600}.product-price[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-feature-settings:"liga" off,"calt" off;font-family:Nunito Sans;font-size:16px;font-style:normal;font-weight:600;line-height:18px;white-space:nowrap;flex-shrink:0}.generic-price[_ngcontent-%COMP%]{margin-bottom:.2em;display:inline-block}.toggle-container[_ngcontent-%COMP%]{height:6.5em;display:flex;justify-content:space-between;align-items:flex-start;background:#fff;padding:10px;border-radius:8px;max-width:700px;box-shadow:0 0 10px #0000000d}.toggle-text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-poppins, Poppins);font-size:var(--pds-global-font-size-400, 18px);font-style:normal;font-weight:500;line-height:130%}.toggle-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_medium, #4B4B49);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-100, 12px);font-style:normal;font-weight:400;line-height:145%}.toggle-text[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#222;text-decoration:underline}.switch[_ngcontent-%COMP%]{position:relative;display:inline-block;width:48px;height:26px;vertical-align:middle}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{opacity:0;width:48px;height:26px;margin:0}.slider[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#111;border-radius:34px;transition:background-color .3s}.slider[_ngcontent-%COMP%]:before{position:absolute;content:"";height:18px;width:18px;left:4px;top:4px;background-color:#fff;border-radius:50%;transition:transform .3s,background-color .3s}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]{background-color:gray}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:checked) + .slider[_ngcontent-%COMP%]{background-color:#111}.switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .slider[_ngcontent-%COMP%]:before{transform:translate(22px);background-color:#fff}.carousel-wrapper[_ngcontent-%COMP%]{position:relative;height:22em;align-items:center;overflow-x:auto;gap:10px;padding-bottom:10px;scroll-snap-type:x mandatory;scrollbar-width:none}.carousel-wrapper[_ngcontent-%COMP%]:hover .carousel-arrow[_ngcontent-%COMP%]{opacity:1}.carousel-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.carousel-arrow[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translateY(-50%);z-index:2;background:#fffc;border:none;opacity:.7;color:#222;font-size:2rem;padding:.25rem .5rem;cursor:pointer;outline:none;box-shadow:none;border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.carousel-arrow.left-arrow[_ngcontent-%COMP%]{left:0}.carousel-arrow.right-arrow[_ngcontent-%COMP%]{right:0}.carousel-arrow[_ngcontent-%COMP%]:disabled{color:#ccc;cursor:not-allowed;opacity:.5;background:#ffffff80}.carousel-arrow[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.carousel-inner[_ngcontent-%COMP%]{display:flex;flex-direction:row;overflow-x:auto;gap:16px;padding:16px 0;scroll-behavior:smooth;width:100%;box-sizing:border-box;min-height:220px}.product-card[_ngcontent-%COMP%]{width:150px;min-width:150px;max-width:150px;align-items:center;justify-content:flex-end;padding-bottom:var(--pds-global-space-100, 4px);border-right:1px solid var(--pds-theme-color-outline-neutral_low, #E5E4E3);background:var(--pds-theme-color-background-baseline, #FFF);height:100%}.product-image[_ngcontent-%COMP%]{width:148px;height:148px}.select-button[_ngcontent-%COMP%]{border-radius:20px;padding:6px 14px;cursor:pointer;margin:10px 0;float:right;font-size:var(--pds-global-font-size-200, 14px);font-style:normal;font-weight:600;line-height:145%}.product-info[_ngcontent-%COMP%]{display:grid;width:100%;text-align:left;margin-top:8px;font-size:.95rem;background:transparent}.product-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_medium, #4B4B49);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-50, 10px);font-style:normal;font-weight:400;line-height:100%}.product-info[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-400, 18px);font-style:normal;font-weight:700;line-height:100%}.product-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_medium, #4B4B49);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-50, 10px);font-style:normal;font-weight:400;line-height:100%}.product-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{overflow:hidden;color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);text-overflow:ellipsis;font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-200, 14px);font-style:normal;font-weight:600;line-height:130%}.discount-badge[_ngcontent-%COMP%]{padding:6px 8px;font-size:13px;display:flex;width:fit-content;justify-content:space-between;align-items:center;margin-top:8px;text-align:center;border-radius:var(--pds-global-border_radius-200, 8px);background:var(--pds-global-color-general-sunshine-50, #FEF173)}.discount-badge[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:8px}.discount-badge[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:left;overflow:hidden;color:var(--pds-global-color-general-black-a100, #000);text-overflow:ellipsis;font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-50, 10px);font-style:normal;font-weight:400;line-height:120%;text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:none;text-decoration-thickness:auto;text-underline-offset:auto;text-underline-position:from-font}
1.search-bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-poppins, Poppins);font-size:var(--pds-global-font-size-400, 18px);font-style:normal;font-weight:500;line-height:130%}.substitution-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;padding:20px;background-color:#fff;font-family:sans-serif}.save-button[_ngcontent-%COMP%]{color:#fff;border:none;padding:14px 32px;border-radius:999px;font-size:16px;font-weight:500;cursor:pointer;width:100%;max-width:400px}.save-button[_ngcontent-%COMP%]:disabled{background-color:#d6d6d6;color:#9e9e9e;cursor:not-allowed}.link[_ngcontent-%COMP%]{text-decoration:underline;font-size:14px;cursor:pointer}.smart-subs-container[_ngcontent-%COMP%]{max-height:90vh;overflow-y:auto;padding-right:8px;box-sizing:border-box;position:relative;display:flex;flex-direction:column}.scrollable-content[_ngcontent-%COMP%]{flex:1;overflow-y:auto;scroll-behavior:smooth}.scrollable-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:0px;background:transparent}.smart-subs-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;background:transparent}.substitution-wrapper.sticky-bottom[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;background:#fff;padding:16px;box-shadow:0 -2px 10px #0000001a;z-index:1000;border-top:1px solid #e0e0e0}.substitution-wrapper.sticky-bottom[_ngcontent-%COMP%] .save-button[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.substitution-wrapper.sticky-bottom[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{display:block;text-align:center}.rg[_ngcontent-%COMP%]{margin:0;padding:0;border:0;display:block}.rg__option[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:clamp(10px,2.4vw,14px);align-items:start;padding:clamp(12px,2.6vw,16px) 0;cursor:pointer;-webkit-user-select:none;user-select:none}.rg__option_best[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:clamp(10px,2.4vw,14px);align-items:start;padding:clamp(12px,2.6vw,16px) 0;cursor:pointer;-webkit-user-select:none;user-select:none;border-top:1px solid #e5e4e3;border-bottom:1px solid #e5e4e3}.rg__option[_ngcontent-%COMP%] + .rg__option[_ngcontent-%COMP%]{border-top:1px solid var(--line)}.rg__native[_ngcontent-%COMP%]{position:absolute;opacity:0;pointer-events:none}.rg__radio[_ngcontent-%COMP%]{width:clamp(20px,3.2vw,20px);height:clamp(20px,3.2vw,20px);border-radius:999px;box-shadow:0 0 0 2px #6e6e6d;margin-top:2px;position:relative;transition:background .2s,box-shadow .2s}.rg__native[_ngcontent-%COMP%]:focus-visible + .rg__radio[_ngcontent-%COMP%]{outline:3px solid var(--ring);outline-offset:3px}.rg__native[_ngcontent-%COMP%]:checked + .rg__radio[_ngcontent-%COMP%]{background:#000;box-shadow:0 0 0 2px #000}.rg__native[_ngcontent-%COMP%]:checked + .rg__radio[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:32%;border-radius:50%;background:#fff}.rg__text[_ngcontent-%COMP%]{min-width:0}.rg__title[_ngcontent-%COMP%]{display:block;color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-300, 16px);font-style:normal;font-weight:700;line-height:145%}.rg__desc[_ngcontent-%COMP%]{display:block;color:var(--pds-theme-color-foreground-neutral_medium, #4B4B49);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-200, 14px);font-style:normal;font-weight:400;line-height:145%}.search-icon-subs[_ngcontent-%COMP%]{width:40px;cursor:pointer}.search-icon-btn[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer}.subs-preference[_ngcontent-%COMP%]{display:inline-block;color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);text-align:center;font-family:var(--pds-global-font-family-poppins, Poppins);font-size:var(--pds-global-font-size-heading-XS, 16px);font-style:normal;font-weight:500;line-height:130%;padding-left:5em}@media (max-width: 420px){.rg__option[_ngcontent-%COMP%]{gap:10px}}.multisub-border[_ngcontent-%COMP%]{border-top:5px solid #faf9f8}.sub-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}.past-choice-container[_ngcontent-%COMP%]{display:flex;padding:var(--pds-global-space-50, 2px) var(--pds-global-space-100, 4px);justify-content:center;align-items:center;gap:var(--pds-global-space-50, 2px);width:70px;border-radius:var(--pds-global-border_radius-100, 4px);background:var(--pds-global-color-general-blue-20, #D1E5F3)}.past-choice-text[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);text-align:center;font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-50, 10px);font-style:normal;font-weight:400;line-height:120%}.icon-position[_ngcontent-%COMP%]{margin-left:-4px;margin-top:-3px}']}
1)}}return e})(),PA=e=>({"d-none":e});function EA(e,t){1&e&&(kf(0,"div",11),am(1,"Substitution Preferences"),xf())}function DA(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"img",16),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())}))("click",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())})),xf(),kf(2,"span",17),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())}))("click",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())})),am(3,"Back"),xf(),Df()}}function OA(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",18),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())}))("click",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())})),Tf(2,"img",19),kf(3,"span",20),am(4,"Back"),xf()(),Df()}}function BA(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",21),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))}))("click",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))})),Tf(2,"img",19),kf(3,"span",20),am(4,"Back"),xf()(),Df()}}function MA(e,t){if(1&e&&(kf(0,"div",15),ph(1,DA,4,0,"ng-container",1)(2,OA,5,0,"ng-container",1)(3,BA,5,0,"ng-container",1),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.subConfirmFlag),Vd(),zh("ngIf",e.enableMiniCartBackButton&&!e.subSearchFlag),V
1d(),zh("ngIf",e.subSearchFlag)}}function RA(e,t){if(1&e){let e=Mf();kf(0,"span",22),jf("keyup",(function(t){return Wa(e),Ha(Yf(3).setFocusBottom(t))}))("click",(function(){return Wa(e),Ha(Yf(3).closeModal())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(3).closeModal())})),am(1,"Ã"),xf()}}function LA(e,t){if(1&e&&(kf(0,"div",12),ph(1,MA,4,3,"div",13)(2,RA,2,0,"span",14),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.subConfirmFlag||e.subSearchFlag||e.enableMiniCartBackButton),Vd(),zh("ngIf",e.enableCloseButton)}}function FA(e,t){1&e&&(kf(0,"div"),Tf(1,"img",24),kf(2,"label",25),am(3,"If item is out of stock, "),kf(4,"strong"),am(5,"don't substitute"),xf()()())}function NA(e,t){1&e&&(kf(0,"div"),Tf(1,"img",24),kf(2,"label",25),am(3,"If item is out of stock, "),kf(4,"strong"),am(5,"don't substitute"),xf()()())}function UA(e,t){1&e&&(kf(0,"div")(1,"label",25),am(2,"Choose a substitute item. Some substitutions may not be eligible for a Schedule & Save discount."),xf()())}function VA(e,t){if(1&e&&(kf(0,"div"),ph(1,NA,6,0,"div",1)(2,UA,3,0,"div",1),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.isReplenishItem),Vd(),zh("ngIf",e.isReplenishItem)}}function qA(e,t){if(1&e&&(kf(0,"div",23),ph(1,FA,6,0,"div",1)(2,VA,3,2,"div",1),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.editOrderFlag),Vd(),zh("ngIf",e.editOrderFlag)}}function $A(e,t){if(1&e&&(kf(0,"div",33)(1,"div",34),Tf(2,"img",35),xf(),kf(3,"div",36),Tf(4,"img",24),kf(5,"label",37),am(6,"If this item goes out of stock, weâll substitute it with your selection."),xf()()()),2&e){let e=Yf(3);Vd(2),Jf("src",e.originalItemURL+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id)}}function jA(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"div",26)(2,"input",27),mm("ngModelChange",(function(t){Wa(e);let i=Yf(2);return fm(i.searchingItem,t)||(i.searchingItem=t),Ha(t)})),jf("keyup",(function(t){return Wa(e),Ha(Yf(2).searchItem(t))})),xf(),kf(3,"img",28),jf("click",(function(t){return Wa(e),Ha(Yf(2).clearOrSearch(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf(2).clearOrSearch(t))})),xf()(),kf(4,"div"),ph(5,$A,7,1,"div",29),xf(),kf(6,"div",30)(7,"div",31)(8,"substitution-item-dst",32),jf("itemSelected",(function(t){return Wa(e),Ha(Yf(2).searchItemSelected(t))})),xf()()()()}if(2&e){Yf();let e=sm(13),t=Yf();Vd(2),hm("ngModel",t.searchingItem),Vd(),zh("src",t.subSearchFlag?"/erums/cart/dist/assets/images/icons-web-close-grey.svg":"/erums/cart/dist/assets/images/icons-universal-search-grey.svg",id),gh("aria-label",t.subSearchFlag?"Clear":"Search"),Vd(2),zh("ngIf",t.substitutionResponse.length>0)("ngIfElse",e),Vd(3),zh("banner",t.banner)("searchedItem",t.itemId)("originalItemURL",t.originalItemURL)("editOrderFlag",t.editOrderFlag)("substitutionResponse",t.substitutionResponse)("product",t.product)("sourceItem",t.sourceItem)("isAutoClipEnabled",t.isAutoClipEnabled)}}function zA(e,t){if(1&e){let e=Mf();kf(0,"div",38),jf("click",(function(t){return Wa(e),Yf(2).dontSubstitute(t,!0),Ha(t.stopPropagation())}))("keyup.enter",(function(t){return Wa(e),Yf(2).dontSubstitute(t,!0),Ha(t.stopPropagation())})),kf(1,"a",39),jf("keyup",(function(t){return Wa(e),Ha(Yf(2).setFocusBack(t))})),am(2,"Don't substitute"),xf()()}if(2&e){let e=Yf(2);Vd(),zh("ngStyle",e.getPrimaryColor())}}function WA(e,t){if(1&e){let e=Mf();kf(0,"div",40),jf("click",(function(t){return Wa(e),Yf(2).dontSubstitute(t,!1),Ha(t.stopPropagation())}))("keyup.enter",(function(t){return Wa(e),Yf(2).dontSubstitute(t,!1),Ha(t.stopPropagation())})),kf(1,"a",41),jf("keyup",(function(t){return Wa(e),Ha(Yf(2).setFocusBack(t))})),am(2,"Choose substitution"),xf()()}if(2&e){let e=Yf(2);Vd(),zh("ngStyle",e.getPrimaryColor())}}function HA(e,t){1&e&&Tf(0,"div",42)}
1function YA(e,t){1&e&&(kf(0,"label",46),am(1,"We couldnât find any similar items"),xf())}function GA(e,t){1&e&&(kf(0,"label",47),am(1,"Try searching for another item to substitute with."),xf())}function KA(e,t){1&e&&(kf(0,"label",46),am(1,"No products available"),xf())}function QA(e,t){if(1&e&&(kf(0,"div",43)(1,"div"),ph(2,YA,2,0,"label",44),xf(),kf(3,"div"),ph(4,GA,2,0,"label",45),xf(),kf(5,"div"),ph(6,KA,2,0,"label",44),xf()()),2&e){let e=Yf(2);Vd(2),zh("ngIf",!e.noProductsMsg),Vd(2),zh("ngIf",!e.noProductsMsg),Vd(2),zh("ngIf",e.noProductsMsg)}}function JA(e,t){if(1&e&&(Ef(0),ph(1,EA,2,0,"div",2),kf(2,"div",3),ph(3,LA,3,2,"div",4),kf(4,"h1",5),am(5,"Substitution preferences"),xf(),ph(6,qA,3,2,"div",6)(7,jA,9,13,"div",1),kf(8,"div",7),ph(9,zA,3,1,"div",8)(10,WA,3,1,"div",9),xf()(),ph(11,HA,1,0,"div",10)(12,QA,7,3,"ng-template",null,0,Wm),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.isMiniCartFlag),Vd(),zh("ngClass",Om(8,PA,!e.isComponentLoaded)),Vd(),zh("ngIf",e.enableBackHeader),Vd(3),zh("ngIf",e.substitutionFlag),Vd(),zh("ngIf",!e.substitutionFlag),Vd(2),zh("ngIf",!e.substitutionFlag),Vd(),zh("ngIf",e.substitutionFlag),Vd(),zh("ngIf",e.loaderFlag)}}function ZA(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",48)(2,"app-substitutions-view",49),jf("itemSelected",(function(t){return Wa(e),Ha(Yf().searchItemSelected(t))}))("dontSubstituteitem",(function(t){return Wa(e),Ha(Yf().dontSubstitute(t,!0))}))("setSubstitutionsForAllItems",(function(){return Wa(e),Ha(Yf().setSubstitutionsForAll())}))("closeSubstitutions",(function(){return Wa(e),Ha(Yf().closeModal())})),xf()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",Om(11,PA,!e.isComponentLoaded)),Vd(),zh("token",e.token)("storeId",e.storeId)("banner",e.banner)("miniCartFlag",e.isMiniCartFlag)("cartCategory",e.cartCategory)("serviceType",e.serviceType)("multiSubstitutionEnabled",!1)("substitutionResponse",e.substitutionResponse)("product",e.product)("editOrderFlag",e.editOrderFlag)}}var XA=(()=>{class e{constructor(e,t,i,n){this.renderer=e,this.appConfigService=t,this.substitutionService=i,this._datalayerService=n,this.itemSelect=!0,this._substitutionItemData=[],this.subSearchFlag=!1,this.enableCloseButton=!0,this.isExpressCheckoutEnabled=!1,this.isBetterTaxEnabled=!1,this.itemSelected=new _l,this.closeSubstitutionDrawer=new _l,this.substitutionServiceError=new _l,this.onSucessCloseModal=new _l,this.onConfirmationSelect=new _l,this.backEventTrigger=new _l,this.setSubstitutionsForAllItems=new _l,this.substitutionFlag=!1,this.substituteLabel="weâll substitute with",this.prevID="",this.noProductsMsg=!1,this.isComponentLoaded=!1}ngOnInit(){if(this.substitutionService.$subErrorEvent.subscribe((e=>{this.loaderFlag=!1,this.substitutionServiceError.emit(e)})),this.substitutionResponse=[],this.appConfigService.isDesignMode()||(this.substitutionService.accessToken=this.token,"Do Not Substitute"===this.substitutePreference?(this.substitutionFlag=!0,this.isComponentLoaded=!0,this.initializeSubstitution()):(this.substitutionFlag=!1,this.loaderFlag=!0,this.initializeSubstitution())),setTimeout((()=>{document.getElementById("substitution-modal")&&(this.enableBackHeader?this.substitutionService.setTrapFocus("#substitution-modal"):this.substitutionService.setTrapFocus("#substitution-modal",!1))}),1e3),this.isMiniCartFlag){let e=document.getElementsByClassName("mini-cart-v2-close-button")[0];e&&(e.style.display="none")}this.setDontSubstituteHeight()}ngOnChanges(){this.loaderFlag=!1,this.setDontSubstituteHeight()}setDontSubstituteHeight(){return this.substitutionService.getContainerHeight(this.isMiniCartFlag)}initializeSubstitution(){setTimeout((()=>{this.originalItemURL="https://images.albertsons-media.com/is/image/ABS/"+this.itemId,this.substitutionItemData&&(this.substitutionItemData.map((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id})),this.initialData=this.substitutionItemData,this.substitutionResponse=this.substitutionItemData,this.substitutionResponse&&this.substitutionResponse.length>0&&!this.subConfirmFlag?(this.initialUpdate(this.substitutionResponse[0],""),this.subSearchFlag=!1,this.loaderFlag=!1):0===this.substitutionResponse.length&&(this.substitutionResponse=[],this.loaderFlag=!1),this.loaderFlag=!1),this.isComponentLoaded=!0,this.loadParity=!0}),100)}backBtnEventTrigger(){this.backEventTrigger.emit()}updateCartWithSubstitute(e,t){let i=this.product&&Object.keys(this.product).length>0?this.product:this.sourceItem;if(!this.subConfirmFlag){this.selectedSubstitute=e;let n=i?.options?.map((e=>e?.upcId?e?.upcId:[]));!0===this.editOrderFlag?this.body={substitutionPreferenceV2:"Substitute With",quantity:this.quantity,substituteItems:[{itemId:e.id?e.id:e.itemId,algoType:e.algoType?.toString()}],entryId:i?.entryId?i?.entryId:""}:"Best Available"===e.substitutionPreferenceV2?this.body={cartItemsList:[{itemId:this.itemId,qty:this.quantity,substitutionPreferenceV2:"Best Available",entryId:i?.entryId?i?.entryId:"",modifierOptionUPCs:n}],cartCategory:this.cartCategory}:this.body={cartItemsList:[{itemId:this.itemId,qty:this.quantity,substitutionPreferenceV2:"Substitute With",substituteItems:[{itemId:e.id?e.id:e.itemId,algoType:e?.algoType?.toString()}],entryId:i?.entryId?i?.entryId:"",modifierOptionUPCs:n}],cartCategory:this.cartCategory},this.loaderFlag=!0,this.substitutionService.saveItemNote(this.cartId,this.itemId,this.body,this.editOrderFlag,this.storeId,this.orderId,this.banner,this.token,this.serviceType,this.zipCode,this.cartCategory,this.isExpressCheckoutEnabled,this.isBetterTaxEnabled,this.sourceItem).subscribe((i=>{this.selectedSubstitute=e,"search"===t&&this.closeModal(),this.prevID=e.id,this.loaderFlag=!1,this.itemSelected.emit({selectedItem:e,response:i,initial:!1})}))}}initialUpdate(e,t){this.subConfirmFlag||(this.selectedSubstitute=e,this.selectedSubstitute.Subflag&&setTimeout((()=>{$("#"+this.selectedSubstitute.id).addClass("d-none"),$("#S"+this.selectedSubstitute.id).removeClass("d-none")}),500))}closeModal(){this.closeSubstitutionDrawer.emit(!0)}dontSubstitute(e,t){if(this.subConfirmFlag){this.itemSelected.emit({selectedItem:[],response:"confirmationEventTrue",pageEvent:"dontSubstitute"});let e={productID:"",isSubstitution:"false",substitutionOption:"dont-substitute",isAutoClipEnabled:this.isAutoClipEnabled},t=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:this.sourceItem;this._datalayerService.setModalClickEventsSubstitution("dont-substitute",e,null,t)}else if(t){this.loaderFlag=!0,!0===this.editOrderFlag?this.body={substitutionPreferenceV2:"Do Not Substitute",quantity:this.quantity,substituteItems:[],entryId:this.product?.entryId?this.product?.entryId:""}:this.body={cartItemsList:[{itemId:this.itemId,qty:this.quantity,substitutionPreferenceV2:"Do Not Substitute",substituteItems:[],entryId:this.product?.entryId?this.product?.entryId:""}],cartCategory:this.cartCategory},this.substitutionService.saveItemNote(this.cartId,this.itemId,this.body,this.editOrderFlag,this.storeId,this.orderId,this.banner,this.token,this.serviceType,this.zipCode,this.cartCategory,this.isExpressCheckoutEnabled,this.isBetterTaxEnabled,this.sourceItem).subscribe((e=>{this.substituteLabel=1==t?"don't substitute":"weâll substitute with",this.substitutionFlag=t,this.closeSubstitutionDrawer.emit(!0),this.loaderFlag=!1,this.itemSelected.emit({selectedItem:[],response:e})}));let e={productID:"",isSubstitution:"false",substitutionOption:"dont-substitute",isAutoClipEnabled:this.isAutoClipEnabled},i=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:this.sourceItem;this._datalayerService.setModalClickEventsSubstitution("dont-substitute",e,null,i)}else this.initializeSubstitution(),this.substitutionFlag=t}searchItemSelected(e){this.subConfirmFlag?(this.prevID&&document.getElementById(this.prevID)&&(document.getElementById(this.prevID).classList.remove("d-none"),document.getElementById("S"+this.prevID).classList.add("d-none")),document.getElementById(e.id).classList.add("d-none"),document.getElementById("S"+e.id).classList.remove("d-none"),this.prevID=e.id,this.onConfirmationSelect.emit(e)):this.updateCartWithSubstitute(e,"")}setFocusBack(e){9===e.keyCode&&this.substitutionService.setTrapFocus("#substitution-modal")}setFocusBottom(e){e.shiftKey&&9===e.keyCode&&this.substitutionService.setTrapFocus("#anchor-bottom")}clearSearch(e){this.subSearchFlag=!1,this.searchingItem="",0===this.searchingItem.length&&(this.initialData?this.substitutionResponse=this.initialData:this.substitutionResponse=[],this.selectedSubstitute?this.substitutionResponse.unshift(this.selectedSubstitute):this.substitutionResponse=[],this.substitutionResponse?this.substitutionResponse=this.getUniqueListBy(this.substitutionResponse,"id"):this.substitutionResponse=[],this.selectedSubstitute&&setTimeout((()=>{document.getElementById(this.selectedSubstitute.id).classList.add("d-none"),document.getElementById("S"+this.selectedSubstitute.id).classList.remove("d-none")}),500))}clearOrSearch(e){return this.subSearchFlag?this.clearSearch(e):this.searchItem(e)}searchItem(e){null!=e&&null!=e&&this.searchingItem&&this.searchingItem.length>0&&(13===e.which||1===e.which)?(this.subSearchFlag=!0,this.loaderFlag=!0,this.pageStart=0,this.substitutionService.getSearchItem(this.searchingItem,this.pageStart,this.storeId,this.banner,this.serviceType,this.cartCategory,this.isAutoClipEnabled,this.token).subscribe((e=>{if(e&&e.response){this.totalSearchRecords=e.response.numFound,e.response?.docs?.map((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id}
1));let t=e.response.docs?e.response.docs:[];(this.selectedSubstitute||t.length>0)&&(t.map(((e,i)=>{(e.id===this.itemId.toString()||e.id===this.selectedSubstitute?.id.toString())&&t.splice(i,1)})),this.readMessage("Substitution products loaded")),this.substitutionResponse=t,this.substitutionResponse?.length||this.readMessage("Products are not available"),this.loaderFlag=!1;let i={searchResults:this.totalSearchRecords,searchTerm:this.searchingItem,isSubstitution:this.totalSearchRecords?"true":"false",isAutoClipEnabled:this.isAutoClipEnabled},n=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:this.sourceItem;this._datalayerService.setModalClickEventsSubstitution("search",i,this.substitutionResponse,n),this.noProductsMsg=!1}else{this.loaderFlag=!1,this.readMessage("Products are not available"),this.substitutionResponse=[],this.noProductsMsg=!0;let e={searchResults:0,searchTerm:this.searchingItem,isSubstitution:"false",isAutoClipEnabled:this.isAutoClipEnabled},t=this.product&&"object"==typeof this.product&&Object.keys(this.product)?.length>0?this.product:this.sourceItem;this._datalayerService.setModalClickEventsSubstitution("search",e,this.substitutionResponse,t)}}),(e=>{this.loaderFlag=!1,this.readMessage("Products are not available"),this.substitutionResponse=[],this.noProductsMsg=!0,this.substitutionServiceError.emit(e)}))):0===this.searchingItem.length&&(this.showLoadMore=!1,this.subSearchFlag=!1,this.initialData?this.substitutionResponse=this.initialData:this.substitutionResponse=[],this.selectedSubstitute?this.substitutionResponse.unshift(this.selectedSubstitute):this.substitutionResponse=[],this.substitutionResponse?this.substitutionResponse=this.getUniqueListBy(this.substitutionResponse,"id"):this.substitutionResponse=[],this.selectedSubstitute&&setTimeout((()=>{document.getElementById(this.selectedSubstitute.id).classList.add("d-none"),document.getElementById("S"+this.selectedSubstitute.id).classList.remove("d-none")}),500))}getUniqueListBy(e,t){return[...new Map(e.map((e=>[e[t],e]))).values()]}getDynamicStyle(){return this.substitutionService.getDynamicStyle(this.banner)}getPrimaryColor(){return this.substitutionService.getPrimaryColor(this.banner)}readMessage(e){this.substitutionService.readMessage(e,2e3)}setSubstitutionsForAll(){this.setSubstitutionsForAllItems.emit("")}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Vw),$d(fC),$d(kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["substitution-dst"]],inputs:{enableBackHeader:"enableBackHeader",enableCloseButton:"enableCloseButton",enableMiniCartBackButton:"enableMiniCartBackButton",substitutionItemData:"substitutionItemData",banner:"banner",editOrderFlag:"editOrderFlag",subConfirmFlag:"subConfirmFlag",substituteItem:"substituteItem",isMiniCartFlag:"isMiniCartFlag",cartId:"cartId",storeId:"storeId",serviceType:"serviceType",zipCode:"zipCode",token:"token",env:"env",itemId:"itemId",entryId:"entryId",product:"product",substitutePreference:"substitutePreference",quantity:"quantity",orderId:"orderId",isReplenishItem:"isReplenishItem",cartCategory:"cartCategory",isExpressCheckoutEnabled:"isExpressCheckoutEnabled",isBetterTaxEnabled:"isBetterTaxEnabled",sourceItem:"sourceItem",newSubViewFlag:"newSubViewFlag",isAutoClipEnabled:"isAutoClipEnabled"},outputs:{itemSelected:"itemSelected",closeSubstitutionDrawer:"closeSubstitutionDrawer",substitutionServiceError:"substitutionServiceError",onSucessCloseModal:"onSucessCloseModal",onConfirmationSelect:"onConfirmationSelect",backEventTrigger:"backEventTrigger",setSubstitutionsForAllItems:"setSubstitutionsForAllItems"},features:[xm([fC,Vw]),ga],decls:2,vars:2,consts:[["noResult",""],[4,"ngIf"],["class","sr-only","aria-live","polite",4,"ngIf"],["id","substitution-modal",1,"main-container","col-12",3,"ngClass"],["class","col-12 pl-2 pt-2",4,"ngIf"],[1,"col-12","sub-header"],["class","col-12 pb-1 pl-2",4,"ngIf"],[1,"bottom-container"],["class","mt-1 mt-md-4 focusable-div","role","link","tabindex","0","aria-labelledby","dont-substitute-ada",3,"click","keyup.enter",4,"ngIf"],["class","mt-1 mt-md-4 focusable-div","role","link","tabindex","0","aria-labelledby","choose-substitute-ada",3,"click","keyup.enter",4,"ngIf"],["class","sub-loader","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],["aria-live","polite",1,"sr-only"],[1,"col-12","pl-2","pt-2"],["class","d-inline back back-carot",4,"ngIf"],["id","subs-close-btn","tabindex","0","role","button","aria-label","close substitution modal","class","sub-modal-close-btn d-block","data-dismiss","modal",3,"keyup","click","keydown.enter",4,"ngIf"],[1,"d-inline","back","back-carot"],["role","button","tabindex","0","src","/erums/cart/dist/assets/images/icons-universal-caret-left-gray.svg","alt","",3,"keyup.enter","click"],["role","button","tabindex","0",1,"back-label",3,"keyup.enter","click"],["role","button","tabindex","0",3,"keyup.enter","click"],["src","/erums/cart/dist/assets/images/icons-universal-caret-left-gray.svg","alt",""],[1,"back-text"],["role","button","tabindex","0","data-target","#substitution-search",3,"keyup.enter","click"],["id","subs-close-btn","tabindex","0","role","button","aria-label","close substitution modal","data-dismiss","modal",1,"sub-modal-close-btn","d-block",3,"keyup","click","keydown.enter"],[1,"col-12","pb-1","pl-2"],["src","/erums/cart/dist/assets/images/icons-web-substitution.svg",1,"Icons-Web-substitution"],["for","",1,"sub-label","mb-2"],[1,"col-12"],["tabindex","0","type","text","placeholder","Search",1,"sub-search",3,"ngModelChange","keyup","ngModel"],["tabindex","0","role","button","data-target","#substitution-search","alt","",1,"sub-search-icon",3,"click","keyup.enter","src"],["class","col-12 mb-3 mt-2 pr-0 row",4,"ngIf","ngIfElse"],[1,"item-container"],[1,"scroll-sub"],[3,"itemSelected","banner","searchedItem","originalItemURL","editOrderFlag","substitutionResponse","product","sourceItem","isAutoClipEnabled"],[1,"col-12","mb-3","mt-2","pr-0","row"],[1,"col-2","col-md-2","pl-1","pr-0"],["alt","",1,"product-image","original-product-image",3,"src"],[1,"col-10","col-md-10","d-flex","pl-1"],[1,"item-name"],["role","link","tabindex","0","aria-labelledby","dont-substitute-ada",1,"mt-1","mt-md-4","focusable-div",3,"click","keyup.enter"],["id","dont-substitute-ada","tabindex","0","aria-hidden","true",1,"anchor-bottom",3,"keyup","ngStyle"],["role","link","tabindex","0","aria-labelledby","choose-substitute-ada",1,"mt-1","mt-md-4","focusable-div",3,"click","keyup.enter"],["id","choose-substitute-ada","tabindex","0","aria-hidden","true",1,"choose-substition",3,"keyup","ngStyle"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader"],[1,"notavailable-label"],["class","sub-label-low pl-2",4,"ngIf"],["class","ml-1 pl-2 search-another-item-label","for","",4,"ngIf"],[1,"sub-label-low","pl-2"],["for","",1,"ml-1","pl-2","search-another-item-label"],["id","substitution-modal",1,"smart-sub
1s-container","col-12",3,"ngClass"],[3,"itemSelected","dontSubstituteitem","setSubstitutionsForAllItems","closeSubstitutions","token","storeId","banner","miniCartFlag","cartCategory","serviceType","multiSubstitutionEnabled","substitutionResponse","product","editOrderFlag"]],template:function(e,t){1&e&&ph(0,JA,14,10,"ng-container",1)(1,ZA,3,13,"ng-container",1),2&e&&(zh("ngIf",!t.newSubViewFlag),Vd(),zh("ngIf",t.newSubViewFlag&&t.loadParity))},dependencies:[d_,$_,ES,sy,cy,gy,WI,TA],styles:[".inline[_ngcontent-%COMP%]{display:inline}.product-image.original-product-image[_ngcontent-%COMP%]{margin-top:0}.product-image[_ngcontent-%COMP%]{width:48px!important;height:48px!important;margin-left:1em;margin-top:1em}.lowstock-label[_ngcontent-%COMP%]{width:inherit}.product-price-container[_ngcontent-%COMP%]{text-align:right}.product-price[_ngcontent-%COMP%]{font-weight:600}.sub-label-low[_ngcontent-%COMP%]{width:300px;height:22px;margin:0 144px 1px 3px;font-size:16px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal;color:#4b4a4b;width:317px}.load-more-anchor[_ngcontent-%COMP%]{text-decoration:underline;padding-left:35%}.grey-header-link[_ngcontent-%COMP%]{color:#4b4b4b}.load-more[_ngcontent-%COMP%]{padding-top:3%}.back[_ngcontent-%COMP%]{width:29px;height:22px;font-size:13px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.69;letter-spacing:normal;color:#4a4a4a;cursor:pointer}.choose-substition[_ngcontent-%COMP%]{cursor:pointer;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal;text-align:right;text-decoration:underline}.sub-label[_ngcontent-%COMP%]{width:290px;height:25px;margin:0 5px 0 4px;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#4b4b4b}.Icons-Web-substitution[_ngcontent-%COMP%]{width:24px;height:24px;margin:12px 8px;object-fit:contain}.head-border[_ngcontent-%COMP%]{border-bottom:1px solid #e6e7e8}.icon-width[_ngcontent-%COMP%]{height:24px;width:24px;margin-top:.5em}.scroll-sub[_ngcontent-%COMP%]{overflow-y:scroll;overflow-x:hidden;height:calc(100vh - 400px)}@media (min-width: 1px) and (max-width: 991px){.scroll-sub[_ngcontent-%COMP%]{height:45vh}}.scroll-sub[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.scroll-sub[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}.margin-product-left[_ngcontent-%COMP%]{margin-left:-2em}@media (min-width: 1px) and (max-width: 568px){#substitution-modal[_ngcontent-%COMP%] .sub-search-icon[_ngcontent-%COMP%]{margin-left:-15%}#substitution-modal[_ngcontent-%COMP%] .sub-label-low[_ngcontent-%COMP%]{width:100%}}@media (min-width: 569px) and (max-width: 768px){.btn-select[_ngcontent-%COMP%]{width:100%;margin-left:20%}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}}@media (min-width: 768px) and (max-width: 1023px){.margin-label[_ngcontent-%COMP%]{margin-left:-2em}.btn-select[_ngcontent-%COMP%]{width:70%;margin-left:45%}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;padding-left:75%;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}}@media (min-width: 1024px) and (max-width: 1366px){.margin-label[_ngcontent-%COMP%]{margin-left:-2em}}@media screen and (min-width: 1440px){.margin-label[_ngcontent-%COMP%]{margin-left:-3em}.selected-anchor[_ngcontent-%COMP%]{width:54px;height:22px;margin:0 0 0 4px;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.57;letter-spacing:normal;color:#00762e}}.main-container[_ngcontent-%COMP%]{padding:.5%;background:#fff;height:auto;z-index:1;top:0;right:0;overflow-x:hidden;transition:.2s;height:calc(100vh - 180px)}.smart-subs-container[_ngcontent-%COMP%]{padding:.5%;background:#fff;height:auto;z-index:1;top:0;right:0;overflow-x:hidden;transition:.2s}.sub-search-icon[_ngcontent-%COMP%]{margin-left:-10%}.sub-modal-close-btn[_ngcontent-%COMP%]{float:right;margin-right:5%;font-size:2.4em;cursor:pointer}.sub-header[_ngcontent-%COMP%]{width:389px;height:32px;margin:20px 4px 0 0;font-size:20px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.23;letter-spacing:normal;color:#4b4b4b}.if-sub[_ngcontent-%COMP%]{width:388px;height:36px;margin:0 5px 0 4px;font-size:10px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#4b4b4b}.sub-search[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:98%;height:40px;margin:16px 4px 16px 0;padding:8px 5px 8px 17px;border:solid 1px #7D7B78;background-color:#fff;border-radius:100px}.price[_ngcontent-%COMP%]{width:100%;margin:0 165px 0 11px;font-size:16px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal}
1.item-name[_ngcontent-%COMP%]{width:100%;font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.43;letter-spacing:normal;color:#4b4b4b;padding-left:10px;margin-bottom:0!important}.item-unit[_ngcontent-%COMP%]{width:100%;height:12px;margin:6px 40px 8px 12px;font-size:9px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:.15px}.anchor-bottom[_ngcontent-%COMP%]{cursor:pointer;bottom:10%;text-decoration:underline}body[_ngcontent-%COMP%]{background-color:#78909c}.bottom-container[_ngcontent-%COMP%]{text-align:center;border-top:1px solid #e6e7e8;width:85%;margin-left:6%;position:absolute;overflow-x:hidden;overflow-y:hidden;height:65px}.bottom-container[_ngcontent-%COMP%]:focus{outline:none!important}.back-carot[_ngcontent-%COMP%]{height:20px;width:20px}.focusable-div[_ngcontent-%COMP%]:focus{outline:none!important}.focusable-div[_ngcontent-%COMP%]:focus > a[_ngcontent-%COMP%]{outline:2px solid #757575!important;outline-offset:4px!important}#subs-close-btn[_ngcontent-%COMP%]:focus{outline:2px solid #757575!important;outline-offset:4px}.sub-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}.sub-charge-label[_ngcontent-%COMP%]{width:87%;vertical-align:middle}.back-text[_ngcontent-%COMP%]{color:#4a4a4a}#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%]{height:calc(100vh - 162px)}@media (min-width: 1px) and (max-width: 991px){#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%]{height:calc(100vh - 108px)}}#substitution-modal.subs-modal-cart[_ngcontent-%COMP%]{height:calc(100vh - 75px)}@media (min-width: 1px) and (max-width: 991px){#substitution-modal.subs-modal-cart[_ngcontent-%COMP%]{height:calc(100vh - 90px)}}"]})}}return e})(),ek=(()=>{class e{constructor(){}showTooltip(){$("#wcax-tooltip").show(),$("#wcax-tooltip").focus(),this.adaMessage(),setTimeout((()=>{$("#wcax-tooltip").hide()}),3e3)}adaMessage(){this.adaDisplayMessage="Your substitution has been updated.",setTimeout((()=>{this.adaDisplayMessage=""}),3e3)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["wcax-tooltip-dst"]],decls:7,vars:1,consts:[["id","wcax-tooltip","role","dialog","aria-labelledby","displayMessage",1,"tooltip-container"],[1,"col-12","d-flex"],["alt","","src","/erums/cart/dist/assets/images/icons-universal-check-green.svg",1,"Icons-Universal-Check-Green"],[1,"p-text"],["aria-live","polite",1,"sr-only"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1),Tf(2,"img",2),kf(3,"p",3),am(4,"Your substitution has been updated."),xf(),kf(5,"span",4),am(6),xf()()()),2&e&&(Vd(6),lm(t.adaDisplayMessage))},styles:[".p-text[_ngcontent-%COMP%]{margin:0%;padding-left:2%}.Icons-Universal-Check-Green[_ngcontent-%COMP%]{width:24px;height:24px;margin:0 8px 0 0;object-fit:contain}.tooltip-container[_ngcontent-%COMP%]{box-shadow:0 4px 9px #00000080;background-color:#fff;position:fixed;top:14%;display:none;left:8%}@media (min-width: 569px) and (max-width: 768px){.tooltip-container[_ngcontent-%COMP%]{left:8%;padding:10px 20px;width:85%}}@media (min-width: 768px) and (max-width: 1023px){.tooltip-container[_ngcontent-%COMP%]{left:26%;padding:10px 20px;width:50%}}@media (min-width: 1024px) and (max-width: 1366px){.tooltip-container[_ngcontent-%COMP%]{left:28%;padding:10px 20px;width:40%}}@media screen and (min-width: 1367px){.tooltip-container[_ngcontent-%COMP%]{left:40%;padding:10px 20px;width:25%}}@media screen and (max-width: 569px){.tooltip-container[_ngcontent-%COMP%]{left:2%;padding:10px 20px;width:90%}}"]})}}return e})();function tk(e,t){1&e&&(kf(0,"span",14),am(1,"Past choice"),xf())}function ik(e,t){if(1&e&&(kf(0,"div")(1,"div",5),Tf(2,"img",6),kf(3,"a",7),am(4,"Edit substitution"),xf(),ph(5,tk,2,0,"span",8),xf(),kf(6,"div",9),Tf(7,"img",10),kf(8,"div",11)(9,"span",12),am(10),qm(11,"currency"),xf(),kf(12,"span",13),am(13),qm(14,"currency"),xf()()()()),2&e){let e=t.$implicit,i=Yf(2);Vd(3),gh("aria-label"," Edit substitution "+(null==i.item?null:i.item.name)),Vd(2),zh("ngIf","selected"===(null==e?null:e.algoType)||"preferred"===(null==e?null:e.algoType)),Vd(2),Jf("src","https://images.albertsons-media.com/is/image/ABS/"+(null==e?null:e.itemId)+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Vd(3),dm("",null==e?null:e.name,", Quantity 1, ",jm(11,7,null!=e&&e.basePrice?null==e?null:e.basePrice:null==e||null==e.itemPrice?null:e.itemPrice.basePrice,"USD"),""),Vd(3),dm("",null==e?null:e.name,", Qty 1, ",jm(14,10,null!=e&&e.basePrice?null==e?null:e.basePrice:null==e||null==e.itemPrice?null:e.itemPrice.basePrice,"USD"),"")}}function nk(e,t){if(1&e&&(Ef(0),ph(1,ik,15,13,"div",4),Df()),2&e){let e=Yf();Vd(),zh("ngForOf",null==e.item?null:e.item.substituteItems)}}function rk(e,t){if(1&e&&(Ef(0),kf(1,"div"),Tf(2,"img",6),kf(3,"span",15),am(4),xf(),kf(5,"a",7),am(6,"Edit"),xf()(),Df()),2&e){let e=Yf();
1Vd(4),cm(" ",e.paritySubsFlag?"Do not substitute":"Don't substitute"," "),Vd(),gh("aria-label",(null==e.item?null:e.item.name)+" Edit ")}}function sk(e,t){if(1&e&&(Ef(0),Tf(1,"img",6),kf(2,"span",12),am(3),xf(),kf(4,"a",7),am(5,"Select substitution"),xf(),Df()),2&e){let e=Yf();Vd(3),lm(null==e.item?null:e.item.name),Vd(),gh("aria-label"," Select substitution "+(null==e.item?null:e.item.name))}}function ak(e,t){if(1&e&&(Ef(0),Tf(1,"img",6),kf(2,"span",12),am(3),xf(),kf(4,"a",7),am(5,"Select substitution"),xf(),Df()),2&e){let e=Yf();Vd(3),lm(null==e.item?null:e.item.name),Vd(),gh("aria-label"," Substitute with best match "+(null==e.item?null:e.item.name))}}function ok(e,t){if(1&e&&(Ef(0),Tf(1,"img",6),kf(2,"span",12),am(3),xf(),kf(4,"span",15),am(5,"Substitute with best match"),xf(),kf(6,"a",7),am(7,"Edit"),xf(),Df()),2&e){let e=Yf();Vd(3),lm(null==e.item?null:e.item.name),Vd(3),gh("aria-label","Edit substitute with best match "+(null==e.item?null:e.item.name))}}var lk=(()=>{class e{set item(e){this._item=this.normalizeItem(e)}get item(){return this._item}constructor(e){this.substitutionService=e,this.SubstitutionDrawerEvent=new _l}ngOnInit(){}normalizeItem(e){return e&&(Array.isArray(e.substituteItems)||(e.substituteItems=[]),e)}openSubstitutionDrawer(e,t){this.SubstitutionDrawerEvent.emit(this.item),this.substitutionService.rightDrawer.next("sub"),window.eddlLoadComplete&&window.digitalData&&window.digitalData.modal&&(window.digitalData.modal.sendModalViewEvent=!0),localStorage.setItem("selectedItem",t),this.triggerSnackbarCloseEvent("openSubstitutionDrawer")}triggerSnackbarCloseEvent(e){}static{this.ɵfac=function(t){return new(t||e)($d(fC))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-substitution-card"]],inputs:{item:"item",paritySubsFlag:"paritySubsFlag"},outputs:{SubstitutionDrawerEvent:"SubstitutionDrawerEvent"},decls:8,vars:6,consts:[[1,"subs-choice-container",3,"keyup.enter","click"],[1,"edit-substitution-div"],["data-toggle","modal","data-target","#substitution-lib",3,"id"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"mb-1","ml-1"],["alt","","aria-hidden","true","src","/erums/cart/dist/assets/images/substitution-icon.svg"],["tabindex","0","role","link",1,"substitution-text","pl-1"],["aria-label","Past choice","class","past-choice-text",4,"ngIf"],[1,"substitute-item-div"],["aria-hidden","true","alt","","loading","lazy",1,"substitution-item-img",3,"src"],[1,"substitute-item-text"],[1,"sr-only"],["aria-hidden","true",1,"substitute-name"],["aria-label","Past choice",1,"past-choice-text"],[1,"no-substitution-text","pl-1"]],template:function(e,t){1&e&&(kf(0,"div",0),jf("keyup.enter",(function(e){return t.openSubstitutionDrawer(e,null==t.item?null:t.item.itemId)}))("click",(function(e){return t.openSubstitutionDrawer(e,null==t.item?null:t.item.itemId)})),kf(1,"div",1)(2,"span",2),ph(3,nk,2,1,"ng-container",3)(4,rk,7,2,"ng-container",3)(5,sk,6,2,"ng-container",3)(6,ak,6,2,"ng-container",3)(7,ok,8,2,"ng-container",3),xf()()()),2&e&&(Vd(2),Jf("id","subs"+(null==t.item?null:t.item.itemId)),Vd(),zh("ngIf",null==t.item||null==t.item.substituteItems?null:t.item.substituteItems.length),Vd(),zh("ngIf","Do Not Substitute"===(null==t.item?null:t.item.substitutionPreferenceV2)),Vd(),zh("ngIf",!(null!=t.item&&null!=t.item.substituteItems&&t.item.substituteItems.length||"Do Not Substitute"===(null==t.item?null:t.item.substitutionPreferenceV2)||"Best Available"!==(null==t.item?null:t.item.substitutionPreferenceV2)&&"Substitute With"!==(null==t.item?null:t.item.substitutionPreferenceV2)||t.paritySubsFlag)),Vd(),zh("ngIf",!(null!=t.item&&null!=t.item.substituteItems&&t.item.substituteItems.length)&&"Substitute With"===(null==t.item?null:t.item.substitutionPreferenceV2)&&t.paritySubsFlag),Vd(),zh("ngIf",!(null!=t.item&&null!=t.item.substituteItems&&t.item.substituteItems.length)&&"Best Available"===(null==t.item?null:t.item.substitutionPreferenceV2)&&t.paritySubsFlag))},dependencies:[oy,cy,By],styles:[".edit-substitution-div[_ngcontent-%COMP%]{width:auto;display:flex;border:1px solid #DDD9D5;border-radius:4px;padding:8px 12px;margin-top:10px;margin-left:16px}.substitution-item-img[_ngcontent-%COMP%]{width:32px;height:32px}.substitution-text[_ngcontent-%COMP%]{margin-left:4px;text-decoration:underline;cursor:pointer;color:#2a2928;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:600;line-height:21px}.no-substitution-text[_ngcontent-%COMP%]{margin-left:4px;cursor:pointer;color:#2a2928;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:600;line-height:20.3px}.past-choice-text[_ngcontent-%COMP%]{font-family:Nunito Sans;font-size:10px;font-style:normal;font-weight:400;line-height:12px;background-color:#fee0d5;border-radius:4px;padding:2px 4px;color:#1f1e1e;text-align:center;margin:0 5px}.substitute-item-div[_ngcontent-%COMP%]{display:flex}.subs-choice-container[_ngcontent-%COMP%]{cursor:pointer}.substitute-item-text[_ngcontent-%COMP%]{white-space:normal;color:#2a2928;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:400;line-height:21px}
1.substitute-name[_ngcontent-%COMP%]{display:flex;margin-top:.5em;margin-left:.5em}@media screen and (max-width: 992px){.edit-substitution-div[_ngcontent-%COMP%]{margin:0 16px}}"]})}}return e})(),ck=e=>[e];function dk(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",12),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())}))("click",(function(){return Wa(e),Ha(Yf(4).backBtnEventTrigger())})),Tf(2,"img",13),kf(3,"span",14),am(4,"Back to mini cart"),xf()(),Df()}}function uk(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",15),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))}))("click",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))})),Tf(2,"img",13),kf(3,"span",14),am(4,"Back to substitutions for all items"),xf()(),Df()}}function pk(e,t){if(1&e&&(kf(0,"div",11),ph(1,dk,5,0,"ng-container",2)(2,uk,5,0,"ng-container",2),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.enableMiniCartBackButton&&!e.subSearchFlag||e.subConfirmFlag),Vd(),zh("ngIf",e.subSearchFlag)}}function hk(e,t){if(1&e){let e=Mf();kf(0,"span",16),jf("keyup",(function(t){return Wa(e),Ha(Yf(3).setFocusBottom(t))}))("click",(function(){return Wa(e),Ha(Yf(3).closeModal())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(3).closeModal())})),am(1,"Ã"),xf()}}function fk(e,t){if(1&e&&(kf(0,"div",7),ph(1,pk,3,2,"div",8),kf(2,"h1",9),am(3,"Substitution preferences"),xf(),ph(4,hk,2,0,"span",10),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.subConfirmFlag||e.subSearchFlag||e.enableMiniCartBackButton),Vd(3),zh("ngIf",e.enableCloseButton)}}function mk(e,t){1&e&&(kf(0,"span",33),am(1,", don't substitute"),xf())}function gk(e,t){if(1&e){let e=Mf();kf(0,"a",34),jf("click",(function(t){Wa(e);let i=Yf(2).$implicit;return Yf(3).changeProduct(i,!0),Ha(t.stopPropagation())}))("keyup.enter",(function(t){Wa(e);let i=Yf(2).$implicit;return Yf(3).changeProduct(i,!0),Ha(t.stopPropagation())})),am(1,"Pick your own"),Tf(2,"img",35),xf()}if(2&e){let e=Yf(2).$implicit,t=Yf(3);Zf("id","change-substitute-ada-",e.id,""),zh("ngStyle",t.getPrimaryColor()),gh("aria-label","Pick your own substitute item for "+e.name)}}function bk(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(4).$implicit;Vd(),cm(" ",e.displayUnitQuantityText," ")}}function yk(e,t){if(1&e&&(Ef(0),am(1),qm(2,"currency"),ph(3,bk,2,1,"ng-container",2),Df()),2&e){let e=Yf(3).$implicit;Vd(),cm(" ",jm(2,2,e.price,"USD"),""),Vd(2),zh("ngIf",null==e?null:e.displayUnitQuantityText)}}function vk(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(4).$implicit;Vd(),cm(" ",e.displayUnitQuantityText," ")}}function wk(e,t){if(1&e&&(Ef(0),am(1),qm(2,"currency"),ph(3,vk,2,1,"ng-container",2),Df()),2&e){let e=Yf(3).$implicit;Vd(),cm(" ",jm(2,2,e.totalPrice,"USD"),""),Vd(2),zh("ngIf",null==e?null:e.displayUnitQuantityText)}}function _k(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(4).$implicit;Vd(),cm(" ",e.displayUnitQuantityText," ")}}function Sk(e,t){if(1&e&&(am(0),qm(1,"currency"),ph(2,_k,2,1,"ng-container",2)),2&e){let e=Yf(3).$implicit;cm(" ",jm(1,2,e.isCustomizable?e.totalBasePrice:e.basePrice,"USD"),""),Vd(2),zh("ngIf",null==e?null:e.displayUnitQuantityText)}}function Ck(e,t){if(1&e&&(kf(0,"p",36)(1,"span",14),am(2),qm(3,"currency"),qm(4,"currency"),xf(),kf(5,"span",37),am(6),ph(7,yk,4,5,"ng-container",2)(8,wk,4,5,"ng-container",38)(9,Sk,3,5,"ng-template",null,1,Wm),xf()()),2&e){let e=sm(10),t=Yf(2).$implicit;Vd(2),lm(t.price<t.basePrice?t.name+" "+jm(3,5,t.price,"USD")+" each":t.name+" "+jm(4,8,t.basePrice,"USD")+" each"),Vd(4),cm(" ",t.name,", "),Vd(),zh("ngIf",t.price<t.basePrice&&!t.isCustomizable),Vd(),zh("ngIf",t.totalPrice<t.totalBasePrice&&t.isCustomizable)("ngIfElse",e)}}function Ik(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",25),Tf(2,"img",39),kf(3,"span"),am(4,"we'll substitute with"),xf()(),kf(5,"div",40)(6,"substitution-item-dst",41),jf("changeItem",(function(t){return Wa(e),Ha(Yf(5).changeProduct(t,!0))})),xf()(),kf(7,"div",42)(8,"div",43)(9,"a",44),jf("click",(function(t){Wa(e);let i=Yf(2).$implicit;return Yf(3).dontSubstitute(i,!1),Ha(t.stopPropagation())}))("keyup.enter",(function(t){Wa(e);let i=Yf(2).$implicit;return Yf(3).dontSubstitute(i,!1),Ha(t.stopPropagation())})),am(10,"Don't substitute"),xf()()(),Df()}if(2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(6),zh("banner",t.banner)("originalItemURL",e.imageUrl)("isAutoClipEnabled",t.isAutoClipEnabled)("editOrderFlag",t.editOrderFlag)("substitutionResponse",Om(11,ck,e.substituteItems[0]))("isMultiSelect",!0)("originalProduct",e),Vd(3),Zf("id","dont-substitute-ada-",e.i
1d,""),zh("ngStyle",t.getPrimaryColor()),gh("aria-label","Dont Substitute With "+e.name)}}function Ak(e,t){if(1&e&&(Ef(0),kf(1,"div",23)(2,"div",24)(3,"div",25),am(4,"If this item is out of stock"),ph(5,mk,2,0,"span",26),xf(),ph(6,gk,3,4,"a",27),xf(),kf(7,"div",28)(8,"div",29),Tf(9,"img",30),xf(),kf(10,"div",31),ph(11,Ck,11,11,"p",32),xf()(),ph(12,Ik,11,13,"ng-container",2),xf(),Df()),2&e){let e=Yf().$implicit;Vd(5),zh("ngIf","Do Not Substitute"===e.substitutionPreferenceV2),Vd(),zh("ngIf",0===(null==e.substituteItems?null:e.substituteItems.length)),Vd(3),Jf("src",e.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Vd(2),zh("ngIf",null==e?null:e.name),Vd(),zh("ngIf",(null==e.substituteItems?null:e.substituteItems.length)>0)}}function kk(e,t){if(1&e&&(kf(0,"div"),ph(1,Ak,13,5,"ng-container",2),xf()),2&e){let e=t.$implicit;Vd(),zh("ngIf",!e.multiCustomizations)}}function xk(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",17)(2,"div",18),am(3," If any of your original items go out of stock, we'll substitute with your selections. "),xf(),ph(4,kk,2,1,"div",19),xf(),kf(5,"div",20)(6,"a",21),jf("click",(function(t){return Wa(e),Yf(2).dontSubstitute(null,!0),Ha(t.stopPropagation())}))("keyup.enter",(function(t){return Wa(e),Yf(2).dontSubstitute(null,!0),Ha(t.stopPropagation())})),am(7,"Don't substitute for all items"),xf(),kf(8,"button",22),jf("click",(function(t){return Wa(e),Yf(2).saveSubstitutions(),Ha(t.stopPropagation())})),am(9,"Save"),xf()(),Df()}if(2&e){let e=Yf(2);Vd(4),zh("ngForOf",e.cartItems),Vd(2),zh("ngStyle",e.getPrimaryColor()),Vd(2),zh("disabled",!e.isPreferenceUpdated)("ngStyle",e.getConfirmButtonStyle()),gh("aria-disabled",!e.isPreferenceUpdated)}}function Tk(e,t){if(1&e&&(Ef(0),am(1),qm(2,"currency"),Df()),2&e){let e=Yf(5);Vd(),cm(" ",jm(2,1,e.itemToChange.price,"USD")," ")}}function Pk(e,t){if(1&e&&(am(0),qm(1,"currency")),2&e){cm(" ",jm(1,1,Yf(5).itemToChange.basePrice,"USD")," ")}}function Ek(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(5);Vd(),cm(" ",e.itemToChange.displayUnitQuantityText,"")}}function Dk(e,t){if(1&e&&(kf(0,"label",36),am(1),ph(2,Tk,3,4,"ng-container",38)(3,Pk,2,4,"ng-template",null,1,Wm)(5,Ek,2,1,"ng-container",2),xf()),2&e){let e=sm(4),t=Yf(4);Vd(),cm(" ",t.itemToChange.name,", "),Vd(),zh("ngIf",t.itemToChange.price<t.itemToChange.basePrice)("ngIfElse",e),Vd(3),zh("ngIf",null==t.itemToChange?null:t.itemToChange.displayUnitQuantityText)}}function Ok(e,t){if(1&e){let e=Mf();kf(0,"span",57),jf("click",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf(4).clearSearch(t))})),Tf(1,"img",58),xf()}}function Bk(e,t){if(1&e){let e=Mf();kf(0,"div",40)(1,"div",46),Tf(2,"img",47),ph(3,Dk,6,4,"label",32),xf(),kf(4,"div",48)(5,"input",49),mm("ngModelChange",(function(t){Wa(e);let i=Yf(3);return fm(i.searchingItem,t)||(i.searchingItem=t),Ha(t)})),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf(3).searchItem(t))})),xf(),ph(6,Ok,2,0,"span",50),kf(7,"span",51),jf("click",(function(t){return Wa(e),Ha(Yf(3).searchItem(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf(3).searchItem(t))})),Tf(8,"img",52),xf()(),kf(9,"div",53)(10,"div",54)(11,"substitution-item-dst",55),jf("itemSelected",(function(t){return Wa(e),Ha(Yf(3).searchItemSelected(t))})),xf()()(),kf(12,"button",56),jf("click",(function(t){Wa(e);let i=Yf(3);return i.dontSubstitute(i.itemToChange,!1),i.changeProduct(null,!1),Ha(t.stopPropagation())})),am(13,"Don't substitute"),xf()()}if(2&e){let e=Yf(3);Vd(2),Jf("src",e.itemToChange.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Vd(),zh("ngIf",null==e.itemToChange?null:e.itemToChange.name),Vd(2),hm("ngModel",e.searchingItem),Vd(),zh("ngIf",e.searchingItem),Vd(),Yh("is-empty",!e.searchingItem),zh("ngStyle",e.searchingItem?e.getBackgroundPrimaryColor():null),Vd(),Zf("src","/erums/cart/dist/assets/images/",e.searchingItem?"search-white.svg":"search-black.svg","",id),Vd(3),zh("banner",e.banner)("isMultiSubSearch",!0)("isAutoClipEnabled",e.isAutoClipEnabled)("editOrderFlag",e.editOrderFlag)("substitutionResponse",e.substitutionResponse),Vd(),zh("ngStyle",e.getDynamicStyle())}}function Mk(e,t){if(1&e&&(Ef(0),ph(1,Bk,14,15,"div",45),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.itemToChange)}}function Rk(e,t){1&e&&Tf(0,"div",59)}
1function Lk(e,t){1&e&&(kf(0,"label",63),am(1,"We couldn't find any similar items"),xf())}function Fk(e,t){1&e&&(kf(0,"label",64),am(1,"Try searching for another item to substitute with."),xf())}function Nk(e,t){1&e&&(kf(0,"label",63),am(1,"No products available"),xf())}function Uk(e,t){if(1&e&&(kf(0,"div",60)(1,"div"),ph(2,Lk,2,0,"label",61),xf(),kf(3,"div"),ph(4,Fk,2,0,"label",62),xf(),kf(5,"div"),ph(6,Nk,2,0,"label",61),xf()()),2&e){let e=Yf(2);Vd(2),zh("ngIf",!e.noProductsMsg),Vd(2),zh("ngIf",!e.noProductsMsg),Vd(2),zh("ngIf",e.noProductsMsg)}}function Vk(e,t){if(1&e&&(Ef(0),kf(1,"div",3),ph(2,fk,5,2,"div",4),kf(3,"div",5),ph(4,xk,10,5,"ng-container",2)(5,Mk,2,1,"ng-container",2),xf()(),ph(6,Rk,1,0,"div",6)(7,Uk,7,3,"ng-template",null,0,Wm),Df()),2&e){let e=Yf();Vd(2),zh("ngIf",e.enableBackHeader),Vd(2),zh("ngIf",!e.changeItem),Vd(),zh("ngIf",e.changeItem),Vd(),zh("ngIf",e.loaderFlag)}}function qk(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"app-substitutions-view",65),jf("itemSelected",(function(t){return Wa(e),Ha(Yf(2).saveAndUpdateSubstitutions(t))})),xf()()}if(2&e){let e=Yf(2);Vd(),zh("storeId",e.storeId)("banner",e.banner)("cartCategory",e.cartCategory)("serviceType",e.serviceType)("multiSubstitutionEnabled",!0)("substitutionResponse",e.cartItems)("token",e.token)("product",e.product)}}function $k(e,t){if(1&e&&(Ef(0),kf(1,"div",3),ph(2,qk,2,8,"div",2),xf(),Df()),2&e){let e=Yf();Vd(2),zh("ngIf",e.cartItems.length>0)}}var jk=(()=>{class e{constructor(e,t,i){this.appConfigService=e,this.substitutionService=t,this._datalayerService=i,this.enableBackHeader=!0,this.enableCloseButton=!0,this.isExpressCheckoutEnabled=!1,this.isBetterTaxEnabled=!1,this.itemSelected=new _l,this.closeSubstitutionDrawer=new _l,this.substitutionServiceError=new _l,this.onSucessCloseModal=new _l,this.onConfirmationSelect=new _l,this.backEventTrigger=new _l,this.itemSelect=!0,this.changeItem=!1,this.subSearchFlag=!1,this.prevID="",this.noProductsMsg=!1,this.isPreferenceUpdated=!1,this.setFocusBackId=""}ngOnInit(){this.substitutionResponse=[],this.appConfigService.isDesignMode()||(this.substitutionService.accessToken=this.token,this.loaderFlag=!0,this.initializeSubstitution()),setTimeout((()=>{document.getElementById("substitution-modal")&&(this.enableBackHeader?this.substitutionService.setTrapFocus("#substitution-modal"):this.substitutionService.setTrapFocus("#substitution-modal",!1))}),1e3),this.setDontSubstituteHeight()}ngOnChanges(){this.loaderFlag=!1,this.setDontSubstituteHeight()}setDontSubstituteHeight(){return this.substitutionService.getContainerHeight(this.isMiniCartFlag)}initializeSubstitution(){setTimeout((()=>{this.cartItems.forEach((e=>(e.imageUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id,e))),this.isPreferenceUpdated=this.cartItems.some((e=>e.substituteItems.length>0||"Do Not Substitute"===e.substitutionPreferenceV2)),this.substitutionItemData&&(this.substitutionItemData.map((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id})),this.initialData=this.substitutionItemData,this.substitutionResponse=this.substitutionItemData,0===this.substitutionResponse.length&&(this.substitutionResponse=[]),this.loaderFlag=!1)}),100)}backBtnEventTrigger(){this.backEventTrigger.emit()}closeModal(){this.closeSubstitutionDrawer.emit(!0)}onSubstituteProduct(e){let t=e.id?e.id:e.itemId,i=e,n=window.AB.userInfo.houseId||"350021886020",r="dug"===JSON.parse(window.SWY?.CONFIGSERVICE?.getCookie("SWY_SHARED_SESSION_INFO"))?.info?.COMMON?.preference.toLowerCase()?"pickup":"delivery",s=e&&e.substituteItems&&e.substituteItems.length>0?e.substituteItems[0]:null,a="";s&&(a=s.id?s.id+"":s.itemId+""),this.substitutionService.getSubstitutionProducts(t,a,this.storeId,n,!1,!0,r,!0,this.isAutoClipEnabled,this.token).subscribe({next:e=>{let t=[];0!==e?.productsInfoCount?(t=e.productsinfo?e.productsinfo:e.productsInfo[0].substituteList,t.map(((e,n)=>{try{parseInt(i.substituteItems[0].itemId)===parseInt(e.id)&&t.splice(n,1)}catch(e){console.error("Error in multi-substitutionResponse",e)}})),i.substituteItems?.length>0&&i.substituteItems&&(parseInt("substituteItems".itemId)!=parseInt(t[0].id)||parseInt(i.substituteItems[0].id)!=parseInt(t[0].id))&&(i.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+i.substituteItems[0].itemId,i.substituteItems[0].id=i.substituteItems[0].itemId,t.unshift(i.substituteItems[0]))):(t=[],i.substituteItems?.length>0&&(i.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+i.substituteItems[0].itemId,i.substituteItems[0].id=i.substituteItems[0].itemId,t.push(i.substituteItems[0]))),t.map((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id,i.substituteItems.length&&i.substituteItems[0].itemId&&e.id===this.itemToChange.substituteItems[0]?.id?.toString()&&(e.isSelected=!0)})),this.substitutionResponse=t,setTimeout((()=>{$("#substitution-search")?.trigger("focus")}),500)},error:e=>{this.substitutionResponse=[]}})}saveSubstitutions(){if(!this.subConfirmFlag){this.loaderFlag=!0;let e=[];
1this.cartItems.forEach((t=>{(t.substituteItems.length>0||"Do Not Substitute"===t.substitutionPreferenceV2||"Best Available"===t.substitutionPreferenceV2)&&e.push({itemId:t.id,qty:t.quantity,entryId:t.entryId,substitutionPreferenceV2:t.substituteItems.length?"Substitute With":"Do Not Substitute"===t.substitutionPreferenceV2?"Do Not Substitute":"Best Available",substituteItems:t.substituteItems.length?[{itemId:t.substituteItems[0].id?t.substituteItems[0].id?.toString():t.substituteItems[0].pid,algoType:t.substituteItems[0]?.algoType?.toString()}]:[]})})),this.body={cartItemsList:e,cartCategory:this.cartCategory},this.substitutionService.saveItemNote(this.cartId,this.itemId,this.body,this.editOrderFlag,this.storeId,this.orderId,this.banner,this.token,this.serviceType,this.zipCode,this.cartCategory,this.isExpressCheckoutEnabled,this.isBetterTaxEnabled).subscribe({next:e=>{this.prevID&&document.getElementById(this.prevID)&&(document.getElementById(this.prevID).classList.remove("d-none"),document.getElementById("S"+this.prevID).classList.add("d-none")),this.closeSubstitutionDrawer.emit(!0),this.loaderFlag=!1,this.itemSelected.emit({selectedItem:null,response:e,initial:!1})},error:e=>{this.substitutionServiceError.emit(e)}})}}dontSubstitute(e,t){if(t)if(this.subConfirmFlag)this.itemSelected.emit({selectedItem:[],response:"confirmationEventTrue",pageEvent:"dontSubstitute"});else{this.loaderFlag=!0;let e=[];this.cartItems.forEach((t=>{t.multiCustomizations||e.push({itemId:t.id,qty:t.quantity,entryId:t.entryId,substitutionPreferenceV2:"Do Not Substitute",substituteItems:[]})})),this.body={cartItemsList:e,cartCategory:this.cartCategory},this.substitutionService.saveItemNote(this.cartId,this.itemId,this.body,this.editOrderFlag,this.storeId,this.orderId,this.banner,this.token,this.serviceType,this.zipCode,this.cartCategory,this.isExpressCheckoutEnabled,this.isBetterTaxEnabled).subscribe({next:e=>{this.closeSubstitutionDrawer.emit(!0),this.loaderFlag=!1,this.itemSelected.emit({selectedItem:[],response:e})},error:e=>{this.loaderFlag=!1,this.substitutionServiceError.emit(e)}})}else{let t=this.cartItems.findIndex((t=>t.id===e.id));this.cartItems[t].substitutionPreferenceV2="Do Not Substitute",this.cartItems[t].substituteItems=[],this.isPreferenceUpdated=!0,setTimeout((()=>{this.cartItems[t+1]?this.cartItems[t+1].substituteItems.length>0?$("#change-substitute-ada-"+this.cartItems[t+1].substituteItems[0].id)?.trigger("focus"):$("#change-substitute-ada-"+this.cartItems[t+1].id)?.trigger("focus"):$("#dont-substitute-all-ada")?.trigger("focus")}))}}changeProduct(e,t){this.itemToChange=e,this.changeItem=t,this.changeItem&&this.onSubstituteProduct(e),this.subSearchFlag=t,e?(this.setFocusBackId=`change-substitute-ada-${e.id}`,setTimeout((()=>{this.setElementFocus("substitution-search")}),100)):this.setFocusBackId&&setTimeout((()=>{this.setElementFocus(this.setFocusBackId),this.setFocusBackId=""}),100)}setElementFocus(e){let t=document.getElementById(e)||document.getElementById("multi-sub-back");t&&t.focus()}searchItemSelected(e){if(this.subConfirmFlag)this.prevID&&document.getElementById(this.prevID)&&(document.getElementById(this.prevID).classList.remove("d-none"),document.getElementById("S"+this.prevID).classList.add("d-none")),document.getElementById(e.id).classList.add("d-none"),document.getElementById("S"+e.id).classList.remove("d-none"),this.prevID=e.id,this.onConfirmationSelect.emit(e);else{let t=this.cartItems.findIndex((e=>e.id===this.itemToChange.id));this.cartItems[t].substituteItems=[e],this.cartItems[t].substitutionPreferenceV2="Substitute With",this.isPreferenceUpdated=!0,this.clearSearch()}}setFocusBack(e){9===e.keyCode&&this.substitutionService.setTrapFocus("#substitution-modal")}setFocusBottom(e){e.shiftKey&&9===e.keyCode&&this.substitutionService.setTrapFocus("#anchor-bottom")}clearSearch(e){this.subSearchFlag=!1,this.searchingItem="",this.changeProduct(null,!1),0===this.searchingItem.length&&(this.initialData?this.substitutionResponse=this.initialData:this.substitutionResponse=[],this.substitutionResponse?this.substitutionResponse=this.getUniqueListBy(this.substitutionResponse,"id"):this.substitutionResponse=[])}searchItem(e){null!=e&&null!=e&&this.searchingItem&&this.searchingItem.length>0&&(13===e.which||1===e.which)?(this.subSearchFlag=!0,this.loaderFlag=!0,this.pageStart=0,this.substitutionService.getSearchItem(this.searchingItem,this.pageStart,this.storeId,this.banner,this.serviceType,this.cartCategory,this.isAutoClipEnabled,this.token).subscribe((e=>{e&&e.response?(this.totalSearchRecords=e.response.numFound,e.response.docs.map((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id}
1)),this.substitutionResponse=e.response.docs,this.substitutionResponse.length>0?(this.substitutionResponse.map(((e,t)=>{e.id===this.itemToChange.id.toString()&&this.substitutionResponse.splice(t,1),e.id===this.itemToChange.substituteItems[0]?.id?.toString()&&(e.isSelected=!0)})),this.readMessage("Substitution products loaded")):this.readMessage("Products are not available"),this.loaderFlag=!1,this.noProductsMsg=!1):(this.readMessage("Products are not available"),this.loaderFlag=!1,this.substitutionResponse=[],this.noProductsMsg=!0)}))):0===this.searchingItem.length&&(this.showLoadMore=!1,this.subSearchFlag=!1,this.initialData?this.substitutionResponse=this.initialData:this.substitutionResponse=[])}getUniqueListBy(e,t){return[...new Map(e.map((e=>[e[t],e]))).values()]}getDynamicStyle(){return this.substitutionService.getDynamicStyle(this.banner)}getPrimaryColor(){return this.substitutionService.getPrimaryColor(this.banner)}getConfirmButtonStyle(){return this.substitutionService.getConfirmButtonStyle(this.banner)}getBackgroundPrimaryColor(){return this.substitutionService.getBackgroundPrimaryColor(this.banner)}readMessage(e){this.substitutionService.readMessage(e,2e3)}saveAndUpdateSubstitutions(e){this.cartItems=e,this.saveSubstitutions()}static{this.ɵfac=function(t){return new(t||e)($d(Vw),$d(fC),$d(kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["multi-substitution-dst"]],inputs:{enableBackHeader:"enableBackHeader",enableCloseButton:"enableCloseButton",substitutionItemData:"substitutionItemData",banner:"banner",editOrderFlag:"editOrderFlag",subConfirmFlag:"subConfirmFlag",isMiniCartFlag:"isMiniCartFlag",cartId:"cartId",storeId:"storeId",zipCode:"zipCode",serviceType:"serviceType",token:"token",env:"env",itemId:"itemId",product:"product",quantity:"quantity",orderId:"orderId",isReplenishItem:"isReplenishItem",cartCategory:"cartCategory",cartItems:"cartItems",enableMiniCartBackButton:"enableMiniCartBackButton",isExpressCheckoutEnabled:"isExpressCheckoutEnabled",isBetterTaxEnabled:"isBetterTaxEnabled",newSubViewFlag:"newSubViewFlag",isAutoClipEnabled:"isAutoClipEnabled"},outputs:{itemSelected:"itemSelected",closeSubstitutionDrawer:"closeSubstitutionDrawer",substitutionServiceError:"substitutionServiceError",onSucessCloseModal:"onSucessCloseModal",onConfirmationSelect:"onConfirmationSelect",backEventTrigger:"backEventTrigger"},features:[xm([fC]),ga],decls:2,vars:2,consts:[["noResult",""],["productGeneralPrice",""],[4,"ngIf"],["id","substitution-modal",1,"main-container","col-12"],["class","sub-preference-header col-12 py-3 d-flex justify-content-center align-items-center",4,"ngIf"],[1,"mx-1","mx-sm-3","my-4"],["class","sub-loader","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],[1,"sub-preference-header","col-12","py-3","d-flex","justify-content-center","align-items-center"],["class","d-inline multi-back-carot back back-carot",4,"ngIf"],[1,"sub-header","m-0"],["id","subs-close-btn","tabindex","0","role","button","aria-label","close substitution modal","class","sub-modal-close-btn d-block","data-dismiss","modal",3,"keyup","click","keydown.enter",4,"ngIf"],[1,"d-inline","multi-back-carot","back","back-carot"],["id","multi-sub-back","role","button","tabindex","0",3,"keyup.enter","click"],["src","/erums/cart/dist/assets/images/icons-left-arrow.svg","alt","","aria-hidden","true"],[1,"sr-only"],["id","substitution-search","role","button","tabindex","0","data-target","#substitution-search",3,"keyup.enter","click"],["id","subs-close-btn","tabindex","0","role","button","aria-label","close substitution modal","data-dismiss","modal",1,"sub-modal-close-btn","d-block",3,"keyup","click","keydown.enter"],[1,"items-container"],[1,"col-12","substitute-notice","my-3"],[4,"ngFor","ngForOf"],[1,"action-group"],["role","link","id","dont-substitute-all-ada","tabindex","0",1,"cancel-substitution",3,"click","keyup.enter","ngStyle"],["tabindex","0",1,"btn","confirm","mx-3",3,"click","disabled","ngStyle"],[1,"items-wrapper"],[1,"col-12","change-section"],[1,"info"],["class","font-weight-bold",4,"ngIf"],["role","link","class","change-substitution","tabindex","0",3,"id","ngStyle","click","keyup.enter",4,"ngIf"],[1,"col-12","mb-3","mt-2","pr-0","row"],[1,"col-2","col-md-2","pl-1","pr-0"],["alt","",1,"product-image","original-product-image","ml-2",3,"src"],[1,"col-10","col-md-10","d-flex","pl-1","item-info"],["class","item-name",4,"ngIf"],[1,"font-weight-bold"],["role","link","tabindex","0",1,"change-substitution",3,"click","keyup.enter","id","ngStyle"],["aria-hidden","true","src","/erums/cart/dist/assets/images/caret-right.svg",1,"change-caret"],[1,"item-name"],["aria-hidden","true"],[4,"ngIf","ngIfElse"],["tabindex","-1","src","/erums/cart/dist/assets/images/icons-web-substitution.svg","alt","","aria-hidden","true",1,"Icons-Web-substitution"],[1,"col-12"],[3,"changeItem","banner","originalItemURL","isAutoClipEnabled","editOrderFlag","substitutionResponse","isMultiSelect","originalProduct"],[1,"bottom-container","mx-1","mx-sm-3","my-3"],[1,"focusable-div"],["role","link","tabindex","0",1,"cancel-substitution",3,"click","keyup.enter","id","ngStyle"],["class","col-12",4,"ngIf"],[1,"d-flex","justify-content-start","align-items-center"],["alt","",1,"product-image","original-product-image",3,"src"],[1,"search-section","position-relative","d-flex"],["tabindex","0","type","text","placeholder","Search for substitutes",1,"sub-search","col",3,"ngModelChange","keyup.enter","ngModel"],["role","button","tabindex","0","data-target","#substitution-search","class","sub-search-icon clear",3,"click","keyup.enter",4,"ngIf"],["data-target","#substitution-search","role","button","tabindex","0",1,"sub-search-icon","find",3,"click","keyup.enter","ngStyle"],["data-target","#substitution-search","aria-hidden","true","alt","",3,"src"],[1,"item-container"],[1,"scroll-sub"],[3,"itemSelected","banner","isMultiSubSearch","isAutoClipEnabled","editOrderFlag","substitutionResponse"],["role","button","tabindex","0",1,"btn","skip-sub","my-3",3,"click","ngStyle"],["role","button","tabindex","0","data-target","#substitution-search",1,"sub-search-icon","clear",3,"click","keyup.enter"],["aria-hidden","true","data-target","#substitution-search","src","/erums/cart/dist/assets/images/icons-web-close-grey.svg","alt",""],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader"],[1,"notavailable-label"],["class","sub-label-low pl-2",4,"ngIf"],["class","ml-1 pl-2 search-another-item-label","for","",4,"ngIf"],[1,"sub-label-low","pl-2"],["for","",1,"ml-1","pl-2","search-another-item-label"],[3,"itemSelected","storeId","banner","cartCategory","serviceType","multiSubstitutionEnabled","substitutionResponse","token","product"]],template:function(e,t){1&e&&ph(0,Vk,9,4,"ng-container",2)(1,$k,3,1,"ng-container",2),2&e&&(zh("ngIf",!t.newSubViewFlag),V
1d(),zh("ngIf",t.newSubViewFlag))},dependencies:[d_,$_,ES,oy,cy,gy,WI,TA,By],styles:[".product-image.original-product-image[_ngcontent-%COMP%]{margin-top:0}.product-image[_ngcontent-%COMP%]{width:30px!important;height:30px!important;margin-top:1em}.info[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:20px;color:#2a2928}.sub-label-low[_ngcontent-%COMP%]{width:300px;height:22px;margin:0 144px 1px 3px;font-size:16px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal;color:#4b4a4b;width:317px}.grey-header-link[_ngcontent-%COMP%]{color:#4b4b4b}.back[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.69;letter-spacing:normal;color:#4a4a4a;cursor:pointer;position:absolute;left:10px;top:50%;transform:translateY(-50%)}.choose-substition[_ngcontent-%COMP%]{cursor:pointer;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.38;letter-spacing:normal;text-align:right;text-decoration:underline}.sub-label[_ngcontent-%COMP%]{width:290px;height:25px;margin:0 5px 0 4px;font-size:16px;font-weight:400;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;color:#4b4b4b}.Icons-Web-substitution[_ngcontent-%COMP%]{width:24px;height:24px;margin:12px 8px;object-fit:contain}.scroll-sub[_ngcontent-%COMP%]{overflow-y:scroll;overflow-x:hidden;min-height:200px;height:calc(100vh - 375px)}.scroll-sub[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.scroll-sub[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}@media (min-width: 320px) and (max-width: 568px){.sub-header[_ngcontent-%COMP%]{font-size:16px}.items-container[_ngcontent-%COMP%]{height:60vh!important}}@media (min-width: 320px) and (max-width: 340px){.multi-back-carot[_ngcontent-%COMP%]{left:0!important}}.main-container[_ngcontent-%COMP%]{padding:.5%;background:#fff;height:auto;z-index:1;top:0;right:0;overflow-x:hidden;transition:.2s;position:relative}.items-container[_ngcontent-%COMP%]{height:calc(100vh - 270px);min-height:200px;overflow-x:hidden}.items-container[_ngcontent-%COMP%] .items-wrapper[_ngcontent-%COMP%]{padding:24px 0;border-bottom:1px solid #F1F0EE}.sub-preference-header[_ngcontent-%COMP%]{border-bottom:1px solid #F1F0EE}.skip-sub[_ngcontent-%COMP%]{border-radius:100px;background-color:#fff;color:#8c0e12;border:2px solid #8C0E12;min-width:300px;max-width:420px;display:flex;align-items:center;justify-content:center;text-align:center;padding:10px 16px;position:relative;transform:translate(-50%);left:50%}.sub-search-icon[_ngcontent-%COMP%]{cursor:pointer}.sub-search-icon.find[_ngcontent-%COMP%]{position:relative;padding:8px 12px;margin:16px 4px 16px 0;border-radius:0 100px 100px 0;height:40px;display:inline-block;background-color:#8c0e12;border:1px solid #7D7B78;border-left:none}.sub-search-icon.find.is-empty[_ngcontent-%COMP%]{background-color:#faf9f8}.sub-search-icon.clear[_ngcontent-%COMP%]{right:55px;position:absolute;top:50%;transform:translateY(-50%)}.sub-modal-close-btn[_ngcontent-%COMP%]{font-size:2.4em;cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%)}.sub-header[_ngcontent-%COMP%]{font-size:24px;font-weight:600;line-height:30px;color:#2a2928;text-align:center}.substitute-notice[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:21px;color:#2a2928}.sub-search[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:85%;height:40px;margin:16px 0;padding:8px 5px 8px 17px;border:solid 1px #7D7B78;border-right:none;background-color:#fff;border-radius:100px 0 0 100px}.item-info[_ngcontent-%COMP%]{font-size:14px;line-height:21px;letter-spacing:normal;color:#2a2928;justify-content:flex-start;align-items:center}.item-name[_ngcontent-%COMP%]{font-size:14px;line-height:21px;padding-left:10px;margin-bottom:0!important}.cancel-substitution[_ngcontent-%COMP%], .change-substitution[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:24px;letter-spacing:0em;cursor:pointer;color:#8c0e12;white-space:nowrap}.change-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.change-caret[_ngcontent-%COMP%]{width:10px;height:10px;margin-bottom:3px}.action-group[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;margin:16px 0}.action-group[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:24px;width:222px;height:50px;border:2px solid #8C0E12;border-radius:100px;color:#fff;background-color:#8c0e12}.bottom-container[_ngcontent-%COMP%]:focus{outline:none!important}.focusable-div[_ngcontent-%COMP%]:focus{outline:none!important}.focusable-div[_ngcontent-%COMP%]:focus > a[_ngcontent-%COMP%]{outline:2px solid #757575!important;outline-offset:4px!important}#subs-close-btn[_ngcontent-%COMP%]:focus{outline:2px solid #757575!important;outline-offset:4px}.sub-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%]{height:calc(100vh - 80px)}@media (min-width: 320px) and (max-width: 991px){#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%]{height:calc(100vh - 75px)}}@media (min-width: 320px) and (max-width: 568px){#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%] .items-container[_ngcontent-%COMP%]{height:60vh!important}#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%] .action-group[_ngcontent-%COMP%]{position:absolute;bottom:45px;left:50%;padding:0 4px;width:100%;background-color:#fff;transform:translate(-50%);z-index:5}#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%] .scroll-sub[_ngcontent-%COMP%]{height:50vh!important}}@media (min-width: 320px) and (max-width: 568px) and (max-height: 230px){#substitution-modal.subs-modal-minicart[_ngcontent-%COMP%] .action-group[_ngcontent-%COMP%]{bottom:30px!important}}"]})}}return e})(),zk=e=>{for(;e?.startsWith(" ");)e=e.substring(1);return e},Wk=(()=>{class e{constructor(e){this.http=e,this.config=hC,this.SESSION_UUID_KEY="gifting_logger_session_uuid",this.httpOptions={headers:new jy({"Content-Type":"application/json","Cache-Control":"no-cache"})},window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?this.env="qa1":window.location.origin.indexOf("beta")>0?this.env="betaprod":this.env="prod"}buildHeaders(e="safeway"){let t=h({},this.httpOptions);return t.headers=t.headers.set("User-Agent",navigator.userAgent),t}createUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{let i=(e+16*Math.random())%16|0;return("x"===t?i:3&i|8).toString(16)}))}getSessionUUID(){let e=sessionStorage.getItem(this.SESSION_UUID_KEY);return e||(e=this.createUUID(),sessionStorage.setItem(this.SESSION_UUID_KEY,e)),e}logGiftingAction(e){let{cart:t,callName:i,editFlag:n,banner:r="safeway",responseData:s}=e,a={timestamp:this.getSessionUUID(),responseData:s||{},callName:i},o=this.config[this.env].loggerAPIDetails?.loggerAPI||"/erums/checkout/api/logger";this.http.post(o,a,this.buildHeaders(r)).pipe($i((e=>(console.debug("Logger API call failed (non-blocking):",e),fi(null))))).subscribe((()=>{console.debug(`Logger API call made for: ${i}`)}))}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Hk=["giftMsg"],Yk=["giftMsgCount"],Gk=["occasionScrollContainer"],Kk=["toneScrollC
1ontainer"],Qk=["occasionButtons"],Jk=["toneButtons"],Zk=e=>({"has-error":e}),Xk=e=>({"d-block ai-gift-input-message px-0":e}),ex=(e,t,i,n)=>({"has-error":e,"ai-text-area":t,"gift-input-text p-0":i,"gift-message-loading":n}),tx=(e,t,i)=>({"save-disable":e,"pds-btn-filled--primary btn-block":t,"btn-primary":i}),ix=e=>({message:"Please enter a recipient name.",isInvalid:e,isApiError:!1}),nx=e=>({message:"Please enter a valid name.",isInvalid:e,isApiError:!1}),rx=e=>({message:"Names are limited to letters, apostrophes, periods and hyphens.",isInvalid:e,isApiError:!1}),sx=e=>({message:"Please enter a valid mobile number.",isInvalid:e,isApiError:!1}),ax=e=>({message:"To receive texts, please enter a valid mobile number.",isInvalid:e,isApiError:!1}),ox=e=>({message:"Sorry, we're having technical difficulties, please check back later.",isInvalid:e,isApiError:!1}),lx=e=>({message:"Email addresses are limited to letters, numbers, periods, and hyphens.",isInvalid:e,isApiError:!1}),cx=e=>({message:"Please enter a valid email address.",isInvalid:e,isApiError:!1}),dx=e=>({message:"Please enter your name.",isInvalid:e,isApiError:!1}),ux=e=>({selected:e}),px=(e,t,i)=>({selected:e,"px-3":t,"px-0 pds-loading-shimmer gifting-tone-loading":i}),hx=e=>({message:"Please enter a valid message.",isInvalid:e,isApiError:!1}),fx=e=>({message:"Please shorten your gift message to 4 lines or fewer.",isInvalid:e,isApiError:!1}),mx=e=>({message:"Character limit reached.",isInvalid:e,isApiError:!1}),gx=e=>({message:e,isInvalid:!0,isApiError:!0}),bx=e=>({"error text-danger":e}),yx=e=>({"ai-api-error text-s":e});function vx(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",51),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf().closeGiftDrawer(t))}))("click",(function(t){return Wa(e),Ha(Yf().closeGiftDrawer(t))})),Tf(2,"img",52),kf(3,"span",53),am(4,"Back"),xf()(),Df()}}function wx(e,t){if(1&e){let e=Mf();kf(0,"span",54),jf("click",(function(t){return Wa(e),Ha(Yf().closeGiftDrawer(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf().closeGiftDrawer(t))})),am(1,"Ã"),xf()}}function _x(e,t){1&e&&(kf(0,"span",55),am(1,"*"),xf())}function Sx(e,t){1&e&&Of(0)}function Cx(e,t){if(1&e&&(Ef(0),ph(1,Sx,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,ix,!e.giftFormControls.to.valid))}}function Ix(e,t){1&e&&Of(0)}function Ax(e,t){if(1&e&&(Ef(0),ph(1,Ix,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,nx,!e.giftFormControls.to.valid))}}function kx(e,t){1&e&&Of(0)}function xx(e,t){if(1&e&&(Ef(0),ph(1,kx,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,rx,!e.giftFormControls.to.valid))}}function Tx(e,t){if(1&e&&(Ef(0),ph(1,Cx,2,4,"ng-container",10)(2,Ax,2,4,"ng-container",10)(3,xx,2,4,"ng-container",10),Df()),2&e){let e=Yf();Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.to.errors?null:e.giftFormControls.to.errors.required),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.to.errors?null:e.giftFormControls.to.errors.minlength),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.to.errors?null:e.giftFormControls.to.errors.pattern)}}function Px(e,t){1&e&&Of(0)}function Ex(e,t){if(1&e&&(Ef(0),ph(1,Px,1,0,"ng-container",56),Df()),2&e){let e=Yf(3),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,sx,!e.giftFormControls.mobile.valid))}}function Dx(e,t){1&e&&Of(0)}function Ox(e,t){if(1&e&&(Ef(0),ph(1,Dx,1,0,"ng-container",56),Df()),2&e){let e=Yf(3),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,ax,!e.giftFormControls.mobile.valid))}}function Bx(e,t){1&e&&Of(0)}function Mx(e,t){if(1&e&&(Ef(0),ph(1,Bx,1,0,"ng-container",56),Df()),2&e){let e=Yf(3),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,ox,!e.giftFormControls.mobile.valid))}}function Rx(e,t){if(1&e&&(Ef(0),ph(1,Ex,2,4,"ng-container",10)(2,Ox,2,4,"ng-container",10)(3,Mx,2,4,"ng-container",10),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.mobile.errors?null:e.giftFormControls.mobile.errors.pattern),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.mobile.errors?null:e.giftFormControls.mobile.errors.invalidPhoneNumber),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.mobile.errors?null:e.giftFormControls.mobile.errors.apiError)}}function Lx(e,t){1&e&&Of(0)}function Fx(e,t){if(1&e&&(Ef(0),ph(1,Lx,1,0,"ng-container",56),Df()),2&e){let e=Yf(3),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,lx,!e.giftFormControls.email.valid))}}function Nx(e,t){1&e&&Of(0)}function Ux(e,t){if(1&e&&(Ef(0),ph(1,Nx,1,0,"ng-container",56),Df()),2&e){let e=Yf(3),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,cx,!e.giftFormControls.email.valid))}}function Vx(e,t){if(1&e&&(Ef(0),ph(1,Fx,2,4,"ng-container",10)(2,Ux,2,4,"ng-container",10),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.email.errors?null:e.giftFormControls.email.errors.minlength),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.email.errors?null:e.giftFormControls.email.errors.pattern)}}function qx(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",57)(2,"div",22)(3,"label",58)(4,"input",59),jf("blur",(function(){return Wa(e),Ha(Yf().validatePhoneNumber())}))("input",(function(t){return Wa(e),Ha(Yf().onInputChange(t))}
1)),xf(),kf(5,"span",28),am(6,"Recipient mobile number"),xf()(),kf(7,"div",60),ph(8,Rx,4,3,"ng-container",10),xf()()(),kf(9,"div",61)(10,"div",62)(11,"label",63),Tf(12,"input",64),kf(13,"span",28),am(14,"Recipient email"),xf()(),kf(15,"div",65),ph(16,Vx,3,2,"ng-container",10),xf()()(),kf(17,"div",66)(18,"label",67),am(19,"We'll use this to send your recipient text and/or email updates."),xf()(),Df()}if(2&e){let e=Yf();Vd(4),zh("ngClass",Om(5,Zk,(null==e.giftFormControls?null:e.giftFormControls.mobile.invalid)&&((null==e.giftFormControls?null:e.giftFormControls.mobile.dirty)||(null==e.giftFormControls?null:e.giftFormControls.mobile.touched)))),Vd(4),zh("ngIf",(null==e.giftFormControls?null:e.giftFormControls.mobile.invalid)&&((null==e.giftFormControls?null:e.giftFormControls.mobile.dirty)||(null==e.giftFormControls?null:e.giftFormControls.mobile.touched))),Vd(4),zh("ngClass",Om(7,Zk,(null==e.giftFormControls?null:e.giftFormControls.email.invalid)&&((null==e.giftFormControls?null:e.giftFormControls.email.dirty)||(null==e.giftFormControls?null:e.giftFormControls.email.touched)))),Vd(4),zh("ngIf",(null==e.giftFormControls?null:e.giftFormControls.email.invalid)&&((null==e.giftFormControls?null:e.giftFormControls.email.dirty)||(null==e.giftFormControls?null:e.giftFormControls.email.touched))),Vd(),zh("ngClass",e.aiMessaging?"":"gifting-divider")}}function $x(e,t){1&e&&(kf(0,"span",55),am(1,"*"),xf())}function jx(e,t){1&e&&Of(0)}function zx(e,t){if(1&e&&(Ef(0),ph(1,jx,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,dx,!e.giftFormControls.from.valid))}}function Wx(e,t){1&e&&Of(0)}function Hx(e,t){if(1&e&&(Ef(0),ph(1,Wx,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,nx,!e.giftFormControls.from.valid))}}function Yx(e,t){1&e&&Of(0)}function Gx(e,t){if(1&e&&(Ef(0),ph(1,Yx,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,rx,!e.giftFormControls.from.valid))}}function Kx(e,t){if(1&e&&(Ef(0),ph(1,zx,2,4,"ng-container",10)(2,Hx,2,4,"ng-container",10)(3,Gx,2,4,"ng-container",10),Df()),2&e){let e=Yf();Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.from.errors?null:e.giftFormControls.from.errors.required),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.from.errors?null:e.giftFormControls.from.errors.minlength),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.from.errors?null:e.giftFormControls.from.errors.pattern)}}function Qx(e,t){1&e&&Tf(0,"hr",68)}function Jx(e,t){1&e&&(kf(0,"h5",71),am(1,"Whatâs the occasion?"),xf())}function Zx(e,t){if(1&e){let e=Mf();kf(0,"button",78),jf("click",(function(){return Wa(e),Ha(Yf(3).scrollChipContainer("occasion","left"))})),Tf(1,"span",79),xf()}}function Xx(e,t){if(1&e){let e=Mf();kf(0,"div",83,4),jf("click",(function(t){Wa(e);let i=Yf().$implicit;return Ha(Yf(3).onOccasionSelect(i,t))}))("keyup.enter",(function(t){Wa(e);let i=Yf().$implicit;return Ha(Yf(3).onOccasionSelect(i,t))}))("focus",(function(){Wa(e);let t=Yf().index;return Ha(Yf(3).setRadioFocusIndex("occasion",t))}))("keydown.arrowright",(function(t){return Wa(e),Ha(Yf(4).onAiButtonArrowKey(t,"occasion"))}))("keydown.arrowleft",(function(t){return Wa(e),Ha(Yf(4).onAiButtonArrowKey(t,"occasion"))})),kf(2,"span",84),am(3),xf()()}if(2&e){let e=Yf(),t=e.$implicit,i=e.index,n=Yf(3);zh("ngClass",Om(4,ux,n.isOccasionSelected(t))),gh("tabindex",n.getTabIndex("occasion",i))("aria-checked",n.isOccasionSelected(t)?"true":"false"),Vd(3),lm(t.name)}}function eT(e,t){if(1&e&&(kf(0,"div",85),Tf(1,"span",86),xf()),2&e){let e=Yf().index;Hh("width",Yf(3).occasionButtonWidths[e]||null,"px")}}function tT(e,t){if(1&e&&(kf(0,"li",80),ph(1,Xx,4,6,"div",81)(2,eT,2,2,"div",82),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.formIsLoading),Vd(),zh("ngIf",e.formIsLoading)}}function iT(e,t){if(1&e){let e=Mf();kf(0,"button",87),jf("click",(function(){return Wa(e),Ha(Yf(3).scrollChipContainer("occasion","right"))})),Tf(1,"span",88),xf()}}function nT(e,t){if(1&e){let e=Mf();kf(0,"div",72),ph(1,Zx,2,0,"button",73),kf(2,"div",74,3),jf("scroll",(function(){return Wa(e),Ha(Yf(2).onChipContainerScroll("occasion"))})),kf(4,"ul",75),ph(5,tT,3,2,"li",76),xf()(),ph(6,iT,2,0,"button",77),xf()}if(2&e){let e=Yf(2);Vd(),zh("ngIf",e.showOccasionLeftScrollButton),Vd(4),zh("ngForOf",e.giftingOccationList),Vd(),zh("ngIf",e.showOccasionRightScrollButton)}}function rT(e,t){if(1&e&&(Ef(0),ph(1,Jx,2,0,"h5",69)(2,nT,7,3,"div",70),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.giftingOccationList.length>0),Vd(),zh("ngIf",e.giftingOccationList.length>0)}}function sT(e,t){1&e&&(kf(0,"p",89),am(1," Your recipient will get both a paper and email version of this gift message. "),xf())}function aT(e,t){1&e&&(kf(0,"label",90),am(1," Weâll include your message with your gift. "),xf())}function oT(e,t){1&e&&Tf(0,"lottie-player",91)}function lT(e,t){if(1&e){let e=Mf();kf(0,"button",102),jf("click",(function(){return Wa(e),Ha(Yf(2).scrollChipContainer("tone","left"))})),Tf(1,"span",79),xf()}}function cT(e,t){1&e&&Tf(0,"img",105)}function dT(e,t){1&e&&(kf(0,"span",106),am(1,"Undo"),xf())}function uT(e,t){if(1&e){let e=Mf();kf(0,"button",103,6),jf("click",(function(t){return Wa(e),Ha(Yf(2).undoToneMessage(t))}))("keydown.arrowright",(function(t){return Wa(e),Ha(Yf(2).onAiButtonArrowKey(t,"tone"))}))("keydown.arrowleft",(function(t){return Wa(e),Ha(Yf(2).onAiButtonArrowKey(t,"tone"))})),ph(2,cT,1,0,"img",104)(3,dT,2,0,"span",99),xf()}if(2&e){let e=Yf(2);zh("ngClass",e.formIsLoading?"px-0 pds-loading-shimmer gifting-tone-loading":"px-3"),gh("aria-setsize",((null==e.giftingTonesList?null:e.giftingTonesList.length)||0)+2)("tabindex",e.canUndo&&!e.formIsLoading?"0":"-1"),V
1d(2),zh("ngIf",!e.formIsLoading),Vd(),zh("ngIf",!e.formIsLoading)}}function pT(e,t){1&e&&(kf(0,"span",106),am(1,"Rephrase"),xf())}function hT(e,t){if(1&e&&(kf(0,"span",106),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e)}}function fT(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",107,6),jf("click",(function(t){let i=Wa(e).$implicit;return Ha(Yf(2).onToneSelect(i,t))}))("keyup.enter",(function(t){let i=Wa(e).$implicit;return Ha(Yf(2).onToneSelect(i,t))}))("focus",(function(){let t=Wa(e).index;return Ha(Yf(2).setRadioFocusIndex("tone",t))}))("keydown.arrowright",(function(t){return Wa(e),Ha(Yf(2).onAiButtonArrowKey(t,"tone"))}))("keydown.arrowleft",(function(t){return Wa(e),Ha(Yf(2).onAiButtonArrowKey(t,"tone"))})),ph(3,hT,2,1,"span",99),xf(),Df()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Hh("width",n.formIsLoading?n.toneButtonWidths[i]:null,"px")("min-width",n.formIsLoading?n.toneButtonWidths[i]:null,"px"),Zf("id","toneButton-",i,""),zh("ngClass",Mm(14,px,n.selectedTone===e,!n.formIsLoading,n.formIsLoading))("disabled",n.formIsLoading),gh("aria-checked",n.selectedTone===e?"true":"false")("aria-setsize",((null==n.giftingTonesList?null:n.giftingTonesList.length)||0)+2)("aria-posinset",i+3)("aria-disabled",n.formIsLoading)("aria-label",n.isMessageEmpty?e+" (enter a message first)":e),Vd(2),zh("ngIf",!n.formIsLoading)}}function mT(e,t){if(1&e){let e=Mf();kf(0,"button",108),jf("click",(function(){return Wa(e),Ha(Yf(2).scrollChipContainer("tone","right"))})),Tf(1,"span",88),xf()}}function gT(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",92),ph(2,lT,2,0,"button",93),kf(3,"div",94,5),jf("scroll",(function(){return Wa(e),Ha(Yf().onChipContainerScroll("tone"))})),kf(5,"div",95),Tf(6,"img",96),ph(7,uT,4,5,"button",97),kf(8,"button",98,6),jf("click",(function(t){return Wa(e),Ha(Yf().rephraseToneMessage(t))}))("keydown.arrowright",(function(t){return Wa(e),Ha(Yf().onAiButtonArrowKey(t,"tone"))}))("keydown.arrowleft",(function(t){return Wa(e),Ha(Yf().onAiButtonArrowKey(t,"tone"))})),ph(10,pT,2,0,"span",99),xf(),ph(11,fT,4,18,"ng-container",100),xf()(),ph(12,mT,2,0,"button",101),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",e.showToneLeftScrollButton),Vd(5),zh("ngIf",e.canUndo),Vd(),zh("disabled",e.formIsLoading)("ngClass",e.formIsLoading?"px-0 pds-loading-shimmer gifting-tone-loading":"px-3"),gh("aria-disabled",e.formIsLoading)("aria-label",e.isMessageEmpty?"Rephrase (enter a message first)":"Rephrase")("aria-setsize",((null==e.giftingTonesList?null:e.giftingTonesList.length)||0)+2)("tabindex",e.canUndo||e.formIsLoading?"-1":"0"),Vd(2),zh("ngIf",!e.formIsLoading),Vd(),zh("ngForOf",e.giftingTonesList),Vd(),zh("ngIf",e.showToneRightScrollButton)}}function bT(e,t){1&e&&Of(0)}function yT(e,t){if(1&e&&(Ef(0),ph(1,bT,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,hx,!(null!=e.giftFormControls&&null!=e.giftFormControls.message&&e.giftFormControls.message.valid)))}}function vT(e,t){1&e&&Of(0)}function wT(e,t){if(1&e&&(Ef(0),ph(1,vT,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,fx,!(null!=e.giftFormControls&&null!=e.giftFormControls.message&&e.giftFormControls.message.valid)))}}function _T(e,t){1&e&&Of(0)}function ST(e,t){if(1&e&&(Ef(0),ph(1,_T,1,0,"ng-container",56),Df()),2&e){let e=Yf(2),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,mx,!(null!=e.giftFormControls&&null!=e.giftFormControls.message&&e.giftFormControls.message.valid)))}}function CT(e,t){if(1&e&&(Ef(0),ph(1,yT,2,4,"ng-container",10)(2,wT,2,4,"ng-container",10)(3,ST,2,4,"ng-container",10),Df()),2&e){let e=Yf();Vd(),zh("ngIf",(null==e.giftFormControls||null==e.giftFormControls.message||null==e.giftFormControls.message.errors?null:e.giftFormControls.message.errors.emojiFound)||(null==e.giftFormControls||null==e.giftFormControls.message||null==e.giftFormControls.message.errors?null:e.giftFormControls.message.errors.rephraseFailed)),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.message||null==e.giftFormControls.message.errors?null:e.giftFormControls.message.errors.maxLines),Vd(),zh("ngIf",null==e.giftFormControls||null==e.giftFormControls.message||null==e.giftFormControls.message.errors?null:e.giftFormControls.message.errors.maxChar)}}function IT(e,t){1&e&&Of(0)}function AT(e,t){if(1&e&&(Ef(0),ph(1,IT,1,0,"ng-container",56),Df()),2&e){let e=Yf(),t=sm(75);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Om(2,gx,e.aiApiErrorMessage))}}function kT(e,t){1&e&&(kf(0,"p",109),am(1,"The receipt wonât be included with your gift order. Your recipient won't be able to track or get updates on the order"),xf())}function xT(e,t){if(1&e){let e=Mf();kf(0,"div",110)(1,"button",111),jf("click",(function(t){return Wa(e),Ha(Yf().removeGiftOption(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf().removeGiftOption(t))}))("keydown.space",(function(t){return Wa(e),Ha(Yf().removeGiftOption(t))})),am(2,"Remove gift option"),xf()()}if(2&e){let e=Yf();Vd(),zh("ngStyle",e.getPrimaryColor())}}
1function TT(e,t){1&e&&(Ef(0),Tf(1,"div",112),Df())}function PT(e,t){1&e&&Tf(0,"span",117)}function ET(e,t){1&e&&(kf(0,"span"),So(),kf(1,"svg",118),Tf(2,"path",119),xf()())}function DT(e,t){if(1&e&&(kf(0,"small",113)(1,"div",114),ph(2,PT,1,0,"span",115)(3,ET,3,0,"span",10),kf(4,"span",116),am(5),xf()()()),2&e){let e=t.message,i=t.isInvalid,n=t.isApiError;zh("ngClass",Om(5,bx,i)),Vd(2),zh("ngIf",n),Vd(),zh("ngIf",!n),Vd(),zh("ngClass",Om(7,yx,n)),Vd(),lm(e)}}var OT=(()=>{class e{constructor(e,t,i){this.substitutionService=e,this.formBuilder=t,this.giftingLoggerService=i,this.MAX_LINE_CHAR=35,this.MAX_LINES=5,this.MAX_MESSAGE_CHAR=140,this.SYSTEM_UPDATE_DELAY=100,this.PHONE_VALIDATION_DELAY=1e3,this.MESSAGE_INIT_DELAY=1e3,this.FALLBACK_TONES=["Neutral","Formal","Warm","Friendly"],this.FALLBACK_OCCASION_LIST=[],this.editFlag=!1,this.updateGiftMessage=new _l,this.closeGift=new _l,this.giftingOccationList=[],this.giftingTonesList=[],this.selectedOccasion="",this.selectedTone="",this.apiResponse=null,this.isLoadingGiftConfig=!1,this.loadSpinner=!1,this.messageHistory=[],this.canUndo=!1,this.occasionButtonWidths=[],this.toneButtonWidths=[],this.formIsLoading=!1,this.activeOccasionIndex=0,this.activeToneIndex=0,this.showOccasionLeftScrollButton=!1,this.showOccasionRightScrollButton=!1,this.showToneLeftScrollButton=!1,this.showToneRightScrollButton=!1,this.hasErrors=!1,this.aiServicesAvailable=!0,this.hasAiApiError=!1,this.aiApiErrorMessage="",this.destroy=new kt,this.lastValidatedPhoneNumber="",this.lastMessageValue="",this.isSystemUpdate=!1,this.hasUserInteractedWithMessage=!1,this.analyticsLogged=!1,this.storedSelectedOccasion=null,this.occasionSelectionCount=new Map,this.totalOccasionClicks=0,this.toneSelectionCount=new Map,this.totalToneClicks=0,this.rephraseClickCount=0,this.manualMessageChangeCount=0,this.analyticsUndoClicked=!1,this.maxLinesValidator=e=>(e?.value?.match(/\n/gi)?.length||0)>3?{maxLines:!0}:null,this.maxCharValidator=e=>(e?.value?.length||0)>this.MAX_MESSAGE_CHAR?{maxChar:!0}:null,this.emojiValidator=e=>e?.value?.match(new RegExp("\\p{Extended_Pictographic}","gu"))?{emojiFound:!0}:null}ngAfterViewInit(){setTimeout((()=>{this.captureOccasionChipWidths(),this.captureToneChipWidths(),this.updateScrollButtonState("occasion"),this.updateScrollButtonState("tone")})),this.occasionButtons?.changes?.pipe(un(this.destroy)).subscribe((()=>{setTimeout((()=>{this.captureOccasionChipWidths(),this.updateScrollButtonState("occasion")}))})),this.toneButtons?.changes?.pipe(un(this.destroy)).subscribe((()=>{setTimeout((()=>{this.captureToneChipWidths(),this.updateScrollButtonState("tone")}))}))}onWindowResize(){setTimeout((()=>{this.updateScrollButtonState("occasion"),this.updateScrollButtonState("tone")}))}getChipWidths(e){return e?.map((e=>e?.nativeElement?.getBoundingClientRect()?.width||0))||[]}captureOccasionChipWidths(){let e=this.getChipWidths(this.occasionButtons);e.length&&(this.occasionButtonWidths=e)}captureToneChipWidths(){let e=(this.toneButtons?.toArray()||[]).map((e=>e?.nativeElement)).filter((e=>(e?.id||"").startsWith("toneButton-"))).map((e=>e?.getBoundingClientRect?.()?.width||0)),t=e.some((e=>e<=0));e.length&&!t&&(this.toneButtonWidths=e)}onAiButtonArrowKey(e,t){let i="occasion"===t?this.occasionButtons:this.toneButtons,n=i?.toArray()||[],r=e.currentTarget,s=n.findIndex((e=>e.nativeElement===r));s<0||this.handleChipArrowNavigation(e,s,i,t)}handleChipArrowNavigation(e,t,i,n){let r="ArrowRight"===e.key||"ArrowDown"===e.key,s="ArrowLeft"===e.key||"ArrowUp"===e.key;if(!r&&!s)return;e.preventDefault();let a=i?.toArray()||[];if(!a.length)return;let o=r?1:-1,l=this.getNextEnabledIndex(a,t,o);if(l===t)return;this.setRadioFocusIndex(n,l);let c=a[l]?.nativeElement;c?.focus(),c?.scrollIntoView({block:"nearest",inline:"nearest"})}getNextEnabledIndex(e,t,i){let n=e.length;for(let r=1;r<=n;r++){let s=(t+i*r+n)%n,a=e[s]?.nativeElement;if(!a?.disabled&&"true"!==a?.getAttribute("aria-disabled"))return s}return t}setRadioFocusIndex(e,t){"occasion"!==e?this.activeToneIndex=t:this.activeOccasionIndex=t}getGroupActiveFocusIndex(e){return"occasion"===e?this.activeOccasionIndex:this.activeToneIndex}resolveTabIndex(e,t,i){return t===(i>=0?i:this.getGroupActiveFocusIndex(e))?0:-1}getTabIndex(e,t){let i="occasion"===e?this.giftingOccationList.findIndex((e=>this.selectedOccasion&&this.selectedOccasion.id===e.id)):this.giftingTonesList.findIndex((e=>e===this.selectedTone));return this.resolveTabIndex(e,t,i)}scrollChipContainer(e,t){let i=("occasion"===e?this.occasionScrollContainer:this.toneScrollC
1ontainer)?.nativeElement;if(!i)return;let n=Math.max(Math.floor(.7*i.clientWidth),120),r="left"===t?-n:n;i.scrollBy({left:r,behavior:"smooth"}),setTimeout((()=>this.updateScrollButtonState(e)),50)}onChipContainerScroll(e){this.updateScrollButtonState(e)}updateScrollButtonState(e){let t=("occasion"===e?this.occasionScrollContainer:this.toneScrollContainer)?.nativeElement;if(!t)return void("occasion"===e?(this.showOccasionLeftScrollButton=!1,this.showOccasionRightScrollButton=!1):(this.showToneLeftScrollButton=!1,this.showToneRightScrollButton=!1));let i=t.scrollLeft||0,n=Math.max(t.scrollWidth-t.clientWidth,0),r=n>1,s=r&&i>0,a=r&&i<n-1;if("occasion"===e)return this.showOccasionLeftScrollButton=s,void(this.showOccasionRightScrollButton=a);this.showToneLeftScrollButton=s,this.showToneRightScrollButton=a}updateHasErrors(){this.hasErrors=!(!this.giftForm?.invalid&&!this.hasAiApiError)}ngOnInit(){this.hideTrustBanner(),this.initializeForm(),this.initializeMessageHistory(),this.loadGiftConfig(),this.setInitialMessage(),this.storeInitialFormValue(),this.logComponentInvocation(),this.trackModalView(),this.setupFormSubscriptions(),this.setTrapFocus()}get giftFormControls(){return this.giftForm?.controls}get isMessageEmpty(){return!this.giftForm?.get("message")?.value?.trim()}hideTrustBanner(){$("#onetrust-banner-sdk").hide()}initializeForm(){let{mobileObj:e,emailObj:t}=this.extractCommDetails(),i=this.formatMobileForDisplay(e?.value),n=this.getGiftData(),r=this.getSelectedOccasion();r&&(this.storedSelectedOccasion=r),this.giftForm=this.formBuilder.group({to:[n.to||"",[g_.required,g_.maxLength(60),g_.pattern(/^[A-Za-z .'-]+$/)]],from:[n.from||"",[g_.required,g_.maxLength(60),g_.pattern(/^[A-Za-z .'-]+$/)]],message:[n.text||"",[g_.maxLength(141),this.emojiValidator,this.maxLinesValidator,this.maxCharValidator]],mobile:[i,[g_.maxLength(12),g_.pattern(/^[\d]{3}-[\d]{3}-[\d]{4}$/)]],email:[t?.value||"",[g_.maxLength(60),g_.pattern(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}$/)]]})}extractCommDetails(){let e=this.getGiftProperty("commDetails")||[];return{mobileObj:e.find((e=>"MOBILE"===e.type)),emailObj:e.find((e=>"EMAIL"===e.type))}}formatMobileForDisplay(e){if(!e)return"";let t=e.replace(/\D/g,"");return 10===t.length?`${t.substring(0,3)}-${t.substring(3,6)}-${t.substring(6,10)}`:e}getGiftData(){return this.getGiftProperty("giftDetails")||{}}getSelectedOccasion(){return this.getGiftProperty("selectedOccasion")||null}initializeMessageHistory(){this.messageHistory=[],this.canUndo=!1}loadGiftConfig(){this.aiMessaging&&this.checkAndLoadGiftConfig()}setInitialMessage(){let e=this.getGiftProperty("giftDetails")?.text;e&&setTimeout((()=>this.updateSystemMessage(e)),this.MESSAGE_INIT_DELAY)}storeInitialFormValue(){this.initialGiftFormValue=JSON.parse(JSON.stringify(this.giftForm.value))}logComponentInvocation(){this.giftingLoggerService.logGiftingAction({cart:this.cart,callName:"gifting-invoked",editFlag:this.editFlag,banner:this.cart?.banner||"safeway"})}trackModalView(){this.shouldTrackModalView()&&this.trackAnalyticsActions("modalView","view")}shouldTrackModalView(){return window.AB?.DATALAYER&&!window.AB.DATALAYER.isCartAndCheckoutPage("cart")}setupFormSubscriptions(){this.updateHasErrors(),this.giftForm.statusChanges.pipe(un(this.destroy)).subscribe((()=>this.updateHasErrors())),this.giftForm.get("message")?.valueChanges.pipe(un(this.destroy)).subscribe((e=>this.handleMessageChange(e)))}handleMessageChange(e){if(null==e)return;this.hasAiApiError&&(this.hasAiApiError=!1,this.aiApiErrorMessage="",this.updateHasErrors());let t=this.lastMessageValue??"";!this.isSystemUpdate&&e!==t&&(this.hasUserInteractedWithMessage=!0,this.manualMessageChangeCount++,this.canUndo||(this.messageHistory.push(t),this.canUndo=!0),console.log("Manual message change detected",{value:e,manualMessageChangeCount:this.manualMessageChangeCount})),this.lastMessageValue=e,this.formatText()}updateSystemMessage(e,t=!1){this.isSystemUpdate=!0,this.giftForm.get("message")?.setValue(e,{emitEvent:!1}),this.lastMessageValue=e,this.formatText(),setTimeout((()=>{this.isSystemUpdate=!1}),this.SYSTEM_UPDATE_DELAY)}restrictKeys(e){this.giftMsgRef?.nativeElement&&this.giftMsgRef.nativeElement.value.split("\n").length>=this.MAX_LINES&&"Enter"===e.key&&!e.shiftKey&&e.preventDefault()}setTrapFocus(){setTimeout((()=>{document.getElementById("gift-modal")&&this.substitutionService.setTrapFocus("#gift-modal")}),this.SYSTEM_UPDATE_DELAY)}formatText(){if(!this.giftMsgRef?.nativeElement)return;let e=this.giftMsgRef.nativeElement.value.split("\n"),t=[];for(let i=0;i<e.length;i++){let n=e[i].split(" "),r=n[0]||"";r.length>this.MAX_LINE_CHAR&&!e[i+1]&&(e.push(r.substring(this.MAX_LINE_CHAR+1)),r
1=r.substring(0,this.MAX_LINE_CHAR-1)),t.push(r);for(let s=1;s<n.length;s++){if(!(r.length+n[s].length+1<=this.MAX_LINE_CHAR)){let t=zk(e[i].slice(r.length));e[i+1]?e[i+1]=t+" "+e[i+1]:e.push(t),r="";break}r+=" "+n[s],t[i]+=" "+n[s]}e[i]=""}this.finalizeFormattedText(t)}finalizeFormattedText(e){if(e.length>this.MAX_LINES&&e[this.MAX_LINES-1].length<this.MAX_LINE_CHAR){let t=this.MAX_LINES-1,i=this.MAX_LINE_CHAR-e[t].length-1;e[t]+=" "+e[this.MAX_LINES].slice(0,i)}e.length=Math.min(e.length,this.MAX_LINES);let t=e.join("\n");this.giftForm.get("message")?.setValue(t,{emitEvent:!1}),this.lastMessageValue=t,this.updateCharacterCounter(t,e.length)}updateCharacterCounter(e,t){let i=this.giftMsgCountRef?.nativeElement;if(i){let n=e.length-(t-1);i.value=`${n||0}/${this.MAX_MESSAGE_CHAR}`}}onInputChange(e){let t=e.target,i=t.value.replace(/\D/g,"").substring(0,10),n=this.formatPhoneInput(i);this.giftForm.get("mobile")?.setValue(n,{emitEvent:!1}),setTimeout((()=>t.setSelectionRange(t.value.length,t.value.length)))}formatPhoneInput(e){return e.length<=3?e:e.length<=6?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,6)}-${e.slice(6,10)}`}undoToneMessage(e){e&&(this.analyticsUndoClicked=!0,e.stopPropagation(),e.preventDefault());let t=this.messageHistory.pop();void 0!==t?(this.updateSystemMessage(t,!0),this.canUndo=this.messageHistory.length>0,this.canUndo||setTimeout((()=>this.giftMsgRef?.nativeElement?.focus()),0)):this.canUndo=!1}rephraseToneMessage(e){e&&(e.stopPropagation(),e.preventDefault()),this.hasUserInteractedWithMessage=!0;let t=this.giftForm.get("message")?.value?.trim();this.captureToneChipWidths(),this.lastFocusedAiButton=document.activeElement,this.rephraseClickCount++,this.trackToneSelection("rephrase"),this.messageHistory.push(t),this.canUndo=!0,this.formIsLoading=!0;let i={original_message:t,tone:this.selectedTone.toLowerCase(),occasion:this.getOccasionName()};this.substitutionService.rephraseGiftMessage(i,this.token).subscribe({next:e=>this.handleRephraseResponse(e,t),error:e=>this.handleRephraseError(e,t)})}getOccasionName(){return this.selectedOccasion.name||this.selectedOccasion.occasion||""}handleRephraseResponse(e,t){e?.rewritten_message?this.updateSystemMessage(e.rewritten_message):this.generateSimpleRephrase(t),this.formIsLoading=!1,this.restoreFocusToLastAiButton()}handleRephraseError(e,t){if(400===e?.status&&"OSMS-GENAICOMPOSER-401"!==e.error?.errorCode&&"OSMS-GENAICOMPOSER-402"!==e.error?.errorCode||"OSMS-GENAICOMPOSER-500"===e.error?.errorCode||503===e?.status)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="We are having trouble completing your request. Please try again later.",this.updateHasErrors(),this.messageHistory.pop(),this.canUndo=this.messageHistory.length>0,void setTimeout((()=>{this.lastFocusedAiButton&&this.lastFocusedAiButton.isConnected&&this.lastFocusedAiButton.focus()}));if(400===e?.status&&"OSMS-GENAICOMPOSER-402"===e.error?.errorCode)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="Your message contains content we can't use. Please revise.",this.updateHasErrors(),this.messageHistory.pop(),this.canUndo=this.messageHistory.length>0,void setTimeout((()=>{this.lastFocusedAiButton&&this.lastFocusedAiButton.isConnected&&this.lastFocusedAiButton.focus()}));if(400===e?.status&&"OSMS-GENAICOMPOSER-401"===e.error?.errorCode)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="Your message must be in English to use rephrase.",this.updateHasErrors(),this.messageHistory.pop(),this.canUndo=this.messageHistory.length>0,void setTimeout((()=>{this.lastFocusedAiButton&&this.lastFocusedAiButton.isConnected&&this.lastFocusedAiButton.focus()}));if(t)try{this.generateSimpleRephrase(t)}catch{this.messageHistory.pop(),this.canUndo=this.messageHistory.length>0}else{let e=this.giftForm.get("message"),t=e?.errors||{};e?.setErrors(f(h({},t),{rephraseFailed:!0})),e?.markAsDirty(),e?.markAsTouched(),this.announceErrorThenFocusAiButton()}this.formIsLoading=!1,t&&this.restoreFocusToLastAiButton()}announceErrorThenFocusAiButton(){let e=document.createElement("div"),t="gifting-error-announce-"+Date.now();e.setAttribute("id",t),e.setAttribute("role","alert"),e.classList.add("sr-only"),document.body.appendChild(e),window.setTimeout((()=>{let e=(document.getElementById("messageError")?.textContent||"").replace(/\s+/g," ").trim(),i=this.lastFocusedAiButton?.textContent?.trim()||"button";this.setRadioFocusIndex("tone",this.toneButtons?.toArray().findIndex((e=>e.nativeElement===this.lastFocusedAiButton))||0);let n=`${e} Currently on ${i}, radio button ${this.activeToneIndex+1} of ${this.toneButtons?.length}`,r=document.getElementById(t);r&&(r.textContent=n||"Please enter a valid message.")}),50),this.restoreFocusToLastAiButton(1200),window.setTimeout((()=>{let e=document.getElementById(t);e&&document.body.removeChild(e)}),2e3)}generateSimpleRephrase(e){let t=this.applySimpleRephrasing(e);this.updateSystemMessage(t)}restoreFocusToLastAiButton(e=100){window.setTimeout((()=>{let e=this.lastFocusedAiButton;if(!e)return;let t="-1"===e.getAttribute("tabindex");t&&(e.setAttribute("tabindex","0"),e.blur()),e.focus(),e.scrollIntoView({block:"nearest",inline:"nearest"}),t&&window.setTimeout((()=>{e.setAttribute("tabindex","-1")}),0)}),e)}applySimpleRephrasing(e){let t=[{from:/^Hope you/i,to:"Wishing you"},{from:/^I hope/i,to:"Hope"},{from:/Enjoy/i,to:"Hope you love"},{from:/Thank you/i,to:"Thanks"}
1,{from:/Thanks/i,to:"Thank you"},{from:/Love,/i,to:"With love"},{from:/Best wishes/i,to:"All the best"},{from:/All the best/i,to:"Best wishes"}];for(let i of t)if(i.from.test(e))return e.replace(i.from,i.to);return e.trim()}onSubmit(){this.loadSpinner=!0;let e=this.logGiftingAnalytics("submit");if(!this.hasFormChanged())return this.loadSpinner=!1,void this.closeGiftDrawer(null);let t=this.getFormValues();if(!this.isValidSubmission(t))return void(this.loadSpinner=!1);let i=this.buildGiftRequestBody(t);this.submitGiftRequest(i,e)}hasFormChanged(){return JSON.stringify(this.giftForm.value)!==JSON.stringify(this.initialGiftFormValue)}getFormValues(){let e=this.giftFormControls;return{from:e?.from?.value?.trim()||"",to:e?.to?.value?.trim()||"",message:e?.message?.value?.trim()||"",mobile:e?.mobile?.value?.trim()||"",email:e?.email?.value?.trim()||""}}isValidSubmission(e){return e.from.length>0&&e.to.length>0}buildGiftRequestBody(e){let t={isGift:!0,giftDetails:{from:e.from,to:e.to,text:e.message}},i=this.buildCommDetails(e);return i.length&&(t.commDetails=i),this.aiMessaging&&(t.correlationId=this.cart?.cartId,t.selectedOccasion=this.buildSelectedOccasion()),this.editFlag&&(t.orderId=this.cart?.orderId,t.version=this.cart?.versionNumber),t}buildCommDetails(e){let t=[];return e.email&&t.push({type:"EMAIL",value:e.email,who:"RECIPIENT"}),e.mobile&&t.push({type:"MOBILE",value:e.mobile.replace(/-/g,""),who:"RECIPIENT"}),t}buildSelectedOccasion(){return this.selectedOccasion?{id:this.selectedOccasion.id,name:this.selectedOccasion.name||this.selectedOccasion.occasion}:null}hasExistingGiftDetails(){let e=this.getGiftProperty("giftDetails");return e&&(e.from||e.to||e.text)}getGiftProperty(e){return this.editFlag?this.cart.deliveryInfo?.gift?.[e]:this.cart.gift?.[e]}submitGiftRequest(e,t){if(this.editFlag)return this.aiMessaging?void this.substitutionService.giftingPartialUpdate(this.cart.cartId,e,this.token,this.appName,this.editFlag,this.aiMessaging,this.cart?.gift?.correlationId).subscribe({next:e=>this.handleSubmitSuccess(e,t),error:e=>this.handleSubmitError("error-partial-update")}):void this.substitutionService.updateGiftDetails(this.cart.cartId,e,this.token,this.appName,this.editFlag,this.aiMessaging,this.cart?.gift?.correlationId,"submit").subscribe({next:e=>this.handleSubmitSuccess(e,t),error:e=>this.handleSubmitError("error-full-update")});this.hasExistingGiftDetails()&&this.aiMessaging?this.substitutionService.giftingPartialUpdate(this.cart.cartId,e,this.token,this.appName,this.editFlag,this.aiMessaging,this.cart?.gift?.correlationId).subscribe({next:e=>this.handleSubmitSuccess(e,t),error:e=>this.handleSubmitError("error-partial-update")}):this.substitutionService.updateGiftDetails(this.cart.cartId,e,this.token,this.appName,this.editFlag,this.aiMessaging,this.cart?.gift?.correlationId,"submit").subscribe({next:e=>this.handleSubmitSuccess(e,t),error:e=>this.handleSubmitError("error-full-update")})}handleSubmitSuccess(e,t){this.updateGiftMessage.emit({action:"update",data:e,updatedCartId:this.cart.cartId}),this.loadSpinner=!1,e?.commDetails?.forEach((e=>{"EMAIL"===e.type?t.emailChanged=this.initialGiftFormValue.email?.value!==e.value:"MOBILE"===e.type&&(t.mobileChanged=this.initialGiftFormValue.mobile?.value!==e.value)})),this.trackAnalyticsActions("modalClick","save"),this.trackSaveAnalytics(e,t),this.initialGiftFormValue=JSON.parse(JSON.stringify(this.giftForm.value)),this.giftingLoggerService.logGiftingAction({cart:this.cart,callName:"gifting-saved",editFlag:this.editFlag,banner:this.cart?.banner||"safeway",responseData:{analytics:t,cartId:this.cart?.cartId||"",orderSummary:e?.orderSummary||{}}})}handleSubmitError(e){this.loadSpinner=!1,this.updateGiftMessage.emit({action:e,data:{},updatedCartId:this.cart.cartId})}removeGiftOption(e){if(!this.cart?.gift?.giftDetails)return this.logGiftingAnalytics("remove-gift"),this.trackAnalyticsActions("modalClick","remove-gift-option"),void this.closeGift.emit();this.loadSpinner=!0;let t=this.logGiftingAnalytics("remove-gift");this.substitutionService.updateGiftDetails(this.cart.cartId,{isGift:!1},this.token,this.appName,this.editFlag,this.aiMessaging,this.cart?.gift?.correlationId,"delete").subscribe({next:e=>this.handleGiftRemovalSuccess(e,t),error:()=>this.handleGiftRemovalError()})}handleGiftRemovalSuccess(e,t){this.resetGiftState(e),this.trackAnalyticsActions("modalClick","remove-gift-option"),window.digitalData?.pageFlags?.shouldTrackGiftOption&&this.setLinkClickEvents("cart|remove-gift-option"),this.giftingLoggerService.logGiftingAction({cart:this.cart,callName:"gifting-removed",editFlag:this.editFlag,banner:this.cart?.banner||"safeway",responseData:{analytics:t,cartId:this.cart?.cartId||""}})}handleGiftRemovalError(){this.loadSpinner=!1,this.updateGiftMessage.emit({action:"remove-error",data:{},updatedCartId:this.cart.cartId})}resetGiftState(e){this.updateGiftMessage.emit({action:"remove",data:e,updatedCartId:this.cart.cartId}),this.giftForm.reset({from:"",to:"",message:""}),this.cart.gift.isGift=!1,this.cart.gift.giftDetails=null,this.loadSpinner=!1}validatePhoneNumber(){let e=this.giftForm?.get("mobile");if(!this.shouldValidatePhone(e))return;this.captureToneChipWidths(),this.loadSpinner=!0,this.formIsLoading=!0,this.giftForm.disable();let t={phone:{number:e.value.replace(/-/g,"")}},{customerUUID:i,banner:n}=this.getCustomerData();setTimeout((()=>{this.substitutionService.validatePhoneNumber(i,t,this.token,n).subscribe({next:t=>this.handlePhoneValidationSuccess(t,e),error:()=>this.handlePhoneValidationError(e)})}),this.PHONE_VALIDATION_DELAY)}shouldValidatePhone(e){return e?.value?.length>0&&e.valid&&e.value!==this.lastValidatedPhoneNumber}getCustomerData(){return this.editFlag?{customerUUID:this.cart?.customerInfo?.customerUUID,banner:this.cart?.storeAddress?.banner}:{customerUUID:this.cart?.uuid,banner:this.cart?.banner}}handlePhoneValidationSuccess(e,t){this.enableFormAndFocus(),"CELLULAR"===e.ph
1oneType?this.clearPhoneErrors(t):this.setPhoneError(t,"invalidPhoneNumber"),this.lastValidatedPhoneNumber=t.value}handlePhoneValidationError(e){this.enableFormAndFocus(),this.setPhoneError(e,"apiError"),this.lastValidatedPhoneNumber=e.value}enableFormAndFocus(){this.giftForm.enable(),this.loadSpinner=!1,this.formIsLoading=!1,document.getElementById("mobile")?.focus()}clearPhoneErrors(e){let t=e.errors||{};delete t.invalidPhoneNumber,delete t.apiError,e.setErrors(Object.keys(t).length>0?t:null)}setPhoneError(e,t){let i=e.errors||{};e.setErrors(f(h({},i),{[t]:!0}))}getGiftMessageConfig(){this.aiMessaging?(this.isLoadingGiftConfig=!0,Oi({tonesMapping:this.substitutionService.getGiftingAiTones().pipe($i((()=>fi(null)))),guestOccasions:this.substitutionService.getGiftingOccasions(this.token,this.editFlag?this.cart?.storeAddress?.banner.toLowerCase():this.cart?.banner.toLowerCase()).pipe($i((()=>fi(null))))}).subscribe({next:e=>this.handleConfigResponse(e),error:()=>this.handleConfigError()})):this.setFallbackValues()}handleConfigResponse(e){let{tonesMapping:t,guestOccasions:i}=e;return t||i?t&&!i||!t&&i?(this.aiMessaging=!0,this.giftingTonesList=[...this.FALLBACK_TONES],this.giftingOccationList=[],void(this.isLoadingGiftConfig=!1)):void this.handleConfigSuccess(e):(this.aiMessaging=!1,this.setFallbackValues(),void(this.isLoadingGiftConfig=!1))}setFallbackValues(){this.giftingOccationList=[...this.FALLBACK_OCCASION_LIST],this.giftingTonesList=[...this.FALLBACK_TONES]}handleConfigSuccess(e){this.processApiResponses(e.tonesMapping,e.guestOccasions),this.isLoadingGiftConfig=!1}handleConfigError(){console.error("Error fetching gift message config"),this.aiMessaging=!1,this.setFallbackValues(),this.isLoadingGiftConfig=!1}processApiResponses(e,t){let i=this.buildOccasionsList(e,t),n=e?.default?.aiTones||[];this.apiResponse={giftingAiModifiedDate:(new Date).toISOString().split("T")[0],occasions:i,defaultTones:n,defaultMessage:e?.default?.defaultMessage||""},this.saveGiftConfigToLocalStorage(this.apiResponse),this.giftingOccationList=i,this.preselectStoredOccasion(),this.setDefaultValues()}buildOccasionsList(e,t){let i=[];if(!t?.occasions||!e?.occasionList)return i;let n=this.createTonesMap(e);return t.occasions.forEach((e=>{let t=this.findMatchingOccasion(e,n);t&&i.push({id:e.id,name:e.name,defaultMessage:t.defaultMessage,aiTones:t.aiTones||[]})})),i}createTonesMap(e){let t=new Map;return e.occasionList?.forEach((e=>{t.set(e.id,e)})),t}findMatchingOccasion(e,t){let i=t.get(e.id);return!i&&"LOVE_AND_ROMANCE"===e.id&&(i=t.get("LOVE_ROMANCE")),i}checkAndLoadGiftConfig(){let e=(new Date).toISOString().split("T")[0],t=this.getGiftConfigFromLocalStorage();this.isCacheValid(t,e)?this.loadCachedConfig(t):this.getGiftMessageConfig()}isCacheValid(e,t){return e&&e.giftingAiModifiedDate===t}loadCachedConfig(e){this.apiResponse=e,this.giftingOccationList=e.occasions||[],this.preselectStoredOccasion(),this.setDefaultValues()}preselectStoredOccasion(){if(this.storedSelectedOccasion&&this.giftingOccationList.length>0){let e=this.giftingOccationList.find((e=>e.id===this.storedSelectedOccasion.id));e&&(this.selectedOccasion=e,this.storedSelectedOccasion=null)}}saveGiftConfigToLocalStorage(e){try{localStorage.setItem("giftingAIData",JSON.stringify(e))}catch(e){console.warn("Failed to save gifting config to localStorage:",e)}}getGiftConfigFromLocalStorage(){try{let e=localStorage.getItem("giftingAIData");return e?JSON.parse(e):null}catch(e){return console.warn("Failed to retrieve gifting config from localStorage:",e),null}}setDefaultValues(){!this.aiMessaging||!this.apiResponse||(this.isSystemUpdate=!0,this.selectedOccasion&&""!==this.selectedOccasion?this.setSelectedOccasionValues():this.setDefaultOccasionValues(),setTimeout((()=>{this.isSystemUpdate=!1}),this.SYSTEM_UPDATE_DELAY))}setDefaultOccasionValues(){let e=this.apiResponse.defaultMessage||"";this.updateFormMessage(e),this.giftingTonesList=[...this.apiResponse.defaultTones||[]],setTimeout((()=>this.captureToneChipWidths()))}setSelectedOccasionValues(){let e=this.apiResponse.occasions?.find((e=>
1e.name===this.selectedOccasion.name||e.id===this.selectedOccasion.id));e&&(this.updateFormMessage(e.defaultMessage),this.giftingTonesList=[...e.aiTones],setTimeout((()=>this.captureToneChipWidths())))}updateFormMessage(e){this.giftForm.get("message")?.setValue(e,{emitEvent:!1}),this.lastMessageValue=e}resetMessageHistory(){this.messageHistory=[],this.canUndo=!1}onOccasionSelect(e,t){t&&(t.stopPropagation(),t.preventDefault()),this.hasUserInteractedWithMessage=!0;let i=this.giftForm.get("message")?.value??"";this.addToMessageHistory(i),this.trackOccasionSelection(e),this.updateOccasionSelection(e),this.applyOccasionChanges()}isOccasionSelected(e){return!(!e||!this.selectedOccasion||""===this.selectedOccasion)&&this.selectedOccasion?.id===e?.id}trackOccasionSelection(e){this.totalOccasionClicks++;let t=this.occasionSelectionCount.get(e.name)||0;this.occasionSelectionCount.set(e.name,t+1)}updateOccasionSelection(e){let t=this.isOccasionSelected(e);this.selectedOccasion=t?"":e,this.selectedTone=""}applyOccasionChanges(){this.isSystemUpdate=!0,this.setDefaultValues(),setTimeout((()=>{this.isSystemUpdate=!1}),this.SYSTEM_UPDATE_DELAY)}onToneSelect(e,t){t&&(t.stopPropagation(),t.preventDefault());let i=t?.currentTarget;this.hasUserInteractedWithMessage=!0;let n=this.giftForm.get("message")?.value?.trim();this.trackToneSelection(e),this.selectedTone=e,this.addToMessageHistory(n),this.applyToneToMessage(n,e,i)}trackToneSelection(e){this.totalToneClicks++;let t=this.toneSelectionCount.get(e)||0;this.toneSelectionCount.set(e,t+1)}addToMessageHistory(e){this.messageHistory.push(e),this.canUndo=!0}applyToneToMessage(e,t,i){this.captureToneChipWidths(),this.formIsLoading=!0,this.lastFocusedAiButton=i||document.activeElement;let n={original_message:e,tone:t.toLowerCase(),occasion:this.selectedOccasion?.name||this.selectedOccasion?.occasion||""};this.substitutionService.rephraseGiftMessage(n,this.token).subscribe({next:i=>this.handleToneSuccess(i,e,t),error:n=>this.handleToneError(n,e,t,i)})}handleToneSuccess(e,t,i){e?.rewritten_message?this.updateSystemMessage(e.rewritten_message):this.applyToneModification(t,i),this.hasAiApiError=!1,this.aiApiErrorMessage="",this.updateHasErrors(),this.formIsLoading=!1,setTimeout((()=>{this.lastFocusedAiButton&&this.lastFocusedAiButton.focus()}),100)}handleToneError(e,t,i,n){if(400===e?.status&&"OSMS-GENAICOMPOSER-401"!==e.error?.errorCode&&"OSMS-GENAICOMPOSER-402"!==e.error?.errorCode||"OSMS-GENAICOMPOSER-500"===e.error?.errorCode||503===e?.status)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="We are having trouble completing your request. Please try again later.",this.updateHasErrors(),void setTimeout((()=>{n&&n.isConnected&&n.focus()}));if(400===e?.status&&"OSMS-GENAICOMPOSER-402"===e.error?.errorCode)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="Your message contains content we can't use. Please revise.",this.updateHasErrors(),void setTimeout((()=>{n&&n.isConnected&&n.focus()}));if(400===e?.status&&"OSMS-GENAICOMPOSER-401"===e.error?.errorCode)return this.formIsLoading=!1,this.giftForm.enable(),this.giftForm.get("message")?.markAsTouched(),this.hasAiApiError=!0,this.aiApiErrorMessage="Your message must be in English to use tones.",this.updateHasErrors(),void setTimeout((()=>{n&&n.isConnected&&n.focus()}));if(console.error("Error applying tone:",i),t)try{this.applyToneModification(t,i)}catch{this.messageHistory.pop(),this.canUndo=this.messageHistory.length>0}else{let e=this.giftForm.get("message"),t=e?.errors||{};e?.setErrors(f(h({},t),{rephraseFailed:!0})),e?.markAsDirty(),e?.markAsTouched(),this.announceErrorThenFocusAiButton()}this.formIsLoading=!1,t&&this.restoreFocusToLastAiButton()}applyToneModification(e,t){let i;switch(t.toLowerCase()){case"heartfelt":i=this.makeMessageHeartfelt(e);break;case"funny":i=this.makeMessageFunny(e);break;case"inspirational":i=this.makeMessageInspirational(e);break;default:i=this.applySimpleRephrasing(e)}this.updateSystemMessage(i)}makeMessageHeartfelt(e){let t=["From the bottom of my heart, ","With all my love, ","Sending you warm wishes and "];return e.match(/^(from|with|sending)/i)?e:t[Math.floor(Math.random()*t.length)]+e.charAt(0).toLowerCase()+e.slice(1)}makeMessageFunny(e){let t=[" Hope this brings a smile to your face!"," Because you deserve all the good things!"," Just a little something to brighten your day!"];return e+t[Math.floor(Math.random()*t.length)]}makeMessageInspirational(e){let t=[" May this bring you joy and inspiration!"," Here's to new beginnings and endless possibilities!"," Wishing you strength and happiness always!"];return e+t[Math.floor(Math.random()*t.length)]}closeGiftDrawer(e){this.logGiftingAnalytics("close"),this.trackAnalyticsActions("modalClick","close"),this.closeGift.emit()}getGiftingAnalytics(){let e={},t="",i="";Array.from(this.occasionSelectionCount).forEach((([i,n],r)=>{t+=(0===r?"":",")+i,e[i]=n}));let n={};return Array.from(this.toneSelectionCount).forEach((([e,t],r)=>{i+=(0===r?"":",")+e,n[e]=t}
1)),{totalOccasionClicks:this.totalOccasionClicks,occasionBreakdown:e,totalToneClicks:this.totalToneClicks,toneBreakdown:n,rephraseClicks:this.rephraseClickCount,manualMessageChanges:this.manualMessageChangeCount,occasionPipe:t,tonePipe:i}}logGiftingAnalytics(e){if(this.analyticsLogged)return null;this.analyticsLogged=!0;let t=this.getGiftingAnalytics();return this.giftingLoggerService.logGiftingAction({cart:this.cart,callName:`gifting-analytics-${e}`,editFlag:this.editFlag,banner:this.cart?.banner||"safeway",responseData:{analytics:t,cartId:this.cart?.cartId||"",timestamp:(new Date).toISOString()}}),t}getPrimaryColor(){return this.substitutionService.getPrimaryColor(this.cart.banner)}getErrorFillColor(){return this.getPrimaryColor().color}trackAnalyticsActions(e,t){this.shouldTrackAnalytics()&&(this.setCarouselName(),window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:this.getModalLinkData(t)}))}shouldTrackAnalytics(){return window.AB?.DATALAYER&&window.digitalData?.pageFlags?.shouldTrackGiftLinkClicks}trackSaveAnalytics(e,t){if(!window?.AB?.DATALAYER||!window.digitalData?.pageFlags?.shouldTrackGiftOption)return;let i="";t.emailChanged&&(i+="email"),t.mobileChanged&&(i+=(i?"|":"")+"phone"),t.occasionPipe&&(i+=(i?"|":"")+t.occasionPipe),t.tonePipe&&(i+=(i?"|":"")+t.tonePipe),this.analyticsUndoClicked&&(i+=(i?"|":"")+"undo"),console.log("setting modal click event:","gift-order-fc|save","model message:",i,"oncePerPage:",void 0),this.setModalClickEvents("gift-order-fc|save",i)}setCarouselName(){"minicart"===this.appName&&window.AB.DATALAYER.setCarouselName("shop|mini_cart")}getModalLinkData(e){return`gift-order${"minicart"===this.appName?"-mc":"cart"===this.appName?"-fc":""}|${e}`}setLinkClickEvents(e){window?.AB?.DATALAYER?.setLinkClickEvents(e)}setModalClickEvents(e,t,i){window?.AB?.DATALAYER?.setModalClickEvents(e,t,i)}ngOnDestroy(){this.logGiftingAnalytics("destroy"),this.destroy.next(),this.destroy.complete()}static{this.ɵfac=function(t){return new(t||e)($d(fC),$d(dC),$d(Wk))}}static{this.ɵcmp=Qr({type:e,selectors:[["gifting-component"]],viewQuery:function(e,t){if(1&e&&(tm(Hk,5),tm(Yk,5),tm(Gk,5),tm(Kk,5),tm(Qk,5),tm(Jk,5)),2&e){let e;im(e=nm())&&(t.giftMsgRef=e.first),im(e=nm())&&(t.giftMsgCountRef=e.first),im(e=nm())&&(t.occasionScrollContainer=e.first),im(e=nm())&&(t.toneScrollC
vendor: 8,178 bytes, line 1
1ontainer=e.first),im(e=nm())&&(t.occasionButtons=e),im(e=nm())&&(t.toneButtons=e)}},hostBindings:function(e,t){1&e&&jf("resize",(function(){return t.onWindowResize()}),0,od)},inputs:{appName:"appName",token:"token",cart:"cart",giftingNewFlag:"giftingNewFlag",editFlag:"editFlag",aiMessaging:"aiMessaging"},outputs:{updateGiftMessage:"updateGiftMessage",closeGift:"closeGift"},decls:76,vars:51,consts:[["giftMsg",""],["giftMsgCount",""],["errorTemplate",""],["occasionScrollContainer",""],["occasionButtons",""],["toneScrollContainer",""],["toneButtons",""],["id","gift-modal",1,"gifting-container"],[1,"gifting-header","col-12","pt-3","pb-3","d-flex","align-items-center"],[1,"d-flex","align-items-center","justify-content-start","gift-side-btn"],[4,"ngIf"],[1,"flex-grow-1","text-center"],[1,"header-label","mt-0","mb-0"],[1,"d-flex","align-items-center","justify-content-end","gift-side-btn"],["class","header-close","data-dismiss","modal","tabindex","0","id","notesmodal-close-btn","role","button","aria-label","close",3,"click","keyup.enter",4,"ngIf"],[1,"gifting-body","col-12"],[1,"image-container","pt-3","pb-4"],[1,"gift-circle"],["src","/erums/cart/dist/assets/images/gift.svg","alt","",1,"gift-image"],[1,"gift-form","col-12","pb-2"],[3,"ngSubmit","formGroup"],[1,"sending-to-section"],[1,"pb-2"],["for","to",1,"d-block","heading-xs","mt-0"],[1,"sr-only"],["class","required-indicator","aria-hidden","true",4,"ngIf"],["for","to",1,"input-field__float-label"],["placeholder","","aria-label","Recipient name","aria-required","true","type","text","id","to","name","to","formControlName","to","aria-describedby","toNameError",1,"d-block","gift-input","gift-input-focus",3,"ngClass"],[1,"gift-float-label","text-l"],["aria-live","assertive","id","toNameError",1,"pl-3"],["for","from",1,"d-block","heading-xs","mt-0"],["for","from",1,"input-field__float-label"],["type","text","aria-required","true","placeholder","","aria-label","Your name","id","from","name","from","formControlName","from","aria-describedby","fromNameError",1,"d-block","gift-input","gift-input-focus",3,"ngClass"],["aria-live","assertive","id","fromNameError",1,"pl-3"],["class","ai-divider-line",4,"ngIf"],[1,"pb-3"],["for","message",1,"d-block","heading-xs","gift-label","mb-0"],["class","text-m mb-2 pb-1",4,"ngIf"],["class","d-block mb-2","for","message",4,"ngIf"],[1,"input-field__float-label","position-relative","gift-input-message",3,"ngClass"],["placeholder","","id","message","name","message","formControlName","message","maxlength","141","aria-describedby","messageError giftMsgCounterDesc messageAnnouncementDesc","aria-required","false",1,"gift-input-focus",3,"keydown","ngClass","readonly"],["class","position-absolute gift-message-loader","src","/erums/cart/dist/assets/json/ai_loading_neutral.json","background","transparent","speed","1","loop","","autoplay","",4,"ngIf"],["id","messageAnnouncementDesc","aria-live","assertive",1,"sr-only"],["id","giftMsgCounter",1,"d-block","gift-message-count","pl-2","text-right"],["id","giftMsgCounterDesc","aria-live","polite",1,"sr-only"],["aria-live","assertive","id","messageError",1,"pl-3","pt-1"],["class","gifting-bottom-message",4,"ngIf"],[1,"col-12","gifting-submit","row","pr-0","pt-4","pl-4"],[1,"pl-0","pr-0","order-1",3,"ngClass"],["type","submit",1,"btn","mr-0",3,"ngClass"],["class","col-6 pl-0 pt-2 pr-0 order-0",4,"ngIf"],["tabindex","0","role","button","aria-label","Back",1,"text-nowrap","flex-shrink-0",3,"keyup.enter","click"],["src","/erums/cart/dist/assets/images/icons-universal-caret-left-gray.svg","alt","","aria-hidden","true",1,"gift-back-link"],[1,"back-text","pt-2"],["data-dismiss","modal","tabindex","0","id","notesmodal-close-btn","role","button","aria-label","close",1,"header-close",3,"click","keyup.enter"],["aria-hidden","true",1,"required-indicator"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mobile-number-section"],["for","mobile",1,"input-field__float-label"],["placeholder","","aria-label","Recipient mobile number","aria-required","false","type","text","id","mobile","name","mobile","formControlName","mobile","maxlength","12","aria-describedby","mobileError",1,"d-block","gift-input","gift-input-focus",3,"blur","input","ngClass"],["aria-live","assertive","id","mobileError",1,""],[1,"email-section"],[1,"pb-0"],["for","email",1,"input-field__float-label"],["placeholder","","aria-label","Recipient email","aria-required","false","type","text","id","email","name","email","formControlName","email","aria-describedby","emailError",1,"d-block","gift-input","gift-input-focus",3,"ngClass"],["aria-live","assertive","id","emailError",1,"pl-3"],[1,"mb-4",3,"ngClass"],["for","",1,"d-block","gifting-divider-label"],[1,"ai-divider-line"],["id","occasion-group-label","class","heading-xs",4,"ngIf"],["class","d-flex align-items-center","style","position: relative;",4,"ngIf"],["id","occasion-group-label",1,"heading-xs"],[1,"d-flex","align-items-center",2,"position","relative"],["type","button","class","pds-icon-btn pds-icon-btn-size_small pds-icon-btn-subtle--primary d-flex align-items-center justify-content-center","style","position: absolute; left: 4px; top: 50%; transform: translateY(-50%); z-index: 2;","aria-label","Scroll occasions left",3,"click",4,"ngIf"],[1,"x-scroll-container","p-0","flex-grow-1",3,"scroll"],["id","occasion-chip-list","role","radiogroup","aria-labelledby","occasion-group-label",1,"x-chip-nav","d-flex","flex-row","mt-1","mb-0","pl-0"],["class","pds-chip d-inline-block","role","presentation",4,"ngFor","ngForOf"],["type","button","class","pds-icon-btn pds-icon-btn-size_small pds-icon-btn-subtle--primary d-flex align-items-center justify-content-center","style","position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 2;","aria-label","Scroll occasions right",3,"click",4,"ngIf"],["type","button","aria-label","Scroll occasions left",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-subtle--primary","d-flex","align-items-center","justify-content-center",2,"position","absolute","left","4px","top","50%","transform","translateY(-50%)","z-index","2",3,"click"],["aria-hidden","true",1,"pds-svg-chevron-right","pds-icon-btn-subtle--primary__icon",2,"transform","rotate(180deg)"],["role","presentation",1,"pds-chip","d-inline-block"],["class","pds-chip-container align-items-center d-flex","role","radio",3,"ngClass","click","keyup.enter","focus","keydown.arrowright","keydown.arrowleft",4,"ngIf"],["class","gifting-occasion-loading-wrapper",3,"width",4,"ngIf"],["role","radio",1,"pds-chip-container","align-items-center","d-flex",3,"click","keyup.enter","focus","keydown.arrowright","keydown.arrowleft","ngClass"],[1,"pds-chip-container-label"],[1,"gifting-occasion-loading-wrapper"],[1,"pds-loading-shimmer","gifting-ai-button-loading"],["type","button","aria-label","Scroll occasions right",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-subtle--primary","d-flex","align-items-center","justify-content-center",2,"position","absolute","right","4px","top","50%","transform","translateY(-50%)","z-index","2",3,"click"],["aria-hidden","true",1,"pds-svg-chevron-right","pds-icon-btn-subtle--primary__icon"],[1,"text-m","mb-2","pb-1"],["for","message",1,"d-block","mb-2"],["src","/erums/cart/dist/assets/json/ai_loading_neutral.json","background","transparent","speed","1","loop","","autoplay","",1,"position-absolute","gift-message-loader"],[1,"d-flex","align-items-center","my-2","tones-container"],["type","button","class","pds-icon-btn pds-icon-btn-size_small pds-icon-btn-subtle--primary d-flex align-items-center justify-content-center","style","position: absolute; left: 4px; top: 50%; transform: translateY(-50%); z-index: 2;","aria-label","Scroll tones left",3,"click",4,"ngIf"],[1,"x-scroll-container","flex-grow-1",3,"scroll"],["id","tone-chip-list","role","radiogroup","aria-label","Tone options",1,"x-chip-nav","d-flex","flex-row"],["src","/erums/cart/dist/assets/images/ai-sparkle-icon.svg","alt","AI-powered suggestion available",1,"svg-ai-logo-xy"],["class","pds-btn pds-btn-size__small pds-btn-filled--neutral d-flex align-items-center justify-content-center","type","button","role","radio","aria-checked","fal
1se","aria-posinset","1","aria-label","Undo","id","undo-button",3,"ngClass","click","keydown.arrowright","keydown.arrowleft",4,"ngIf"],["type","button","role","radio","aria-checked","false","aria-posinset","2","id","rephrase-button",1,"pds-btn","pds-btn-size__small","pds-btn-filled--neutral","d-flex","align-items-center","justify-content-center",3,"click","keydown.arrowright","keydown.arrowleft","disabled","ngClass"],["class","text-m-sb",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","class","pds-icon-btn pds-icon-btn-size_small pds-icon-btn-subtle--primary d-flex align-items-center justify-content-center","style","position: absolute; right: 4px; top: 50%; transform: translateY(-50%); z-index: 2;","aria-label","Scroll tones right",3,"click",4,"ngIf"],["type","button","aria-label","Scroll tones left",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-subtle--primary","d-flex","align-items-center","justify-content-center",2,"position","absolute","left","4px","top","50%","transform","translateY(-50%)","z-index","2",3,"click"],["type","button","role","radio","aria-checked","false","aria-posinset","1","aria-label","Undo","id","undo-button",1,"pds-btn","pds-btn-size__small","pds-btn-filled--neutral","d-flex","align-items-center","justify-content-center",3,"click","keydown.arrowright","keydown.arrowleft","ngClass"],["class","pr-2","src","/erums/cart/dist/assets/images/icons-ai-gift-undo.svg","alt","",4,"ngIf"],["src","/erums/cart/dist/assets/images/icons-ai-gift-undo.svg","alt","",1,"pr-2"],[1,"text-m-sb"],["type","button","role","radio","tabindex","-1",1,"pds-btn","pds-btn-size__small","pds-btn-filled--neutral","d-flex","align-items-center","justify-content-center","flex-shrink-0",3,"click","keyup.enter","focus","keydown.arrowright","keydown.arrowleft","ngClass","disabled","id"],["type","button","aria-label","Scroll tones right",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-subtle--primary","d-flex","align-items-center","justify-content-center",2,"position","absolute","right","4px","top","50%","transform","translateY(-50%)","z-index","2",3,"click"],[1,"gifting-bottom-message"],[1,"col-6","pl-0","pt-2","pr-0","order-0"],["role","button","tabindex","0","type","button",1,"color-primary-default","remove-gift-link",3,"click","keyup.enter","keydown.space","ngStyle"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader","ada-hide-mobile-focus"],["id","toNameError",3,"ngClass"],[1,"d-flex","align-items-start"],["class","pds_svg_warning_16","aria-hidden","true","style","flex: 0 0 auto;",4,"ngIf"],[1,"pl-1",3,"ngClass"],["aria-hidden","true",1,"pds_svg_warning_16",2,"flex","0 0 auto"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",2,"margin-top","-3px"],["fill","#b00000","fill-rule","evenodd","clip-rule","evenodd","d","M0.25 8C0.25 3.71979 3.71979 0.25 8 0.25C12.2802 0.25 15.75 3.71979 15.75 8C15.75 12.2802 12.2802 15.75 8 15.75C3.71979 15.75 0.25 12.2802 0.25 8ZM4.75 7C4.19772 7 3.75 7.44772 3.75 8C3.75 8.55229 4.19772 9 4.75 9H11.25C11.8023 9 12.25 8.55229 12.25 8C12.25 7.44772 11.8023 7 11.25 7H4.75Z","fill","#B00000"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",7)(1,"div",8)(2,"div",9),ph(3,vx,5,0,"ng-container",10),xf(),kf(4,"div",11)(5,"h2",12),am(6,"Make this order a gift"),xf()(),kf(7,"div",13),ph(8,wx,2,0,"span",14),xf()(),kf(9,"div",15)(10,"div",16)(11,"div",17),Tf(12,"img",18),xf()(),kf(13,"div",19)(14,"form",20),jf("ngSubmit",(function(){return Wa(e),Ha(t.onSubmit())})),kf(15,"div",21)(16,"div",22)(17,"label",23),am(18),kf(19,"span",24),am(20,"Required field"),xf(),ph(21,_x,2,0,"span",25),xf(),kf(22,"label",26),Tf(23,"input",27),kf(24,"span",28),am(25,"Recipient name (required)"),xf()(),kf(26,"div",29),ph(27,Tx,4,3,"ng-container",10),xf()()(),ph(28,qx,20,9,"ng-container",10),kf(29,"div")(30,"label",30),am(31),kf(32,"span",24),am(33,"Required field"),xf(),ph(34,$x,2,0,"span",25),xf(),kf(35,"label",31),Tf(36,"input",32),kf(37,"span",28),am(38,"Add a name (required)"),xf()(),kf(39,"div",33),ph(40,Kx,4,3,"ng-container",10),xf()(),ph(41,Qx,1,0,"hr",34)(42,rT,3,2,"ng-container",10),kf(43,"div",35)(44,"label",36),am(45),kf(46,"span",24),am(47,"Optional field not required"),xf()(),ph(48,sT,2,0,"p",37)(49,aT,2,0,"label",38),kf(50,"div",39)(51,"textarea",40,0),jf("keydown",(function(i){return Wa(e),Ha(t.restrictKeys(i))}
1)),xf(),ph(53,oT,1,0,"lottie-player",41),kf(54,"span",24),am(55,"Updating gift message"),xf(),kf(56,"span",42),am(57),xf(),ph(58,gT,13,11,"ng-container",10),xf(),kf(59,"span",43,1),am(61),xf(),kf(62,"span",44),am(63),xf(),kf(64,"div",45),ph(65,CT,4,3,"ng-container",10)(66,AT,2,4,"ng-container",10),xf()(),ph(67,kT,2,0,"p",46),kf(68,"div",47)(69,"div",48)(70,"button",49),am(71,"Save"),xf()(),ph(72,xT,3,1,"div",50),xf()()()()(),ph(73,TT,2,0,"ng-container",10)(74,DT,6,9,"ng-template",null,2,Wm)}2&e&&(Vd(3),zh("ngIf","minicart"===t.appName),Vd(5),zh("ngIf","cart"===t.appName||"edit-cart"===t.appName),Vd(6),zh("formGroup",t.giftForm),Vd(4),cm(" ",t.aiMessaging?"Who's this for?":"Sending gift to"," "),Vd(3),zh("ngIf",!t.giftingNewFlag),Vd(2),zh("ngClass",Om(36,Zk,(null==t.giftFormControls?null:t.giftFormControls.to.invalid)&&((null==t.giftFormControls?null:t.giftFormControls.to.dirty)||(null==t.giftFormControls?null:t.giftFormControls.to.touched)))),Vd(4),zh("ngIf",(null==t.giftFormControls?null:t.giftFormControls.to.invalid)&&((null==t.giftFormControls?null:t.giftFormControls.to.dirty)||(null==t.giftFormControls?null:t.giftFormControls.to.touched))),Vd(),zh("ngIf",t.giftingNewFlag),Vd(3),cm(" ",t.giftingNewFlag?"Who's this from?":"From"," "),Vd(3),zh("ngIf",!t.giftingNewFlag),Vd(2),zh("ngClass",Om(38,Zk,(null==t.giftFormControls?null:t.giftFormControls.from.invalid)&&((null==t.giftFormControls?null:t.giftFormControls.from.dirty)||(null==t.giftFormControls?null:t.giftFormControls.from.touched)))),Vd(4),zh("ngIf",(null==t.giftFormControls?null:t.giftFormControls.from.invalid)&&((null==t.giftFormControls?null:t.giftFormControls.from.dirty)||(null==t.giftFormControls?null:t.giftFormControls.from.touched))),Vd(),zh("ngIf",t.aiMessaging),Vd(),zh("ngIf",t.aiMessaging),Vd(3),cm(" ",t.giftingNewFlag?"Message":"Gift message (optional)"," "),Vd(3),zh("ngIf",t.giftingNewFlag),Vd(),zh("ngIf",!t.giftingNewFlag),Vd(),zh("ngClass",Om(40,Xk,t.aiMessaging)),gh("style","min-height:"+(t.aiMessaging?"162px":"88px"),td),Vd(),zh("ngClass",Rm(42,ex,t.giftFormControls.message.invali
1d,t.aiMessaging,!t.aiMessaging,t.formIsLoading&&t.aiMessaging))("readonly",t.formIsLoading),gh("aria-busy",t.formIsLoading?"true":"false"),Vd(2),zh("ngIf",t.formIsLoading&&t.aiMessaging),Vd(4),cm(" ",null!=t.giftFormControls&&null!=t.giftFormControls.message&&t.giftFormControls.message.value?"Message updated: "+(null==t.giftFormControls||null==t.giftFormControls.message?null:t.giftFormControls.message.value):""," "),Vd(),zh("ngIf",t.aiMessaging&&t.aiServicesAvailable),Vd(3),cm(" ",null==t.giftFormControls||null==t.giftFormControls.message?null:t.giftFormControls.message.value.length,"/140 "),Vd(2),cm(" ",(null==t.giftFormControls||null==t.giftFormControls.message||null==t.giftFormControls.message.value?null:t.giftFormControls.message.value.length)||0," out of 140 characters used "),Vd(2),zh("ngIf",t.giftFormControls.message.invalid&&(t.giftFormControls.message.dirty||t.giftFormControls.message.touched)),Vd(),zh("ngIf",t.hasAiApiError),Vd(),zh("ngIf",!t.giftingNewFlag),Vd(2),zh("ngClass",t.editFlag?"col-12":"col-6"),Vd(),zh("ngClass",Mm(47,tx,!(0!==(null==t.giftFormControls?null:t.giftFormControls.to.value.length)&&0!==(null==t.giftFormControls?null:t.giftFormControls.from.value.length)&&t.giftFormControls.from.valid&&t.giftFormControls.to.valid&&t.giftFormControls.message.valid&&t.giftFormControls.mobile.valid&&t.giftFormControls.email.valid),t.editFlag,!t.editFlag)),gh("aria-disabled",!(0!==(null==t.giftFormControls||null==t.giftFormControls.to||null==t.giftFormControls.to.value?null:t.giftFormControls.to.value.trim().length)&&0!==(null==t.giftFormControls||null==t.giftFormControls.from||null==t.giftFormControls.from.value?null:t.giftFormControls.from.value.trim().length)&&t.giftFormControls.from.valid&&t.giftFormControls.to.valid&&t.giftFormControls.message.valid&&t.giftFormControls.mobile.valid&&t.giftFormControls.email.valid))("disabled",0!==(null==t.giftFormControls||null==t.giftFormControls.to||null==t.giftFormControls.to.value?null:t.giftFormControls.to.value.trim().length)&&0!==(null==t.giftFormControls||null==t.giftFormControls.from||null==t.giftFormControls.from.value?null:t.giftFormControls.from.value.trim().length)&&t.giftFormControls.from.valid&&t.giftFormControls.to.valid&&t.giftFormControls.message.valid&&t.giftFormControls.mobile.valid&&t.giftFormControls.email.valid?null:"disabled"),Vd(2),zh("ngIf",!t.editFlag),Vd(),zh("ngIf",t.loadSpinner&&!t.aiMessaging))},dependencies:[DS,d_,$_,j_,sC,sy,oy,cy,by,gy,US,qS],styles:['.gift-side-btn[_ngcontent-%COMP%]{width:48px;min-width:48px}.gifting-submit[_ngcontent-%COMP%]{display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between}@media (max-width: 600px){.gifting-submit[_ngcontent-%COMP%]{flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between;gap:30px;padding-left:10px!important}.gifting-submit[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{min-width:0;flex:1 1 0;max-width:50%}.gifting-submit[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .gifting-submit[_ngcontent-%COMP%] .remove-gift-link[_ngcontent-%COMP%]{width:100%;white-space:nowrap}}.mt-n6[_ngcontent-%COMP%]{margin-top:-3.5rem!important}.header-label[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);text-align:center;font-family:var(--pds-global-font-family-poppins, Poppins);font-size:var(--pds-global-font-size-500-responsive, 22px);font-style:normal;font-weight:500;line-height:130%}.header-close[_ngcontent-%COMP%]{width:24px;height:24px;float:right;font-size:2em}.image-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex-shrink:0}.gift-circle[_ngcontent-%COMP%]{border-radius:99px;background-color:#faf5f0;height:140px;width:140px}.gift-image[_ngcontent-%COMP%]{position:relative;left:32%;top:26%}.remove-gift-link[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;background-color:#fff;border:none}.gift-label[_ngcontent-%COMP%]{margin:24px 0 4px!important}.ai-api-error[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-warning, #906700);display:block;width:212px;flex:1 1 auto}.gift-input[_ngcontent-%COMP%], .gift-input-message[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;gap:var(--pds-global-space-100, 4px);align-self:stretch;background:var(--pds-theme-color-background-baseline, #FFF)}.gift-input[_ngcontent-%COMP%]{height:var(--pds-global-size-height-min_h-1100, 56px);padding:27px 16px 7px}.gift-input-message[_ngcontent-%COMP%]{height:var(--pds-global-size-height-min_h-1100, 88px)!important;padding:var(--pds-global-space-200, 8px) var(--pds-global-space-400, 16px);border:1px solid var(--pds-theme-color-outline-neutral_high, #1F1E1E)!important;border-radius:8px;margin-bottom:4px}.gift-input-text[_ngcontent-%COMP%]{resize:none;height:100%!important}.ai-gift-input-message[_ngcontent-%COMP%]{height:162px!important}.gift-message-loader[_ngcontent-%COMP%]{top:16px;left:16px;width:24px;height:24px;z-index:10}.gift-message-loading[_ngcontent-%COMP%]{color:transparent;-webkit-text-fill-color:transparent;caret-color:transparent;text-shadow:none}.save-disable[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}.gift-remove-link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}.gift-back-link[_ngcontent-%COMP%]{cursor:pointer}.has-error[_ngcontent-%COMP%]{border:solid 2px #dd1e25!important}.gift-message-count[_ngcontent-%COMP%]{float:right;margin-right:16px;text-align:end;color:#6e6e6d}.gifting-bottom-message[_ngcontent-%COMP%]{font-family:Nunito Sans;font-weight:400;font-size:14px;line-height:20.3px;letter-spacing:0px;margin-top:20px}.sub-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}.gifting-container[_ngcontent-%COMP%]{overflow-y:auto;height:calc(100vh - 162px)}.gifting-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;z-index:10;background:#fff;box-shadow:0 2px 8px #0000000a;text-align:center}.gifting-body[_ngcontent-%COMP%]{margin-top:72px;overflow-y:auto;background:#fff}.gifting-divider-label[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-100, 12px);font-style:normal;font-weight:400;line-height:145%}.gifting-divider[_ngcontent-%COMP%]{border-bottom:1px solid #E5E4E3}.svg-ai-logo[_ngcontent-%COMP%]{display:inline-block;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfNzIpIj4KPGcgaWQ9Ikdyb3VwIDI2MDk5MTEiPgo8cGF0aCBkPSJNMTAuOTIyMSA3LjQ0NjMxQzcuODUzMjUgOC43NDQwOCA2LjgzMTM1IDEwLjA1MjQgNS44MTc0MyAxMy45ODAzQzUuNzM0MDEgMTQuMzAzMiA1LjM3NzI4IDE0LjMwMzIgNS4yOTM4NyAxMy45ODAzQzQuMjc5OTkgMTAuMDUyMiAzLjI1Nzg4IDguNzQ0MTMgMC4xODkyMTEgNy40NDYzMUMtMC4wNjMwNzA0IDcuMzM5NTQgLTAuMDYzMDcwNCA2Ljg4MjkyIDAuMTg5MjExIDYuNzc2MTZDMC4yNTgwNSA1LjQ3ODM5IDQuMjc5OTUgNC4xNzAwOCA1LjI5Mzg3IDAuMjQyMTlDNS4zNzcyOSAtMC4wODA3MzAxIDUuNzM0MDIgLTAuMDgwNzMwMSA1LjgxNzQzIDAuMjQyMTlDNi44MzEzMSA0LjE3MDMgNy44NTM0MyA1LjQ3ODM0I
1DEwLjkyMjEgNi43NzYxNkMxMS4xNzQ0IDYuODgyOTMgMTEuMTc0NCA3LjMzOTU1IDEwLjkyMjEgNy40NDYzMVoiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xXzcyKSIvPgo8cGF0aCBkPSJNMTQuNjIxMyAzLjg1MTYyQzEzLjg4NDggNC4xMzU1MSAxMy42Mzk1IDQuNDIxNyAxMy4zOTYyIDUuMjgwOTNDMTMuMzc2MiA1LjM1MTU3IDEzLjI5MDUgNS4zNTE1NyAxMy4yNzA1IDUuMjgwOTNDMTMuMDI3MiA0LjQyMTY1IDEyLjc4MTkgNC4xMzU1MiAxMi4wNDU0IDMuODUxNjJDMTEuOTg0OSAzLjgyODI3IDExLjk4NDkgMy43MjgzOCAxMi4wNDU0IDMuNzA1MDNDMTIuNzgxOSAzLjQyMTE0IDEzLjAyNzIgMy4xMzQ5NSAxMy4yNzA1IDIuMjc1NzJDMTMuMjkwNSAyLjIwNTA4IDEzLjM3NjIgMi4yMDUwOCAxMy4zOTYyIDIuMjc1NzJDMTMuNjM5NSAzLjEzNSAxMy44ODQ4IDMuNDIxMTMgMTQuNjIxMyAzLjcwNTAzQzE0LjY4MTggMy43MjgzOCAxNC42ODE4IDMuODI4MjcgMTQuNjIxMyAzLjg1MTYyWiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzFfNzIpIi8+CjxwYXRoIGQ9Ik0xNS43NDI2IDEyLjU5MDhDMTQuMjY5NiAxMy4xNTg1IDEzLjc3OSAxMy43MzA5IDEzLjI5MjQgMTUuNDQ5NEMxMy4yNTIzIDE1LjU5MDcgMTMuMDgxMSAxNS41OTA3IDEzLjA0MTEgMTUuNDQ5NEMxMi41NTQ0IDEzLjczMDggMTIuMDYzOCAxMy4xNTg2IDEwLjU5MDggMTIuNTkwOEMxMC40Njk3IDEyLjU0NDEgMTAuNDY5NyAxMi4zNDQzIDEwLjU5MDggMTIuMjk3NkMxMi4wNjM5IDExLjcyOTggMTIuNTU0NCAxMS4xNTc0IDEzLjA0MTEgOS40Mzg5N0MxMy4wODExIDkuMjk3NjkgMTMuMjUyMyA5LjI5NzY5IDEzLjI5MjQgOS40Mzg5N0MxMy43NzkgMTEuMTU3NSAxNC4yNjk2IDExLjcyOTggMTUuNzQyNiAxMi4yOTc2QzE1Ljg2MzcgMTIuMzQ0MyAxNS44NjM3IDEyLjU0NDEgMTUuNzQyNiAxMi41OTA4WiIgZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzFfNzIpIi8+CjwvZz4KPC9nPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzFfNzIiIHgxPSIwLjQ2NTg4NSIgeTE9IjEuMTE1NTEiIHgyPSIxMC45MzYyIiB5Mj0iOS4wMzg5OCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjQTUwQjRGIi8+CjxzdG9wIG9mZnNldD0iMC4zNyIgc3RvcC1jb2xvcj0iI0E5MjY5NiIvPgo8c3RvcCBvZmZzZXQ9IjAuNjU1IiBzdG9wLWNvbG9yPSIjRjE1NzIyIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTQzMiIvPgo8L2xpbmVhckdyYWRpZW50Pgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMV83MiIgeDE9IjEyLjExMTgiIHkxPSIyLjQ2Njc2IiB4Mj0iMTQuNDUxMSIgeTI9IjQuNDA5MDQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0E1MEI0RiIvPgo8c3RvcCBvZmZzZXQ9IjAuMzciIHN0b3AtY29sb3I9IiNBOTI2OTYiLz4KPHN0b3Agb2Zmc2V0PSIwLjY1NSIgc3RvcC1jb2xvcj0iI0YxNTcyMiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk0MzIiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzFfNzIiIHgxPSIxMC43MjM2IiB5MT0iOS44MjEwNCIgeDI9IjE1LjQwMjMiIHkyPSIxMy43MDU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNBNTBCNEYiLz4KPHN0b3Agb2Zmc2V0PSIwLjM3IiBzdG9wLWNvbG9yPSIjQTkyNjk2Ii8+CjxzdG9wIG9mZnNldD0iMC42NTUiIHN0b3AtY29sb3I9IiNGMTU3MjIiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5NDMyIi8+CjwvbGluZWFyR3JhZGllbnQ+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMV83MiI+CjxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0id2hpdGUiLz4KPC9jbGlwUGF0aD4KPC9kZWZzPgo8L3N2Zz4K);background-size:contain;background-repeat:no-repeat;background-position:center;aspect-ratio:1/1}.svg-ai-logo-xy[_ngcontent-%COMP%]{width:16px;height:16px;margin-top:6px}@media (max-width: 600px){.gifting-header[_ngcontent-%COMP%]{position:fixed}.gifting-body[_ngcontent-%COMP%]{margin-top:70px;max-height:calc(100vh - 400px)}}@media (min-width: 320px) and (max-width: 479px){.gifting-container[_ngcontent-%COMP%]{overflow-y:scroll;height:calc(100vh - 120px)}}@media (min-width: 480px) and (max-width: 991px){.gifting-container[_ngcontent-%COMP%]{overflow-y:scroll;height:calc(100vh - 120px)}}@media (max-width: 400px){.gifting-body[_ngcontent-%COMP%], .gifting-header[_ngcontent-%COMP%]{width:100vw!important;min-width:0!important;max-width:100vw!important;overflow-x:hidden!important}.gifting-container[_ngcontent-%COMP%]{overflow-y:scroll}.gifting-body[_ngcontent-%COMP%]{margin-top:90px!important;max-height:none}.header-label[_ngcontent-%COMP%], .gift-label[_ngcontent-%COMP%], .gifting-bottom-message[_ngcontent-%COMP%]{font-size:1.1em!important;word-break:break-word!important}.gift-input[_ngcontent-%COMP%], .gift-input-message[_ngcontent-%COMP%]{width:100%!important;min-width:0!important;box-sizing:border-box!important}}.gift-float-label[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_low, #6E6E6D)!important}#message[_ngcontent-%COMP%]:focus{outline:none!important;box-shadow:none!important}#message[_ngcontent-%COMP%]{border:none!important}.x-scroll-container[_ngcontent-%COMP%]{min-width:0;overflow-x:auto;overflow-y:visible;white-space:nowrap;padding:4px 0;-ms-overflow-style:none;scrollbar-width:none}.x-scroll-container[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.x-chip-nav[_ngcontent-%COMP%]{gap:8px;padding:2px 0}.x-chip-nav[_ngcontent-%COMP%] .pds-btn.pds-btn-size__small[_ngcontent-%COMP%]{width:fit-content}#occasion-chip-list[_ngcontent-%COMP%]:after, #tone-chip-list[_ngcontent-%COMP%]:after{content:"";flex:0 0 44px}.x-chip-nav[_ngcontent-%COMP%] .pds-btn[_ngcontent-%COMP%]:focus, .x-chip-nav[_ngcontent-%COMP%] .pds-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--pds-theme-color-outline-neutral_high, #1F1E1E);outline-offset:2px;z-index:1;position:relative}.ai-text-area[_ngcontent-%COMP%]{width:100%;min-height:88px;display:flex;align-items:center;gap:var(--pds-global-space-100, 4px);align-self:stretch;border:none!important;background:var(--pds-theme-color-background-baseline, #FFF);padding:var(--pds-global-space-200, 8px) var(--pds-global-space-400, 16px);resize:none;border-top-color:transparent;border-right-color:transparent;border-left-color:transparent}.ai-text-area[_ngcontent-%COMP%]:disabled{background:var(--pds-theme-color-background-baseline, #FFF)!important}.non-ai-text-area[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;align-items:center;align-self:stretch;border-color:transparent;background:var(--pds-theme-color-background-baseline, #FFF);resize:none}.x-scroll-container.shimmer[_ngcontent-%COMP%]{position:relative;overflow:hidden;
1background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0,#f0f0f0 75%);background-size:200% 100%;animation:_ngcontent-%COMP%_shimmer 1.5s infinite;border-radius:8px;min-height:40px}.x-scroll-container.shimmer[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);animation:_ngcontent-%COMP%_shimmer-wave 1.5s infinite}.x-scroll-container.shimmer[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{visibility:hidden}@keyframes _ngcontent-%COMP%_shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes _ngcontent-%COMP%_shimmer-wave{0%{transform:translate(-100%)}to{transform:translate(100%)}}.gifting-ai-button-loading[_ngcontent-%COMP%]{display:block;width:100%!important;height:32px!important;min-width:100%!important;border-radius:inherit}.gifting-occasion-loading-wrapper[_ngcontent-%COMP%]{display:inline-block;height:32px;border-radius:8px;min-width:32px}.gifting-tone-loading[_ngcontent-%COMP%]{display:block;border-radius:50px;height:32px}#rephrase-button[_ngcontent-%COMP%], #undo-button[_ngcontent-%COMP%]{width:90px!important;height:32px!important;min-width:90px!important}.ai-divider-line[_ngcontent-%COMP%]{border-top:2px solid var(--pds-theme-color-background-neutral_low, #F0EEED);border-bottom:2px solid var(--pds-theme-color-background-neutral_low, #F0EEED);background:var(--pds-theme-color-background-neutral_low, #F0EEED);margin:24px 0!important}.tones-container[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;z-index:2;left:16px}']})}}return e})(),BT=e=>({"selective-cart-text":e});function MT(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),cm(" (",e.qty,")")}}function RT(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"currency"),xf()),2&e){let e=Yf().$implicit;Vd(),cm(" (+",jm(2,1,null==e?null:e.extendedPrice,"USD"),")")}}function LT(e,t){1&e&&(kf(0,"span",18),am(1," Out of stock"),xf())}function FT(e,t){1&e&&(kf(0,"span"),am(1,", "),xf())}function NT(e,t){if(1&e&&(Ef(0,14),kf(1,"span",15),am(2),ph(3,MT,2,1,"span",16)(4,RT,3,4,"span",16)(5,LT,2,0,"span",17),xf(),ph(6,FT,2,0,"span",16),Df()),2&e){let e=t.$implicit,i=t.last;Vd(),zh("ngClass",e.isAvailable?"":"OOSItem"),Vd(),cm(" ",e.name,""),Vd(),zh("ngIf",(null==e?null:e.qty)>1),Vd(),zh("ngIf",e.extendedPrice>0),Vd(),zh("ngIf",!e.isAvailable),Vd(),zh("ngIf",!i)}}function UT(e,t){if(1&e&&(Ef(0),kf(1,"div")(2,"span",11),am(3),xf(),kf(4,"span",12),ph(5,NT,7,6,"ng-container",13),xf()(),Df()),2&e){let e=t.$implicit;Vd(3),cm("",e.key,":"),Vd(2),zh("ngForOf",e.value)}}function VT(e,t){if(1&e&&(kf(0,"span",9)(1,"span",11),am(2,"Preferences: "),xf(),kf(3,"span",12),am(4),xf()()),2&e){let e=Yf(4);Vd(4),cm(" ",null==e.cartItem?null:e.cartItem.comments,"")}}function qT(e,t){if(1&e&&(kf(0,"div",9),ph(1,UT,6,2,"ng-container",10),qm(2,"keyvalue"),ph(3,VT,5,1,"span",8),xf()),2&e){let e=Yf(3);Vd(),zh("ngForOf",jm(2,2,e.groupedCustomizations,e.keepOriginalOrder)),Vd(2),zh("ngIf",null==e.cartItem?null:e.cartItem.comments)}}function $T(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",5),jf("click",(function(){return Wa(e),Ha(Yf(2).toggleAccordion())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(2).toggleAccordion())}))("keydown.space",(function(t){return Wa(e),Yf(2).toggleAccordion(),Ha(t.preventDefault())})),kf(2,"span",6),am(3," Customizations "),xf(),Tf(4,"span",7),xf(),ph(5,qT,4,5,"div",8),Df()}if(2&e){let e=Yf(2);Vd(),gh("aria-expanded",e.isOpen)("aria-label","Customizations for "+e.cartItem.name),Vd(),zh("ngClass",Om(5,BT,e.selectiveCartMode)),Vd(2),zh("ngClass",e.isOpen?"svg-caret-expand-md":"svg-caret-collapse-md"),Vd(),zh("ngIf",e.shouldShowContent())}}function jT(e,t){1&e&&(kf(0,"div")(1,"span",19),Tf(2,"span",20),am(3,"Only sandwich slice available"),xf()())}function zT(e,t){if(1&e&&(kf(0,"span",9)(1,"span",11),am(2,"Preferences: "),xf(),kf(3,"span",12),am(4),xf()()),2&e){let e=Yf(5);Vd(4),cm(" ",null==e.cartItem?null:e.cartItem.comments,"")}}function WT(e,t){if(1&e&&(kf(0,"div")(1,"div",11),am(2),kf(3,"span",14),am(4),xf()(),ph(5,zT,5,1,"span",8),xf()),2&e){let e=t.$implicit,i=Yf(4);
1Vd(2),cm("",e.key,": "),Vd(2),lm(i.getOptionNames(e.value)),Vd(),zh("ngIf",null==i.cartItem?null:i.cartItem.comments)}}function HT(e,t){if(1&e&&(ph(0,WT,6,3,"div",10),qm(1,"keyvalue")),2&e){zh("ngForOf",$m(1,1,Yf(3).groupedCustomizations))}}function YT(e,t){if(1&e&&ph(0,jT,4,0,"div",4)(1,HT,2,3,"ng-template",null,1,Wm),2&e){let e=sm(2);zh("ngIf",Yf(2).cartItem.isCustomizationLimited)("ngIfElse",e)}}function GT(e,t){if(1&e&&(kf(0,"div",3),ph(1,$T,6,7,"ng-container",4)(2,YT,3,2,"ng-template",null,0,Wm),xf()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf",null==t.cartItem?null:t.cartItem.multiCustomizations)("ngIfElse",e)}}var KT,QT=(()=>{class e{constructor(e){this.substitutionService=e,this.isOpen=!1,this.keepOriginalOrder=(e,t)=>0}ngOnInit(){this.updateGroupedCustomizations()}toggleAccordion(){this.isOpen=!this.isOpen}shouldShowContent(){return this.isOpen&&this.cartItem.isCustomizable}get groupedCustomizations(){return this.groupedCustomizationObject}updateGroupedCustomizations(){this.cartItem&&this.cartItem.options?this.groupedCustomizationObject=this.groupByType(this.cartItem.options):this.groupedCustomizationObject=new Map}groupByType(e){let t=new Map;return e.forEach((e=>{let i=e.type;t.has(i)||t.set(i,[]),t.get(i)?.push(e)})),t}getOptionNames(e){return e?.map((e=>e.name)).join(", ")}getPrimaryColor(){if(this.selectiveCartMode)return this.substitutionService.getPrimaryColor(this.banner)}static{this.ɵfac=function(t){return new(t||e)($d(fC))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-mto"]],inputs:{cartItem:"cartItem",selectiveCartMode:"selectiveCartMode",banner:"banner"},decls:1,vars:1,consts:[["singleCustomization",""],["customizationAvailable",""],["class","mto-accordion",4,"ngIf"],[1,"mto-accordion"],[4,"ngIf","ngIfElse"],["tabindex","0","role","button",1,"accordion-header",3,"click","keydown.enter","keydown.space"],["aria-hidden","true",1,"fw-600","color-primary-default",3,"ngClass"],["aria-hidden","true",3,"ngClass"],["class","accordion-content",4,"ngIf"],[1,"accordion-content"],[4,"ngFor","ngForOf"],[1,"customization-item"],[1,"customization-options"],["class","single-option",4,"ngFor","ngForOf"],[1,"single-option"],[3,"ngClass"],[4,"ngIf"],["class","OOSText",4,"ngIf"],[1,"OOSText"],[1,"limited-customization-message","d-flex"],["role","img","aria-label","Information icon",1,"svg-info-filled","info-icon-filled"]],template:function(e,t){1&e&&ph(0,GT,4,2,"div",2),2&e&&zh("ngIf",null==t.cartItem?null:t.cartItem.isCustomizable)},dependencies:[sy,oy,cy,By,Ey],styles:['.mto-accordion[_ngcontent-%COMP%]{border:none;border-radius:4px;margin-bottom:10px}.accordion-header[_ngcontent-%COMP%]{padding-bottom:5px;cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;gap:4px}.accordion-text[_ngcontent-%COMP%]{font-weight:600!important;color:var(--pds-theme-color-foreground-neutral_medium, #4B4B49);margin-right:4px}.chevron[_ngcontent-%COMP%]{width:13px;height:7px;filter:invert(17%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(96%) contrast(91%);transition:transform .3s ease;color:var(--pds/theme/color/foreground/neutral_high, #1F1E1E)}.limited-customization-message[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-info, #2D5A7A)}.customization-list[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:0 0 0 10px}.customization-item[_ngcontent-%COMP%]{font-family:pds/global/font/family/nunito_sans;font-weight:400;font-size:pds/global/font/size/200;line-height:145%;letter-spacing:0%}.customization-options[_ngcontent-%COMP%]{font-weight:600}.single-option[_ngcontent-%COMP%]{font-family:pds/global/font/family/nunito_sans;font-weight:400;font-size:pds/global/font/size/200;line-height:145%;letter-spacing:0%}.OOSText[_ngcontent-%COMP%]{color:#b00000;font-weight:700}.OOSItem[_ngcontent-%COMP%]{color:#b00000}.sr-hw[_ngcontent-%COMP%]{margin-bottom:15px}.info-icon-filled[_ngcontent-%COMP%]{vertical-align:middle;margin-right:4px;background-color:#2d5a7a!important}.selective-cart-text[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-primary);text-align:center;font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-100, 12px);font-style:normal;font-weight:600;line-height:145%}']})}}return e})(),JT=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[fC,{provide:"environment",useValue:hC}],imports:[uC,Ly,pC]})}}return e})(),ZT={schedule(e,t){let i=setTimeout(e,t);return()=>clearTimeout(i)},scheduleBeforeRender(e){if(typeof window>"u")return ZT.schedule(e,0);if(typeof window.requestAnimationFrame>"u")return ZT.schedule(e,16);let t=window.requestAnimationFrame(e);return()=>window.cancelAnimationFrame(t)}};function XT(e,t,i){let n=i;return function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE}(e)&&t.some(((t,i)=>!("*"===t||!function(e,t){if(!KT){let e=Element.prototype;KT=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}
1return e.nodeType===Node.ELEMENT_NODE&&KT.call(e,t)}(e,t))&&(n=i,!0))),n}var eP=class{constructor(e,t){this.componentFactory=t.get(lp).resolveComponentFactory(e)}create(e){return new tP(this.componentFactory,e)}},tP=class{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new Et(1),this.events=this.eventEmitters.pipe(dn((e=>Vi(...e)))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map((({propName:e})=>e))),this.ngZone=this.injector.get(Tl),this.elementZone=typeof Zone>"u"?null:this.ngZone.run((()=>Zone.current))}connect(e){this.runInZone((()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(e)}))}disconnect(){this.runInZone((()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=ZT.schedule((()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)}),10))}))}getInputValue(e){return this.runInZone((()=>null===this.componentRef?this.initialInputValues.get(e):this.componentRef.instance[e]))}setInputValue(e,t,i){this.runInZone((()=>{i&&(t=i.call(this.componentRef?.instance,t)),null!==this.componentRef?function(e,t){return e===t||e!=e&&t!=t}(t,this.getInputValue(e))&&(void 0!==t||!this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t)}))}initializeComponent(e){let t=fl.create({providers:[],parent:this.injector}),i=function(e,t){let i=e.childNodes,n=t.map((()=>[])),r=-1;t.some(((e,t)=>"*"===e&&(r=t,!0)));for(let e=0,s=i.length;e<s;++e){let s=i[e],a=XT(s,t,r);-1!==a&&n[a].push(s)}return n}(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,i,e),this.viewChangeDetectorRef=this.componentRef.injector.get(kg),this.implementsOnChanges=function(e){return"function"==typeof e}(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(sg).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach((({propName:e,transform:t})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e),t)})),this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map((({propName:t,templateName:i})=>e.instance[t].pipe(bi((e=>({name:i,value:e}))))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||null===this.inputChanges)return;let t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=ZT.scheduleBeforeRender((()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()})))}recordInputChange(e,t){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});let i=this.inputChanges[e];if(i)return void(i.currentValue=t);let n=this.unchangedInputs.has(e),r=n?void 0:this.getInputValue(e);this.inputChanges[e]=new fa(r,t,n)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},iP=class extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}};function nP(e,t){let i=function(e,t){return t.get(lp).resolveComponentFactory(e).inputs}(e,t.injector),n=t.strategyFactory||new eP(e,t.injector),r=function(e){let t={};return e.forEach((({propName:e,templateName:i,transform:n})=>{t[function(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}(i)]=[e,n]})),t}(i);class s extends iP{static{this.observedAttributes=Object.keys(r)}
1get ngElementStrategy(){if(!this._ngElementStrategy){let e=this._ngElementStrategy=n.create(this.injector||t.injector);i.forEach((({propName:t,transform:i})=>{if(!this.hasOwnProperty(t))return;let n=this[t];delete this[t],e.setInputValue(t,n,i)}))}return this._ngElementStrategy}constructor(e){super(),this.injector=e}attributeChangedCallback(e,t,i,n){let[s,a]=r[e];this.ngElementStrategy.setInputValue(s,i,a)}connectedCallback(){let e=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),e=!0),this.ngElementStrategy.connect(this),e||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe((e=>{let t=new CustomEvent(e.name,{detail:e.value});this.dispatchEvent(t)}))}}return i.forEach((({propName:e,transform:t})=>{Object.defineProperty(s.prototype,e,{get(){return this.ngElementStrategy.getInputValue(e)},set(i){this.ngElementStrategy.setInputValue(e,i,t)},configurable:!0,enumerable:!0})})),s}var rP=(()=>{class e{constructor(){this.searchSource=new Tt(""),this.currentSearch=this.searchSource.asObservable(),this.filterSearchParamSource=new Tt(""),this.currentFilterSearch=this.filterSearchParamSource.asObservable()}addSearchParam(e){this.filterSearchParamSource.next(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),sP=(()=>{class e{constructor(){this.couponCategorySource=new Tt([]),this.currentCouponCategory=this.couponCategorySource.asObservable(),this.couponEventSource=new Tt([]),this.currentCouponEvent=this.couponEventSource.asObservable(),this.couponOfferTypeSource=new Tt([]),this.currentCouponOfferType=this.couponOfferTypeSource.asObservable(),this.couponAisleTypeSource=new Tt([]),this.currentCouponAisleType=this.couponAisleTypeSource.asObservable(),this.filterCategoryParamSource=new Tt(""),this.currentFilterCategory=this.filterCategoryParamSource.asObservable(),this.filterEventParamSource=new Tt(""),this.currentFilterEvent=this.filterEventParamSource.asObservable(),this.filterOfferTypeParamSource=new Tt(""),this.currentFilterOfferType=this.filterOfferTypeParamSource.asObservable(),this.filterAisleTypeParamSource=new Tt(""),this.currentFilterAisleType=this.filterAisleTypeParamSource.asObservable(),this.addFilterSource=new Tt(""),this.currentFilterAdded=this.addFilterSource.asObservable(),this.addAllFilters=new Tt(!1),this.offerTypeFilterCounter=new Tt(0),this.currentOfferTypeFilterCounter=this.offerTypeFilterCounter.asObservable(),this.categoryFilterCounter=new Tt(0),this.currentCategoryFilterCounter=this.categoryFilterCounter.asObservable(),this.eventsFilterCounter=new Tt(0),this.currentEventsFilterCounter=this.eventsFilterCounter.asObservable(),this.couponFiltersAction=new Tt({type:"",action:"",value:""}),this.currentCouponFiltersAction=this.couponFiltersAction.asObservable(),this.isClearAllClicked=new Tt(!1),this.currentStatusOfIsClearAllClicked=this.isClearAllClicked.asObservable(),this.areFiltersDisplayed=new Tt(!1),this.currentFiltersDisplayedStatus=this.areFiltersDisplayed.asObservable(),this._couponCategories=[],this._couponEvents=[],this._couponOfferTypes=[],this._couponAisleTypes=[]}setFiltersAction(e){this.couponFiltersAction.next(h({},e))}addCouponCategory(e){let t=encodeURIComponent(e);if(0==this.isExist(this._couponCategories,t).length){let i={query:t,text:e};this._couponCategories.push(i),this.couponCategorySource.next(this._couponCategories)}}addCouponEvent(e){let t="";if(t=encodeURIComponent(e),0==this.isExist(this._couponEvents,t).length){let i={query:t,text:e};this._couponEvents.push(i),this.couponEventSource.next(this._couponEvents)}}addCouponOfferType(e){let t=encodeURIComponent(e);if(0==this.isExist(this._couponOfferTypes,t).length){let i={query:t,text:e};this._couponOfferTypes.push(i),this.couponOfferTypeSource.next(this._couponOfferTypes)}}addCouponAisleType(e){let t=encodeURIComponent(e);
1if(0==this.isExist(this._couponAisleTypes,t).length){let i={query:t,text:e};this._couponAisleTypes.push(i),this.couponAisleTypeSource.next(this._couponAisleTypes)}}isExist(e,t){return e.filter((function(e){return e.query.toLowerCase().indexOf(t.toLowerCase())>-1}))}addFilterCategoryParam(e){this.filterCategoryParamSource.next(e)}addFilterEventParam(e){this.filterEventParamSource.next(e)}addFilterOfferTypeParam(e){this.filterOfferTypeParamSource.next(e)}addFilterAisleTypeParam(e){this.filterAisleTypeParamSource.next(e)}countCategoryFilters(e){this.categoryFilterCounter.next(e)}countEventsFilters(e){this.eventsFilterCounter.next(e)}countOfferTypeFilters(e){this.offerTypeFilterCounter.next(e)}applyFilter(e){this.addFilterSource.next(e)}applyFilterAll(){this.addAllFilters.next(!0)}clearAllFilters(){event.stopPropagation(),window.history.replaceState({},null,window.location.pathname),window.location.reload()}resetAllFilters(){window.history.replaceState({},null,window.location.pathname),this.isClearAllClicked.next(!0),setTimeout((()=>this.isClearAllClicked.next(!1)),1e3)}setFilterDisplayValue(){this.areFiltersDisplayed.next(!0),setTimeout((()=>this.areFiltersDisplayed.next(!1)),100)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),aP=(()=>{class e{constructor(e,t){this._searchService=e,this._couponFilterService=t,this.currentSearch="",this.queryParam="",this.queryDelimiter="&",this.showDropdownOnLoad=!0,this.COMMON=window.AB.COMMON,e.currentSearch.subscribe((e=>{this.searchFilter=e})),e.currentFilterSearch.subscribe((e=>this.currentSearch=e));let i=window.location.search;console.log("Search Parameter: ",this.COMMON.getURLParameterByName("search")),""!=this.COMMON.getURLParameterByName("search")&&(i=this.COMMON.removeURLParameterByName(i,"search"),this.queryParam=""),i=i.replace("?",""),this.queryParam=i,this.queryDelimiter=""!=this.queryParam?"&":"",window.innerWidth<768&&(this.showDropdownOnLoad=!1)}onKeyPress(e,t,i,n){let r="?"+e+t+"search="+i;""==i||null==i?(window.location.search=this.COMMON.removeURLParameterByName(window.location.search,"search"),window.history.pushState({},null,window.location.search)):window.history.pushState({},null,r),this._couponFilterService.applyFilter("search")}static{this.ɵfac=function(t){return new(t||e)($d(rP),$d(sP))}}static{this.ɵcmp=Qr({type:e,selectors:[["search-component"]],decls:4,vars:1,consts:[[1,"search-wrapper"],[1,"search-container"],["type","text","placeholder","Search Products","id","search-img","aria-label","Search",1,"form-control","input-search",3,"ngModelChange","keyup.enter","ngModel"],[1,"svg-icon","search-icon","svg-icon-Search"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"input",2),mm("ngModelChange",(function(e){return fm(t.searchFilter,e)||(t.searchFilter=e),e})),jf("keyup.enter",(function(e){return t.onKeyPress(t.queryParam,t.queryDelimiter,t.searchFilter,e)})),xf(),Tf(3,"span",3),xf()()),2&e&&(Vd(2),hm("ngModel",t.searchFilter))},dependencies:[d_,$_,ES],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),oP=y(C()),lP=class{constructor(e){Object.assign(this,e)}},cP=class{constructor(e){Object.assign(this,e)}},dP=(()=>{class e{constructor(e){this._http=e}getGeneralMillsId(){let e={headers:new jy(window.AB.preUcaHttpOptions)};return this._http.get(window.AB.COMMON.ucaAPIPathWithCustomerId(window.AB.loyaltyPartnersPath),e)}newGetGeneralMillsId(e){let t={headers:new jy(window.AB.ucaHttpOptionsLoyaltyPartners)},i=window.AB.loyaltyPartnerPath.replace("{uuid}",e);return this._http.get(i,t)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),uP=(()=>{class e{constructor(){}getFeatureFlagBase(){return window.SWY?.CONFIGSERVICE?.featureToggleConfig}enablePlansV3(){return!!this.getFeatureFlagBase()?.enablePlansV3}getHeaderElement(){return $(".main-wrapper.www-wrapper")}getPageAttribute(e){return this.getHeaderElement().attr(e)}hasPageV2Theme(){let e=!1;return"true"===this.getPageAttribute("data-enablev2theme")&&(e=!0),e}disableMulticlipRewardGallery(){return!1!==this.getFeatureFlagBase()?.disableMulticlipRewardGallery}getFeatureFlagByNameDisable(e){let t=h({},this.getFeatureFlagBase());return!0===(t[e]&&t[e])}
1disableToastmessageRewardPage(){return!1!==this.getFeatureFlagBase()?.disableToastmessageRewardPage}enableNewRewardModalBtnUI(){return!0===this.getFeatureFlagBase()?.enableNewRewardModalBtnUI}enableCashReward(){return!0===this.getFeatureFlagBase()?.enableCashReward}enableRewardHistoryV2(){return!0===this.getFeatureFlagBase()?.rewardHistoryV2}enablePointsHistory(){return!0===this.getFeatureFlagBase()?.enablePointsHistory}disableBiaLpExcludeCart(){return!0===this.getFeatureFlagBase()?.disableBiaLpExcludeCart}disableEconReceiptURL(){return!0===this.getFeatureFlagBase()?.disableEconReceiptURL}enableLoyaltyCardCarousel(){return!0}isVncDeepLinkDisabled(){return!0!==this.getFeatureFlagBase()?.isVncDeepLinkDisabled}isWeeklyAdPznEnable(){return!0!==this.getFeatureFlagBase()?.disableWeeklyAdPznPage}isSearchRecipesEnabled(){return!0===this.getFeatureFlagBase()?.isSearchRecipesEnabled}isGlobalDealSearchIntentEnabled(){return!0===this.getFeatureFlagBase()?.globalDealSearchIntent}disableDynamicFilters(){return!1!==this.getFeatureFlagBase()?.disableDynamicFilters}disableConversationalSearch(){return!1!==this.getFeatureFlagBase()?.disableConversationalSearch}enableNextPageToken(){return!0===this.getFeatureFlagBase()?.enableNextPageToken}disableSearchScrollToTop(){return!1!==this.getFeatureFlagBase()?.disableSearchScrollToTop}disableMerchBannerV2(){return!1!==this.getFeatureFlagBase()?.disableMerchBannerV2}isSincerelyHealthEnabled(){return!0===this.getFeatureFlagBase()?.enableSincerelyHealth}isFeatureEnabled(e){return!0===this.getFeatureFlagBase()?.[e]}enableMarketingCardInDealsCarousel(){return!0===this.getFeatureFlagBase()?.enableMarketingCardInDealsCarousel}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function pP(){return window}var hP=(()=>{class e{constructor(e,t,i,n,r){this.http=e,this.objBoxTop=i,this.featureFlagService=n,this._aemSevice=r,this.rewardGridPath="/content/www/{banner}/en/justforyou/rewards/rewards-details",this._arrPromoRule=[],this.objPageCoupons={offers:{},offersByUpc:{}},this.shopCouponRefreshSource=new Tt(!1),this.shopCouponRefresh=this.shopCouponRefreshSource.asObservable(),this.rewardsRefreshSource=new kt,this.rewardsRefresh=this.rewardsRefreshSource.asObservable(),this.pointsRewardsRefreshSource=new Tt(null),this.pointsRewardsRefresh=this.pointsRewardsRefreshSource.asObservable(),this.rewardsModalRefreshSource=new kt,this.rewardsModalRefresh=this.rewardsModalRefreshSource.asObservable(),this.postUserInfoSource=new kt,this.userInfoRefresh=this.postUserInfoSource.asObservable(),this._postUserInfoSource=new Tt(""),this._userInfoRefresh=this._postUserInfoSource.asObservable(),this.manualBootstrapSource=new kt,this.manualBootstrap=this.manualBootstrapSource.asObservable(),this.hideStepperButtons=new kt,this.$hide
1StepperButtons=this.hideStepperButtons.asObservable(),this.rightDrawerSource=new kt,this.$rightDrawerSource=this.rightDrawerSource.asObservable(),this.offerDetailAccordionSource=new kt,this.$offerDetailAccordionSource=this.offerDetailAccordionSource.asObservable(),this.upcs=new kt,this.$upcs=this.upcs.asObservable(),this.arSubscriptions=new Tt(null),this.$arSubscriptions=this.arSubscriptions.asObservable(),this.crossSellTargetSource=new kt,this.$crossSellTarget=this.crossSellTargetSource.asObservable(),this.crossSellCloseSource=new kt,this.$crossSellClose=this.crossSellCloseSource.asObservable(),this._validateSession=new Tt({}),this.validateSession$=this._validateSession.asObservable(),this._updateBiaAddAllBtn=new kt,this.updateBiaAddAllBtn$=this._updateBiaAddAllBtn.asObservable(),this._products=new Tt(null),this.products$=this._products.asObservable(),this.disableAllButtons=new kt,this.disableAllButtonsObservable=this.disableAllButtons.asObservable(),this.isAbTestEotFlag=new Tt(!1),this.isAbTestEotFlagObserable=this.isAbTestEotFlag.asObservable(),this._toasterInteractiveElement=new Tt(!1),this.$refreshCashRewardSection=new Tt(!1),this.pintsRewardsRefreshSource=new Tt(null),this.pintsRewardsRefresh=this.pintsRewardsRefreshSource.asObservable(),this.$updateGalleryRefreshSource=new Tt(null),this.$updateGalleryRefresh=this.$updateGalleryRefreshSource.asObservable(),this._updateSearchCrossSell=new kt,this.updateSearchCrossSell$=this._updateSearchCrossSell.asObservable(),this.shelfId=new kt,this.shelfId$=this.shelfId.asObservable(),this.initManualBootstrap=function(e){e&&e.hasOwnProperty("manualComponentId")&&this.manualBootstrapSource.next(e)},this.checkBoxTopRegistered=function(){window.AB.COMMON.authorize()&&this.userInfoRefresh.subscribe((e=>{if("initFunc"==e&&window.AB.COMMON.authorize()&&!window.AB.userInfo.boxTopCalled)if(window.AB.userInfo.boxTopCalled=!0,localStorage.getItem("loyaltyPartners")){let e=JSON.parse(localStorage.getItem("loyaltyPartners"));e.loyaltyPartners&&e.loyaltyPartners.forEach((function(e){e&&"GeneralMills"==e.name&&e.planNumber&&e.planNumber.length>1&&(window.AB.userInfo.boxTopAuth=!0)}))}else{let e=window.AB.userInfo.UUID;this.objBoxTop.newGetGeneralMillsId(e).subscribe((e=>{localStorage.setItem("loyaltyPartners",JSON.stringify(e)),e.loyaltyPartners&&e.loyaltyPartners.forEach((function(e){e&&"GeneralMills"==e.name&&e.planNumber&&e.planNumber.length>1&&(window.AB.userInfo.boxTopAuth=!0)}))}))}}))},this.isItemAvailable_v3Predicate=e=>{let t=window.AB.COMMON.getUserChannel();return this.isItemAvailable_v3(e,t)},this._arrPromoRule=pP().SWY.CONFIGSERVICE.getConfigforPromoDesc(),window.appConfigServiceRef={zone:t,service:this}}getHiddenInputs(){let e=$(".js-gridDataParse");$('input[type="hidden"]',e).each((function(e,t){let i=$(t),n=i.val(),r=i.attr("name");if(n)switch(r){case"gridDataSource":window.AB[r]=JSON.parse(n);break;case"availableSorts":window.AB[r]=[],n.split(",").map((function(e){window.AB[r].push(e.trim())}));break;default:window.AB[r]=n.toString()}}))}generateFinalApiUrl(e){let t="";if(window.AB.allowWiremockService){let i=window.AB.wiremockRecorderBaseUrl,n=window.AB.wiremockPlaybackBaseUrl;t="record"===this.getParams("mode")?`${i}${e}`:"playback"===this.getParams("mode")?`${n}${e}`:`${e}`}else t=`${e}`;return t}getFinalSubscriptionKey(e){let t=this.getParams("mode");return!window.AB.allowWiremockService||"record"!==t&&"playback"!==t?e:window.AB.wcaxXapiApimKey}getPromorulesArray(){return this._arrPromoRule}getBogoLabel(){return pP().SWY.CONFIGSERVICE.getBannerConventions().buy_one_get_one_free}getPromoDescription(e=!1){return pP().SWY.CONFIGSERVICE.getBannerConventions()[e?"marketplacePromoDescription":"promoDescription"]}getPromoDescriptionAPI(e){let t="Y"===e?.isMarketplaceItem;if(this.isProductPromoActive(e))switch(e.promoType){case"P":e.promoTitle=this.getPromoDescription(t),e.offerText="";break;case"B":case"M":e.promoTitle=this.getBogoLabel(),e.offerText=e.promoText}}getPromoDescriptionAPIMealsRecipe(e){if(this.isProductPromoActive(e))switch(e.promoType){case"P":e.promoTitle=this.getPromoDescription(),e.offerText="";break;case"B":case"M":e.promoTitle=this.getBogoLabel(),e.offerText=e.promoText}return e}getAppContext(){return pP().AB}getProductDetailPath(e){return"wineshop"===e?pP().AB.winePdpPath:"mkp"===e?pP().AB.mkpPdpPath:pP().AB.htmlProductDetailPath}isSeoEnabled(){return!0===(this.featureFlagService&&this.featureFlagService.getFeatureFlagBase?this.featureFlagService.getFeatureFlagBase():null)?.isSeoEnabled}generateSeoSlug(e){if(!e||""===e.trim())return"product";let t={"fluid oz":"fl-oz","fl oz":"fl-oz","fluid ounces":"fl-oz","fluid ounce"
1:"fl-oz",ounces:"oz",ounce:"oz",pounds:"lb",pound:"lb",count:"ct",pk:"pack"},i=e.toLowerCase().replace(/[\u2122\u00ae\u00a9]/g,"").replace(/&/g," and ").replace(/[\u2018\u2019'`]/g,"").replace(/\//g,"-").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/(\d)\.(\d)/g,"$1-$2").replace(/([a-z0-9])\s*\+/g,"$1 plus ").replace(/(\d)\s*%/g,"$1 percent ").replace(/#\s*(\d+)/g," number $1").replace(/[.,;:"()[\]{}!?@$^*=~<>|\\]/g," ").replace(/[^a-z0-9\s-]/g," ");if(Object.keys(t).forEach((e=>{i=i.replace(new RegExp("\\b"+e+"\\b","g"),t[e])})),i=i.replace(/\b(a|an|the)\b/g," ").replace(/\b(\d+)\s*pack\b/g,"$1-pack").replace(/\b(\d+)\s*ct\b/g,"$1-ct").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""),i.length>120){let e=i.substring(0,120),t=e.lastIndexOf("-");i=t>0?e.substring(0,t):e}return i||"product"}buildSeoPdpUrl(e,t){return`/shop/pd/${this.generateSeoSlug(e)}/${t}`}getCouponDetailPathShop(){return pP().AB.htmlOfferDetailPathShop}getCouponDetailPathWww(){return pP().AB.htmlOfferDetailPathWww}getRewardGridPathWww(){return pP().AB.htmlRewardDetailPathWww}getSellerSeachPath(){return pP().AB.marketPlaceSearchResultsPath}getWineShopSearchResultsPage(){return pP().AB.wineShopSearchResultsPath}getSellerLandingPath(e){let t=$(".menu-nav__wrapper").attr("data-mktp-sellers-url");try{let i=JSON.parse(t);return i[e]?i[e]:""}catch{return""}}promoDescription(e){let t="promoDescriptionVal",i="priceColor",n=e.promoDescription,r=!1;if(n){console.log("PRODUCT DESCRIPTION - DATA: "+n);for(let s=0;s<this._arrPromoRule.length&&!1===r;s++){let a=this._arrPromoRule[s];n.match(a.rule)&&(e[t]=a.value,e[i]=a.priceColor,e.offerText=a.offerText,r=!0,1==a.showStrikeThrough&&this.checkStrikeThrough(e),console.log("PRODUCT DESCRIPTION - MODIFIED: "+e[t]))}!1===r&&(e[t]=pP().SWY.CONFIGSERVICE.getBannerConventions().promoDescription,console.log("PRODUCT DESCRIPTION - DEFAULT: "+e[t]),e[i]=!0,this.checkStrikeThrough(e),e.offerText="")}}checkStrikeThrough(e){this.isProductPromoActive(e)&&"P"===e.promoType&&null!=e.basePrice&&e.price>0&&e.basePrice>0&&e.price<e.basePrice?e.showStrikeThrough=!0:e.showStrikeThrough=!1}checkStrikeThroughSponsored(e){this.isProductPromoActive(e)&&null!=e.basePrice&&e.price>0&&e.basePrice>0&&e.price<e.basePrice?e.showStrikeThrough=!0:e.showStrikeThrough=!1}isLSCompatible(){let e="test";try{typeof window.AB.isLSEnabled>"u"&&(localStorage.setItem(e,e),localStorage.removeItem(e),console.log("==== LOCAL STORAGE IS ENABLED ===="),window.AB.isLSEnabled=!0)}catch{console.log("==== LOCAL STORAGE IS DISABLED ===="),window.AB.isLSEnabled=!1}return window.AB.isLSEnabled}_hasLSRewards(){let e=this._getRewards();return!(!e||!e.grOffers)}_getRewards(){let e=localStorage.getItem("abRewards"),t={};try{t=JSON.parse(e)}catch(e){console.error("ERROR: REWARDS - GETTING FROM LOCAL STORAGE"),console.error(e)}return t}_hasLSDeals(){return!!this._getDeals()}_getDeals(){let e=localStorage.getItem("abDeals"),t={};try{t=JSON.parse(e)}catch(e){console.error("ERROR: DEAL - GETTING FROM LOCAL STORAGE"),console.error(e)}return t}isEmpty(e){if(null==e)return!0;if(e.length>0)return!1;if(0===e.length||"object"!=typeof e)return!0;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}isCouponExpired(e){let t=new Date,i=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),s=new Date(`${n}/${i}/${r}`),a=parseInt(e.endDate),o=new Date(a),l=o.getDate(),c=o.getMonth()+1,d=o.getFullYear();return new Date(`${c}/${l}/${d}`)<s}checkUnAttendedDelivery(e){return!!(window.AB.COMMON.checkPendingOrder()&&window.AB.COMMON.checkUnAttendedDelivery()&&e.restrictedValue&&e.restrictedValue>0)}getCouponType(e){let t=window.SWY.CONFIGSERVICE.nimbusConfig.couponTypes;return null==t[e]?"":t[e]}prop65WarningMessage(e){let t=window.SWY.CONFIGSERVICE.getProp65Details();e.prop65Title=t.prop65Title,e.prop65PdpTitle=t.prop65PDPTitle}initServiceCall(){console.log("ANGULAR - REQUESTED SERVICE CALL"),this.postUserInfoSource.next("initAngular")}initJ4UModal(){console.log("ANGULAR - OPENING THE J4U MODAL");this.manualBootstrapSource.next({manualComponentId:"j4uModal",contextId:"offerDetailModal"})}initPopupWrapper(){console.log("ANGULAR - OPENING THE J4U MODAL");this.manualBootstrapSource.next({manualComponentId:"popupWrapper",contextId:"popupWrapper"})}initProfileCompletion(){console.log("ANGULAR - OPENING THE profileCompletion");this.manualBootstrapSource.next({manualComponentId:"profileCompletion",contextId:"profileCompletion"})}initSpecialOccasions(){console.log("ANGULAR - OPENING THE specialOccasions");this.manualBootstrapSource.next({manualComponentId:"specialOccasions",contextId:"specialOccasions"})}initPostAuthNotification(){console.log("ANGULAR - OPENING THE PostAuthNotification");this.manualBootstrapSource.next({manualComponentId:"postAuthNotification",contextId:"postAuthNotification"})}initUtilityBarWrapper(){console.log("ANGULAR - OPENING THE initUtilityBarWrapper");this.manualBootstrapSource.next({manualComponentId:"utilityBarWrapper",contextId:"utilityBarWrapper"})}initProductCarouselBootstrap(){console.log("ANGULAR - dynamically loading produc carousel");this.manualBootstrapSource.next({manualComponentId:"lazyWrapper",contextId:"homeTargeted"})}initLazyWrapper(){console.warn("ANGULAR - dynamically invoking lazy wrapper for targeted framework");typeof customElements<"u"&&typeof customElements.get("lazy-wrapper")>"u"&&this.manualBootstrapSource.next({manualComponentId:"lazyWrapper",contextId:"targetedContent"})}initTargetedWrapper(){console.warn("ANGULAR - dynamically invoking targeted wrapper for targeted framework");typeof customElements<"u"&&typeof customElements.get("targeted-wrapper")>"u"&&this.manualBootstrapSource.next({manualComponentId:"targetedWrapper",contextId:"targetedContentWrapper"})}isProductPromoActive(e){let t=!1;if(e.hasOwnProperty("promoEndDate")&&e.promoEndDate){let i=new Date,n=i.getDate(),r=i.getMonth()+1,s=i.getFullYear();new Date(`${r}/${n}/${s}`)<new Date(e.promoEndDate)&&(t=!0)}return t}hasPromotion(e){let t=!1;return e.hasOwnProperty("promoType")&&e.promoType&&("P"===e.promoType||"B"===e.promoType||"M"===e.promoType)&&(t=!0),t}showCrossSell(e,t,i,n){let r=window.AB.userInfo.branchId;if(t&&r&&e){let s=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath,a=window.SWY.CONFIGSERVICE.searchConfig.apimSearchSponsoredCarouselEndpoint,o=encodeURIComponent(window.AB.COMMON.getCookie("_elevaate_session_id")),l=$(window).width(),c=window.AB.userInfo.clubCard?encodeURIComponent(window.AB.userInfo.clubCard):"",d=window.AB.userInfo.banner,u=e,p="";n||(n="cross-sell"),i.length>
10&&i.forEach((function(e){u=u+","+e})),p=`${window.location.origin}${s}${a}?storeid=${r}&featuredsessionid=${o}&screenwidth=${l}&userid=${c}&banner=${d}&max-result=8&pagename=${n}&exclude-bpn=${u}&bpn=${e}&category-id=${t}`,p=this.generateCBAUrl(p);let h={headers:new jy({"Ocp-Apim-Subscription-Key":window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey})};!window.location.href.includes("/lp")&&!window.location.href.includes("/deals")&&this.http.get(p,h).subscribe((t=>{if(t.response?.docs){let i={products:t.response?.docs,bpn:e},n=t.response?.placementBeacons;this.sendSponsoredProductsOnloadEvent(t.response?.docs,"crossSellComponent",void 0,n),this.crossSellTargetSource.next(i)}}))}}showBiaLPCrossSell(e){let t,i="",n=window.location.origin+window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath,r=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:"",s=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=window.AB.COMMON.getUserChannel(),o=encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),l=window.location.hostname;e&&r&&s&&a&&(i=`${n}/pdreco/substitution?bpn=${e}&storeId=${s}&hhid=${r}&channel=${a}&bruid=${o}&pageurl=${l}&availabilityCheck=true&placement=bia`,t={headers:new jy({"Ocp-Apim-Subscription-Key":window.SWY.CONFIGSERVICE.wcaxXapiConfig["wcax.xapi.apim.key"],accept:"application/json"})},window.AB.COMMON.isB2BSite()&&(t.headers=t.headers.set("pgm","1P_B2B")),this.http.get(i,t).subscribe((t=>{if(t&&t.productsinfo){let i={products:t?.productsinfo,bpn:e,placement:"bia-lp"};this.crossSellTargetSource.next(i),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.getBiaOosAdobeMetrics(t.productsinfo)}else{let t={products:[],bpn:e,placement:"bia-lp"};this.crossSellTargetSource.next(t)}}),(t=>{let i={products:[],bpn:e,placement:"bia-lp"};this.crossSellTargetSource.next(i)})))}getParams(e){let t=new URLSearchParams(window.location.search);return t.get(e)?t.get(e):null}closeCrossSell(e){document.getElementsByClassName("cross-sell-product-"+e)[0]&&this.crossSellCloseSource.next(!0)}isGuestUser(){let e=window.SWY.CONFIGSERVICE.featureToggleConfig,t=!e||!e.hasOwnProperty("disableGuestCart")||e.disableGuestCart;return"g"==String(pP().AB.userInfo.userType).toLowerCase()&&!t}validateSession(e,t=!1){return v(this,null,(function*(){if(pP().AB.COMMON.authorize())if(pP().SWY.ENFORCEMENT.isTokenActive()&&pP().AB.userInfo.SWY_SHOP_TOKEN)e&&e();else if(pP().SWY.ENFORCEMENT.checkAuthorizedCookie())try{let i=yield this.http.get(pP().AB.userInfoPath).toPromise();window.AB.userInfo.SWY_SHOP_TOKEN=i.SWY_SHOP_TOKEN,pP().AB.userInfo.updateTokenRefreshProperty(),pP().SWY.ENFORCEMENT.isTokenActive()?e&&e():t&&this.showSignInModal(e,t)}catch(i){console.error("qty-stepper",i),t&&this.showSignInModal(e,t)}else t&&this.showSignInModal(e,t)}))}showSignInModal(e,t){$("#sessionTimeoutModal").modal({show:!0}),e&&t&&e()}isItemAvailable_v2(e,t){e.disableInStoreUICheck=!0;let i=window.AB.COMMON.getUserChannel();i="wineshop"===t||"wine-carousel"===t?"shipping":i;let n=(()=>{switch(!0){case"shipping"===i:return"shipping";case"pickup"===i:return"pickUp";case"delivery"===i:return"delivery";case"instore"===i:return"inStore";default:return""}})(),r=e.channelEligibility,s=!(!r||!r[n])&&r[n];if(typeof e.status<"u"&&"inactive"==e.status)e.itemAvailable=!1,e.itemNotAvailableTxt="This item is out of stock",e.disableInStoreUICheck=!0;else switch(!0){case"instore"===i:return s?(!r.delivery&&!r.pickUp&&(e.disableInStoreUICheck=!1),this.checkItemAvailability_v2(e,i)):(e.itemNotAvailableTxt="This item is not offered for in-store.",!1);case["pickup","delivery","shipping"].includes(i):return s?this.checkItemAvailability_v2(e,i):(e.itemNotAvailableTxt=`This item is not offered for ${i}.`,!1);case!i:return this.checkItemAvailability_v2(e,i);default:return!1}}checkItemAvailability_v2(e,t){if(e&&e.channelInventory&&e.channelInventory[t]){let i=e.channelInventory[t];switch(!0){case"instore"===t&&e.price>0:case["pickup","delivery","shipping"].includes(t)&&e.price>0&&!["",null,void 0,"0"].includes(i):case!t&&e.price>0:if(e.isMtoProduct&&e.preparationTime)if(Number(e.preparationTime)>0){let t=this.prepTimeMinToHoursMins(e.preparationTime);e.mtoDisplyableTime=t,e.mtoText="Takes "+t+" to prepare"}else e.mtoDisplyableTime=null,e.mtoText=null;return e.itemAvailable=!0,!0;case e.price<=0:case["",null,void 0,"0"].includes(i)&&["pickup","delivery","shipping"].includes(t):return e.itemAvailable=!1,e.itemNotAvailableTxt="This item is out of stock",e.disableInStoreUICheck=!0,!1;default:return!0}}return!1}isItemAvailable_v3(e,t){e.disableInStoreUICheck=!0;let i=window.AB.COMMON.getUserChannel();i="wineshop"===t||"wine-carousel"===t?"shipping":i;let n=(()=>{switch(!0){case"shipping"===i:return"shipping";case"pickup"===i:return"pickUp";case"delivery"===i:return"delivery";case"instore"===i:return"inStore";default:return""}})(),r=e.channelEligibility,s=!(!r||!r[n])&&r[n];if(typeof e.status<"u"&&"inactive"==e.status)e.itemAvailable=!1,e.itemNotAvailableTxt="Out of Stock",e.disableInStoreUICheck=!0;else switch(!0){case"instore"===i:if(s)return!r.delivery&&!r.pickUp&&(e.disableInStoreUICheck=!1),this.checkItemAvailability_v3(e,i);{let t=r?.delivery&&this.checkItemAvailability_v3(e,"delivery"),i=r?.pickUp&&this.checkItemAvailability_v3(e,"pickup");t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available for Delivery or Drive-up and go."):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available for Drive-up and go."):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available for Delivery."):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Out of Stock")}return!1;case"pickup"===i:if(s)return this.checkItemAvailability_v3(e,i);{let t=r?.delivery&&this.checkItemAvailability_v3(e,"delivery"),i=r?.inStore&&this.checkItemAvailability_v3(e,"instore");t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available In-Store or for Delivery."):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available In-Store."):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available for Delivery."):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Out of Stock")}return!1;case"delivery"===i:if(s)return this.checkItemAvailability_v3(e,i);{let t=r?.pickUp&&this.checkItemAvailability_v3(e,"pickup"),i=r?.inStore&&this.checkItemAvailability_v3(e,"instore");t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available In-Store or for Drive-up and go."):t&&!i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available for Drive-up and go."):!t&&i?(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Only Available In-Store."):(e.disableInStoreUICheck=!1,e.itemNotAvailableTxt="Out of Stock")}return!1;case!i:return this.checkItemAvailability_v3(e,i);default:return!1}}checkItemAvailability_v3(e,t){if(e&&e.channelInventory&&e.channelInventory[t]){let i=e.channelInventory[t];switch(!0){case"instore"===t&&e.price>0:case["pickup","delivery","shipping"].includes(t)&&e.price>0&&!["",null,void 0,"0"].includes(i):case!t&&e.price>0:if(e.isMtoProduct&&e.preparationTime)if(Number(e.preparationTime)>0){let t=this.prepTimeMinToHoursMins(e.preparationTime);e.mtoDisplyableTime=t,e.mtoText="Takes "+t+" to prepare"}else e.mtoDisplyableTime=null,e.mtoText=null;return e.itemAvailable=!0,!0;case e.price<=0:case["",null,void 0,"0"].includes(i)&&["pickup","delivery","shipping"].includes(t):return e.itemAvailable=!1,e.itemNotAvailableTxt="Out of Stock",e.disableInStoreUICheck=!0,!1;default:return!0}}return!1}getInventoryParameterName(){let e="inventoryAvailable",t=window.AB.COMMON.getUserChannel();return e=(()=>{switch(!0){case"pickup"===t:return"pickupInventory";case"delivery"===t:return"deliveryInventory";case"instore"===t:return"instoreInventory";default:return"inventoryAvailable"}})(),e}generateCBAUrl(e){if(""!==e){let t="",i=window.AB.COMMON.getUserChannel();if(!e.includes(`channel=${i}`)){switch(!0){case"delivery"===i:case"pickup"===i:case"instore"===i:t=e.indexOf("?")<0?`${e}?channel=${i}`:`${e}&channel=${i}`;break;default:t=e}return t}return e}}isActiveProduct(e){return!(e.status&&"inactive"===e.status)}isObjectValid(e){return e&&e.constructor===Object&&!!Object.keys(e).length}canTriggerProductsCall(){return window.AB.COMMON.authorize()}bootstrapArTopOffFlowComponents(){console.warn("this is from the bootstrap ar top off flow component");this.manualBootstrapSource.next({manualComponentId:"topUpFlow",contextId:"topUpFlow"})}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}openSignInModal(){window.AB.COMMON.showSignInModal_OTP(window.location.href)}checkABTestEotFlag(e,t){let i=this;document.addEventListener("ABTest_"+e,(function(e){e&&e.detail&&e.detail.eotflag?i.isAbTestEotFlag.next(e.detail.eotflag):i.isAbTestEotFlag.next(!1)}),{once:!0}),window.ABTestUtil.checkEOTEnableByIdAndValue(e,t)}prepTimeMinToHoursMins(e){let t=Number(e),i=Math.floor(t/60),n=t%60;return i>0?i+(i>1?" Hours":" Hour")+(n>0?" "+n+" Minutes":""):n+" Minutes"}recordRelevanceImpression(e,t,i){if(this.isSearchPage()){let n=pP().AB.COMMON.getCookie("AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg"),r={item:e.id,price:e.price,quantity:"1",environment:"d","retailer-visitor-id":n?n?.match(/MCMID\|\d+(?=\|)/)[0]?.split("|")[1]:null};r=f(h({},r),"viewProductDetails"==i?{"page-id":"viewItem_API_desktop","event-type":"viewItem",availability:"1",category:e?.aisleId?.replaceAll("_",">")}:{"page-id":"viewSearchResult_API_desktop","event-type":"addToCart"}),r&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&window.citrusAdTracker(r,"AD_RELEVANCE",{component:t,context:i})}}isSearchPage(){return-1!=window.location.pathname?.toLowerCase().indexOf("shop/search-results")}sendSponsoredProductsOnloadEvent(e,t,i,n,r=!1,s){let a=e?.map((e=>e.eventTracking)).filter((e=>null!=e));if(window.citrusAdTracker&&"function"==typeof window.citrusAdTracker)if(r)a&&a.length>0&&window.citrusAdTracker(a,"AD_ONLOAD",{component:t,context:i||"sponsoredProductsLoaded"});else if(n){let r=e?.some((e=>!0===e.featured))?a:[];this.sendSponsoredProductPlacementOnloadEvent(r,t,i,n,s)}}sendSponsoredProductPlacementOnloadEvent(e,t,i,n,r){n.hasOwnProperty("placementOnLoadBeacon_top")||n.hasOwnProperty("placementOnLoadBeacon_bottom")?(n.hasOwnProperty("placementOnLoadBeacon_top")&&window.citrusAdTracker(e,"AD_ONLOAD_PLACEMENT_TOP",{placementOnLoadBeacons_top:n.placementOnLoadBeacon_top,component:t,context:i||"sponsoredProductsLoaded",disableTracking:r}),n.hasOwnProperty("placementOnLoadBeacon_bottom")&&window.citrusAdTracker(e,"AD_ONLOAD_PLACEMENT_BOTTOM",{placementOnLoadBeacons_bottom:n.placementOnLoadBeacon_bottom,component:t,context:i||"sponsoredProductsLoaded",disableTracking:r})):window.citrusAdTracker(e,"AD_ONLOAD_PLACEMENT",{placementOnLoadBeacons:n.placementOnLoadBeacon,component:t,context:i||"sponsoredProductsLoaded",disableTracking:r})}
1sendSponsoredProductClickEvent(e,t,i){let n=e.adId||e.eventTracking;n&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&window.citrusAdTracker(n,"AD_CLICK",{component:t,context:i})}sendSponsoredPlacementTrackingEvent(e,t,i,n){(Array.isArray(e)?e?.length>0:e)&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&window.citrusAdTracker(e,n,{component:t,context:i})}setPlacementBeaconsOnProducts(e,t,i){return e?t?e.map((e=>(e.placementBeacons=e?.featured?t:null,typeof i<"u"&&(e.disableTracking=i),e))):e:[]}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Tl),lr(dP),lr(uP),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function fP(){return window}var mP=(()=>{class e{constructor(e,t){this._http=e,this._appConfigService=t,this.selectedRewardsOffers=new Tt([]),this.showBoxtop=new Tt(!0),this.userEndpoint="/bin/safeway/userinfo?banner=tomthumb"}getSelectedRewardsOffersMultiClip(){if(window.AB.COMMON.authorize()){let e={headers:new jy(window.AB.j4uHttpOptions30)};return this._http.get(window.AB.selectedRewardsPath+"?storeId="+window.AB.userInfo.j4u.storeId,e).pipe(bi((e=>(e.myGroceryRewardsList.forEach((e=>{e.endDate=e.endDate.split("(")[1].split(")")[0],e.buttonText="Unclip"})),e.myGroceryRewardsList))))}return fi()}getSelectedRewardsTotal(){if(window.AB.COMMON.authorize()){let e={headers:new jy(window.AB.j4uHttpOptions)};return this._http.get(window.AB.selectedRewardsPath+"?storeId="+window.AB.userInfo.j4u.storeId,e).pipe(bi((e=>{let t=0;return e.myGroceryRewardsList.forEach((e=>{t+=e.rewardsRequired})),t})))}return fi(0)}getSelectedRewardsTotalMulticlip(){if(window.AB.COMMON.authorize()){let e={headers:new jy(window.AB.j4uHttpOptions30)};return this._http.get(window.AB.selectedRewardsPath+"?storeId="+window.AB.userInfo.j4u.storeId,e).pipe(bi((e=>{let t=0;return e.myGroceryRewardsList.forEach((e=>{"O"==e.usageType||"U"==e.usageType?t+=e.rewardsRequired:t+=e.rewardsRequired*e.clipDetails.clippedCount})),t})))}return fi(0)}cancelBoxtopDisplay(){this.showBoxtop.next(!1)}callUnclipAPI(e){if(window.AB.COMMON.authorize()){let t={headers:new jy(window.AB.rewardUnclipHttpOptions)},i=window.AB.rewardUnclipPath;i=i.replace("{storeId}",fP().AB.storeInfo.storeId);let n={items:[{clipId:e.clipId}]};return this._http.post(i,n,t).pipe(bi((t=>(this._updateLocalStorageRewardsInfo(e,!1),this._appConfigService.rewardsRefreshSource.next(!0),t.items))))}return fi()}callUnclipMulticlipAPI(e){if(window.AB.COMMON.authorize()){let t={headers:new jy(window.AB.rewardUnclipHttpOptions)},i=window.AB.rewardUnclipPath;i=i.replace("{storeId}",fP().AB.storeInfo.storeId);let n={items:[{clipId:e.clipDetails.clipped[0]}]};return this._http.post(i,n,t).pipe(bi((t=>(this._updateLocalStorageRewardsInfo(e,!1),this._appConfigService.rewardsRefreshSource.next(!0),t.items))))}return fi()}checkUnclipDetail(e){if(fP().AB.COMMON.authorize()){let t="M"==e.usageType?e.clipDetails.clipped[0]:e.clipId,i=window.AB.userInfo.houseId,n={headers:new jy(window.AB.xAPICheckUnclipDetail)},r=window.AB.checkUnclipDetail+"/"+i+"/"+t;return this._http.get(r,n).pipe(bi((e=>{let t=new cP;return e&&""!=e&&(t.clipId=e.clipId,t.expiredRewards=e.expiredRewards,t.hhid=e.hhid,t.isPartiallyExpired=e.isPartiallyExpired,t.isValidForUnClip=e.isValidForUnClip,t.totalClippedRewards=e.totalClippedRewards),t})))}}_updateLocalStorageRewardsInfo(e,t){let i,n=0;localStorage.abRewardsSummary;t?(n=e.rewardsAvailable-e.rewardsRequired,i=e.rewardsExpire>e.rewardsRequired?e.rewardsExpire-e.rewardsRequired:0):(n=e.rewardsAvailable+e.rewardsRequired,i=e.rewardsExpire>e.rewardsRequired?e.rewardsExpire:0);let r={rewardsAvailable:n,rewardsExpire:i,savedTime:Date.now()};localStorage.abRewardsSummary=JSON.stringify(r)}dateConversion(e){let t=/\d+/.exec(e),i="";if(Array.isArray(t)){let e=new Date(parseInt(t[0]));e.setUTCMilliseconds(t.index),i=e.toLocaleDateString("en-US")}return i}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),gP=(()=>{class e{constructor(e,t){this._http=e,this._featureFlagService=t,this.enableCashReward=this._featureFlagService.enableCashReward()}set(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error("Error saving to localStorage",e)}}get(e){try{return JSON.parse(localStorage.getItem(e))}catch(e){return console.error("Error getting data from localStorage",e),null}}remove(e){try{localStorage.removeItem(e)}catch(e){console.error("Error removing data from localStorage",e)}}updateTimeToRefresh(){let e=this.get("abRewards");e&&(e.savedTime="",this.set("abRewards",e))}
1dateConversion(e){let t=/\d+/.exec(e),i="";if(Array.isArray(t)){let e=new Date(parseInt(t[0]));e.setUTCMilliseconds(t.index),i=e.toLocaleDateString("en-US")}return i}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),bP=(()=>{class e{constructor(e,t,i,n){this._http=e,this._appConfigService=t,this._rewardService=i,this._featureFlagService=n,this.apiResponseSource=new Tt(!1),this.apiResponse=this.apiResponseSource.asObservable(),this.rewardsModalRefreshSource=new kt,this.rewardsModalRefresh=this.rewardsModalRefreshSource.asObservable(),this.openRewardsModalSource=new kt,this.openRewardModal=this.openRewardsModalSource.asObservable(),this.disableToastmessageRewardPage=!1}setToastindicator(){this.disableToastmessageRewardPage||(localStorage.getItem("rewardToastShow")&&localStorage.removeItem("rewardToastShow"),localStorage.setItem("rewardToastShow","200"))}_handleErrorMessage(e,t){let i,n,r;t&&t.length>0?(r="400: Rewards Clip failed - status is 0",t[0].errorCd&&t[0].errorMsg&&(r+=" "+t[0].errorCd+" "+t[0].errorMsg),!t[0].errorCd||"EMJOC8024E"!==t[0].errorCd&&"EMJOC8025E"!==t[0].errorCd?(i="Service Problem",n="System is currently unavailable, please try again later."):(i="Oops",n="Your reward balance is being updated, please check back in a few minutes.")):(r="400: Rewards Clip failed - items is not defined. ",i="Service Problem",n="System is currently unavailable, please try again later.");let s="#rewards-redemption-confirmation-modal-"+e.groceryRewardId;$(s).modal("hide"),window.AB.COMMON.popupUserErrorMessage(i,n,(function(){window.location.href="/foru/rewards.html"})),localStorage.removeItem("abRewards"),window.AB.DATALAYER.setError(e.groceryRewardId.toString(),"rewards clipping",r)}_updateRewardsAnalytics(e){window.AB.DATALAYER.clipReward(e)}_updateRewardsUnclipAnalytics(e){}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(gP),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),yP=e=>
1({"modal-md":e}),vP=(e,t,i)=>({"modal-title":!0,"rewards-selected-title":e,"boxtop-title":t,"service-details":i}),wP=(e,t,i,n)=>({"rewards-selected-body":e,"rewards-redemption-body":t,"boxtop-body":i,"service-details-body":n}),_P=(e,t,i,n,r)=>({"reward-use-btn":e,"btn btn-md btn-secondary rewards-redeem-button":t,"btn btn-md btn-primary rewards-redeem-button":i,"service-details-btn carousel-header-link-text":n,"selected-rewards-link":r}),SP=(e,t,i,n)=>({multiclipCLipRewardBtn:e,"reward-btn__qty-step__button":t,"service-details-btn carousel-header-link-text":i,"selected-rewards-link":n});function CP(e,t){if(1&e){let e=Mf();kf(0,"button",21),jf("click",(function(){return Wa(e),Ha(Yf().getSelectedRewards())})),am(1),xf()}if(2&e){let e=Yf();zh("disabled",e.disabledButton)("ngClass",Lm(5,_P,!e.showPointsScoreCard&&e.modal.isRewardsRedemption,e.modal.isRewardsRedemption&&e.showPointsScoreCard&&e.disabledButton,e.modal.isRewardsRedemption&&e.showPointsScoreCard&&!e.disabledButton,e.modal.isServiceDetails,e.modal.isRewardsSelected)),gh("data-target","#"+e.modal.id)("data-focus",!0),Vd(),lm(e.modal.actionButton)}}function IP(e,t){if(1&e){let e=Mf();kf(0,"button",22),jf("click",(function(){return Wa(e),Ha(Yf().getSelectedRewardsMulticlip())})),Tf(1,"span",23),xf()}if(2&e){let e=Yf();zh("disabled",e.reward.clipDetails.totalClippedCount===e.reward.clipDetails.multiClipLimit||e.reward.rewardsRequired>e.reward.rewardsAvailable||!1===e.clipByDateCheck(e.reward))("ngClass",Rm(4,SP,!e.showPointsScoreCard&&e.modal.isRewardsRedemption,e.showPointsScoreCard,e.modal.isServiceDetails,e.modal.isRewardsSelected)),gh("data-target","#"+e.modal.id)("data-focus",!0)}}function AP(e,t){1&e&&(kf(0,"div",29)(1,"div",30),Tf(2,"div",31),xf()())}function kP(e,t){if(1&e){let e=Mf();kf(0,"div",25),jf("click",(function(){return Wa(e),Ha(Yf(2).getSelectedRewards())})),kf(1,"div",26),Tf(2,"img",27),am(3),ph(4,AP,3,0,"div",28),xf()()}if(2&e){let e=Yf(2);gh("href","#"+e.modal.id)("data-target","#"+e.modal.id)("data-focus",!0),Vd(),gh("aria-label",e.rewardRedeemedLabel),Vd(2),cm("",e.rewardRedeemedLabel," "),Vd(),zh("ngIf",""==e.rewardRedeemedLabel)}}function xP(e,t){if(1&e&&(Ef(0),ph(1,kP,5,6,"div",24),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.modal.isRewardRedeemed)}}function TP(e,t){1&e&&(kf(0,"div",29)(1,"div",30),Tf(2,"div",31),xf()())}function PP(e,t){if(1&e){let e=Mf();kf(0,"div",25),jf("click",(function(){return Wa(e),Ha(Yf(2).getSelectedRewardsMulticlip())})),kf(1,"div",26),Tf(2,"img",27),am(3),ph(4,TP,3,0,"div",28),xf()()}if(2&e){let e=Yf(2);gh("href","#"+e.modal.id)("data-target","#"+e.modal.id)("data-focus",!0),Vd(),gh("aria-label",e.rewardRedeemedLabel),Vd(2),cm("",e.rewardRedeemedLabel," "),Vd(),zh("ngIf",""==e.rewardRedeemedLabel)}}function EP(e,t){if(1&e&&(Ef(0),ph(1,PP,5,6,"div",24),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.modal.isRewardRedeemed)}}function DP(e,t){if(1&e){let e=Mf();kf(0,"div",25),jf("click",(function(){Wa(e);let t=Yf(2);return t.getSelectedRewardsMulticlip(),Ha(t.setAnalyticsLinkClick("rewards|rewards-get-your-reward"))})),kf(1,"div",32)(2,"div",33),Tf(3,"img",34),kf(4,"div",35)(5,"div",36),am(6,"Get your reward"),xf(),kf(7,"div",37),am(8,"Pick your selected items up online or in-store."),xf()(),Tf(9,"img",38),xf()()()}if(2&e){let e=Yf(2);gh("href","#"+e.modal.id)("data-target","#"+e.modal.id)("data-focus",!0),Vd(),gh("aria-label",e.rewardRedeemedLabel)}}function OP(e,t){if(1&e&&(Ef(0),ph(1,DP,10,4,"div",24),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.modal.isRewardRedeemed)}}function BP(e,t){if(1&e){let e=Mf();kf(0,"button",39),jf("click",(function(){return Wa(e),Ha(Yf().redrawAPI())})),kf(1,"span",40),am(2,"Ã"),xf()()}}function MP(e,t){1&e&&(kf(0,"button",41)(1,"span",40),am(2,"Ã"),xf()())}function RP(e,t){1&e&&(Ef(0),kf(1,"div",43)(2,"div",44)(3,"div",30),Tf(4,"div",31),xf()()(),Df())}function LP(e,t){if(1&e){let e=Mf();kf(0,"div",62)(1,"button",63),jf("click",(function(){Wa(e);let t=Yf(3),i=t.$implicit,n=t.index;return Ha(Yf(3).unclipReward(i,n))})),am(2),xf()()}if(2&e){let e=Yf(3).$implicit;Vd(),gh("aria-label",e.buttonText+" "+e.title),Vd(),lm(e.buttonText)}}function FP(e,t){1&e&&(kf(0,"div",64)(1,"span",65),am(2,"Can't be unclipped"),xf()())}function NP(e,t){if(1&e&&(Ef(0),ph(1,LP,3,2,"div",60)(2,FP,3,0,"div",61),Df()),2&e){let e=Yf(2).$implicit;
1Vd(),zh("ngIf",e.rewardsRefundable),Vd(),zh("ngIf",!e.rewardsRefundable)}}function UP(e,t){if(1&e&&(kf(0,"div",50)(1,"div",51),Tf(2,"img",52),xf(),kf(3,"div",53)(4,"div",54),am(5),xf(),kf(6,"div",55),am(7),xf()(),kf(8,"div",56)(9,"div",57),am(10),xf(),kf(11,"div",58),am(12),xf(),kf(13,"div",59),am(14),qm(15,"date"),xf()(),ph(16,NP,3,2,"ng-container",3),xf()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(2),Jf("src",e.image,id),Vd(3),lm(e.title),Vd(2),lm(e.description),Vd(3),lm(e.offerPrice),Vd(2),lm(e.description),Vd(2),dm("",t.showPointsScoreCard?"Enjoy by":"Expires"," ",jm(15,8,e.endDate,"M/d/yyyy"),""),Vd(2),zh("ngIf",!t.rewardUnclipDisabled)}}function VP(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",81),jf("click",(function(){Wa(e);let t=Yf(3),i=t.$implicit,n=t.index;return Ha(Yf(3).checkForExpirePoint(i,n))})),am(2),xf(),kf(3,"p",82),am(4),qm(5,"date"),xf(),Df()}if(2&e){let e=Yf(3).$implicit,t=Yf(3);Vd(),gh("aria-label",e.buttonText+" "+e.title),Vd(),lm(e.buttonText),Vd(2),dm("",t.showPointsScoreCard?"Enjoy by":"Expires"," ",jm(5,4,e.endDate,"M/d/yyyy"),"")}}function qP(e,t){if(1&e&&(Ef(0),kf(1,"span",83),am(2,"Can't be unclipped"),xf(),kf(3,"p",82),am(4),qm(5,"date"),xf(),Df()),2&e){let e=Yf(3).$implicit,t=Yf(3);Vd(4),dm("",t.showPointsScoreCard?"Enjoy by":"Expires"," ",jm(5,2,e.endDate,"M/d/yyyy"),"")}}function $P(e,t){if(1&e&&(Ef(0),ph(1,VP,6,7,"ng-container",3)(2,qP,6,5,"ng-container",3),Df()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),zh("ngIf",e.rewardsRefundable&&!t.rewardUnclipDisabled),Vd(),zh("ngIf",!e.rewardsRefundable&&!t.rewardUnclipDisabled)}}function jP(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",86)(2,"div",85)(3,"div",87)(4,"button",88),jf("click",(function(){Wa(e);let t=Yf(4),i=t.$implicit,n=t.index;return Ha(Yf(3).checkForExpirePoint(i,n))})),Tf(5,"span",89),xf(),kf(6,"span",90),am(7,"1"),xf(),kf(8,"button",91),Tf(9,"span",23),xf()()()(),Df()}if(2&e){let e=Yf(4).$implicit;
1Vd(4),zh("disabled",!e.rewardsRefundable),Vd(4),zh("disabled",!0)}}function zP(e,t){1&e&&(Ef(0),kf(1,"div",86)(2,"div",85)(3,"div",87)(4,"button",92),Tf(5,"span",89),xf(),kf(6,"span",90),am(7,"1"),xf(),kf(8,"button",91),Tf(9,"span",23),xf()()()(),Df()),2&e&&(Vd(4),zh("disabled",!0),Vd(4),zh("disabled",!0))}function WP(e,t){if(1&e&&(Ef(0,85),ph(1,jP,10,2,"ng-container",3)(2,zP,10,2,"ng-container",3),Df()),2&e){let e=Yf(3).$implicit,t=Yf(3);Vd(),zh("ngIf",e.rewardsRefundable&&!t.rewardUnclipDisabled),Vd(),zh("ngIf",!e.rewardsRefundable&&!t.rewardUnclipDisabled)}}function HP(e,t){if(1&e){let e=Mf();kf(0,"div",85)(1,"div",87)(2,"button",88),jf("click",(function(){Wa(e);let t=Yf(5),i=t.$implicit,n=t.index;return Ha(Yf(3).checkForExpirePoint(i,n))})),Tf(3,"span",89),xf(),kf(4,"span",90),am(5),xf(),kf(6,"button",93),jf("click",(function(){Wa(e);let t=Yf(5).$implicit;return Ha(Yf(3).clipRewardMulticlip(t))})),Tf(7,"span",23),xf()()()}if(2&e){let e=Yf(5).$implicit,t=Yf(3);Vd(2),zh("disabled",e.clipDetails.clippedCount<1),Vd(3),lm(e.clipDetails.clippedCount),Vd(),zh("disabled",e.clipDetails.totalClippedCount==e.clipDetails.multiClipLimit||e.rewardsRequired>e.rewardsAvailable||0==t.clipByDateCheck(e))}}function YP(e,t){if(1&e&&(Ef(0),kf(1,"div",86),ph(2,HP,8,3,"div",84),xf(),Df()),2&e){let e=Yf(4).$implicit;Vd(2),zh("ngIf",e.clipDetails.multiClipLimit>0&&e.clipDetails.clippedCount>0)}}function GP(e,t){if(1&e&&(kf(0,"div",85)(1,"div",87)(2,"button",92),Tf(3,"span",89),xf(),kf(4,"span",90),am(5),xf(),Tf(6,"child-modal",94),xf()()),2&e){let e=Yf(5).$implicit,t=Yf(3);Vd(2),zh("disabled",!0),Vd(3),lm(e.clipDetails.clippedCount),Vd(),zh("showPointsScoreCard",t.showPointsScoreCard)("disabledButton",t.disabledButton)("type","rewards-redemption-multiclip")("reward",e)("rewardPageType",e-t.modal)}}function KP(e,t){if(1&e&&(Ef(0),ph(1,GP,7,7,"div",84),Df()),2&e){let e=Yf(4).$implicit;Vd(),zh("ngIf",e.clipDetails.multiClipLimit>0&&e.clipDetails.clippedCount>0)}}function QP(e,t){if(1&e&&(Ef(0,85),ph(1,YP,3,1,"ng-container",3)(2,KP,2,1,"ng-container",3),Df()),2&e){let e=Yf(3).$implicit,t=Yf(3);Vd(),zh("ngIf",e.rewardsRefundable&&!t.rewardUnclipDisabled),Vd(),zh("ngIf",!e.rewardsRefundable&&!t.rewardUnclipDisabled)}}function JP(e,t){if(1&e&&(Ef(0),ph(1,WP,3,2,"ng-container",84)(2,QP,3,2,"ng-container",84),kf(3,"p",82),am(4),qm(5,"date"),xf(),Df()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),zh("ngIf","O"==e.usageType||"U"==e.usageType),Vd(),zh("ngIf","M"==e.usageType),Vd(2),dm("",t.showPointsScoreCard?"Enjoy by":"Expires"," ",jm(5,4,e.endDate,"M/d/yyyy"),"")}}function ZP(e,t){if(1&e&&(kf(0,"div",66)(1,"div",67)(2,"div",68)(3,"div",69)(4,"div",70),am(5),xf()(),kf(6,"div",71)(7,"div",72)(8,"div",73),am(9),xf(),kf(10,"div",74),am(11),xf(),kf(12,"div",75)(13,"a",76),am(14,"Reward Details"),xf()()(),kf(15,"div",77)(16,"picture"),Tf(17,"source",78)(18,"source",78)(19,"img",79),xf()()(),kf(20,"div",80),ph(21,$P,3,2,"ng-container",3)(22,JP,6,7,"ng-container",3),xf()()()()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(5),cm(" ",e.offerPrice," "),Vd(4),lm(e.title),Vd(2),cm(" ",e.description," "),Vd(2),Jf("href",t.getRewardDetailURL(e.detailPath,e.groceryRewardId,e.offerPgm),id),Vd(4),Zf("media","(min-width: ",t.md,")"),Jf("srcset",t.getImageUrl(e.imageId,"desktop")),Vd(),Zf("media","(min-width: ",t.sm,")"),Jf("srcset",t.getImageUrl(e.imageId,"tablet")),Vd(),Jf("src",t.getImageUrl(e.imageId,"mobile"),id),Vd(2),zh("ngIf",t.disableMulticlipRewardGallery),Vd(),zh("ngIf",!t.disableMulticlipRewardGallery)}}function XP(e,t){if(1&e&&(Ef(0),ph(1,UP,17,11,"div",48)(2,ZP,23,13,"div",49),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.rewardCardDisabled),Vd(),zh("ngIf",!e.rewardCardDisabled)}}function eE(e,t){1&e&&(kf(0,"div",95),am(1,"Selected rewards will also be displayed in your List"),xf())}function tE(e,t){if(1&e&&(Ef(0),kf(1,"div",45),ph(2,XP,3,2,"ng-container",46),xf(),ph(3,eE,2,0,"div",47),Df()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",e.rewardsSelected),Vd(),zh("ngIf",e.rewardsSelected&&e.rewardsSelected.length>0)}}function iE(e,t){1&e&&(kf(0,"div",98),am(1,"No Rewards are currently selected."),xf())}function nE(e,t){1&e&&(kf(0,"div",99),Tf(1,"img",100),kf(2,"h2",101),am(3,"No rewards redeemed"),xf(),kf(4,"p",102),am(5,"When you use Points for grocery rewards you'll see them here."),xf(
1),kf(6,"button",103)(7,"span"),am(8,"Got it!"),xf()()())}function rE(e,t){if(1&e&&ph(0,iE,2,0,"div",96)(1,nE,9,0,"div",97),2&e){let e=Yf(2);zh("ngIf",null!=e.rewardsSelected&&!e.showPointsScoreCard),Vd(),zh("ngIf",null!=e.rewardsSelected&&e.showPointsScoreCard)}}function sE(e,t){if(1&e&&(Ef(0),ph(1,RP,5,0,"ng-container",3)(2,tE,4,2,"ng-container",42)(3,rE,2,2,"ng-template",null,0,Wm),Df()),2&e){let e=sm(4),t=Yf();Vd(),zh("ngIf",null==t.rewardsSelected),Vd(),zh("ngIf",t.rewardsSelected&&t.rewardsSelected.length>0)("ngIfElse",e)}}function aE(e,t){if(1&e&&(Ef(0),kf(1,"div",104),am(2,"Redeeming this reward is final and cannot be reversed."),xf(),Df()),2&e){let e=Yf();Vd(),Jf("id",e.modal.describedId)}}function oE(e,t){1&e&&(Ef(0),kf(1,"div",105)(2,"div",106),am(3," You have selected a Box Tops for Education offer. Registration with Box Tops for Education is required to redeem eBox Tops offers. "),xf()(),Df())}function lE(e,t){if(1&e&&(Ef(0),kf(1,"div",107)(2,"div",108),Tf(3,"h2",109)(4,"div",110),xf(),kf(5,"div",111),Tf(6,"h2",109)(7,"span",110),kf(8,"a",112),Tf(9,"span",113),xf()()(),Df()),2&e){let e=Yf();Vd(3),zh("innerHTML",e.modal.leftsubtitle,ed),Vd(),zh("innerHTML",e.modal.lefttext,ed),Vd(2),zh("innerHTML",e.modal.rightsubtitle,ed),Vd(),zh("innerHTML",e.modal.righttext,ed),Vd(),Jf("href",e.modal.rightlink,id),Vd(),zh("innerHTML",e.modal.rightlinktext,ed)}}function cE(e,t){1&e&&(kf(0,"a",117),am(1,"View Rewards history"),xf())}function dE(e,t){1&e&&Tf(0,"div")}function uE(e,t){if(1&e){let e=Mf();kf(0,"div",114),ph(1,cE,2,0,"a",115)(2,dE,1,0,"div",3),kf(3,"button",116),jf("click",(function(){return Wa(e),Ha(Yf().redrawAPI())})),am(4,"Close"),xf()()}if(2&e){let e=Yf();Vd(),zh("ngIf",!e.rewardHistoryDisabled),Vd(),zh("ngIf",e.rewardHistoryDisabled)}}function pE(e,t){1&e&&(kf(0,"span",118),am(1,"Cancel"),xf())}function hE(e,t){if(1&e){let e=Mf();kf(0,"button",119),jf("click",(function(){return Wa(e),Ha(Yf().clipRewardNonRefund())})),am(1,"CONFIRM"),xf()}}function fE(e,t){if(1&e){let e=Mf();kf(0,"button",119),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.clipRewardMulticlipNonRefund(t.reward))})),am(1,"CONFIRM"),xf()}}function mE(e,t){if(1&e){let e=Mf();kf(0,"span",120),jf("click",(function(){return Wa(e),Ha(Yf().neverShowBoxtop())})),am(1,"Do Not Show Again"),xf()}}function gE(e,t){if(1&e){let e=Mf();kf(0,"button",121),jf("click",(function(){return Wa(e),Ha(Yf().redirectToBoxtopPage())})),am(1,"ENROLL NOW"),xf()}}function bE(){return window}var yE=(()=>{class e{constructor(e,t,i,n,r,s,a,o){this.elementRef=e,this._modalService=t,this.couponClipFn=i,this.objBoxTop=n,this._appConfigService=r,this.cdr=s,this._featureFlagService=a,this._renderer=o,this.showPointsScoreCard=!1,this.modal={title:"",titleBorder:!1,id:"",modalClass:"",isRewardsSelected:!1,isRewardsRedemption:!1,isRewardRedeemed:!1,isBoxtop:!1,isServiceDetails:!1,type:"",actionButton:"",reward:{},rewardId:"",displayRedemptionButton:!1,titleId:"",isUncliped:!1,isSafeToClose:!0},this.rewardsSelected=null,this.rewardsUnclip=[],this.rewardHistoryDisabled=!1,this.rewardUnclipDisabled=!1,this.rewardNewRefreshDisabled=!1,this.rewardRedeemedLabel="",this.detailPath="",this.sm="575px",this.md="768px",this.imagePath=window.AB.dMTProductCard,this.rewardDetailPath="",this.returnTotalPoint=0,this.rewardHistoryDisabled=!1,this.rewardUnclipDisabled=!1,this.rewardNewRefreshDisabled=!1,this.disableMulticlipRewardGallery=!1,this.disableToastmessageRewardPage=!1,this.enableNewRewardModalBtnUI=this._featureFlagService.enableNewRewardModalBtnUI()}ngOnInit(){if(this.elementRef.nativeElement.getAttribute("data-modal-type")&&(this.modal.type=this.elementRef.nativeElement.getAttribute("data-modal-type")),this.elementRef.nativeElement.getAttribute("data-modal-parent")&&(this.modal.parent=this.elementRef.nativeElement.getAttribute("data-modal-parent")),this.elementRef.nativeElement.getAttribute("data-modal-reward-id")&&(this.modal.rewardId=this.elementRef.nativeElement.getAttribute("data-modal-reward-id")),this.elementRef.nativeElement.getAttribute("data-modal-actionButton")&&(this.modal.actionButton=this.elementRef.nativeElement.getAttribute("data-modal-actionButton")),this.elementRef.nativeElement.getAttribute("data-modal-displayRedemptionButton")&&(this.modal.dis
1playRedemptionButton=this.elementRef.nativeElement.getAttribute("data-modal-displayRedemptionButton")),"rewards-selected"==this.modal.type||"rewards-redeemed"==this.modal.type)this.modal.titleId="rewards-selected-modal-title",this.modal.titleBorder=!0,this.modal.id="rewards-selected-modal",this.modal.describedId=this.modal.titleId,this.modal.isRewardsSelected=!0,this.modal.isUncliped=!1,"rewards-redeemed"==this.modal.type?(this.modal.isRewardRedeemed=!0,this.rewardHistoryDisabled=!0,this.modal.title=this.showPointsScoreCard?"Get your reward":"Redeemed Rewards"):this.rewardHistoryDisabled?this.modal.title="View selected Rewards":this.modal.title="View selected Rewards and history";else if("boxtop"==this.modal.type){switch(this.modal.title="Get started today - enroll in Box Tops for Education",this.modal.titleBorder=!1,this.modal.titleId="boxtopModalTitle",this.modal.parent){case"product-carousel":this.modal.id="boxtop-modal-pc";break;case"coupon-carousel":this.modal.id="boxtop-modal-cc";break;case"coupon-grid":this.modal.id="boxtop-modal-cg";break;case"offer-details":this.modal.id="boxtop-modal-od";break;default:this.modal.id="boxtop-modal"}this.modal.isBoxtop=!0,this.modal.actionButton="Boxtop modal"}else"service-details"==this.modal.type&&(this.modal.id="service-details",this.modal.titleId="service-details-title",this.modal.actionButton=this.elementRef.nativeElement.getAttribute("data-modal-actionButton"),this.modal.title=this.elementRef.nativeElement.getAttribute("data-modal-title"),this.modal.leftsubtitle=this.elementRef.nativeElement.getAttribute("data-modal-leftsubtitle"),this.modal.lefttext=this.elementRef.nativeElement.getAttribute("data-modal-lefttext"),this.modal.rightsubtitle=this.elementRef.nativeElement.getAttribute("data-modal-rightsubtitle"),this.modal.righttext=this.elementRef.nativeElement.getAttribute("data-modal-righttext"),this.modal.rightlinktext=this.elementRef.nativeElement.getAttribute("data-modal-rightlinktext"),this.modal.rightlink=this.elementRef.nativeElement.getAttribute("data-modal-rightlink"),null!=this.modal.actionButton?this.modal.isServiceDetails=!0:this.modal.isServiceDetails=!1)}ngAfterViewInit(){}neverShowBoxtop(){localStorage.setItem("showBoxtop","false"),this._modalService.cancelBoxtopDisplay()}redirectToBoxtopPage(){localStorage.setItem("boxtopActionName","get_started"),bE().location.href.includes("justforu")?bE().location.href=bE().location.href.split("justforu")[0]+"boxtops.html":bE().location.href=bE().location.origin+"/boxtops.html"}clipByDateCheck(e){let t=(0,oP.default)(),i=e.displayEndDate,n=new Date(this._modalService.dateConversion(i)),r=(0,oP.default)(n).format("MM/DD/YYYY");return t.diff(r,"days")<=0}_updateRewardUnclipAnalytics(e){}set(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error("Error saving to localStorage",e)}}get(e){try{return JSON.parse(localStorage.getItem(e))}catch(e){return console.error("Error getting data from localStorage",e),null}}redrawAPI(){if(1==this.modal.isUncliped&&1==this.modal.isSafeToClose){if(this.rewardNewRefreshDisabled)bE().location.href="/foru/rewards.html";else{let e=this.get("abRewards");e&&(e.savedTime="",this.set("abRewards",e)),this._appConfigService.rewardsRefreshSource.next(!0),$(".RewardUseModal").modal("hide")}this.modal.isUncliped=!1}}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}getImageUrl(e,t){let i=this.imagePath;return i?i.replace("${product.id}",e).replace("${viewport}",t):""}setLocalStorageForToaster(e){localStorage.getItem("rewardClipAndUnclipToastData")&&localStorage.removeItem("rewardClipAndUnclipToastData"),localStorage.setItem("rewardClipAndUnclipToastData",JSON.stringify(e))}setAnalyticsLinkClick(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setLinkClickEvents(e)}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(mP),$d(bP),$d(dP),$d(hP),$d(kg),$d(uP),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["modal"]],inputs:{reward:"reward",showPointsScoreCard:"showPointsScoreCard"},decls:28,vars:44,consts:[["emptyRewardsTemplate",""],["type","button","data-toggle","modal","role","button","id","angularModalBtn",3,"disabled","ngClass","click",4,"ngIf"],["type","button","data-toggle","modal","role","button","class","reward-btn__qty-step__increase",3,"disabled","ngClass","click",4,"ngIf"],[4,"ngIf"],[1,"selected-rewards-modal"],["role","dialog","tabindex","-1","aria-hidden","true",3,"id"],["role","document"],[1,"modal-content",3,"ngClass"],[1,"modal-container"],[1,"modal-header"],["tabindex","0","aria-label","My selected reward dialog close","data-dismiss","modal","class","modal-x standard-x","setopenfocus","",3,"click",4,"ngIf"],["tabindex","0","aria-label","My selected reward dialog close","data-dismiss","modal","class","modal-x standard-x","setopenfocus","",4,"ngIf"],[3,"ngClass"],[1,"modal-heading-size",3,"id"],[1,"modal-body",3,"ngClass"],[1,"modal-footer"],["class","modal-footer-buttons",4,"ngIf"],["tabindex","0","role","button","class","modal-cancel modal-row","data-dismiss","modal",4,"ngIf"],["type","button","class","btn btn-default modal-button modal-refocus1","aria-label","Confirm","data-dismiss","modal",3,"click",4,"ngIf"],["id","boxtopM
1odalCancelBtn","class","modal-cancel modal-row","role","button","tabindex","0","data-dismiss","modal",3,"click",4,"ngIf"],["id","boxtopModalEnrollNowBtn","type","button","data-dismiss","modal","class","btn btn-default modal-button btn-modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal","role","button","id","angularModalBtn",3,"click","disabled","ngClass"],["type","button","data-toggle","modal","role","button",1,"reward-btn__qty-step__increase",3,"click","disabled","ngClass"],["aria-hidden","true",1,"svg-qty-stepper-increase","product-btn__qty-step__increase--icon"],["role","button","tabindex","0","data-toggle","modal","class","text-decoration-none",3,"click",4,"ngIf"],["role","button","tabindex","0","data-toggle","modal",1,"text-decoration-none",3,"click"],[1,"banner-button"],["aria-hidden","true","role","img","src","/etc/designs/wcax-commons/images/icons/Icon_rewards_generic.svg","alt","Rewards Icon",1,"rewards-icon","pr-3","pt-1","pb-1"],["class","small progress","alt","Loading...",4,"ngIf"],["alt","Loading...",1,"small","progress"],[1,"prog1"],[1,"prog2"],[1,"new-banner-button"],[1,"banner-button-container"],["aria-hidden","true","role","img","alt","Redeem rewards","src","/etc/designs/wcax-commons/images/icons/GroceryBag.svg",1,"rewards-icon","pr-3","pt-1","pb-1"],[1,"banner-text-container"],[1,"banner-main-text"],[1,"banner-sub-text"],["aria-hidden","true","role","img","src","/etc/designs/wcax-commons/images/icons/CaretRight.svg",1,"arrow"],["tabindex","0","aria-label","My selected reward dialog close","data-dismiss","modal","setopenfocus","",1,"modal-x","standard-x",3,"click"],["aria-hidden","true"],["tabindex","0","aria-label","My selected reward dialog close","data-dismiss","modal","setopenfocus","",1,"modal-x","standard-x"],[4,"ngIf","ngIfElse"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"selected-reward-grid"],[4,"ngFor","ngForOf"],["class","reward-warning",4,"ngIf"],["class","reward-selected-container",4,"ngIf"],["class","selected-reward-card-component",4,"ngIf"],[1,"reward-selected-container"],[1,"reward-selected-image"],["alt","","role","presentation",1,"rewards-img",3,"src"],[1,"reward-selected-text"],[1,"reward-selected-title"],[1,"reward-selected-description"],[1,"reward-selected-details"],[1,"reward-selected-cost"],[1,"reward--selected-type"],[1,"reward-selected-date"],["class","reward-selected-unclip",4,"ngIf"],["class","reward-selected-unclipable",4,"ngIf"],[1,"reward-selected-unclip"],[1,"reward-selected-unclip-button",3,"click"],[1,"reward-selected-unclipable"],[1,"reward-selected-unclipable-message"],[1,"selected-reward-card-component"],[1,"selected-reward-card","card","mr-auto","ml-auto","ml-md-0"],[1,"selected-reward-card__card-body"],[1,"selected-reward-card__card-body__card-title","reward-carousel-title","title-xs"],[1,"reward-card__card-body__card-title__price"],[1,"row"],[1,"col-8"],[1,"selected-reward-title","title-xxs","mb-0"],[1,"selected-reward-details"],[1,"selected-reward-card-offer-details-container"],["role","link",1,"selected-reward-card-offer-details","offer-details",3,"href"],[1,"col-4"],[3,"media","srcset"],["loading","lazy",1,"selected-reward-img",3,"src"],[1,"selected-reward-flex-area"],[1,"btn","btn-md","btn-secondary",3,"click"],[1,"expiration","body-text-xs"],[1,"selected-reward-unclipable-message"],["class","quantity-stepper-container",4,"ngIf"],[1,"quantity-stepper-container"],[1,"reward-card-quantity-stepper"],["role","group",1,"btn","reward-btn__qty-step"],[1,"reward-btn__qty-step__decrease",3,"click","disabled"],["aria-hidden","true",1,"svg-qty-stepper-decrease","product-btn__qty-step__decrease--icon"],[1,"reward-btn__qty-step__amt"],[1,"reward-btn__qty-step__increase",3,"disabled"],[1,"reward-btn__qty-step__decrease",3,"disabled"],[1,"reward-btn__qty-step__increase",3,"click","disabled"],[1,"non-refundable-multiClip",3,"showPointsScoreCard","disabledButton","type","reward","rewardPageType"],[1,"reward-warning"],["class","no-rewards",4,"ngIf"],["class","no-rewards show-points-card",4,"ngIf"],[1,"no-rewards"],[1,"no-rewards","show-points-card"],["aria-hidden","true","role","img","src","/etc/designs/wcax-commons/images/icons/GroceryBag.svg","alt","Grocery Bag",1,"grocery-icon"],[1,"reward-redeemed-heading"],[1,"reward-redeemed-message"],["aria-label","got it","data-dismiss","modal",1,"btn","btn-primary","modal-button"],[1,"description-text",3,"id"],[1,"boxtop-modal-body"],["id","boxtopM
1odalDescriptionId",1,"boxtop-modal-description"],[1,"service-details-modal-container"],[1,"service-details-left"],[1,"subtitle-text",3,"innerHTML"],[1,"description-text",3,"innerHTML"],[1,"service-details-right"],["target","_blank","aria-label","Additional terms - opens in a new tab",1,"modal-row",3,"href"],[1,"additional-terms-link",3,"innerHTML"],[1,"modal-footer-buttons"],["class","selected-rewards-link","href","/foru/rewards/reward-history.html",4,"ngIf"],["tabindex","0","type","button","data-dismiss","modal",1,"btn-default","modal-button","reward-selected-button","modal-row",3,"click"],["href","/foru/rewards/reward-history.html",1,"selected-rewards-link"],["tabindex","0","role","button","data-dismiss","modal",1,"modal-cancel","modal-row"],["type","button","aria-label","Confirm","data-dismiss","modal",1,"btn","btn-default","modal-button","modal-refocus1",3,"click"],["id","boxtopModalCancelBtn","role","button","tabindex","0","data-dismiss","modal",1,"modal-cancel","modal-row",3,"click"],["id","boxtopModalEnrollNowBtn","type","button","data-dismiss","modal",1,"btn","btn-default","modal-button","btn-modal",3,"click"]],template:function(e,t){1&e&&(ph(0,CP,2,11,"button",1)(1,IP,2,9,"button",2)(2,xP,2,1,"ng-container",3)(3,EP,2,1,"ng-container",3)(4,OP,2,1,"ng-container",3),kf(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9),ph(11,BP,3,0,"button",10)(12,MP,3,0,"button",11),kf(13,"div",12)(14,"h2",13),am(15),xf()()(),kf(16,"div",14),ph(17,sE,5,3,"ng-container",3)(18,aE,3,1,"ng-container",3)(19,oE,4,0,"ng-container",3)(20,lE,10,6,"ng-container",3),xf(),kf(21,"div",15),ph(22,uE,5,2,"div",16)(23,pE,2,0,"span",17)(24,hE,2,0,"button",18)(25,fE,2,0,"button",18)(26,mE,2,0,"span",19)(27,gE,2,0,"button",20),xf()()()()()()),2&e&&(zh("ngIf","multiclip"!=t.modal.actionButton&&t.modal.isRewardsRedemption&&t.modal.displayRedemptionButton||t.modal.isRewardsSelected&&!t.modal.isRewardRedeemed||t.modal.isServiceDetails),Vd(),zh("ngIf","multiclip"==t.modal.actionButton&&t.modal.isRewardsRedemption&&t.modal.displayRedemptionButton||t.modal.isRewardsSelected&&!t.modal.isRewardRedeemed||t.modal.isServiceDetails),Vd(),zh("ngIf",t.disableMulticlipRewardGallery),Vd(),zh("ngIf",!t.disableMulticlipRewardGallery&&!t.enableNewRewardModalBtnUI),Vd(),zh("ngIf",!t.disableMulticlipRewardGallery&&t.enableNewRewardModalBtnUI),Vd(2),uf("modal fade ",t.modal.class,"",t.modal.isRewardsRedemption?"RewardUseModal":"",""),Jf("id",t.modal.id),gh("aria-labelledby",t.modal.titleId)("aria-describedby",t.modal.describedId),Vd(),df("modal-dialog modal-lg mw-100 ",t.modal.isRewardsRedemption?"rewards-modal-width":"",""),Vd(),zh("ngClass",Om(33,yP,"rewards-redemption"===t.modal.type||"rewards-redemption-multiclip"===t.modal.type)),Vd(3),zh("ngIf",t.modal.isRewardsSelected),Vd(),zh("ngIf",!t.modal.isRewardsSelected),Vd(),zh("ngClass",Mm(35,vP,t.modal.isRewardsSelected,t.modal.isBoxtop,t.modal.isServiceDetails)),Vd(),Jf("id",t.modal.titleId),gh("tabindex",t.modal.isRewardsSelected||"rewards-redemption"===t.modal.type||"rewards-redemption-multiclip"===t.modal.type?-1:null),Vd(),lm(t.modal.title),Vd(),zh("ngClass",Rm(39,wP,t.modal.isRewardsSelected,t.modal.isRewardsRedemption,t.modal.isBoxtop,t.modal.isServiceDetails)),Vd(),zh("ngIf",t.modal.isRewardsSelected),Vd(),zh("ngIf","rewards-redemption"==t.modal.type||"rewards-redemption-multiclip"==t.modal.type),Vd(),zh("ngIf","boxtop"==t.modal.type),Vd(),zh("ngIf","service-details"==t.modal.type),Vd(2),zh("ngIf",t.modal.isRewardsSelected&&!t.modal.isRewardRedeemed),Vd(),zh("ngIf","rewards-redemption"==t.modal.type||"rewards-redemption-multiclip"==t.modal.type),Vd(),zh("ngIf","rewards-redemption"==t.modal.type),Vd(),zh("ngIf","rewards-redemption-multiclip"==t.modal.type),Vd(),zh("ngIf","boxtop"==t.modal.type),Vd(),zh("ngIf","boxtop"==t.modal.type))},dependencies:[sy,oy,cy,Ty],styles:[".no-rewards.show-points-card[_ngcontent-%COMP%] .grocery-icon[_ngcontent-%COMP%]{width:128px;height:128px;margin:auto;display:block}.no-rewards.show-points-card[_ngcontent-%COMP%] .reward-redeemed-heading[_ngcontent-%COMP%]{color:#2a2928;font-family:Poppins;font-size:20px;font-style:normal;font-weight:500;line-height:normal;text-align:center}.no-rewards.show-points-card[_ngcontent-%COMP%] .reward-redeemed-message[_ngcontent-%COMP%]{color:#535250;text-align:center;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:400;line-height:20px}.no-rewards.show-points-card[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:343px;margin:auto;display:block}.no-rewards.show-points-card[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-align:center;font-family:Nunito Sans;font-size:16px;font-style:normal;font-weight:600;line-height:24px}"]})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),vE=y(oe()),wE=y(ue());function _E(){return window}
1var SE=(()=>{class e{constructor(e){this.httpClient=e,this.currentPage=new Tt(""),this.currentPage$=this.currentPage.asObservable(),this.currentUsername=new Tt(""),this.currentUsername$=this.currentUsername.asObservable(),this.errorWithRedirect=new Tt(""),this.errorWithRedirect$=this.errorWithRedirect.asObservable(),this.createAccountFlow="normal",this.correlationId="";let t=this;this.getUserType(),$("body")&&null!=$("body").on&&$("body").on("onGetUserInfoLoad",(function(e,i){if(i){let e=JSON.parse(i);var n=_E().AB.COMMON.getURLParameterByName("sendToHealthApp",!1),r=_E().AB.COMMON.getURLParameterByName("sendToHealthAppAfterCookiesUpdated",!1);if(n&&r){let i=e.SWY_SHOP_TOKEN;t.sendUserToHealthApp(i)}let s=e.email;e.profileEmail&&e.profileEmail.length>0?s=e.profileEmail:e.profilePhone&&e.profilePhone.length>0&&(s=e.profilePhone),t.currentUsername.next(s)}}))}getUserType(){let e=window.location.search,t=new URLSearchParams(e).get("status");_E().AB.COMMON.getURLParameterByName("sendToHealthApp",!1)?this.currentPage.next("loading"):"C"==_E().AB.userInfo.userType||"R"==_E().AB.userInfo.userType?this.currentPage.next("landing"):"unlinked"==t?(this.createAccountFlow="unlinked",this.currentPage.next("create-account")):this.currentPage.next("sign-in")}sendUserToHealthApp(e){let t=this,i={headers:new jy({"Content-Type":"application/json"})};var n={groceryToken:e,banner:_E().AB.userInfo.banner,brand:"aci"},r=JSON.stringify(n),s=window.location.origin+_E().AB.healthHandshakePath,a=window.location.origin+_E().AB.healthAppBasePath;if(window.location.search){let e=window.location.search.match(/returnUrl=(.*)/);if(e){let t=e[1];a=window.location.origin+t}}$&&null!=$.ajax&&$.ajax({type:"POST",redirect:"manual",headers:i,url:s,contentType:"application/json",dataType:"json",data:r,success:function(e,i,n){200==n.status?window.location.href=a:t.errorWithRedirect.next("true")},error:function(e){t.errorWithRedirect.next("true"),console.log("error redirecting to health app")}})}sendGetRequest(e,t){return this.httpClient.get(e,{headers:t,responseType:"json",observe:"response"})}sendPostRequest(e,t,i){return this.httpClient.post(e,t,{headers:i,responseType:"json",observe:"response"})}sendDeleteRequest(e,t){return this.httpClient.delete(e,{headers:t,responseType:"json",observe:"response"})}generateHash(e){let t,i=_E().SWY?.CONFIGSERVICE?.featureToggleConfig?.isCryptoJsDecomissioned,n=e.toUpperCase();return t=i?(0,wE.sha256)(n):(0,vE.SHA256)(n).toString(vE.enc.Hex),t}getDeviceToken(){if(_E().SWY?.CONFIGSERVICE?.featureToggleConfig?.isCryptoJsDecomissioned)return _E().AB.COMMON.getDeviceId();let e=navigator.userAgent+navigator.mimeTypes.length+navigator.plugins.length+window.screen.width+window.screen.height+window.screen.pixelDepth;return(0,vE.MD5)(e).toString(vE.enc.Hex)}getHeaders(){let e=_E().SWY.CONFIGSERVICE.datapowerConfig.cncSubscriptionKey,t=_E().AB.userInfo.banner,i=(new Date).toUTCString();return{"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json","ocp-apim-subscription-key":e,"x-swy-correlation-id":this.correlationId.length>0?this.correlationId:_E().AB.COMMON.generateUUID(),"x-swy-date":i,"x-swy-banner":t,"x-swy-client-id":"web-portal"}}getHeadersSignUp(){let e=this.correlationId.length>0?this.correlationId:_E().AB.COMMON.generateUUID(),t=_E().SWY.CONFIGSERVICE.datapowerConfig.cncSubscriptionKey,i=_E().AB.userInfo.banner;return{"Content-Type":"application/vnd.safeway.v2+json",Accept:"application/vnd.safeway.v2+json","ocp-apim-subscription-key":t,"x-swy-correlation-id":e,"x-swy-request-id":e,"x-swy-date":(new Date).toUTCString(),"x-swy_banner":i,"x-swy-client-id":"web-portal"}}showHide(e,t){let i=document,n=i.getElementById(e),r=i.getElementById(t);"password"===n.type?(n.type="text",n.focus(),r.innerText="Hide",r.ariaLabel="hide password"):(n.type="password",n.focus(),r.innerText="Show",r.ariaLabel="show password")}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),CE=["sortDropdownItemContainer"],IE=["themeBuilderEnabledTemplate"],AE=["defaultTemplate"],kE=["DSTV2Template"],xE=["sortId"],TE=e=>({"dropdown-item":!0,"filter-selected-link":e}),PE=e=>({"sort-ui__dropdown-anchor":!0,"dropdown-item":!0,"filter-selected-link":e});function EE(e,t){if(1&e){let e=Mf();kf(0,"li",14)(1,"a",15),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Zf("id","sortRule-",i,""),zh("ngClass",Om(6,TE,n.activeSortRule&&n.activeSortRule.label==e.label)),gh("aria-current",!!e.selected||null)("aria-label",e.label),Vd(),lm(e.label)}}function DE(e,t){if(1&e&&(kf(0,"div",5,4)(2,"div",6)(3,"button",7)(4,"p",8)(5,"span",9),am(6,"Sort "),xf(),kf(7,"span",10),am(8),xf(),Tf(9,"span",11),xf()(),kf(10,"ul",12),ph(11,EE,3,8,"li",13),xf()()()),2&e){let e=Yf();Vd(3),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(5),cm(" (",e.activeSortRule?e.activeSortRule.label:"",")"),Vd(3),zh("ngForOf",e.sortRules)}}function OE(e,t){if(1&e){let e=Mf();kf(0,"li",24)(1,"a",15),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Zf("id","sortRule-",i,""),zh("ngClass",Om(6,PE,n.activeSortRule&&n.activeSortRule.label==e.label)),gh("aria-current",!!e.selected||null)("aria-label",e.label),Vd(),lm(e.label)}}function BE(e,t){if(1&e&&(kf(0,"div",16,4)(2,"button",17)(3,"p",18)(4,"span",19),am(5,"Sort by "),xf(),kf(6,"span",20),am(7),xf(),Tf(8,"span",21),xf()(),kf(9,"ul",22),ph(10,OE,3,8,"li",23),xf()()),2&e){let e=Yf();Vd(2),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(5),cm(" ",e.activeSortRule?e.activeSortRule.label:"",""),Vd(3),zh("ngForOf",e.sortRules)}}function ME(e,t){if(1&e){let e=Mf();kf(0,"li",14)(1,"a",30),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Ch("aria-label","",e.label," ",i+1," of ",null==n.sortRules?null:n.sortRules.length,""),Zf("id","sortRule-",i,""),gh("aria-current",!!e.selected||null),Vd(),lm(e.label)}}function RE(e,t){if(1&e&&(kf(0,"div",25,4)(2,"div",26)(3,"button",27)(4,"span",9),am(5,"Sort by "),xf(),kf(6,"span",28),am(7),xf()(),kf(8,"ul",29),ph(9,ME,3,8,"li",13),xf()()()),2&e){let e=Yf();Vd(3),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),zh("ngClass",e.fromDynamicGrid?"d-flex align-items-center text-nowrap":""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(4),cm(" ",e.activeSortRule?e.activeSortRule.label:"",""),Vd(2),zh("ngForOf",e.sortRules)}}var LE=(()=>{class e{constructor(e,t){this.rd=e,this._featureFlagService=t,this.activeSortRuleEmitter=new _l,this.fromDynamicGrid=!1,this.arriaExpanded=!1,this.defaultSorted=!1,this.sortByComponent=function(){let e=$(".dropdown-sort-by.dropdown");e.find("#sortByID");$(".sort-by-text").focusout((function(){$(this).css("outline","none")})),e.on("hidden.bs.dropdown",(function(e){e.preventDefault(),setTimeout((function(){$("#sortByID").focus()}),300)})),$("div.cfh-banner.cfh-banner__search").length>0&&$("#filterMV").addClass("showPromo"),$(document).not(".squaredThree").on("click","label",(function(e){$(this).css("outline","none")})),$(".label-more").on("click",(function(e){$(this).prev().children(":eq(5)").children("label").css("outline","none")}))},this.isThemeBuilderEnabled=window.SWY.CONFIGSERVICE.isThemeBuilderEnabled,this.enableDstV2Theme=t.hasPageV2Theme(
1)}doSortEmitter(e){(this.activeSortRule?.field!==e?.field||this.activeSortRule?.label!==e?.label)&&(this.activeSortRule=e,this.activeSortRuleEmitter.emit(this.activeSortRule),window.AB.DATALAYER&&this.activeSortRule&&this.activeSortRule.label&&window.AB.DATALAYER.sortBy(this.activeSortRule.label))}ngOnChanges(e){e.activeSortRule&&this.sortRules.forEach(((e,t)=>{this.activeSortRule&&e.field===this.activeSortRule.field?(this.selectedSortRuleIndex=t,e.selected=!0,this.defaultSorted=!0):e.selected=null}))}ngAfterViewInit(){this.sortByComponent()}ngOnInit(){this.loadSortDropdownItemContainer()}loadSortDropdownItemContainer(){switch(!0){case this.enableDstV2Theme:this.sortDropdownItemContainer.createEmbeddedView(this.DSTV2Template);break;case this.isThemeBuilderEnabled:this.sortDropdownItemContainer.createEmbeddedView(this.themeBuilderEnabledTemplate);break;default:this.sortDropdownItemContainer.createEmbeddedView(this.defaultTemplate)}}removeVowels(e){return e.toLowerCase().replace(/ /g,"").replace(/[aeiou]/g,"")}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["sort-by"]],viewQuery:function(e,t){if(1&e&&(tm(CE,7,yp),tm(IE,7,Yu),tm(AE,7,Yu),tm(kE,7,Yu),tm(xE,7)),2&e){let e;im(e=nm())&&(t.sortDropdownItemContainer=e.first),im(e=nm())&&(t.themeBuilderEnabledTemplate=e.first),im(e=nm())&&(t.defaultTemplate=e.first),im(e=nm())&&(t.DSTV2Template=e.first),im(e=nm())&&(t.el=e.first)}},inputs:{sortRules:"sortRules",activeSortRule:"activeSortRule",fromDynamicGrid:"fromDynamicGrid"},outputs:{activeSortRuleEmitter:"activeSortRuleEmitter"},features:[ga],decls:8,vars:0,consts:[["sortDropdownItemContainer",""],["defaultTemplate",""],["themeBuilderEnabledTemplate",""],["DSTV2Template",""],["sortId",""],["role","region","aria-label","Sort by",1,"sort-by-wrapper","card"],[1,"dropdown","dropdown-sort-by","card-header"],["type","button","id","sortByID","data-toggle","dropdown","aria-haspopup","true","data-qa","srt-ptns-dflt"],[1,"sort-by-text"],[1,"float-left"],[1,"d-none","d-lg-block","float-left"],[1,"svg-icon","svg-icon-sort-by-caret","svg-icon-Arrow_down_black"],["aria-labelledby","sortByID","role","menu",1,"dropdown-menu","card-body","dropdown-menu-sort-mobile"],["role","none",4,"ngFor","ngForOf"],["role","none"],["href","#","onClick","return false;","role","menuitem","tabindex","-1","data-qa","srt-ptns",3,"click","ngClass","id"],["role","region","aria-label","Sort by",1,"sort-ui","dropdown","dropdown-sort-by"],["type","button","id","sortByID","data-toggle","dropdown","aria-haspopup","true","data-qa","srt-ptns-dflt",1,"sort-ui__sort-btn"],[1,"sort-ui__text-container"],[1,"sort-ui__default-text"],[1,"sort-ui__strategy","d-none","d-lg-inline-block"],[1,"sort-ui__icon","svg-caret-down"],["aria-labelledby","sortByID","role","menu",1,"sort-ui__dropdown","dropdown-menu","dropdown-menu-sort-mobile"],["role","none","class","sort-ui__dropdown-item",4,"ngFor","ngForOf"],["role","none",1,"sort-ui__dropdown-item"],[1,"sort-by-wrapper","card"],[1,"dropdown","sort-dropdown"],["type","button","id","sortDropdown","data-toggle","dropdown","role","button","aria-haspopup","true","aria-controls","sortDropdownMenu","data-qa","srt-ptns-dflt",1,"btn","btn-secondary","sort-dropdown__btn",3,"ngClass"],[1,"d-lg-block","float-left"],["id","sortDropdownMenu","role","menu","aria-label","Sort",1,"dropdown-menu","sort-dropdown__wrapper"],["role","menuitem","tabindex","-1","href","javascript:void(0);","data-qa","srt-ptns",1,"dropdown-item",3,"click","id"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,DE,12,6,"ng-template",null,1,Wm)(4,BE,11,6,"ng-template",null,2,Wm)(6,RE,10,7,"ng-template",null,3,Wm))},dependencies:[sy,oy],encapsulation:2})}}return e})(),FE=(()=>{class e{constructor(){this.loaderSubject=new kt,this.loaderState=this.loaderSubject.asObservable()}show(){this.loaderSubject.next({show:!0})}hide(){this.loaderSubject.next({show:!1})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function NE(e,t){1&e&&(kf(0,"div",2),Tf(1,"div",3),kf(2,"h1"),am(3,"Loading...."),xf()())}function UE(e,t){1&e&&(kf(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),Tf(4,"div",8),xf()()()())}var VE=(()=>{class e{constructor(e){this.loaderService=e,this.show=!1,this.clasicSpinnerImg=!0,this.modernSpinnerImg=!this.clasicSpinnerImg}ngOnInit(){this.$subscription=this.loaderService.loaderState.subscribe((e=>this.show=e.show))}ngOnDestroy(){this.$subscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(FE))}}static{this.ɵcmp=Qr({type:e,selectors:[["loading-spinner"]],decls:2,vars:2,consts:[["class","loader-location",4,"ngIf"],["id","loadingConMedium","class","loading-div-medium",4,"ngIf"],[1,"loader-location"],[1,"loader-small"],["id","loadingConMedium",1,"loading-div-medium"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&ph(0,NE,4,0,"div",0)(1,UE,5,0,"div",1),2&e&&(zh("ngIf",t.show&&t.modernSpinnerImg),Vd(),zh("ngIf",t.show&&t.clasicSpinnerImg))},dependencies:[cy],encapsulation:2})}}return e})();function qE(){return window}
1var $E=(()=>{class e{constructor(e,t){this._http=e,this._featureFlagService=t,this.otpData={},this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this.flowType=new Tt(""),this.flowType$=this.flowType.asObservable(),this.timerValue=new Tt(300),this.timerValue$=this.timerValue.asObservable(),this.csmsEndpoint=qE().SWY.CONFIGSERVICE.getDatapowerConfig().csmsApiEndpoint,this.isSincerelyHealthEnabled=!1,this.isSincerelyHealthEnabled=this._featureFlagService.isSincerelyHealthEnabled(),this.currentScreen.next("landing");let i=this;$("body")&&null!=$("body").on&&$("body").on("onGetUserInfoLoad",(function(e,t){let n;try{n=JSON.parse(t)}catch{n=""}n.profileEmail&&n.profileEmail.length>0?i.flowType.next("phone"):i.flowType.next("email")}))}sendPostRequest(e,t,i){return this._http.post(e,t,{headers:i,responseType:"json",observe:"response"})}sendPatchRequest(e,t,i){return this._http.patch(e,t,{headers:i,responseType:"json",observe:"response"})}hideModal(){$("#modalProfile").modal("hide"),this.enteredUsername="",this.maskedLinkedAcct="",Object.keys(this.otpData).forEach((e=>delete this.otpData[e])),this.currentScreen.next("landing")}updateCommunicationPreferences(e){let t=qE().AB.userInfo.UUID,i=qE().AB.getProfileInfo+"/"+t+"/subscriptions";qE().AB.ucaHttpOptionsV3Patch["x-swy-date"]=new Date;let n,r="cdbf1ceb-af90-4f40-9255-83d6166cca30";n="email"==e?{customerId:t,sourceSystemCode:"PORT",preferences:[{preferenceDefId:r,optChoices:[{channel:"EMAIL",choice:"OPT_OUT",oldChoice:"OPT_IN"}]},{preferenceDefId:"dd0b3039-0cc2-4315-ab39-1f5d7ee26a07",optChoices:[{channel:"EMAIL",choice:"OPT_OUT",oldChoice:"OPT_IN"}]},{preferenceDefId:"235b7ab8-16af-4e46-a392-fe0a4dc2d21b",optChoices:[{choice:"OPT_OUT",oldChoice:"OPT_IN"}]}]}:{customerId:t,sourceSystemCode:"PORT",preferences:[{preferenceDefId:r,optChoices:[{channel:"SMS",choice:"OPT_IN"}]}]},this.sendPatchRequest(i,JSON.stringify(n),qE().AB.ucaHttpOptionsV3Patch).subscribe((e=>{}))}showWarningScreen(e,t){if("email"==t&&e.phones&&e.phones[0]&&e.phones[0].number){let t=e.phones[0].number;this.maskedLinkedAcct=this.formatPhoneNumber(t)}else if(e.emails&&e.emails[0]&&e.emails[0].text){let t=e.emails[0].text;this.maskedLinkedAcct=t}this.currentScreen.next("conflict")}formatPhoneNumber(e){if(e&&e.length>0){return"("+e.slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}}verificationCodeTimer(){this.timerSubscription&&this.timerSubscription.unsubscribe(),this.timer$=Ui(1e3).pipe(bi((e=>300-e)),pn((e=>e>=0))),this.timerSubscription=this.timer$.subscribe((e=>{this.timerValue.next(e)}))}getVerifyHeaders(){return{"Content-Type":"application/vnd.safeway.v2+json",Accept:"application/vnd.safeway.v2+json",Authorization:"Bearer "+qE().AB.userInfo.SWY_SHOP_TOKEN,"x-swy-banner":qE().SWY.CONFIGSERVICE.getResolvedBanner(),"x-swy-correlation-id":qE().AB.COMMON.generateUUID(),"x-swy-client-id":"web-portal","Ocp-Apim-Subscription-Key":qE().SWY.CONFIGSERVICE.getDatapowerConfig().cncSubscriptionKey}}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),jE=(()=>{class e{constructor(e){this.http=e,this.experienceFragmentState=new Tt({})}getExperienceFragment(e){return this.http.get(e)}getExperienceFragments(e){return Oi(e.reduce(((e,t)=>(e[t.key]=this.getExperienceFragment(t.value),e)),{}))}updateExperienceFragmentState(e){this.preloadImages(e),this.experienceFragmentState.next(h(h({},this.experienceFragmentState.getValue()),e))}getExperienceFragmentState(){return this.experienceFragmentState.asObservable()}getInitalExperienceFragment(e){return this.getExperienceFragment(e.value)}preloadImages(e){let t=e=>/\.(svg|png|jpg)$/i.test(e),i=e=>{for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];if("string"==typeof r&&t(r)){(new Image).src=r,console.log(`Preloading image: ${r}`)}else"object"==typeof r&&null!==r&&i(r)}};i(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),zE=["modalProfile"],WE=e=>({position:e});function HE(e,t){1&e&&Of(0)}function YE(e,t){if(1&e&&(Ef(0),ph(1,HE,1,0,"ng-container",7),Df()),2&e){Yf();let e=sm(4);Vd(),zh("ngTemplateOutlet",e)}}function GE(e,t){1&e&&Of(0)}function KE(e,t){if(1&e&&(kf(0,"div",8,2),ph(2,GE,1,0,"ng-container",7),xf()),2&e){Yf();let e=sm(4);Vd(2),zh("ngTemplateOutlet",e)}}function QE(e,t){if(1&e&&(Ef(0),Tf(1,"landing-screen-profile-completion",10),Df()),2&e){let e=Yf(3);Vd(),zh("flowType",e.profileCompletionflowType)("currentScreen",e.currentScreen)("isVisible",e.isProfileModalVisible)}}function JE(e,t){1&e&&(Ef(0),Tf(1,"verify-screen-profile-completion"),Df(
1))}function ZE(e,t){if(1&e&&(Ef(0),Tf(1,"success-screen-profile-completion",11),Df()),2&e){let e=Yf(3);Vd(),zh("flowType",e.profileCompletionflowType)}}function XE(e,t){if(1&e&&(Ef(0),ph(1,QE,2,3,"ng-container",9)(2,JE,2,0,"ng-container",9)(3,ZE,2,1,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf","landing"==e.currentScreen),Vd(),zh("ngIf","verify"==e.currentScreen),Vd(),zh("ngIf","success"==e.currentScreen)}}function eD(e,t){1&e&&Of(0)}function tD(e,t){if(1&e&&(Ef(0),ph(1,eD,1,0,"ng-container",7),Df()),2&e){Yf(2);let e=sm(4);Vd(),zh("ngTemplateOutlet",e)}}function iD(e,t){if(1&e&&ph(0,tD,2,1,"ng-container",6),2&e){Yf();let e=sm(6),t=Yf();zh("ngIf",t.isSincerelyHealthEnabled&&t.isSincerelyHealthEnabledScreen)("ngIfElse",e)}}function nD(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"landing-screen-sincerely-health",22),jf("close",(function(){return Wa(e),Ha(Yf(3).onClose.emit())}))("onPopupNextflow",(function(){return Wa(e),Ha(Yf(3).popupNextflow.emit())})),xf(),Df()}}function rD(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"verify-screen-sincerely-health",23),jf("onPopupNextflow",(function(){return Wa(e),Ha(Yf(3).popupNextflow.emit())})),xf(),Df()}if(2&e){let e=Yf(3);Vd(),zh("aemData",e.aemData)("isPopupWrapperView",e.isPopupWrapperView)}}function sD(e,t){if(1&e){let e=Mf();kf(0,"div",12)(1,"div",13)(2,"div",14)(3,"div")(4,"picture"),Tf(5,"source",15)(6,"img",16),xf(),kf(7,"button",17),jf("click",(function(){return Wa(e),Ha(Yf(2).onClose.emit())})),Tf(8,"span",18),xf(),Tf(9,"img",19),xf()(),kf(10,"div",20)(11,"div",21),ph(12,nD,2,0,"ng-container",9)(13,rD,2,2,"ng-container",9),xf()()()()}if(2&e){let e=Yf(2);Vd(5),zh("srcset",e.progProfModalImgMobile),Vd(),zh("src",e.progProfModalImg,id),Vd(6),zh("ngIf","landing"==e.currentScreen),Vd(),zh("ngIf","verify"==e.currentScreen)}}function aD(e,t){if(1&e&&(Ef(0),Tf(1,"landing-screen",33),Df()),2&e){let e=Yf(3);Vd(),zh("landingTitle",e.landingTitle)("landingImage",e.landingImage)("landingPhoneBodyText",e.landingPhoneBodyText)("landingEmailBodyText",e.landingEmailBodyText)("landingBtnText",e.landingBtnText)("technicalError",e.technicalError)}}function oD(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"success-screen",34),jf("updateUserPreference",(function(t){return Wa(e),Ha(Yf(3).updatePreference(t))})),xf(),Df()}if(2&e){let e=Yf(3);Vd(),zh("successScreenTitle",e.successScreenTitle)("successScreenImage",e.successScreenImage)("successBodyText",e.successBodyText)("successBtnText",e.successBtnText)("emailCheckboxLabel",e.emailCheckboxLabel)("emailLegalHeader",e.emailLegalHeader)("emailLegalText",e.emailLegalText)("phoneCheckboxLabel",e.phoneCheckboxLabel)("phoneLegalHeader",e.phoneLegalHeader)("phoneLegalText",e.phoneLegalText)}}function lD(e,t){if(1&e&&(Ef(0),Tf(1,"verify-screen",35),Df()),2&e){let e=Yf(3);Vd(),zh("verifyAcctTitle",e.verifyAcctTitle)("changeLabel",e.changeLabel)("resendCodeLabel",e.resendCodeLabel)("resendCodeSuccessMsg",e.resendCodeSuccessMsg)("resendCodeErrorMsg",e.resendCodeErrorMsg)("incorrectOTPError",e.incorrectOTPError)("technicalError",e.technicalError)("phoneFormatError",e.phoneFormatError)("invalidPhoneError",e.invalidPhoneError)("invalidEmailError",e.invalidEmailError)("verifyBtnLabel",e.verifyBtnLabel)}}function cD(e,t){if(1&e&&(Ef(0),Tf(1,"conflict-screen",36),Df()),2&e){let e=Yf(3);Vd(),zh("conflictSubtext",e.conflictSubtext)("conflictBtnText",e.conflictBtnText)("callCenterText",e.callCenterText)("callCenterNumber",e.callCenterNumber)("confirmImage",e.confirmImage)("confirmBodyText",e.confirmBodyText)("confirmBtnText",e.confirmBtnText)("warningBodyText",e.warningBodyText)("warningBtnText",e.warningBtnText)}}function dD(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"div",25)(2,"div",26)(3,"div",27)(4,"div",28)(5,"button",29),jf("click",(function(){return Wa(e),Ha(Yf(2).closeModal())})),Tf(6,"span",30),xf()(),kf(7,"div",31)(8,"div",32),ph(9,aD,2,6,"ng-container",9)(10,oD,2,10,"ng-container",9)(11,lD,2,11,"ng-container",9)(12,cD,2,9,"ng-container",9),xf()()()()()()}if(2&e){let e=Yf(2);Vd(2),zh("ngStyle",Om(5,WE,e.zoom?"relative":"")),Vd(7),zh("ngIf","landing"==e.currentScreen),Vd(),zh("ngIf","success"==e.currentScreen),Vd(),zh("ngIf","verify"==e.currentScreen),Vd(),zh("ngIf","conflict"==e.currentScreen)}}function uD(e,t){if(1&e&&ph(0,XE,4,3,"ng-container",6)(1,iD,1,2,"ng-template",null,3,Wm)(3,sD,14,4,"ng-template",null,4,Wm)(5,dD,13,7,"ng-template",null,5,Wm),2&e){let e=sm(2);zh("ngIf",Yf().isProfileCompleteView)("ngIfElse",e)}}function pD(){return window}
1var hD=(()=>{class e{constructor(e,t,i,n){this.progProfService=e,this.elementRef=t,this.zone=i,this.aemXfService=n,this.profileCompletionflowType="",this.isProfileCompleteView=!1,this.isProfileModalViewed=!1,this.onClose=new _l,this.popupNextflow=new _l,this.landingTitle="",this.landingImage="",this.landingPhoneBodyText="",this.landingEmailBodyText="",this.landingBtnText="",this.conflictSubtext="",this.conflictBtnText="",this.callCenterText="",this.callCenterNumber="",this.warningBodyText="",this.warningBtnText="",this.successScreenTitle="",this.successScreenImage="",this.successBodyText="",this.successBtnText="",this.emailCheckboxLabel="",this.emailLegalHeader="",this.emailLegalText="",this.phoneCheckboxLabel="",this.phoneLegalHeader="",this.phoneLegalText="",this.verifyEmailTitle="",this.changeLabel="",this.resendCodeLabel="",this.resendCodeSuccessMsg="",this.resendCodeErrorMsg="",this.incorrectOTPError="",this.technicalError="",this.phoneFormatError="",this.invalidPhoneError="",this.invalidEmailError="",this.verifyBtnLabel="",this.confirmImage="",this.confirmBodyText="",this.confirmBtnText="",this.userOptInMkt=!0,this.zoom=!1,this.progProfModalImg="",this.progProfModalImgMobile="",this.isProfileModalVisible=!1,this.landingTitle=this.elementRef.nativeElement.getAttribute("data-landing-title")?this.elementRef.nativeElement.getAttribute("data-landing-title"):"",this.landingImage=this.elementRef.nativeElement.getAttribute("data-landing-img")?this.elementRef.nativeElement.getAttribute("data-landing-img"):"",this.landingPhoneBodyText=this.elementRef.nativeElement.getAttribute("data-landing-body-txt")?this.elementRef.nativeElement.getAttribute("data-landing-body-txt"):"",this.landingBtnText=this.elementRef.nativeElement.getAttribute("data-landing-btn-txt")?this.elementRef.nativeElement.getAttribute("data-landing-btn-txt"):"",this.landingEmailBodyText=this.elementRef.nativeElement.getAttribute("data-landing-email-body-txt")?this.elementRef.nativeElement.getAttribute("data-landing-email-body-txt"):"",this.conflictSubtext=this.elementRef.nativeElement.getAttribute("data-conflict-subtext")?this.elementRef.nativeElement.getAttribute("data-conflict-subtext"):"",this.conflictBtnText=this.elementRef.nativeElement.getAttribute("data-conflict-btn-txt")?this.elementRef.nativeElement.getAttribute("data-conflict-btn-txt"):"",this.callCenterText=this.elementRef.nativeElement.getAttribute("data-conflict-call-center-txt")?this.elementRef.nativeElement.getAttribute("data-conflict-call-center-txt"):"",this.callCenterNumber=this.elementRef.nativeElement.getAttribute("data-conflict-call-center-number")?this.elementRef.nativeElement.getAttribute("data-conflict-call-center-number"):"",this.warningBodyText=this.elementRef.nativeElement.getAttribute("data-warning-body-txt")?this.elementRef.nativeElement.getAttribute("data-warning-body-txt"):"",this.warningBtnText=this.elementRef.nativeElement.getAttribute("data-warning-btn-txt")?this.elementRef.nativeElement.getAttribute("data-warning-btn-txt"):"",this.successScreenTitle=this.elementRef.nativeElement.getAttribute("data-success-title")?this.elementRef.nativeElement.getAttribute("data-success-title"):"",this.successScreenImage=this.elementRef.nativeElement.getAttribute("data-success-img")?this.elementRef.nativeElement.getAttribute("data-success-img"):"",this.successBodyText=this.elementRef.nativeElement.getAttribute("data-success-body-txt")?this.elementRef.nativeElement.getAttribute("data-success-body-txt"):"",this.successBtnText=this.elementRef.nativeElement.getAttribute("data-success-btn-txt")?this.elementRef.nativeElement.getAttribute("data-success-btn-txt"):"",this.emailCheckboxLabel=this.elementRef.nativeElement.getAttribute("data-success-email-checkbox-label")?this.elementRef.nativeElement.getAttribute("data-success-email-checkbox-label"):"",this.emailLegalHeader=this.elementRef.nativeElement.getAttribute("data-success-email-legal-header")?this.elementRef.nativeElement.getAttribute("data-success-email-legal-header"):"",this.emailLegalText=this.elementRef.nativeElement.getAttribute("data-success-email-legal-text")?this.elementRef.nativeElement.getAttribute("data-success-email-legal-text"):"",this.phoneCheckboxLabel=this.elementRef.nativeElement.getAttribute("data-success-phone-checkbox-label")?this.elementRef.nativeElement.getAttribute("data-success-phone-checkbox-label"):"",this.phoneLegalHeader=this.elementRef.nativeElement.getAttribute("data-success-phone-legal-header")?this.elementRef.nativeElement.getAttribute("data-success-phone-legal-header"):"",this.phoneLegalText=this.elementRef.nativeElement.getAttribute("data-success-phone-legal-text")?this.elementRef.nativeElement.getAttribute("data-success-phone-legal-text"):"",this.confirmImage=this.elementRef.nativeElement.getAttribute("data-confirmation-img")?this.elementRef.nativeElement.getAttribute("data-confirmation-img"):"",this.confirmBodyText=this.elementRef.nativeElement.getAttribute("data-confirmation-body-txt")?this.elementRef.nativeElement.getAttribute("data-confirmation-body-txt"):"",this.confirmBtnText=this.elementRef.nativeElement.getAttribute("data-confirmation-btn-txt")?this.elementRef.nativeElement.getAttribute("data-confirmation-btn-txt"):"",this.verifyEmailTitle=this.elementRef.nativeElement.getAttribute("data-verify-email-title")?this.elementRef.nativeElement.getAttribute("data-verify-email-title"):"",this.changeLabel=this.elementRef.nativeElement.getAttribute("data-change-label")?this.elementRef.nativeElement.getAttribute("data-change-label"):"",this.resendCodeLabel=this.elementRef.nativeElement.getAttribute("data-resend-code")?this.elementRef.nativeElement.getAttribute("data-resend-code"):"",this.resendCodeSuccessMsg=this.elementRef.nativeElement.getAttribute("data-resend-code
1-success")?this.elementRef.nativeElement.getAttribute("data-resend-code-success"):"",this.resendCodeErrorMsg=this.elementRef.nativeElement.getAttribute("data-resend-code-error")?this.elementRef.nativeElement.getAttribute("data-resend-code-error"):"",this.incorrectOTPError=this.elementRef.nativeElement.getAttribute("data-incorrect-otp-error")?this.elementRef.nativeElement.getAttribute("data-incorrect-otp-error"):"",this.technicalError=this.elementRef.nativeElement.getAttribute("data-technical-error")?this.elementRef.nativeElement.getAttribute("data-technical-error"):"",this.phoneFormatError=this.elementRef.nativeElement.getAttribute("data-phone-format-error")?this.elementRef.nativeElement.getAttribute("data-phone-format-error"):"",this.invalidPhoneError=this.elementRef.nativeElement.getAttribute("data-invalid-phone-error")?this.elementRef.nativeElement.getAttribute("data-invalid-phone-error"):"",this.invalidEmailError=this.elementRef.nativeElement.getAttribute("data-invalid-email-error")?this.elementRef.nativeElement.getAttribute("data-invalid-email-error"):"",this.verifyBtnLabel=this.elementRef.nativeElement.getAttribute("data-verify-btn-label")?this.elementRef.nativeElement.getAttribute("data-verify-btn-label"):"",pD().progProfModal={zone:i,component:this}}ngOnInit(){this.isSincerelyHealthEnabled=this.progProfService.isSincerelyHealthEnabled,this.isSincerelyHealthEnabledScreen=!1,this.progProfService.currentScreen.subscribe((e=>{this.currentScreen=e,this.isSincerelyHealthEnabledScreen="landing"==e||"verify"==e})),this.progProfService.flowType.subscribe((e=>{this.flowType=e,"phone"==e&&(this.userOptInMkt=!1)})),this.profileCompletionflowType||this.loadExperienceFragment(),console.warn("[TEMP DO NOT DELETE] THis is to check the value if data-success-email-checkbox-label is coming or component is triggering ",this.elementRef.nativeElement.getAttribute("data-success-email-checkbox-label"))}onResize(e){let t=screen.width/window.innerWidth;t>=2&&(this.zoom=!0),t<2&&(this.zoom=!1)}ngOnChanges(e){e.isProfileModalViewed&&(this.isProfileModalVisible=e.isProfileModalViewed.currentValue)}loadExperienceFragment(){let e=`${window.location.origin}/content/experience-fragments/www/account/b2c/onboarding/master/jcr:content/root/responsivegrid/progressive_profile_.model.json`;this.aemXfService.getExperienceFragment(e).subscribe((e=>{this.aemData=e,this.progProfModalImg=e.landingScreenImageReference,this.progProfModalImgMobile=e.mobileViewImageReference}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}showProgressiveProfile(){$("#modalProfile").modal({show:!0}),"landing"===this.currentScreen&&pD().AB?.DATALAYER&&(this.analyticsFlow="phone"===this.flowType?"mobile":"email",pD().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`enter-${this.analyticsFlow}`})),this.modalTrapKeyboard("#modalProfile"),setTimeout((function(){document.getElementById("ppUsername").focus()}),500)}modalTrapKeyboard(e){let t=document.querySelector(e);t&&t.addEventListener("keydown",(function(e){if("Tab"!==e.key&&9!==e.keyCode)return;let t=e.currentTarget.querySelectorAll('[data-tabindex="first"]')[0],i=e.currentTarget.querySelectorAll('[data-tabindex="last"]')[0];e.shiftKey?document.activeElement===t&&(i.focus(),e.preventDefault()):document.activeElement===i&&(t.focus(),e.preventDefault())}))}closeModal(){"success"==this.currentScreen&&(this.userOptInMkt&&"phone"==this.flowType||!this.userOptInMkt&&"email"==this.flowType)&&this.progProfService.updateCommunicationPreferences(this.flowType),this.progProfService.hideModal(),pD().AB.DATALAYER&&pD().AB.DATALAYER.progressiveProfilingTracking()}updatePreference(e){this.userOptInMkt=e}ngOnDestroy(){this.profileCompletionflowType?(Object.keys(this.progProfService.otpData).forEach((e=>delete this.progProfService.otpData[e])),this.progProfService.currentScreen.next("landing")):this.progProfService.currentScreen.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d($E),$d(Vl),$d(Tl),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["progressive-profile"]],viewQuery:function(e,t){if(1&e&&tm(zE,5),2&e){let e;im(e=nm())&&(t.modalProfile=e.first)}},hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}
1),0,od)},inputs:{profileCompletionflowType:"profileCompletionflowType",isProfileCompleteView:"isProfileCompleteView",isProfileModalViewed:"isProfileModalViewed"},outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},features:[ga],decls:5,vars:2,consts:[["progressiveProfileModal",""],["modalDialog",""],["modalProfile","bs-modal"],["defautlView",""],["sincerelyHealthEnabledModal",""],["sincerelyHealthDisabledModal",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["id","modalProfile","bsModal","","role","dialog","aria-labelledby","profileModalTitle","tabindex","-1",1,"modal","sheets","fade","prog-prof"],[4,"ngIf"],[3,"flowType","currentScreen","isVisible"],[3,"flowType"],["role","document",1,"modal-dialog","referral-card-modal"],[1,"modal-content","referral-card-modal__content","verify-modal__modal-content"],[1,"modal-header","referral-card-modal__header"],["media","(max-width: 600px)",3,"srcset"],["alt","",1,"referral-card-modal__cover-image",3,"src"],["id","progressiveModalCloseBtn","type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"referral-card-modal__close",3,"click"],[1,"svg-icon","svg-close-primary","referral-card-modal__close-icon"],["src","/etc/designs/wcax-commons/images/icons/blue-star.svg","alt","",1,"referral-card-modal__star-img"],[1,"modal-body","default-styles","web-otp","referral-card-modal__body"],[1,"auth-styles"],[3,"close","onPopupNextflow"],[3,"onPopupNextflow","aemData","isPopupWrapperView"],[1,"modal-table"],[1,"modal-table-cell"],["role","document","aria-modal","true",1,"modal-dialog",3,"ngStyle"],["aria-hidden","true",1,"modal-content"],[1,"modal-header"],["type","button","data-tabindex","first","aria-label","Close",1,"close","prog-prof__close-btn",3,"click"],[1,"svg-icon","svg-close-primary"],[1,"modal-body","default-styles"],[1,"default-styles__content"],[3,"landingTitle","landingImage","landingPhoneBodyText","landingEmailBodyText","landingBtnText","technicalError"],[3,"updateUserPreference","successScreenTitle","successScreenImage","successBodyText","successBtnText","emailCheckboxLabel","emailLegalHeader","emailLegalText","phoneCheckboxLabel","phoneLegalHeader","phoneLegalText"],[3,"verifyAcctTitle","changeLabel","resendCodeLabel","resendCodeSuccessMsg","resendCodeErrorMsg","incorrectOTPError","technicalError","phoneFormatError","invalidPhoneError","invalidEmailError","verifyBtnLabel"],[3,"conflictSubtext","conflictBtnText","callCenterText","callCenterNumber","confirmImage","confirmBodyText","confirmBtnText","warningBodyText","warningBtnText"]],template:function(e,t){if(1&e&&ph(0,YE,2,1,"ng-container",6)(1,KE,3,1,"ng-template",null,0,Wm)(3,uD,7,2,"ng-template",null,1,Wm),2&e){let e=sm(2);zh("ngIf",t.isPopupWrapperView||t.isProfileCompleteView)("ngIfElse",e)}},encapsulation:2})}}return e})(),fD=e=>({"input-field--error":e});function mD(e,t){if(1&e&&(Ef(0),kf(1,"div",14,1)(3,"div",15)(4,"div",16),Tf(5,"span",17),xf(),kf(6,"div",18)(7,"div",19),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm(" ",e.errorMessage," ")}}function gD(e,t){1&e&&(kf(0,"div",24),am(1,"Please enter your email address."),xf())}function bD(e,t){1&e&&(kf(0,"div",24),am(1,"Please enter a valid email address."),xf())}function yD(e,t){1&e&&(kf(0,"div",24),am(1,"Please enter your phone number."),xf())}function vD(e,t){1&e&&(kf(0,"div",24),am(1,"Please enter a valid mobile number."),xf())}function wD(e,t){1&e&&(kf(0,"div",24),am(1,"Please enter a mobile phone number that doesn't start with a 0 or 1."),xf())}function _D(e,t){if(1&e&&(kf(0,"div",20)(1,"div",21),Tf(2,"span",22),xf(),ph(3,gD,2,0,"div",23)(4,bD,2,0,"div",23)(5,yD,2,0,"div",23)(6,vD,2,0,"div",23)(7,wD,2,0,"div",23),xf()),2&e){let e=Yf();Vd(3),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.emailRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidEmail),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.phoneRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidPhone),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.mobilePattern)}}function SD(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.landingBtnText," ")}}function CD(e,t){1&e&&Tf(0,"div",25)}function ID(){return window}
1var AD=(()=>{class e{constructor(e,t){this.formBuilder=e,this.progProfService=t,this.flowType="",this.analyticsFlow="",this.title="",this.usernameFieldLabel="",this.bodyText="",this.enterUsernameForm=this.formBuilder.group({username:["",this.validateUsername()]}),this.loading=!1,this.errorPopup=!1}ngOnInit(){this.errorMessage=this.technicalError,this.progProfService.flowType.subscribe((e=>{this.flowType=e;let t=this.enterUsernameForm.controls.username;"phone"==e?(this.analyticsFlow="mobile",this.usernameFieldLabel="Primary Phone Number",this.landingTitle=this.landingTitle?.replace("{number/email}","phone number"),this.bodyText=this.landingPhoneBodyText,t.errors&&(this.enterUsernameForm.controls.username.errors.phoneRequired=!0)):"email"==e&&(this.analyticsFlow="email",this.usernameFieldLabel="Email Address",this.landingTitle=this.landingTitle?.replace("{number/email}","email"),this.bodyText=this.landingEmailBodyText,t.errors&&(this.enterUsernameForm.controls.username.errors.emailRequired=!0))}))}get usernameForm(){return this.enterUsernameForm.controls}validateUsername(){let e=this,t=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=new RegExp("^[0-9]+$");return n=>{let r={emailRequired:!1,invalidEmail:!1,phoneRequired:!1,mobilePattern:!1,invalidPhone:!1};if("email"==e.flowType){if(0==n.value.length)return r.emailRequired=!0,r;if(!t.test(n.value))return r.invalidEmail=!0,r}else if("phone"==e.flowType){if(0==n.value.length)return r.phoneRequired=!0,r;if("0"===n.value.charAt(0)||"1"===n.value.charAt(0))return r.mobilePattern=!0,r;if(10!==n.value.length)return r.invalidPhone=!0,r;if(!i.test(n.value))return r.invalidPhone=!0,r}}}submitUsername(e){ID().AB?.DATALAYER&&ID().AB.DATALAYER.analyticsCTATracking(`cta:${this.analyticsFlow}-continue`),this.submitUsernameOTP(e)}submitUsernameOTP(e){this.resetErrorMessage(),this.loading=!0;let t=e.username;this.progProfService.enteredUsername=t;let i,n,r=window.AB.userInfo.UUID;"email"==this.flowType?(i="email",n=JSON.stringify({email:t})):(i="sms",n=JSON.stringify({phoneNumber:t}));let s=this.progProfService.csmsEndpoint+"/customers/"+r+"/factors/"+i+"/verify",a=new jy(this.progProfService.getVerifyHeaders()),o=this;this.progProfService.sendPostRequest(s,n,a).subscribe((e=>{e&&e.body&&e.body.factors&&e.body.factors[0]&&(o.progProfService.otpData.factorId=e.body.factors[0].id,o.progProfService.otpData.factorType=e.body.factors[0].factorType),o.progProfService.currentScreen.next("verify"),o.loading=!1,o.progProfService.verificationCodeTimer()}),(e=>{e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message&&(o.errorMessage=e.error?.errors[0]?.message),o.errorPopup=!0,this.loading=!1}))}updateUserProfile(e){let t=this,i=ID().AB.userInfo.UUID,n=ID().AB.getProfileInfo+"/"+i+"/profile",r=ID().AB.ucaHttpOptionsV3Patch;r["x-swy_banner"]=ID().SWY.CONFIGSERVICE.getResolvedBanner();let s="email"==this.flowType?JSON.stringify({emailId:e}):JSON.stringify({phone:{purpose:"Primary",number:e}});this.progProfService.sendPatchRequest(n,s,r).subscribe((i=>{this.progProfService.currentScreen.next("success"),this.loading=!1;let n=JSON.parse(window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO"));"email"==t.flowType?(ID().AB.userInfo.profileEmail=e,n.profileEmail=e):(ID().AB.userInfo.profilePhone=e,n.profilePhone=e);let r=encodeURIComponent(JSON.stringify(n));ID().AB.COMMON.setCookie("SWY_SHARED_PII_SESSION_INFO",r,90),this.clearUsernameForm()}),(e=>{t.errorPopup=!0,this.loading=!1}))}clearUsernameForm(){let e=this.usernameForm.username;e.setErrors(null),e.markAsPristine(),e.markAsUntouched(),e.setValue("")}resetErrorMessage(){this.errorPopup=!1,this.errorMessage=this.technicalError}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E))}}static{this.ɵcmp=Qr({type:e,selectors:[["landing-screen"]],inputs:{landingTitle:"landingTitle",landingImage:"landingImage",landingPhoneBodyText:"landingPhoneBodyText",landingEmailBodyText:"landingEmailBodyText",landingBtnText:"landingBtnText",technicalError:"technicalError"},decls:19,vars:14,consts:[["showLoading",""],["landingErrorId",""],["alt","",1,"prog-prof__top-icon",3,"src"],[4,"ngIf"],["id","profileModalTitle",1,"prog-prof__title"],[1,"body-text","mb-24","prog-prof__body"],[3,"ngSubmit","formGroup"],[1,"input-field","mb-24"],[1,"input-field__wrapper",3,"ngClass"],["for","ppUsername",1,"input-field__float-label"],["id","ppUsername","type","text","placeholder"," ","aria-describedby","error-username","formControlName","username","required","required"],["class","input-field__help-text body-text-xs","id","error-username","aria-live","polite",4,"ngIf"],["data-tabindex","last","type","submit",1,"btn","btn--size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"disabled"],[4,"ngIf","ngIfElse"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","error-username","aria-live","polite",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],[1,"svg-input-error-icon"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();Tf(0,"img",2),ph(1,mD,9,1,"ng-container",3),kf(2,"h1",4),am(3),xf(),kf(4,"div",5),am(5),xf(),kf(6,"form",6),jf("ngSubmit",(function(){return Wa(e),Ha(t.submitUsername(t.enterUsernameForm.value))})),kf(7,"div",7)(8,"div",8)(9,"label",9),Tf(10,"input",10),kf(11,"span"),am(12),xf()()(),ph(13,_D,8,5,"div",11),xf(),kf(14,"div")(15,"button",12),ph(16,SD,2,1,"ng-container",13)(17,CD,1,0,"ng-template",null,0,Wm),xf()()()}if(2&e){let e=sm(18);Jf("src",t.landingImage,id),Vd(),zh("ngIf",t.errorPopup),Vd(2),cm(" ",t.landingTitle,"\n"),Vd(2),cm(" ",t.bodyText,"\n"),Vd(),zh("formGroup",t.enterUsernameForm),Vd(2),zh("ngClass",Om(12,fD,t.usernameForm.username.invali
1d&&t.usernameForm.username.touched)),Vd(2),gh("aria-label",t.usernameFieldLabel),Vd(2),lm(t.usernameFieldLabel),Vd(),zh("ngIf",t.usernameForm.username.errors&&t.usernameForm.username.touched),Vd(2),zh("disabled",!(t.enterUsernameForm.valid&&t.enterUsernameForm.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",e)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,US,qS],encapsulation:2})}}return e})(),kD={};!function e(t,i,n,r){var s=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),a="function"==typeof Path2D&&"function"==typeof DOMMatrix,o=function(){if(!t.OffscreenCanvas)return!1;try{var e=new OffscreenCanvas(1,1),i=e.getContext("2d");i.fillRect(0,0,1,1);var n=e.transferToImageBitmap();i.createPattern(n,"no-repeat")}catch{return!1}return!0}();function l(){}function c(e){var n=i.exports.Promise,r=void 0!==n?n:t.Promise;return"function"==typeof r?new r(e):(e(l,l),null)}var d,u,p,h=(d=o,u=new Map,{transform:function(e){if(d)return e;if(u.has(e))return u.get(e);var t=new OffscreenCanvas(e.width,e.height);return t.getContext("2d").drawImage(e,0,0),u.set(e,t),t},clear:function(){u.clear()}}),f=function(){var e,t,i=Math.floor(16.666666666666668),n={},r=0;return"function"==typeof requestAnimationFrame&&"function"==typeof cancelAnimationFrame?(e=function(e){var t=Math.random();return n[t]=requestAnimationFrame((function s(a){r===a||r+i-1<a?(r=a,delete n[t],e()):n[t]=requestAnimationFrame(s)})),t},t=function(e){n[e]&&cancelAnimationFrame(n[e])}):(e=function(e){return setTimeout(e,i)},t=function(e){return clearTimeout(e)}),{frame:e,cancel:t}}(),m=function(){var t,i,r={};return function(){if(t)return t;if(!n&&s){var a=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{t=new Worker(URL.createObjectURL(new Blob([a])))}catch(e){return typeof console<"u"&&"function"==typeof console.warn&&console.warn("ð Could not load worker",e),null}!function(e){function t(t,i){e.postMessage({options:t||{},callback:i})}e.init=function(t){var i=t.transferControlToOffscreen();e.postMessage({canvas:i},[i])},e.fire=function(n,s,a){if(i)return t(n,null),i;var o=Math.random().toString(36).slice(2);return i=c((function(s){function l(t){t.data.callback===o&&(delete r[o],e.removeEventListener("message",l),i=null,h.clear(),a(),s())}e.addEventListener("message",l),t(n,o),r[o]=l.bind(null,{data:{callback:o}})}))},e.reset=function(){for(var t in e.postMessage({reset:!0}),r)r[t](),delete r[t]}}(t)}return t}}(),g={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function b(e,t,i){return function(e,t){return t?t(e):e}(e&&function(e){return null!=e}(e[t])?e[t]:g[t],i)}function y(e){return e<0?0:Math.floor(e)}function v(e,t){return Math.floor(Math.random()*(t-e))+e}function w(e){return parseInt(e,16)}function _(e){return e.map(S)}function S(e){var t=String(e).replace(/[^0-9a-f]/gi,"");return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:w(t.substring(0,2)),g:w(t.substring(2,4)),b:w(t.substring(4,6))}}function C(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function I(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function A(e){var t=e.angle*(Math.PI/180),i=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:10*Math.random(),wobbleSpeed:Math.min(.11,.1*Math.random()+.05),velocity:.5*e.startVelocity+Math.random()*e.startVelocity,angle2D:-t+(.5*i-Math.random()*i),tiltAngle:(.5*Math.random()+.25)
1*Math.PI,color:e.color,shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,drift:e.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:3*e.gravity,ovalScalar:.6,scalar:e.scalar,flat:e.flat}}function k(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);var i=t.tick++/t.totalTicks,n=t.x+t.random*t.tiltCos,r=t.y+t.random*t.tiltSin,s=t.wobbleX+t.random*t.tiltCos,o=t.wobbleY+t.random*t.tiltSin;if(e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-i)+")",e.beginPath(),a&&"path"===t.shape.type&&"string"==typeof t.shape.path&&Array.isArray(t.shape.matrix))e.fill(function(e,t,i,n,r,s,a){var o=new Path2D(e),l=new Path2D;l.addPath(o,new DOMMatrix(t));var c=new Path2D;return c.addPath(l,new DOMMatrix([Math.cos(a)*r,Math.sin(a)*r,-Math.sin(a)*s,Math.cos(a)*s,i,n])),c}(t.shape.path,t.shape.matrix,t.x,t.y,.1*Math.abs(s-n),.1*Math.abs(o-r),Math.PI/10*t.wobble));else if("bitmap"===t.shape.type){var l=Math.PI/10*t.wobble,c=.1*Math.abs(s-n),d=.1*Math.abs(o-r),u=t.shape.bitmap.width*t.scalar,p=t.shape.bitmap.height*t.scalar,f=new DOMMatrix([Math.cos(l)*c,Math.sin(l)*c,-Math.sin(l)*d,Math.cos(l)*d,t.x,t.y]);f.multiplySelf(new DOMMatrix(t.shape.matrix));var m=e.createPattern(h.transform(t.shape.bitmap),"no-repeat");m.setTransform(f),e.globalAlpha=1-i,e.fillStyle=m,e.fillRect(t.x-u/2,t.y-p/2,u,p),e.globalAlpha=1}else if("circle"===t.shape)e.ellipse?e.ellipse(t.x,t.y,Math.abs(s-n)*t.ovalScalar,Math.abs(o-r)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):function(e,t,i,n,r,s,a,o,l){e.save(),e.translate(t,i),e.rotate(s),e.scale(n,r),e.arc(0,0,1,a,o,l),e.restore()}(e,t.x,t.y,Math.abs(s-n)*t.ovalScalar,Math.abs(o-r)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI);else if("star"===t.shape)for(var g=Math.PI/2*3,b=4*t.scalar,y=8*t.scalar,v=t.x,w=t.y,_=5,S=Math.PI/_;_--;)v=t.x+Math.cos(g)*y,w=t.y+Math.sin(g)*y,e.lineTo(v,w),g+=S,v=t.x+Math.cos(g)*b,w=t.y+Math.sin(g)*b,e.lineTo(v,w),g+=S;else e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(r)),e.lineTo(Math.floor(s),Math.floor(o)),e.lineTo(Math.floor(n),Math.floor(t.wobbleY));return e.closePath(),e.fill(),t.tick<t.totalTicks}function x(e,i){var a,o=!e,l=!!b(i||{},"resize"),d=!1,u=b(i,"disableForReducedMotion",Boolean),p=s&&!!b(i||{},"useWorker")?m():null,g=o?C:I,w=!(!e||!p)&&!!e.__confetti_initialized,S="function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion)").matches;function x(t,i,s){for(var o=b(t,"particleCount",y),l=b(t,"angle",Number),d=b(t,"spread",Number),u=b(t,"startVelocity",Number),p=b(t,"decay",Number),m=b(t,"gravity",Number),w=b(t,"drift",Number),S=b(t,"colors",_),C=b(t,"ticks",Number),I=b(t,"shapes"),x=b(t,"scalar"),T=!!b(t,"flat"),P=function(e){var t=b(e,"origin",Object);return t.x=b(t,"x",Number),t.y=b(t,"y",Number),t}(t),E=o,D=[],O=e.width*P.x,B=e.height*P.y;E--;)D.push(A({x:O,y:B,angle:l,spread:d,startVelocity:u,color:S[E%S.length],shape:I[v(0,I.length)],ticks:C,decay:p,gravity:m,drift:w,scalar:x,flat:T}));return a?a.addFettis(D):(a=function(e,t,i,s,a){var o,l,d=t.slice(),u=e.getContext("2d"),p=c((function(t){function c(){o=l=null,u.clearRect(0,0,s.width,s.height),h.clear(),a(),t()}o=f.frame((function t(){n&&!(s.width===r.width&&s.height===r.height)&&(s.width=e.width=r.width,s.height=e.height=r.height),!s.width&&!s.height&&(i(e),s.width=e.width,s.height=e.height),u.clearRect(0,0,s.width,s.height),(d=d.filter((function(e){return k(u,e)}))).length?o=f.frame(t):c()})),l=c}));return{addFettis:function(e){return d=d.concat(e),p},canvas:e,promise:p,reset:function(){o&&f.cancel(o),l&&l()}}}(e,D,g,i,s),a.promise)}function T(i){var n=u||b(i,"disableForReducedMotion",Boolean),r=b(i,"zIndex",Number);if(n&&S)return c((function(e){e()}
1));o&&a?e=a.canvas:o&&!e&&(e=function(e){var t=document.createElement("canvas");return t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(r),document.body.appendChild(e)),l&&!w&&g(e);var s={width:e.width,height:e.height};function h(){if(p){var t={getBoundingClientRect:function(){if(!o)return e.getBoundingClientRect()}};return g(t),void p.postMessage({resize:{width:t.width,height:t.height}})}s.width=s.height=null}function f(){a=null,l&&(d=!1,t.removeEventListener("resize",h)),o&&e&&(document.body.contains(e)&&document.body.removeChild(e),e=null,w=!1)}return p&&!w&&p.init(e),w=!0,p&&(e.__confetti_initialized=!0),l&&!d&&(d=!0,t.addEventListener("resize",h,!1)),p?p.fire(i,s,f):x(i,s,f)}return T.reset=function(){p&&p.reset(),a&&a.reset()},T}function T(){return p||(p=x(null,{useWorker:!0,resize:!0})),p}i.exports=function(){return T().apply(this,arguments)},i.exports.reset=function(){T().reset()},i.exports.create=x,i.exports.shapeFromPath=function(e){if(!a)throw new Error("path confetti are not supported in this browser");var t,i;"string"==typeof e?t=e:(t=e.path,i=e.matrix);var n=new Path2D(t),r=document.createElement("canvas").getContext("2d");if(!i){for(var s,o,l=1e3,c=l,d=l,u=0,p=0,h=0;h<l;h+=2)for(var f=0;f<l;f+=2)r.isPointInPath(n,h,f,"nonzero")&&(c=Math.min(c,h),d=Math.min(d,f),u=Math.max(u,h),p=Math.max(p,f));s=u-c,o=p-d;var m=Math.min(10/s,10/o);i=[m,0,0,m,-Math.round(s/2+c)*m,-Math.round(o/2+d)*m]}return{type:"path",path:t,matrix:i}},i.exports.shapeFromText=function(e){var t,i=1,n="#000000",r='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';"string"==typeof e?t=e:(t=e.text,i="scalar"in e?e.scalar:i,r="fontFamily"in e?e.fontFamily:r,n="color"in e?e.color:n);var s=10*i,a=s+"px "+r,o=new OffscreenCanvas(s,s),l=o.getContext("2d");l.font=a;var c=l.measureText(t),d=Math.ceil(c.actualBoundingBoxRight+c.actualBoundingBoxLeft),u=Math.ceil(c.actualBoundingBoxAscent+c.actualBoundingBoxDescent),p=c.actualBoundingBoxLeft+2,h=c.actualBoundingBoxAscent+2;d+=4,u+=4,(l=(o=new OffscreenCanvas(d,u)).getContext("2d")).font=a,l.fillStyle=n,l.fillText(t,p,h);var f=1/i;return{type:"bitmap",bitmap:o.transferToImageBitmap(),matrix:[f,0,0,f,-d*f/2,-u*f/2]}}}(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),kD,!1);var xD=kD.exports,TD=(kD.exports.create,(()=>{class e{constructor(){this.continuityOfferType="continuity",this.freshPassContinuityOffer="IA FRESHPASS",this.behavioralOfferAttrs={startChallengeButtonName:"Activate",challengeCompletedStatusText:"Bonus Path Completed",inProgressStatusText:"In Progress",grClipTextOMS:"GR Clip",ucaEmailOptInTextOMS:"UCA Email Opt In",ecomFulfillmentTextOMS:"ECOM Fulfillment",grClipButtonText:"Go to Grocery Rewards",ucaEmailOptInButtonText:"Go to Account Settings",ecomFulfillmentButtonText:"Go to My Cart",ucaEmailOptInLink:"/customer-account/communication-preference.html",ecomFulfillmentLink:"/",grClipLink:"/foru/rewards.html",addToMyListBtnText:"Add to My List",viewInMyListText:"View in My List",myListLink:"/mylist.html",startShoppingText:"Start Shopping",startShoppingLink:"/",freshPassOfferText:"Redeem FreshPass offer",freshPassOfferLink:"/freshpass/manage/subscribe"}}isContinuity(e){return(e.offerProgramType&&e.offerProgramType.toLowerCase()===this.continuityOfferType.toLowerCase()||e.offerProtoType&&e.offerProtoType.toLowerCase()===this.continuityOfferType.toLowerCase())&&e.continuity}isClippedStatus(e){let t=!1;return this.isContinuity(e)&&("U"===e.status&&e.deleted||"C"===e.status?t=!0:"U"===e.status&&!e.deleted&&(t=!1)),t}isBehaviourOrContinuityCoupon(e){return e?.continuity||e.qualificationBehavior&&""!==e.qualificationBehavior}isFreshpassContinuityCoupon(e){let t=!1;return e.offerProtoType&&e.offerProtoType.toLowerCase()===this.continuityOfferType.toLowerCase()&&e.programSubType&&e.programSubType.trim().toLowerCase()===this.freshPassContinuityOffer.trim().toLocaleLowerCase()&&(t=!0),t}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})()),PD=(()=>{class e{constructor(e,t,i,n){this._http=e,this.appConfigService=t,this.continuityService=i,this._commonService=n,this.GALLERY_API=window.AB.galleryRegisterPath+"?storeId="+window.AB.userInfo.j4u.storeId+"&offerPgm=PD-CC&rand="+Math.floor(1e6*Math.random()),this.HTTP_OPTIONS={},this.objCoupons={},this.instantEventName=window.AB.COMMON.getURLParameterByName("eventName"),this.instantEventDateTime=window.AB.COMMON.getURLParameterByName("eventDateTime"),this.instantCorrelationId=window.AB.COMMON.getURLParameterByName("eventCorrelationId"),this.isDataCached=!1,this.rewardProtoTypes=["REWARDS_FLAT","REWARDS_ACCUMULATION"],this.instantAllocationReqBody={},this.couponUpdated=new kt,this.defaultModUnitImage={src:null,alt:null,openNewTab:null,dataSrc:null,target:null},this.isBonusPathPage=!1,this._companionGalleryOfferPOST=new kt,this.listenCompanionGalleryOfferPOST$=this._companionGalleryOfferPOST.asObservable(),this.onCouponsAndDealsPageReload=!1}getData(e,t,i=!1){return"new_registration"==this.instantEventName&&null!=this.instantEventDateTime&&null!=this.instantCorrelationId?(this.GALLERY_API=window.AB.instantAllocation,this.isInstantBitlyFlow()):(this.GALLERY_API=window.AB.xAPIgalleryPath+"?storeId="+window.AB.userInfo.j4u.storeId+"&rand="+Math.floor(1e6*Math.random()),i&&(this.isBonusPathPage=i,this.GALLERY_API=`${this.GALLERY_API}&includeOnlyBonusOffer=y`)),this.HTTP_OPTIONS={headers:new jy(window.AB.companionOffersxAPIHttpOptions)},this.getDataUsingCache(e,t)}getApiData(e,t){return"new_registration"==this.instantEventName&&null!=this.instantEventDateTime&&null!=this.instantCorrelationId?(this.GALLERY_API=window.AB.instantAllocation,this.isInstantBitlyFlow()):(this.GALLERY_API=window.AB.xAPIgalleryPath+"?storeId="+window.AB.userInfo.j4u.storeId,!1===window.AB.COMMON.authorize()?this.GALLERY_API+="&hpGuest=true":this.GALLERY_API+="&rand="+Math.floor(1e6*Math.random()),e&&99999!=e&&(this.GALLERY_API+="&limit="+e)),this.HTTP_OPTIONS={headers:new jy(window.AB.companionOffersxAPIHttpOptions)},this.getRemoteAPIData(this.GALLERY_API,this.HTTP_OPTIONS,e,t,!1)}isInstantBitlyFlow(){let e=window.AB.COMMON.getURLParameterByName("externalOfferId"),t=window.AB.COMMON.getURLParameterByName("offerId"),i=window.AB.COMMON.getURLParameterByName("division"),n={customerId:window.AB.userInfo.customerId,householdId:window.AB.userInfo.houseId,eventCorrelationId:this.instantCorrelationId,eventDateTime:this.instantEventDateTime,eventName:this.instantEventName,storeId:window.AB.COMMON.getURLParameterByName("storeId")?window.AB.COMMON.getURLParameterByName("storeId"):window.AB.userInfo.j4u.storeId};t&&e&&(n.offers=[{externalOfferId:e,offerId:t}]),i&&(n.division=window.AB.COMMON.getURLParameterByName("division")),this.instantAllocationReqBody=n}getDataUsingCache(e=99999,t=!1){let i=this.get("abJ4uCoupons");this.isDataCached=!0;let n=new Date;return n=Date.parse(n),!i||i.isHiddenEvents||this.isBonusPathPage||this.isLocalDataInvalid(i,n,e)?this.getRemoteData(this.GALLERY_API,this.HTTP_OPTIONS,e,t,!1):window.location.href.includes("coupons-deals")?(this.onCouponsAndDealsPageReload=!0,this.getRemoteData(`${this.GALLERY_API}&includeOnlyBonusOffer=y`,this.HTTP_OPTIONS,e,t,!1)):fi(this.returnFromLocalStorage(t,i,e))}returnFromLocalStorage(e,t,i){return e?t.instantAllocOffer:i?this.sortMappedCoupons(t.objCoupons).splice(0,i):this.sortMappedCoupons(t.objCoupons)}sortMappedCoupons(e){let t=Object.values(e).sort(((e,t)=>e.purchaseRank-t.purchaseRank)),i=[],n=[],r=[],s=[];return t.forEach((e=>{"C"===e.status&&i.push(e),"U"===e.status&&(n.push(e),"PD"===e.offerType?r.push(e):s.push(e))})),[...r,...s,...i]}sortByPurchaseRank(e){return Object.values(e).sort(((e,t)=>e.purchaseRank-t.purchaseRank))}isLocalDataInvalid(e,t,i){let n=window.AB.COMMON.getURLParameterByName("couponsClipped");return isNaN(parseInt(n))&&(n="0"),null==e.objCoupons||""==e.updatedTime||(t-Number(e.savedTime))/1e3/60>120||e.storeId!=window.AB.userInfo.j4u.storeId||parseInt(n)>0||e.authorize!=window.AB.COMMON.authorize()||e.carouselLimitItems<i}getRemoteData(e,t,i,n,r){this.isDataCached=!1;let s=Di((()=>fi([]))),a=window.AB.COMMON.authorize();return s=0!==Object.keys(this.instantAllocationReqBody).length?this._http.post(this.GALLERY_API,this.instantAllocationReqBody,this.HTTP_OPTIONS).pipe(bi((e=>{if(e){let t=this.instantAllocationReqBody.storeId?this.instantAllocationReqBody.storeId:window.AB.userInfo.j4u.storeId,s=new Date;s=Date.parse(s);let o=this.mapCoupons(e),l=o.coupons,c=o.instantAllocOffer,d={storeId:t,updatedTime:s,objCoupons:l,arrClippedCoupons:o.couponsClipped,instantAllocOffer:c,isHiddenEvents:r,authorize:a,carouselLimitItems:i};this.updateabJ4uCoupons(e,d);let u=this.sortMappedCoupons(l);if(this.onCouponsAndDealsPageReload){this.onCouponsAndDealsPageReload=!1;let e=JSON.parse(localStorage.getItem("abJ4uCoupons"));return this.returnFromLocalStorage(n,e,i)}return n?c:i?u.splice(0,i):u}return""}))):this._http.get(e,t).pipe(bi((e=>{if(e){let t=window.AB.userInfo.j4u.storeId,s=new Date;s=Date.parse(s);let o=this.mapCoupons(e),l=o.coupons,c=o.instantAllocOffer,d={storeId:t,updatedTime:s,objCoupons:l,arrClippedCoupons:o.couponsClipped,instantAllocOffer:c,isHiddenEvents:r,authorize:a,carouselLimitItems:i};this.updateabJ4uCoupons(e,d);let u=this.sortMappedCoupons(l);if(window.AB?.DATALAYER&&window.AB.DATALAYER.setP13nExperimentExposure(e,"deal
1s"),this.onCouponsAndDealsPageReload){this.onCouponsAndDealsPageReload=!1;let e=JSON.parse(localStorage.getItem("abJ4uCoupons"));return this.returnFromLocalStorage(n,e,i)}return n?c:i?u.splice(0,i):u}return""}))),s}updateabJ4uCoupons(e,t){if(this.isBonusPathPage||!this.isBonusPathPage&&window.location.href.includes("coupons-deals")&&"{}"!=JSON.stringify(this.get("abJ4uCoupons"))){let t=JSON.parse(localStorage.getItem("abJ4uCoupons"));if(t&&e&&e.companionGalleryOffer){for(let i in e.companionGalleryOffer)t.objCoupons[i]&&t.objCoupons[i].offerId===i&&(t.objCoupons[i]=e.companionGalleryOffer[i]);this.set("abJ4uCoupons",t)}}else this.set("abJ4uCoupons",t)}getRemoteAPIData(e,t,i,n,r){this.isDataCached=!1;let s=Di((()=>fi([])));return s=0!==Object.keys(this.instantAllocationReqBody).length?this._http.post(this.GALLERY_API,this.instantAllocationReqBody,this.HTTP_OPTIONS).pipe(bi((e=>{if(e){let t,r=this.mapCoupons(e);t=window.AB.COMMON.authorize()?this.sortByPurchaseRank(r.coupons):Object.values(r.coupons);let s=r.instantAllocOffer;return n?s:i?t.splice(0,i):t}return""}))):this._http.get(e,t).pipe(bi((e=>{if(e){let t;return t=window.AB.COMMON.authorize()?this.sortByPurchaseRank(e.companionGalleryOffer):Object.values(e.companionGalleryOffer),window.AB?.DATALAYER&&window.AB.DATALAYER.setP13nExperimentExposure(e,"deals"),t}return""}))),s}getHiddenEventsMapping(e){let t=[],i=[];return e&&e.offers&&(e.offers.forEach((e=>{if(e.clipStatus=e.deleted?"U":e.clipStatus,"C"==e.clipStatus){let t=typeof e.couponID>"u"?e.offerId:e.couponID;i=[...i,t]}var t=e.offerEndDt;e.status=e.clipStatus?e.clipStatus:"",e.category=e.category?e.category:"",e.events=e.events?e.events:[],e.brand=(e.titleDsc1?e.titleDsc1:"")+(e.titleDsc2?" "+e.titleDsc2:"")+(e.titleDsc3?" "+e.titleDsc3:""),e.description=(e.prodDsc1?e.prodDsc1:"")+(e.prodDsc2?" "+e.prodDsc2:"")+(e.prodDsc3?" "+e.prodDsc3:""),-1!==t.indexOf("-")?e.endDate=t.split("-")[1]+"/"+t.split("-")[2]+"/"+t.split("-")[0]:e.endDate=t?new Date(t).getTime():"",e.startDate=e.offerStartDt?new Date(e.offerStartDt).getTime():"",e.offerPrice=e.savingsValue?e.savingsValue:"",e.imageId=e.imageId?e.imageId:"",e.image=window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+e.imageId})),t=e.offers),t}mapCoupons(e){let t=[],i=[],n=[],r=e.companionGalleryOffer;if(null!=r){for(var s in r){var a=r[s];if(null!=a)if(a.status=a.deleted?"U":a.status,a.offerType="PD"==a.offerPgm?"PD":"CC",a.category=a.category?a.category:a.categoryType,a.brand=a.brand?a.brand:a.name,a.events=a.events?a.events:[],a.image=a.image?a.image:window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+a.imageId,"C"==a.status)t=[...t,a.offerId];else for(var o of a.events)"Welcome Offers"==o&&(n.push(a),a.instantAllocation=!0)}i=r}else e&&null!=e.offers&&(i=this.getHiddenEventsMapping(e));return{coupons:i,instantAllocOffer:n,couponsClipped:t}}set(e,t){if(this.appConfigService.isLSCompatible())try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error("ERROR: WWW COUPON - SETTING IN LOCAL STORAGE",e)}else this.objCoupons=t}get(e){if(this.objCoupons={},this.appConfigService.isLSCompatible()&&0===Object.keys(this.objCoupons).length){let t=localStorage.getItem(e);try{t&&(this.objCoupons=JSON.parse(t))}catch(e){console.error("ERROR: WWW COUPON - GETTING FROM LOCAL STORAGE",e)}}return this.objCoupons}changeBannerOnFilter(e,t){let i={};try{i=JSON.parse($(".just-for-you-category-mapping-json").text().trim())}catch{i={}}let n=[];$("#filter_by_coupon_category :checked").each(((e,t)=>{n.push($(t).attr("id"))})),$("#filter_by_coupon_events :checked").each(((e,t)=>{n.push($(t).attr("id"))}));let r=null;for(let e of n)if(Object.keys(i.categoryMapping).includes(e)){r=e;break}null==this.defaultModUnitImage.src&&(this.defaultModUnitImage.src=$(".mod-unit img").attr("src"),this.defaultModUnitImage.alt=$(".mod-unit img").attr("alt"),this.defaultModUnitImage.openNewTab=$(".mod-unit img").attr("openNewTab"),this.defaultModUnitImage.dataSrc=$(".mod-unit img").attr("data-src"),this.defaultModUnitImage.target=$(".mod-unit a").first().attr("href"));let s="https://images.albertsons-media.com/is/image/ABS/";r?($(".mod-unit img").attr({src:s+i.categoryMapping[r].imageName+"?"+t,alt:i.categoryMapping[r].imageAltText,openNewTab:i.categoryMapping[r].openNewTab}),$(".mod-unit img").attr("data-src",s+i.categoryMapping[r].imageName+"?"+t),$(".mod-unit a").first().attr({href:i.categoryMapping[r].targetURL}),$(".text-plate-container").hide(),$(".mod-unit__card").hide()):(null!=this.defaultModUnitImage.src&&($(".mod-unit img").attr({src:this.defaultModUnitImage.src,alt:this.defaultModUnitImage.alt,openNewTab:this.defaultModUnitImage.openNewTab}),$(".mod-unit img").attr("data-src",this.defaultModUnitImage.dataSrc),$(".mod-unit a").first().attr({href:this.defaultModUnitImage.target})),$(".text-plate-container").show(),$(".mod-unit__card").show())}initialBannerChange(e,t){let i=window.AB.COMMON.getURLParameterByName(e)?window.AB.COMMON.getURLParameterByName(e).split(","):"",n=JSON.parse($(".just-for-you-category-mapping").text().trim()),r=Object.keys(n.categoryMapping).find((e=>e===i.toString())),s="https://images.albertsons-media.com/is/image/ABS/";r&&this.getURLParameter()&&($(".mod-unit img").attr({src:s+n.categoryMapping[r].imageName+"?"+t,alt:n.categoryMapping[r].imageAltText,openNewTab:n.categoryMapping[r].openNewTab}),$(".mod-unit img").attr("data-src",s+n.categoryMapping[r].imageName+"?"+t),$(".mod-unit a").first().attr({href:n.categoryMapping[r].targetURL}),$(".text-plate-container").hide())}getURLParameter(){let e=window.AB.COMMON.getURLParameterByName("category")?window.AB.COMMON.getURLParameterByName("category"):"",t=window.AB.COMMON.getURLParameterByName("event")?window.AB.COMMON.getURLParameterByName("event"):"",i=window.AB.COMMON.getURLParameterByName("offerPgm")?window.AB.COMMON.getURLParameterByName("offerPgm"):"",n=[];return e&&n.push(e),t&&n.push(t),i&&n.push(i),n.length<2}clipCoupon(e,t,i){let n={headers:new jy(window.AB.j4uHttpOptions)},r=window.AB.couponClipPath+"?storeId="+t,s=Di((()=>fi({}))),a={};return a=e.deleted?{items:[{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]}:{items:[{clipType:"C",itemId:e.offerId,itemType:e.offerPgm},{clipType:"L",itemId:e.offerId,itemType:e.offerPgm}]},s=this._http.post(r,a,n).pipe(bi((t=>{if(console.warn("clip response",t),t&&t.items)if(1==t.items[0].status){e.status="C",e.deleted=!1,this.updateLocalStorage("abJ4uCoupons",!0,e),this._commonService.clipEcomGalleryCoupon(e.offerId);var n={brand:e.instantAllocation?"welcome-offer-clip":e.brand,offerType:e.offerPgm,offerId:e.offerId,offerPrice:e.offerPrice,carouselSection:window&&window.digitalData&&window.digitalData.productInfo&&window.digitalData.productInfo.carouselSection||""};window.AB.DATALAYER.clipCoupon(n,i)}else if(0==t.items[0].status){$("#splashModal").modal("hide"),$("#errorMod
1al").modal({show:!0});let i="200: Coupon Expired";t.items[0].errorCd&&t.items[0].errorMsg&&(i+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}else{$("#splashModal").modal("hide"),$("#errorModal").modal({show:!0});let i="200: Coupon Clip failed - status is not either 0 or 1";t.items[0].errorCd&&t.items[0].errorMsg&&(i+=" "+t.items[0].errorCd+" "+t.items[0].errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}else{$("#splashModal").modal("hide"),$("#errorModal").modal({show:!0});let i="200: Coupon Clip failed - items is not defined ";t.errorCd&&t.errorMsg&&(i+=" "+t.errorCd+" "+t.errorMsg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i)}return t}),(t=>{console.error("clip error",t);let i=t.status+": Coupon Clip failed";return"object"==typeof t.error&&Array.isArray(t.error.errors)&&t.error.errors.length>0&&(i+=" "+t.error.errors[0].code+" "+t.error.errors[0].msg),window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i),null}))),(""===window.AB.userInfo.profileEmail||""===window.AB.userInfo.profilePhone)&&this.triggerProgressiveProfile(),s}unclipCoupon(e){let t={headers:new jy(window.AB.j4uHttpOptions)},i=window.AB.couponUnclipPath,n=Di((()=>fi({}))),r={items:[{id:e.id}]};return n=this._http.post(i,r,t).pipe(bi((t=>{this.updateLocalStorage("abJ4uCoupons",!1,e),this._commonService.unclipEcomGalleryCoupon(e.referenceId);var i={brand:e.title,offerType:e.itemType,offerId:e.referenceId,offerPrice:e.savingsValue};return window.AB.DATALAYER.unClipCoupon(i),window.SWY.ENFORCEMENTUTILS.updateReInitSite("ecoupon"),t}),(t=>{console.error("Unclip error",t);let i=t.status+": Coupon UnClip failed";return"object"==typeof t.error&&Array.isArray(t.error.errors)&&t.error.errors.length>0&&(i+=" "+t.error.errors[0].code+" "+t.error.errors[0].msg),window.AB.DATALAYER.setError(e.id.toString(),"coupon clipping",i),null}))),n}updateLocalStorage(e,t,i){if(this.appConfigService.isLSCompatible()&&null!=localStorage[e]){let n=JSON.parse(localStorage[e]);if(n){n.updatedOn=(new Date).toLocaleString();let r=n.objCoupons;if(r&&null!=r[t?i.offerId:i.referenceId]){let e=r[t?i.offerId:i.referenceId];e.status=t?"C":"U",e.deleted=!t,1==e.instantAllocation&&t?(n.instantAllocOffer=[],e.instantAllocation=void 0):e.events.includes("Welcome Offers")&&!t&&(e.instantAllocation=!0,n.instantAllocOffer=[e])}n.arrClippedCoupons=t?[...n.arrClippedCoupons,i.offerId]:n.arrClippedCoupons.filter((e=>e!=i.referenceId)),localStorage[e]=JSON.stringify(n)}}}broadcastCompanionGalleryOfferPOST(e){this._companionGalleryOfferPOST.next(e)}convertJsonArrayToStringArray(e){return e.split(/[{}]/).map((e=>e.toLowerCase())).filter((e=>e)).filter((e=>","!==e))}findIconToDisplay(e){if(e.iconImage||(e.iconImage=""),e.logoSVGCouponItemImageEnable&&(e.iconImage="LastBeforeDefaultIconImage"),e.freshPassEnable&&e.freshPassCouponEventListener&&e.freshPassCouponEventListener.length>0&&Array.isArray(e.events)){let t=!1;for(let i in e.events){if(-1===e.freshPassCouponEventListener.map((e=>e.toLowerCase())).indexOf(e.events[i].toLowerCase())){t=!1;break}t=!0}t&&(e.iconImage="FreshPassIconImage")}e.UDCDealsEnable&&(e.iconImage="UDCDealIconImage")}triggerProgressiveProfile(){let e;try{e=JSON.parse(localStorage.getItem("abJ4uCoupons"))}catch{e=""}null!=e&&""!=e?e.arrClippedCoupons&&0==e.arrClippedCoupons.length&&this.showProgressiveProfile():this.getMyListData().subscribe((e=>{e&&""==(e.shoppingLists&&e.shoppingLists[0]&&e.shoppingLists[0].items?e.shoppingLists[0].items:"")&&this.showProgressiveProfile()}),(e=>{console.log(e)}))}getMyListData(){let e=Date.now(),t={headers:new jy(window.AB.j4uHttpOptions11)};return this._http.get(window.AB.myListPath+"?storeId="+window.AB.userInfo.j4u.storeId+"&_ws_as_ff=y&"+e,t)}showProgressiveProfile(){if($("#modalProfile").modal({show:!0}),window.AB?.COMMON?.modalTrapKeyboard("#modalProfile"),setTimeout((function(){document.getElementById("ppUsername").focus()}),500),window.AB.DATALAYER){let e=""===window.AB.userInfo?.profilePhone?"enter-mobile":"enter-email";window.AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:e,topNav:"cta:clip-coupon"})}}isRewardCoupon(e){return e.offerProgramType&&this.rewardProtoTypes.includes(e.offerProgramType)||e.offerProtoType&&this.rewardProtoTypes.includes(e.offerProtoType)}getLogoList(){let e=`${window.location.origin}/content/experience-fragments/xf/foru/logos/master.caas.json`;return this._http.get(e).pipe(bi((e=>{let t=e.root.responsivegrid.j4u_logos;return{FreshPassIconImage:{logo:t.freshPassLogo,altText:"Just 4 U Freshpass logo"},LastBeforeDefaultIconImage:{logo:t.forULogo,altText:"For U logo"},RewardsIconImage:{logo:t.rewardsLogo,altText:"Rewards logo"},defaultIconImage:{logo:t.defaultLogo,altText:"Just 4 U logo"}}})),$i(this.handleError))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error)return mi("error")}getOfferFalleryDataFilter(e,t){let i=window.AB.COMMON.getCookie("SWY_SYND_USER_INFO"),n="";if(i)try{n=JSON.parse(i).storeId}catch(e){console.error("Error parsing user info cookie:",e)}this.GALLERY_API=window.AB.offerGalleryFilterPath+"?storeId="+n,this.HTTP_OPTIONS={headers:new jy(window.AB.companionOffersxAPIHttpOptions)};let r={offerProgramType:e,programSubType:t};return this._http.post(this.GALLERY_API,r,this.HTTP_OPTIONS).pipe(bi((e=>e.offers)),$i((e=>(console.error("Error fetching offer gallery data filter:",e),mi("Error fetching offer gallery data filter. Please try again later.")))))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(TD),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),ED=["clippedMessage"];function DD(e,t){if(1&e){let e=Mf();kf(0,"button",17),jf("click",(function(){return Wa(e),Ha(Yf(2).clipDeal())})),am(1," Clip deal "),Tf(2,"span",18),xf()}if(2&e){let e=Yf(2);gh("aria-label","Clip deal: "+((null==e.couponData?null:e.couponData.brand)||""))}}function OD(e,t){1&e&&(kf(0,"div",19,0),Tf(2,"span",20),am(3," Clipped "),xf(
1))}function BD(e,t){if(1&e&&(kf(0,"div",3)(1,"div")(2,"div",4)(3,"div",5)(4,"div"),Tf(5,"div",6),xf(),kf(6,"div")(7,"div",7)(8,"div")(9,"div",8),am(10),xf(),kf(11,"div",9),am(12,"Welcome!"),xf()(),kf(13,"div")(14,"div",10),am(15),xf(),kf(16,"div",11)(17,"span",12),am(18),xf(),kf(19,"span",13),am(20),qm(21,"date"),xf()()()()()()(),ph(22,DD,3,1,"button",14)(23,OD,4,0,"div",15),Tf(24,"canvas",16),xf()()),2&e){let e=Yf();Vd(5),zh("innerHTML",null==e.couponData?null:e.couponData.cardImage,ed),Vd(5),lm(null==e.couponData?null:e.couponData.offerPrice),Vd(4),Jf("title",null==e.couponData?null:e.couponData.description),Vd(),cm(" ",null==e.couponData?null:e.couponData.description," "),Vd(3),cm("Expires ",null==e.couponData?null:e.couponData.refineEndDate,""),Vd(2),cm("Expires ",jm(21,8,e.couponData.endDate,"longDate"),""),Vd(2),zh("ngIf",!e.isClipped),Vd(),zh("ngIf",e.isClipped)}}function MD(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24),Tf(4,"div",25),xf()()()())}var RD=(()=>{class e{constructor(e,t,i){this.sanitized=e,this._j4uService=t,this._elementRef=i,this.close=new _l,this.onPopupNextflow=new _l,this.apiResponseReceived=new _l,this.isClipped=!1,this.couponData={},this.sm="575px",this.md="768px",this.isDataLoaded=!1,this.imagePath=window.AB.dMTProductCard}ngOnInit(){this.loadCouponData()}isCouponDataEmpty(e){return e&&0===Object.keys(e).length}dateConversion(e){let t=/\d+/.exec(e),i=new Date(parseInt(t[0]));return i.setUTCMilliseconds(t.index),i.toLocaleDateString("en-US")}getImageUrl(e,t){let i=this.imagePath||"//images.albertsons-media.com/is/image/ABS/${product.id}?$ecom-product-card-${viewport}-jpg$&defaultImage=Not_Available";return i?i.replace("${product.id}",t.imageId).replace("${viewport}",e):""}loadCouponData(){this._j4uService.getOfferFalleryDataFilter(["WOD_OR_POD"],["IA WELCOME"]).subscribe((e=>{null!=e&&e.length>0?(this.couponData=e[0],this.couponData.refineEndDate=this.dateConversion(this.couponData.endDate),this.couponData.cardImage=this.sanitized.bypassSecurityTrustHtml(`<picture>\n <source media="(min-width: ${this.md})" srcset="${this.getImageUrl("desktop",this.couponData)}">\n <source media="(min-width: ${this.sm})" srcset="${this.getImageUrl("tablet",this.couponData)}">\n <img loading="lazy" class="w-100 img-responsive" role="presentation" src="${this.getImageUrl("mobile",this.couponData)}" attr.aria-label="${this.couponData.brand}" alt="${this.couponData.brand}"/>\n </picture>`),this.apiResponseReceived.emit(!0)):this.apiResponseReceived.emit(!1),this.isDataLoaded=!0}),(e=>{this.isDataLoaded=!0,this.apiResponseReceived.emit(!1),console.error("There was an error!",e)}))}showConfetti(){xD.create($("#clipCanvas")[0],{resize:!0,useWorker:!0})({particleCount:100,spread:70,origin:{y:.6}})}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}clipDeal(){if(this._isRegistered()){let e=window.AB.userInfo.branchId,t={nativeElement:this._elementRef.nativeElement};this._j4uService.clipCoupon(this.couponData,e,t).subscribe((e=>{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.isClipped=!0,this.showConfetti(),setTimeout((()=>{this.clippedMessage.nativeElement.focus()}),0),setTimeout((()=>{this.onPopupNextflow.emit()}),3e3))}))}else this.close.emit(),window.AB.COMMON.showSignInModal_OTP(window.location.href)}static{this.ɵfac=function(t){return new(t||e)($d(mw),$d(PD),$d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-single-card"]],viewQuery:function(e,t){if(1&e&&tm(ED,5),2&e){let e;im(e=nm())&&(t.clippedMessage=e.first)}},outputs:{close:"close",onPopupNextflow:"onPopupNextflow",apiResponseReceived:"apiResponseReceived"},decls:2,vars:2,consts:[["clippedMessage",""],["class","referral-card__deal-card",4,"ngIf"],["class","carousel-content-loading",4,"ngIf"],[1,"referral-card__deal-card"],[1,"referral-card__deal-card-details","text-white"],[1,"referral-card__deal-card-details-container"],["role","img","aria-label","Coupon image","alt","Coupon image",1,"referral-card__deal-card-detail
1s-image",3,"innerHTML"],[1,"referral-card__deal-price-details"],[1,"referral-card__deal-price-details-per"],[1,"referral-card__deal-price-details-welcome"],[1,"referral-card__deal-price-details-offer-price",3,"title"],[1,"referral-card__deal-price-details-validity"],["aria-hidden","true"],[1,"sr-only"],["data-tabindex","last","class","btn btn--size__full-width pds-btn-outlined--primary referral-card__clip-btn",3,"click",4,"ngIf"],["class","referral-card__clipped","aria-live","polite","tabindex","-1","role","status",4,"ngIf"],["id","clipCanvas",1,"confetti-canvas"],["data-tabindex","last",1,"btn","btn--size__full-width","pds-btn-outlined--primary","referral-card__clip-btn",3,"click"],["aria-hidden","true",1,"svg-scissor","referral-card__icon","referral-card__scissor"],["aria-live","polite","tabindex","-1","role","status",1,"referral-card__clipped"],["aria-hidden","true",1,"svg-success-filled","referral-card__icon","referral-card__checkmark"],[1,"carousel-content-loading"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&ph(0,BD,25,11,"div",1)(1,MD,5,0,"div",2),2&e&&(zh("ngIf",!t.isCouponDataEmpty(t.couponData)),Vd(),zh("ngIf",!t.isDataLoaded))},dependencies:[cy,Ty],styles:[".confetti-canvas[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.carousel-content-loading[_ngcontent-%COMP%]{background:inherit;min-height:258px;height:258px;max-height:258px}"]})}}return e})(),LD=(()=>{class e{constructor(e){this.aemXfService=e,this.onClose=new _l,this.popupNextflow=new _l,this.welcomeHeader="",this.welcomeText="",this.referralImg="",this.referralMobileImg="",this.referralStarImg="",this.pgm="default"}ngOnInit(){this.loadExperienceFragment()}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{e.onboardingFlowAemData&&(this.aemData=e.onboardingFlowAemData,this.referralImg=e.onboardingFlowAemData.referralImage,this.referralMobileImg=e.onboardingFlowAemData.referralMobileImage,this.referralStarImg=e.onboardingFlowAemData.referralStarImage)}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}replaceBannerPlaceholder(e,t){return e.replace(/{\w+}/,t)}onApiResponseReceived(e){if(e){let e=window.AB?.onboardingEvent?.pgm||"default";this.welcomeHeader=this.replaceBannerPlaceholder("default"===e?this.aemData.welcomeReferralHeader:this.aemData.referralHeader,window.AB.userInfo.banner),this.welcomeText=this.replaceBannerPlaceholder("default"===e?this.aemData.welcomeReferralText:this.aemData.referralText,window.AB.userInfo.banner)}else{this.welcomeHeader=this.replaceBannerPlaceholder(this.aemData.welcomeReferralSubtext,window.AB.userInfo.banner);let e=document.querySelector(".referral-card__subtitle");e&&(e.setAttribute("tabindex","-1"),e.focus()),setTimeout((()=>{this.popupNextflow.emit()}),3e3)}}static{this.ɵfac=function(t){return new(t||e)($d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["welcome"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:19,vars:5,consts:[["role","document",1,"modal-dialog","referral-card-modal"],[1,"modal-content","referral-card-modal__content"],[1,"modal-header","referral-card-modal__header"],["media","(max-width: 600px)",3,"srcset"],["alt","",1,"referral-card-modal__cover-image",3,"src"],["type","button","data-dismiss","modal","data-tabindex","first","aria-label","Close",1,"referral-card-modal__close",3,"click"],[1,"svg-icon","svg-close-primary","referral-card-modal__close-icon"],["alt","",1,"referral-card-modal__star-img",3,"src"],[1,"modal-body","default-styles","web-otp","referral-card-modal__body"],[1,"auth-styles"],[1,"referral-card"],[1,"referral-card-body","text-center"],[1,"body-text","referral-card__subtitle"],[1,"referral-card__sub-text","body-text"],[3,"apiResponseReceived","close","onPopupNextflow"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"picture"),Tf(5,"source",3)(6,"img",4),xf(),kf(7,"button",5),jf("click",(function(){return t.onClose.emit()})),Tf(8,"span",6),xf(),Tf(9,"img",7),xf()(),kf(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11)(14,"h1",12),am(15),xf(),kf(16,"div",13),am(17),xf(),kf(18,"coupon-single-card",14),jf("apiResponseReceived",(function(e){return t.onApiResponseReceived(e)}))("close",(function(){return t.onClose.emit()}))("onPopupNextflow",(function(){return t.popupNextflow.emit()})),xf()()()()()()()),2&e&&(Vd(5),zh("srcset",t.referralMobileImg),Vd(),zh("src",t.referralImg,id),Vd(3),zh("src",t.referralStarImg,id),Vd(6),lm(t.welcomeHeader),Vd(2),lm(t.welcomeText))},dependencies:[RD],encapsulation:2})}}return e})();function FD(){this.setHref=e=>{window.location.href=e},this.getHref=()=>window.location.href,this.locationReload=()=>{window.location.reload()},this.locationReplace=e=>{window.location.replace(e)}}var ND=window.AB.COMMON.isB2BSite()?`/content/experience-fragments/b2b/www/${window.AB.userInfo.banner}/en/generic_content/footer/footer/jcr:content/root/responsivegrid/store_fulfillment_mo.model.json`:`/content/experience-fragments/www/${window.AB.userInfo.banner}/en/generic_content/footer-v2/footer/jcr:content/root/responsivegrid/store_fulfillment_mo.model.json`,UD=`${window.location.origin}${ND}`,VD=`${window.location.origin}/content/experience-fragments/www/account/b2c/onboarding/master/jcr:content/root/responsivegrid/onboarding_flow.model.json`,qD=`${window.location.origin}/content/experience-fragments/www/account/b2c/onboarding/master/jcr:content/root/responsivegrid/onboarding_flow.signIn.model.json`,$D=`${window.location.origin}/content/experience-fragments/b2b/www/${window.AB.userInfo.banner}/en/generic_content/footer/footer/jcr:content/root/responsivegrid/complete_profile_b2b.model.json`;function jD(){return window}
1var zD=(()=>{class e{constructor(e,t){this._http=e,this.featureFlagService=t}getStores(e,t){let i=e,n=(new jy).set("Ocp-Apim-Subscription-Key",jD().AB.wcaxXapiApimKey);return n=n.set("page-name","fulfillment-modal"),jD().AB.COMMON.authorize()&&(n=n.set("user-id",`${window.AB?.userInfo?.UUID||""}`)),this._http.get(i,{headers:n,params:t}).pipe(sn(1))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function WD(){return window}var HD=(()=>{class e{constructor(e,t,i){this._http=e,this.storeResolverService=t,this.featureFlagService=i,this.isInstaCartHidden=new Tt(!0),this.subject=new kt,this.zipcode=new kt,this.refreshStoreModal=new kt,this.onNextPopup=new kt,this.windowLocation=new FD,this.isMultiDeliveryDisable=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("isMultiDeliveryDisable"))||window.SWY.CONFIGSERVICE.featureToggleConfig.isMultiDeliveryDisable,this.isMarketPlaceEnabled=!!(window.AB.storeFlagsData&&window.AB.storeFlagsData.flags&&window.AB.storeFlagsData.flags.ecomStore&&"true"==window.AB.storeFlagsData.flags.ecomStore.isMKPEnabled),this.isSellerEnabled=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.isSellerEnabled,this.storeFlagsData=window.AB.storeFlagsData,this.isMKPEnabled=this.checkMKPFlag(),this.isMKPAndSellerEnabled=this.isMKPEnabled&&this.isSellerEnabled,this.isWineShopDisabled=!(window.AB&&window.AB.storeFlagsData&&window.AB.storeFlagsData.flags&&window.AB.storeFlagsData.flags.ecomStore&&window.AB.storeFlagsData.flags.ecomStore.storeFeatures.isWineD2CEnabled),this.userResolvedAddress=new Tt([])}checkMKPFlag(){if(!function(e){return typeof e>"u"||null===e||0===Object.keys(e).length}(this.storeFlagsData))return this._mkpStoreFlagEnabled();document.addEventListener("storeFlagsLoadComplete",(()=>this._mkpStoreFlagEnabled()),{once:!0})}_mkpStoreFlagEnabled(){let e=window.AB.storeFlagsData;return!!(e&&e.flags&&e.flags.ecomStore&&"true"==e.flags.ecomStore.isMKPEnabled)}getStores(e){let t="";return t=WD().AB.allowWiremockService?"record"===this.getParams("mode")?WD().AB.storeResolverRecordEndpoint:"playback"===this.getParams("mode")?WD().AB.storeResolverPlaybackEndpoint:WD().AB.storeResolverAllEndpointV2:WD().AB.storeResolverAllEndpointV2,this.storeResolverService.getStores(t,e)}getParams(e){let t=new URLSearchParams(window.location.search);return t.get(e)?t.get(e):null}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error)return mi(e.error)}triggerCreateAccount(e){this.subject.next(e)}redirectOnboardingWidget(e,t,i){let n="www-"+e,r=WD().SWY.CONFIGSERVICE.bannerDomainMap[n],s=WD().location.pathname;t&&this.windowLocation.setHref(r+s+"?state=signup&zipcode="+t+i),this.windowLocation.setHref(r+s+"?state=signup"+i)}fulfillmentSelectionCallback(){"preselection"===localStorage.getItem("toastMessage")&&localStorage.setItem("toastMessage","selection")}getCbaRequestObject(e,t,i=!1){let n={};if(WD().AB.COMMON.isLSCompatible()&&t&&e){let r=this.getProductBPNFromCartObj();if(!1!==window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isDigitalDeliDisabled==!1&&(n.customizableBpns=this.getCustomizableBpnListFromCartObj()),i){let e=this.getSellerProductBPNFromCartObj();e?.length>0&&(n.sellerProducts=e)}r?.length<1&&!i?(n.status=!1,console.error("No cart info available")):(n.channel=e,n.stores=t,n.bpns=r)}else n.status=!1,console.error("Required information missing either preference or Stores Array or Local storage is not compatible");return n}getCustomizableBpnListFromCartObj(){let e=localStorage.getItem("abCart"),t=[];return e&&(e=JSON.parse(e),e.cartItems?.length>0&&e.cartItems.forEach((e=>{if(e.itemId&&!1===e.multiCustomizations&&!0===e.isCustomizable){let i=[],n={};e.itemId&&e.options&&e.options.length>0&&(e.options.forEach((e=>{e.upcId&&i.push(e.upcId)})),n={bpn:e.itemId.toString(),selectedModifiers:i}),i&&i.length>0&&t.push(n)}}))),t}getProductBPNFromCartObj(){let e=!0===window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isB2BDisabled,t=localStorage.getItem("abCart"),i=[];if(t){if(t=JSON.parse(t),!e&&"B"===window.AB?.userInfo?.siteType){let e=this.getB2bBpnListFromCartObj(t);if(e?.length>0)return e}t.cartItems?.length>
10&&t.cartItems.forEach((e=>{(e.itemId&&!0===e.multiCustomizations&&!0===e.isCustomizable||e.itemId&&!1===e.isCustomizable)&&i.push(e.itemId.toString())}))}return i}getB2bBpnListFromCartObj(e){let t=[];return e&&e.cart&&e.cart["1P_B2B"]&&e.cart["1P_B2B"].cartItems?.length>0&&(t=e.cart["1P_B2B"].cartItems?.map((e=>e&&void 0!==e.itemId?e.itemId.toString():null)).filter((e=>null!=e))),t}getSellerIdsFromCart(e){return e&&e.cart&&"object"==typeof e.cart?Object.keys(e.cart):null}getSellerFromCart(){let e=JSON.parse(localStorage.getItem("abCart")),t=this.getSellerIdsFromCart(e);if(t?.length>0&&e&&e.cart){let i=e.cart;return t?.map((e=>void 0!==i[e].seller?i[e]:null)).filter((e=>null!=e))}}getSellerProductBPNFromCartObj(){let e=this.getSellerFromCart(),t=[],i=[];if(e?.length>0)return e.forEach((e=>{e.cartItems?.length>0&&e.cartItems.forEach((e=>{e.itemId&&t.push(e.itemId.toString())})),i.push({sellerId:e?.seller?.sellerId,bpns:t})})),i}getProductAvailability(e){let t,i=WD().AB.catalogXapiCbaEndpoint;return t={headers:new jy(WD().AB.catalogCbaHttpOptions)},this._http.post(i,JSON.stringify(e),t).pipe(bi((e=>e)))}getUserAddresses(){let e=`${WD().AB.userAddresses.replace("{uuid}",WD().AB.userInfo.UUID)}?resolveStoresWithGeoCodes=true`,t={headers:new jy(WD().AB.ucaHttpOptionsV3)};return this._http.get(e,t).pipe(bi((e=>e)),$i((e=>(console.warn("getUserAddresses Error ",e),mi(e)))))}addUserAddress(e){let t=WD().AB.fulfillmentPreferences.replace("{customerId}",WD().AB.userInfo.UUID),i={headers:new jy(WD().AB.ucaHttpOptionsFulfillmentServlet)};return this._http.post(t,e,i).pipe(bi((e=>(console.warn("Add User Response",e),e))),$i((e=>(console.warn("Add user addresses Error ",e),mi(e)))))}addUserAddressV2(e){let t=WD().AB.fulfillmentDefaultAddressV2.replace("{customerId}",WD().AB.userInfo.UUID),i={headers:new jy(WD().AB.ucaHttpOptionsV2)};return i.headers=i.headers.set("Authorization","Bearer "+WD().AB.userInfo.SWY_SHOP_TOKEN),this._http.post(t,e,i).pipe(bi((e=>(console.warn("Add User Response",e),e))),$i((e=>(console.warn("Add user addresses Error ",e),mi(e)))))}addEllipsis(e){let t,i,n=Math.round(e.length/2);if(t=$(window).width()<768?49:$(window).width()<1024?61:50,e.length>t){let r=Math.round((e.length-t)/2);return i=73==t?"...\n":"...",e.substring(0,n-r)+i+e.substring(n+r,e.length)}return e}isZipMKTPEligible(e){let t,i,n=($("#popup-wrapper").data("bs.modal")||{})._isShown?"#popup-wrapper":"#storeFulfillmentModal";window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId&&(t=window.location.protocol+"//"+window.location.host+window.AB.webPreloadPath+"/"+window.AB.userInfo.branchId,e&&(t=t+"?zipcode="+e));let r={headers:new jy({"ocp-apim-subscription-key":window.AB.preloadStoreFlagsXapiApimKey})};return this._http.get(t,r).pipe(bi((e=>{if(e&&Object.keys(e).length>0)return i=e.ecomStore&&e.ecomStore.isMKPEnabled,"true"!==i&&$(n)&&$(n).length>0&&($(n).modal("hide"),window.ErrorStateModalComp.triggerEmptyStateModal("#mktpErrorModal")),i})))}getAddressAvailability(e){let t="",i={};window.AB&&window.AB.storesByAddressEndpoint&&(t+=window.location.protocol+"//"+window.location.host+window.AB.storesByAddressEndpoint,window.AB.userInfo&&(i["request-id"]=this._getUTCTimeStampRandom()));let n={headers:new jy({"Content-type":"application/json","ocp-apim-subscription-key":window.AB.preloadStoreFlagsXapiApimKey}),params:i};return n.headers=n.headers.set("page-name","fulfillment-modal"),n.headers=n.headers.set("zipCoverage","FULL"),WD().AB.COMMON.authorize()&&(n.headers=n.headers.set("user-id",`${window.AB?.userInfo?.UUID||""}`)),this._http.post(t,JSON.stringify(e),n).pipe(bi((e=>e)))}getZipcodeValidity(e){let t="";window.AB&&window.AB.storeResolverZipToCityEndpoint&&(t+=window.location.protocol+"//"+window.location.host+window.AB.storeResolverZipToCityEndpoint+`?zipcode=${e}`);let i={headers:new jy({"ocp-apim-subscription-key":window.AB.wcaxXapiApimKey})};return this._http.get(t,i).pipe(bi((e=>e)))}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}removeGeoCookie(){let e=this.getGeoCookieName();window.AB.COMMON.getCookie(e)&&(document.cookie=`${e}=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/;`)}getGeoCookieName(){return"B"===window.AB?.userInfo?.siteType?"ACI_F_B_DELIVERY_ADDR":"ACI_F_DELIVERY_ADDR"}normalizePostalCode(e){return e&&e.length>5?e.substring(0,e.indexOf("-"))||e:e||""}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(zD),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),YD=(()=>{class e{constructor(e){this._http=e,this.AB=window.AB,this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this._pointsApiLoading=new Tt(!0),this._pointsAvailable=new Tt(0),this._dealsApiLoading=new Tt(!0),this._dealsAvailable=new Tt(0),this.pointsApiLoading$=this._pointsApiLoading.asObservable(),this.pointsAvailable$=this._pointsAvailable.asObservable(),this.dealsApiLoading$=this._dealsApiLoading.asObservable(),this.dealsAvailable$=this._dealsAvailable.asObservable(),this.bothApisLoaded$=ki([this.pointsApiLoading$,this.dealsApiLoading$]).pipe(bi((([e,t])=>!e&&!t))),this.combinedData$=ki([this.pointsAvailable$,this.dealsAvailable$,this.bothApisLoaded$]).pipe(qi((([e,t,i])=>i)),bi((([e,t,i])=>({pointsAvailable:e,dealsAvailable:t,isLoaded:i})))),this.currentScreen.next("migrationScreen")}
1setCurrentScreen(e){this.currentScreen.next(e)}setPointsLoading(e){this._pointsApiLoading.next(e)}setPointsAvailable(e){this._pointsAvailable.next(e)}setDealsLoading(e){this._dealsApiLoading.next(e)}setDealsAvailable(e){this._dealsAvailable.next(e)}getRewardsScoreCardV3(e){let t={hhid:this.AB.userInfo.houseId,programType:[e]},i=this.AB.ocrpRewardScorecard,n=this.AB.xAPIOcrpRewardsHttpOptionsV3,r={headers:f(h({},n),{Accept:"application/vnd.safeway.v3+json","X-ABS-Client-ID":"WEB"})};return this._http.post(i,t,r)}getClippedOffers(){let e=window.AB.userInfo.branchId,t=window.AB.clippedCouponPath+"?storeId="+e,{b4uClippedSubscriptionKey:i=""}=window.SWY?.CONFIGSERVICE?.datapowerConfig,n=window.AB.clippedCouponsHttpHeader,r={headers:f(h({},n),{"Ocp-Apim-Subscription-Key":i})};return this._http.get(t,f(h({},r),{observe:"response"}))}sendFistLoginAcknowledgment(){let e=this.AB.firstTimeLoginAcknowledgementPath.replace("{customerId}",this.AB.userInfo.UUID),t=window.AB.ucaHttpOptionsPatch,i={headers:f(h({},t),{"x-swy-banner":window.SWY.CONFIGSERVICE.getResolvedBanner(),Authorization:`Bearer ${window.AB.userInfo.SWY_SHOP_TOKEN}`})};return this._http.patch(e,JSON.stringify({}),f(h({},i),{responseType:"json",observe:"response"}))}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),GD="Currently, delivery in this area isnât available. \n Please, try another ZIP Code.",KD="Apologies, our site is currently experiencing technical difficulties, please try again later.",QD=(()=>{class e{constructor(e){this._featureFlagService=e,this._abTargetLoadedState=new Tt(!1),this.abTargetLoadedState$=this._abTargetLoadedState.asObservable(),this.isABFlagDisabledEvent=new kt,this.isABFlagDisabledEvent$=this.isABFlagDisabledEvent.asObservable(),this.setGRSSpecificParamsInLS=function(){window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_1835&&"a"===window.analyticsSwy.testFlags.EOT_1835.toLowerCase()&&(window.AB.COMMON.setUpdateVisitorIdForGrs(),window.AB.COMMON.setSessionIdForGrs())},this.isTargetLoadComplete()?this._abTargetLoadedState.next(!0):(console.warn("========> AB TESTING ====> target flag is not loaded"),window.addEventListener("AdobeTarget-Complete",(e=>{console.warn("========> AB TESTING ====> AdobeTarget-Complete event listener called"),this.setGRSSpecificParamsInLS(),this._abTargetLoadedState.next(!0)}),{once:!0}))}isTargetLoadComplete(){let e=!1;return window.analyticsSwy&&window.analyticsSwy.testFlags&&1==window.analyticsSwy.testFlags["AdobeTarget-Complete"]&&(e=!0),e}isABTestingDisabled(){let e=!1,t=new URLSearchParams(window.location.search).get("mboxDisable");return t&&("1"==t||"true"==t.toLowerCase())&&(e=!0),e}getTargetFlagValue(e){return window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags[e]}listenToABXTestingFlag(e,t,i,n=5e3){if(this._featureFlagService.getFeatureFlagByNameDisable(t))localStorage.removeItem(e),this.isABFlagDisabledEvent.next({flagName:t,testValue:"a"});else{let r=localStorage.getItem(e);if(r)this.isABFlagDisabledEvent.next({flagName:t,testValue:r});else if(window?.analyticsSwy?.testFlags?.[i]){let e=window.analyticsSwy.testFlags[i];this.isABFlagDisabledEvent.next({flagName:t,testValue:e})}else{let e,r=n=>{clearTimeout(e);let r=n.detail[i];this.isABFlagDisabledEvent.next({flagName:t,testValue:r})};window.addEventListener(i,r,{once:!0}),e=setTimeout((()=>{window.removeEventListener(i,r),this.isABFlagDisabledEvent.next({flagName:t,testValue:"a"})}),n)}}}static{this.ɵfac=function(t){return new(t||e)(lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),JD=["accordion--active"],ZD=e=>({active:e}),XD=e=>({"b2b-logo":e}),eO=(e,t)=>({"chevron-up":e,"chevron-down":t}),tO=e=>({disabled:e});function iO(e,t){1&e&&Tf(0,"span",30)}function nO(e,t){1&e&&(So(),kf(0,"svg",31)(1,"g",32)(2,"g",33)(3,"g",34),Tf(4,"circle",35)(5,"line",36)(6,"line",37)(7,"line",38)(8,"line",39),xf()()()())}function rO(e,t){1&e&&Tf(0,"span",40)}
1function sO(e,t){1&e&&(So(),kf(0,"svg",41),Tf(1,"path",42),xf())}function aO(e,t){if(1&e&&(kf(0,"div",43),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.inputErrorMessage,"")}}function oO(e,t){if(1&e){let e=Mf();kf(0,"li",56),jf("click",(function(t){Wa(e);let i=Yf(2);return i.getStoresList(t,"instore"),Ha(i.channelSelection("instore"))})),kf(1,"a",57),jf("keyup.arrowright",(function(){return Wa(e),Ha(Yf(2).setTab("modal-tab-delivery"))}))("keyup.arrowleft",(function(){return Wa(e),Ha(Yf(2).setTab("modal-tab-pickup"))})),am(2,"In Store"),xf()()}if(2&e){let e=Yf(2);zh("ngClass","modal-tab-instore"===e.activeTab?"modal-tabs--active dst-modal-tab--instore":"modal-tabs--inactive"),Vd(),gh("aria-selected","modal-tab-instore"===e.activeTab?"true":"false")("tabindex","modal-tab-instore"===e.activeTab?"0":"-1")}}function lO(e,t){if(1&e&&(Ef(0),kf(1,"div",58),am(2),qm(3,"async"),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",$m(3,1,e.serviceErrorMessage)," ")}}function cO(e,t){if(1&e&&(Ef(0),kf(1,"div",59),So(),kf(2,"svg",60)(3,"g",61)(4,"g",62)(5,"g",63)(6,"g",64)(7,"g",65)(8,"g",66),Tf(9,"path",67),xf()()()()()()(),Co(),kf(10,"p",68),am(11),xf()(),Df()),2&e){let e=Yf(3);Vd(11),cm(" ",e.inStoreVnCErrorMessage," ")}}function dO(e,t){if(1&e&&(Ef(0),Tf(1,"store-card",75),Df()),2&e){let e=Yf().$implicit,t=Yf(6);Vd(),zh("isThemeBuilderEnabled",t.isThemeBuilderEnabled)("behaviourType",t.requestType)("store",e)("storesWithLimit",t.storesWithLimit)("isReBanneredStore",t.isReBanneredStore)("isPartialCoverage",t.isPartialCoverage)("isPopupWrapperView",t.isPopupWrapperView)("isStoreSelectionWrapperView",t.isStoreSelectionWrapperView)("shRedirectPath",t.shRedirectPath)("shCallback",t.shCallback)("spaIntent",t.spaIntent)("nativeCallback",t.nativeCallback)("platform",t.platform)("appDeepLinks",t.appDeepLinks)}}function uO(e,t){if(1&e&&(kf(0,"div",76)(1,"div",77),Tf(2,"img",78),qm(3,"lowercase"),qm(4,"titlecase"),kf(5,"p",79),am(6),xf(),kf(7,"p",79),am(8),xf()()(),kf(9,"div",80)(10,"div",81)(11,"a",82),am(12,"Selected"),xf()()()),2&e){let e=Yf().$implicit;Vd(),Zf("id","addressOf_",e.storeID,""),Vd(),df("store-icon-logo ",$m(3,14,null==e?null:e.bannerName),""),Jf("src",e.storeLogoURL,id),zh("alt",e.isB2BStore?$m(4,16,e.bannerName)+" Business":e.storeName+" logo")("ngClass",Om(18,XD,null==e?null:e.isB2BStore)),Vd(4),lm(e.street),Vd(2),um("",e.city,", ",e.state," ",e.zipcode," "),Vd(3),_h("aria-describedby","addressOf_",e.storeID,"")}}function pO(e,t){if(1&e&&(kf(0,"div",74),ph(1,dO,2,14,"ng-container",53)(2,uO,13,20,"ng-template",null,9,Wm),xf()),2&e){let e=t.$implicit,i=sm(3);Vd(),zh("ngIf",0==e.selected)("ngIfElse",i)}}function hO(e,t){if(1&e){let e=Mf();kf(0,"button",83),jf("click",(function(t){return Wa(e),Ha(Yf(6).loadMoreStore(t))})),am(1," Load More Stores "),xf()}}function fO(e,t){if(1&e&&(kf(0,"div",59),ph(1,pO,4,2,"div",72)(2,hO,2,0,"button",73),xf()),2&e){let e=Yf(5);Vd(),zh("ngForOf",e.storesWithLimit),Vd(),zh("ngIf",e.showLoadMore)}}function mO(e,t){1&e&&Tf(0,"span",87)}function gO(e,t){1&e&&(So(),kf(0,"svg",60)(1,"g",61)(2,"g",62)(3,"g",63)(4,"g",64)(5,"g",65)(6,"g",66),Tf(7,"path",67),xf()()()()()()())}function bO(e,t){if(1&e&&(kf(0,"div",59),ph(1,mO,1,0,"span",84)(2,gO,8,0,"svg",85),kf(3,"p",86),am(4,"Sorry, no stores found in that ZIP Code"),xf()()),2&e){let e=Yf(5);Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled)}}function yO(e,t){if(1&e&&(kf(0,"div",70),ph(1,fO,3,2,"div",71)(2,bO,5,2,"ng-template",null,8,Wm),xf()),2&e){let e=sm(3),t=Yf(4);Vd(),zh("ngIf",t.showStores)("ngIfElse",e)}}function vO(e,t){if(1&e&&ph(0,yO,4,2,"div",69),2&e){zh("ngIf",!Yf(3).showLoading)}}function wO(e,t){if(1&e&&ph(0,cO,12,1,"ng-container",53)(1,vO,1,1,"ng-template",null,7,Wm),2&e){let e=sm(2);zh("ngIf",Yf(2).isWineShopAvailable)("ngIfElse",e)}}function _O(e,t){if(1&e&&(Ef(0),kf(1,"div",58),am(2),qm(3,"async"),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",$m(3,1,e.serviceErrorMessage)," ")}}function SO(e,t){1&e&&Of(0)}function CO(e,t){if(1&e&&ph(0,SO,1,0,"ng-container",88),2&e){Yf();let e=sm(19),t=sm(21);zh("ngIf",Yf().isGuestUser)("ngIfThen",e)("ngIfElse",t)}}function IO(e,t){if(1&e){let e=Mf();
1Ef(0),kf(1,"store-address-form",89),jf("setStoreData",(function(t){return Wa(e),Ha(Yf(3).receiveDeliveryAddrData(t))})),xf(),Df()}if(2&e){let e=Yf(3);Vd(),zh("guestPartialDeliveryMsg",e.guestPartialDeliveryMsg)("isEditStoreAddress",e.isStoreAvailableWithUserAddr)("zipCode",e.zipCode)("enableStoreSelectionWrapper",e.enableStoreSelectionWrapper)}}function AO(e,t){if(1&e&&ph(0,IO,2,4,"ng-container",53),2&e){Yf();let e=sm(23);zh("ngIf",Yf().isPartialCoverage)("ngIfElse",e)}}function kO(e,t){1&e&&(kf(0,"p",106),am(1,"Default"),xf())}function xO(e,t){if(1&e){let e=Mf();kf(0,"div",97)(1,"div")(2,"p",98),am(3),xf(),ph(4,kO,2,0,"p",99),xf(),kf(5,"div",100)(6,"p",101),am(7),xf(),kf(8,"p",102),am(9),xf(),kf(10,"p",103),am(11),xf(),kf(12,"p",104),am(13),xf()(),kf(14,"div")(15,"button",105),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(5).callStoresByAddressAPI(t,!0))})),am(16,"Use Address"),xf()()()}if(2&e){let e=t.$implicit;Vd(3),lm(null==e||null==e.addressType?null:e.addressType.description),Vd(),zh("ngIf",null==e?null:e.isDefaultAddress),Vd(3),dm("",null==e||null==e.name?null:e.name.firstName," ",null==e||null==e.name?null:e.name.lastName,""),Vd(2),lm(null==e?null:e.address1),Vd(2),lm(null==e?null:e.address2),Vd(2),um("",null==e?null:e.city,", ",null==e?null:e.state," ",null==e?null:e.zipCode,""),Vd(2),Ah("aria-label","use adress ",null==e?null:e.address1," ",null==e?null:e.address2," ",null==e?null:e.city,", ",null==e?null:e.state," ",null==e?null:e.zipCode,"")}}function TO(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",90)(2,"div",91)(3,"p",92),am(4),xf(),kf(5,"div",93)(6,"div",94)(7,"a",95),jf("click",(function(){Wa(e);let t=Yf(4);return t.isNewAddress=!0,Ha(t.isStoreAvailableWithUserAddr=!1)}))("keyup.enter",(function(){Wa(e);let t=Yf(4);return t.isNewAddress=!0,Ha(t.isStoreAvailableWithUserAddr=!1)})),am(8,"Add new address"),xf()(),ph(9,xO,17,15,"div",96),xf()()(),Df()}if(2&e){let e=Yf(4);Vd(4),lm(e.registerPartialDeliveryMsg),Vd(5),zh("ngForOf",e.userAddresses)}}function PO(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"store-address-form",107),jf("setStoreData",(function(t){return Wa(e),Ha(Yf(4).receiveDeliveryAddrData(t))})),xf(),Df()}if(2&e){let e=Yf(4);Vd(),zh("registerPartialDeliveryMsg",e.registerPartialDeliveryMsg)("isEditStoreAddress",e.isStoreAvailableWithUserAddr)("enableStoreSelectionWrapper",e.enableStoreSelectionWrapper)}}function EO(e,t){if(1&e&&(Ef(0),ph(1,TO,10,2,"ng-container",28)(2,PO,2,3,"ng-container",28),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.isNewAddress),Vd(),zh("ngIf",e.isNewAddress)}}function DO(e,t){if(1&e&&ph(0,EO,3,2,"ng-container",53),2&e){Yf();let e=sm(23);zh("ngIf",Yf().isPartialCoverage)("ngIfElse",e)}}function OO(e,t){if(1&e&&(Ef(0),kf(1,"div",59),Tf(2,"span",112),kf(3,"p",113),am(4),xf()(),Df()),2&e){let e=Yf(3);Vd(4),lm(e.deliveryVnCErrorMessage)}}function BO(e,t){if(1&e){let e=Mf();kf(0,"div",115)(1,"div",116)(2,"div",117),am(3,"Your address"),xf(),kf(4,"div",118)(5,"div",101),am(6),xf(),kf(7,"div",119),am(8),xf(),kf(9,"div",120),am(10),xf()()(),kf(11,"div",121),So(),kf(12,"svg",122),jf("click",(function(){return Wa(e),Ha(Yf(4).editDeliveryAddrForm())}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).editDeliveryAddrForm())})),kf(13,"g",123),Tf(14,"path",124),xf(),kf(15,"defs")(16,"clipPath",125),Tf(17,"rect",126),xf()()()()()}if(2&e){let e=Yf(4);Vd(6),lm(e.getResolvedAddress().name),Vd(2),lm(e.getResolvedAddress().streetAddr),Vd(2),lm(e.getResolvedAddress().city),Vd(2),Sh("aria-label","edit your address ",e.getResolvedAddress().streetAddr," ",e.getResolvedAddress().city,"")}}function MO(e,t){if(1&e&&ph(0,BO,18,6,"div",114),2&e){let e=Yf(3);zh("ngIf",e.isStoreAvailableWithUserAddr&&e.getResolvedAddress().streetAddr)}}function RO(e,t){1&e&&(So(),kf(0,"svg",127)(1,"g",128),Tf(2,"path",129),xf()())}function LO(e,t){1&e&&Tf(0,"span",130)}function FO(e,t){if(1&e&&(kf(0,"p",131),am(1),xf()),2&e){let e=Yf(3);Vd(),lm(e.deliveryHeading)}}function NO(e,t){1&e&&Tf(0,"span",141)}function UO(e,t){1&e&&(So(),kf(0,"svg",142)(1,"g",128)(2,"g",143)(3,"g",144)(4,"g",145),Tf(5,"path",146)(6,"path",147)(7,"path",148)(8,"path",149),xf()()()()())}function VO(e,t){if(1&e&&(Ef(0),kf(1,"div",132)(2,"div")(3,"p",133),am(4,"Â "),xf(),ph(5,NO,1,0,"span",134)(6,UO,9,0,"svg",135),kf(7,"p",136),am(8),xf(),kf(9,"div")(10,"span",137),am(11),xf(),kf(12,"div",138),Tf(13,"img",139),xf()(),kf(14,"p"),am(15,"Â "),xf(),kf(16,"a",140),am(17),xf(),kf(18,"p"),am(19,"Â "),xf()()(),Df()),2&e){let e=Yf(4);
1Vd(5),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(2),cm(" ",e.fulfillmentObj.instacartShortDescription,""),Vd(3),lm(e.fulfillmentObj.poweredby),Vd(2),Jf("src",e.fulfillmentObj.instacartimage,id),Vd(3),Jf("href",e.fulfillmentObj.instacartUrl,id),gh("aria-label",e.fulfillmentObj.buttontext),Vd(),cm(" ",e.fulfillmentObj.buttontext," ")}}function qO(e,t){if(1&e&&(Ef(0),ph(1,VO,20,8,"ng-container",28),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.isWineShopAvailable)}}function $O(e,t){if(1&e&&(kf(0,"div",74),Tf(1,"store-card",150),xf()),2&e){let e=t.$implicit,i=Yf(5);Vd(),zh("isThemeBuilderEnabled",i.isThemeBuilderEnabled)("behaviourType",i.requestType)("store",e)("storesWithLimit",i.storesWithLimit)("isReBanneredStore",i.isReBanneredStore)("sellerProducts",i.sellerProducts)("oosSellerTotal",i.oosSellerTotal)("mkpSellers",i.mkpSellers)("unavailableSeller",i.unavailableSeller)("addrDetailsFromStoreByAddr",i.addrDetailsFromStoreByAddr)("isStoreAvailableWithUserAddr",i.isStoreAvailableWithUserAddr)("zipCoverage",i.zipCoverage)("isPopupWrapperView",i.isPopupWrapperView)("isStoreSelectionWrapperView",i.isStoreSelectionWrapperView)("shRedirectPath",i.shRedirectPath)("shCallback",i.shCallback)("nativeCallback",i.nativeCallback)("platform",i.platform)("appDeepLinks",i.appDeepLinks)}}function jO(e,t){if(1&e){let e=Mf();kf(0,"button",83),jf("click",(function(t){return Wa(e),Ha(Yf(5).loadMoreStore(t,"delivery"))})),am(1," Load More Stores "),xf()}}function zO(e,t){if(1&e&&(Ef(0),ph(1,$O,2,19,"div",72)(2,jO,2,0,"button",73),Df()),2&e){let e=Yf(4);Vd(),zh("ngForOf",e.storesWithLimit),Vd(),zh("ngIf",e.showLoadMore)}}function WO(e,t){if(1&e&&ph(0,zO,3,2,"ng-container",28),2&e){zh("ngIf",Yf(3).showStores)}}function HO(e,t){if(1&e&&(ph(0,OO,5,1,"ng-container",53)(1,MO,1,1,"ng-template",null,10,Wm),kf(3,"div",108),ph(4,RO,3,0,"svg",109)(5,LO,1,0,"span",110)(6,FO,2,1,"p",111)(7,qO,2,1,"ng-container",53)(8,WO,1,1,"ng-template",null,11,Wm),xf()),2&e){let e=sm(2),t=sm(9),i=Yf(2);zh("ngIf",i.isStoreAvailableWithUserAddr&&i.isWineShopAvailable&&0===i.storesWithLimit.length)("ngIfElse",e),Vd(4),zh("ngIf",!i.isThemeBuilderEnabled&&!i.isStoreAvailableWithUserAddr),Vd(),zh("ngIf",i.isThemeBuilderEnabled),Vd(),zh("ngIf",!i.isThemeBuilderEnabled&&!i.isStoreAvailableWithUserAddr),Vd(),zh("ngIf",i.isInstacart)("ngIfElse",t)}}function YO(e,t){if(1&e&&Of(0,151),2&e){Yf(),zh("ngTemplateOutlet",sm(17))}}function GO(e,t){if(1&e&&(Ef(0),kf(1,"div",58),am(2),qm(3,"async"),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",$m(3,1,e.serviceErrorMessage)," ")}}function KO(e,t){if(1&e&&(Ef(0),kf(1,"div",59),So(),kf(2,"svg",152)(3,"g",128),Tf(4,"path",153),xf()(),Co(),kf(5,"p",68),am(6),xf()(),Df()),2&e){let e=Yf(3);Vd(6),cm(" ",e.inStoreVnCErrorMessage," ")}}function QO(e,t){if(1&e&&(Ef(0),Tf(1,"store-card",157),Df()),2&e){let e=Yf().$implicit,t=Yf(5);Vd(),zh("isThemeBuilderEnabled",t.isThemeBuilderEnabled)("behaviourType",t.requestType)("store",e)("storesWithLimit",t.storesWithLimit)("isReBanneredStore",t.isReBanneredStore)("isPartialCoverage",t.isPartialCoverage)("isPopupWrapperView",t.isPopupWrapperView)("isStoreSelectionWrapperView",t.isStoreSelectionWrapperView)("shRedirectPath",t.shRedirectPath)("shCallback",t.shCallback)("nativeCallback",t.nativeCallback)("platform",t.platform)("appDeepLinks",t.appDeepLinks)}}function JO(e,t){if(1&e&&(Ef(0),kf(1,"p",160),am(2),xf(),Df()),2&e){let e=Yf(2).$implicit;Vd(),gh("aria-label",e.pickupType),Vd(),lm(e.pickupType)}}function ZO(e,t){if(1&e){let e=Mf();kf(0,"p",164),jf("click",(function(){return Wa(e),Ha(Yf(8).isOpenCBATabs())})),am(1),xf()}if(2&e){let e=Yf(3).$implicit,t=Yf(5);zh("ngClass",Bm(3,eO,t.isOpenInTabs,!t.isOpenInTabs)),gh("aria-expanded",t.isOpenInTabs),Vd(),cm("",e.unavailable_item.cart_unavailable_total," item(s) in your cart need your attention.")}}function XO(e,t){if(1&e&&(kf(0,"p"),am(1),qm(2,"titlecase"),xf()),2&e){let e=Yf(4).$implicit,t=Yf(5);Vd(),dm("Item Not Offered for ",$m(2,2,t.preferenceTypeTab)," (",null==e||null==e.unavailable_item?null:e.unavailable_item.not_offered_count,")")}}function eB(e,t){if(1&e&&(kf(0,"li",168),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e.name)}
1}function tB(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(4).$implicit;Vd(),cm("Items Out of Stock (",e.unavailable_item.oos_count,")")}}function iB(e,t){if(1&e&&(kf(0,"li",168),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e.name)}}function nB(e,t){1&e&&(kf(0,"p"),am(1,"Only sandwich slice available"),xf())}function rB(e,t){if(1&e&&(kf(0,"li",168),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e.name)}}function sB(e,t){if(1&e&&(kf(0,"div",165)(1,"div",166),ph(2,XO,3,4,"p",28),kf(3,"ul"),ph(4,eB,2,1,"li",167),xf(),ph(5,tB,2,1,"p",28),kf(6,"ul"),ph(7,iB,2,1,"li",167),xf(),ph(8,nB,2,0,"p",28),kf(9,"ul"),ph(10,rB,2,1,"li",167),xf()()()),2&e){let e=Yf(3).$implicit;Vd(2),zh("ngIf",null==e||null==e.unavailable_item?null:e.unavailable_item.not_offered_count),Vd(2),zh("ngForOf",e.unavailable_item.not_offered_ids),Vd(),zh("ngIf",e.unavailable_item.oos_count),Vd(2),zh("ngForOf",e.unavailable_item.oos_offered_ids),Vd(),zh("ngIf",e.unavailable_item.not_offered_modifiers.length>0),Vd(2),zh("ngForOf",e.unavailable_item.not_offered_modifiers)}}function aB(e,t){if(1&e&&(kf(0,"div",161),ph(1,ZO,2,6,"p",162)(2,sB,11,6,"div",163),xf()),2&e){let e=Yf(2).$implicit,t=Yf(5);Vd(),zh("ngIf",e.unavailable_item.not_offered_count>0||e.unavailable_item.oos_count>0),Vd(),zh("ngIf",t.isOpenInTabs&&(e.unavailable_item.not_offered_count>0||e.unavailable_item.oos_count>0))}}function oB(e,t){if(1&e&&(kf(0,"div",76)(1,"div",77),Tf(2,"img",78),qm(3,"lowercase"),qm(4,"titlecase"),kf(5,"p"),am(6),xf(),kf(7,"p"),am(8),xf(),ph(9,JO,3,2,"ng-container",28),xf()(),kf(10,"div",80)(11,"div",81)(12,"a",158),am(13,"Selected"),xf()()(),ph(14,aB,3,2,"div",159)),2&e){let e=Yf().$implicit,t=Yf(5);Vd(),Zf("id","address_",e.storeID,""),Vd(),df("store-icon-logo ",$m(3,16,null==e?null:e.bannerName),""),Jf("src",e.storeLogoURL,id),zh("alt",e.isB2BStore?$m(4,18,e.bannerName)+" Business":e.storeName+" logo")("ngClass",Om(20,XD,null==e?null:e.isB2BStore)),Vd(4),lm(e.street),Vd(2),um("",e.city,", ",e.state," ",e.zipcode," "),Vd(),zh("ngIf",e.pickupType),Vd(3),_h("aria-describedby","address_",e.storeID,""),Vd(2),zh("ngIf",(null==e?null:e.unavailable_item)&&"instore"!==t.preferenceTypeTab)}}function lB(e,t){if(1&e&&(kf(0,"div",74),ph(1,QO,2,13,"ng-container",53)(2,oB,15,22,"ng-template",null,15,Wm),xf()),2&e){let e=t.$implicit,i=sm(3);Vd(),zh("ngIf",0==e.selected)("ngIfElse",i)}}function cB(e,t){if(1&e){let e=Mf();kf(0,"button",83),jf("click",(function(t){return Wa(e),Ha(Yf(5).loadMoreStore(t,"pickup"))})),am(1," Load More Stores "),xf()}}function dB(e,t){if(1&e&&(kf(0,"div",156),ph(1,lB,4,2,"div",72)(2,cB,2,0,"button",73),xf()),2&e){let e=Yf(4);Vd(),zh("ngForOf",e.storesWithLimit),Vd(),zh("ngIf",e.showLoadMore)}}function uB(e,t){1&e&&Tf(0,"span",172)}function pB(e,t){1&e&&(So(),kf(0,"svg",173)(1,"g",128),Tf(2,"path",129),xf()())}function hB(e,t){if(1&e){let e=Mf();Ef(0),ph(1,uB,1,0,"span",169)(2,pB,3,0,"svg",170),kf(3,"p",136),am(4,"Delivery is available."),xf(
1),kf(5,"button",171),jf("click",(function(){return Wa(e),Ha(Yf(4).selectDelivery())})),am(6,"Shop Delivery"),xf(),Df()}if(2&e){let e=Yf(4);Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled)}}function fB(e,t){1&e&&Tf(0,"span",172)}function mB(e,t){1&e&&(So(),kf(0,"svg",173)(1,"g",128),Tf(2,"path",129),xf()())}function gB(e,t){if(1&e&&(Ef(0),ph(1,fB,1,0,"span",169)(2,mB,3,0,"svg",170),kf(3,"p",174),am(4,"Delivery is available from our sister store."),xf(),Tf(5,"span"),kf(6,"p",175),am(7),xf(),kf(8,"button",176),am(9),xf(),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(3),df("svg-icon ",e.deliveryBannerLogo,""),Vd(2),cm(" You will be redirected to ",e.deliveryBanner,".com. Would you like to proceed?"),Vd(2),cm("Shop ",e.deliveryBanner," Delivery")}}function bB(e,t){1&e&&Tf(0,"span",186)}function yB(e,t){1&e&&(So(),kf(0,"svg",152)(1,"g",128),Tf(2,"path",153),xf()())}function vB(e,t){if(1&e&&(kf(0,"div",187),am(1),xf()),2&e){let e=Yf(6);Vd(),cm(" ",e.emailInputError," ")}}function wB(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",156),ph(2,bB,1,0,"span",177)(3,yB,3,0,"svg",178),kf(4,"p",179),am(5,"Pickup is not available in your area."),xf(),kf(6,"p",180),am(7," Enter your email address and we'll let you know
1when service begin in your ZIP code."),xf(),kf(8,"div",181)(9,"span",182),am(10,"Email address"),xf(),kf(11,"input",183),mm("ngModelChange",(function(t){Wa(e);let i=Yf(5);return fm(i.emailPickUp,t)||(i.emailPickUp=t),Ha(t)})),jf("blur",(function(){Wa(e);let t=Yf(5);return Ha(t.validateEmail(t.emailPickUp))}))("keydown",(function(){Wa(e);let t=Yf(5);return Ha(t.validateEmail(t.emailPickUp))}))("focus",(function(){return Wa(e),Ha(Yf(5).resetIsValidEmail())})),xf()(),ph(12,vB,2,1,"div",184),kf(13,"button",185),jf("click",(function(){Wa(e);let t=Yf(5);return Ha(t.notifyMe(t.emailPickUp,"pickup"))})),am(14,"Notify me"),xf()(),Df()}if(2&e){let e=Yf(5);Vd(2),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(8),hm("ngModel",e.emailPickUp),Vd(),zh("ngIf",!1===e.emailIsValid),Vd(),zh("ngClass",Om(5,tO,!1===e.emailIsValid))}}function _B(e,t){if(1&e&&ph(0,wB,15,7,"ng-container",53),2&e){Yf();let e=sm(9);zh("ngIf",!1===Yf(3).isNotifyMePickUp)("ngIfElse",e)}}function SB(e,t){1&e&&Tf(0,"span",186)}function CB(e,t){1&e&&(So(),kf(0,"svg",152)(1,"g",128),Tf(2,"path",153),xf()())}function IB(e,t){if(1&e&&Tf(0,"button",191),2&e){zh("innerHTML",Yf(5).fulfillmentObj.noServiceAreaLink,ed)}}function kB(e,t){if(1&e&&(ph(0,SB,1,0,"span",177)(1,CB,3,0,"svg",178),kf(2,"p",188),am(3,"Thank you!"),xf(),kf(4,"p",189),am(5,"We'll let you know
1when pickup is in your area."),xf(),ph(6,IB,1,1,"button",190)),2&e){let e=Yf(4);zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(5),zh("ngIf",!(e.isStoreSelectionWrapperView&&e.enableStoreSelectionWrapper))}}function xB(e,t){1&e&&Tf(0,"span",141)}function TB(e,t){1&e&&(So(),kf(0,"svg",142)(1,"g",128)(2,"g",143)(3,"g",144)(4,"g",145),Tf(5,"path",146)(6,"path",147)(7,"path",148)(8,"path",149),xf()()()()())}function PB(e,t){if(1&e&&(Ef(0),kf(1,"div",132)(2,"div")(3,"p",133),am(4,"Â "),xf(),ph(5,xB,1,0,"span",134)(6,TB,9,0,"svg",135),kf(7,"p",136),am(8),xf(),kf(9,"div")(10,"span",137),am(11),xf(),kf(12,"div",138),Tf(13,"img",139),xf()(),kf(14,"p"),am(15,"Â "),xf(),kf(16,"a",140),am(17),xf(),kf(18,"p"),am(19,"Â "),xf()()(),Df()),2&e){let e=Yf(4);Vd(5),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(2),cm(" ",e.fulfillmentObj.instacartShortDescription,""),Vd(3),lm(e.fulfillmentObj.poweredby),Vd(2),Jf("src",e.fulfillmentObj.instacartimage,id),Vd(3),Jf("href",e.fulfillmentObj.instacartUrl,id),gh("aria-label",e.fulfillmentObj.buttontext),Vd(),cm(" ",e.fulfillmentObj.buttontext," ")}}function EB(e,t){if(1&e&&(kf(0,"div",154),ph(1,dB,3,2,"div",155),kf(2,"div",90),ph(3,hB,7,2,"ng-container",28),xf(),kf(4,"div",90),ph(5,gB,10,7,"ng-container",28),xf(),ph(6,_B,1,2,"ng-template",null,13,Wm)(8,kB,7,3,"ng-template",null,14,Wm)(10,PB,20,8,"ng-container",28),xf()),2&e){let e=sm(7),t=Yf(3);Vd(),zh("ngIf",!0===t.showStores)("ngIfElse",e),Vd(2),zh("ngIf",!0===t.deliveryAvailable&&!1===t.deliveryAvailableSister&&!1===t.pickUpAvailable),Vd(2),zh("ngIf",t.deliveryAvailableSister&&!1===t.pickUpAvailable),Vd(5),zh("ngIf",t.isInstacartPickUp)}}function DB(e,t){if(1&e&&ph(0,KO,7,1,"ng-container",53)(1,EB,11,5,"ng-template",null,12,Wm),2&e){let e=sm(2);zh("ngIf",Yf(2).isWineShopAvailable)("ngIfElse",e)}}function OB(e,t){if(1&e){let e=Mf();kf(0,"div",44)(1,"ul",45),ph(2,oO,3,3,"li",46),kf(3,"li",47),jf("click",(function(t){Wa(e);let i=Yf();return i.getDelivery(t),Ha(i.channelSelection("delivery"))})),kf(4,"a",48),jf("keyup.arrowright",(function(){return Wa(e),Ha(Yf().setTab("modal-tab-pickup"))}))("keyup.arrowleft",(function(){return Wa(e),Ha(Yf().setTab("modal-tab-instore"))}))("click",(function(){return Wa(e),Ha(Yf().resetIsValidEmail())})),am(5,"Delivery"),xf()(),kf(6,"li",49),jf("click",(function(t){Wa(e);let i=Yf();return i.getStoresList(t,"pickup"),Ha(i.channelSelection("pickup"))})),kf(7,"a",50),jf("keyup.arrowright",(function(){return Wa(e),Ha(Yf().setTab("modal-tab-instore"))}))("keyup.arrowleft",(function(){return Wa(e),Ha(Yf().setTab("modal-tab-delivery"))}))("click",(function(){return Wa(e),Ha(Yf().resetIsValidEmail())})),am(8,"Pickup"),xf()()(),kf(9,"div",51)(10,"div",52),ph(11,lO,4,3,"ng-container",53)(12,wO,3,2,"ng-template",null,0,Wm),xf(),kf(14,"div",54),ph(15,_O,4,3,"ng-container",53)(16,CO,1,3,"ng-template",null,1,Wm)(18,AO,1,2,"ng-template",null,2,Wm)(20,DO,1,2,"ng-template",null,3,Wm)(22,HO,10,7,"ng-template",null,4,Wm)(24,YO,1,1,"ng-template",null,5,Wm),xf(),kf(26,"div",55),ph(27,GO,4,3,"ng-container",53)(28,DB,3,2,"ng-template",null,6,Wm),xf()()()}if(2&e){let e=sm(13),t=sm(25),i=sm(29),n=Yf();Vd(2),zh("ngIf",!n.isTwoTabModal),Vd(),zh("ngClass","modal-tab-delivery"==n.activeTab?n.isTwoTabModal?"modal-tabs--active dst-modal-tab--delivery":"modal-tabs--active":"modal-tabs--inactive"),Vd(),gh("aria-selected","modal-tab-delivery"===n.activeTab?"true":"false")("tabindex","modal-tab-delivery"===n.activeTab?"0":"-1"),Vd(2),zh("ngClass","modal-tab-pickup"===n.activeTab?"modal-tabs--active dst-modal-tab--pickup":"modal-tabs--inactive"),Vd(),gh("aria-selected","modal-tab-pickup"===n.activeTab?"true":"false")("tabindex","modal-tab-pickup"===n.activeTab?"0":"-1"),Vd(3),zh("ngClass",Om(16,ZD,"modal-tab-instore"===n.activeTab)),Vd(),zh("ngIf",n.isServiceErrorMessage)("ngIfElse",e),Vd(3),zh("ngClass",Om(18,ZD,"modal-tab-delivery"===n.activeTab)),Vd(),zh("ngIf",n.isServiceErrorMessage)("ngIfElse",t),Vd(11),zh("ngClass",Om(20,ZD,"modal-tab-pickup"===n.activeTab)),Vd(),zh("ngIf",n.isServiceErrorMessage)("ngIfElse",i)}}function BB(e,t){1&e&&(Ef(0),kf(1,"div",192)(2,"div",193)(3,"div",194),Tf(4,"div",195),xf()()(),Df())}function MB(){return window}
1var RB=e=>e.stores&&e.stores[0]&&"true"===e.stores[0].instacart,LB=(()=>{class e{constructor(e,t,i,n,r,s){this.elementRef=e,this._http=t,this.storeFulfillmentService=i,this._featureFlagService=n,this.zone=r,this._abTestService=s,this.isPopupWrapperView=!1,this.isStoreSelectionWrapperView=!1,this.zipValue=window.AB.userInfo.zipcode,this.siteType=window.AB&&window.AB.userInfo&&window.AB.userInfo.siteType,this.inputErrorMessage="",this.serviceErrorMessage=new Tt(""),this.isServiceErrorMessage=!1,this.showStores=!1,this.currentStoreIndex=0,this.showLoadMore=!1,this.emailInputError=null,this.showLoading=!1,this.sharedSessionStoreId=null,this.sharedSessionPreference=null,this.foundStore=!1,this.foundStoreDelivery=!1,this.isReBanneredStore=!1,this.isInstacart=!1,this.isTwoTabModal=!1,this.isInstacartPickUp=!1,this.emailIsValid=!1,this.isStoreClosed=!1,this.subtitle="",this.isGeoAllowed=!1,this.validPreferenceList=["j4u","dug","delivery"],this.modalTabList=["modal-tab-instore","modal-tab-pickup","modal-tab-delivery"],this.activeTab=this.modalTabList[0],this.windowLocation=new FD,this.storesWithOpenCBA=[],this.enableStoreSelectionWrapper=!1,this.excludeBanners="none",this.oosSellerTotal=0,this.isStoreAvailableWithUserAddr=!1,this.refreshDeliveryTab=!1,this.isSearchIconClicked=!1,this.isDeliveryDataReceived=!1,this.getSellerOOSItems=()=>{if(this.sellerProducts?.length>1){let e=0;this.oosSellerTotal=this.sellerProducts?.reduce(((e,t)=>e+t?.cart_unavailable_total),e)}else this.oosSellerTotal=this.sellerProducts[0]?.cart_unavailable_total},this.sellerImage=e=>`https://images.albertsons-media.com/is/image/ABS/mkp-${e}-logo?$mkp-seller-logo-desktop$&defaultImage=Not_Available`,this.getSellerName=e=>this.sellersCart?.length>0?this.sellersCart.filter((t=>t.seller.sellerId!==e)).sellerName:"",this.getUnavailableStore=()=>{if(this.sellersCart=this.storeFulfillmentService.getSellerFromCart(),this.sellersCart?.length>0)if(this.mkpSellers?.length>0){let e=this.mkpSellers.filter((e=>this.sellersCart.some((t=>t?.seller?.sellerId===e.id))));this.unavailableSeller=0===e?.length?this.sellersCart:this.sellersCart.filter((t=>e.every((e=>e.id!==t?.seller?.sellerId||e?.zipcodes.every((e=>e!==this.searchedZipcode?.toString()))))))}else this.unavailableSeller=this.sellersCart},this.fullFillmentElem={body:"body",zipcodeSearchClass:".fulfillment-content__search-wrapper__input",tabCardWrapperClass:".tab-pane.active .card-wrapper",modalDialogClass:".modal-dialog--store-fulfillment",cardWrapperClass:".card-wrapper",headerWrapperTitleClass:".fulfillment-content__heading-wrapper__title",tabsWrapperinstore:".tabs-wrapper__tabs-header--in-store",storeFulfillmentModalId:"#storeFulfillmentModal",modalCloseClass:"#storeFulfillmentModal .create-modal-close-icon"},this.limit=5,this.currentBanner=MB().AB.userInfo.banner.toLowerCase(),this.currentBanner=this.currentBanner.charAt(0).toUpperCase()+this.currentBanner.slice(1),this.$scene7Preset="?$fulfillment$&defaultImage=Not_Available",this.isClosedStoreEnabled=MB().SWY.configService.isClosedStoreEnabled,this.isThemeBuilderEnabled=MB().SWY.CONFIGSERVICE.isThemeBuilderEnabled,this.currentBannerClassName=`svg-${this.currentBanner}-icon`,this.isB2bSisterBannerDisabled=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.isB2BSisterBannerDisabled,this.isUnityBannersEnabled=!!MB()?.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableUnityBanners}ngOnInit(){this.enableStoreSelectionWrapper=!!MB()?.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableStoreSelectionWrapper,this.isPopupWrapperView?this.fullFillmentElem={body:"body",zipcodeSearchClass:".fulfillment-content__search-wrapper__input",tabCardWrapperClass:".tab-pane.active .card-wrapper",modalDialogClass:".modal-dialog--store-fulfillment",cardWrapperClass:".card-wrapper",headerWrapperTitleClass:".fulfillment-content__heading-wrapper__title",tabsWrapperinstore:".tabs-wrapper__tabs-header--in-store",storeFulfillmentModalId:"#popup-wrapper",modalCloseClass:"#popup-wrapper .create-modal-close-icon"}:this.isStoreSelectionWrapperView&&this.enableStoreSelectionWrapper&&(this.fullFillmentElem=f(h({},this.fullFillmentElem),{storeFulfillmentModalId:"#store-selection-wrapper",modalCloseClass:"#store-selection-wrapper .modal-close-icon"}),this.isTwoTabModal=!0),this.isWineShopWalledAvailable=document.getElementById("wine-shop-walled-header"),this.checkWineShopAvailability(),this.fulfillmentObj={placeholder:this.searchPlaceholder,poweredby:this.instaCartPoweredby,instacartimage:this.instacartimage,buttontext:this.instacartButtontext,instacartUrl:this.instacartUrl,noServiceAreaLink:this.noServiceAreaLink,instacartShortDe
1scription:this.instacartShortDescription},"onboarding"===this.requestType&&this.storeFulfillmentService.zipcode.next(this.zipCode),this.storeFulfillmentService.refreshStoreModal.subscribe((e=>{!0===e&&(this.setIsGuestAddToCart(),this._abTestService.listenToABXTestingFlag("abACIP295974","isGuestAddToCartDisabled","ACIP295974"),this.setActiveTab(),this.setDefaultValues())})),this.isOpenInTabs=this.isOpenInTabs?this.isOpenInTabs:"delivery"===this.preferenceTypeTab,this.isReBanneredStore=this.isReBanneredStoreFlag,this.currentBannerName=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.resolvedBanner?window.SWY.CONFIGSERVICE.resolvedBanner:"";let e=!!(window.AB.storeFlagsData&&window.AB.storeFlagsData.flags&&window.AB.storeFlagsData.flags.ecomStore&&"true"==window.AB.storeFlagsData.flags.ecomStore.isMKPEnabled),t=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.isSellerEnabled,i=window.AB.storeFlagsData,n=!!(i&&i.flags&&i.flags.ecomStore&&"true"==i.flags.ecomStore.isMKPEnabled);this.isMKPAndSellerEnabled=n&&e&&t}ngOnChanges(e){this.setIsGuestAddToCart(),this.setDefaultValues()}setDefaultValues(){this.inputErrorMessage="";let e=this;this.isTwoTabModal=!1,this.isPartialCoverage=!1,this.isNewAddress=!1,this.sharedSessionInfo=MB().AB.COMMON.getCookie("SWY_SHARED_SESSION_INFO"),this.isGuestUser=!window.AB.COMMON.authorize(),this.sharedSessionInfo&&this.sharedSessionInfo.length>1&&(this.sharedSessionInfoObj=JSON.parse(this.sharedSessionInfo),this.sharedSessionSelection=this.sharedSessionInfoObj.info.COMMON.Selection,this.sharedSessionPreference=this.sharedSessionInfoObj.info.COMMON.preference.toString().toLowerCase()),this.isGuestAddToCartEnabled&&"default"===this.sharedSessionSelection&&(2===this.tabsType?this.isTwoTabModal=!0:this.isTwoTabModal=!1),this.isStoreSelectionWrapperView&&this.enableStoreSelectionWrapper&&(this.isTwoTabModal=!0),"onboarding"===this.requestType||"storeModal"===this.requestType&&("default"!==this.sharedSessionSelection||window.AB.COMMON.authorize()||!0===this.isDeepLinkUrl)?(this.showTabs=!0,this.showLoading=!0,this.currentStoreIndex=0,this.zipValue=this.zipCode?this.zipCode:this.zipValue,this.zipCode=this.zipValue,this.sharedSessionStoreId=window.AB.userInfo.j4u.storeId,2===this.tabsType?this.isTwoTabModal=!0:this.isTwoTabModal=!1,this.defaultTab?this.activeTab=this.defaultTab:this.setActiveTab(),this.serviceErrorMessage.subscribe((e=>e)),this.isServiceErrorMessage=!1,this.allStores&&this.allStores.instore&&this.allStores.delivery&&this.allStores.pickup?this.getCurrentTabInfo():this.getDefaultStores(this.APIParams(this.zipCode))):this.showTabs?(this.zipCode=this.zipCode?this.zipCode:this.zipValue,this.getCurrentTabInfo()):this.defaultTab?this.activeTab=this.defaultTab:this.setActiveTab(),this.$inputZipCode=$(this.fullFillmentElem.zipcodeSearchClass),this.$inputZipCode.on("focus",(function(){e.inputErrorMessage=""})),this.checkWineShopAvailability()}checkValidation(e){return void 0!==e&&e.length<=0?(this.inputErrorMessage="ZIP Code is required.",!1):null!=e.match(/[^0-9]/g)?(this.inputErrorMessage="ZIP Code must contain numeric characters only.",!1):e.length<5?(this.inputErrorMessage="Please enter 5 numbers or more.",!1):(this.inputErrorMessage="",!0)}changeUserIntent(e){let t=e.target.className.split(" ");this.activeTab=t[0];let i=this.activeTab.replace("modal-tab-","");this.preferenceTypeTab=i.charAt(0).toUpperCase()+i.slice(1)}search(e,t,i){this.zipValue=e||this.zipCode,this.isGeoAllowed=!1,this.resetVariables(),this.checkValidation(this.zipValue)?(this.searchedZipcode=this.zipValue,this.getDefaultStores(this.APIParams(this.zipValue),t,i),this.setDataLayerMessaging(),"onboarding"===this.requestType&&this.storeFulfillmentService.zipcode.next(this.zipCode)):(this.showTabs=!1,this.showStores=!1,this.showLoading=!1),this.getMaxHeight(),e||(this.isStoreAvailableWithUserAddr=!1)}setDataLayerMessaging(){MB().AB.DATALAYER&&("onboarding"===this.requestType?MB().AB.DATALAYER.setModalClickEvents("fulfillment-landing|search"):this.isTwoTabModal?void 0!==MB().appEventData&&(MB().digitalData.modal.modalAction="fulfillment-shop|search",MB().AB.DATALAYER.pushEvent("modalClick",{modal:{modalAction:"fulfillment-shop|search"}})):void 0!==MB().appEventData&&(MB().digitalData.modal.modalAction="fulfillment-global|search",MB().AB.DATALAYER.pushEvent("modalClick",{modal:{modalAction:"fulfillment-global|search"},page:MB().digitalData?.pageDetails,pageFilter:MB().digitalData?.pageFilter})))}selectDelivery(){this.deliveryStores=this.allStores.delivery;var e=this.deliveryStores.stores,t=MB().AB.userInfo.userType;let i,n=MB().AB.COMMON.getURLParameterByName("action",!1);if(this.isServiceErrorMessage=!1,this.isGeoAllowed&&this.allStores&&this.allStores.instore&&this.allStores.instore.stores[0].address&&this.allStores.instore.stores[0].address.zipcode)i=this.allStores.instore.stores[0].address.zipcode;else if(this.zipValue)i=this.zipValue;else{if(!(this.deliveryStores&&e&&e.locationZipcode))throw new Error("No delivery zipcode");i=e.locationZipcode}let r,s=this,a="";if(!1===this.storeFulfillmentService.isWineShopDisabled&&e.ecomStore.isWineD2CEnabled&&(r=e.e
1comStore.wfcStoreId),"g"===t.toLowerCase()){if(this.currentBanner.toLowerCase()!==e.polarisBannerName){let t=document.location.host,n=t.substring(t.indexOf(".")+1,t.lastIndexOf("."));t=t.replace(n,e.polarisBannerName),t="http://"+t,a=this.setDataLayerCrossBanner(),this.isReBanneredStore&&MB().AB.COMMON.setDefaultStoreId();let r,o="storeId="+e.locationId+"&preference=DELIVERY&zipcode="+i;if(t+="?"+o,r="&"+o,a&&(t+="&ml="+a,r+="&ml="+a),"onboarding"===s.requestType){let t=e.polarisBannerName;s.storeFulfillmentService.redirectOnboardingWidget(t,null,r)}else this.windowLocation.setHref(t)}else MB().SWY.ENFORCEMENT.generateSessionUpdateObject("DELIVERY",e.locationId,i,t,"user",e.polarisBannerName,(function(e){s.isClosedStoreEnabled&&(e.info.COMMON.isClosed=!1),s.setDataLayerSameBanner(),MB().AB.COMMON.updateUserSession(e),"onboarding"===s.requestType?(MB().AB.userInfo.prepareSharedInfo(),s.storeFulfillmentService.triggerCreateAccount(!0)):s.checkChangeStoreparam(n)}),r);"preselection"===localStorage.getItem("toastMessage")&&this.storeFulfillmentService.fulfillmentSelectionCallback()}else("R"===t.toUpperCase()||"C"===t.toUpperCase())&&MB().SWY.ENFORCEMENT.generateSessionUpdateObject("DELIVERY",e.locationId,i,t,"user",e.polarisBannerName,(function(t){s.isClosedStoreEnabled&&(t.info.COMMON.isClosed=!1),s.currentBanner.toLowerCase()!==e.polarisBannerName?a=s.setDataLayerCrossBanner():s.setDataLayerSameBanner(),MB().AB.COMMON.updateUserSession(t,null,(function(e){!1===e.success||"CustomerId"===e.name?(s.isServiceErrorMessage=!0,s.serviceErrorMessage.next("Apologies, our site is currently experiencing technical difficulties, please try again later.")):(s.checkChangeStoreparam(n),s.unavailableItemDelivery&&s.unavailableItemDelivery.unavailable_item.cart_unavailable_total?localStorage.setItem("toastMessage","delivery-unavailable"):localStorage.setItem("toastMessage","delivery"))}),a)}))}checkChangeStoreparam(e){null!=e&&"changeStore"===e?this.windowLocation.locationReplace(MB().location.origin):this.windowLocation.locationReload()}showLimitedStore(e){let t;this.storesWithLimit=void 0!==this.storesList&&this.storesList.length?this.storesList.slice(0,this.limit):[],this.foundStore=!1;let i=0,n=0;this.storesWithLimit.length&&(this.storesWithLimit.forEach(((r,s)=>{this.storesWithLimit[s].selected=!1,this.isStoreSelectionWrapperView&&this.enableStoreSelectionWrapper?r.storeID.toString()===this.spaSelectedStoreId.toString()&&this.spaIntent===e&&"onboarding"!==this.requestType?(this.foundStore=!0,this.storesWithLimit[s].selected=!this.isReBanneredStore,t=this.storesWithLimit[s]):this.storesWithLimit[s].selected=!1:r.storeID.toString()===this.sharedSessionStoreId&&this.getMappedPreference()===e&&"onboarding"!==this.requestType?(this.foundStore=!0,this.storesWithLimit[s].selected=!this.isReBanneredStore,t=this.storesWithLimit[s]):this.storesWithLimit[s].selected=!1,this.productAvailabilityResponse&&this.productAvailabilityResponse.stores&&this.productAvailabilityResponse.stores.forEach((e=>{r.storeID==e.id&&(Object.assign(this.storesWithLimit[s],{unavailable_item:e}),setTimeout((()=>{"B"===this.siteType&&(this.storesWithLimit[s]=f(h({},this.storesWithLimit[s]),{unavailable_item:e}))}),0),this.applyEllipsis(this.storesWithLimit[s].unavailable_item))})),this.isMKPAndSellerEnabled&&this.productAvailabilityResponse?.sellerProducts?.length>0&&(this.sellerProducts=this.productAvailabilityResponse?.sellerProducts,this.get
1SellerOOSItems()),this.isMKPAndSellerEnabled&&(this.searchedZipcode=this.zipValue,this.getUnavailableStore()),r.bannerName===this.currentBanner.toLowerCase()?n++:i++})),this.foundStore&&(this.storesWithLimit.splice(this.storesWithLimit.indexOf(t),1),this.storesWithLimit.unshift(t))),this.isWineShopAvailable&&this.filterStoreOnVnCBasis(),this.getMaxHeight(),this.setDeliveryHeading(n,i)}setDeliveryHeading(e,t){this.deliveryHeading=GD,0===this.storesWithLimit.length?this.isWineShopAvailable?this.deliveryHeading=this.deliveryVnCErrorMessage:this.isInstacart?this.deliveryHeading="Delivery by {store} is not available in your area.".replace("{store}",this.currentBanner):this.deliveryHeading=GD:e>0?t+e>1?this.deliveryHeading="Delivery is available from the following stores.":0===t&&(this.deliveryHeading="Delivery is available from the following store."):0===e&&(1===t?this.deliveryHeading="Delivery is available from our sister store.":t>1&&(this.deliveryHeading="Delivery is available from our sister stores."))}storeHasCBAOpen(e){return!!this.storesWithOpenCBA.find((t=>t.storeId===e&&!0===t.isOpen))}getStoreIndexCBA(e){return this.storesWithOpenCBA.findIndex((t=>t.storeId===e))}setStoreStatusCBA(e,t){let i=this.getStoreIndexCBA(e);-1!=i&&(this.storesWithOpenCBA[i].isOpen=t)}loadMoreStore(e,t){let i=[],n=[];if(this.storesList&&this.showLoadMore){let e=this.storesList.slice(this.limit);if("instore"!==t&&(MB().AB.COMMON.authorize()||this.isGuestAddToCartEnabled)&&n){let i;if(e.forEach((e=>{n.push(e.storeID)})),i=this.mkpSellers?.length>0?this.storeFulfillmentService.getCbaRequestObject(t,n,!0):this.storeFulfillmentService.getCbaRequestObject(t,n,!1),i.status||!1===i.status)this.productAvailabilityResponse=!1;else{let t=this;this.storeFulfillmentService.getProductAvailability(i).subscribe((i=>{this.isMKPAndSellerEnabled&&i?(this.productAvailabilityResponse=i,this.productAvailabilityResponse?.sellerProducts&&(this.sellerProducts=this.productAvailabilityResponse?.sellerProducts,this.searchedZipcode=this.zipValue,this.getSellerOOSItems(),this.getUnavailableStore())):t.productAvailabilityResp=i,e.filter((function(e){return t.productAvailabilityResp?.stores.some((function(i){e.storeID===i.id&&(t.storesWithOpenCBA.push({storeId:e.storeID,isOpen:!1}),Object.assign(e,{unavailable_item:i}),setTimeout((()=>{"B"===t.siteType&&(e=f(h({},e),{unavailable_item:i}))}),0),t.applyEllipsis(e.unavailable_item))}))}))}))}}for(let t=0;t<this.limit;t++)e[t+this.currentStoreIndex]&&i.push(e[t+this.currentStoreIndex]);this.currentStoreIndex+=this.limit,this.currentStoreIndex>=this.storesList.length-this.limit&&(this.showLoadMore=!1,this.currentStoreIndex=0),this.storesWithLimit=this.storesWithLimit.concat(i),this.isWineShopAvailable&&this.filterStoreOnVnCBasis()}if(0==e.screenX&&0==e.screenY||$(window).width()<1025)if(this.activeTab==this.modalTabList[0]){let e=$(".in-store-content .card-store").length;setTimeout((function(){$(".in-store-content .card-store:nth-child("+(e+1)+") .card-store-btn").focus()}),0)}else if(this.activeTab==this.modalTabList[1]){let e=$(".pickup-content .card-store").length;setTimeout((function(){$(".pickup-content .card-store:nth-child("+(e+1)+") .card-store-btn").focus()}),0)}if(this.storesWithLimit.length){let e=t||this.activeTab.replace("modal-tab-","")||"instore";this.storesWithLimit.forEach(((t,i)=>{this.storesWithLimit[i].selected=!1,this.isStoreSelectionWrapperView&&this.enableStoreSelectionWrapper?t.storeID.toString()===this.spaSelectedStoreId.toString()&&this.spaIntent===e&&"onboarding"!==this.requestType?this.storesWithLimit[i].selected=!this.isReBanneredStore:this.storesWithLimit[i].selected=!1:t.storeID.toString()===this.sharedSessionStoreId&&this.getMappedPreference()===e&&"onboarding"!==this.requestType?this.storesWithLimit[i].selected=!this.isReBanneredStore:this.storesWithLimit[i].selected=!1}))}}getDelivery(e=null){e&&this.changeUserIntent(e),this.getStores("delivery")}channelSelection(e){this.retainChannelPref=e,this.storeFulfillmentService.retainedPref=!0}getStoresList(e,t){this.getStores(t),this.changeUserIntent(e)}getStores(e){let t=this.allStores[e];this.showLoading=!1,this.setA11yMessage("Showing results"),this.showTabs=!0,this.isInstacart=!1,this.isInstacartPickUp=!1,this.mkpSellers=this.allStores.mkpSellers;let i=[];if(this.storesWithLimit=[],"delivery"!==e||"PARTIAL"!==t?.zipCoverage||this.allStores[e]?.stores)if(this.allStores&&this.allStores[e]&&t.stores){t.stores.length<=this.limit?this.showLoadMore=!1:this.showLoadMore=!0;let n=[];if(RB(t))this.isInstacart=!0,this.storesList=[];else{let r=t.stores.filter(((n,r)=>{let s="delivery"==e?n?.ecomStore?.storeFeatures?.isB2BStore:n?.storeFeatures?.isB2BStore,a=n?.polarisBannerName!==this.currentBanner?.toLowerCase(),o=!this.isB2bSisterBannerDisabled||!a;return"B"!=this.siteType?t.stores:(i.length>this.limit&&(this.showLoadMore=!0),s&&o?(i.push(n),n):void(i.length<=this.limit?(this.showLoadMore=!1,0===i.length&&(this.showStores=!1)):this.showLoadMore=!0))})).map(((t,i)=>{if("instore"!==e&&(MB().AB.COMMON.authorize()||this.isGuestAddToCartEnabled)&&i<this.limit&&n.push(t.locationId),"delivery"===e)return this.prepareDeliveryObj(t);{let i=t.polarisBannerName;return h(h({city:t.address.city,distance:t.distance,logo:this.isURL(t.storeRewards.storeLogoURL)?this.getLogoSvg(t.domainName.replace(/-|'|\s/g,"")):this.getLogoSvg(i),storeID:t.locationId,street:t.address.line1,state:t.address.state,zipcode:t.address.zipcode,isSisterBanner:t.polarisBannerName!==this.currentBanner.toLowerCase(),bannerName:i,storeName:this.isURL(t.storeRewards.storeLogoURL)?t.domainName.replace(/-|'|\s/g,""):this.getLogoSvg(i),storeLogoURL:this.checkURL(t.storeRewards.storeLogoURL,t.polarisBannerName,t?.storeFeatures?.isB2BStore),showConfirmation:!1,selected:!1,pickupType:"pickup"===e?this.checkPickUpLocations(t):"",isEcommStore:t.ecomStore,bannerIconClassName:`svg-${i}-icon`,isWineD2CEnabled:t.storeFeatures&&t.storeFeatures.isWineD2CEnabled,wfcStoreId:t.wfcStoreId,isB2BStore:"B"==this.siteType&&t?.storeFeatures?.isB2BStore},this.isUnityBannersEnabled?{isNonMigratedStore:t.isNonMigratedStore}:{}),t.isNonMigratedStore?{nonMigratedStoreRedirectUrl:this.getNonMigratedStoreRedirectUrl(i)}:{})}}));this.storesList="delivery"===e?[...r.filter((e=>
1e.bannerName===this.currentBannerName)),...r.filter((e=>e.bannerName!==this.currentBannerName))]:r}if("instore"!==e&&!this.isInstacart&&(MB().AB.COMMON.authorize()||this.isGuestAddToCartEnabled)&&n&&n.length>0){let t,i=this.mkpSellers?.length>0;t=this.storeFulfillmentService.getCbaRequestObject(e,n,i),t.status||!1===t.status?(this.productAvailabilityResponse=!1,this.oosSellerTotal=0):this.isDeliveryDataReceived||this.storeFulfillmentService.getProductAvailability(t).subscribe((t=>{this.isMKPAndSellerEnabled&&t?(this.productAvailabilityResponse=t,this.productAvailabilityResponse?.sellerProducts&&(this.sellerProducts=this.productAvailabilityResponse?.sellerProducts,this.getSellerOOSItems())):this.productAvailabilityResponse=t,this.showLimitedStore(e),this.isDeliveryDataReceived=!1}))}this.showLimitedStore(e),"B"==this.siteType?this.storesList?.length>0?this.showStores=!0:this.showStores=!1:this.showStores=!0}else(t&&t.errors||"PARTIAL"===t?.zipCoverage&&"delivery"===e)&&(this.showTabs=!0,this.showStores=!1,this.isWineShopAvailable?this.deliveryHeading=this.deliveryVnCErrorMessage:this.deliveryHeading=GD,"instore"===e?MB().AB.DATALAYER&&MB().AB.DATALAYER.setUserMessageEvents("fulfillment-global-inStore-noStores"):(RB(this.allStores.delivery)?this.isInstacartPickUp=!0:this.isInstacartPickUp=!1,MB().AB.DATALAYER&&("onboarding"===this.requestType?MB().AB.DATALAYER.setUserMessageEvents("fulfillmentModal-dug-notAvailable"):this.isTwoTabModal?MB().AB.DATALAYER.setUserMessageEvents("fulfillment-shop-dug-notAvailable"):MB().AB.DATALAYER.setUserMessageEvents("fulfillment-global-dug-notAvailable"))));else{let t=MB().SWY.CONFIGSERVICE.getCookie(MB().AB?.COMMON?.getGeoCookieName()),i=t?JSON.parse(t):{};if(this.isSearchIconClicked)this.isPartialCoverage=!0,MB().AB?.COMMON?.authorize()&&this.getUserAddresses();else if(MB().AB?.COMMON?.authorize())if("delivery-addr"===MB().AB?.userInfo?.resolvedBy&&this.getSharedPiiInfoCookie()?.deliveryAddr){let t=this.getGeoAddrFromPiiCookie(),i=t[t.length-1];this.zipCode===i?(this.showRegisteredUserDeliveryAddress(e),this.isPartialCoverage=!1,this.isStoreAvailableWithUserAddr=!0):this.isPartialCoverage=!0}else this.isPartialCoverage=!0,this.getUserAddresses();else this.isPartialCoverage=!1,"delivery-addr"===MB().AB?.userInfo?.resolvedBy&&i?.adr1&&this.zipCode===i.zip?(this.callStoresByAddressAPI(this.prepareAddrReqObject(i),!1,e),this.isPartialCoverage=!1,this.isStoreAvailableWithUserAddr=!0):this.isPartialCoverage=!0}this.isWineShopAvailable&&this.filterStoreOnVnCBasis(),this.getMaxHeight()}prepareDeliveryObj(e){return h(h({logo:this.getLogoSvg(e.polarisBannerName),storeID:e.locationId,banner:e.banner,operatingStatus:e.operatingStatus,instacart:e.instacart,isSisterBanner:e.polarisBannerName!==this.currentBanner.toLowerCase(),bannerName:e.polarisBannerName,storeName:this.getLogoSvg(e.polarisBannerName),storeLogoURL:this.checkURL(void 0,e.polarisBannerName,e?.ecomStore?.storeFeatures?.isB2BStore),isB2BStore:e?.ecomStore?.storeFeatures?.isB2BStore,zipcode:e?.locationZipcode||e?.address?.zipcode,requestedZipcode:e.requestedZipcode,isAltBrandStore:e.isAltBrandStore,isExpressStore:e.isExpressStore,brandId:e.brandId,selected:!1,bannerIconClassName:`svg-${e.polarisBannerName}-icon`,isWineD2CEnabled:e.ecomStore&&e.ecomStore.storeFeatures&&e.ecomStore.storeFeatures.isWineD2CEnabled,wfcStoreId:e.ecomStore&&e.ecomStore.wfcStoreId},this.isUnityBannersEnabled?{isNonMigratedStore:e.isNonMigratedStore}:{}),e.isNonMigratedStore?{nonMigratedStoreRedirectUrl:this.getNonMigratedStoreRedirectUrl(e.polarisBannerName)}:{})}checkPickUpLocations(e){let t="";return t=e&&e.pickupLocations?this.pickupTypeLabel(e.pickupLocations[0]):this.dug?this.dug:"Drive up & Go",t}pickupTypeLabel(e){let t;switch(e.toString()){case"LOCKER-INSIDE":t=this.lockerInside?this.lockerInside:"Locker Pickup";break;case"LOCKER-OUTSIDE":t=this.lockerOutside?this.lockerOutside:"Locker Pickup";break;case"COUNTER-INSIDE":t=this.counterInside?this.counterInside:"Counter Pickup";break;case"COUNTER-OUTSIDE":t=this.counterOutside?this.counterOutside:"Counter Pickup";break;case"KIOSK-OUTSIDE":t=this.kioskOutside?this.kioskOutside:"Kiosk Pickup"}return t}getLogoSvg(e){if(e)return this.bannerLogoClass="safeway"===e.toLowerCase()?"svg-icon-{banner}-logo-rgb":"svg-icon-{banner}-logo",this.currentBannerClassName=`svg-${e.toLowerCase()}-icon`,this.bannerLogoClass=this.bannerLogoClass.replace("{banner}",e),this.bannerLogoClass}closeModal(e){e.preventDefault();let t="tabs-wrapper__tabs-header--tab",i="active";document.querySelectorAll(`.${t}`).forEach((e=>{e.classList&&e.classList.contains(i)&&e.classList.remove(i)})),this.setActiveTab();let n=document.querySelector(`.${this.activeTab}`);n&&n.parentElement&&n.parentElement.classList.contains(t)&&n.parentElement.classList.add(i),this.inputErrorMessage="",this.serviceErrorMessage.next(""),this.isServiceErrorMessage=!1,this.resetIsValidEmail(),!0===this.isStoreClosed&&MB().AB.COMMON.setDefaultStoreId(),this.storeFulfillmentService.retainedPref=!1}resetIsValidEmail(){this.emailIsValid=!1,this.emailInputError=""}setTab(e){$("#"+e).trigger("click"),$("#"+e+"-btn").trigger("click"),this.activeTab=e;let t=this.activeTab.replace("modal-tab-","");this.channelSelection(t),this.preferenceTypeTab=t.charAt(0).toUpperCase()+t.slice(1),$("#"+e+"-btn").focus()}getDefaultStores(e,t,i){this.isServiceErrorMessage=!1;MB().AB.storeResolverAllEndpoint;this.storeFulfillmentService.getStores(e).subscribe((e=>{if(this.deliveryData=this.allStores&&this.allStores.delivery?this.allStores.delivery:{},this.allStores=e,this.deliveryStores=this.allStores.delivery,this.refreshDeliveryTab&&(this.allStores.delivery=Object.assign({},this.deliveryData),this.deliveryStores=this.allStores.delivery),this.isPartialCoverage=!1,!this.refreshDeliveryTab)if("PARTIAL"!==this.deliveryStores?.zipCoverage&&!t||!1!==this.isStoreAvailableWithUserAddr){let e=MB().SWY.CONFIGSERVICE.getCookie(MB().AB?.COMMON?.getGeoCookieName()),t=e?JSON.parse(e):{};"delivery-addr"===MB().AB?.userInfo?.resolvedBy&&t?.adr1&&this.zipCode===t.zip&&this.callStoresByAddressAPI(this.prepareAddrReqObject(t),!1,i),this.showRegisteredUserDeliveryAddress(i)}else this.isPartialCoverage=!0;this.isGeoAllowed&&this.allStores.instore&&this.allStores.instore.stores&&this.allStores.instore.stores[0].address&&this.allStores.instore.stores[0].address.zipcode&&(this.zipCode=this.allStores.instore.stores[0].address.zipcode,this.zipValue=this.allStores.instore.stores[0].address.zipcode),this.showTabs=!0,this.getCurrentTabInfo(),this.allStores.pickup&&this.allStores.pickup.stores&&this.allStores.pickup.stores.forEac
1h(((e,t)=>{(MB().AB.COMMON.authorize()||this.isGuestAddToCartEnabled)&&t<this.limit&&this.storesWithOpenCBA.push({storeId:e.locationId,isOpen:!1})})),this.refreshDeliveryTab=!1}),(e=>{this.allStores=e,this.allStores.instore||this.allStores.delivery||this.allStores.pickup?(this.deliveryStores=this.allStores.delivery,this.showLoading=!1,this.setA11yMessage("Error getting results"),this.getCurrentTabInfo()):(this.showTabs=!1,this.showLoading=!1,this.setA11yMessage("Error getting results"),this.inputErrorMessage="Apologies, our site is currently experiencing technical difficulties, please try again later.")})),this.getMaxHeight()}checkURL(e,t,i){let n,r=e||"https://images.albertsons-media.com/is/image/ABS/"+t+"_logo";return n="B"==this.siteType&&i?"_b2b?$fulfillment$&defaultImage=Not_Available":this.$scene7Preset,r+n}isURL(e){return!!e}getMaxHeight(){if($(this.fullFillmentElem.tabCardWrapperClass).length>0){var e=$(this.fullFillmentElem.modalDialogClass).height()-($(this.fullFillmentElem.tabCardWrapperClass).offset().top-$(this.fullFillmentElem.modalDialogClass).offset().top);e>0&&$(this.fullFillmentElem.cardWrapperClass).css("max-height",e)}}getCurrentTabInfo(){this.isDeliveryDataReceived=!1,this.isTwoTabModal?this.activeTab===this.modalTabList[2]?this.getDelivery():this.activeTab===this.modalTabList[1]&&this.getStores("pickup"):"modal-tab-delivery"===this.activeTab?this.getStores("delivery"):"modal-tab-pickup"===this.activeTab?this.getStores("pickup"):this.getStores("instore")}getStoresByGeo(){let e=this;this.inputErrorMessage="",this.zipCode="",this.resetVariables();let t=this.isTwoTabModal?this.modalTabList[2]:this.modalTabList[0],i=this.requestType,n=this.isTwoTabModal;this.setActiveTab(t),navigator.geolocation.getCurrentPosition((function(t){e.zipValue="",MB().AB.DATALAYER&&(MB().AB.DATALAYER.geoEnabled(),"onboarding"===i?MB().AB.DATALAYER.setModalClickEvents("fulfillment-landing|geo"):n?MB().AB.DATALAYER.setModalClickEvents("fulfillment-shop|geo"):MB().AB.DATALAYER.setModalClickEvents("fulfillment-global|geo"));let r=t.coords.longitude,s=t.coords.latitude;console.info("User Allowed Geo: long"+r+"lat"+s),e.isGeoAllowed=!0;let a={latitude:s,longitude:r,excludeBanners:e.excludeBanners};e.getDefaultStores(a)}),(function(t){throw e.showTabs=!1,e.showLoading=!1,e.setA11yMessage("Error getting results"),e.inputErrorMessage=e.geoErrorMessage,MB().AB.DATALAYER&&(MB().AB.DATALAYER.geoBlocked(),"onboarding"===i?MB().AB.DATALAYER.setModalClickEvents("fulfillment-landing|geo"):n?MB().AB.DATALAYER.setModalClickEvents("fulfillment-shop|geo"):MB().AB.DATALAYER.setModalClickEvents("fulfillment-global|geo"),MB().AB.DATALAYER.setUserMessageEvents("location-blocked")),new Error("Error in Geo"+t)}),{enableHighAccuracy:!0,maximumAge:0})}setActiveTab(e){if(window.AB.COMMON.isLSCompatible()&&!window.AB.COMMON.authorize()&&localStorage.getItem("tooltip_modal")&&"1"!=localStorage.getItem("tooltip_modal"))this.setActiveTabFromToolTipLS();else if(e){if(this.isDeepLinkUrl&&!this.retainChannelPref)e=this.defaultTab||e;else if(this.retainChannelPref&&this.retainChannelPref.length>0&&this.storeFulfillmentService.retainedPref)e="modal-tab-"+this.retainChannelPref;else{let t=this.setTabFromSession();e=t===this.modalTabList[0]&&this.isTwoTabModal?this.modalTabList[2]:t||e}this.activeTab=e}else this.isTwoTabModal?this.activeTab=this.modalTabList[2]:this.activeTab=this.setTabFromSession()||this.activeTab;let t=this.activeTab.replace("modal-tab-","");this.preferenceTypeTab=t.charAt(0).toUpperCase()+t.slice(1)}setTabFromSession(){let e,t=this.sharedSessionPreference;return this.validPreferenceList.map(((i,n)=>{t===i&&(e=this.modalTabList[n])})),e}setActiveTabFromToolTipLS(){this.activeTab="modal-tab-"+localStorage.getItem("tooltip_modal"),localStorage.setItem("tooltip_modal","1")}resetVariables(){this.showLoading=!0,this.isNewAddress=!1,this.email="",this.emailPickUp="",this.currentStoreIndex=0,this.showTabs=!1,this.isInstacartPickUp=!1,this.isInstacart=!1}APIParams(e){return h({zipcode:e,size:this.size,radius:this.radius,excludeBanners:this.excludeBanners},this.isUnityBannersEnabled?{includeNonMigratedStores:!0}:{})}getMappedPreference(){let e=null;return e="j4u"===this.sharedSessionPreference?"instore":"dug"===this.sharedSessionPreference?"pickup":"delivery",e}setA11yMessage(e){this.a11yResults=e,setTimeout((()=>{this.a11yResults=""}),1e3)}setDataLayerSameBanner(){MB().AB.DATALAYER&&("onboarding"===this.requestType?MB().AB.DATALAYER.setModalClickEvents("fulfillment-landing|delivery"):(this.isTwoTabModal?localStorage.setItem("analyticsModalAction","fulfillment-shop|delivery"):localStorage.setItem("analyticsModalAction","fulfillment-global|delivery"),this.unavailableItemDelivery&&this.unavailableItemDelivery.unavailable_item&&this.unavailableItemDelivery.unavailable_item.cart_unavailable_total&&localStorage.setItem("analyticsUnavailableCount",this.unavailableItemDelivery.unavailable_item.cart_unavailable_total)))}setDataLayerCrossBanner(){let e="";return"onboarding"===this.requestType?e="fulfillment%2Dlanding%7Cdelivery%2DcrossBanner":(e=this.isTwoTabModal?"fulfillment%2Dshop%7Cdelivery%2DcrossBanner":"fulfillment%2Dglobal%7Cdelivery%2DcrossBanner",this.unavailableItemDelivery&&this.unavailableItemDelivery.unavailable_item&&this.unavailableItemDelivery.unavailable_item.cart_unavailable_total&&(e+="%2Du"+this.unavailableItemDelivery.unavailable_item.cart_unavailable_total)),e}applyEllipsis(e){e.not_offered_ids.forEach((e=>{e.name=this.storeFulfillmentService.addEllipsis(e.name)})),e.oos_offered_ids.forEach((e=>{e.name=this.storeFulfillmentService.addEllipsis(e.name)}
1)),e.not_offered_modifiers.forEach((e=>{e.name=this.storeFulfillmentService.addEllipsis(e.name)}))}isOpenCBATabs(){this.isOpenInTabs=!this.isOpenInTabs;let e=this.activeAccordion?.nativeElement;this.isOpenInTabs?e?.setAttribute("aria-expanded","true"):e?.setAttribute("aria-expanded","false"),this.isOpenInTabs&&MB().AB.DATALAYER&&(this.isTwoTabModal?MB().AB.DATALAYER.setModalClickEvents("fulfillment-shop|unavailable-expand"):MB().AB.DATALAYER.setModalClickEvents("fulfillment-global|unavailable-expand"))}receiveDeliveryAddrData(e){if(this.enableStoreSelectionWrapper&&"function"==typeof this.shAddressUpdateCallback&&e?.address&&this.shAddressUpdateCallback({payload:e.address,type:"addressAdded"}),this.isStoreAvailableWithUserAddr=!1,this.addrDetailsFromStoreByAddr=[],e.refreshDelivery){let t=e.address?this.storeFulfillmentService.normalizePostalCode(e.address.postalCode):e.zipCode;if(this.search(t,!0,"delivery"===e.intent?"delivery":""),this.zipCode=t,e.intent){let t={target:{className:"modal-tab-delivery nav-link nav-link-dst body-m"}};this.getStoresList(t,e.intent),this.channelSelection(e.intent),e.refreshDelivery=!1,this.showLoadMore=!0,MB().AB.COMMON.authorize()&&(this.isNewAddress=!0)}this.refreshDeliveryTab=e.refreshDelivery}else if("pickup"===e.intent){let t={target:{className:"modal-tab-pickup nav-link nav-link-dst body-m"}};this.getStoresList(t,e.intent),this.channelSelection(e.intent),e.refreshDelivery=!1}e.address&&e.stores.length>0&&(this.allStores.delivery.stores=e.stores,this.isDeliveryDataReceived=!0,this.getStores("delivery"),e.address.type=e.type,e.address.bName=e.bName,this.addrDetailsFromStoreByAddr=e,this.zipCoverage=e.zipCoverage,MB().AB.COMMON.authorize()||this.storeFulfillmentService.userResolvedAddress.next(e.address),this.isPartialCoverage=!1,this.isStoreAvailableWithUserAddr=!0)}showRegisteredUserDeliveryAddress(e){if(this.getSharedPiiInfoCookie()?.deliveryAddr&&MB().AB?.COMMON?.authorize()&&"delivery-addr"===MB().AB?.userInfo?.resolvedBy){let t={address:{}},i=this.getGeoAddrFromPiiCookie(),n=this.getSharedPiiInfoCookie()?.addressType;i.length>4?(t.address.adr1=i[0],t.address.adr2=i[1],t.address.city=i[2],t.address.st=i[3],t.address.zip=i[4]):4===i.length&&(t.address.adr1=i[0],t.address.city=i[1],t.address.st=i[2],t.address.zip=i[3]),n&&("1"===n||"residential"===n.toLowerCase()?t.address.type="residential":("2"===n||"business"===n.toLowerCase())&&(t.address.type="business")),this.zipCode===t.address.zip&&this.callStoresByAddressAPI(this.prepareAddrReqObject(t.address),!1,e)}}getSharedPiiInfoCookie(){let e=MB().SWY.CONFIGSERVICE.getCookie("SWY_SHARED_PII_SESSION_INFO");return e?JSON.parse(e):{}}getGeoAddrFromPiiCookie(){let e=this.getSharedPiiInfoCookie()?.deliveryAddr;return e?e?.replace(/\+/g," ")?.split(",")?.map((e=>e.trim())):[]}getResolvedAddress(){let e,t={},i=this.storeFulfillmentService.normalizePostalCode(this.addrDetailsFromStoreByAddr?.address?.postalCode);return e=this.addrDetailsFromStoreByAddr?.address?.addressLine2&&null!==this.addrDetailsFromStoreByAddr?.address?.addressLine2?this.addrDetailsFromStoreByAddr?.address?.addressLine2:"",this.isStoreAvailableWithUserAddr&&(e.length>0?t.streetAddr=`${this.addrDetailsFromStoreByAddr?.address?.addressLine1}, ${e}`:t.streetAddr=this.addrDetailsFromStoreByAddr?.address?.addressLine1,t.city=`${this.addrDetailsFromStoreByAddr?.address?.city}, ${this.addrDetailsFromStoreByAddr?.address?.stateCode}, ${i}`),t.name=`${this.addrDetailsFromStoreByAddr?.firstName||""} ${this.addrDetailsFromStoreByAddr?.lastName||""}`,t}editDeliveryAddrForm(){this.isPartialCoverage=!0,this.getUserAddresses()}getUserAddresses(){MB().AB.COMMON.authorize()&&this.storeFulfillmentService.getUserAddresses().subscribe((e=>{let t=e?.addresses?.filter((e=>e.zipCoverage&&"NO COVERAGE"!==e.zipCoverage));this.userAddresses=e?.addresses?.filter((e=>e.zipCoverage&&"NO COVERAGE"!==e.zipCoverage));let i=e?.defaultAddresses?.[0]?.addressId;t.map(((e,n)=>{e.addressId===i&&(e.isDefaultAddress=!0,t.splice(n,1),t.unshift(e))})),this.userAddresses=t}))}callStores(e){let{zipCode:t,refreshDelivery:i}=e;t&&(this.search(t),this.zipCode=t,this.refreshDeliveryTab=i)}callStoresByAddressAPI(e,t,i){this.showLoading=!0;let{address1:n,address2:r,city:s,state:a,zipCode:o,addressType:l,addressId:c,name:d={}}=e,u={address:{addressLine1:n,addressLine2:r||null,city:s,countryCode:null,postalCode:o||null,stateCode:a||null}};e?.addressName&&(u.address.addressName=e?.addressName?e?.addressName:null),this.storeFulfillmentService.getAddressAvailability(u).subscribe((n=>{this.showLoading=!1,n&&n?.stores?.length>0&&(n.address.type=l?.description?l.description:l,n.address.bName=e.bName,n.address.addressId=c,n.firstName=d?.firstName,n.lastName=d?.lastName,t?(n.refreshDelivery=!0,this.receiveDeliveryAddrData(n)):("delivery"===i&&this.setGeoDeliveryAddrData(n),this.addrDetailsFromStoreByAddr=n,this.isPartialCoverage=!1,this.isStoreAvailableWithUserAddr=!0,this.showStores=!0,MB().AB.COMMON.authorize()||this.storeFulfillmentService.userResolvedAddress.next(n.address)),this.enableStoreSelectionWrapper&&"function"==typeof this.shAddressUpdateCallback&&this.shAddressUpdateCallback({payload:e,type:"addressSelected"}))}),(e=>{this.showLoading=!1}))}
1setGeoDeliveryAddrData(e){this.allStores.delivery.stores=e?.stores,this.updateDeliveryTab("delivery")}updateDeliveryTab(e){let t=this.allStores[e],i=[],n=t.stores.filter(((n,r)=>{let s="delivery"==e?n?.ecomStore?.storeFeatures?.isB2BStore:n?.storeFeatures?.isB2BStore,a=n?.polarisBannerName!==this.currentBanner?.toLowerCase(),o=!this.isB2bSisterBannerDisabled||!a;return"B"!=this.siteType?t.stores:(i.length>this.limit&&(this.showLoadMore=!0),s&&o?(i.push(n),n):void(i.length<=this.limit?(this.showLoadMore=!1,0===i.length&&(this.showStores=!1)):this.showLoadMore=!0))})).map(((t,i)=>{if("instore"!==e&&MB().AB.COMMON.authorize()&&i<this.limit&&[].push(t.locationId),"delivery"===e)return this.prepareDeliveryObj(t)}));"delivery"===e&&(this.storesList=[...n.filter((e=>e.bannerName===this.currentBannerName)),...n.filter((e=>e.bannerName!==this.currentBannerName))]),this.showLimitedStore(e)}prepareAddrReqObject(e){let{type:t,adr1:i,adr2:n,city:r,zip:s,st:a}=e;return{address1:i,address2:n,city:r,state:a,zipCode:s,addressType:t,bName:e.bName||null}}filterStoreOnVnCBasis(){this.storesWithLimit=this.storesWithLimit.filter((e=>!0===e?.isWineD2CEnabled))}checkWineShopAvailability(){this.isWineShopAvailable="wineshop"===this.programType||this.isWineShopWalledAvailable&&this.isTwoTabModal}setIsGuestAddToCart(){this.isGuestAddToCartABSubscription=this._abTestService.isABFlagDisabledEvent$.pipe(nn()).subscribe((e=>{"isGuestAddToCartDisabled"===e.flagName&&(this.isGuestAddToCartEnabled="a"!==e.testValue)})),this._abTestService.listenToABXTestingFlag("abACIP295974","isGuestAddToCartDisabled","ACIP295974")}getNonMigratedStoreRedirectUrl(e){let t=MB()?.SWY?.configService?.notMigratedUnityBanners,i=e.toLowerCase();for(let e of t){let[t,n]=e.split("|");if(t===i&&n)return n}return""}ngOnDestroy(){this.isGuestAddToCartABSubscription&&this.isGuestAddToCartABSubscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(ov),$d(HD),$d(uP),$d(Tl),$d(QD))}}static{this.ɵcmp=Qr({type:e,selectors:[["store-fulfillment-tabs"]],viewQuery:function(e,t){if(1&e&&tm(JD,5),2&e){let e;im(e=nm())&&(t.activeAccordion=e.first)}},inputs:{email:"email",emailPickUp:"emailPickUp",zipCode:"zipCode",requestType:"requestType",defaultTab:"defaultTab",tabsType:"tabsType",searchPlaceholder:"searchPlaceholder",radiu
vendor: 5,986 bytes, line 1
1s:"radius",size:"size",instaCartPoweredby:"instaCartPoweredby",instacartimage:"instacartimage",instacartButtontext:"instacartButtontext",noServiceAreaLink:"noServiceAreaLink",instacartShortDescription:"instacartShortDescription",instacartUrl:"instacartUrl",geoErrorMessage:"geoErrorMessage",isDeepLinkUrl:"isDeepLinkUrl",counterInside:"counterInside",counterOutside:"counterOutside",kioskOutside:"kioskOutside",lockerInside:"lockerInside",lockerOutside:"lockerOutside",dug:"dug",isReBanneredStoreFlag:"isReBanneredStoreFlag",guestPartialDeliveryMsg:"guestPartialDeliveryMsg",registerPartialDeliveryMsg:"registerPartialDeliveryMsg",deliveryVnCErrorMessage:"deliveryVnCErrorMessage",inStoreVnCErrorMessage:"inStoreVnCErrorMessage",programType:"programType",isPopupWrapperView:"isPopupWrapperView",isStoreSelectionWrapperView:"isStoreSelectionWrapperView",spaSelectedStoreId:"spaSelectedStoreId",shRedirectPath:"shRedirectPath",shCallback:"shCallback",shAddressUpdateCallback:"shAddressUpdateCallback",spaIntent:"spaIntent",nativeCallback:"nativeCallback",platform:"platform",appDeepLinks:"appDeepLinks"},features:[ga],decls:16,vars:11,consts:[["noServiceErrorInstore",""],["geoPhase2",""],["guestUserDelivery",""],["registeredUserDelivery",""],["deliveryResults",""],["noServiceErrorDelivery",""],["noServiceErrorPickup",""],["nonVnCInStoreErrorMessage",""],["noStores",""],["selectedStore",""],["regularDeliveryError",""],["multiDeliveryNoInstacart",""],["nonVnCPickupErrorMessage",""],["noPickUpStore",""],["noDeliveryNoInstacartPickUp",""],["selectedStorePickUp",""],[1,"store-fulfillment-tabs"],["data-qa","hmpg-flfllmntmdl-glctricn",1,"fulfillment-content__locator-wrapper",3,"click"],["class","icon svg-location dst__svg-location",4,"ngIf"],["class","svg-icon svg-icon-locator-grey fulfillment-content__locator-wrapper__icon","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["data-qa","hmpg-flfllmntmdl-zipcode",1,"fulfillment-content__search-wrapper","form-group","dst__form-group--position"],["type","text","maxlength","5","data-qa","hmpg-flfllmntmdl-zpcdtxtbx","aria-describedby","searchZipError","aria-labelledby","zipcode",1,"input-search","fulfillment-content__search-wrapper__input","body-m","form-control",3,"ngModelChange","blur","keydown.enter","placeholder","ngModel","ngClass"],["role","button","tabindex","0","aria-label","search Zipcode","data-qa","hmpg-flfllmntmdl-zipcode",1,"svg-icon-search-grey","fulfillment-content__search-wrapper__icon",3,"keyup.enter","click"],["class","icon svg-search",4,"ngIf"],["class","svg-icon svg-icon-search-grey","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","data-qa","svg-icn-srch-grey",4,"ngIf"],["class","fulfillment-content__error-message instructionalText errorMessage","id","searchZipError","role","alert","aria-live","polite",4,"ngIf"],["class","tabs-wrapper","data-qa","hmpg-flfllmntmdl-tbs",4,"ngIf"],["aria-live","polite"],[4,"ngIf"],[1,"sr-only"],[1,"icon","svg-location","dst__svg-location"],["viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-locator-grey","fulfillment-content__locator-wrapper__icon"],["id","Artboard","stroke","none","stroke-width","1","fill","none","fill-rule","evenodd"],["id","Locate-Me","stroke","#757575"],["id","Group-3","transform","translate(2.000000, 3.000000)"],["id","Oval","stroke-width","1.7","cx","9.775","cy","9.35","r","6.8"],["x1","16.575","y1","6.8","x2","16.575","y2","11.9","id","Line-5-Copy-4","stroke-width","1.7","transform","translate(16.575000, 9.350000) rotate(90.000000) translate(-16.575000, -9.350000) "],["x1","2.975","y1","6.8","x2","2.975","y2","11.9","id","Line-5-Copy-5","stroke-width","1.7","transform","translate(2.975000, 9.350000) rotate(90.000000) translate(-2.975000, -9.350000) "],["x1","9.775","y1","13.6","x2","9.775","y2","18.7","id","Line-5","stroke-width","1.7"],["x1","9.775","y1","0","x2","9.775","y2","5.1","id","Line-5-Copy","stroke-width","1.7"],[1,"icon","svg-search"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","data-qa","svg-icn-srch-grey",1,"svg-icon","svg-icon-search-grey"],["fill","#4B4B4B","fill-rule","evenodd","d","M11.048 3.857a7.19 7.19 0 0 1 5.742 11.519l3.854 3.854-1.414 1.414-3.854-3.854a7.19 7.19 0 1 1-4.328-12.933zm0 2a5.19 5.19 0 1 0 0 10.381 5.19 5.19 0 0 0 0-10.38z"],["id","searchZipError","role","alert","aria-live","polite",1,"fulfillment-content__error-message","instructionalText","errorMessage"],["data-qa","hmpg-flfllmntmdl-tbs",1,"tabs-wrapper"],["aria-orientation","horizontal","role","tablist",1,"nav","nav-tabs","tabs-wrapper__tabs-header"],["id","modal-tab-instore","role","presentation","class","nav-item tabs-wrapper__tabs-header--tab tabs-wrapper__tabs-header--in-store",3,"ngClass","click",4,"ngIf"],["role","presentation","id","modal-tab-delivery",1,"nav-item","tabs-wrapper__tabs-header--tab","tabs-wrapper__tabs-header--delivery",3,"click","ngClass"],["href","#fulfilmentDelivery","data-qa","hmpg-flfllmntmdl-delivery","aria-controls","fulfilmentDelivery","id","modal-tab-delivery-btn","role","tab","data-toggle","tab",1,"modal-tab-delivery","nav-link","nav-link-dst","body-m",3,"keyup.arrowright","keyup.arrowleft","click"],["role","presentation","id","modal-tab-pickup",1,"nav-item","tabs-wrapper__tabs-header--tab","tabs-wrapper__tabs-header--pickup",3,"click","ngClass"],["href","#fulfilmentPickup","id","modal-tab-pickup-btn","data-qa","hmpg-flfllmntmdl-pckptb","aria-controls","fulfilmentPickup","role","tab","data-toggle","tab",1,"modal-tab-pickup","nav-link","nav-link-dst","body-m",3,"keyup.arrowright","keyup.arrowleft","click"],[1,"tab-content","tabs-wrapper__tabs-content"],["id","fulfilmentInStore","role","tabpanel",1,"tab-pane","tabs-wrapper__tabs-content--in-store",3,"ngClass"],[4,"ngIf","ngIfElse"],["id","fulfilmentDelivery","role","tabpanel",1,"tab-pane","tabs-wrapper__tabs-content--delivery",3,"ngClass"],["
1id","fulfilmentPickup","role","tabpanel",1,"tab-pane","tabs-wrapper__tabs-content--pickup",3,"ngClass"],["id","modal-tab-instore","role","presentation",1,"nav-item","tabs-wrapper__tabs-header--tab","tabs-wrapper__tabs-header--in-store",3,"click","ngClass"],["href","#fulfilmentInStore","id","modal-tab-instore-btn","data-qa","hmpg-flfllmntmdl-nstrtb","role","tab","aria-controls","fulfilmentInStore","data-toggle","tab",1,"modal-tab-instore","nav-link","nav-link-dst","body-m",3,"keyup.arrowright","keyup.arrowleft"],["role","alert","aria-live","polite",1,"fulfillment-content__service-error-message","instructionalText","errorMessage"],[1,"card-wrapper"],["aria-hidden","true","width","21px","height","16px","viewBox","0 0 21 16","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-store-header-red"],["id","Iconography","stroke-width","1","fill-rule","evenodd"],["transform","translate(-3391.000000, -1447.000000)","id","Header-Icons"],["transform","translate(2924.000000, 1217.000000)"],["id","Store","transform","translate(467.000000, 198.000000)"],["id","Icon-/-Web-/-Header-/-Store-16","transform","translate(0.000000, 32.000000)"],["id","Icons-/-Small-/-Shop"],["d","M21,1.6 L21,0 L0,0 L0,1.6 L1.05,1.6 L1.05,14.4 L0,14.4 L0,16 L21,16 L21,14.4 L19.95,14.4 L19.95,1.6 L21,1.6 Z M6.3,9.6 L9.45,9.6 L9.45,14.4 L6.3,14.4 L6.3,9.6 Z M14.7,14.4 L11.55,14.4 L11.55,9.6 L14.7,9.6 L14.7,14.4 Z M14.7,8 L6.3,8 L6.3,6.4 L14.7,6.4 L14.7,8 Z","id","Shape","fill-rule","nonzero"],[1,"delivery-content__text--info","body-xl"],["class","in-store-content","data-qa","hmpg-flfllmntmdl-nstrcntnt",4,"ngIf"],["data-qa","hmpg-flfllmntmdl-nstrcntnt",1,"in-store-content"],["class","card-wrapper",4,"ngIf","ngIfElse"],["class","card-store row",4,"ngFor","ngForOf"],["class","btn btn-link text-center load-more body-m load-more-dst","data-qa","hmpg-flfllmntmdl-ldmrlnk",3,"click",4,"ngIf"],[1,"card-store","row"],["data-type","instore",3,"isThemeBuilderEnabled","behaviourType","store","storesWithLimit","isReBanneredStore","isPartialCoverage","isPopupWrapperView","isStoreSelectionWrapperView","shRedirectPath","shCallback","spaIntent","nativeCallback","platform","appDeepLinks"],[1,"col-6","col-sm-6","card-store__address"],[1,"caption",3,"id"],["role","img",3,"alt","src","ngClass"],[1,"body-m"],[1,"col-6","col-sm-6","card-store__location"],[1,"caption"],["href","#","role","button","disabled","","aria-disabled","true","data-qa","hmpg-flfllmntmdl-srchrsltSlctdtbtn",1,"btn","btn-default","card-store-btn-disabled","btn-outline-primary"],["data-qa","hmpg-flfllmntmdl-ldmrlnk",1,"btn","btn-link","text-center","load-more","body-m","load-more-dst",3,"click"],["aria-hidden","true","class","icon svg-store text-primary",4,"ngIf"],["aria-hidden","true","class","svg-icon svg-icon-store-header-red","width","21px","height","16px","viewBox","0 0 21 16","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["id","notifyMeInfoNoStores",1,"delivery-content__text--info","body-xl"],["aria-hidden","true",1,"icon","svg-store","text-primary"],[4,"ngIf","ngIfThen","ngIfElse"],[3,"setStoreData","guestPartialDeliveryMsg","isEditStoreAddress","zipCode","enableStoreSelectionWrapper"],[1,"delivery-content"],[1,"user-address-wrapper"],[1,"registered-user-text"],[1,"d-flex","address-container"],[1,"d-flex","address-card","justify-content-center","add-new-address"],["data-qa","hp_ff_dd_ddrs","aria-label","Add new address","role","link","tabindex","0",1,"links__action","justify-content-center","link-sm","address-type",3,"click","keyup.enter"],["class","d-flex address-card","data-qa","hp_ff_ddr_crd",4,"ngFor","ngForOf"],["data-qa","hp_ff_ddr_crd",1,"d-flex","address-card"],["tabindex","-1","data-qa","hp_ff_ddr_typ",1,"word-highlight-sm","mb-0","address-type","d-inline-block"],["class","word-highlight-sm mb-0 address-type d-inline-block default-address-badge","tabindex","-1",4,"ngIf"],[1,"address-text"],["data-qa","hp_ff_ddr_txt_1",1,"word-highlight-sm","mb-0","body-text-sm"],["data-qa","hp_ff_ddr_txt_1",1,"mb-0","body-text-sm"],["data-qa","hp_ff_ddr_txt_2",1,"mb-0","body-text-sm"],["data-qa","hp_ff_ddr_zp",1,"mb-0","body-text-sm"],["aria-hidden","false","aria-labelledby","address-text","data-qa","hp_ff_s_ddr",1,"btn","btn-secondary","body-text-xs","w-100",3,"click"],["tabindex","-1",1,"word-highlight-sm","mb-0","address-type","d-inline-block","default-address-badge"],[3,"setStoreData","registerPartialDeliveryMsg","isEditStoreAddress","enableStoreSelectionWrapper"],["data-qa","hmpg-flfllmntmdl-dlvrycntntcrdwrpr",1,"delivery-content","card-wrapper"],["class","svg-icon svg-icon-Delivery-pref-page delivery-content__icon","data-qa","hmpg-flfllmntmdl-crssbnnrdlivrytruckicn","role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["role","img","aria-hidden","true","class","icon svg-delivery text-primary","data-qa","hmpg-flfllmntmdl-crssbnnrdlivrytruckicn",4,"ngIf"],["class","delivery-content__text--info body-xl delivery-heading","data-qa","hmpg-flfllmntmdl-dlivrynotavltxt",4,"ngIf"],[1,"svg-icon","svg-icon-Delivery-pref-page","delivery-content__icon","delivery-icon-perf"],[1,"delivery-content__text--info","body-xl","delivery-heading"],["class","verified-address d-flex","data-qa","hp_ff_vry_ddr",4,"ngIf"],["data-qa","hp_ff_vry_ddr",1,"verified-address","d-flex"],[1,"verified-address-user","d-flex"],["data-qa","hp_ff_vry_ddr_lbl",1,"verified-address-user-label"],[1,"verified-address-user-street"],["data-qa","hp_ff_vry_ddr_txt1"],["data-qa","hp_ff_vry_ddr_txt2"],[1,"verified-address-edit","d-flex"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 16 16","fill","none","data-qa","hp_ff_vry_ddr_pncl","tabindex","0","role","button",1,"verified-address-edit-icon",3,"click","keyup.enter"],["clip-path","url(#clip0_5169_332057)"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.54368 14.6513L15.2348 4.92482C15.7765 4.38342 15.8376 3.67716 15.6603 3.04363C15.4864 2.42246 15.0777 1.82197 14.5869 1.34732C14.0958 0.872374 13.4792 0.481461 12.8451 0.324226C12.1992 0.164064 11.4888 0.241886 10.9436 0.786497L1.46634 10.5512C1.40467 10.6148 1.36098 10.6936 1.33974 10.7795L0.494166 14.201C0.299455 14.9888 0.997047 15.7085 1.79058 15.5383L5.29429 14.7873C5.38882 14.767 5.47545 14.7198 5.54368 14.6513ZM10.1326 3.05791L11.6529 1.49157C11.8833 1.26309 12.1974 1.19392 12.6044 1.29483
1C13.0246 1.39903 13.4912 1.67886 13.8917 2.06615C14.2925 2.45374 14.5836 2.90697 14.6973 3.31319C14.8075 3.70692 14.7437 4.00191 14.528 4.21737L14.5272 4.21818L13.0249 5.72598L10.1326 3.05791ZM9.43593 3.77574L2.27809 11.1507L1.46496 14.4409C1.44753 14.5114 1.50996 14.5758 1.58098 14.5606L4.93985 13.8405L12.3186 6.4349L9.43593 3.77574Z","fill","none",1,"svg-icon"],["id","clip0_5169_332057"],["width","16","height","16","fill","white"],["data-qa","hmpg-flfllmntmdl-crssbnnrdlivrytruckicn","role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-Delivery-pref-page","delivery-content__icon"],["stroke-width","1","fill-rule","evenodd"],["d","M20.2472727,15.2518182 C20.2472727,15.2518182 20.2472727,14.5318182 20.2472727,12.92 C20.2472727,11.3081818 20.3290909,10.4654545 19.7809091,9.94181818 C19.2327273,9.41818182 18.4963636,8.69818182 18.0709091,8.30545455 C17.6813722,7.80375663 17.0683781,7.52790927 16.4345455,7.56909091 L14.9618182,7.56909091 L14.9618182,5.93272727 C14.957374,5.41944835 14.5423698,5.00444422 14.0290909,5 L3.93272727,5 C3.42258803,5.00435932 3.00885369,5.41446442 3,5.92454545 L3,15.5545455 C2.99998047,16.0710167 3.41627556,16.4909635 3.93272727,16.4954545 L4.27636364,16.4954545 C4.27636364,17.9708079 5.47237388,19.1668182 6.94772727,19.1668182 C8.42308067,19.1668182 9.61909091,17.9708079 9.61909091,16.4954545 L13.6363636,16.4954545 C13.6363636,17.9685486 14.8305423,19.1627273 16.3036364,19.1627273 C17.7767304,19.1627273 18.9709091,17.9685486 18.9709091,16.4954545 L20.2227273,16.4954545 C20.6014145,16.5287451 20.9366641,16.2517998 20.9754545,15.8736364 C20.9367885,15.5056573 20.6167667,15.2323803 20.2472727,15.2518182 Z M6.95181818,17.87 C6.19267769,17.87 5.57727273,17.254595 5.57727273,16.4954545 L8.32636364,16.4954545 C8.32636364,17.254595 7.71095867,17.87 6.95181818,17.87 Z M16.32,17.87 C15.9554479,17.87 15.6058269,17.7251822 15.3480496,17.467405 C15.0902723,17.2096277 14.9454545,16.8600067 14.9454545,16.4954545 L17.7272728,16.4954545 C17.7273777,16.8657485 17.5780761,17.2204222 17.3131766,17.4791613 C17.0482771,17.7379003 16.690189,17.8788165 16.32,17.87 Z M18.6763636,11.4472727 L14.9618182,11.4472727 L14.9618182,9.10727273 L16.0909091,9.10727273 C16.2521588,9.09359394 16.4119348,9.14685259 16.5327273,9.25454545 L18.5454545,10.9645455 C18.7172727,11.1118182 18.6763636,11.2590909 18.6763636,11.4472727 L18.6763636,11.4472727 Z"],["role","img","aria-hidden","true","data-qa","hmpg-flfllmntmdl-crssbnnrdlivrytruckicn",1,"icon","svg-delivery","text-primary"],["data-qa","hmpg-flfllmntmdl-dlivrynotavltxt",1,"delivery-content__text--info","body-xl","delivery-heading"],["id","instacartContainer",1,"instacart-inner"],[1,"d-none"],["class","icon svg-rush-delivery text-primary",4,"ngIf"],["class","svg-icon svg-icon-rush-large-red delivery-content__icon","width","65px","height","30px","viewBox","0 0 65 30","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],[1,"delivery-content__text--info"],[1,"powered-by"],[1,"logo"],["alt","Powered by Instacart",1,"insta-cart-image",3,"src"],[1,"btn","delivery-content__button--inverse","delivery-content__button--primary","btn-primary",3,"href"],[1,"icon","svg-rush-delivery","text-primary"],["width","65px","height","30px","viewBox","0 0 65 30","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-rush-large-red","delivery-content__icon"],["transform","translate(-13.000000, -29.000000)"],["transform","translate(13.000000, 13.000000)"],["id","Group","transform","translate(0.000000, 16.000000)"],["d","M12.2666667,4.71679574 L1.6,4.71679574 C0.7163444,4.71679574 1.06396373e-16,4.00045134 0,3.11679574 C-1.06396373e-16,2.23314014 0.7163444,1.51679574 1.6,1.51679574 L12.2666667,1.51679574 C13.1503223,1.51679574 13.8666667,2.23314014 13.8666667,3.11679574 C13.8666667,4.00045134 13.1503223,4.71679574 12.2666667,4.71679574 Z","id","Shape","fill-rule","nonzero"],["d","M8.32,9.78346241 L1.65333333,9.78346241 C0.769677734,9.78346241 0.0533333333,9.06711801 0.0533333333,8.18346241 C0.0533333333,7.29980681 0.769677734,6.58346241 1.65333333,6.58346241 L8.32,6.58346241 C9.2036556,6.58346241 9.92,7.29980681 9.92,8.18346241 C9.92,9.06711801 9.2036556,9.78346241 8.32,9.78346241 Z","id","Shape","fill-rule","nonzero"],["d","M4.45333333,14.8767957 L1.78666667,14.8767957 C0.903011067,14.8767957 0.186666667,14.1604513 0.186666667,13.2767957 C0.186666667,12.3931401 0.903011067,11.6767957 1.78666667,11.6767957 L4.45333333,11.6767957 C5.33698893,11.6767957 6.05333333,12.3931401 6.05333333,13.2767957 C6.05333333,14.1604513 5.33698893,14.8767957 4.45333333,14.8767957 Z","id","Shape","fill-rule","nonzero"],["d","M61.04,13.3567957 L56.9866667,12.2901291 C55.1864928,11.9217633 53.5512958,10.987365 52.32,9.62346241 L45.36,2.90346241 C43.380111,0.879213024 40.6113206,-0.173707276 37.7866667,0.0234624095 L27.6266667,0.0234624095 C24.0163178,0.158808788 20.542422,1.43817365 17.7066667,3.67679574 C15.28,5.75679574 11.9733333,8.79679574 10.08,10.6901291 C8.18666667,12.5834624 7.68,13.1967957 7.41333333,14.8501291 C7.14666667,16.5034624 6.90666667,17.9167957 6.29333333,21.7034624 C5.68,25.4901291 10.0266667,25.1701291 14.48,25.1701291 L14.6933333,25.1701291 C14.7869041,25.544396 14.9117887,25.9
1101296 15.0666667,26.2634624 C15.7921788,27.7890143 17.0982326,28.9606213 18.6933333,29.5167957 C19.3768161,29.766252 20.099088,29.8926496 20.8266667,29.8901291 C21.8880415,29.8852086 22.9319593,29.6196505 23.8666667,29.1167957 C25.4698495,28.2563824 26.6959273,26.8307105 27.3066667,25.1167957 L42.32,25.1167957 C42.4135708,25.4910627 42.5384554,25.8567963 42.6933333,26.2101291 C43.3950734,27.7453133 44.6817713,28.935989 46.2666667,29.5167957 C46.9501494,29.766252 47.6724213,29.8926496 48.4,29.8901291 C49.4613748,29.8852086 50.5052927,29.6196505 51.44,29.1167957 C53.0431829,28.2563824 54.2692606,26.8307105 54.88,25.1167957 L58.9333333,25.1167957 C61.9466667,25.1167957 63.6533333,21.3567957 64.0266667,18.2367957 C64.4179349,16.0871229 63.1322926,13.9864751 61.04,13.3567957 Z M24.0266667,24.0234624 C23.7130426,24.9229949 23.0762518,25.6738378 22.24,26.1301291 C21.5633022,26.558716 20.7297913,26.6604175 19.9698926,26.4071179 C19.2099939,26.1538184 18.604206,25.5723507 18.32,24.8234624 C17.4480463,22.9259756 18.1937148,20.6773191 20.0266667,19.6767957 C20.4383783,19.4598299 20.8947488,19.3411736 21.36,19.3301291 C21.6781651,19.3273543 21.9942589,19.3815418 22.2933333,19.4901291 C23.0856689,19.7602892 23.7193955,20.364767 24.0266667,21.1434624 C24.4002996,22.0671078 24.4002996,23.099817 24.0266667,24.0234624 Z M30.64,10.6901291 L14.64,10.6901291 C18.8,6.69012908 21.7066667,3.11679574 26.4266667,3.11679574 L33.04,3.11679574 L30.64,10.6901291 Z M35.9733333,3.06346241 C38.2921845,2.77340935 40.6434804,3.22127524 42.6933333,4.34346241 C44.3733333,5.81012908 49.28,10.6901291 49.28,10.6901291 L33.68,10.6901291 L35.9733333,3.06346241 Z M51.52,23.9701291 C51.2063759,24.8696616 50.5695851,25.6205044 49.7333333,26.0767957 C49.0566355,26.5053827 48.2231246,26.6070842 47.4632259,26.3537846 C46.7033272,26.1004851 46.0975394,25.5190173 45.8133333,24.7701291 C45.0072244,22.9009836 45.7440861,20.7249388 47.52,19.7301291 C47.9533277,19.4915675 48.4387208,19.3633505 48.9333333,19.3567957 C49.2514984,19.354021 49.5675922,19.4082085 49.8666667,19.5167957 C50.6286469,19.8064338 51.230362,20.4081488 51.52,21.1701291 C51.8508161,22.0282382 51.8508161,22.9786866 51.52,23.8367957 L51.52,23.9701291 Z","id","Shape","fill-rule","nonzero"],["data-type","delivery",3,"isThemeBuilderEnabled","behaviourType","store","storesWithLimit","isReBanneredStore","sellerProducts","oosSellerTotal","mkpSellers","unavailableSeller","addrDetailsFromStoreByAddr","isStoreAvailableWithUserAddr","zipCoverage","isPopupWrapperView","isStoreSelectionWrapperView","shRedirectPath","shCallback","nativeCallback","platform","appDeepLinks"],[3,"ngTemplateOutlet"],["role","img","aria-hidden","true","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","store-icon","svg-icon-DUG-pref-page"],["d","M21,8.99853401 C21,8.32073 20.4505313,7.77126128 19.7727273,7.77126128 L18.2427273,7.77126128 C17.8467393,6.81904844 17.356094,5.90902486 16.7781818,5.05489765 C15.3013913,4.30246126 13.6561235,3.94185462 12,4.00762492 C10.3438765,3.94185462 8.69860869,4.30246126 7.22181818,5.05489765 C6.64390598,5.90902486 6.15326074,6.81904844 5.75727273,7.77126128 L4.22727273,7.77126128 C3.54946872,7.77126128 3,8.32073 3,8.99853401 C3,9.67633802 3.54946872,10.2258067 4.22727273,10.2258067 L4.70181818,10.2258067 C4.55072659,10.5900637 4.43563298,10.9682284 4.35818182,11.3548976 C4.21909091,12.4430795 4.12090909,15.5112613 4.10454545,16.8448976 C4.08818182,18.178534 4.36636364,19.2012613 5.64272727,19.2012613 C6.05326187,19.2213958 6.45168017,19.0589224 6.7310618,18.7574428 C7.01044344,18.4559632 7.14217659,18.0463522 7.09090909,17.638534 L7.09090909,16.8203522 L16.9090909,16.8203522 L16.9090909,17.638534 C16.860449,18.0450357 16.9933651,18.4523219 17.2724262,18.751879 C17.5514874,19.0514362 17.9483482,19.2128371 18.3572727,19.1930795 C19.6336364,19.1930795 19.9118182,18.1703522 19.8954545,16.8367158 C19.8790909,15.5030795 19.7809091,12.4430795 19.6418182,11.3467158 C19.5638531,10.9628301 19.4487667,10.5874295 19.2981818,10.2258067 L19.7727273,10.2258067 C20.4505313,10.2258067 21,9.67633802 21,8.99853401 Z M8.17090909,6.24126128 C9.39265072,5.76461387 10.6888428,5.50703725 12,5.48035219 C13.3106664,5.50442562 14.6068421,5.75922939 15.8290909,6.23307946 C16.2381818,6.54398855 17.3427273,9.31762492 17.3427273,9.31762492 L6.65727273,9.31762492 C6.65727273,9.31762492 7.76181818,6.54398855 8.17090909,6.24126128 Z M6.84545455,14.0548976 C6.0546832,14.0548976 5.41363636,13.4138508 5.41363636,12.6230795 C5.41363636,11.8323081 6.0546832,11.1912613 6.84545455,11.1912
1613 C7.63622589,11.1912613 8.27727273,11.8323081 8.27727273,12.6230795 C8.27727273,13.4138508 7.63622589,14.0548976 6.84545455,14.0548976 Z M17.1545455,14.0548976 C16.3637741,14.0548976 15.7227273,13.4138508 15.7227273,12.6230795 C15.7227273,11.8323081 16.3637741,11.1912613 17.1545455,11.1912613 C17.9453168,11.1912613 18.5863636,11.8323081 18.5863636,12.6230795 C18.5863636,13.4138508 17.9453168,14.0548976 17.1545455,14.0548976 Z"],[1,"pickup-content","delivery-content","card-wrapper"],["class","",4,"ngIf","ngIfElse"],[1,""],["data-type","pickup",3,"isThemeBuilderEnabled","behaviourType","store","storesWithLimit","isReBanneredStore","isPartialCoverage","isPopupWrapperView","isStoreSelectionWrapperView","shRedirectPath","shCallback","nativeCallback","platform","appDeepLinks"],["href","#","data-qa","hmpg-flfllmntmdl-pkpSlctdtbtn","role","button","disabled","","aria-disabled","true",1,"btn","btn-default","card-store-btn-disabled","btn-outline-primary"],["class","accordion-item section",4,"ngIf"],[1,"pickupType","body-m","body-m--bold"],[1,"accordion-item","section"],["role","button","tabindex","0","class","accordion-header active-header body-s",3,"ngClass","click",4,"ngIf"],["class","col-12 col-sm-12 accordion-content open-content pb-1",4,"ngIf"],["role","button","tabindex","0",1,"accordion-header","active-header","body-s",3,"click","ngClass"],[1,"col-12","col-sm-12","accordion-content","open-content","pb-1"],[1,"col-12","carousel-content-wrapper","product-carousel-v2","oos-items","mb-0"],["class","body-s unavailable-list-item",4,"ngFor","ngForOf"],[1,"body-s","unavailable-list-item"],["role","img","aria-hidden","true","class","icon svg-delivery text-primary",4,"ngIf"],["class","svg-icon svg-icon-Delivery-pref-page delivery-content__icon","role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],[1,"delivery-content__button","delivery-content__button--inverse",3,"click"],["role","img","aria-hidden","true",1,"icon","svg-delivery","text-primary"],["role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-Delivery-pref-page","delivery-content__icon"],["id","crossBannerInfo",1,"delivery-content__text--info"],["id","crossBannerAdditionalInfo",1,"delivery-content__text--additional-info-bold","body-s","body-s--bold"],["aria-describedby","crossBannerInfo crossBannerAdditionalInfo",1,"delivery-content__button","delivery-content__button--cross"],["role","img","aria-hidden","true","class","icon svg-drive-up-and-go text-primary",4,"ngIf"],["class","svg-icon store-icon svg-icon-DUG-pref-page","role","img","aria-hidden","true","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["id","noDeliveryInfo",1,"delivery-content__text--info"],["id","noDeliveryAdditionalInfo",1,"delivery-content__text--additional-info","d-none"],[1,"email-wrapper","d-none"],[1,"email-wrapper__text"],["type","text","maxlength","40","aria-label","Email address",1,"email-wrapper__input",3,"ngModelChange","blur","keydown","focus","ngModel"],["class","fulfillment-content__error-message instructionalText errorMessage","role","alert","aria-live","polite",4,"ngIf"],["id","notifyMeButtonPickUp","aria-describedby","noDeliveryInfo noDeliveryAdditionalInfo",1,"delivery-content__button--inverse","d-none",3,"click","ngClass"],["role","img","aria-hidden","true",1,"icon","svg-drive-up-and-go","text-primary"],["role","alert","aria-live","polite",1,"fulfillment-content__error-message","instructionalText","errorMessage"],["id","notifyMeInfo",1,"delivery-content__text--info"],["id","notifyMeAdditionalInfo",1,"delivery-content__text--additional-info"],["class","delivery-content__coupons",3,"innerHTML",4,"ngIf"],[1,"delivery-content__coupons",3,"innerHTML"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&(kf(0,"div",16)(1,"button",17),jf("click",(function(){return t.getStoresByGeo()})),ph(2,iO,1,0,"span",18)(3,nO,9,0,"svg",19),am(4," Use my current location "),xf(
1),kf(5,"div",20)(6,"input",21),mm("ngModelChange",(function(e){return fm(t.zipCode,e)||(t.zipCode=e),e})),jf("blur",(function(){return t.checkValidation(t.zipCode)}))("keydown.enter",(function(){return t.search(),t.isSearchIconClicked=!0})),xf(),kf(7,"span",22),jf("keyup.enter",(function(){return t.search(),t.isSearchIconClicked=!0}))("click",(function(){return t.search(),t.isSearchIconClicked=!0})),ph(8,rO,1,0,"span",23)(9,sO,2,0,"svg",24),xf()(),ph(10,aO,2,1,"div",25)(11,OB,30,22,"div",26),kf(12,"div",27),ph(13,BB,5,0,"ng-container",28),kf(14,"span",29),am(15),xf()()()),2&e&&(Vd(2),zh("ngIf",t.isThemeBuilderEnabled),Vd(),zh("ngIf",!t.isThemeBuilderEnabled),Vd(3),Jf("placeholder",t.fulfillmentObj.placeholder),hm("ngModel",t.zipCode),zh("ngClass",t.inputErrorMessage.length>0?"input-search--error":""),Vd(2),zh("ngIf",t.isThemeBuilderEnabled),Vd(),zh("ngIf",!t.isThemeBuilderEnabled),Vd(),zh("ngIf",t.inputErrorMessage.length>0),Vd(),zh("ngIf",t.showTabs&&!t.showLoading),Vd(2),zh("ngIf",t.showLoading),Vd(2),lm(t.a11yResults))},encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),FB=e=>({"store-fulfillment-dst-enabled":e});function NB(e,t){1&e&&Of(0)}function UB(e,t){if(1&e&&(Ef(0),kf(1,"div",3),ph(2,NB,1,0,"ng-container",4),xf(),Df()),2&e){let e=Yf(),t=sm(4);Vd(),zh("ngClass",Om(2,FB,e.isStoreFulfillmentDstEnabled)),Vd(),zh("ngTemplateOutlet",t)}}function VB(e,t){1&e&&Of(0)}function qB(e,t){if(1&e&&(kf(0,"div",5),ph(1,VB,1,0,"ng-container",4),xf()),2&e){let e=Yf(),t=sm(4);zh("ngClass",Om(2,FB,e.isStoreFulfillmentDstEnabled)),Vd(),zh("ngTemplateOutlet",t)}}function $B(e,t){1&e&&Tf(0,"span",14)}function jB(e,t){1&e&&(So(),kf(0,"svg",15),Tf(1,"path",16),xf())}function zB(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",e.subtitle," ")}}function WB(e,t){if(1&e&&(kf(0,"div"),Tf(1,"store-fulfillment-tabs",17),xf()),2&e){let e=Yf(2);Vd(),zh("defaultTab",e.defaultTab)("tabsType",e.tabsNumber)("requestType",e.requestType)("zipCode",e.zipcodeParam)("searchPlaceholder",e.placeholder)("radius",e.radius)("size",e.size)("instaCartPoweredby",e.poweredBy)("instacartimage",e.instacartimage)("instacartButtontext",e.buttonText)("noServiceAreaLink",e.noServiceAreaLink)("geoErrorMessage",e.geoErrorMessage)("isDeepLinkUrl",e.isDeepLinkUrl)("instacartUrl",e.instacartUrl)("counterInside",e.counterInside)("counterOutside",e.counterOutside)("kioskOutside",e.kioskOutside)("lockerInside",e.lockerInside)("lockerOutside",e.lockerOutside)("dug",e.dug)("isReBanneredStoreFlag",e.isReBanneredStore)("registerPartialDeliveryMsg",e.registerPartialDeliveryMsg)("guestPartialDeliveryMsg",e.guestPartialDeliveryMsg)("deliveryVnCErrorMessage",e.deliveryVnCErrorMessage)("inStoreVnCErrorMessage",e.inStoreVnCErrorMessage)("programType",e.programType)("isPopupWrapperView",e.isPopupWrapperView)("isStoreSelectionWrapperView",e.isStoreSelectionWrapperView)("spaSelectedStoreId",e.spaSelectedStoreId)("shRedirectPath",e.shRedirectPath)("shCallback",e.shCallback)("shAddressUpdateCallback",e.shAddressUpdateCallback)("spaIntent",e.spaIntent)("nativeCallback",e.nativeCallback)("platform",e.platform)("appDeepLinks",e.appDeepLinks)}}function HB(e,t){if(1&e){let e=Mf();kf(0,"div",6)(1,"div",7)(2,"button",8),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.enableStoreSelectionWrapper?t.fimCloseModal():t.closeModal())})),ph(3,$B,1,0,"span",9)(4,jB,2,0,"svg",10),xf(),kf(5,"div",11)(6,"h2",12),am(7),xf(),ph(8,zB,2,1,"p",13),xf(),ph(9,WB,2,36,"div",13),xf()()}if(2&e){let e=Yf();Vd(3),zh("ngIf",e.isThemeBuilderEnabled),Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(3),cm(" ",e.fulfillmentObj&&e.fulfillmentObj.title," "),Vd(),zh("ngIf",e.isStoreClosed||e.isStoreSelectionWrapperView&&e.enableStoreSelectionWrapper),Vd(),zh("ngIf",!e.aemLoading&&e.isStoreModalOpen)}}function YB(){return window}var GB=(()=>{class e{constructor(e,t,i,n,r,s,a){this.elementRef=e,this._http=t,this.zone=i,this.storeFulfillmentService=n,this._featureFlagService=r,this.aemXfService=s,this.unityAccountInfoService=a,this.isPopupWrapperView=!1,this.isStoreSelectionWrapperView=!1,this.popupNextflow=new _l,this.onClose=new _l,this.sharedSessionPreference=null,this.enableStoreSelectionWrapper=!1,this.isStoreClosed=!1,this.isReBanneredStore=!1,this.showMfcDeliveryRemappedAlert=!1,this.subtitle="",this.validPreferenceList=["j4u","dug","delivery"],this.modalTabList=["modal-tab-instore","modal
1-tab-pickup","modal-tab-delivery"],this.requestType="storeModal",this.isDeepLinkUrl=!1,this.isVCModalShow=!1,this.aemLoading=!1,this.lastFocusedElement=null,this.windowLocation=new FD,this.elementRef.nativeElement.getAttribute("data-title")&&(this.placeholder=this.elementRef.nativeElement.getAttribute("data-placeholder"),this.poweredBy=this.elementRef.nativeElement.getAttribute("data-poweredby"),this.instacartimage=this.elementRef.nativeElement.getAttribute("data-instacartimage"),this.buttonText=this.elementRef.nativeElement.getAttribute("data-buttontext"),this.instacartUrl=this.elementRef.nativeElement.getAttribute("data-instacartUrl"),this.noServiceAreaLink=this.elementRef.nativeElement.getAttribute("data-noservicearealink"),this.instacartShortDescription=this.elementRef.nativeElement.getAttribute("data-instacartshortdescription"),this.geoErrorMessage=this.elementRef.nativeElement.getAttribute("data-geoerrormessage"),this.deliveryVnCErrorMessage=this.elementRef.nativeElement.getAttribute("data-vnc-delivery-error"),this.inStoreVnCErrorMessage=this.elementRef.nativeElement.getAttribute("data-vnc-pickup-instore-error"),this.fulfillmentObj={title:this.elementRef.nativeElement.getAttribute("data-title"),dugClosedStoreTitle:this.elementRef.nativeElement.getAttribute("data-dugClosedStoreTitle"),dugClosedStoreSubtitle:this.elementRef.nativeElement.getAttribute("data-dugClosedStoreSubtitle"),deliveryClosedStoreTitle:this.elementRef.nativeElement.getAttribute("data-deliveryClosedStoreTitle"),deliveryClosedStoreSubtitle:this.elementRef.nativeElement.getAttribute("data-deliveryClosedStoreSubtitle"),instoreClosedStoreTitle:this.elementRef.nativeElement.getAttribute("data-instoreClosedStoreTitle"),instoreClosedStoreSubtitle:this.elementRef.nativeElement.getAttribute("data-instoreClosedStoreSubtitle"),isReBanneredStoreTitle:"The store currently selected has been changed to our sister store. Please enter your ZIP Code if you'd like to find a new store.",mfcDeliveryRemappedTitle:"Our delivery service has changed, enter your ZIP Code for current availibility"},this.fullFillmentElem={zipcodeSearchClass:".fulfillment-content__search-wrapper__input",tabCardWrapperClass:".tab-pane.active .card-wrapper",modalDialogClass:".modal-dialog--store-fulfillment",cardWrapperClass:".card-wrapper",headerWrapperTitleClass:".fulfillment-content__heading-wrapper__title",tabsWrapperinstore:".tabs-wrapper__tabs-header--in-store",storeFulfillmentModalId:"#storeFulfillmentModal",modalCloseClass:"#storeFulfillmentModal .create-modal-close-icon"},this.size=this.elementRef.nativeElement.getAttribute("data-pickuplimitedresultsset"),this.radius=this.elementRef.nativeElement.getAttribute("data-instoresearchradius"),this.geoErrorMessage=this.elementRef.nativeElement.getAttribute("data-geoErrorMessage"),this.counterInside=this.elementRef.nativeElement.getAttribute("data-counterInside"),this.counterOutside=this.elementRef.nativeElement.getAttribute("data-counterOutside"),this.kioskOutside=this.elementRef.nativeElement.getAttribute("data-kioskOutside"),this.lockerInside=this.elementRef.nativeElement.getAttribute("data-lockerInside"),this.lockerOutside=this.elementRef.nativeElement.getAttribute("data-lockerOutside"),this.guestPartialDeliveryMsg=this.elementRef.nativeElement.getAttribute("data-guestPartialDeliveryMsg"),this.registerPartialDeliveryMsg=this.elementRef.nativeElement.getAttribute("data-registerPartialDeliveryMsg"),this.dug=this.elementRef.nativeElement.getAttribute("data-dug"),this.isClosedStoreEnabled=YB().SWY.configService.isClosedStoreEnabled,this.isStoreFulfillmentDstEnabled=YB().SWY.CONFIGSERVICE.featureToggleConfig.isStoreFulfillmentDstEnabled,this.isThemeBuilderEnabled=YB().SWY.CONFIGSERVICE.isThemeBuilderEnabled)}ngOnInit(){this.enableStoreSelectionWrapper=!!YB()?.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableStoreSelectionWrapper,this.isPopupWrapperView?(this.fullFillmentElem={zipcodeSearchClass:".fulfillment-content__search-wrapper__input",tabCardWrapperClass:".tab-pane.active .card-wrapper",modalDialogClass:".modal-dialog--store-fulfillment",cardWrapperClass:".card-wrapper",headerWrapperTitleClass:".fulfillment-content__heading-wrapper__title",tabsWrapperinstore:".tabs-wrapper__tabs-header--in-store",storeFulfillmentModalId:"#popup-wrapper",modalCloseClass:"#popup-wrapper .create-modal-close-icon"},this.loadExperienceFragment(),YB().popupWrapperStoreFulfillmentModal={zone:this.zone,component:this},this.storeFulfillmentService.onNextPopup.subscribe((e=>{!0===e&&this.popupNextflow.emit()}))):this.enableStoreSelectionWrapper?(this.isStoreSelectionWrapperView=!0,this.fullFillmentElem={zipcodeSearchClass:".fulfillment-content__search-wrapper__input",tabCardWrapperClass:".tab-pane.active .card-wrapper",modalDialogClass:".modal
1-dialog--store-fulfillment",cardWrapperClass:".card-wrapper",headerWrapperTitleClass:".fulfillment-content__heading-wrapper__title",tabsWrapperinstore:".tabs-wrapper__tabs-header--in-store",storeFulfillmentModalId:"#store-selection-wrapper",modalCloseClass:"#store-selection-wrapper .modal-close-icon"},this.size=this.elementRef.nativeElement.getAttribute("data-pickuplimitedresultsset"),this.radius=this.elementRef.nativeElement.getAttribute("data-instoresearchradius"),this.loadExperienceFragment(),YB().spaStoreFulfillmentModal={zone:this.zone,component:this}):YB().storeFulfillmentModal={zone:this.zone,component:this},this.sharedSessionPreference=YB().AB.userInfo.preferenceMode;let e=this;$(this.fullFillmentElem.storeFulfillmentModalId).on("hidden.bs.modal",(function(){$(".open-fulfillment-modal").focus()})),$(this.fullFillmentElem.storeFulfillmentModalId).on("shown.bs.modal",(function(){setTimeout((function(){$(e.fullFillmentElem.modalCloseClass).focus(),e.getMaxHeight(),$(e.fullFillmentElem.storeFulfillmentModalId)?.on("focus",(()=>{$(e.fullFillmentElem.modalCloseClass).focus()}))}),0)}))}ngAfterViewInit(){this.detectMutation()}loadExperienceFragment(){this.aemLoading=!0,this.isPopupWrapperView?this.aemXfService.getExperienceFragmentState().subscribe((e=>{console.log("Experience Fragment Data:",e),e.fullfillmentAemData&&this.updateAemData(e.fullfillmentAemData)}),(e=>{console.error("Error fetching Experience Fragment:",e)})):this.aemXfService.getExperienceFragment(UD).subscribe((e=>{this.updateAemData(e)}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}updateAemData(e){this.placeholder=e.placeholderSearch,this.instacartimage=e.instacartimage,this.buttonText=e.buttontext,this.instacartUrl=e.instacartUrl,this.noServiceAreaLink=e.noServiceAreaLink,this.instacartShortDescription=e.instacartShortDesc,this.geoErrorMessage=e.geoErrorMessage,this.deliveryVnCErrorMessage=e.vncDeliveryErrorMessage,this.inStoreVnCErrorMessage=e.vncPickupInstoreErrorMessage,this.fulfillmentObj={title:e.title,dugClosedStoreTitle:e.dugClosedstoretitle,dugClosedStoreSubtitle:e.dugClosedstoresubtitle,deliveryClosedStoreTitle:e.deliveryclosedstoretitle,deliveryClosedStoreSubtitle:e.deliveryClosedstoresubtitle,instoreClosedStoreTitle:e.instoreClosedstoretitle,instoreClosedStoreSubtitle:e.instoreClosedstoresubtitle,isReBanneredStoreTitle:"The store currently selected has been changed to our sister store. Please enter your ZIP Code if you'd like to find a new store.",mfcDeliveryRemappedTitle:"Our delivery service has changed, enter your ZIP Code for current availability"},this.enableStoreSelectionWrapper&&(this.fulfillmentObj=f(h({},this.fulfillmentObj),{title:"Find the store for you"}),this.subtitle="Lets find a store that is close and will get you the services you need"),this.size=e.pickuplimitedresultsset,this.radius=e.instoresearchradius,this.geoErrorMessage=e.geoErrorMessage,this.counterInside=e.counterInsideLabel,this.counterOutside=e.counterOutsideLabel,this.kioskOutside=e.kioskOutsideLabel,this.lockerInside=e.lockerInsideLabel,this.lockerOutside=e.lockerOutsideLabel,this.guestPartialDeliveryMsg=e.guestPartialDeliveryMsg,this.registerPartialDeliveryMsg=e.registerPartialDeliveryMsg,this.dug=e.dugLabel,this.isClosedStoreEnabled=YB().SWY.configService.isClosedStoreEnabled,this.isStoreFulfillmentDstEnabled=YB().SWY.CONFIGSERVICE.featureToggleConfig.isStoreFulfillmentDstEnabled,this.isThemeBuilderEnabled=YB().SWY.CONFIGSERVICE.isThemeBuilderEnabled,this.aemLoading=!1}getMaxHeight(){if($(this.fullFillmentElem.tabCardWrapperClass).length>0){var e=$(this.fullFillmentElem.modalDialogClass).height()-($(this.fullFillmentElem.tabCardWrapperClass).offset().top-$(this.fullFillmentElem.modalDialogClass).offset().top);e>0&&$(this.fullFillmentElem.cardWrapperClass).css("max-height",e)}}detectMutation(){let e=this;var t=this.isPopupWrapperView?$("#popup-wrapper .fulfillment-modal").get(0):$(".fulfillment-modal").get(0);new MutationObserver((function(t){t.length&&e.getMaxHeight()})).observe(t,{attributes:!0,childList:!0,subtree:!0})}checkChangeStoreparam(e){null!=e&&"changeStore"===e?this.windowLocation.locationReplace(YB().location.origin):this.windowLocation.locationReload()}setModalDisplayData(e,t,i,n,r,s,a,o,l){this.tabsNumber=e||3,this.zipcodeParam=i||"",this.defaultTab=t||"",this.isDeepLinkUrl=r,this.programType=o||"abs",this.isVCModalShow=l,this.lastFocusedElement=document.activeElement,2===e&&t!==this.modalTabList[0]?(this.enableStoreSelectionWrapper||$(this.fullFillmentElem.headerWrapperTitleClass).text("Please Select Delivery or Pickup to Continue Shopping"),$(this.fullFillmentElem.tabsWrapperinstore).hide(),localStorage.setItem("analyticsTwoTabsModal","true")):(this.tabsNumber=3,this.isStoreClosed=n,this.isReBanneredStore=s,this.showMfcDeliveryRemappedAlert=a||!1,this.setMessages()),this.storeFulfillmentService.refreshStoreModal.next(!0),this.isPopupWrapperView?(YB().AB.DATALAYER&&YB().AB.DATALAYER.setFulfillmentModalView(),($("#popup-wrapper").data("bs.modal")||{})._isShown&&($(this.fullFillmentElem.modalCloseClass).focus(),this.isStoreModalOpen=!0)):this.enableStoreSelectionWrapper?($("#store-selection-wrapper").modal({show:!0,backdrop:"static"}),($("#store-selection-wrapper").data("bs.modal")||{})._isShown&&($(this.fullFillmentElem.modalCloseClass).focus(),this.isStoreModalOpen=!0)):(YB().AB.COMMON.showFulfillmentModal(),($("#storeFulfillmentModal").data("bs.modal")||{})._isShown&&(this.isStoreModalOpen=!0))}closeModal(){let e="active";document.querySelectorAll(".tabs-wrapper__tabs-header--tab").forEach((t=>{t.classList&&t.classList.contains(e)&&t.classList.remove(e)})),(!0===this.isStoreClosed||!0===this.isReBanneredStore||this.showMfcDeliveryRemappedAlert)&&YB().AB.COMMON.setDefaultStoreId(this.isReBanneredStore);let t=this.sharedSessionPreference;this.validPreferenceList.map(((e,i)=>{t===e&&localStorage.setItem("tooltip_modal","1")})),this.storeFulfillmentService.retainedPref=!1;let i=!YB().SWY?.CONFIGSERVICE?.featureToggleConfig?.disableB2BCompleteProfile,n=localStorage.getItem("complete-b2b-business-profile"),r=window.AB.COMMON.authorize();this.isPopupWrapperView&&"created"===n?localStorage.removeItem("complete-b2b-business-profile"):i&&"B"===YB().AB?.userInfo?.siteType&&r&&"created"===n&&(localStorage.setItem("complete-b2b-business-profile","show"),YB().AB.COMMON.openCompleteProfileModelOnAutoSignin()),"wineshop"===this.programType&&this.isVCModalShow&&$("#vineWelcomeModal").modal({show:!0,backdrop:"static"}).attr("display","block"),this.isPopupWrapperView?this.onClose.emit():this.lastFocusedElement&&"function"==typeof this.lastFocusedElement.focus&&setTimeout((()=>{this.lastFocusedElement.focus()}),100)}setMessages(){let e=["instoreClosedStoreTitle","dugClosedStoreTitle","deliveryClosedStoreTitle"],t=["instoreClosedStoreSubtitle","dugClosedStoreSubtitle","deliveryClosedStoreSubtitle"];!0===this.isStoreClosed?this.validPreferenceList.map(((i,n)=>{this.sharedSessionPreference.toLowerCase()===i&&this.isStoreClosed&&(this.fulfillmentObj.title=this.fulfillmentObj[e[n]],this.subtitle=this.fulfillmentObj[t[n]])})):!0===this.isReBanneredStore?this.fulfillmentObj.title=this.fulfillmentObj.isReBanneredStoreTitle:!0===this.showMfcDeliveryRemappedAlert&&(this.fulfillmentObj.title=this.fulfillmentObj.mfcDeliveryRemappedTitle),"wineshop"===this.programType&&(this.fulfillmentObj.title="Shop Vine & Cellar for Delivery")}onPopupWrapperInit(){window.AB.onUnitySigninFlow&&this.unityAccountInfoService.sendFistLoginAcknowledgment().subscribe((()=>{}),(()=>{})),window.popupWrapperStoreFulfillmentModal.component.setModalDisplayData()}spaFulfilmentWrapperInit(e){let t="pickup"==e?.intent?"modal-tab-pickup":"modal-tab-delivery";this.spaIntent=e?.intent||"",this.shRedirectPath=e?.redirectPath,this.shCallback=e?.callback,this.shAddressUpdateCallback=e?.addressUpdateCallback,this.spaSelectedStoreId=e?.storeId||"",this.nativeCallback=e?.
1nativeCallback||null,this.platform=e?.platform||"",this.appDeepLinks=e?.appDeepLinks||{},window.AB.userInfo.banner=e?.banner,this.shRedirectPath&&this.shCallback&&e?.banner?window.spaStoreFulfillmentModal.component.setModalDisplayData(2,t,e.zipcode,!1,!1,!1,!1,e.source,!1):console.warn("shRedirectPath, shCallback or banner is not defined in the object passed to spaFulfilmentWrapperInit")}fimCloseModal(){$("#store-selection-wrapper").modal("hide");let e="active";document.querySelectorAll(".tabs-wrapper__tabs-header--tab").forEach((t=>{t.classList&&t.classList.contains(e)&&t.classList.remove(e)}))}handleKeyboardEvent(e){27===e.keyCode&&(e.preventDefault(),this.closeModal())}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(ov),$d(Tl),$d(HD),$d(uP),$d(jE),$d(YD))}}static{this.ɵcmp=Qr({type:e,selectors:[["store-fulfillment-modal-unified"]],hostBindings:function(e,t){1&e&&jf("keydown.escape",(function(e){return t.handleKeyboardEvent(e)}),0,ld)},inputs:{isPopupWrapperView:"isPopupWrapperView",isStoreSelectionWrapperView:"isStoreSelectionWrapperView"},outputs:{popupNextflow:"popupNextflow",onClose:"onClose"},decls:5,vars:2,consts:[["storeFulfillmentModal",""],["modalDialog",""],[4,"ngIf","ngIfElse"],[1,"fulfillment-modal",3,"ngClass"],[4,"ngTemplateOutlet"],["id","storeFulfillmentModal","tabindex","-1","aria-label","Store Fulfilment Modal","role","dialog",1,"fulfillment-modal","modal","modal-window","fade","text-left",3,"ngClass"],[1,"modal-dialog","modal
1-dialog--store-fulfillment"],[1,"modal-content","fulfillment-content","modal-body"],["data-dismiss","modal","id","closeFulfillmentModalButton","aria-label","Close","data-qa","hmpg-flfllmntmdl-xbttn",1,"create-modal-close-icon",3,"click"],["class","icon svg-error",4,"ngIf"],["class","svg-icon svg-icon-Close","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 20.13 19.5",4,"ngIf"],["data-qa","hmpg-flfllmntmdl-hdng",1,"fulfillment-content__heading-wrapper"],[1,"modal-heading","fulfillment-content__heading-wrapper__title","display-6"],[4,"ngIf"],[1,"icon","svg-error"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 20.13 19.5",1,"svg-icon","svg-icon-Close"],["d","M13.9,12.2V12l7.7-7.1.1-.1a1.3,1.3,0,0,0-.1-1.9,1.45,1.45,0,0,0-2.1,0L12.1,9.7l-7.5-7a1.57,1.57,0,0,0-2.2,0h0l-.1.1a1.51,1.51,0,0,0,.1,1.9l7.7,7.2v.2L2.4,19.2l-.1.1a1.3,1.3,0,0,0,.1,1.9,1.45,1.45,0,0,0,2.1,0l7.4-6.8,7.5,6.9a1.45,1.45,0,0,0,2.1,0l.1-.1a1.3,1.3,0,0,0-.1-1.9Z","transform","translate(-1.94 -2.25)"],[3,"defaultTab","tabsType","requestType","zipCode","searchPlaceholder","radius","size","instaCartPoweredby","instacartimage","instacartButtontext","noServiceAreaLink","geoErrorMessage","isDeepLinkUrl","instacartUrl","counterInside","counterOutside","kioskOutside","lockerInside","lockerOutside","dug","isReBanneredStoreFlag","registerPartialDeliveryMsg","guestPartialDeliveryMsg","deliveryVnCErrorMessage","inStoreVnCErrorMessage","programType","isPopupWrapperView","isStoreSelectionWrapperView","spaSelectedStoreId","shRedirectPath","shCallback","shAddressUpdateCallback","spaIntent","nativeCallback","platform","appDeepLinks"]],template:function(e,t){if(1&e&&ph(0,UB,3,4,"ng-container",2)(1,qB,2,4,"ng-template",null,0,Wm)(3,HB,10,5,"ng-template",null,1,Wm),2&e){let e=sm(2);zh("ngIf",t.isPopupWrapperView||t.isStoreSelectionWrapperView&&t.enableStoreSelectionWrapper)("ngIfElse",e)}},dependencies:[sy,cy,by,LB],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),KB=["selectedIndustry"];function QB(e,t){if(1&e&&(kf(0,"option",24),am(1),xf()),2&e){let e=t.$implicit;zh("value",e),Vd(),lm(e)}}var JB=(()=>{class e{constructor(e,t){this.aemXfService=e,this._modalService=t,this.onClose=new _l,this.popupNextflow=new _l,this.businessName="",this.businessType="Industry"}ngOnInit(){this.loadCompleteProfileB2B()}loadCompleteProfileB2B(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{e.completeProfileB2b&&this.updateComponentData(e.completeProfileB2b)}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}updateComponentData(e){this.title=e.title,this.subTitle=e.subTitle,this.industryOptions=e.industryOptions,this.buttonText=e.buttonText}b2BupdateProfile(){let e=window.AB.updateBusinessProfileEndpoint.replace("{{UUID}}",window.AB.userInfo.UUID),t=window.AB.ucaHttpOptionsV3Patch;t["x-swy_banner"]=window.SWY.CONFIGSERVICE.getResolvedBanner(),$.ajax({type:"PATCH",headers:t,url:e,data:JSON.stringify({businessInfo:{name:this.businessName,type:this.businessType}}),success:e=>{setTimeout((()=>{this.popupNextflow.emit()}),0)},error:e=>{console.warn(e)}})}static{this.ɵfac=function(t){return new(t||e)($d(jE),$d(mP))}}static{this.ɵcmp=Qr({type:e,selectors:[["complete-profile-b2b"]],viewQuery:function(e,t){if(1&e&&tm(KB,5),2&e){let e;im(e=nm())&&(t.selectedIndustry=e.first)}},outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:31,vars:6,consts:[["role","document",1,"modal-dialog"],[1,"modal-content","web-otp__modal-content"],[1,"modal-header"],["type","button","data-dismiss","modal","data-tabindex","first","aria-label","Close",1,"close",3,"click"],[1,"svg-icon","svg-close-primary"],[1,"modal-body","default-styles","web-otp"],[1,"web-otp"],[1,"auth-styles"],[1,"auth-styles__content","b2b"],[1,"auth-styles__title"],[1,"body-text","b2b__subtitle"],["id","onboadringUser","data-focus","false","method","post","role","form","data-toggle","validator","maxlength","10",1,"onboadring-user"],[1,"input-field"],[1,"input-field__wrapper"],[1,"input-field__float-label"],["id","businessName","type","text","name","businessName","placeholder","Business name","aria-label","Business name",3,"ngModelChange","ngModel"],[1,"input-field","responsive-width"],[1,"input-field__wrapper","text-dropdown-responsive"],["for","industry",1,"input-field__float-label"],["id","industry","name","businessType","placeholder","Industry","aria-label","Industry",1,"form-control",3,"ngModelChange","ngModel"],["selected","","disabled","","value","Industry"],[3,"value",4,"ngFor","ngForOf"],[1,"word-highlight-xs"],["data-tabindex","last","aria-label","Save and start shopping",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"click"],[3,"value"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),jf("click",(function(){return t.onClose.emit()})),Tf(4,"span",4),xf()(),kf(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"h1",9),am(10),xf(),kf(11,"div",10),am(12),xf(),kf(13,"form",11)(14,"div",12)(15,"div",13)(16,"label",14)(17,"input",15),mm("ngModelChange",(function(e){return fm(t.businessName,e)||(t.businessName=e),e})),xf(),kf(18,"span"),am(19,"Business name"),xf()()()(),kf(20,"div",16)(21,"div",17)(22,"label",18)(23,"select",19),mm("ngModelChange",(function(e){return fm(t.businessType,e)||(t.businessType=e),e})),kf(24,"option",20),am(25,"Industry"),xf(),ph(26,QB,2,2,"option",21),xf(),kf(27,"span",22),am(28,"Industry"),xf()()()()(),kf(29,"button",23),jf("click",(function(){return t.b2BupdateProfile()}
1)),am(30),xf()()()()()()()),2&e&&(Vd(10),lm(t.title),Vd(2),cm(" ",t.subTitle," "),Vd(5),hm("ngModel",t.businessName),Vd(6),hm("ngModel",t.businessType),Vd(3),zh("ngForOf",t.industryOptions),Vd(4),lm(t.buttonText))},dependencies:[oy,DS,WS,KS,d_,zS,$_,j_,ES,IS],encapsulation:2})}}return e})(),ZB=(()=>{class e{constructor(e,t){this._http=e,this._featureFlagService=t,this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this.isSincerelyHealthEnabled=!1,this.currentScreen.next("startScreen")}updateBirthdayUCA(e){let t=window.AB.ucaHttpOptionsUpdateBirthdayProfile;t.Accept="application/vnd.safeway.v4+json",t["Content-Type"]="application/vnd.safeway.v4.merge-patch+json",t["x-swy-client-name"]="web-portal";let i=window.AB.getprofileAddressPath.replace("{customerId}",window.AB.userInfo.UUID);return this._http.patch(i,e,{headers:t})}updateBirthdayRx(e){let t={token:{token:window.AB.userInfo.SWY_SHOP_TOKEN,banner:window.SWY.CONFIGSERVICE.getResolvedBanner()},input:{firstName:window.AB?.userInfo?.firstName||"",lastName:window.AB?.userInfo?.lastName||"",email:window.AB?.userInfo?.profileEmail||"",dob:e,phone:"+1"+(window.AB?.userInfo?.profilePhone||""),nickName:null,banner:window.SWY.CONFIGSERVICE.getResolvedBanner()||""}},i=JSON.stringify({query:"\n mutation CreateStagedUser($input: CreateStagedUserRequest!, $token: TokenRequest!) {\n createStagedUser(input: $input, token: $token) {\n uuid\n firstName\n lastName\n nickName\n phone\n email\n dob\n error {\n code\n message\n }\n }\n }\n ",variables:t}),{rxwaBasepath:n}=window.SWY.CONFIGSERVICE.getDatapowerConfig(),r=`${window.location.origin}${n}/rxwa/gqlservice`,s={"Content-Type":"application/json","x-aci-hid":window.AB.userInfo.houseId};return this._http.post(r,i,{headers:s})}analyticsEvents(e,t,i){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t,modalMessage:i})}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function XB(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"start-screen",1),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("sincerelyHealthText",e.sincerelyHealthText)("sincerelyHealthSubText",e.sincerelyHealthSubText)("sincerelyHealthSkipText",e.sincerelyHealthSkipText)("sincerelyHealthEarnText",e.sincerelyHealthEarnText)("sincerelyHealthEarnSubText",e.sincerelyHealthEarnSubText)("sincerelyHealthExploreText",e.sincerelyHealthExploreText)("sincerelyHealthExploreSubText",e.sincerelyHealthExploreSubText)("sincerelyHealthManageText",e.sincerelyHealthManageText)("sincerelyHealthManageSubText",e.sincerelyHealthManageSubText)("sincerelyHealthSetUpText",e.sincerelyHealthSetUpText)("sincerelyHealthDoThisLater",e.sincerelyHealthDoThisLater)("sincerelyHealthImgReference",e.sincerelyHealthImgReference)("sincerelyHealthMobileReference",e.sincerelyHealthMobileReference)("sincerelyHealthEarnImgReference",e.sincerelyHealthEarnImgReference)("sincerelyHealthExploreImgReference",e.sincerelyHealthExploreImgReference)("sincerelyHealthManageImgReference",e.sincerelyHealthManageImgReference)("termsApplyText",e.termsApplyText)("earlySavingsText",e.earlySavingsText)("comparisonBasedOn",e.comparisonBasedOn)("mayoClinicStudy",e.mayoClinicStudy)("termsUrl",e.termsUrl)("mayoClinicUrl",e.mayoClinicUrl)("isProgessiveProfileSkipped",e.isProgessiveProfileSkipped)}}function eM(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"birthday-screen",2),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("birthdayHeader",e.birthdayHeader)("birthdayText",e.birthdayText)("birthdaySubText",e.birthdaySubText)("birthdayTermsText",e.birthdayTermsText)("birthdayTermsPath",e.birthdayTermsPath)("birthdayTermsButtonText",e.birthdayTermsButtonText)("birthdayTermsLinkSubText",e.birthdayTermsLinkSubText)("birthdayTermsButtonText1",e.birthdayTermsButtonText1)("birthdayTermsPath1",e.birthdayTermsPath1)("birthdayTermsPath2",e.birthdayTermsPath2)("sincHealthSetupButton",e.sincHealthSetupButton)("sincerelyHealthImgReference",e.sincerelyHealthImgReference)("sincerelyHealthMobileReference",e.sincerelyHealthMobileReference)}}function tM(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"welcome-screen",3),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())}
1))("onPopupNextflow",(function(){return Wa(e),Ha(Yf().popupNextflow.emit())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("welcomeSincerelyButton",e.welcomeSincerelyButton)("sincerelyReference",e.sincerelyReference)("confirmationPage1Title",e.confirmationPage1Title)("confirmationPage1SubTitle",e.confirmationPage1SubTitle)("confirmationPage1BodyText",e.confirmationPage1BodyText)("confirmationPage2Title",e.confirmationPage2Title)("confirmationPage2SubTitle",e.confirmationPage2SubTitle)("confirmationPage3SubTitle",e.confirmationPage3SubTitle)("confirmationPage3BodyText",e.confirmationPage3BodyText)("confirmationPage4BodyText",e.confirmationPage4BodyText)("isProgessiveProfileSkipped",e.isProgessiveProfileSkipped)("isSincerelyHealthSkipped",e.isSincerelyHealthSkipped)}}var iM=(()=>{class e{constructor(e,t,i){this.sincerelyHealthService=e,this.aemXfService=t,this.popupService=i,this.onClose=new _l,this.popupNextflow=new _l,this.banner="",this.isProgessiveProfileSkipped=!1,this.isSincerelyHealthSkipped=!1,this.sincerelyHealthText="",this.sincerelyHealthSubText="",this.sincerelyHealthSkipText="",this.sincerelyHealthEarnText="",this.sincerelyHealthEarnSubText="",this.sincerelyHealthExploreText="",this.sincerelyHealthExploreSubText="",this.sincerelyHealthManageText="",this.sincerelyHealthManageSubText="",this.sincerelyHealthSetUpText="",this.sincerelyHealthDoThisLater="",this.sincerelyHealthImgReference="",this.sincerelyHealthMobileReference="",this.sincerelyHealthEarnImgReference="",this.sincerelyHealthExploreImgReference="",this.sincerelyHealthManageImgReference="",this.termsApplyText="",this.earlySavingsText="",this.comparisonBasedOn="",this.mayoClinicStudy="",this.termsUrl="",this.mayoClinicUrl="",this.birthdayHeader="",this.birthdayText="",this.birthdaySubText="",this.birthdayTermsText="",this.birthdayTermsPath="",this.birthdayTermsButtonText="",this.birthdayTermsLinkSubText="",this.birthdayTermsButtonText1="",this.birthdayTermsPath1="",this.birthdayTermsPath2="",this.sincHealthSetupButton="",this.welcomeSincerelyButton="",this.sincerelyReference="",this.sincerelyMobileReference="",this.confirmationPage1Title="",this.confirmationPage1SubTitle="",this.confirmationPage1BodyText="",this.confirmationPage2Title="",this.confirmationPage2SubTitle="",this.confirmationPage3SubTitle="",this.confirmationPage3BodyText="",this.confirmationPage4BodyText=""}ngOnInit(){this.banner=window.AB.userInfo.banner,this.banner=this.banner.charAt(0).toUpperCase()+this.banner.slice(1),this.loadExperienceFragment(),this.sincerelyHealthService.currentScreen.subscribe((e=>{this.currentScreen=e})),this.popupService.skippedProgessiveProfile.subscribe((e=>{this.isProgessiveProfileSkipped=e})),this.popupService.skippedSincerelyHealth.subscribe((e=>{this.isSincerelyHealthSkipped=e}))}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.onboardingFlowAemData){let t=e.onboardingFlowAemData;this.aemData=t,this.sincerelyHealthText=t.sincerelyHealthText?.replace("[Banner]",this.banner),this.sincerelyHealthSubText=t.sincerelyHealthSubText,this.sincerelyHealthSkipText=t.sincerelyHealthSkipText?.replace("[Banner]",this.banner),this.sincerelyHealthEarnText=t.sincerelyHealthEarnText,this.sincerelyHealthEarnSubText=t.sincerelyHealthEarnSubText,this.sincerelyHealthExploreText=t.sincerelyHealthExploreText,this.sincerelyHealthExploreSubText=t.sincerelyHealthExploreSubText,this.sincerelyHealthManageText=t.sincerelyHealthManageText,this.sincerelyHealthManageSubText=t.sincerelyHealthManageSubText,this.sincerelyHealthSetUpText=t.sincerelyHealthSetUpText,this.sincerelyHealthDoThisLater=t.sincerelyHealthDoThisLater,this.sincerelyHealthImgReference=t.sincerelyHealthImgReference,this.sincerelyHealthMobileReference=t.sincerelyHealthMobileReference,this.sincerelyHealthEarnImgReference=t.sincerelyHealthEarnImgReference,this.sincerelyHealthExploreImgReference=t.sincerelyHealthExploreImgReference,this.sincerelyHealthManageImgReference=t.sincerelyHealthManageImgReference,this.termsApplyText=t.termsApplyText,this.earlySavingsText=t.earlySavingsText,this.comparisonBasedOn=t.comparisonBasedOn,this.mayoClinicStudy=t.mayoClinicStudy,this.termsUrl=t.termsUrl,this.mayoClinicUrl=t.mayoClinicUrl,this.birthdayHeader=t.birthdayHeader,this.birthdayText=t.birthdayText,this.birthdaySubText=t.birthdaySubText,this.birthdayTermsText=t.birthdayTermsText,this.birthdayTermsPath=t.birthdayTermsPath,this.birthdayTermsButtonText=t.birthdayTermsButtonText,this.birthdayTermsLinkSubText=t.birthdayTermsLinkSubText,this.birthdayTermsButtonText1=t.birthdayTermsButtonText1,this.birthdayTermsPath1=t.birthdayTermsPath1,this.birthdayTermsPath2=t.birthdayTermsPath2,this.sincHealthSetupButton=t.sincHealthSetupButton,this.welcomeSincerelyButton=t.wel
1comeSincerelyButton,this.sincerelyReference=t.sincerelyReference,this.sincerelyMobileReference=t.sincerelyMobileReference,this.confirmationPage1Title=t.confirmationPage1Title?.replace("[Banner]",this.banner),this.confirmationPage1SubTitle=t.confirmationPage1SubTitle,this.confirmationPage1BodyText=t.confirmationPage1BodyText,this.confirmationPage2Title=t.confirmationPage2Title?.replace("[Banner]",this.banner),this.confirmationPage2SubTitle=t.confirmationPage2SubTitle,this.confirmationPage3SubTitle=t.confirmationPage3SubTitle,this.confirmationPage3BodyText=t.confirmationPage3BodyText,this.confirmationPage4BodyText=t.confirmationPage4BodyText}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}ngOnDestroy(){this.sincerelyHealthService.currentScreen.unsubscribe(),this.popupService.skippedProgessiveProfile.unsubscribe(),this.popupService.skippedSincerelyHealth.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(ZB),$d(jE),$d(qR))}}static{this.ɵcmp=Qr({type:e,selectors:[["sincerely-health"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:3,vars:3,consts:[[4,"ngIf"],[3,"close","sincerelyHealthText","sincerelyHealthSubText","sincerelyHealthSkipText","sincerelyHealthEarnText","sincerelyHealthEarnSubText","sincerelyHealthExploreText","sincerelyHealthExploreSubText","sincerelyHealthManageText","sincerelyHealthManageSubText","sincerelyHealthSetUpText","sincerelyHealthDoThisLater","sincerelyHealthImgReference","sincerelyHealthMobileReference","sincerelyHealthEarnImgReference","sincerelyHealthExploreImgReference","sincerelyHealthManageImgReference","termsApplyText","earlySavingsText","comparisonBasedOn","mayoClinicStudy","termsUrl","mayoClinicUrl","isProgessiveProfileSkipped"],[3,"close","birthdayHeader","birthdayText","birthdaySubText","birthdayTermsText","birthdayTermsPath","birthdayTermsButtonText","birthdayTermsLinkSubText","birthdayTermsButtonText1","birthdayTermsPath1","birthdayTermsPath2","sincHealthSetupButton","sincerelyHealthImgReference","sincerelyHealthMobileReference"],[3,"close","onPopupNextflow","welcomeSincerelyButton","sincerelyReference","confirmationPage1Title","confirmationPage1SubTitle","confirmationPage1BodyText","confirmationPage2Title","confirmationPage2SubTitle","confirmationPage3SubTitle","confirmationPage3BodyText","confirmationPage4BodyText","isProgessiveProfileSkipped","isSincerelyHealthSkipped"]],template:function(e,t){1&e&&ph(0,XB,2,23,"ng-container",0)(1,eM,2,13,"ng-container",0)(2,tM,2,12,"ng-container",0),2&e&&(zh("ngIf","startScreen"==t.currentScreen),Vd(),zh("ngIf","birthdayScreen"==t.currentScreen),Vd(),zh("ngIf","welcomeScreen"==t.currentScreen))},encapsulation:2})}}return e})();function nM(){return window}var rM=(()=>{class e{constructor(e){this._http=e}sendPostRequest(e,t,i){return this._http.post(e,t,{headers:i,responseType:"json",observe:"response"})}sendPatchRequest(e,t,i){return this._http.patch(e,t,{headers:i,responseType:"json",observe:"response"})}getVerifyHeaders(){return{"Content-Type":"application/vnd.safeway.v4.merge-patch+json",Accept:" application/vnd.safeway.v4+json",Authorization:"Bearer "+nM().AB.userInfo.SWY_SHOP_TOKEN,"x-swy-banner":nM().SWY.CONFIGSERVICE.getResolvedBanner(),"x-swy-client-name":"web-portal","x-swy-correlation-id":nM().AB.COMMON.generateUUID(),"x-swy-client-id":"web-portal","Ocp-Apim-Subscription-Key":nM().SWY.CONFIGSERVICE.getDatapowerConfig().cncSubscriptionKey,"x-abs-user-exp-journey":"Identity-Profile"}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),sM=(e,t)=>({"svg-verified-checkmark-icon":e,"svg-unverified-warning-icon":t});function aM(e,t){if(1&e&&(kf(0,"div",15),Tf(1,"span",16),kf(2,"span",17),am(3,"Status: "),xf(),kf(4,"span",18),am(5),xf()()),2&e){let e=Yf();Vd(),zh("ngClass",Bm(2,sM,e.emailVerified,!e.emailVerified)),Vd(4),lm(e.emailVerified?"Verified":"Unverified")}}function oM(e,t){if(1&e&&(kf(0,"div",15),Tf(1,"span",16),kf(2,"span",17),am(3,"Status: "),xf(),kf(4,"span",18),am(5),xf()()),2&e){let e=Yf();Vd(),zh("ngClass",Bm(2,sM,e.phoneVerified,!e.phoneVerified)),Vd(4),lm(e.phoneVerified?"Verified":"Unverified")}}function lM(){return window}
1var cM=(()=>{class e{constructor(e,t){this.aemXfService=e,this.vry180DayService=t,this.onClose=new _l,this.popupNextflow=new _l,this.userFirstName="",this.acctUpdateTitle="",this.acctUpdateEmailLabel="",this.acctUpdatePhoneLabel="",this.acctUpdateButtonLabel="",this.acctUpdateLinkLabel="",this.phoneVerified=!1,this.emailVerified=!1,this.profileEmail="",this.profilePhone=""}ngOnInit(){let e=window.AB.userInfo;this.phoneVerified="true"===e?.phoneVerified,this.emailVerified="true"===e?.emailVerified,this.profileEmail=e?.profileEmail||"N/A",this.profilePhone=e?.profilePhone&&this.formatPhoneNumber(e?.profilePhone)||"N/A",this.userFirstName=e?.firstName?e?.firstName.charAt(0).toUpperCase()+e?.firstName.slice(1):"there",this.loadExperienceFragment(),$("#popup-wrapper").modal("show")}ngAfterViewInit(){$('[data-tabindex="first"]').focus()}formatPhoneNumber(e){if(e&&e.length>0){return"("+e.slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.singnInAemData){let t=e.singnInAemData;this.acctUpdateTitle=t?.acctUpdateTitle?.replace("[First Name]",this.userFirstName),this.acctUpdateEmailLabel=t?.acctUpdateEmailLabel,this.acctUpdatePhoneLabel=t?.acctUpdatePhoneLabel,this.acctUpdateButtonLabel=t?.acctUpdateButtonLabel,this.acctUpdateLinkLabel=t?.acctUpdateLinkLabel,this.analyticsEvents("modalView",`account-verification-180${this.emailVerified&&!this.phoneVerified&&"N/A"!=this.profilePhone?"-only-email-verified":this.phoneVerified&&!this.emailVerified&&"N/A"!=this.profileEmail?"-only-phone-verified":"N/A"==this.profileEmail&&this.phoneVerified?"-phone-verified":"N/A"==this.profilePhone&&this.emailVerified?"-email-verified":""}|view`,""+("there"!=this.userFirstName?"name-exists":"name-doesnt-exist"))}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}ngAfterViewChecked(){document.querySelectorAll(".text-truncate").forEach((e=>{e.offsetWidth<e.scrollWidth&&e.setAttribute("title",e.textContent)}))}correctClickHandler(){this.updateUca(),this.analyticsEvents("modalClick",`account-verification-180${this.emailVerified&&!this.phoneVerified&&"N/A"!=this.profilePhone?"-only-email-verified":this.phoneVerified&&!this.emailVerified&&"N/A"!=this.profileEmail?"-only-phone-verified":"N/A"==this.profileEmail&&this.phoneVerified?"-phone-verified":"N/A"==this.profilePhone&&this.emailVerified?"-email-verified":""}|correct`),this.popupNextflow.emit()}updateInformationClick(){this.updateUca(),this.analyticsEvents("topNav",this.acctUpdateLinkLabel),this.redirectToAccountSettings()}analyticsEvents(e,t,i){window.AB&&window.AB.DATALAYER&&("topNav"===e&&(t=`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|${t}`),window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t,modalMessage:i}))}updateUca(){let e=lM().AB.userInfo.UUID,t=lM().AB.getProfileInfo+"/"+e+"/profile/verify",i=this.vry180DayService.getVerifyHeaders();i["x-swy_banner"]=lM().SWY.CONFIGSERVICE.getResolvedBanner();let n=h(h({},"N/A"!==this.profilePhone?{phone:{number:window.AB.userInfo.profilePhone,verified:!0,purposes:[{name:"PRIMARY"}]}}:{}),"N/A"!==this.profileEmail?{email:{text:this.profileEmail,verified:!0,purposes:[{name:"PRIMARY"}]}}:{});this.vry180DayService.sendPatchRequest(t,JSON.stringify(n),i).subscribe((e=>{console.warn(e)}),(e=>{console.warn(e)}))}closeHandler(){this.updateUca(),this.onClose.emit()}redirectToAccountSettings(){window.location.href="customer-account/account-settings.html"}static{this.ɵfac=function(t){return new(t||e)($d(jE),$d(rM))}}static{this.ɵcmp=Qr({type:e,selectors:[["verify-180-days"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:23,vars:9,consts:[["role","document",1,"modal-dialog","verify-180-days-modal"],[1,"modal-content","verify-180-days-modal__content"],[1,"modal-header","verify-180-days-modal__header"],["src","/etc/designs/wcax-commons/images/icons/profile_icon.svg","alt","",1,"verify-180-days-modal__profile-image"],["type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"verify-180-days-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"modal-body","verify-180-days-modal__body__no-space"],[1,"body-text","verify-180-days-modal__body__subtitle","mt-0"],["role","group",1,"verify-180-days-modal__body__verified-info","text-center"],[1,"verify-180-days-modal__body__verified-info__text","text-truncate"],["class","verify-180-days-modal__body__verified-info__status col-3 p-0",4,"ngIf"],[1,"verify-180-days-modal__body__btn-container","mt-3"],[1,"btn","btn-lg","btn-primary","primary-button",3,"click"],[1,"links","verify-180-days-modal__body__link-container"],["href","javascript:void(0);","data-tabindex","last",1,"links__action","underline","body-text",3,"click"],[1,"verify-180-days-modal__body__verified-info__status","col-3","p-0"],["aria-hidden","true",1,"svg-icon",3,"ngClass"],[1,"sr-only"],[1,"verify-180-days-modal__body__verified-info__status__text"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2),Tf(3,"img",3),kf(4,"button",4),jf("click",(function(){return t.closeHandler()})),Tf(5,"span",5),xf()(),kf(6,"div",6)(7,"h1",7),am(8),xf(),kf(9,"div",8)(10,"span",9),am(11),xf(),ph(12,aM,6,5,"div",10),xf(),kf(13,"div",8)(14,"span",9),am(15),xf(),ph(16,oM,6,5,"div",10),xf(),kf(17,"div",11)(18,"button",12),jf("click",(function(){return t.correctClickHandler()})),am(19),xf()(),kf(20,"div",13)(21,"a",14),jf("click",(function(){return t.updateInformationClick()}
1)),am(22),xf()()()()()),2&e&&(Vd(8),lm(t.acctUpdateTitle),Vd(3),dm("",t.acctUpdateEmailLabel,": ",t.profileEmail,""),Vd(),zh("ngIf","N/A"!==t.profileEmail),Vd(3),dm("",t.acctUpdatePhoneLabel,": ",t.profilePhone,""),Vd(),zh("ngIf","N/A"!==t.profilePhone),Vd(3),lm(t.acctUpdateButtonLabel),Vd(3),lm(t.acctUpdateLinkLabel))},dependencies:[sy,cy],encapsulation:2})}}return e})();function dM(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"h4",25),am(2),xf(),kf(3,"button",26),jf("click",(function(){return Wa(e),Ha(Yf(2).closeModal())})),So(),kf(4,"svg",27),Tf(5,"path",28),xf()()()}if(2&e){let e=Yf(2);Vd(2),cm(" ",e.chooseStoreTitle," "),Vd(),zh("disabled",e.isCloseButtonDisabled)}}function uM(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"h4",29),am(2),xf(),kf(3,"button",30),jf("click",(function(){return Wa(e),Ha(Yf(2).closeModal())})),Tf(4,"span",31),xf()()}if(2&e){let e=Yf(2);Vd(2),cm(" ",e.chooseStoreTitle," "),Vd(),zh("disabled",e.isCloseButtonDisabled)}}function pM(e,t){1&e&&(So(),kf(0,"svg",36)(1,"g",37),Tf(2,"path",38),xf()())}function hM(e,t){1&e&&(So(),kf(0,"svg",39)(1,"g",37),Tf(2,"path",40),xf()())}function fM(e,t){1&e&&(So(),kf(0,"svg",41)(1,"g",42)(2,"g",43)(3,"g",44)(4,"g",45)(5,"g",46)(6,"g",47),Tf(7,"path",48),xf()()()()()()())}function mM(e,t){if(1&e&&(kf(0,"div",32),ph(1,pM,3,0,"svg",33)(2,hM,3,0,"svg",34)(3,fM,8,0,"svg",35),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","delivery"===e.currentlyShoppingIcon),Vd(),zh("ngIf","dug"===e.currentlyShoppingIcon),Vd(),zh("ngIf","instore"===e.currentlyShoppingIcon)}}function gM(e,t){1&e&&Tf(0,"span",52)}function bM(e,t){1&e&&Tf(0,"span",53)}function yM(e,t){1&e&&Tf(0,"span",54)}function vM(e,t){if(1&e&&(kf(0,"div",32),ph(1,gM,1,0,"span",49)(2,bM,1,0,"span",50)(3,yM,1,0,"span",51),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","delivery"===e.currentlyShoppingIcon),Vd(),zh("ngIf","dug"===e.currentlyShoppingIcon),Vd(),zh("ngIf","instore"===e.currentlyShoppingIcon)}}function wM(e,t){1&e&&(So(),kf(0,"svg",36)(1,"g",37),Tf(2,"path",38),xf()())}function _M(e,t){1&e&&(So(),kf(0,"svg",39)(1,"g",37),Tf(2,"path",40),xf()())}function SM(e,t){1&e&&(So(),kf(0,"svg",41)(1,"g",42)(2,"g",43)(3,"g",44)(4,"g",45)(5,"g",46)(6,"g",47),Tf(7,"path",48),xf()()()()()()())}function CM(e,t){if(1&e&&(kf(0,"div",32),ph(1,wM,3,0,"svg",33)(2,_M,3,0,"svg",34)(3,SM,8,0,"svg",35),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","delivery"===e.previouslyShoppedIcon),Vd(),zh("ngIf","dug"===e.previouslyShoppedIcon),Vd(),zh("ngIf","instore"===e.previouslyShoppedIcon)}}function IM(e,t){1&e&&Tf(0,"span",52)}function AM(e,t){1&e&&Tf(0,"span",53)}function kM(e,t){1&e&&Tf(0,"span",54)}function xM(e,t){if(1&e&&(kf(0,"div",32),ph(1,IM,1,0,"span",49)(2,AM,1,0,"span",50)(3,kM,1,0,"span",51),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","delivery"===e.currentlyShoppingIcon),Vd(),zh("ngIf","dug"===e.currentlyShoppingIcon),Vd(),zh("ngIf","instore"===e.currentlyShoppingIcon)}}function TM(e,t){if(1&e){let e=Mf();kf(0,"button",55),jf("click",(function(){return Wa(e),Ha(Yf(2).handleModalButtonClick())})),am(1),xf()}if(2&e){let e=Yf(2);zh("disabled",e.isModalButtonDisabled),Vd(),cm(" ",e.buttonLabel," ")}}function PM(e,t){if(1&e){let e=Mf();kf(0,"button",56),jf("click",(function(){return Wa(e),Ha(Yf(2).handleModalButtonClick())})),am(1),xf()}if(2&e){let e=Yf(2);zh("disabled",e.isModalButtonDisabled),Vd(),cm(" ",e.buttonLabel," ")}}function EM(e,t){if(1&e&&(Ef(0),kf(1,"div",1)(2,"div",2)(3,"div",3),ph(4,dM,6,2,"div",0)(5,uM,5,2,"div",0),kf(6,"div",4)(7,"div",5),qm(8,"json"),kf(9,"label",6),Tf(10,"input",7)(11,"span",8),am(12),xf(),kf(13,"div",9),Tf(14,"img",10),xf(),kf(15,"div",11),ph(16,mM,4,3,"div",12)(17,vM,4,3,"div",12),kf(18,"div",13)(19,"span",14),am(20),xf(),kf(21,"span",15),am(22),xf()()()(),kf(23,"div",16),qm(24,"json"),kf(25,"label",17),Tf(26,"input",18)(27,"span",8),am(28),xf(),kf(29,"div",9),Tf(30,"img",19),xf(),kf(31,"div",11),ph(32,CM,4,3,"div",12)(33,xM,4,3,"div",12),kf(34,"div",13)(35,"span",20),am(36),xf(),kf(37,"span",21),am(38),xf()()()()()(),kf(39,"div",22),ph(40,TM,2,2,"button",23)(41,PM,2,2,"button",24),xf()()(),Df()),2&e){let e=Yf();Vd(4),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(2),gh("make-mystore-btn",$m(8,18,e.currentlyShoppingData)),Vd(3),gh("aria-label",e.currentlyShopping),Vd(2),cm(" ",e.currentlyShopping," "),Vd(4),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(3),lm(e.currentlyShoppingPreference),Vd(2),lm(e.currentlyShoppingAddress),Vd(),gh("make-mystore-btn",$m(24,20,e.previouslyShoppedData)),Vd(3),gh("aria-label",e.previouslyShopped),Vd(2),cm(" ",e.previouslyShopped," "),Vd(4),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled),Vd(3),lm(e.previouslyShoppedPreference),Vd(2),lm(e.previouslyShoppedAddress),Vd(2),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled)}}function DM(e,t){1&e&&Tf(0,"span",86)}function OM(e,t){1&e&&Tf(0,"span",87)}function BM(e,t){1&e&&Tf(0,"span",88)}function MM(e,t){1&e&&Tf(0,"span",86)}function RM(e,t){1&e&&Tf(0,"span",87)}function LM(e,t){1&e&&Tf(0,"span",88)}function FM(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",57)(2,"div",58)(3,"div",59)(4,"div",60)(5,"h2",61),am(6),xf(),kf(7,"div",62)(8,"button",63),jf("click",(function(){return Wa(e),Ha(Yf().closeModal())})),Tf(9,"span",64),xf()()(),kf(10,"div")(11,"div")(12,"div",65)(13,"div",66),qm(14,"json"),kf(15,"label",67),Tf(16,"input",68),kf(17,"span",69),Tf(18,"span",70),xf(),kf(19,"span",71),am(20),xf()(),Tf(21,"img",72),kf(22,"div",73)(23,"div",74)(24,"div",75),ph(25,DM,1,0,"span",76)(26,OM,1,0,"span",77)(27,BM,1,0,"span",78),xf(
1),kf(28,"p",79)(29,"span",14),am(30),xf(),kf(31,"span",15),am(32),xf()()()()(),kf(33,"div",80),qm(34,"json"),kf(35,"label",81),Tf(36,"input",82),kf(37,"span",69),Tf(38,"span",70),xf(),kf(39,"span",71),am(40),xf()(),Tf(41,"img",83),kf(42,"div",73)(43,"div",74)(44,"div",75),ph(45,MM,1,0,"span",76)(46,RM,1,0,"span",77)(47,LM,1,0,"span",78),xf(),kf(48,"p",79)(49,"span",20),am(50),xf(),kf(51,"span",21),am(52),xf()()()()()()()(),kf(53,"div",84)(54,"button",85),jf("click",(function(){return Wa(e),Ha(Yf().handleModalButtonClick())})),am(55),xf()()()()(),Df()}if(2&e){let e=Yf();Vd(6),cm(" ",e.chooseStoreTitle," "),Vd(2),zh("disabled",e.isCloseButtonDisabled),Vd(5),gh("make-mystore-btn",$m(14,18,e.currentlyShoppingData)),Vd(7),lm(e.currentlyShopping),Vd(5),zh("ngIf","delivery"===e.currentlyShoppingIcon),Vd(),zh("ngIf","dug"===e.currentlyShoppingIcon),Vd(),zh("ngIf","instore"===e.currentlyShoppingIcon),Vd(3),lm(e.currentlyShoppingPreference),Vd(2),lm(e.currentlyShoppingAddress),Vd(),gh("make-mystore-btn",$m(34,20,e.previouslyShoppedData)),Vd(7),lm(e.previouslyShopped),Vd(5),zh("ngIf","delivery"===e.previouslyShoppedIcon),Vd(),zh("ngIf","dug"===e.previouslyShoppedIcon),Vd(),zh("ngIf","instore"===e.previouslyShoppedIcon),Vd(3),lm(e.previouslyShoppedPreference),Vd(2),lm(e.previouslyShoppedAddress),Vd(2),zh("disabled",e.isModalButtonDisabled),Vd(),lm(e.buttonLabel)}}function NM(){return window}var UM=(()=>{class e{constructor(e){this.aemXfService=e,this.onClose=new _l,this.popupNextflow=new _l,this.chooseStoreTitle="",this.currentlyShopping="",this.previouslyShopped="",this.buttonLabel="Continue",this.bannerLogoImages=[],this.guestData={},this.sessionData={},this.isConflict=!1,this.currentlyShoppingData={},this.previouslyShoppedData={},this.currentlyShoppingAddress="",this.previouslyShoppedAddress="",this.currentlyShoppingPreference="",this.previouslyShoppedPreference="",this.currentlyShoppingIcon="",this.previouslyShoppedIcon="",this.isCloseButtonDisabled=!1,this.isModalButtonDisabled=!1,this.conflictModalItems={popupWrapperModalId:"#popup-wrapper",inStoreText:"In Store at ",deliveryText:"Delivery to ",dugText:"Pickup at ",deliveryTextGeo:"Delivery at ",previousSessionRadio:".previousSessionRadio",currentSessionRadio:".currentSessionRadio",conflictModalButton:".fulfillment-conflict-modal__button",conflictModalClose:"#conflict-modal-close",currentBanner:".fulfillment-conflict-modal__currentBanner",previousBanner:".fulfillment-conflict-modal__previousBanner",previouslyShoppedId:"#previouslyShopped",currentlyShoppingId:"#currentlyShopping",noPreferenceErrorMessage:"Preferences Not found in Session Cookie",isSyndicatedHeader:"syndicatedHeader"},this.populateConflictModalData=function(e,t){this.renderCurrentlyShopping(e),this.renderPreviouslyShopped(t)},this.isThemeBuilderEnabled=NM().SWY.CONFIGSERVICE.isThemeBuilderEnabled,this.isOnboardConflictModelIntoPantryEnabled=NM().SWY?.CONFIGSERVICE?.featureToggleConfig?.enableOnboardConflictModelIntoPantry}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.singnInAemData){let t=e.singnInAemData;this.chooseStoreTitle=t?.chooseStoreTitle,this.currentlyShopping=t?.currentlyShopping,this.previouslyShopped=t?.previouslyShopped,this.bannerLogoImages=t?.bannerLogoImages,this.init()}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}closeModal(){this.isCloseButtonDisabled=!0,this.saveStoreData("close-action"),this.onClose.emit()}triggerConflictModal(){let e=window.AB.userInfo.userType.toLowerCase();if(window.AB?.POPUPCONFLICTDATA){let e=window.AB.POPUPCONFLICTDATA;return this.renderBanner(e?.currentSWYOBJ?.banner,e?.previousSWYOBJ?.banner),void this.diplayConflictModal(e?.currentSWYOBJ,e?.previousSWYOBJ)}if("r"===e||"c"===e){let e=window.SWY.CONFIGSERVICE.getCookie("abs_gsession"),t=window.SWY.CONFIGSERVICE.getCookie("SWY_SHARED_SESSION_INFO"),i=window.SWY.CONFIGSERVICE.featureToggleConfig?.isCookieACIPrefixEnabled?"ACI_S_B_convt_acc_success":"B_convt_acc_success",n=window.SWY.CONFIGSERVICE.getCookie(i),r=!1,s={},a={};if(this.isFulfillmentConflictModal()&&$(this.conflictModalItems.popupWrapperModalId).modal("hide"),NM().AB.COMMON.isCookieEmpty(e)||NM().AB.COMMON.isCookieEmpty(t)){if(!NM().AB.COMMON.isCookieEmpty(t)){let e=this.mapAttributesFromCookie(t,s,"session");!this.isObjectEmpty(window.AB.storeFlagsData)&&null!=window.AB.storeFlagsData.flags.ecomStore.polarisBannerName&&this.checkForReBanneredFlow(e,{},window.AB.storeFlagsData.flags.ecomStore.polarisBannerName,!1)?window.storeFulfillmentModal.component.setModalDisplayData(3,null,null,!1,!1,!0):window.SplashModalService.dispatchSplashModalEvent("conflictFlowComplete"),this.popupNextflow.emit()}}else{let i=this.mapAttributesFromCookie(e,a,"guest"),o=this.mapAttributesFromCookie(t,s,"session");if(!this.isObjectEmpty(window.AB.storeFlagsData)&&null!=window.AB.storeFlagsData.flags.ecomStore.polarisBannerName&&this.checkForReBanneredFlow(o,i,window.AB.storeFlagsData.flags.ecomStore.polarisBannerName,!0))window.storeFulfillmentModal.component.setModalDisplayData(3,null,null,!1,!1,!0);else if(i&&o&&i.preference&&o.preference){if("delivery"===i.preference&&"delivery-addr"===i.resolvedBy&&0===Object.keys(this.getResolvedAddress()).length)return r=!1,this.deleteGuestData("abs_gsession"),void this.deleteGeoCookie();if("j4u"===o.preference)if(String(o.banner).toLowerCase()!==String(i.banner).toLowerCase()){if(!0===window.SWY?.CONFIGSERVICE?.featureToggleConfig?.disableB2BConflictModal||n)return this.populateConflictModalData(i,o),localStorage.removeItem("redirectToErums"),localStorage.removeItem("triggerSlotModal"),void this.saveStoreData();r=!0,this.renderBanner(i.banner,o.banner),this.diplayConflictModal(i,o)}else o.j4uStoreId===i.j4uStoreId?o.preference!==i.preference&&(r=!0,this.diplayConflictModal(i,o)):"default"!==i.selection&&"Geo"!==i.selection&&(r=!0,this.diplayConflictModal(i,o));else if(("delivery"===o.preference||"dug"===o.preference)&&"default"!==i.selection&&"Geo"!==i.selection){let e="delivery"===o.preference?i.shopzipcode:i.shopStoreId;(("delivery"===o.preference?o.shopzipcode:o.shopStoreId)!==e||o.preference!==i.preference)&&(r=!0,this.diplayConflictModal(i,o))}}else console.error(this.conflictModalItems.noPreferenceErrorMessage);r?(localStorage.removeItem("redirectToErums"),localStorage.removeItem("triggerSlotModal")):(this.deleteGuestData("abs_gsession"),this.deleteGeoCookie(),!this.isObjectEmpty(window.AB.storeFlagsData)&&null!=window.AB.storeFlagsData.flags.ecomStore.polarisBannerName&&this.checkForReBanneredFlow(o,{},window.AB.storeFlagsData.flags.ecomStore.polarisBannerName,!1)?window.storeFulfillmentModal.component.setModalDisplayData(3,null,null,!1,!1,!0):window.AB.isLSEnabled&&"1"==localStorage.getItem("redirectToErums")?(localStorage.removeItem("redirectToErums"),window.AB.COMMON.authorize()&&!window.SWY.CONFIGSERVICE.enablePrebookSlotModal()&&(window.location.pathname="/erums/store/prebook")):window.SplashModalService.dispatchSplashModalEvent("conflictFlowComplete"),this.popupNextflow.emit())}}if("g"===e){let e=window.SWY.CONFIGSERVICE.getCookie("SWY_SHARED_SESSION_INFO"),t={};if(!NM().AB.COMMON.isCookieEmpty(e)){let i=this.mapAttributesFromCookie(e,t,"session");!this.isObjectEmpty(window.AB.storeFlagsData)&&null!=window.AB.storeFlagsData.flags.ecomStore.polarisBannerName&&this.checkForReBanneredFlow(i,{},window.AB.storeFlagsData.flags.ecomStore.polarisBannerName,!1)&&window.storeFulfillmentModal.component.setModalDisplayData(3,null,null,!1,!1,!0)}}}ngOnInit(){this.loadExperienceFragment()}init(){let e=$('meta[name="'+this.conflictModalItems.isSyndicatedHeader+'"]').attr("content");window.AB.COMMON.isErumsPage()||"false"===e&&this.triggerConflictModal(),$(this.conflictModalItems.currentSessionRadio).on("click",(()=>{$(this.conflictModalItems.previousSessionRadio).prop("checked",!1),$(this.conflictModalItems.currentSessionRadio).prop("checked",!0)})),$(this.conflictModalItems.previousSessionRadio).on("click",(()=>{$(this.conflictModalItems.currentSessionRadio).prop("checked",!1),$(this.conflictModalItems.previousSessionRadio).prop("checked",!0)}))}mapAttributesFromCookie(e,t,i){let n,r,s,a=JSON.parse(e);if(a.info.COMMON.preference){if("guest"===i){if(n=window.SWY.CONFIGSERVICE.getResolvedBanner(),"j4u"===a.info.COMMON.preference.toLowerCase()||"dug"===a.info.COMMON.preference.toLowerCase()){let e="j4u"===a.info.COMMON.preference.toLowerCase()?a.info.J4U.storeId:a.info.SHOP.storeId;if(window.SWY.CONFIGSERVICE.isLSCompatible()){let t=JSON.parse(localStorage.getItem("previousStoreData"));s=t&&t.storeLocation.storeId===e?t.storeLocation.address+"+"+t.storeLocation.city+"+"+t.storeLocation.state+"+"+t.storeLocation.zipcode:this.getStoreDetailsFromXapi(e)?.streetAddress}else s=this.getStoreDetailsFromXapi(e)?.streetAddress}}else{let e=a.info.J4U.preferredBanner;if(n=e||a.info.COMMON.banner,("j4u"===a.info.COMMON.preference.toLowerCase()||"dug"===a.info.COMMON.preference.toLowerCase())&&(s="j4u"===a.info.COMMON.preference.toLowerCase()?a.info.J4U.address:a.info.SHOP.address,!s)){let e=(a.info.COMMON.preference,a.info.J4U.storeId);s=this.getStoreDetailsFromXapi(e)?.streetAddress}r=a.info.COMMON.banner}return t.preference=a.info.COMMON.preference.toLowerCase(),t.selection=a.info.COMMON.Selection,t.banner=n,t.j4uStoreId=a.info.J4U.storeId,t.j4uzipcode=a.info.J4U.zipcode,t.shopStoreId=a.info.SHOP.storeId,t.shopzipcode=a.info.SHOP.zipcode,t.address=s,t.commonBanner=r,t.resolvedBy=a.info.COMMON.resolvedBy||"",t}}renderCurrentlyShopping(e){let t=e.preference;if("j4u"===t||"instore"===t){this.currentlyShoppingIcon="instore",this.currentlyShoppingPreference=this.conflictModalItems.inStoreText;let t=e.address?e.address.split("+").join(" "):"";this.currentlyShoppingAddress=t}else if("delivery"===t)if("delivery-addr"===e?.resolvedBy&&Object.keys(this.getResolvedAddress()).length>0){let{adr1:e,adr2:t,city:i,st:n,zip:r}=this.getResolvedAddress(),s=`${e}${t?", "+t+", ":""} ${i}, ${n}, ${r}`;this.currentlyShoppingIcon="delivery",this.currentlyShoppingPreference=this.conflictModalItems.deliveryTextGeo+s}else this.currentlyShoppingIcon="delivery",this.currentlyShoppingPreference=this.conflictModalItems.deliveryText+e.shopzipcode;else if("dug"===t){this.currentlyShoppingIcon="dug",this.currentlyShoppingPreference=this.conflictModalItems.dugText;let t=e.address?e.address.split("+").join(" "):"";this.currentlyShoppingAddress=t}$(this.conflictModalItems.currentlyShoppingId)&&(this.currentlyShoppingData=encodeURIComponent(JSON.stringify(e)))}renderPreviouslyShopped(e){let t=e.preference,i=window.SWY?.CONFIGSERVICE?.getCookie("SWY_SHARED_PII_SESSION_INFO");if("j4u"===t||"instore"===t){this.previouslyShoppedIcon="instore",this.previouslyShoppedPreference=this.conflictModalItems.inStoreText;let t=e.address?e.address.split("+").join(" "):"";this.previouslyShoppedAddress=t}else if("delivery"===t){let t=!1;if("delivery-addr"===window.AB?.userInfo?.resolvedBy&&i){let e,n,r=JSON.parse(i);r.deliveryAddr&&(e=r.deliveryAddr.split("+").join(" "),"null"===e?.split(",")?.[0]&&(n=e.match(/\d+/g),n&&(e=n[0])),this.previouslyShoppedIcon="delivery",this.previouslyShoppedPreference=this.conflictModalItems.deliveryTextGeo+e,t=!0)}t||(this.previouslyShoppedIcon="delivery",this.previouslyShoppedPreference=this.conflictModalItems.deliveryText+e.shopzipcode)}else if("dug"===t){this.previouslyShoppedIcon="dug",this.previouslyShoppedPreference=this.conflictModalItems.dugText;let t=e.address?e.address.split("+").join(" "):"";this.previouslyShoppedAddress=t}$(this.conflictModalItems.previouslyShoppedId)&&(this.previouslyShoppedData=encodeURIComponent(JSON.stringify(e)))}getResolvedAddress(){let e=window.AB?.COMMON?.getGeoCookieName(),t=window.SWY.CONFIGSERVICE.getCookie(e),i={};return t&&(i=JSON.parse(t)),i}renderBanner(e,t){if(e&&t&&e!==t){let i=$(this.conflictModalItems.currentBanner),n=$(this.conflictModalItems.previousBanner);"B"===window.AB?.userInfo?.siteType&&(e=`${e}_b2b`,t=`${t}_b2b`),i.attr("src",this.getBannerLogo(e)),i.attr("alt",e),i.addClass(`${e}-logo`),n.attr("src",this.getBannerLogo(t)),n.attr("alt",t),n.addClass(`${t}-logo`),i.show(),n.show()}}saveStoreData(e){let t=$(this.conflictModalItems.currentSessionRadio),i=$(this.conflictModalItems.previousSessionRadio),n=$(this.conflictModalItems.conflictModalButton),r=this,s=this.currentlyShoppingData,a=this.previouslyShoppedData,o=t.is(":checked"),l=i.is(":checked"),c={info:{COMMON:{},J4U:{},SHOP:{}}},d=!!window.SWY.CONFIGSERVICE.featureToggleConfig.enableCookieRestructure;s=JSON.parse(decodeURIComponent(s)),a=JSON.parse(decodeURIComponent(a));let u=s.preference.toUpperCase(),p=s?.resolvedBy,h=this.getResolvedAddress();if(o||"close-action"===e){c.info.COMMON.preference=u;let t=this.checkIsWineShopEnabled();if(c.info.COMMON.wfcStoreId=t,c.info.J4U.zipcode=s.j4uzipcode,c.info.J4U.storeId=s.j4uStoreId,c.info.J4U.banner=s.banner,c.info.SHOP.zipcode=s.shopzipcode,c.info.SHOP.storeId=s.shopStoreId,d&&(c.info.COMMON.banner=s.banner,c.info.COMMON.storeId=s.shopStoreId,c.info.COMMON.zipcode=s.shopzipcode),window.AB.DATALAYER&&("close-action"===e?window.AB.DATALAYER.setModalClickEvents("storeConflict|close"):window.AB.DATALAYER.setModalClickEvents("storeConflict|currentlyShopping")),"J4U"===u){let e=s.address.replace(/,+\+/g,"+").split("+").join(", ");c.info.J4U.address=e,d&&(c.info.COMMON.address=e),c.info.COMMON.resolvedBy="zipcode",h={}}else if("DUG"===u){let e=s.address.replace(/,+\+/g,"+").split("+").join(", ");c.info.SHOP.address=e,d&&(c.info.COMMON.address=e),c.info.COMMON.resolvedBy="zipcode",h={}}else"DELIVERY"===u&&("delivery-addr"===p?c.info.COMMON.resolvedBy=p:(c.info.COMMON.resolvedBy="zipcode",h={}));if(String(s.banner).toLowerCase()!==String(a.banner).toLowerCase()&&String(s.banner).toLowerCase()!==window.AB.userInfo.banner){let e={};"J4U"===u?(e.storeId=s.j4uStoreId,e.zipcode=s.j4uzipcode,e.preference=u,e.banner=s.banner,e.wfcStoreId=t):(e.storeId=s.shopStoreId,e.zipcode=s.shopzipcode,e.preference=u,e.banner=s.banner,e.wfcStoreId=t),c.info.offbanner=e,c.info.COMMON.resolvedBy="zipcode",h={},r.deleteGuestData("abs_gsession",!0),r.deleteGeoCookie(),NM().AB.COMMON.updateUserSession(c,null,(function(e){e.success||n.attr("disabled",!1)}),null,h)}else NM().AB.COMMON.updateUserSession(c,null,(function(e){!0===e.success?(r.deleteGuestData("abs_gsession",!0),r.deleteGeoCookie(),r.popupNextflow.emit()):n.attr("disabled",!1)}),null,h)}else l&&("J4U"===a.preference.toUpperCase()&&s.banner!==a.banner?location.replace("https://"+window.AB.COMMON.getHost()+"."+a.banner+".com"+window.SWY.ssoPath+"?ml=store
1Conflict%7CpreviouslyShopped"):(r.deleteGuestData("abs_gsession"),r.deleteGeoCookie(),window.AB.DATALAYER&&window.AB.DATALAYER.setModalClickEvents("storeConflict|previouslyShopped"),r.popupNextflow.emit()))}checkIsWineShopEnabled(){let e,t,i=window.AB.storeFlagsData;if(this.isObjectEmpty(i)?$(document).on("storeFlagsLoadComplete",(()=>{i=window.AB.storeFlagsData,t=i&&i.flags&&i.flags.ecomStore&&i.flags.ecomStore.storeFeatures&&i.flags.ecomStore.storeFeatures.isWineD2CEnabled,e=i&&i.flags&&i.flags.ecomStore&&i.flags.ecomStore.wfcStoreId})):(t=i&&i.flags&&i.flags.ecomStore&&i.flags.ecomStore.storeFeatures&&i.flags.ecomStore.storeFeatures.isWineD2CEnabled,e=i&&i.flags&&i.flags.ecomStore&&i.flags.ecomStore.wfcStoreId),t)return e||""}handleModalButtonClick(){this.isModalButtonDisabled=!0,this.saveStoreData()}getBannerLogo(e){e=e.toLowerCase().split(" ").join("");let t=this.bannerLogoImages.find((t=>t.bannerKey===e));return t?t.imagePath:null}diplayConflictModal(e,t){this.renderCurrentlyShopping(e),this.renderPreviouslyShopped(t),this.setEscapeKeyListener(),$(this.conflictModalItems.popupWrapperModalId).modal("show"),window.AB.DATALAYER&&window.AB.DATALAYER.setModalViewEvents("storeConflict|view")}setEscapeKeyListener(){let e=$(this.conflictModalItems.conflictModalButton);document.onkeydown=t=>{("Escape"===t.key||"Esc"===t.key||27===t.keyCode)&&$(this.conflictModalItems.popupWrapperModalId).hasClass("in")&&(t.preventDefault(),console.debug("Escape key is pressed while conflict modal is shown"),e.attr("disabled",!0),this.saveStoreData("close-action"))}}deleteGeoCookie(){window.AB?.COMMON?.getCookie(window.AB?.COMMON?.getGeoCookieName())&&this.deleteGuestData(window.AB.COMMON.getGeoCookieName())}deleteGuestData(e,t){e=window.SWY.CONFIGSERVICE.getResolvedCookieName(e),document.cookie=e+"=; expires=Mon, 19 Aug 2019 00:00:00 UTC; path=/;",localStorage.removeItem("previousStoreData"),!t&&this.isFulfillmentConflictModal()&&$(this.conflictModalItems.popupWrapperModalId).modal("hide")}isFulfillmentConflictModal(){return"fulfillment-conflict-modal"===$(this.conflictModalItems.popupWrapperModalId).attr("data-id")}getStoreDetailsFromXapi(e){let t,i=window.location.origin,n=window.AB.storeResolverStoreAddressEndpoint,r={storeid:e},s=window.AB.xAPIstoreResolverHttpOptions;return window.AB.COMMON.getStoreResolverPayload(i,n,r,s,!1,(function(e,i,n){t=e.storeAddressModel.address.line1+"+"+e.storeAddressModel.address.city+"+"+e.storeAddressModel.address.state+"+"+e.storeAddressModel.address.zipcode}),(function(e,i,n){t="Sorry we have problem getting store address"})),{streetAddress:t}}isObjectEmpty(e){return null===e||0===Object.keys(e).length}checkForReBanneredFlow(e,t,i,n){let r=!1;return n?"j4u"==e.preference?e.j4uStoreId==t.j4uStoreId&&t.banner!=i&&(r=!0):e.shopStoreId==t.shopStoreId&&t.banner!=i&&(r=!0):e.commonBanner&&e.commonBanner.length>0&&("j4u"==e.preference?e.j4uStoreId==window.AB.storeFlagsData.storeId&&e.commonBanner!=i&&(r=!0):e.shopStoreId==window.AB.storeFlagsData.storeId&&e.commonBanner!=i&&(r=!0)),r}static{this.ɵfac=function(t){return new(t||e)($d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["fulfillment-conflict-modal-component"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:2,vars:2,consts:[[4,"ngIf"],[1,"modal-dialog","fulfillment-conflict-modal-dialog"],[1,"modal-content","fulfillment-conflict-modal-content"],[1,"fulfillment-conflict-modal-container"],[1,"row","fulfillment-conflict-modal__row"],["id","currentlyShopping",1,"col-12","col-sm-12","col-md-6","fulfillment-conflict-modal__col"],["for","r1","id","conflict-modal-firstfocus",1,"radio-btn"],["type","radio","name","radioStore","id","r1","aria-describedby","currentBanner-aria currentlyPreferenceTxt currentlyAddress","checked","true","value","keep-store",1,"item-store-btn","currentSessionRadio"],[1,"radio-label"],[1,"fulfillment-conflict-modal__logo"],["id","currentBanner-aria","role","img",1,"fulfillment-conflict-modal__currentBanner"],[1,"fulfillment-conflict-modal__shop"],["class","fulfillment-conflict-modal__shop-image","role","img","aria-hidden","true",4,"ngIf"],[1,"fulfillment-conflict-modal__shop-txt","store-adress"],["id","currentlyPreferenceTxt",1,"fulfillment_preference-txt"],["id","currentlyAddress",1,"fulfillment_address-txt"],["id","previouslyShopped",1,"col-12","col-sm-12","col-md-6","fulfillment-conflict-modal__col"],["for","r2","id","conflict-modal-secondfocus",1,"radio-btn"],["type","radio","name","radioStore","id","r2","aria-describedby","previousBanner-aria previouslyPreferenceTxt previouslyAddress","value","make-store",1,"item-store-btn","previousSessionRadio"],["id","previousBanner-aria","role","img",1,"fulfillment-conflict-modal__previousBanner"],["id","previouslyPreferenceTxt",1,"fulfillment_preference-txt"],["id","previouslyAddress",1,"fulfillment_address-txt"],[1,"fulfillment-conflict-modal__footer","main-wrapper"],["id","fulfillment-conflict-modal__button","aria-label","Continue","data-tabindex","last","class","btn btn-default btn-modal fulfillment-conflict-modal__button",3,"disabled","click",4,"ngIf"],["id","fulfillment-conflict-modal__button","aria-label","Continue","data-tabindex","last","class","btn btn-primary btn-modal fulfillment-conflict-modal__button",3,"disabled","click",4,"ngIf"],["id","conflict-modal-header","aria-hidden","true",1,"col-12","col-sm-12","modal
1-heading"],["id","conflict-modal-close","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"create-modal-close-icon","modal-close","modal-refocus","conflict-modal-close",3,"click","disabled"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 20.13 19.5",1,"svg-icon","svg-icon-Close"],["d","M13.9,12.2V12l7.7-7.1.1-.1a1.3,1.3,0,0,0-.1-1.9,1.45,1.45,0,0,0-2.1,0L12.1,9.7l-7.5-7a1.57,1.57,0,0,0-2.2,0h0l-.1.1a1.51,1.51,0,0,0,.1,1.9l7.7,7.2v.2L2.4,19.2l-.1.1a1.3,1.3,0,0,0,.1,1.9,1.45,1.45,0,0,0,2.1,0l7.4-6.8,7.5,6.9a1.45,1.45,0,0,0,2.1,0l.1-.1a1.3,1.3,0,0,0-.1-1.9Z","transform","translate(-1.94 -2.25)"],["id","conflict-modal-header","aria-hidden","true",1,"col-12","col-sm-12","modal-heading","display-6"],["id","conflict-modal-close","aria-label","Close","data-tabindex","first",1,"create-modal-close-icon","modal-close","modal-refocus","conflict-modal-close","body-s","btn","btn-link",3,"click","disabled"],[1,"icon","svg-error"],["role","img","aria-hidden","true",1,"fulfillment-conflict-modal__shop-image"],["class","svg-icon svg-icon-Delivery-pref-page","role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["class","svg-icon svg-icon-DUG-pref-page","role","img","aria-hidden","true","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["class","svg-icon svg-icon-store-header-mobile","aria-hidden","true","width","21px","height","16px","viewBox","0 0 29 21","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",4,"ngIf"],["role","img","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-Delivery-pref-page"],["stroke-width","1","fill-rule","evenodd"],["d","M20.2472727,15.2518182 C20.2472727,15.2518182 20.2472727,14.5318182 20.2472727,12.92 C20.2472727,11.3081818 20.3290909,10.4654545 19.7809091,9.94181818 C19.2327273,9.41818182 18.4963636,8.69818182 18.0709091,8.30545455 C17.6813722,7.80375663 17.0683781,7.52790927 16.4345455,7.56909091 L14.9618182,7.56909091 L14.9618182,5.93272727 C14.957374,5.41944835 14.5423698,5.00444422 14.0290909,5 L3.93272727,5 C3.42258803,5.00435932 3.00885369,5.41446442 3,5.92454545 L3,15.5545455 C2.99998047,16.0710167 3.41627556,16.4909635 3.93272727,16.4954545 L4.27636364,16.4954545 C4.27636364,17.9708079 5.47237388,19.1668182 6.94772727,19.1668182 C8.42308067,19.1668182 9.61909091,17.9708079 9.61909091,16.4954545 L13.6363636,16.4954545 C13.6363636,17.9685486 14.8305423,19.1627273 16.3036364,19.1627273 C17.7767304,19.1627273 18.9709091,17.9685486 18.9709091,16.4954545 L20.2227273,16.4954545 C20.6014145,16.5287451 20.9366641,16.2517998 20.9754545,15.8736364 C20.9367885,15.5056573 20.6167667,15.2323803 20.2472727,15.2518182 Z M6.95181818,17.87 C6.19267769,17.87 5.57727273,17.254595 5.57727273,16.4954545 L8.32636364,16.4954545 C8.32636364,17.254595 7.71095867,17.87 6.95181818,17.87 Z M16.32,17.87 C15.9554479,17.87 15.6058269,17.7251822 15.3480496,17.467405 C15.0902723,17.2096277 14.9454545,16.8600067 14.9454545,16.4954545 L17.7272728,16.4954545 C17.7273777,16.8657485 17.5780761,17.2204222 17.3131766,17.4791613 C17.0482771,17.7379003 16.690189,17.8788165 16.32,17.87 Z M18.6763636,11.4472727 L14.9618182,11.4472727 L14.9618182,9.10727273 L16.0909091,9.10727273 C16.2521588,9.09359394 16.4119348,9.14685259 16.5327273,9.25454545 L18.5454545,10.9645455 C18.7172727,11.1118182 18.6763636,11.2590909 18.6763636,11.4472727 L18.6763636,11.4472727 Z"],["role","img","aria-hidden","true","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-DUG-pref-page"],["d","M21,8.99853401 C21,8.32073 20.4505313,7.77126128 19.7727273,7.77126128 L18.2427273,7.77126128 C17.8467393,6.81904844 17.356094,5.90902486 16.7781818,5.05489765 C15.3013913,4.30246126 13.6561235,3.94185462 12,4.00762492 C10.3438765,3.94185462 8.69860869,4.30246126 7.22181818,5.05489765 C6.64390598,5.90902486 6.15326074,6.81904844 5.75727273,7.77126128 L4.22727273,7.77126128 C3.54946872,7.77126128 3,8.32073 3,8.99853401 C3,9.67633802 3.54946872,10.2258067 4.22727273,10.2258067 L4.70181818,10.2258067 C4.55072659,10.5900637 4.43563298,10.9682284 4.35818182,11.3548976 C4.21909091,12.4430795 4.12090909,15.5112613 4.10454545,16.8448976 C4.08818182,18.178534 4.36636364,19.2012613 5.64272727,19.2012613 C6.05326187,19.2213958 6.45168017,19.0589224 6.7310618,18.7574428 C7.01044344,18.4559632 7.14217659,18.0463522 7.09090909,17.638534 L7.09090909,16.8203522 L16.9090909,16.8203522 L16.9090909,17.638534 C16.860449,18.0450357 16.9933651,18.4523219 17.2724262,18.751879 C17.5514874,19.0514362 17.9483482,19.2128371 18.3572727,19.1930795 C19.6336364,19.1930795 19.9118182,18.1703522 19.8954545,16.8367158 C19.8790909,15.5030795 19.7809091,12.4430795 19.6418182,11.3467158 C19.5638531,10.9628301 19.4487667,10.5874295 19.2981818,10.2258067 L19.7727273,10.2258067 C20.4505313,10.2258067 21,9.67633802 21,8.99853401 Z M8.17090909,6.24126128 C9.39265072,5.76461387 10.6888428,5.50703725 12,5.48035219 C13.3106664,5.50442562 14.6068421,5.75922939 15.8290909,6.23307946 C16.2381818,6.54398855 17.3427273,9.31762492 17.3427273,9.31762492 L6.65727273,9.31762492 C6.65727273,9.31762492 7.76181818,6.54398855 8.17090909,6.24126128 Z M6.84545455,14.0548976 C6.0546832,14.0548976 5.41363636,13.4138508 5.41363636,12.6230795 C5.41363636,11.8323081 6.0546832,11.1912613 6.84545455,11.1912
1613 C7.63622589,11.1912613 8.27727273,11.8323081 8.27727273,12.6230795 C8.27727273,13.4138508 7.63622589,14.0548976 6.84545455,14.0548976 Z M17.1545455,14.0548976 C16.3637741,14.0548976 15.7227273,13.4138508 15.7227273,12.6230795 C15.7227273,11.8323081 16.3637741,11.1912613 17.1545455,11.1912613 C17.9453168,11.1912613 18.5863636,11.8323081 18.5863636,12.6230795 C18.5863636,13.4138508 17.9453168,14.0548976 17.1545455,14.0548976 Z"],["aria-hidden","true","width","21px","height","16px","viewBox","0 0 29 21","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-store-header-mobile"],["id","Iconography","stroke-width","1","fill-rule","evenodd"],["transform","translate(-3391.000000, -1447.000000)","id","Header-Icons"],["transform","translate(2924.000000, 1217.000000)"],["id","Store","transform","translate(467.000000, 198.000000)"],["id","Icon-/-Web-/-Header-/-Store-16","transform","translate(0.000000, 32.000000)"],["id","Icons-/-Small-/-Shop"],["d","M21,1.6 L21,0 L0,0 L0,1.6 L1.05,1.6 L1.05,14.4 L0,14.4 L0,16 L21,16 L21,14.4 L19.95,14.4 L19.95,1.6 L21,1.6 Z M6.3,9.6 L9.45,9.6 L9.45,14.4 L6.3,14.4 L6.3,9.6 Z M14.7,14.4 L11.55,14.4 L11.55,9.6 L14.7,9.6 L14.7,14.4 Z M14.7,8 L6.3,8 L6.3,6.4 L14.7,6.4 L14.7,8 Z","id","Shape","fill-rule","nonzero"],["class","icon svg-delivery text-primary svg-icon-Delivery-pref-page",4,"ngIf"],["class","icon svg-drive-up-and-go text-primary svg-icon-DUG-pref-page",4,"ngIf"],["class","icon svg-store text-primary svg-icon-store-header-mobile",4,"ngIf"],[1,"icon","svg-delivery","text-primary","svg-icon-Delivery-pref-page"],[1,"icon","svg-drive-up-and-go","text-primary","svg-icon-DUG-pref-page"],[1,"icon","svg-store","text-primary","svg-icon-store-header-mobile"],["id","fulfillment-conflict-modal__button","aria-label","Continue","data-tabindex","last",1,"btn","btn-default","btn-modal","fulfillment-conflict-modal__button",3,"click","disabled"],["id","fulfillment-conflict-modal__button","aria-label","Continue","data-tabindex","last",1,"btn","btn-primary","btn-modal","fulfillment-conflict-modal__button",3,"click","disabled"],[1,"modal-dialog","conflict-popup__modal-dialog","modal
1-dialog","pds-modal-size__medium","pds-modal-dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-4","conflict-popup__header"],[1,"conflict-popup__header-box","d-flex","align-items-center","w-100"],["id","conflict-modal-header",1,"heading-s","conflict-popup__heading"],[1,"flex-grow-1","d-flex","justify-content-end"],["id","conflict-modal-close","aria-label","Close","data-tabindex","first",1,"pds-modal-header__close-btn","conflict-popup__close-icon","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral",3,"click","disabled"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],["role","radiogroup",1,"conflict-popup__radio-group"],["id","currentlyShopping",1,"conflict-popup__left-section","pb-2"],["id","conflict-modal-firstfocus",1,"d-flex","pds-radio"],["type","radio","id","residential","aria-checked","true","name","addrType","value","residential","checked","",1,"item-store-btn","currentSessionRadio"],[1,"d-flex","align-items-center","justify-content-center","pds-radio-bullet-container"],[1,"pds-radio-bullet"],[1,"ml-2","text-xl-b--medium"],["role","img","alt"," ",1,"conflict-popup__store-logo","pb-2","mt-2","fulfillment-conflict-modal__currentBanner"],[1,"conflict-popup__store-section"],[1,"logoShop","d-flex","align-items-center","pt-2"],[1,"conflict-popup__logo"],["class","pds-delivery-truck-icon mr-3","aria-hidden","true",4,"ngIf"],["class","pds-car-icon mr-3",4,"ngIf"],["class","pds-big-home-icon mr-3","aria-hidden","true",4,"ngIf"],[1,"text-l--medium","mb-0"],["id","previouslyShopped"],["id","conflict-modal-secondfocus",1,"d-flex","pds-radio"],["type","radio","id","business","aria-checked","false","name","addrType","value","business",1,"item-store-btn","previousSessionRadio"],["role","img","alt"," ",1,"conflict-popup__store-logo","pb-2","mt-2","fulfillment-conflict-modal__previousBanner"],[1,"conflict-popup__btn-container","mb-0"],["id","fulfillment-conflict-modal__button","aria-label","Continue","data-tabindex","last",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center","conflict-popup__btn","fulfillment-conflict-modal__button",3,"click","disabled"],["aria-hidden","true",1,"pds-delivery-truck-icon","mr-3"],[1,"pds-car-icon","mr-3"],["aria-hidden","true",1,"pds-big-home-icon","mr-3"]],template:function(e,t){1&e&&ph(0,EM,42,22,"ng-container",0)(1,FM,56,22,"ng-container",0),2&e&&(zh("ngIf",!t.isOnboardConflictModelIntoPantryEnabled),Vd(),zh("ngIf",t.isOnboardConflictModelIntoPantryEnabled))},dependencies:[cy,Py],styles:['#fulfillment-conflict-modal{z-index:99999}.conflict-logo-jewelosco{padding:0 0 3px 3px!important}.modal-dialog.fulfillment-conflict-modal-dialog{position:fixed;inset:100px 5px 0;z-index:10040;overflow:hidden;margin:0 auto;max-width:100%}.modal-dialog.fulfillment-conflict-modal-dialog .modal-heading{padding:16px 42px 0 24px;display:block;font-size:20px}.modal-dialog.fulfillment-conflict-modal-dialog .create-modal-close-icon{top:16px;right:16px;width:24px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal-container{margin-left:0;padding:0 10px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__row{width:100%;margin:0}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__col{min-height:110px;margin:16px 0 0;padding:0}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__footer{width:100%;height:40px;bottom:24px;text-align:center;margin:24px 0;border-top:0}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__button{width:272px;height:40px;display:inline-block}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__logo{display:block}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__logo img{height:30px;object-fit:contain;padding:0 0 14px 14px;display:none}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__logo img.jewelosco_b2b-logo{padding:0 0 4px 14px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__logo.store-conflict-jewelosco{width:60px}@media (min-width: 768px){.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__col:first-child{border-right:1px solid #979797}}@media (max-width: 767px){.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__col:first-child{border-bottom:1px solid #979797}}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop{display:flex;align-items:center}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image{align-self:flex-start;margin:0 6px 0 12px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image>.svg-icon-Delivery-pref-page{width:38px;height:38px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image>.svg-icon-DUG-pref-page{width:38px;height:38px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image>.svg-icon-store-header-mobile{width:38px;height:38px}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-Delivery-pref-page>.svg-icon-DUG-pref-page,.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-Delivery-pref-page>.svg-icon-store-header-mobile{display:none}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-DUG-pref-page>.svg-icon-Delivery-pref-page,.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-DUG-pref-page>.svg-icon-store-header-mobile{display:none}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-store-header-mobile>.svg-icon-Delivery-pref-page,.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-image.svg-icon-store-header-mobile>.svg-icon-DUG-pref-page{display:none}.modal-dialog.fulfillment-conflict-modal-dialog .fulfillment-conflict-modal__shop-txt{width:100%;font-family:Nunito Sans;font-size:16px;font-weight:400;font-style:normal;font-stretch:normal;line-height:1.25;letter-spacing:normal;color:#4b4b4b;padding-right:10px}.modal-dialog.fulfillment-conflict-modal-dialog .radio-btn{position:relative;cursor:pointer;margin:15px;font-size:18px;font-weight:700;font-style:normal;font-stretch:normal;line-height:1.33;letter-spacing:normal;color:#4b4b4b}.modal-dialog.fulfillment-conflict-modal-dialog .radio-label{position:relative;display:block;float:left;width:20px;height:20px;border:1px solid #757575;border-radius:100%;-webkit-tap-highlight-color:transparent}.modal-dialog.fulfillment-conflict-modal-dialog .radio-label:after{content:"";position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:100%;transform:scale(0);transition:all .2s ease;opacity:.08;pointer-events:none}.modal-dialog.fulfillment-conflict-modal-dialog input[type=radio]{o
1pacity:0;margin-left:-15px}.modal-dialog.fulfillment-conflict-modal-dialog .radio-btn input[type=radio]:focus{outline:none!important}.modal-dialog.fulfillment-conflict-modal-dialog .radio-btn:has(input[type=radio]:focus-visible){outline:2px solid #1f1e1e!important}.modal-dialog.fulfillment-conflict-modal-dialog input[type=radio]:checked+.radio-label{border-color:#757575}.modal-dialog.fulfillment-conflict-modal-dialog input[type=radio]:checked+.radio-label:after{transform:scale(1);transition:all .2s cubic-bezier(.35,.9,.4,.9);opacity:1}.modal-dialog.fulfillment-conflict-modal-dialog .radio-button-outline{outline:2px solid #757575!important;outline-offset:4px}.modal-dialog.fulfillment-conflict-modal-dialog .modal-content.fulfillment-conflict-modal-content{height:auto}@media only screen and (min-width: 320px) and (max-width: 480px){.modal-dialog.fulfillment-conflict-modal-dialog{width:100%;position:fixed;inset:0;margin:0;overflow:hidden}.modal-dialog.fulfillment-conflict-modal-dialog .modal-content.fulfillment-conflict-modal-content{width:100%;height:100%}}@media only screen and (min-width: 480px) and (max-width: 768px){.modal-dialog.fulfillment-conflict-modal-dialog .modal-content.fulfillment-conflict-modal-content{width:90%}}@media only screen and (min-width: 769px){.modal-dialog.fulfillment-conflict-modal-dialog .modal-content.fulfillment-conflict-modal-content{width:736px}}@media only screen and (min-width: 1440px){.modal-dialog.fulfillment-conflict-modal-dialog .modal-content.fulfillment-conflict-modal-content{width:667px}}\n'],encapsulation:2})}}return e})();function VM(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"button",14),jf("click",(function(){return Wa(e),Ha(Yf().closeModal("do-this-later"))})),am(2),xf()()}if(2&e){let e=Yf();Vd(2),lm(e.doItLaterLabel)}}var qM=(()=>{class e{constructor(e,t){this.http=e,this.aemXfService=t,this.popupNextflow=new _l,this.mergeAcctModalItems={mainId:"#merge-account-modal",popupWrapperModalId:"#popup-wrapper",successId:"#merge-account-success",title:"#merge-account-title",cookieName:"ACI_S_promptMergeAccount",successCookieName:"ACI_S_mergeAccountSuccess",mergeCloseBtnId:"#merge-account-close",successCloseBtnId:"#merge-success-close"},this.mergeAccountSuccessModal=!0,this.mergeAcctImgRef="",this.headerText="",this.bodyText="",this.getStartedBtnlink="",this.getStartedBtnlabel="",this.doItLaterLabel=""}ngOnInit(){this.loadExperienceFragment()}init(){let e=window.AB.COMMON.getCookie(this.mergeAcctModalItems.cookieName),t=window.AB.COMMON.getCookie(this.mergeAcctModalItems.successCookieName);if(e){let e=window.AB.userInfo.firstName,t=this.headerText,i=e.length>0?t.replace("{firstName}",e):t.replace(", {firstName}","");this.headerText=i,this.deleteCookieAndShowModal(this.mergeAcctModalItems.cookieName,this.mergeAcctModalItems.mainId,this.mergeAcctModalItems.mergeCloseBtnId),this.analyticsTrackAction("to-merge")}t&&(this.deleteCookieAndShowModal(this.mergeAcctModalItems.successCookieName,this.mergeAcctModalItems.successId,this.mergeAcctModalItems.successCloseBtnId),this.analyticsTrackAction("success"))}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.singnInAemData){let t=e.singnInAemData;this.mergeAccountSuccessModal=t.mergeAccountSuccessModal,this.mergeAcctImgRef=t.mergeAcctImgRef,this.headerText=t.headerText,this.bodyText=t.bodyText,this.getStartedBtnlink=t.getStartedBtnlink,this.getStartedBtnlabel=t.getStartedBtnlabel,this.doItLaterLabel=t.doItLaterLabel,this.init()}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}checkIfMergeAcctCookieExists(){return window.AB.COMMON.getCookie(this.mergeAcctModalItems.cookieName)||window.AB.COMMON.getCookie(this.mergeAcctModalItems.successCookieName)}deleteCookieAndShowModal(e,t,i){document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,$(this.mergeAcctModalItems.popupWrapperModalId).modal("show"),setTimeout((()=>{$(i).focus()}),800)}closeModal(e){if(this.mergeAccountSuccessModal)this.analyticsTrackAction("close");else{let e=window.AB.mergeSkipPath.replace("{customerId}",window.AB.userInfo.UUID),t=window.AB.mergeAccountsHttpHeader;$.post({headers:t,url:e,dataType:"json",success:function(e){},error:function(e,t,i){}})}e?(this.analyticsTrackAction("do-this-later"),this.popupNextflow.emit()):location.reload()}analyticsTrackAction(e){window.AB?.DATALAYER&&("to-merge"===e||"success"===e?window.AB.DATALAYER.setModalViewEvents(`account-merge-${"success"===e?"success":"to-merge"===e?`with ${window.AB.userInfo?.firstName?"f":"no-"}name`:"modal-error"}|view`):"close"===e||"do-this-later"===e?window.AB.DATALAYER.setModalClickEvents(`account-merge-with ${window.AB.userInfo?.firstName?"f":"no-"}name|${e}
1`):"sign-in-again"===e&&"G"===window.AB?.userInfo?.userType&&window.AB.DATALAYER.setModalClickEvents(`account-merge-success|${e}`))}static{this.ɵfac=function(t){return new(t||e)($d(ov),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["merge-account"]],outputs:{popupNextflow:"popupNextflow"},decls:17,vars:8,consts:[["role","document",1,"modal-dialog","merge-accounts-modal","modal-dialog-scrollable"],[1,"modal-content","web-otp__modal-content"],[1,"modal-header"],["id","merge-success-close","type","button","data-tabindex","first","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],[1,"svg-icon","svg-close-primary"],[1,"modal-body","default-styles","merge-accounts-modal-default-styles","web-otp"],[1,"auth-styles"],[1,"auth-styles__content","merge-accts-modal"],["alt","",1,"merge-accts-modal__image",3,"src"],[1,"merge-accts-modal__title",3,"id"],[1,"body-text"],[1,"merge-accts-modal__actions"],[1,"btn","btn-lg","btn-primary","merge-accts-modal__actions-btn",3,"click","href"],[4,"ngIf"],["data-tabindex","last",1,"merge-accts-modal__actions-link","link-sm",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),jf("click",(function(){return t.closeModal()})),Tf(4,"span",4),xf()(),kf(5,"div",5)(6,"div",6)(7,"div",7),Tf(8,"img",8),kf(9,"h1",9),am(10),xf(),kf(11,"div",10),am(12),xf(),kf(13,"div",11)(14,"a",12),jf("click",(function(){return t.analyticsTrackAction("sign-in-again")})),am(15),xf(),ph(16,VM,3,1,"div",13),xf()()()()()()),2&e&&(Vd(8),zh("src",t.mergeAcctImgRef,id),Vd(),zh("id",t.mergeAccountSuccessModal?"merge-success-title":"merge-account-title"),Vd(),lm(t.headerText),Vd(2),cm(" ",t.bodyText," "),Vd(2),zh("href",t.getStartedBtnlink,id),gh("data-tabindex",t.mergeAccountSuccessModal?"last":""),Vd(),cm(" ",t.getStartedBtnlabel," "),Vd(),zh("ngIf",!t.mergeAccountSuccessModal))},dependencies:[cy],encapsulation:2})}}return e})();function $M(){return window}var jM=(()=>{class e{constructor(e){this.http=e,this.metaDataUrl=`${window.location.origin}/content/dam/data/uca/settings/shopping-preferences-config.json`,this.csmsEndpoint=$M().SWY.CONFIGSERVICE.datapowerConfig.cncCtxPath}getMetaData(){return this.http.get(this.metaDataUrl)}getPreferences(){let e=window.AB.userInfo.UUID,t=`${this.csmsEndpoint}/ucaservice/api/uca/customers/${e}/preferences/shopping`;return this.http.get(t,{headers:this.getHeaders(),observe:"response"})}savePreferences(e){let t=window.AB.userInfo.UUID,i=`${this.csmsEndpoint}/ucaservice/api/uca/customers/${t}/preferences/shopping`;return this.http.post(i,e,{headers:this.getHeaders(),observe:"response"})}getHeaders(){let e=(new Date).toUTCString();return new jy({"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json",Authorization:`Bearer ${$M().AB.userInfo.SWY_SHOP_TOKEN}`,"x-swy-banner":$M().AB.userInfo.banner,"x-swy-correlation-id":$M().AB.COMMON.generateUUID(),"x-swy-request-id":$M().AB.COMMON.generateUUID(),"x-swy-date":e,"x-swy-client-name":"web-portal","Ocp-Apim-Subscription-Key":$M().SWY.CONFIGSERVICE.datapowerConfig.cncSubscriptionKey})}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function zM(e,t){if(1&e){let e=Mf();kf(0,"li",21)(1,"div",22)(2,"div",23),jf("keydown.space",(function(t){let i=Wa(e).$implicit;return Ha(Yf().toggleTileSelection(i,t))}))("click",(function(){let t=Wa(e).$implicit;return Ha(Yf().toggleTileSelection(t))})),kf(3,"span",24),am(4),xf(),Tf(5,"span",25),xf()()()}if(2&e){let e=t.$implicit,i=Yf();Vd(),zh("id",e.id),gh("disabled",!!i.isTileDisabled(e)||null),Vd(),gh("aria-checked",e.selected)("aria-disabled",i.isTileDisabled(e)),Vd(2),lm(e.name)}}function WM(e,t){if(1&e&&(kf(0,"p",26),am(1),xf()),2&e){let e=Yf();Vd(),lm(e.errorMessage)}}var HM=(()=>{class e{constructor(e,t){this.userPreferenceService=e,this.aemXfService=t,this.popupNextflow=new _l,this.onClose=new _l,this.versionNbr="",this.preferenceTiles=[],this.errorMessage="",this.maxSelection=8,this.isMobile=window.innerWidth<768,this.firstInterestTitle="",this.firstInterestSubTitle="",this.firstInterestSubTitle1="",this.firstInterestSubTitle2="",this.firstInterestImgReference="",this.firstInterestSaveContinueText="",this.firstInterestDoThisLaterText=""}ngOnInit(){this.loadExperienceFragment(),this.fetchMetaData()}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.onboardingFlowAemData){let t=e.onboardingFlowAemData;this.firstInterestTitle=t?.firstInterestTitle,this.firstInterestSubTitle=t?.firstInterestSubTitle,this.firstInterestSubTitle1=t?.firstInterestSubTitle1,this.firstInterestSubTitle2=t?.firstInterestSubTitle2,this.firstInterestImgReference=t?.firstInterestImgReference,this.firstInterestSaveContinueText=t?.firstInterestSaveContinueText,this.firstInterestDoThisLaterText=t?.firstInterestDoThisLaterText}}
1),(e=>{console.error("Error fetching Experience Fragment:",e)}))}fetchMetaData(){this.userPreferenceService.getMetaData().subscribe({next:e=>{this.preferenceTiles=e.shoppingInterests.map((e=>f(h({},e),{selected:!1}))),this.errorMessage=""},error:()=>{this.errorMessage="Failed to load preferences."}})}savePreferences(){this.errorMessage="";let e={shoppingInterests:this.preferenceTiles.filter((e=>e.selected)).map((e=>e.id)),versionNbr:this.versionNbr};this.userPreferenceService.savePreferences(e).subscribe({next:e=>{console.warn("Preferences saved:",e),this.errorMessage="",this.popupNextflow.emit()},error:e=>{console.warn("Failed to save preferences:",e),this.errorMessage="Failed to save preferences."}})}selectedCount(){return this.preferenceTiles.filter((e=>e.selected)).length}isTileDisabled(e){return!e.selected&&this.selectedCount()>=this.maxSelection}toggleTileSelection(e,t){this.errorMessage="",t instanceof KeyboardEvent&&t.preventDefault(),(e.selected||!(this.selectedCount()>=this.maxSelection))&&(e.selected=!e.selected)}hasSelectedTiles(){return this.preferenceTiles.some((e=>e.selected))}skipUserPreferences(){this.popupNextflow.emit()}static{this.ɵfac=function(t){return new(t||e)($d(jM),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-user-preference"]],outputs:{popupNextflow:"popupNextflow",onClose:"onClose"},decls:28,vars:18,consts:[[1,"modal-dialog","pds-modal-size__medium","pds-modal-dialog","onboarding-modal__dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","p-0"],[1,"onboarding-modal__hero-image"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto","position-absolute",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],["alt","",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-3","pb-3","text-center","px-2"],[1,"onboarding-modal__heading","heading-s","mb-1"],[1,"text-l","mb-0"],[1,"text-l","mb-3"],[1,"chip-list"],[1,"text-l-b","mb-3"],[1,"p-0","mb-0"],["class","d-inline-block ml-1 mb-2",4,"ngFor","ngForOf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],["class","text-l-sb--error mt-0 mb-4 text-center w-100 mx-0",4,"ngIf"],[1,"onboarding-modal__footer","pds-modal-footer__button-box","align-items-center","d-flex","justify-content-center"],["data-dismiss","modal",1,"onboarding-modal__footer-btn-outlined","pds-btn","pds-btn-size__medium","pds-btn-outlined--primary","pds-modal-footer__button","d-flex","align-items-center","justify-content-center",3,"click"],[1,"onboarding-modal__footer-btn-primary","pds-btn","pds-btn-size__medium","pds-btn-filled--primary","pds-modal-footer__button","d-flex","align-items-center","justify-content-center",3,"click","disabled"],["data-dismiss","modal","tabindex","0","href","",1,"onboarding-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"click"],[1,"d-inline-block","ml-1","mb-2"],[1,"pds-chip","d-inline-block",3,"id"],["tabindex","0","role","checkbox",1,"pds-chip-container","align-items-center","d-flex",3,"keydown.space","click"],[1,"pds-chip-container-label"],[1,"pds-chip-container-trailing-icon","pds-svg-close","d-none"],[1,"text-l-sb--error","mt-0","mb-4","text-center","w-100","mx-0"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4),jf("click",(function(){return t.onClose.emit()})),Tf(5,"span",5),xf(),Tf(6,"img",6),xf()(),kf(7,"div",7)(8,"h2",8),am(9),xf(),kf(10,"p",9),am(11),xf(),kf(12,"p",10),am(13),xf(),kf(14,"div",11)(15,"p",12),am(16),xf(),kf(17,"ul",13),ph(18,zM,6,5,"li",14),xf()()(),kf(19,"div",15),ph(20,WM,2,1,"p",16),kf(21,"div",17)(22,"button",18),jf("click",(function(){return t.skipUserPreferences()})),am(23),xf(),kf(24,"button",19),jf("click",(function(){return t.savePreferences()})),am(25),xf(),kf(26,"a",20),jf("click",(function(){return t.skipUserPreferences()})),am(27),xf()()()()()),2&e&&(Vd(6),zh("src",t.firstInterestImgReference,id),Vd(3),lm(t.firstInterestTitle),V
1d(2),lm(t.firstInterestSubTitle),Vd(2),lm(t.firstInterestSubTitle1),Vd(3),lm(t.firstInterestSubTitle2),Vd(2),zh("ngForOf",t.preferenceTiles),Vd(2),zh("ngIf",t.errorMessage),Vd(2),gh("aria-label",t.firstInterestDoThisLaterText)("data-tabindex",t.hasSelectedTiles()?null:"last"),Vd(),lm(t.firstInterestDoThisLaterText),Vd(),zh("disabled",!t.hasSelectedTiles()),gh("aria-label",t.firstInterestSaveContinueText)("aria-disabled",!t.hasSelectedTiles())("data-tabindex",t.isMobile?null:t.hasSelectedTiles()?"last":null),Vd(),lm(t.firstInterestSaveContinueText),Vd(),gh("aria-label",t.firstInterestDoThisLaterText)("data-tabindex",t.isMobile?"last":null),Vd(),lm(t.firstInterestDoThisLaterText))},dependencies:[oy,cy],encapsulation:2})}}return e})(),YM=(()=>{class e{constructor(e,t){this._http=e,this._featureFlagService=t}sendPostRequest(e,t,i){return this._http.post(e,t,i)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function GM(e,t){if(1&e&&(kf(0,"p",26),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.serviceErrorMessageText)}}function KM(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(2);Vd(),cm(" ",e.welcomeBackContinue," ")}}function QM(e,t){1&e&&Tf(0,"div",27)}function JM(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"button",6),jf("click",(function(){return Wa(e),Ha(Yf().closeModal())})),Tf(5,"span",7),xf(),Tf(6,"img",8),xf()(),kf(7,"div",9)(8,"h2",10),am(9),xf(),Tf(10,"span",11),kf(11,"p",12),am(12),xf(),kf(13,"p",13),am(14),xf(),kf(15,"div",14)(16,"div",15)(17,"div",16),Tf(18,"img",17),kf(19,"p",18),am(20),xf(),kf(21,"p",18),am(22),xf()()()()(),kf(23,"div",19),ph(24,GM,2,1,"p",20),kf(25,"div",21)(26,"button",22),jf("click",(function(){return Wa(e),Ha(Yf().handleChangeStoreClick())})),am(27),xf(),kf(28,"button",23),jf("click",(function(){return Wa(e),Ha(Yf().updateStore())})),ph(29,KM,2,1,"ng-container",24)(30,QM,1,0,"ng-template",null,0,Wm),xf(),kf(32,"a",25),jf("click",(function(){return Wa(e),Ha(Yf().handleChangeStoreClick())}))("click",(function(){return Wa(e),Ha(Yf().updateStore())})),am(33,"Change store"),xf()()()()()}if(2&e){let e=sm(31),t=Yf();Vd(6),zh("src",t.welcomeBackImgReference,id),Vd(3),lm(t.welcomeBackTitle),Vd(3),lm(t.welcomeBackSubTitle),Vd(2),lm(t.welcomeBackSubTitle2),Vd(4),Zf("src","https://images.albertsons-media.com/is/image/ABS/",t.selectedStore.bannerName,"_logo?$fulfillment$&defaultImage=Not_Available",id),Zf("alt","",t.selectedStore.bannerName," logo image"),Vd(2),lm(t.selectedStore.street),Vd(2),um("",t.selectedStore.city,", ",t.selectedStore.state," ",t.selectedStore.zipCode,""),Vd(2),zh("ngIf",t.isServiceErrorMessage),Vd(2),gh("aria-label",t.saveChangeStoreText),V
1d(),lm(t.saveChangeStoreText),Vd(),gh("aria-label",t.welcomeBackContinue)("data-tabindex",t.isAnchorTagVisible?null:"last"),Vd(),zh("ngIf",!t.isLoading)("ngIfElse",e),Vd(3),gh("data-tabindex",t.isAnchorTagVisible?"last":null)}}function ZM(){return window}var XM=(()=>{class e{constructor(e,t,i,n){this.http=e,this.aemXfService=t,this.storeFulFillmentService=i,this._preferredStoreService=n,this.popupNextflow=new _l,this.onClose=new _l,this.loadOptionalComponent=new _l,this.isClosedStoreEnabled=!1,this.windowLocation=new FD,this.isServiceErrorMessage=!1,this.serviceErrorMessageText="",this.welcomeBackTitle="",this.welcomeBackSubTitle="",this.welcomeBackSubTitle2="",this.welcomeBackImgReference="",this.saveChangeStoreText="",this.welcomeBackContinue="",this.isAnchorTagVisible=!1,this.errorMessage="",this.isLoading=!1,this.popupWrapperModalId="#popup-wrapper"}ngOnInit(){this.isClosedStoreEnabled=ZM().SWY.configService.isClosedStoreEnabled;let e=window.AB.onboardingEvent&&window.AB.onboardingEvent?.values?.storeId||"";e?(this.getStoreDetails(e),this.loadExperienceFragment(),this.isAnchorTagVisible=window.innerWidth<=767,window.addEventListener("resize",this.checkAnchorVisibility.bind(this))):this.handleChangeStoreClick(!0)}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.onboardingFlowAemData){let t=window.AB.userInfo.banner;t=t.charAt(0).toUpperCase()+t.slice(1),this.welcomeBackTitle=e.onboardingFlowAemData.welcomeBackTitle&&e.onboardingFlowAemData.welcomeBackTitle?.replace("[Banner]",t),this.welcomeBackSubTitle=e.onboardingFlowAemData.welcomeBackSubTitle,this.welcomeBackSubTitle2=e.onboardingFlowAemData.welcomeBackSubTitle2,this.welcomeBackImgReference=e.onboardingFlowAemData.welcomeBackImgReference,this.saveChangeStoreText=e.onboardingFlowAemData.saveChangeStoreText,this.welcomeBackContinue=e.onboardingFlowAemData.welcomeBackContinue}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}checkAnchorVisibility(){this.isAnchorTagVisible=window.innerWidth<=767}updateStore(){this.isLoading=!0;let e=this.selectedStore;this.isServiceErrorMessage=!1,this.serviceErrorMessageText="";let t="INSTORE",i=e.street+" "+e.city+", "+e.state+" "+e.zipcode,n=e.storeID,r=e.zipCode,s=window.AB.userInfo.userType,a=this,o=e.bannerName.toLowerCase(),l=e.bannerName.toLowerCase()!==window.AB.userInfo.banner.toLowerCase(),c=e.isEcommStore,d=e.wfcStoreId,u=r;if(e?.isNonMigratedStore)return this.redirectToNonMigratedStore(o);ZM().SWY.ENFORCEMENT.generateSessionUpdateObject(t,n,u,s,"user",o,(function(n){let r=ZM().AB.COMMON.getURLParameterByName("action",!1),o=s.toLowerCase(),c=!!ZM().SWY.CONFIGSERVICE.featureToggleConfig.enableCookieRestructure;if("r"===o||"c"===o){if("instore"===t.toLowerCase())n.info.J4U.address=i,n.info.SHOP.address=i,c&&(n.info.COMMON.address=i),a.isClosedStoreEnabled&&(n.info.COMMON.isClosed=!1),n.info.COMMON.isCrossBannerMFCUser=!1,l||(n.info.J4U.banner=e.bannerName);a.removeGeoCookieAndUpdateSessionObj(n),ZM().AB.COMMON.updateUserSession(n,null,(function(e){(!1===e.success||"CustomerId"===e.name)&&(a.isLoading=!1,a.isServiceErrorMessage=!0,a.serviceErrorMessageText="Apologies, our site is currently experiencing technical difficulties, please try again later."),!0===e.success&&"CustomerId"!=e.name&&(null!=r&&"changeStore"===r?a.windowLocation.locationReplace(ZM().location.origin):a.popupNextflow.emit())}),"",null,"","")}}),c,d)}removeGeoCookieAndUpdateSessionObj(e){return this.storeFulFillmentService.removeGeoCookie(),e.info.COMMON.resolvedBy="zipcode",e}ngOnDestroy(){window.removeEventListener("resize",this.checkAnchorVisibility.bind(this))}handleChangeStoreClick(e){this.loadOptionalComponent.emit("storeFulfillment"),e&&this.showPopupWrapperModal()}closeModal(){this.onClose.emit()}getStoreDetails(e){let t=window.AB.wcaxXapiApimKey,i=window.location.origin,n=window.AB.storeByIdPathV2,r={},s={"Content-Type":"application/json","Ocp-Apim-Subscription-Key":t};r["request-id"]=this._getUTCTimeStampRandom();let a={headers:new jy(s),params:r},o=i+n,l={stores:[e]};new jy({"Content-type":"application/json","ocp-apim-subscription-key":window.AB.preloadStoreFlagsXapiApimKey}),this._preferredStoreService.sendPostRequest(o,JSON.stringify(l),a).subscribe((t=>{if(t?.stores&&t?.stores.length>0){let i=t.stores[0];this.selectedStore={street:i.address?.line1+(i.address?.line2?", "+i.address?.line2:""),city:i.address?.city,state:i.address?.state,zipCode:i.address?.zipcode,bannerName:i.polarisBannerName,isB2BStore:i?.ecomStore?.storeFeatures?.isB2BStore||null,isEcommStore:i.isEcomStore,isSisterBanner:!1,isWineD2CEnabled:i?.ecomStore?.storeFeatures?.isWineD2CEnabled||null,logoPath:i.storelogoURL,storeID:e,storeLogoURL:i.storelogoURL,storeName:i.storeName,wfcStoreId:i?.ecomStore?.wfcStoreId||null,isNonMigratedStore:i.isNonMigratedStore},this.showPopupWrapperModal()}else this.handleChangeStoreClick(!0);console.warn("Store address response:",this.selectedStore)}),(()=>{this.handleChangeStoreClick(!0)}))}showPopupWrapperModal(){$(this.popupWrapperModalId).modal("show")}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}getNonMigratedStoreRedirectUrl(e){let t=ZM()?.SWY?.configService?.
1notMigratedUnityBanners,i=e.toLowerCase();for(let e of t){let[t,n]=e.split("|");if(t===i&&n)return n}return""}redirectToNonMigratedStore(e){let t=this.getNonMigratedStoreRedirectUrl(e),i=window.location.protocol+"//www."+t;window.location.href=i}static{this.ɵfac=function(t){return new(t||e)($d(ov),$d(jE),$d(HD),$d(YM))}}static{this.ɵcmp=Qr({type:e,selectors:[["preferred-store"]],outputs:{popupNextflow:"popupNextflow",onClose:"onClose",loadOptionalComponent:"loadOptionalComponent"},decls:1,vars:1,consts:[["showLoading",""],["class","modal-dialog pds-modal-size__medium pds-modal-dialog onboarding-modal__dialog",4,"ngIf"],[1,"modal-dialog","pds-modal-size__medium","pds-modal-dialog","onboarding-modal__dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","p-0"],[1,"onboarding-modal__hero-image"],["aria-label","Close","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto","position-absolute",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],["alt","",1,"w-100",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-3","pb-4","text-center"],[1,"heading-m","mb-1"],["aria-hidden","true",1,"pds-brand-glyphs-icon","mb-4"],[1,"text-l","mb-2"],[1,"text-l","mb-4","pb-4"],[1,"onboarding-modal__store-details","d-flex","p-3"],[1,"col-8","col-sm-8","card-store__address","p-0"],[1,"caption","text-left"],["data-qa","hdr_sb_lg",1,"onboarding-modal__store-details-logo","mb-2",3,"src","alt"],[1,"text-m","mb-0"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0","pt-3"],["class","text-l-sb--error mt-0 mb-4 text-center w-100 mx-0","role","alert","aria-live","polite",4,"ngIf"],[1,"onboarding-modal__footer","pds-modal-footer__button-box","align-items-center","d-flex","justify-content-center"],["data-dismiss","modal",1,"onboarding-modal__footer-btn-outlined","pds-btn","pds-btn-size__medium","pds-btn-outlined--primary","pds-modal-footer__button","d-flex","align-items-center","justify-content-center",3,"click"],[1,"onboarding-modal__footer-btn-primary","pds-btn","pds-btn-size__medium","pds-btn-filled--primary","pds-modal-footer__button","d-flex","align-items-center","justify-content-center",3,"click"],[4,"ngIf","ngIfElse"],["role","button","href","javascript:void(0);","aria-label","Change store","data-dismiss","modal","tabindex","0",1,"onboarding-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"click"],["role","alert","aria-live","polite",1,"text-l-sb--error","mt-0","mb-4","text-center","w-100","mx-0"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){1&e&&ph(0,JM,34,20,"div",1),2&e&&zh("ngIf",t.selectedStore)},dependencies:[cy],encapsulation:2})}}return e})();function eR(e,t){1&e&&Tf(0,"div",22)}function tR(e,t){1&e&&Tf(0,"div",23)}function iR(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"img",15),kf(2,"p",24),am(3),xf()()),2&e){let e=Yf();Vd(),zh("src",e.unityWelcomeIcon2Image,id),Vd(2),lm(e.unityWelcomeSubTitle2)}}function nR(e,t){if(1&e&&(kf(0,"div",14)(1,"p",25),am(2),xf()()),2&e){let e=Yf();Vd(2),lm(e.unityWelcomeSubTitle2)}}function rR(e,t){1&e&&Tf(0,"div",22)}function sR(e,t){1&e&&Tf(0,"div",23)}function aR(e,t){if(1&e&&(kf(0,"div",17),ph(1,rR,1,0,"div",18)(2,sR,1,0,"ng-template",null,3,Wm),xf()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf",2==t.currentStep)("ngIfElse",e)}}function oR(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"img",15),kf(2,"p",24),am(3),xf()()),2&e){let e=Yf();Vd(),zh("src",e.unityWelcomeIcon3Image,id),Vd(2),lm(e.unityWelcomeSubTitle3)}}function lR(e,t){if(1&e&&(kf(0,"div",14)(1,"p",25),am(2),xf()()),2&e){let e=Yf();Vd(2),lm(e.unityWelcomeSubTitle3)}}function cR(e,t){1&e&&Tf(0,"div",22)}function dR(e,t){1&e&&Tf(0,"div",23)}function uR(e,t){if(1&e&&(kf(0,"div",17),ph(1,cR,1,0,"div",18)(2,dR,1,0,"ng-template",null,3,Wm),xf()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf",!t.step3Completed)("ngIfElse",e)}}var pR=(()=>{class e{constructor(e){this.unityAccountInfoService=e,this.close=new _l,this.unityWelcomeTitle1="",this.unityWelcomeTitle2="",this.unityWelcomeTitle3="",this.unityWelcomeSubTitle1="",this.unityWelcomeSubTitle2="",this.unityWelcomeSubTitle3="",this.unityWelcomeImage="",this.unityWelcomeIcon1Image="",this.unityWelcomeIcon2Image="",this.unityWelcomeIcon3Image="",this.headerText="",this.currentStep=1,this.step1Completed=!1,this.step2Completed=!1,this.step3Completed=!1,this.timers=[]}ngOnInit(){}ngAfterViewInit(){this.headerText=this.unityWelcomeTitle1,this.startProgressionSequence(),setTimeout((()=>{$('#popup-wrapper [data-tabindex="first"]').focus()}),1e3)}ngOnDestroy(){this.clearTimers()}startProgressionSequence(){let e=0,t=setInterval((()=>{switch(e++,e){case 1:this.step1Completed=!0,this.currentStep=2,this.headerText=this.unityWelcomeTitle2;break;case 2:this.step2Completed=!0,this.currentStep=3,this.headerText=this.unityWelcomeTitle3;break;case 3:this.step3Completed=!0;break;case 4:this.goToWelcome(),clearInterval(t)}}),1555);this.timers.push(t)}
1clearTimers(){this.timers.forEach((e=>clearInterval(e))),this.timers=[]}addBirthday(){}goToWelcome(){this.unityAccountInfoService.setCurrentScreen("welcomeScreen")}static{this.ɵfac=function(t){return new(t||e)($d(YD))}}static{this.ɵcmp=Qr({type:e,selectors:[["account-migration-screen"]],inputs:{unityWelcomeTitle1:"unityWelcomeTitle1",unityWelcomeTitle2:"unityWelcomeTitle2",unityWelcomeTitle3:"unityWelcomeTitle3",unityWelcomeSubTitle1:"unityWelcomeSubTitle1",unityWelcomeSubTitle2:"unityWelcomeSubTitle2",unityWelcomeSubTitle3:"unityWelcomeSubTitle3",unityWelcomeImage:"unityWelcomeImage",unityWelcomeIcon1Image:"unityWelcomeIcon1Image",unityWelcomeIcon2Image:"unityWelcomeIcon2Image",unityWelcomeIcon3Image:"unityWelcomeIcon3Image"},outputs:{close:"close"},decls:29,vars:15,consts:[["checkIcon",""],["defaultSubtitle2",""],["defaultSubtitle3",""],["checkIcon2",""],[1,"pds-unity-onboarding__dialog","modal-dialog","pds-modal-size__medium","pds-modal-dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pb-1"],["aria-label","Close","data-dismiss","modal",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"pds-modal-header__box","d-flex","flex-column","align-items-center","mt-4"],["alt","",3,"src"],["id","account-info-heading","aria-live","assertive",1,"modal-title","heading-s","flex-grow-1","mt-4","w-50","text-center"],[1,"modal-body","pds-modal-body--small","text-l","pt-4","pb-4"],[1,"pds-unity-onboarding__feature"],[1,"d-flex"],["alt","",1,"pds-unity-onboarding__feature-icon",3,"src"],[1,"text-l","ml-2","mb-0"],[1,"pds-unity-onboarding__feature-status"],["class","icon-loader",4,"ngIf","ngIfElse"],["class","d-flex",4,"ngIf","ngIfElse"],["class","pds-unity-onboarding__feature-status",4,"ngIf"],[1,"pds-unity-onboarding__feature","mb-0"],[1,"icon-loader"],[1,"icon-check"],[1,"text-l","ml-1","mb-0"],[1,"text-l--light","ml-2","mb-0"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",4)(1,"div",5)(2,"div",6)(3,"button",7),jf("click",(function(){return Wa(e),Ha(t.close.emit())})),Tf(4,"span",8),xf(),kf(5,"div",9),Tf(6,"img",10),kf(7,"h2",11),am(8),xf()()(),kf(9,"div",12)(10,"div",13)(11,"div",14),Tf(12,"img",15),kf(13,"p",16),am(14),xf()(),kf(15,"div",17),ph(16,eR,1,0,"div",18)(17,tR,1,0,"ng-template",null,0,Wm),xf()(),kf(19,"div",13),ph(20,iR,4,2,"div",19)(21,nR,3,1,"ng-template",null,1,Wm)(23,aR,4,2,"div",20),xf(),kf(24,"div",21),ph(25,oR,4,2,"div",19)(26,lR,3,1,"ng-template",null,2,Wm)(28,uR,4,2,"div",20),xf()()()()}if(2&e){let e=sm(18),i=sm(22),n=sm(27);Vd(6),zh("src",t.unityWelcomeImage,id),Vd(),Sh("aria-label","",null==t.headerText?null:t.headerText.replace("...",""),", ",t.currentStep," of 3"),Vd(),cm(" ",t.headerText," "),Vd(4),zh("src",t.unityWelcomeIcon1Image,id),Vd(2),lm(t.unityWelcomeSubTitle1),Vd(2),zh("ngIf",1==t.currentStep)("ngIfElse",e),Vd(4),zh("ngIf",t.currentStep>=2)("ngIfElse",i),Vd(3),zh("ngIf",t.currentStep>=2),Vd(2),zh("ngIf",t.currentStep>=3)("ngIfElse",n),Vd(3),zh("ngIf",t.currentStep>=3)}},dependencies:[cy],encapsulation:2})}}return e})();function hR(e,t){if(1&e&&(kf(0,"h3",9),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.unityWelcomeSavedTitle,"")}}function fR(e,t){if(1&e&&(kf(0,"div",22),Tf(1,"img",23),kf(2,"p",24),am(3),xf(),kf(4,"p",25),am(5),xf()()),2&e){let e=Yf(2);Vd(),zh("src",e.unityWelcomeDealsImage,id),Vd(2),lm(e.dealsAvailable),Vd(2),lm(e.unityWelcomeDealsTitle)}}function mR(e,t){if(1&e&&(kf(0,"div",22),Tf(1,"img",23),kf(2,"p",24),am(3),xf(),kf(4,"p",25),am(5),xf()()),2&e){let e=Yf(2);Vd(),zh("src",e.unityWelcomePointsImage,id),Vd(2),lm(e.pointsAvailable),Vd(2),lm(e.unityWelcomePointsTitle)}}function gR(e,t){if(1&e&&(kf(0,"div",20),ph(1,fR,6,3,"div",21)(2,mR,6,3,"div",21),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.dealsAvailable>0),Vd(),zh("ngIf",e.pointsAvailable>0)}}var bR=(()=>{class e{constructor(e){this.unityAccountInfoService=e,this.close=new _l,this.onPopupNextflow=new _l,this.unityFirstInterestTitle="",this.unityFirstInterestSubTitle="",this.unityFirstInterestTileText1="",this.unityFirstInterestTileText2="",this.unityFirstInterestTileText3="",this.unityFirstInterestTileText4="",this.unityFirstInterestTileText5="",this.unityFirstInterestTileText6="",this.unityFirstInterestStartShopping="",this.unityFirstInterestImage="",this.unityWelcomePointsImage="",this.unityWelcomeDealsImage="",this.unityWelcomeSavedTitle="",this.unityWelcomeDealsTitle="",this.unityWelcomePointsTitle="",this.unityFirstInterestTileImage1="",this.unityFirstInterestTileImage2="",this.unityFirstInterestTileImage3="",this.unityFirstInterestTileImage4="",this.unityFirstInterestTileImage5="",this.unityFirstInterestTileImage6="",this.combinedData$=this.unityAccountInfoService.combinedData$,this.pointsAvailable=0,this.dealsAvailable=0,this.dataLoaded=!1,this.firstName=""}ngOnInit(){this.firstName=window.AB?.userInfo?.firstName||"",this.showConfetti(),this.combinedData$.subscribe((e=>{this.dataLoaded=e.isLoaded,this.pointsAvailable=e.pointsAvailable,this.dealsAvailable=e.dealsAvailable}))}ngAfterViewInit(){setTimeout((()=>{$('#popup-wrapper [data-tabindex="first"]').focus()}),1e3)}showConfetti(){let e=document.createElement("canvas");
1e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.zIndex="9999",document.body.appendChild(e),xD.create(e,{resize:!0,useWorker:!0})({particleCount:100,spread:50,origin:{y:.6}}),setTimeout((()=>e.remove()),4e3)}startShopping(){$("#popup-wrapper").hide(),$(".modal-backdrop").hide(),this.onPopupNextflow.emit()}static{this.ɵfac=function(t){return new(t||e)($d(YD))}}static{this.ɵcmp=Qr({type:e,selectors:[["unity-welcome-screen"]],inputs:{unityFirstInterestTitle:"unityFirstInterestTitle",unityFirstInterestSubTitle:"unityFirstInterestSubTitle",unityFirstInterestTileText1:"unityFirstInterestTileText1",unityFirstInterestTileText2:"unityFirstInterestTileText2",unityFirstInterestTileText3:"unityFirstInterestTileText3",unityFirstInterestTileText4:"unityFirstInterestTileText4",unityFirstInterestTileText5:"unityFirstInterestTileText5",unityFirstInterestTileText6:"unityFirstInterestTileText6",unityFirstInterestStartShopping:"unityFirstInterestStartShopping",unityFirstInterestImage:"unityFirstInterestImage",unityWelcomePointsImage:"unityWelcomePointsImage",unityWelcomeDealsImage:"unityWelcomeDealsImage",unityWelcomeSavedTitle:"unityWelcomeSavedTitle",unityWelcomeDealsTitle:"unityWelcomeDealsTitle",unityWelcomePointsTitle:"unityWelcomePointsTitle",unityFirstInterestTileImage1:"unityFirstInterestTileImage1",unityFirstInterestTileImage2:"unityFirstInterestTileImage2",unityFirstInterestTileImage3:"unityFirstInterestTileImage3",unityFirstInterestTileImage4:"unityFirstInterestTileImage4",unityFirstInterestTileImage5:"unityFirstInterestTileImage5",unityFirstInterestTileImage6:"unityFirstInterestTileImage6"},outputs:{close:"close",onPopupNextflow:"onPopupNextflow"},decls:63,vars:18,consts:[[1,"pds-unity-onboarding__dialog","modal
1-dialog","pds-modal-size__medium","pds-modal-dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pb-2"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"pds-modal-header__box","d-flex","flex-column","align-items-center","mt-4"],["alt","",3,"src"],["id","welcome-heading",1,"modal-title","heading-s","flex-grow-1","mt-3","w-50","text-center"],[1,"modal-body","pds-modal-body--small","text-l","pt-3","pb-3"],[1,"heading-xxs","mb-3"],[1,"pds-unity-onboarding__features","mb-4"],[1,"feature-card","pds-unity-onboarding__feature-card"],[1,"text-s-b","mb-0"],[1,"text-s","mb-0"],[1,"text-s","mb-0","mr-1"],["class","heading-xxs mb-3",4,"ngIf"],["class","pds-unity-onboarding__stats mb-2",4,"ngIf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","pds-modal-footer--sticky","pds-unity-onboarding__footer"],[1,"pds-modal-footer__button-box","d-flex","align-items-center","justify-content-end"],["aria-label","Start shopping","data-dismiss","modal","data-tabindex","last",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center","pds-unity-onboarding__launch-btn",3,"click"],[1,"pds-unity-onboarding__stats","mb-2"],["class","pds-unity-onboarding__stats-card",4,"ngIf"],[1,"pds-unity-onboarding__stats-card"],["alt","",1,"mb-1",3,"src"],[1,"text-s-b","mb-1"],[1,"text-s","mb-1"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),jf("click",(function(){return t.close.emit()})),Tf(4,"span",4),xf(),kf(5,"div",5),Tf(6,"img",6),kf(7,"h2",7),am(8),Tf(9,"br"),am(10),xf()()(),kf(11,"div",8)(12,"h3",9),am(13),xf(),kf(14,"div",10)(15,"div",11),Tf(16,"img",6),kf(17,"div")(18,"p",12),am(19),xf(),kf(20,"p",13),am(21,"Shop faster, browse easier"),xf()()(),kf(22,"div",11),Tf(23,"img",6),kf(24,"div")(25,"p",12),am(26),xf(),kf(27,"p",13),am(28,"Plan smarter, waste less"),xf()()(),kf(29,"div",11),Tf(30,"img",6),kf(31,"div")(32,"p",12),am(33),xf(),kf(34,"p",13),am(35,"Easily find your favorite items in-store"),xf()()(),kf(36,"div",11),Tf(37,"img",6),kf(38,"div")(39,"p",12),am(40),xf(),kf(41,"p",13),am(42,"Pickup or Delivery in as little as 30 minutes"),xf()()(),kf(43,"div",11),Tf(44,"img",6),kf(45,"div")(46,"p",12),am(47),xf(),kf(48,"p",14),am(49,"From checkout to doorstep"),xf()()(),kf(50,"div",11),Tf(51,"img",6),kf(52,"div")(53,"p",12),am(54),xf(),kf(55,"p",13),am(56,"Set it once, never run out"),xf()()()(),ph(57,hR,2,1,"h3",15)(58,gR,3,2,"div",16),xf(),kf(59,"div",17)(60,"div",18)(61,"button",19),jf("click",(function(){return t.onPopupNextflow.emit()})),am(62," Start shopping "),xf()()()()()),2&e&&(Vd(6),zh("src",t.unityFirstInterestImage,id),Vd(2),cm(" ",t.unityFirstInterestTitle," "),Vd(2),cm(" ",t.firstName," "),Vd(3),lm(t.unityFirstInterestSubTitle),Vd(3),zh("src",t.unityFirstInterestTileImage1,id),Vd(3),lm(t.unityFirstInterestTileText1),Vd(4),zh("src",t.unityFirstInterestTileImage2,id),Vd(3),lm(t.unityFirstInterestTileText2),Vd(4),zh("src",t.unityFirstInterestTileImage3,id),Vd(3),lm(t.unityFirstInterestTileText3),Vd(4),zh("src",t.unityFirstInterestTileImage4,id),Vd(3),lm(t.unityFirstInterestTileText4),Vd(4),zh("src",t.unityFirstInterestTileImage5,id),Vd(3),lm(t.unityFirstInterestTileText5),Vd(4),zh("src",t.unityFirstInterestTileImage6,id),Vd(3),lm(t.unityFirstInterestTileText6),Vd(3),zh("ngIf",t.dataLoaded&&(t.dealsAvailable||t.pointsAvailable)),Vd(),zh("ngIf",t.dataLoaded))},dependencies:[cy],encapsulation:2})}}return e})();function yR(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"account-migration-screen",1),jf("close",(function(){return Wa(e),Ha(Yf(2).onClose.emit())})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("unityWelcomeTitle1",e.unityWelcomeTitle1)("unityWelcomeTitle2",e.unityWelcomeTitle2)("unityWelcomeTitle3",e.unityWelcomeTitle3)("unityWelcomeSubTitle1",e.unityWelcomeSubTitle1)("unityWelcomeSubTitle2",e.unityWelcomeSubTitle2)("unityWelcomeSubTitle3",e.unityWelcomeSubTitle3)("unityWelcomeImage",e.unityWelcomeImage)("unityWelcomeIcon1Image",e.unityWelcomeIcon1Image)("unityWelcomeIcon2Image",e.unityWelcomeIcon2Image)("unityWelcomeIcon3Image",e.unityWelcomeIcon3Image)}}function vR(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"unity-welcome-screen",2),jf("close",(function(){return Wa(e),Ha(Yf(2).onClose.emit())}
1))("onPopupNextflow",(function(){return Wa(e),Ha(Yf(2).popupNextflow.emit())})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("unityFirstInterestTitle",e.unityFirstInterestTitle)("unityFirstInterestSubTitle",e.unityFirstInterestSubTitle)("unityFirstInterestTileText1",e.unityFirstInterestTileText1)("unityFirstInterestTileText2",e.unityFirstInterestTileText2)("unityFirstInterestTileText3",e.unityFirstInterestTileText3)("unityFirstInterestTileText4",e.unityFirstInterestTileText4)("unityFirstInterestTileText5",e.unityFirstInterestTileText5)("unityFirstInterestTileText6",e.unityFirstInterestTileText6)("unityFirstInterestStartShopping",e.unityFirstInterestStartShopping)("unityFirstInterestTileImage1",e.unityFirstInterestTileImage1)("unityFirstInterestTileImage2",e.unityFirstInterestTileImage2)("unityFirstInterestTileImage3",e.unityFirstInterestTileImage3)("unityFirstInterestTileImage4",e.unityFirstInterestTileImage4)("unityFirstInterestTileImage5",e.unityFirstInterestTileImage5)("unityFirstInterestTileImage6",e.unityFirstInterestTileImage6)("unityFirstInterestImage",e.unityFirstInterestImage)("unityWelcomePointsImage",e.unityWelcomePointsImage)("unityWelcomeDealsImage",e.unityWelcomeDealsImage)("unityWelcomeSavedTitle",e.unityWelcomeSavedTitle)("unityWelcomeDealsTitle",e.unityWelcomeDealsTitle)("unityWelcomePointsTitle",e.unityWelcomePointsTitle)}}function wR(e,t){if(1&e&&(Ef(0),ph(1,yR,2,10,"ng-container",0)(2,vR,2,21,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf","migrationScreen"==e.currentScreen),Vd(),zh("ngIf","welcomeScreen"==e.currentScreen)}}var _R=(()=>{class e{constructor(e,t){this.unityAccountInfoService=e,this.aemXfService=t,this.onClose=new _l,this.popupNextflow=new _l,this.unityWelcomeTitle1="",this.unityWelcomeTitle2="",this.unityWelcomeTitle3="",this.unityWelcomeSubTitle1="",this.unityWelcomeSubTitle2="",this.unityWelcomeSubTitle3="",this.unityFirstInterestTitle="",this.unityFirstInterestSubTitle="",this.unityFirstInterestTileText1="",this.unityFirstInterestTileText2="",this.unityFirstInterestTileText3="",this.unityFirstInterestTileText4="",this.unityFirstInterestTileText5="",this.unityFirstInterestTileText6="",this.unityFirstInterestStartShopping="",this.unityWelcomeSavedTitle="",this.unityWelcomeDealsTitle="",this.unityWelcomePointsTitle="",this.unityWelcomeImage="",this.unityFirstInterestImage="",this.unityFirstInterestTileImage1="",this.unityFirstInterestTileImage2="",this.unityFirstInterestTileImage3="",this.unityFirstInterestTileImage4="",this.unityFirstInterestTileImage5="",this.unityFirstInterestTileImage6="",this.unityWelcomeIcon1Image="",this.unityWelcomeIcon2Image="",this.unityWelcomeIcon3Image="",this.unityWelcomePointsImage="",this.unityWelcomeDealsImage="",this.aemLoading=!0,this.destroy$=new kt}ngOnInit(){this.loadExperienceFragment(),this.unityAccountInfoService.currentScreen.subscribe((e=>{this.currentScreen=e})),this.getPointSummaryData(),this.getDealsData()}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.singnInAemData){this.aemLoading=!1;let t=e.singnInAemData;this.unityWelcomeTitle1=t.unityWelcomeTitle1||"",this.unityWelcomeTitle2=t.unityWelcomeTitle2||"",this.unityWelcomeTitle3=t.unityWelcomeTitle3||"",this.unityWelcomeSubTitle1=t.unityWelcomeSubTitle1||"",this.unityWelcomeSubTitle2=t.unityWelcomeSubTitle2||"",this.unityWelcomeSubTitle3=t.unityWelcomeSubTitle3||"",this.unityFirstInterestTitle=t.unityFirstInterestTitle&&t.unityFirstInterestTitle.replace("[NAME]","")||"",this.unityFirstInterestSubTitle=t.unityFirstInterestSubTitle||"",this.unityFirstInterestTileText1=t.unityFirstInterestTileText1||"",this.unityFirstInterestTileText2=t.unityFirstInterestTileText2||"",this.unityFirstInterestTileText3=t.unityFirstInterestTileText3||"",this.unityFirstInterestTileText4=t.unityFirstInterestTileText4||"",this.unityFirstInterestTileText5=t.unityFirstInterestTileText5||"",this.unityFirstInterestTileText6=t.unityFirstInterestTileText6||"",this.unityFirstInterestStartShopping=t.unityFirstInterestStartShopping||"",this.unityWelcomeSavedTitle=t.unityWelcomeSavedTitle||"",this.unityWelcomeDealsTitle=t.unityWelcomeDealsTitle||"",this.unityWelcomePointsTitle=t.unityWelcomePointsTitle||"",this.unityWelcomeImage=t.unityWelcomeImage||"",this.unityFirstInterestImage=t.unityFirstInterestImage||"",this.unityFirstInterestTileImage1=t.unityFirstInterestTileImage1||"",this.unityFirstInterestTileImage2=t.unityFirstInterestTileImage2||"",this.unityFirstInterestTileImage3=t.unityFirstInterestTileImage3||"",this.unityFirstInterestTileImage4=t.unityFirstInterestTileImage4||"",this.unityFirstInterestTileImage5=t.unityFirstInterestTileImage5||"",this.unityFirstInterestTileImage6=t.unityFirstInterestTileImage6||"",this.unityWelcomeIcon1Image=t.unityWelcomeIcon1Image||"",this.unityWelcomeIcon2Image=t.unityWelcomeIcon2Image||"",this.unityWelcomeIcon3Image=t.unityWelcomeIcon3Image||"",this.unityWelcomePointsImage=t.unityWelcomePointsImage||"",this.unityWelcomeDealsImage=t.unityWelcomeDealsImage||""}}),(e=>{this.aemLoading=!1,console.error("Error fetching Experience Fragment:",e)}))}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.unityAccountInfoService.currentScreen.unsubscribe()}getPointSummaryData(){this.unityAccountInfoService.getRewardsScoreCardV3("BASEPOINTS").subscribe((e=>{let t=0;if(e&&e.scorecards&&e.scorecards.length>0){let i=e.scorecards.find((e=>"BASEPOINTS"===e.programType));t=i?i.balance<0?0:i.balance:0}else t=0;this.unityAccountInfoService.setPointsAvailable(t),this.unityAccountInfoService.setPointsLoading(!1)}),(e=>{this.unityAccountInfoService.setPointsAvailable(0),this.unityAccountInfoService.setPointsLoading(!1)}))}getDealsData(){this.unityAccountInfoService.getClippedOffers().subscribe((e=>{let t=0,i=e?.body;i&&i.companionGalleryOffer&&(t=Object.keys(i.companionGalleryOffer).length),this.unityAccountInfoService.setDealsAvailable(t),this.unityAccountInfoService.setDealsLoading(!1)}),(e=>{this.unityAccountInfoService.setDealsAvailable(0),this.unityAccountInfoService.setDealsLoading(!1)}))}static{this.ɵfac=function(t){return new(t||e)($d(YD),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["unity-account-info"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:1,vars:1,consts:[[4,"ngIf"],[3,"close","unityWelcomeTitle1","unityWelcomeTitle2","unityWelcomeTitle3","unityWelcomeSubTitle1","unityWelcomeSubTitle2","unityWelcomeSubTitle3","unityWelcomeImage","unityWelcomeIcon1Image","unityWelcomeIcon2Image","unityWelcomeIcon3Image"],[3,"close","onPopupNextflow","unityFirstInterestTitle","unityFirstInterestSubTitle","unityFirstInterestTileText1","unityFirstInterestTileText2","unityFirstInterestTileText3","unityFirstInterestTileText4","unityFirstInterestTileText5","unityFirstInterestTileText6","unityFirstInterestStartShopping","unityFirstInterestTileImage1","unityFirstInterestTileImage2","unityFirstInterestTileImage3","unityFirstInterestTileImage4","unityFirstInterestTileImage5","unityFirstInterestTileImage6","unityFirstInterestImage","unityWelcomePointsImage","unityWelcomeDealsImage","unityWelcomeSavedTitle","unityWelcomeDealsTitle","unityWelcomePointsTitle"]],template:function(e,t){1&e&&ph(0,wR,3,2,"ng-container",0),2&e&&zh("ngIf",!t.aemLoading)},dependencies:[cy,pR,bR],encapsulation:2})}}return e})(),SR=(()=>{class e{constructor(e,t){this._http=e,this._featureFlagService=t,this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this.passkeyDetails=new Tt({}),this.passkeyDetails$=this.passkeyDetails.asObservable(),this.isSincerelyHealthEnabled=!1,this.currentScreen.next("passKeySetupScreen")}
1analyticsEvents(e,t){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t})}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function CR(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.createPasskeyBtnTxt," ")}}function IR(e,t){1&e&&Tf(0,"div",16)}var AR=(()=>{class e{constructor(e){this.createPasskeyService=e,this.close=new _l,this.passKeyResponse$=null,this.isLoading=!1}ngOnInit(){this.createPasskeyService.analyticsEvents("modalView","create-passkey-modal|view")}createPasskey(){this.createPasskeyService.analyticsEvents("modalClick","create-passkey-modal|createpasskey"),this.isLoading=!0,this.addPassKey()}analyticsTrackSkip(){this.createPasskeyService.analyticsEvents("modalClick","create-passkey-modal|skipfornow")}addPassKey(){this.isLoading=!0,this.passKeyResponse$=hi(window.AB.COMMON.addPassKey()),this.passKeyResponse$.subscribe({next:e=>{if(this.isLoading=!1,e.error){let t=e.errorDetails;t?.errorType?this.createPasskeyService.currentScreen.next("passKeyErrorScreen"):console.warn(t)}else this.createPasskeyService.passkeyDetails.next(e?.response),this.createPasskeyService.currentScreen.next("passKeyCreatedScreen")},error:e=>{this.isLoading=!1;let t=e.errorDetails;t?.errorType?this.createPasskeyService.currentScreen.next("passKeyErrorScreen"):console.warn(t)}})}static{this.ɵfac=function(t){return new(t||e)($d(SR))}}static{this.ɵcmp=Qr({type:e,selectors:[["setup-passkey-screen"]],inputs:{setupPasskeyTitle:"setupPasskeyTitle",setupPasskeySubTitle:"setupPasskeySubTitle",setupPasskeyBodyText1:"setupPasskeyBodyText1",setupPasskeyBodyText2:"setupPasskeyBodyText2",createPasskeyBtnTxt:"createPasskeyBtnTxt",skipForNow:"skipForNow"},outputs:{close:"close"},decls:26,vars:7,consts:[["showLoading",""],["role","document",1,"modal-dialog","passkey-modal"],[1,"modal-content","passkey-modal__content"],[1,"modal-header","passkey-modal__header"],["type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"passkey-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"modal-body","passkey-modal__body__no-space"],[1,"body-text","passkey-modal__body__subtitle"],[1,"passkey-modal__body__icon_container"],["aria-hidden","true",1,"svg-icon","svg-passkey-icon"],[1,"passkey-modal__body__passkey-info","text-center"],[1,"passkey-modal__body__btn-container"],[1,"btn","btn-lg","btn-primary","primary-button",3,"click"],[4,"ngIf","ngIfElse"],[1,"links","passkey-modal__body__link-container"],["data-tabindex","last",1,"links__action","underline","body-text",3,"click"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",1)(1,"div",2)(2,"div",3)(3,"button",4),jf("click",(function(){return Wa(e),Ha(t.close.emit())})),Tf(4,"span",5),xf()(),kf(5,"div",6)(6,"h1",7),am(7),xf(),kf(8,"div",8)(9,"div"),Tf(10,"span",9),xf()(),kf(11,"div",10)(12,"p"),am(13),xf(),kf(14,"p"),am(15),xf(),kf(16,"p"),am(17),xf()(),kf(18,"div",11)(19,"button",12),jf("click",(function(){return Wa(e),Ha(t.createPasskey())})),ph(20,CR,2,1,"ng-container",13)(21,IR,1,0,"ng-template",null,0,Wm),xf()(),kf(23,"div",14)(24,"button",15),jf("click",(function(){return Wa(e),t.analyticsTrackSkip(),Ha(t.close.emit())})),am(25),xf()()()()()}if(2&e){let e=sm(22);Vd(7),lm(t.setupPasskeyTitle),Vd(6),cm(" ",t.setupPasskeySubTitle," "),Vd(2),cm(" ",t.setupPasskeyBodyText1," "),Vd(2),cm(" ",t.setupPasskeyBodyText2," "),Vd(3),zh("ngIf",!t.isLoading)("ngIfElse",e),Vd(5),cm(" ",t.skipForNow," ")}},dependencies:[cy],encapsulation:2})}}return e})(),kR=(()=>{class e{constructor(e){this.CreatePasskeyService=e,this.close=new _l,this.passkeysErrorTitle="",this.passkeysErrorSubTitle="",this.passkeysErrorButton="",this.startShopping=""}ngOnInit(){this.CreatePasskeyService.analyticsEvents("modalView","passkey-error-modal|view")}analyticsTrackClose(){this.CreatePasskeyService.analyticsEvents("modalClick","passkey-error-modal|startshopping")}tryAgain(){this.CreatePasskeyService.analyticsEvents("modalClick","passkey-error-modal|tryagain"),this.CreatePasskeyService.currentScreen.next("passKeySetupScreen")}
1static{this.ɵfac=function(t){return new(t||e)($d(SR))}}static{this.ɵcmp=Qr({type:e,selectors:[["passkey-error-screen"]],inputs:{passkeysErrorTitle:"passkeysErrorTitle",passkeysErrorSubTitle:"passkeysErrorSubTitle",passkeysErrorButton:"passkeysErrorButton",startShopping:"startShopping"},outputs:{close:"close"},decls:17,vars:4,consts:[["role","document",1,"modal-dialog","passkey-modal"],[1,"modal-content","passkey-modal__content","error"],[1,"modal-header","passkey-modal__header"],["type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"passkey-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"modal-body","passkey-modal__body__no-space"],[1,"body-text","passkey-modal__body__subtitle","passkey-modal__body__subtitle-error"],[1,"passkey-modal__body__passkey-details-container","text-center"],[1,"passkey-modal__body__btn-container","passkey-modal__body__btn-container-error"],[1,"btn","btn-lg","btn-primary","primary-button",3,"click"],[1,"links","passkey-modal__body__link-container"],["data-tabindex","last",1,"links__action","underline","body-text",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),jf("click",(function(){return t.close.emit()})),Tf(4,"span",4),xf()(),kf(5,"div",5)(6,"h1",6),am(7),xf(),kf(8,"div",7)(9,"p"),am(10),xf()(),kf(11,"div",8)(12,"button",9),jf("click",(function(){return t.tryAgain()})),am(13),xf()(),kf(14,"div",10)(15,"button",11),jf("click",(function(){return t.analyticsTrackClose(),t.close.emit()})),am(16),xf()()()()()),2&e&&(Vd(7),cm(" ",t.passkeysErrorTitle,""),Vd(3),cm(" ",t.passkeysErrorSubTitle," "),Vd(3),lm(t.passkeysErrorButton),Vd(3),lm(t.startShopping))},encapsulation:2})}}return e})(),xR=(()=>{class e{constructor(e){this.createPasskeyService=e,this.close=new _l,this.title="",this.formattedDate="",this.ucaApiLoading=!1}ngOnInit(){this.createPasskeyService.passkeyDetails.subscribe((e=>{this.setPasskeyData(e)})),this.createPasskeyService.analyticsEvents("modalView","passkey-created-modal|view")}setPasskeyData(e){this.title=e.profile?.authenticatorName||"Authenticator";let t=e.lastUpdated||e.created;this.formattedDate=t?this.formatDate(t):"Date not available"}managePasskey(){this.createPasskeyService.analyticsEvents("modalClick","passkey-created-modal|managepasskeys"),window.location.origin;window.location.href=window.location.origin+"/customer-account/account-security"}analyticsTrackClose(){this.createPasskeyService.analyticsEvents("modalClick","passkey-created-modal|startshopping")}formatDate(e){try{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0}).format(t)}catch{return"Date not available"}}static{this.ɵfac=function(t){return new(t||e)($d(SR))}}static{this.ɵcmp=Qr({type:e,selectors:[["passkey-created-screen"]],inputs:{passkeysSuccessTitle:"passkeysSuccessTitle",passkeysSuccessSubTitle:"passkeysSuccessSubTitle",passkeysSuccessBodyText:"passkeysSuccessBodyText",passkeysSuccessButton:"passkeysSuccessButton",managePasskeysBtn:"managePasskeysBtn"},outputs:{close:"close"},decls:29,vars:9,consts:[["role","document",1,"modal-dialog","passkey-modal"],[1,"modal-content","passkey-modal__content"],[1,"modal-header","passkey-modal__header"],["type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"passkey-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"modal-body","passkey-modal__body__no-space"],[1,"body-text","passkey-modal__body__subtitle"],[1,"passkey-modal__body__passkey-details-container","text-center"],[1,"passkey-modal__body__passkey-details"],[1,"sr-only"],[1,"passkey-modal__body__passkey-details__icon_container"],["aria-hidden","true",1,"svg-icon","svg-passkey-icon-24"],["aria-hidden","true",1,"passkey-modal__body__passkey-details__title-xs"],["aria-hidden","true",1,"passkey-modal__body__passkey-details__body-text-xs"],[1,"passkey-modal__body__btn-container","passkey-modal__body__btn-container-success"],[1,"btn","btn-lg","btn-primary","primary-button",3,"click"],[1,"links","passkey-modal__body__link-container"],["data-tabindex","last",1,"links__action","underline","body-text",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),jf("click",(function(){return t.close.emit()})),Tf(4,"span",4),xf()(),kf(5,"div",5)(6,"h1",6),am(7),xf(),kf(8,"div",7)(9,"p"),am(10),xf(),kf(11,"p"),am(12),xf(),kf(13,"div",8)(14,"div",9),am(15),xf(),kf(16,"div",10),Tf(17,"span",11),xf(),kf(18,"div")(19,"div",12),am(20),xf(),kf(21,"div",13),am(22),xf()()()(),kf(23,"div",14)(24,"button",15),jf("click",(function(){return t.analyticsTrackClose(),t.close.emit()})),am(25),xf()(),kf(26,"div",16)(27,"button",17),jf("click",(function(){return t.managePasskey()})),am(28),xf()()()()()),2&e&&(Vd(7),lm(t.passkeysSuccessTitle),Vd(3),cm(" ",t.passkeysSuccessSubTitle," "),Vd(2),cm(" ",t.passkeysSuccessBodyText," "),Vd(3),dm(" Passkey added from ",t.title,", ",t.formattedDate," "),Vd(5),lm(t.title),Vd(2),lm(t.formattedDate),Vd(3),lm(t.passkeysSuccessButton),Vd(3),lm(t.managePasskeysBtn))},encapsulation:2})}}return e})();function TR(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"setup-passkey-screen",1),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())}
1)),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("setupPasskeyTitle",e.setupPasskeyTitle)("setupPasskeySubTitle",e.setupPasskeySubTitle)("setupPasskeyBodyText1",e.setupPasskeyBodyText1)("setupPasskeyBodyText2",e.setupPasskeyBodyText2)("createPasskeyBtnTxt",e.createPasskeyBtnTxt)("skipForNow",e.skipForNow)}}function PR(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"passkey-created-screen",2),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("passkeysSuccessTitle",e.passkeysSuccessTitle)("passkeysSuccessSubTitle",e.passkeysSuccessSubTitle)("passkeysSuccessBodyText",e.passkeysSuccessBodyText)("passkeysSuccessButton",e.passkeysSuccessButton)("managePasskeysBtn",e.managePasskeysBtn)}}function ER(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"passkey-error-screen",3),jf("close",(function(){return Wa(e),Ha(Yf().onClose.emit())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("passkeysErrorTitle",e.passkeysErrorTitle)("passkeysErrorSubTitle",e.passkeysErrorSubTitle)("passkeysErrorButton",e.passkeysErrorButton)("startShopping",e.startShopping)}}var DR=(()=>{class e{constructor(e,t){this.aemXfService=e,this.CreatePasskeyService=t,this.onClose=new _l,this.popupNextflow=new _l,this.popupWrapperModalId="#popup-wrapper",this.welcomeHeader="",this.welcomeText="",this.referralImg="",this.referralMobileImg="",this.referralStarImg="",this.pgm="default",this.setupPasskeyTitle="",this.setupPasskeySubTitle="",this.setupPasskeyBodyText1="",this.setupPasskeyBodyText2="",this.createPasskeyBtnTxt="",this.skipForNow="",this.passkeysSuccessTitle="",this.passkeysSuccessSubTitle="",this.passkeysSuccessBodyText="",this.passkeysSuccessButton="",this.managePasskeysBtn="",this.passkeysErrorTitle="",this.passkeysErrorSubTitle="",this.passkeysErrorButton="",this.startShopping=""}ngOnInit(){this.CreatePasskeyService.currentScreen.subscribe((e=>{this.currentScreen=e})),($("#popup-wrapper").data("bs.modal")||{})._isShown||$("#popup-wrapper").modal({show:!0}),this.loadExperienceFragment(),window.AB.COMMON.setPasskeyCookie()}loadExperienceFragment(){this.aemXfService.getExperienceFragmentState().subscribe((e=>{if(e.singnInAemData){let t=e.singnInAemData;this.aemData=t,this.populateComponents()}}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}populateComponents(){this.setupPasskeyTitle=this.aemData.passkeysTitle,this.setupPasskeySubTitle=this.aemData.passkeysSubTitle,this.setupPasskeyBodyText1=this.aemData.passkeysBodyText1,this.setupPasskeyBodyText2=this.aemData.passkeysBodyText2,this.createPasskeyBtnTxt=this.aemData.createPasskey,this.skipForNow=this.aemData.skipForNow,this.passkeysSuccessTitle=this.aemData.passkeysSuccessTitle,this.passkeysSuccessSubTitle=this.aemData.passkeysSuccessSubTitle,this.passkeysSuccessBodyText=this.aemData.passkeysSuccessBodyText,this.passkeysSuccessButton=this.aemData.passkeysSuccessButton,this.managePasskeysBtn=this.aemData.managePasskeysButton,this.passkeysErrorTitle=this.aemData.passkeysErrorTitle,this.passkeysErrorSubTitle=this.aemData.passkeysErrorSubTitle,this.passkeysErrorButton=this.aemData.passkeysErrorButton,this.startShopping=this.aemData.startShopping}ngOnDestroy(){this.CreatePasskeyService.currentScreen.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(jE),$d(SR))}}static{this.ɵcmp=Qr({type:e,selectors:[["create-passkey"]],outputs:{onClose:"onClose",popupNextflow:"popupNextflow"},decls:3,vars:3,consts:[[4,"ngIf"],[3,"close","setupPasskeyTitle","setupPasskeySubTitle","setupPasskeyBodyText1","setupPasskeyBodyText2","createPasskeyBtnTxt","skipForNow"],[3,"close","passkeysSuccessTitle","passkeysSuccessSubTitle","passkeysSuccessBodyText","passkeysSuccessButton","managePasskeysBtn"],[3,"close","passkeysErrorTitle","passkeysErrorSubTitle","passkeysErrorButton","startShopping"]],template:function(e,t){1&e&&ph(0,TR,2,6,"ng-container",0)(1,PR,2,5,"ng-container",0)(2,ER,2,4,"ng-container",0),2&e&&(zh("ngIf","passKeySetupScreen"==t.currentScreen),Vd(),zh("ngIf","passKeyCreatedScreen"==t.currentScreen),Vd(),zh("ngIf","passKeyErrorScreen"==t.currentScreen))},dependencies:[cy,AR,kR,xR],encapsulation:2})}}return e})(),OR=()=>window.AB.COMMON.getCookie("ACI_S_promptMergeAccount")||window.AB.COMMON.getCookie("ACI_S_mergeAccountSuccess"),BR=()=>"true"===window.AB.userInfo?.phonePrompt180||"true"===window.AB.userInfo?.emailPrompt180,MR=()=>{let e=!1;if(window.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableUserPreference&&(window?.ttMETA&&Array.isArray(window.ttMETA)||localStorage?.getItem("abACIP465004"))){let t=window.ttMETA||[],i=localStorage?.getItem("abACIP465004"),n=t.find((e=>e?.CampaignName?.includes("ACIP-465004_W_AB_A&I_Personalized_Onboarding")));(n&&"Experience B"===n?.RecipeName||"b"===i)&&(e=!0)}return e},RR=window.SWY.CONFIGSERVICE.featureToggleConfig.enablePasskey,LR=window.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableSincerelyHealth,FR=window.SWY.CONFIGSERVICE.featureToggleConfig.referralProgramEnabled,NR=window.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableUnityWelcomeModal,UR={storeFulfillment:{ariaLabel:"Store Fulfilment Modal",component:GB},welcome:{ariaLabel:"Welcome Modal",component:LD},progressiveProfile:{ariaLabel:"Progressive Profile Modal",component:hD,class:"sheets prog-prof"},sincerelyHealth:{ariaLabel:"Sincerely Health Modal",component:iM},completeProfileB2B:{ariaLabel:"Complete Profile Modal",component:JB,class:"sheets"},verify180Days:{ariaLabel:"Verify 180 Days Modal",component:cM,class:"sheets"},fulfillmentConflict:{ariaLabel:"Welcome Back! How would you like to continue?",dataId:"fulfillment-conflict-modal",component:UM},mergeAccount:{ariaLabel:"Merge Account Modal",component:qM,class:"sheets"},createPasskeyComponent:{ariaLabel:"Create Passkey Modal",component:DR},userPreference:{ariaLabel:"User Preference Modal",component:HM},preferredStore:{ariaLabel:"Preferred Store Modal",component:XM},UnityAccountInfoComponent:{ariaLabel:"Unity Account Info Modal",component:_R}},VR={fullfillment:{interstitialUrl:{key:"fullfillmentAemData",value:UD},restUrls:[{key:"onboardingFlowAemData",value:VD},...RR?[{key:"singnInAemData",value:qD}]:[]]}
1,preferedStore:{interstitialUrl:{key:"onboardingFlowAemData",value:VD},restUrls:[{key:"fullfillmentAemData",value:UD},...RR?[{key:"singnInAemData",value:qD}]:[]]},completeProfileB2B:{interstitialUrl:{key:"fullfillmentAemData",value:UD},restUrls:[{key:"completeProfileB2b",value:$D}]},signIn:{interstitialUrl:{key:"singnInAemData",value:qD},restUrls:[]},unitySignIn:{interstitialUrl:{key:"fullfillmentAemData",value:UD},restUrls:[{key:"singnInAemData",value:qD}]}},qR=(()=>{class e{constructor(){this.skippedProgessiveProfile=new Tt(!1),this.skippedProgessiveProfile$=this.skippedProgessiveProfile.asObservable(),this.skippedSincerelyHealth=new Tt(!1),this.skippedSincerelyHealth$=this.skippedProgessiveProfile.asObservable()}triggerPopupFlow(e){let t=this.getFlowIdForEvent(e);return this.getComponentsForFlow(t)}getFlowIdForEvent(e){switch(e){case"referrer":default:return"onboarding-flow";case"b2b-onboarding-flow":return"b2b-onboarding-flow";case"sincerely-health-flow":return"sincerely-health-flow";case"verify-180-days-flow":return"verify-180-days-flow";case"social-onboarding-flow":return"social-onboarding-flow";case"social-sincerely-health-flow":return"social-sincerely-health-flow";case"postLogin-flow":return"postLogin-flow";case"preferred-store-flow":return"preferred-store-flow";case"postUnityLogin-flow":return"postUnityLogin-flow";case"noPreference-flow":return"noPreference-flow";case"reload-flow":return"reload-flow"}}getComponentsForFlow(e){let t={"onboarding-flow":{id:"onboarding-flow",components:[UR.storeFulfillment,...FR?[UR.welcome]:[],...MR()?[UR.userPreference]:[],...RR?[UR.createPasskeyComponent]:[]],urls:VR.fullfillment},"sincerely-health-flow":{id:"sincerely-health-flow",components:[UR.storeFulfillment,...FR?[UR.welcome]:[],UR.progressiveProfile,UR.sincerelyHealth,...MR()?[UR.userPreference]:[],...RR?[UR.createPasskeyComponent]:[]],urls:VR.fullfillment},"preferred-store-flow":{id:"preferred-store-flow",components:[UR.preferredStore,...FR?[UR.welcome]:[],...LR?[UR.progressiveProfile]:[],...LR?[UR.sincerelyHealth]:[],...MR()?[UR.userPreference]:[],...RR?[UR.createPasskeyComponent]:[]],optionalComponents:{storeFulfillment:UR.storeFulfillment},urls:VR.preferedStore},"b2b-onboarding-flow":{id:"b2b-onboarding-flow",components:[UR.storeFulfillment,UR.completeProfileB2B],urls:VR.completeProfileB2B},"verify-180-days-flow":{id:"verify-180-days-flow",components:[UR.verify180Days],urls:VR.signIn},"social-onboarding-flow":{id:"social-onboarding-flow",components:[UR.storeFulfillment,...FR?[UR.welcome]:[],...MR()?[UR.userPreference]:[],...RR?[UR.createPasskeyComponent]:[]],urls:VR.fullfillment},"social-sincerely-health-flow":{id:"social-sincerely-health-flow",components:[UR.storeFulfillment,...FR?[UR.welcome]:[],UR.progressiveProfile,UR.sincerelyHealth,...MR()?[UR.userPreference]:[],...RR?[UR.createPasskeyComponent]:[]],urls:VR.fullfillment},"postLogin-flow":{id:"postLogin-flow",components:[UR.fulfillmentConflict,...OR()?[UR.mergeAccount]:[],...BR()?[UR.verify180Days]:[]],urls:VR.signIn},"reload-flow":{id:"reload-flow",components:[UR.fulfillmentConflict],urls:VR.signIn},"noPreference-flow":{id:"noPreference-flow",components:[UR.storeFulfillment,...OR()?[UR.mergeAccount]:[],...BR()?[UR.verify180Days]:[]],urls:VR.unitySignIn},"postUnityLogin-flow":{id:"postUnityLogin-flow",components:[UR.storeFulfillment,...NR?[UR.UnityAccountInfoComponent]:[],...OR()?[UR.mergeAccount]:[],...BR()?[UR.verify180Days]:[]],urls:VR.unitySignIn}}[e];if(!t)throw new Error(`Flow not found: ${e}`);return h({components:t.components,urls:t.urls},t.optionalComponents?{optionalComponents:t.optionalComponents}:{})}setSkippedProgessiveProfile(){this.skippedProgessiveProfile.next(!0)}setSkippedSincerelyHealth(){this.skippedSincerelyHealth.next(!0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),$R=e=>({"input-field--error":e});function jR(e,t){if(1&e&&(Ef(0),kf(1,"div",29)(2,"div",30,1)(4,"div",31)(5,"div",32),Tf(6,"span",33),xf(),kf(7,"div",34)(8,"div",35),am(9),xf()()()()(),Df()),2&e){let e=Yf();Vd(9),cm(" ",e.errorMessage," ")}}function zR(e,t){if(1&e&&(kf(0,"p",36),am(1),xf()),2&e){let e=Yf();Vd(),lm(e.checkboxPromotext)}}function WR(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.emailRequiredErrorMsg)}}function HR(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.emailInvalidErrorMsg)}}function YR(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.phoneRequiredErrorMsg)}}function GR(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.phoneInvalidErrorMsg)}}function KR(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.mobilePatternErrorMsg)}}function QR(e,t){if(1&e&&(kf(0,"div",37)(1,"div",38),Tf(2,"span",39),kf(3,"span",40),am(4,"Error:"),xf()(),ph(5,WR,2,1,"div",41)(6,HR,2,1,"div",41)(7,YR,2,1,"div",41)(8,GR,2,1,"div",41)(9,KR,2,1,"div",41),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.emailRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidEmail),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.phoneRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidPhone),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.mobilePattern)}}function JR(e,t){if(1&e&&(Ef(0),Tf(1,"br"),am(2),Df()),2&e){let e=Yf();Vd(2),cm("",e.checkboxPromotext2," ")}}function ZR(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.buttonText," ")}}function XR(e,t){1&e&&Tf(0,"div",43)}function eL(){return window}
1var tL=(()=>{class e{constructor(e,t,i,n){this.formBuilder=e,this.progProfService=t,this.aemXfService=i,this.popupService=n,this.close=new _l,this.onPopupNextflow=new _l,this.flowType="",this.landingPageTitle="",this.usernameFieldLabel="",this.bodyText="",this.buttonText="",this.doThisLaterButtonLabel="",this.checkboxLabel="",this.checkboxPromotext="",this.checkboxPromotext2="",this.checkboxInfotext="",this.placeholderText="",this.loading=!1,this.errorPopup=!1,this.emailRequiredErrorMsg="Please enter your email address",this.phoneRequiredErrorMsg="Please enter your mobile phone number",this.emailInvalidErrorMsg="Please enter a valid email address",this.phoneInvalidErrorMsg="Please enter a mobile phone number that contains 10 digits",this.mobilePatternErrorMsg="Please enter a mobile phone number that doesn't start with a 0 or 1.",this.isUsernameEmpty=!1,this.checkboxValue=!1,this.enterUsernameForm=this.formBuilder.group({username:["",[this.validateUsername()]]})}ngOnInit(){let e=this.enterUsernameForm.controls.username;"false"===window.AB.userInfo.phoneVerified?(this.checkboxValue=!1,this.flowType="phone",e.errors&&(this.enterUsernameForm.controls.username.errors.phoneRequired=!0)):"false"===window.AB.userInfo.emailVerified&&(this.flowType="email",this.checkboxValue=!0,this.placeholderText="Email",e.errors&&(this.enterUsernameForm.controls.username.errors.emailRequired=!0)),this.loadExperienceFragment(this.flowType)}ngAfterViewInit(){this.analyticsEvents("modalView",`account-${eL().digitalData?.crossPageData?.acip371626Social?.data?"social-":""}verify-${this.flowType}-points|view`);let e=document.querySelector("#progressiveModalCloseBtn");e&&e.focus();let t=this.enterUsernameForm.controls.username;"email"==this.flowType?(this.isUsernameEmpty=!window.AB.userInfo.profileEmail,t.setValue(window.AB.userInfo.profileEmail)):(t.setValue(window.AB.userInfo.profilePhone),this.isUsernameEmpty=!window.AB.userInfo.profilePhone)}loadExperienceFragment(e){let t=`${window.location.origin}/content/experience-fragments/www/account/b2c/onboarding/master/jcr:content/root/responsivegrid/progressive_profile_.model.json`;this.aemXfService.getExperienceFragment(t).subscribe((t=>{"email"==e?(this.landingPageTitle=t.landingScreenTitle,this.bodyText=t.emailBodyText,this.usernameFieldLabel=t.emailFieldLabel,this.checkboxLabel=t.emailCheckboxLabel,this.checkboxPromotext=t.emailCheckboxPromotext,this.checkboxInfotext=t.emailCheckboxInfotext,this.placeholderText="Email"):"phone"==e&&(this.landingPageTitle=t.landingScreenTitlePhone,this.bodyText=t.bodyText,this.usernameFieldLabel=t.phoneFieldLabel,this.checkboxLabel=t.phoneCheckboxLabel,this.checkboxPromotext=t.phoneCheckboxPromotext,this.checkboxPromotext2=t.emailCheckboxPromotext,this.checkboxInfotext=t.phoneCheckboxInfotext,this.placeholderText="Primary phone number (mobile)"),this.buttonText=t.buttonText,this.doThisLaterButtonLabel=t.doThisLaterButtonLabel,this.errorMessage=t.technicalError,this.technicalErrorMsg=t.technicalError}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}get usernameForm(){return this.enterUsernameForm.controls}validateUsername(){let e=this,t=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=new RegExp("^[0-9]+$");return n=>{let r={emailRequired:!1,invalidEmail:!1,phoneRequired:!1,mobilePattern:!1,invalidPhone:!1};if("email"==e.flowType){if(0==n.value.length)return r.emailRequired=!0,r;if(!t.test(n.value))return r.invalidEmail=!0,r}else if("phone"==e.flowType){if(0==n.value.length)return r.phoneRequired=!0,r;if("0"===n.value.charAt(0)||"1"===n.value.charAt(0))return r.mobilePattern=!0,r;if(10!==n.value.length)return r.invalidPhone=!0,r;if(!i.test(n.value))return r.invalidPhone=!0,r}}}onCheckboxChange(){this.checkboxValue=!this.checkboxValue}submitUsername(e){this.analyticsEvents("crossPageData","acip371626Checkbox",`${this.checkboxValue}`),this.submitUsernameOTP(e)}submitUsernameOTP(e){this.resetErrorMessage(),this.loading=!0;let t=e.username;this.progProfService.enteredUsername=t;let i,n,r=window.AB.userInfo.UUID;"email"==this.flowType?(i="email",n=JSON.stringify({email:t})):(i="sms",n=JSON.stringify({phoneNumber:t}));let s=this.progProfService.csmsEndpoint+"/customers/"+r+"/factors/"+i+"/verify",a=new jy(this.progProfService.getVerifyHeaders()),o=this;this.progProfService.sendPostRequest(s,n,a).subscribe((e=>{e&&e.body&&e.body.factors&&e.body.factors[0]&&(o.progProfService.otpData.factorId=e.body.factors[0].id,o.progProfService.otpData.factorType=e.body.factors[0].factorType),o.progProfService.currentScreen.next("verify"),o.loading=!1,o.progProfService.verificationCodeTimer(),o.progProfService.otpData.userPreference=[{channel:"email"===o.flowType?"Email":"SMS",value:o.checkboxValue?"A":"D",type:"GLOBAL"}]}),(e=>{e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message?o.errorMessage=e.error?.errors[0]?.message:o.errorMessage=o.technicalErrorMsg,o.errorPopup=!0,this.loading=!1}))}clearUsernameForm(){let e=this.usernameForm.username;e.setErrors(null),e.markAsPristine(),e.markAsUntouched(),e.setValue("")}resetErrorMessage(){this.errorPopup=!1,this.errorMessage=""}onKeyPress(e){"Space"===e.code&&e.target.click()}skipProgessiveProfile(){this.analyticsEvents("modalClick",`account-${eL().digitalData?.crossPageData?.acip371626Social?.data?"social-":""}verify-${this.flowType}-points|do-this-later`),this.popupService.setSkippedProgessiveProfile(),this.onPopupNextflow.emit()}analyticsEvents(e,t,i){eL().AB?.DATALAYER&&eL().AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t,modalMessage:i})}onPhoneInput(e){let t=e.target.value.replace(/\D/g,"");this.enterUsernameForm.get("username")?.setValue(t)}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E),$d(jE),$d(qR))}}static{this.ɵcmp=Qr({type:e,selectors:[["landing-screen-sincerely-health"]],outputs:{close:"close",onPopupNextflow:"onPopupNextflow"},decls:39,vars:23,consts:[["showLoading",""],["landingErrorId",""],[1,"referral-card"],[1,"referral-card-body","text-center","verify-modal__body"],[1,"body-text","referral-card__subtitle","mx-0"],[4,"ngIf"],[1,"referral-card__sub-text","body-text"],["data-focus","false","role","form","data-toggle","validator",1,"signin-otp","default-styles__content","verify-modal__form",3,"ngSubmit","formGroup"],[1,"input-field","mb-0"],[1,"input-field__wrapper",3,"ngClass"],["for","ppUsername",1,"input-field__float-label"],["type","text","id","ppUsername","placeholder"," ","formControlName","username","required","required",3,"input","readonly"],["class","input-field__help-text body-text-xs mb-0","id","phone-info-text",4,"ngIf"],["class","input-field__help-text body-text-xs","id","error-username","role","alert","aria-live","polite",4,"ngIf"],[1,"checkbox","create-acct__promo","verify-modal__checkbox-container"],["for","legalText",1,"checkbox__group"],[1,"checkbox__label","promo-checkbox-label","verify-modal__checkbox-label"],["type","checkbox","id","legalText","aria-describedby","promoText3",1,"checkbox__input",3,"change","checked"],[1,"checkbox__checkmark","verify-modal__progressive-profile-checkbox"],[1,"svg-checkmark"],["id","promoText3",1,"create-acct__promo__text","verify-modal__checkbox-label","verify-modal__legal-text"],["id","learnMoreParent","data-toggle","collapse","data-target","#learnMore","aria-expanded","fal
1se","href","javascript:void(0);","role","button","tabindex","0",1,"create-acct__promo__caret","create-acct__promo__link",3,"keypress"],[1,"svg-caret-expand-pp"],[1,"svg-caret-collapse-pp"],["id","learnMore","data-parent","#learnMoreParent",1,"collapse","create-acct__promo__text","verify-modal__checkbox-label","verify-modal__legal-text"],[1,"prog-prof__btn-container","verify-modal__btn-container"],["type","submit",1,"btn","btn-lg","prog-prof__btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["href","javascript:void(0);","data-dismiss","modal","data-tabindex","last","role","button",1,"link-reg","enter-otp__link","mt-24",3,"keypress","click"],[1,"d-flex","justify-content-center"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","phone-info-text",1,"input-field__help-text","body-text-xs","mb-0"],["id","error-username","role","alert","aria-live","polite",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],[1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"div",3)(2,"h1",4),am(3),xf(),ph(4,jR,10,1,"ng-container",5),kf(5,"div",6),am(6),xf(),kf(7,"form",7),jf("ngSubmit",(function(){return Wa(e),Ha(t.submitUsername(t.enterUsernameForm.value))})),kf(8,"div",8)(9,"div",9)(10,"label",10)(11,"input",11),jf("input",(function(i){return Wa(e),Ha("phone"==t.flowType&&t.onPhoneInput(i))})),xf(),kf(12,"span"),am(13),xf()(),ph(14,zR,2,1,"p",12),xf()(),ph(15,QR,10,5,"div",13),kf(16,"div",14)(17,"label",15)(18,"span",16),am(19),xf(),kf(20,"input",17),jf("change",(function(){return Wa(e),Ha(t.onCheckboxChange())})),xf(),kf(21,"span",18),Tf(22,"span",19),xf()(),kf(23,"div",20),am(24),ph(25,JR,3,1,"ng-container",5),kf(26,"a",21),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))})),am(27,"Learn more "),Tf(28,"span",22)(29,"span",23),xf()(),kf(30,"div",24),am(31),xf()(),kf(32,"div",25)(33,"button",26),ph(34,ZR,2,1,"ng-container",27)(35,XR,1,0,"ng-template",null,0,Wm),xf(),kf(37,"a",28),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProgessiveProfile())})),am(38),xf()()()()()}if(2&e){let e=sm(36);Vd(3),cm(" ",t.landingPageTitle," "),Vd(),zh("ngIf",t.errorPopup),Vd(2),lm(t.bodyText),Vd(),zh("formGroup",t.enterUsernameForm),Vd(2),zh("ngClass",Om(21,$R,t.usernameForm.username.invalid&&t.usernameForm.username.touched)),Vd(2),Kh(t.isUsernameEmpty?null:"verify-modal__read-only"),zh("readonly",!t.isUsernameEmpty),Vd(2),lm(t.placeholderText),Vd(),zh("ngIf","phone"==t.flowType),Vd(),zh("ngIf",t.usernameForm.username.errors&&t.usernameForm.username.touched),Vd(4),lm(t.checkboxLabel),Vd(),zh("checked",t.checkboxValue),gh("aria-checked",t.checkboxValue),Vd(4),cm("",t.checkboxPromotext," "),Vd(),zh("ngIf","phone"==t.flowType),Vd(6),cm(" ",t.checkboxInfotext," "),Vd(2),zh("disabled",t.isUsernameEmpty&&!(t.enterUsernameForm.valid&&t.enterUsernameForm.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(4),cm(" ",t.doThisLaterButtonLabel," ")}},dependencies:[sy,cy,DS,d_,$_,j_,nC,US,qS],encapsulation:2})}}return e})(),iL=["enterOTPError"],nL=["resendCodeSuccessPopup"],rL=e=>({"enter-otp__link--disabled":e});function sL(e,t){if(1&e&&(Ef(0),kf(1,"div",22,1)(3,"div",23)(4,"div",24),Tf(5,"span",25),xf(),kf(6,"div",26)(7,"div",27),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function aL(e,t){if(1&e&&(Ef(0),kf(1,"div",28,2)(3,"div",23)(4,"div",24),Tf(5,"span",29),xf(),kf(6,"div",26)(7,"div",27),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.resendCodeSuccessMsg," ")}}function oL(e,t){if(1&e&&(kf(0,"div",35),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.requiredOTPError)}}function lL(e,t){if(1&e&&(kf(0,"div",35),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.minlengthdOTPError)}}function cL(e,t){if(1&e&&(kf(0,"div",35),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.incorrectOTPError)}}function dL(e,t){if(1&e&&(kf(0,"div",30)(1,"div",31),Tf(2,"span",32),kf(3,"span",33),am(4,"Error:"),xf()(),ph(5,oL,2,1,"div",34)(6,lL,2,1,"div",34)(7,cL,2,1,"div",34),xf(
1)),2&e){let e=Yf();Vd(5),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.required),Vd(),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.minlength),Vd(),zh("ngIf",e.inlineAPIError)}}function uL(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.buttonText," ")}}function pL(e,t){1&e&&Tf(0,"div",36)}function hL(){return window}var fL=(()=>{class e{constructor(e,t){this.formBuilder=e,this.progProfService=t,this.onPopupNextflow=new _l,this.loading=!1,this.formattedUsername=this.progProfService.enteredUsername,this.analyticsFlow="",this.errorPopup=!1,this.errorMsg="",this.resendCodeSuccess=!1,this.resendCodeDisabled=!1,this.timerResendCodeDisabled=!1,this.inlineAPIError=!1,this.analyticsResendCode=!1,this.submitOTP=this.formBuilder.group({otpCode:["",[g_.required,g_.minLength(6),g_.maxLength(6)]]})}ngOnInit(){this.disableResendCodeLink(),"sms"==this.progProfService.otpData.factorType?(this.formattedUsername=this.progProfService.formatPhoneNumber(this.progProfService.enteredUsername),this.formattedVerifyAcctTitle=this.aemData?.verifyPhoneTitle,this.formattedChangeBtnAriaLabel="change your phone number",this.analyticsFlow="phone"):(this.formattedUsername=this.progProfService.enteredUsername,this.formattedVerifyAcctTitle=this.aemData?.verifyEmailTitle,this.formattedChangeBtnAriaLabel="change your email address",this.analyticsFlow="email"),this.resendCodeSuccessMsg=this.aemData?.resendCodeSuccess,this.subTitle=this.aemData?.verifyPhoneSubTitle,this.resendInfoMsg="Please wait 30 seconds before requesting another verification code.",this.buttonText="Continue",this.resendCodeLabel=this.aemData?.resendCode,this.changeLabel=this.aemData?.changeLabel,this.incorrectOTPError=this.aemData?.incorrectOTPError,this.technicalError=this.aemData?.technicalError,this.requiredOTPError="Please enter a verification code.",this.minlengthdOTPError="Please enter a verification code that contains 6 digits.",this.resendCodeErrorMsg=this.aemData?.resendCodeError,this.analyticsEvents("modalView",`account-verify-otp-${this.analyticsFlow}-points|view`,null,!0)}get form(){return this.submitOTP.controls}ngAfterViewInit(){let e=document.querySelector("#progressiveModalCloseBtn");e&&e.focus()}disableResendCodeLink(){let e=this;this.resendCodeDisabled=!0,setTimeout((function(){e.resendCodeDisabled=!1}),3e4)}verifyUsername(e){this.analyticsEvents("modalClick",`account-verify-otp-${this.analyticsFlow}-points|continue${1==hL().digitalData?.crossPageData?.acip371626Checkbox?.data?"-with-offers":""}`),this.loading=!0,this.clearErrors();let t=this,i=window.AB.userInfo.UUID,n=JSON.stringify({passCode:e.otpCode,preferences:this.progProfService.otpData.userPreference}),r=this.progProfService.otpData.factorId,s=this.progProfService.csmsEndpoint+"/customers/"+i+"/factors/"+r+"/lifecycle/activate",a=this.progProfService.getVerifyHeaders();a["x-abs-user-exp-journey"]="Identity-Profile";let o=new jy(a);this.progProfService.sendPostRequest(s,n,o).subscribe((e=>{this.analyticsEvents("crossPageData","acip371626Verified",this.analyticsFlow),e&&e.body&&e.body.profile&&(t.progProfService.otpData.successEmail=e.body.profile.email,t.progProfService.otpData.successPhone=e.body.profile.primaryPhone),sessionStorage.getItem("profileCompletionData")&&sessionStorage.removeItem("profileCompletionData"),this.isPopupWrapperView?this.onPopupNextflow.emit():t.progProfService.currentScreen.next("success"),t.loading=!1}),(e=>{if(e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message){let i=e.error?.errors[0]?.code;t.errorMsg="CSMS0213"==i||"CSMS0120"==i?t.incorrectOTPError:t.technicalError}t.errorPopup=!0,this.loading=!1}))}analyzeResendCodeData(e){let t=this;if(t.clearErrors(),t.disableResendCodeLink(),"success"==e.status){t.progProfService.verificationCodeTimer();let i=e.response.body;t.progProfService.otpData.stateToken=i.stateToken,t.progProfService.otpData.expiresAt=i.expiresAt,t.resendCodeSuccess=!0,setTimeout((function(){t.resendCodeSuccess=!1}),8e3),setTimeout((()=>{t.resendCodeSuccessPopup&&t.resendCodeSuccessPopup.nativeElement.focus()}),0)}else if("error"==e.status){let i="",n=e.response.error;n.errors&&n.errors[0]&&n.errors[0].errorCode?(i=n.errors[0].errorCode,"CSMS0139"==i&&(t.errorMsg="Please wait 30 seconds before trying to resend another code.")):t.errorMsg=t.resendCodeErrorMsg,t.errorPopup=!0,setTimeout((function(){t.clearErrors()}),8e3),setTimeout((()=>{t.otpError&&t.otpError.nativeElement.focus()}),0)}}keyPressNumbers(e){var t=e.which?e.which:e.keyCode;return!(t<48||t>57)||(e.preventDefault(),!1)}
1onFocus(){this.inlineAPIError&&(this.inlineAPIError=!1)}clearErrors(){this.resendCodeSuccess=!1,this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1}clearSubmitOTPForm(){this.submitOTP.controls.otpCode.setErrors(null),this.submitOTP.controls.otpCode.markAsPristine(),this.submitOTP.controls.otpCode.markAsUntouched(),this.submitOTP.controls.otpCode.setValue("")}onKeyPress(e){"Space"===e.code&&e.target.click()}changeAccount(){this.clearErrors(),this.clearSubmitOTPForm(),Object.keys(this.progProfService.otpData).forEach((e=>delete this.progProfService.otpData[e])),this.progProfService.currentScreen.next("landing")}resendCode(){let e=this,t=window.AB.userInfo.UUID,i=this.progProfService.otpData.factorId,n=this.progProfService.csmsEndpoint+"/customers/"+t+"/factors/"+i+"/resend",r=new jy(this.progProfService.getVerifyHeaders());this.progProfService.sendPostRequest(n,{},r).subscribe((t=>{e.analyzeResendCodeData({status:"success",response:t})}),(t=>{e.analyzeResendCodeData({status:"error",response:t})}))}analyticsEvents(e,t,i,n){hL().AB?.DATALAYER&&hL().AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t,modalMessage:i,oncePerPageView:n})}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E))}}static{this.ɵcmp=Qr({type:e,selectors:[["verify-screen-sincerely-health"]],viewQuery:function(e,t){if(1&e&&(tm(iL,5),tm(nL,5)),2&e){let e;im(e=nm())&&(t.otpError=e.first),im(e=nm())&&(t.resendCodeSuccessPopup=e.first)}},inputs:{aemData:"aemData",isPopupWrapperView:"isPopupWrapperView"},outputs:{onPopupNextflow:"onPopupNextflow"},decls:28,vars:19,consts:[["showLoading",""],["enterOTPError",""],["resendCodeSuccessPopup",""],[1,"referral-card"],[1,"referral-card-body","text-center","verify-modal__body"],[1,"d-flex","w-100","justify-content-center","align-items-center"],[1,"body-text","referral-card__subtitle","mx-0"],["src","/etc/designs/wcax-commons/images/icons/blue-glyphs.svg","alt","",1,"verify-modal__glyphs-img"],[4,"ngIf"],[1,"body-text","enter-otp__subtitle"],[1,"title-xs"],[1,"signin-otp","default-styles__content","verify-modal__form",3,"ngSubmit","formGroup"],[1,"input-field"],[1,"input-field__wrapper"],[1,"input-field__nonfloat-label"],["type","text","placeholder","------","maxlength","6","size","6","min","6","max","6","formControlName","otpCode","aria-describedby","error-otp","required","required","aria-label","Enter the six-digit verification code",1,"input-field__otp-code",3,"keypress","focus"],["class","input-field__help-text body-text-xs","id","error-otp","role","alert","aria-live","polite",4,"ngIf"],["href","javascript:void(0);","role","button","name","resend-code","id","resend-code","tabindex","0",1,"link-reg","create-acct__link",3,"click","keypress","ngClass"],[1,"body-text-xs","mt-3"],[1,"prog-prof__btn-container","verify-modal__btn-container"],["data-tabindex","last",1,"btn","btn-lg","prog-prof__btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-success","alert","fade","show"],[1,"svg-icon","svg-success-outline"],["id","error-otp","role","alert","aria-live","polite",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],[1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4)(2,"div",5)(3,"h1",6),am(4),xf(),Tf(5,"img",7),xf(),ph(6,sL,9,1,"ng-container",8)(7,aL,9,1,"ng-container",8),kf(8,"div",9),am(9),xf(),kf(10,"div")(11,"p",10),am(12),xf()(),kf(13,"form",11),jf("ngSubmit",(function(){return Wa(e),Ha(t.verifyUsername(t.submitOTP.value))})),kf(14,"div",12)(15,"div",13)(16,"div",14)(17,"input",15),jf("keypress",(function(i){return Wa(e),Ha(t.keyPressNumbers(i))}))("focus",(function(){return Wa(e),Ha(t.onFocus())})),xf()()(),ph(18,dL,8,3,"div",16),xf(),kf(19,"a",17),jf("click",(function(){return Wa(e),Ha(t.resendCode())}))("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))})),am(20),xf(),kf(21,"div",18),am(22),xf(),kf(23,"div",19)(24,"button",20),ph(25,uL,2,1,"ng-container",21)(26,pL,1,0,"ng-template",null,0,Wm),xf()()()()()}if(2&e){let e=sm(27);Vd(4),cm(" ",t.formattedVerifyAcctTitle," "),Vd(2),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.resendCodeSuccess),Vd(2),cm(" ",t.subTitle," "),Vd(3),lm(t.formattedUsername),Vd(),zh("formGroup",t.submitOTP),Vd(4),gh("data-tabindex",t.submitOTP.valid&&t.submitOTP.dirty||!t.resendCodeDisabled?null:"last"),Vd(),zh("ngIf",(t.form.otpCode.errors||t.inlineAPIError)&&t.form.otpCode.touched),Vd(),zh("ngClass",Om(17,rL,1==t.resendCodeDisabled)),gh("disabled",1==t.resendCodeDisabled?"disabled":null)("aria-disabled",1==t.resendCodeDisabled&&"true")("data-tabindex",t.submitOTP.valid&&t.submitOTP.dirty?null:"last"),Vd(),lm(t.resendCodeLabel),Vd(2),cm(" ",t.resendInfoMsg," "),Vd(2),zh("disabled",!(t.submitOTP.valid&&t.submitOTP.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",e)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,sC,US,qS],encapsulation:2})}}return e})();function mL(){return window}
1var gL=(()=>{class e{constructor(e,t){this.progProfService=e,this.formBuilder=t,this.updateUserPreference=new _l,this.isExpanded=!1,this.savePreference=!0,this.isCollapsed=!0}ngOnInit(){this.progProfService.flowType.subscribe((e=>{this.flowType=e,"phone"==e?(this.phoneNumber=this.progProfService.formatPhoneNumber(this.progProfService.enteredUsername),this.emailAddress=mL().AB.userInfo.profileEmail,this.checkboxLabel=this.phoneCheckboxLabel,this.legalHeader=this.phoneLegalHeader,this.legalText=this.phoneLegalText,this.isExpanded=!0,this.savePreference=!1,this.successBodyText=this.successBodyText.replace("{number/email}","number"),mL().AB.DATALAYER&&mL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:"rewards-linked-via-email",topNav:"cta:email-save"})):"email"==e&&(this.phoneNumber=this.progProfService.formatPhoneNumber(mL().AB.userInfo.profilePhone),this.emailAddress=this.progProfService.enteredUsername,this.checkboxLabel=this.emailCheckboxLabel,this.legalHeader=this.emailLegalHeader,this.legalText=this.emailLegalText,this.successBodyText=this.successBodyText.replace("{number/email}","email"),mL().AB.DATALAYER&&mL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:"rewards-linked-via-mobile",topNav:"cta:mobile-save"}))}))}closeButton(){if((this.savePreference&&"phone"==this.flowType||!this.savePreference&&"email"==this.flowType)&&this.progProfService.updateCommunicationPreferences(this.flowType),this.progProfService.currentScreen.next("landing"),this.progProfService.hideModal(),mL().AB.DATALAYER){let e="phone"===this.flowType?"mobile":"email",t="";if(this.savePreference){t="phone"===this.flowType?"-mopt-in":"-eopt-in";let e={emailOptIn:"email"===this.flowType,smsOptIn:"phone"===this.flowType};localStorage.setItem("analyticsEmailAndSmsOptIn",JSON.stringify(e)),mL().AB.DATALAYER.initEmailAndSmsOptIn()}mL().AB.DATALAYER.progressiveProfilingTracking({topNav:`cta:happy-path-rewards-linked-${e}-flow-close${t}`})}}toggleCheckbox(e){this.savePreference=e,this.updateUserPreference.emit(e)}toggleExpanded(){this.isCollapsed=!this.isCollapsed}static{this.ɵfac=function(t){return new(t||e)($d($E),$d(dC))}}static{this.ɵcmp=Qr({type:e,selectors:[["success-screen"]],inputs:{successScreenTitle:"successScreenTitle",successScreenImage:"successScreenImage",successBodyText:"successBodyText",successBtnText:"successBtnText",emailCheckboxLabel:"emailCheckboxLabel",emailLegalHeader:"emailLegalHeader",emailLegalText:"emailLegalText",phoneCheckboxLabel:"phoneCheckboxLabel",phoneLegalHeader:"phoneLegalHeader",phoneLegalText:"phoneLegalText"},outputs:{updateUserPreference:"updateUserPreference"},decls:28,vars:15,consts:[["subscribe",""],["alt","",1,"prog-prof__top-icon",3,"src"],["id","profileModalTitle",1,"prog-prof__title"],[1,"prog-prof__acct-info"],[1,"body-text","mb-24","prog-prof__body",3,"innerHTML"],[1,"checkbox","prog-prof__legal"],["for","subscribe",1,"checkbox__group"],[1,"checkbox__label","checkbox__label--sm"],["id","subscribe","type","checkbox",1,"checkbox__input",3,"change","checked"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],[1,"prog-prof__legal__text"],["role","button","id","learnMoreParent","data-toggle","collapse","data-target","#learnMore","href","javascript:void(0);",1,"prog-prof__legal__caret","prog-prof__legal__link",3,"click"],[1,"svg-caret-expand-pp"],[1,"svg-caret-collapse-pp"],["id","learnMore","data-parent","#learnMoreParent",1,"prog-prof__legal__text",3,"ngClass"],["data-dismiss","modal","data-tabindex","last",1,"btn","btn--size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"]],template:function(e,t){if(1&e){let e=Mf();Tf(0,"img",1),kf(1,"h1",2),am(2),xf(),kf(3,"div",3)(4,"div"),am(5),xf(),kf(6,"div"),am(7),xf()(),Tf(8,"div",4),kf(9,"div",5)(10,"label",6)(11,"span",7),am(12),xf(),kf(13,"input",8,0),jf("change",(function(){Wa(e);let i=sm(14);return Ha(t.toggleCheckbox(i.checked))})),xf(),kf(15,"span",9),Tf(16,"span",10),xf()(),kf(17,"div",11),am(18),kf(19,"a",12),jf("click",(function(){return Wa(e),Ha(t.toggleExpanded())})),am(20,"Learn more "),Tf(21,"span",13)(22,"span",14),xf()(),kf(23,"div",15),am(24),xf(
1)(),kf(25,"div")(26,"button",16),jf("click",(function(){return Wa(e),Ha(t.closeButton())})),am(27),xf()()}2&e&&(Jf("src",t.successScreenImage,id),Vd(2),cm(" ",t.successScreenTitle,"\n"),Vd(3),cm("Email: ",t.emailAddress,""),Vd(2),cm("Primary phone number: ",t.phoneNumber,""),Vd(),zh("innerHTML",t.successBodyText,ed),Vd(2),gh("aria-label",t.checkboxLabel),Vd(2),lm(t.checkboxLabel),Vd(),zh("checked",t.savePreference),gh("aria-checked",t.savePreference),Vd(5),cm(" ",t.legalHeader," "),Vd(),gh("aria-expanded",!t.isCollapsed),Vd(4),zh("ngClass","phone"==t.flowType?"collapse show":"collapse"),Vd(),cm(" ",t.legalText," "),Vd(2),gh("aria-label",t.successBtnText),Vd(),lm(t.successBtnText))},dependencies:[sy],encapsulation:2})}}return e})(),bL=["enterOTPError"],yL=["resendCodeSuccessPopup"],vL=e=>({"input-field--error":e}),wL=e=>({"enter-otp__link--disabled":e});function _L(e,t){if(1&e&&(Ef(0),kf(1,"div",24,2)(3,"div",25)(4,"div",26),Tf(5,"span",27),xf(),kf(6,"div",28)(7,"div",29),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function SL(e,t){if(1&e&&(Ef(0),kf(1,"div",30,3)(3,"div",25)(4,"div",26),Tf(5,"span",31),xf(),kf(6,"div",28)(7,"div",29),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.resendCodeSuccessMsg," ")}}function CL(e,t){if(1&e&&(Ef(0),kf(1,"p",32),am(2),xf(),kf(3,"div",33),am(4),xf(),Df()),2&e){let e=Yf();Vd(2),cm("Verification code expires in ",e.formattedRemainingTime,""),Vd(2),lm(e.timerADAUpdate)}}function IL(e,t){if(1&e){let e=Mf();kf(0,"div",34)(1,"span",35),am(2,"Verification code expired. "),xf(),kf(3,"button",36),jf("click",(function(){return Wa(e),Ha(Yf().resendCodeThroughTimer())})),am(4),xf()()}if(2&e){let e=Yf();Vd(3),zh("ngClass",Om(4,wL,1==e.timerResendCodeDisabled)),gh("disabled",1==e.timerResendCodeDisabled?"disabled":null)("aria-disabled",1==e.timerResendCodeDisabled&&"true"),Vd(),lm(e.resendCodeLabel)}}function AL(e,t){1&e&&(kf(0,"div",41),am(1,"Please enter a verification code."),xf())}function kL(e,t){1&e&&(kf(0,"div",41),am(1,"Please enter a verification code that contains 6 digits."),xf())}function xL(e,t){if(1&e&&(kf(0,"div",41),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.incorrectOTPError)}}function TL(e,t){if(1&e&&(kf(0,"div",37)(1,"div",38),Tf(2,"span",39),xf(),ph(3,AL,2,0,"div",40)(4,kL,2,0,"div",40)(5,xL,2,1,"div",40),xf()),2&e){let e=Yf();Vd(3),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.required),Vd(),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.minlength),Vd(),zh("ngIf",e.inlineAPIError)}}function PL(e,t){1&e&&(kf(0,"div",42),am(1,"Please wait 30 seconds before requesting another verification code. "),xf())}function EL(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.verifyBtnLabel," ")}}function DL(e,t){1&e&&Tf(0,"div",43)}function OL(){return window}var BL=(()=>{class e{constructor(e,t){this.formBuilder=e,this.progProfService=t,this.loading=!1,this.formattedUsername=this.progProfService.enteredUsername,this.errorPopup=!1,this.errorMsg="",this.resendCodeSuccess=!1,this.resendCodeDisabled=!1,this.timerResendCodeDisabled=!1,this.inlineAPIError=!1,this.analyticsResendCode=!1,this.analyticsFlow="",this.submitOTP=this.formBuilder.group({otpCode:["",[g_.required,g_.minLength(6),g_.maxLength(6)]]})}ngOnInit(){this.disableResendCodeLink(),"sms"==this.progProfService.otpData.factorType?(this.analyticsFlow="mobile",this.formattedUsername=this.progProfService.formatPhoneNumber(this.progProfService.enteredUsername),this.formattedVerifyAcctTitle="Did you get our text?"):(this.analyticsFlow="email",this.formattedUsername=this.progProfService.enteredUsername,this.formattedVerifyAcctTitle="Did you get our email?"),OL().AB?.DATALAYER&&OL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`${this.analyticsFlow}-otp`}),this.progProfService.timerValue.subscribe((e=>{this.remainingTime=e;let t=Math.floor(e/60),i=e%60;this.formattedRemainingTime=`${t} minutes ${i} seconds`,(30==i||0==i)&&(this.timerADAUpdate="Verification code expires in "+this.formattedRemainingTime)}))}ngAfterViewInit(){}get form(){return this.submitOTP.controls}disableResendCodeLink(){let e=this;this.resendCodeDisabled=!0,setTimeout((function(){e.resendCodeDisabled=!1}),3e4)}resendCodeThroughTimer(){let e=this;this.timerResendCodeDisabled=!0,setTimeout((function(){e.timerResendCodeDisabled=!1}),1e4),this.resendCode()}verifyUsername(e){this.loading=!0,this.clearErrors();let t,i=this,n=window.AB.userInfo.UUID;t="sms"==this.progProfService.otpData.factorType?JSON.stringify({passCode:e.otpCode,preferences:[{channel:"SMS",value:"A",type:"GLOBAL"}]}):JSON.stringify({passCode:e.otpCode,preferences:[{channel:"EMAIL",value:"A",type:"GLOBAL"}]});let r=this.progProfService.otpData.factorId,s=this.progProfService.csmsEndpoint+"/customers/"+n+"/factors/"+r+"/lifecycle/activate",a=this.progProfService.getVerifyHeaders();a["x-abs-user-exp-journey"]="Identity-Profile";let o=new jy(a);this.progProfService.sendPostRequest(s,t,o).subscribe((e=>{e&&e.body&&e.body.profile&&(i.progProfService.otpData.successEmail=e.body.profile.email,i.progProfService.otpData.successPhone=e.body.profile.primaryPhone),OL().AB?.DATALAYER&&OL().AB.DATALAYER.analyticsCTATracking(`cta:${this.analyticsFlow}-verify`),sessionStorage.getItem("profileCompletionData")&&sessionStorage.removeItem("profileCompletionData"),i.progProfService.currentScreen.next("success"),i.loading=!1}),(e=>{if(e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message){let t=e.error?.errors[0]?.code;i.errorMsg="CSMS0213"==t||"CSMS0120"==t?i.incorrectOTPError:i.technicalError}i.errorPopup=!0,this.loading=!1}))}analyzeResendCodeData(e){let t=this;if(t.clearErrors(),t.disableResendCodeLink(),"success"==e.status){t.progProfService.verificationCodeTimer();let i=e.response.body;t.progProfService.otpData.stateToken=i.stateToken,t.progProfService.otpData.expiresAt=i.expiresAt,t.resendCodeSuccess=!0,setTimeout((function(){t.resendCodeSuccess=!1}),8e3),setTimeout((()=>{t.resendCodeSuccessPopup&&t.resendCodeSuccessPopup.nativeElement.focus()}),0)}else if("error"==e.status){let i="",n=e.response.error;n.errors&&n.errors[0]&&n.errors[0].errorCode?(i=n.errors[0].errorCode,"CSMS0139"==i&&(t.errorMsg="Please wait 30 seconds before trying to resend another code.")):t.errorMsg=t.resendCodeErrorMsg,t.errorPopup=!0,setTimeout((function(){t.clearErrors()}),8e3),setTimeout((()=>{t.otpError&&t.otpError.nativeElement.focus()}),0)}}keyPressNumbers(e){var t=e.which?e.which:e.keyCode;return!(t<48||t>57)||(e.preventDefault(),!1)}
1onFocus(){this.inlineAPIError&&(this.inlineAPIError=!1)}clearErrors(){this.resendCodeSuccess=!1,this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1}clearSubmitOTPForm(){this.submitOTP.controls.otpCode.setErrors(null),this.submitOTP.controls.otpCode.markAsPristine(),this.submitOTP.controls.otpCode.markAsUntouched(),this.submitOTP.controls.otpCode.setValue("")}changeAccount(){this.clearErrors(),this.clearSubmitOTPForm(),Object.keys(this.progProfService.otpData).forEach((e=>delete this.progProfService.otpData[e])),OL().AB?.DATALAYER&&OL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`enter-${this.analyticsFlow}`,topNav:`cta:${this.analyticsFlow}-change`}),this.progProfService.currentScreen.next("landing")}resendCode(){let e=this;OL().AB?.DATALAYER&&OL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`${this.analyticsFlow}-otp`,topNav:`cta:${this.analyticsFlow}-resend-code`});let t=window.AB.userInfo.UUID,i=this.progProfService.otpData.factorId,n=this.progProfService.csmsEndpoint+"/customers/"+t+"/factors/"+i+"/resend",r=new jy(this.progProfService.getVerifyHeaders());this.progProfService.sendPostRequest(n,{},r).subscribe((t=>{e.analyzeResendCodeData({status:"success",response:t})}),(t=>{e.analyzeResendCodeData({status:"error",response:t})}))}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E))}}static{this.ɵcmp=Qr({type:e,selectors:[["verify-screen"]],viewQuery:function(e,t){if(1&e&&(tm(bL,5),tm(yL,5)),2&e){let e;im(e=nm())&&(t.otpError=e.first),im(e=nm())&&(t.resendCodeSuccessPopup=e.first)}},inputs:{verifyAcctTitle:"verifyAcctTitle",changeLabel:"changeLabel",resendCodeLabel:"resendCodeLabel",resendCodeSuccessMsg:"resendCodeSuccessMsg",resendCodeErrorMsg:"resendCodeErrorMsg",incorrectOTPError:"incorrectOTPError",technicalError:"technicalError",phoneFormatError:"phoneFormatError",invalidPhoneError:"invalidPhoneError",invalidEmailError:"invalidEmailError",verifyBtnLabel:"verifyBtnLabel"},decls:33,vars:21,consts:[["timeExpired",""],["showLoading",""],["enterOTPError",""],["resendCodeSuccessPopup",""],[1,"web-otp"],[1,"auth-styles","enter-otp",2,"flex-direction","column"],["authautofocus","",1,"auth-styles__title"],[4,"ngIf"],[1,"body-text","enter-otp__subtitle"],[1,"title-xs"],["tabindex","0","role","link","aria-label","Change email or mobile number",1,"link-reg","enter-otp__change",3,"click"],[1,"enter-otp__timer"],[1,"svg-timer-icon"],[4,"ngIf","ngIfElse"],[3,"ngSubmit","formGroup"],[1,"input-field","mt-24"],[1,"input-field__wrapper",3,"ngClass"],[1,"input-field__nonfloat-label"],[1,"word-highlight-xs"],["type","text","aria-label","Enter Verification Code","placeholder","------","maxlength","6","size","6","min","6","max","6","formControlName","otpCode","aria-describedby","error-otp","required","required",1,"input-field__otp-code",3,"keypress","focus"],["class","input-field__help-text body-text-xs","id","error-otp","aria-live","assertive",4,"ngIf"],["name","resend-code","type","button","aria-label","Resend Code","id","resend-code",1,"link-reg","enter-otp__link",3,"click","ngClass"],["class","body-text-sm auth-styles__resend-code-text",4,"ngIf"],["type","submit","aria-label","Verify",1,"btn","btn--size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"disabled"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1",1,"popup","popup-light","popup-light-success","alert","fade","show"],[1,"svg-icon","svg-success-outline"],["aria-hidden","true",1,"enter-otp__timer__text"],["id","alert","role","alert","aria-live","assertive",1,"sr-only"],[1,"enter-otp__timer__text"],["id","alert-expired","role","alert","aria-live","assertive"],["tabindex","0","aria-label","Resend Code","role","button","name","resend-code-timer","type","button","id","resend-code-timer",1,"link-reg","enter-otp__link","enter-otp__timer__link",3,"click","ngClass"],["
1id","error-otp","aria-live","assertive",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],[1,"svg-input-error-icon"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],[1,"body-text-sm","auth-styles__resend-code-text"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",4)(1,"div",5)(2,"h1",6),am(3),xf(),ph(4,_L,9,1,"ng-container",7)(5,SL,9,1,"ng-container",7),kf(6,"div",8),am(7," Enter the six-digit verification code sent to: "),xf(),kf(8,"p",9),am(9),kf(10,"span")(11,"a",10),jf("click",(function(){return Wa(e),Ha(t.changeAccount())})),am(12),xf()()(),kf(13,"div",11),Tf(14,"span",12),ph(15,CL,5,2,"ng-container",13)(16,IL,5,6,"ng-template",null,0,Wm),xf(),kf(18,"form",14),jf("ngSubmit",(function(){return Wa(e),Ha(t.verifyUsername(t.submitOTP.value))})),kf(19,"div",15)(20,"div",16)(21,"div",17)(22,"label",18),am(23,"Enter Verification Code"),xf(),kf(24,"input",19),jf("keypress",(function(i){return Wa(e),Ha(t.keyPressNumbers(i))}))("focus",(function(){return Wa(e),Ha(t.onFocus())})),xf()()(),ph(25,TL,6,3,"div",20),xf(),kf(26,"button",21),jf("click",(function(){return Wa(e),Ha(t.resendCode())})),am(27," Resend Code "),xf(),ph(28,PL,2,0,"div",22),kf(29,"button",23),ph(30,EL,2,1,"ng-container",13)(31,DL,1,0,"ng-template",null,1,Wm),xf()()()()}if(2&e){let e=sm(17),i=sm(32);Vd(3),cm(" ",t.formattedVerifyAcctTitle,""),Vd(),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.resendCodeSuccess),Vd(4),cm(" ",t.formattedUsername," "),Vd(3),lm(t.changeLabel),Vd(3),zh("ngIf",t.remainingTime>0)("ngIfElse",e),Vd(3),zh("formGroup",t.submitOTP),Vd(2),zh("ngClass",Om(17,vL,t.form.otpCode.errors&&t.form.otpCode.touched||t.inlineAPIError)),Vd(5),zh("ngIf",(t.form.otpCode.errors||t.inlineAPIError)&&t.form.otpCode.touched),Vd(),zh("ngClass",Om(19,wL,1==t.resendCodeDisabled)),gh("disabled",1==t.resendCodeDisabled?"disabled":null)("aria-disabled",1==t.resendCodeDisabled&&"true"),Vd(2),zh("ngIf",1==t.resendCodeDisabled),Vd(),zh("disabled",!(t.submitOTP.valid&&t.submitOTP.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",i)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,sC,US,qS],encapsulation:2})}}return e})(),ML=["focusOnOpen"],RL=["confirmationTitle"],LL=["warningTitle"],FL=e=>({"prog-prof__option__selected":e});function NL(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"h1",4),am(2),xf(),kf(3,"div",5),am(4),xf(),kf(5,"button",6,0),jf("click",(function(){return Wa(e),Ha(Yf().selectOption("signout"))})),kf(7,"div"),am(8),xf(),kf(9,"div"),am(10),xf()(),kf(11,"button",6),jf("click",(function(){return Wa(e),Ha(Yf().selectOption("continue"))})),kf(12,"div"),am(13),xf()(),kf(14,"div",7)(15,"button",8),jf("click",(function(){return Wa(e),Ha(Yf().submitOption())})),am(16),xf()(),kf(17,"div",9),am(18),kf(19,"span",10),am(20),xf(),kf(21,"a",11),am(22),xf()(),Df()}if(2&e){let e=Yf();Vd(2),lm(e.title),Vd(2),lm(e.conflictSubtext),Vd(),zh("ngClass",Om(12,FL,"signout"===e.selectedOption)),Vd(3),cm("Sign into ",e.enteredUsername,""),Vd(2),lm(e.maskedTxt),Vd(),zh("ngClass",Om(14,FL,"continue"===e.selectedOption)),Vd(2),cm("Continue using ",e.currentAccount,""),Vd(3),lm(e.conflictBtnText),Vd(2),cm(" ",e.callCenterText," "),Vd(2),lm(e.formatedCallCenterNumber),Vd(),zh("href","tel:"+e.callCenterNumber,id),Vd(),lm(e.formatedCallCenterNumber)}}function UL(e,t){if(1&e){let e=Mf();Ef(0),Tf(1,"img",12),kf(2,"h1",4),am(3),xf(),kf(4,"div",5),am(5),xf(),kf(6,"div",7)(7,"button",13,1),jf("click",(function(){return Wa(e),Ha(Yf().closeModal())})),am(9),xf()(),Df()}if(2&e){let e=Yf();Vd(),Jf("src",e.confirmImage,id),Vd(2),cm(" Your deals & rewards are linked to ",e.currentAccount," "),Vd(2),cm(" ",e.confirmBodyText," "),Vd(4),lm(e.confirmBtnText)}}function VL(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"h1",4),am(2," Sign in using "),Tf(3,"br"),am(4),xf(),kf(5,"div",14),Tf(6,"div",15),xf(),kf(7,"div",7)(8,"button",16,2),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.switchUserAccount(t.event))})),am(10),xf()(),Df()}if(2&e){let e=Yf();Vd(4),cm(" ",e.enteredUsername," "),Vd(2),zh("innerHTML",e.warningBodyText,ed),Vd(2),Jf("aria-label",e.warningBtnText),Vd(2),lm(e.warningBtnText)}}function qL(){return window}
1var $L=(()=>{class e{constructor(e){this.progProfService=e,this.enteredUsername=this.progProfService.enteredUsername,this.selectedOption="signout",this.view="conflict"}ngOnInit(){this.callCenterNumber&&(this.formatedCallCenterNumber=this.progProfService.formatPhoneNumber(this.callCenterNumber)),this.progProfService.flowType.subscribe((e=>{let t;this.flowType=e,"email"==e?(this.currentAccount=this.progProfService.formatPhoneNumber(qL().AB.userInfo.profilePhone),t="email",this.title="Looks like there's already an account with that email.",this.maskedTxt="Account phone number: "+this.progProfService.maskedLinkedAcct,this.confirmBodyText=this.confirmBodyText.replace("{number/email}","number"),qL().AB.DATALAYER&&(this.analyticsFlowType="email",qL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:"existing-account",topNav:"cta:email-save"}))):"phone"==e&&(this.enteredUsername=this.progProfService.formatPhoneNumber(this.enteredUsername),this.currentAccount=qL().AB.userInfo.profileEmail,t="number",this.title="Looks like there's already an account with that number.",this.maskedTxt="Email address: "+this.progProfService.maskedLinkedAcct,this.confirmBodyText=this.confirmBodyText.replace("{number/email}","email"),qL().AB.DATALAYER&&(this.analyticsFlowType="mobile",qL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:"existing-account",topNav:"cta:mobile-save"}))),this.warningBodyText=this.warningBodyText.replace("{accountInfo}",this.currentAccount).replace("{number/email}",t)})),setTimeout((()=>this.focusOnOpen.nativeElement.focus()),0)}selectOption(e){this.selectedOption=e}submitOption(){if("continue"==this.selectedOption){if(this.view="confirmation",setTimeout((()=>this.confirmationTitle.nativeElement.focus()),0),qL().AB.DATALAYER){let e="phone"===this.flowType?"email":"mobile";qL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`rewards-linked-to-${e}`,topNav:`cta:continue-using-${e}-continue`})}}else this.view="warning",setTimeout((()=>this.warningTitle.nativeElement.focus()),0),qL().AB.DATALAYER&&qL().AB.DATALAYER.progressiveProfilingTracking({subSection1:"progressive-profile",subSection2:`login-using-${this.analyticsFlowType}`,topNav:`cta:account-already-exists-${this.analyticsFlowType}-continue`})}closeModal(){this.progProfService.hideModal(),qL().AB.DATALAYER&&qL().AB.DATALAYER.progressiveProfilingTracking({topNav:`cta:rewards-linked-${this.analyticsFlowType}-flow-close`})}switchUserAccount(e){"phone"==this.flowType&&localStorage.setItem("showOTPSignIn","true"),localStorage.setItem("analyticsOTPFlowPP",`cta:continue-with-${this.analyticsFlowType}-OTP-flow`),sessionStorage.setItem("ppUsername",this.progProfService.enteredUsername),qL().AB.COMMON.setCookie("ECommRedirectURL","/account/sign-in.html?progProfUser=true",0),qL().SWY.OKTA.silentSignOutFromOkta(e)}static{this.ɵfac=function(t){return new(t||e)($d($E))}}static{this.ɵcmp=Qr({type:e,selectors:[["conflict-screen"]],viewQuery:function(e,t){if(1&e&&(tm(ML,5),tm(RL,5),tm(LL,5)),2&e){let e;im(e=nm())&&(t.focusOnOpen=e.first),im(e=nm())&&(t.confirmationTitle=e.first),im(e=nm())&&(t.warningTitle=e.first)}},inputs:{conflictSubtext:"conflictSubtext",conflictBtnText:"conflictBtnText",callCenterText:"callCenterText",callCenterNumber:"callCenterNumber",confirmImage:"confirmImage",confirmBodyText:"confirmBodyText",confirmBtnText:"confirmBtnText",warningBodyText:"warningBodyText",warningBtnText:"warningBtnText"},decls:3,vars:3,consts:[["focusOnOpen",""],["confirmationTitle",""],["warningTitle",""],[4,"ngIf"],[1,"prog-prof__title"],[1,"body-text","mb-24","prog-prof__body"],[1,"prog-prof__option",3,"click","ngClass"],[1,"prog-prof__btn-container"],["aria-label","Continue",1,"btn","btn-lg","prog-prof__btn","btn-primary",3,"click"],[1,"prog-prof__call-center"],[1,"d-none","d-md-inline","prog-prof__call-center__desktop-number"],["data-tabindex","last",1,"prog-prof__call-center__number","d-block","d-md-none",3,"href"],["alt","Success",1,"prog-prof__confirm-img",3,"src"],["data-tabindex","last","aria-label","Close",1,"btn","btn-lg","prog-prof__btn","btn-primary",3,"click"],[1,"prog-prof__warning"],[1,"body-text",3,"innerHTML"],["data-tabindex","last",1,"btn","btn-lg","prog-prof__btn","btn-primary",3,"click","aria-label"]],template:function(e,t){1&e&&ph(0,NL,23,16,"ng-container",3)(1,UL,10,4,"ng-container",3)(2,VL,11,4,"ng-container",3),2&e&&(zh("ngIf","conflict"==t.view),Vd(),zh("ngIf","confirmation"==t.view),Vd(),zh("ngIf","warning"==t.view))},dependencies:[sy,cy],encapsulation:2})}}return e})(),jL=(()=>{class e{constructor(e){this._http=e,this.currentScreenSubject=ne
1w Tt(""),this.currentScreen$=this.currentScreenSubject.asObservable(),this.aemData=new Tt(""),this.aemData$=this.aemData.asObservable(),this.index=new Tt(0),this.index$=this.index.asObservable(),this.isProfileFlowSkipped=new Tt(!1),this.isProfileFlowSkipped$=this.isProfileFlowSkipped.asObservable(),this.ariaLabel=new Tt(""),this.ariaLabel$=this.ariaLabel.asObservable(),this.profileComletionPercentage=new Tt(0),this.profileComletionPercentage$=this.profileComletionPercentage.asObservable(),this.profileData=new Tt({}),this.profileData$=this.profileData.asObservable(),this.profileCompletionData=new Tt(""),this.profileCompletionData$=this.profileCompletionData.asObservable(),this.isProfileCompletionDataUpdated=!1}setCurrentScreen(e){this.currentScreenSubject.next(e)}getCurrentScreen(){return this.currentScreenSubject.getValue()}setAemData(e){this.aemData.next(e)}getAemData(){return this.aemData.getValue()}getIndex(){return this.index.getValue()}setNextScreen(){this.index.next(this.index.getValue()+1)}resetIndex(){this.index.next(0)}resetSkipProfileFlow(){this.isProfileFlowSkipped.next(!1)}skipProfileFlow(){this.isProfileFlowSkipped.next(!0)}hasProfileFlowSkipped(){return this.isProfileFlowSkipped.getValue()}getAriaLabel(){return this.ariaLabel.getValue()}setArialabel(e){this.ariaLabel.next(e)}getProfileCompletionPercentage(){return this.profileComletionPercentage.getValue()}setProfileCompletionPercentage(e){this.profileComletionPercentage.next(e)}getProfileData(){return this.profileData.getValue()}setProfileData(e){this.profileData.next(h(h({},this.profileData.getValue()),e))}getProfileCompletionData(){return this.profileCompletionData.getValue()}getPendingRewards(){let e=!1,t=!1;return((this.getProfileCompletionData()||{}).profileArray||[]).forEach((i=>{("verifiedEmail"===i.field||"verifiedPhone"===i.field)&&"completed"!==i.status&&(t=!0),("dob"===i.field||"address"===i.field||"name"===i.field)&&"completed"!==i.status&&(e=!0)})),e&&t?200:100}updateProfileArray(e,t){let i=t.find((t=>t.field===e));return i&&(i.status="completed"),t}setProfileCompletionData(e){let t=this.getProfileCompletionData()||{},i=t.profileArray||[];switch(e.type){case"email":i=this.updateProfileArray(e.type,i),i=this.updateProfileArray("verifiedEmail",i);break;case"phone":i=this.updateProfileArray(e.type,i),i=this.updateProfileArray("verifiedPhone",i);break;case"dob":case"address":case"name":i=this.updateProfileArray(e.type,i)}let n=this.getExpiryTime();t=f(h({},t),{profileCompletionPercentage:e.profileCompletionPercentage,profileArray:i,expiryTime:n}),this.isProfileCompletionDataUpdated=!0,this.setSessionStorageProfileData(t),this.profileCompletionData.next(t)}setSessionStorageProfileData(e){sessionStorage.setItem("profileCompletionData",JSON.stringify(e))}getExpiryTime(){let e="",t=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.oktaConfig&&window.SWY.CONFIGSERVICE.oktaConfig.maxAge||0,i=new Date;return i.setTime(i.getTime()+1e3*t),e=i.toUTCString(),e}onKeyPress(e){"Space"===e.code&&e.target.click()}updateProfile(e){let t=window.AB.ucaHttpOptionsUpdateBirthdayProfile;t.Accept="application/vnd.safeway.v4+json",t["Content-Type"]="application/vnd.safeway.v4.merge-patch+json",t["x-swy-client-name"]="web-portal";let i=window.AB.getprofileAddressPath.replace("{customerId}",window.AB.userInfo.UUID);return this._http.patch(i,e,{headers:t})}updateInputFieldClasses(){document.querySelectorAll("#profile-completion .pds-input-field-form-control").forEach((e=>{let t=e;t.classList.toggle("pds-input-has-value",t.value.length>0)}))}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function zL(e,t){if(1&e&&(Ef(0),kf(1,"div",27)(2,"div",28,1)(4,"div",29)(5,"div",30),Tf(6,"span",31),xf(),kf(7,"div",32)(8,"div",33),am(9),xf()()()()(),Df()),2&e){let e=Yf();Vd(9),cm(" ",e.errorMessage," ")}}function WL(e,t){if(1&e&&(kf(0,"span",37),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.emailRequiredErrorMsg)}}function HL(e,t){if(1&e&&(kf(0,"span",37),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.emailInvalidErrorMsg)}}function YL(e,t){if(1&e&&(kf(0,"span",37),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.phoneRequiredErrorMsg)}}function GL(e,t){if(1&e&&(kf(0,"span",37),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.phoneInvalidErrorMsg)}}function KL(e,t){if(1&e&&(kf(0,"span",37),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.mobilePatternErrorMsg)}}function QL(e,t){if(1&e&&(kf(0,"div",34),Tf(1,"span",35),kf(2,"span",8),am(3,"Error:"),xf(),ph(4,WL,2,1,"span",36)(5,HL,2,1,"span",36)(6,YL,2,1,"span",36)(7,GL,2,1,"span",36)(8,KL,2,1,"span",36),xf()),2&e){let e=Yf();Vd(4),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.emailRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidEmail),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.phoneRequired),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidPhone),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.mobilePattern)}}function JL(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.continueButton," ")}}function ZL(e,t){1&e&&Tf(0,"div",38)}var XL=(()=>{class e{constructor(e,t,i){this.formBuilder=e,this.progProfService=t,this.profileCompletionService=i,this.flowType="",this.isVisible=!1,this.currentScreen="",this.placeholderText="",this.isUsernameEmpty=!1,this.aemData={},this.loading=!1,this.errorPopup=!1,this.emailRequiredErrorMsg="Please enter your email address",this.phoneRequiredErrorMsg="Please enter your mobile phone number",this.emailInvalidErrorMsg="Please enter a valid email address",this.phoneInvalidErrorMsg="Please enter a mobile phone number that c
1ontains 10 digits",this.mobilePatternErrorMsg="Please enter a mobile phone number that doesn't start with a 0 or 1.",this.percentage=0,this.viewedCount=0}ngOnInit(){this.enterUsernameForm=this.formBuilder.group({username:["",[this.validateUsername()]]});let e=this.enterUsernameForm.controls.username;this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),"phone"===this.flowType?(this.profileCompletionService.setArialabel("add your phone number"),e.errors&&(this.enterUsernameForm.controls.username.errors.phoneRequired=!0)):"email"===this.flowType&&(this.profileCompletionService.setArialabel("add your email"),this.placeholderText="Email",e.errors&&(this.enterUsernameForm.controls.username.errors.emailRequired=!0)),this.loadExperienceFragment(this.flowType)}get usernameForm(){return this.enterUsernameForm.controls}ngAfterViewInit(){this.analyticsEvents("screenView",this.flowType,"phone"===this.flowType?"phone-number":"email"),this.viewedCount++,setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3);let e=this.enterUsernameForm.controls.username;"email"==this.flowType?(this.isUsernameEmpty=!window.AB.userInfo.profileEmail,e.setValue(window.AB.userInfo.profileEmail)):(e.setValue(window.AB.userInfo.profilePhone),this.isUsernameEmpty=!window.AB.userInfo.profilePhone)}ngOnChanges(e){e.isVisible&&e.isVisible.currentValue&&"landing"===this.currentScreen&&this.viewedCount>0&&this.analyticsEvents("screenView",this.flowType,"phone"===this.flowType?"phone-number":"email")}loadExperienceFragment(e){this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}updatedContent(e){this.aemData=e,this.title=("email"===this.flowType?this.aemData.emailTitle:this.aemData.phoneTitle)||"",this.subtitle=("email"===this.flowType?this.aemData.emailSubtitle:this.aemData.phoneSubtitle)||"",this.subText1=("email"===this.flowType?this.aemData.emailSubText1:this.aemData.phoneSubText1)||"",this.field=("email"===this.flowType?this.aemData.emailField:this.aemData.phoneField)||"",this.continueButton=("email"===this.flowType?this.aemData.emailContinueButton:this.aemData.phoneContinueButton)||"",this.skipButton=("email"===this.flowType?this.aemData.emailSkipButton:this.aemData.phoneSkipButton)||"",this.imgSrc=this.aemData?.dobImage||"",this.errorMessage=this.aemData?.technicalErrorMsg||"Sorry we're having technical difficulties.",this.technicalErrorMsg=this.aemData?.technicalErrorMsg||"Sorry we're having technical difficulties.",this.titleText=this.aemData?.dobTitle||""}submitUsername(e){this.submitUsernameOTP(e)}validateUsername(){let e=this,t=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,i=new RegExp("^[0-9]+$");return n=>{let r={emailRequired:!1,invalidEmail:!1,phoneRequired:!1,mobilePattern:!1,invalidPhone:!1};if("email"==e.flowType){if(0==n.value.length)return r.emailRequired=!0,r;if(!t.test(n.value))return r.invalidEmail=!0,r}else if("phone"==e.flowType){if(0==n.value.length)return r.phoneRequired=!0,r;if("0"===n.value.charAt(0)||"1"===n.value.charAt(0))return r.mobilePattern=!0,r;if(10!==n.value.length)return r.invalidPhone=!0,r;if(!i.test(n.value))return r.invalidPhone=!0,r}}}submitUsernameOTP(e){this.resetErrorMessage(),this.loading=!0;let t=e.username;this.progProfService.enteredUsername=t;let i,n,r=window.AB.userInfo.UUID;"email"==this.flowType?(i="email",n=JSON.stringify({email:t})):(i="sms",n=JSON.stringify({phoneNumber:t}));let s=this.progProfService.csmsEndpoint+"/customers/"+r+"/factors/"+i+"/verify",a=new jy(this.progProfService.getVerifyHeaders()),o=this;this.progProfService.sendPostRequest(s,n,a).subscribe((e=>{e&&e.body&&e.body.factors&&e.body.factors[0]&&(o.progProfService.otpData.factorId=e.body.factors[0].id,o.progProfService.otpData.factorType=e.body.factors[0].factorType),this.analyticsEvents("trackCTA"),o.progProfService.currentScreen.next("verify"),o.loading=!1,o.progProfService.verificationCodeTimer(),o.progProfService.otpData.userPreference=[{channel:"email"===o.flowType?"Email":"SMS",type:"GLOBAL"}]}),(e=>{e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message?o.errorMessage=e.error?.errors[0]?.message:o.errorMessage=o.technicalErrorMsg,o.errorPopup=!0,this.loading=!1}))}resetErrorMessage(){this.errorPopup=!1,this.errorMessage=""}skipProfileStep(){this.analyticsEvents("linkClick","skip"),this.profileCompletionService.skipProfileFlow(),this.profileCompletionService.setNextScreen()}onPhoneInput(e){let t=e.target.value.replace(/\D/g,"");this.enterUsernameForm.get("username")?.setValue(t)}onKeyPress(e){this.profileCompletionService.onKeyPress(e)}analyticsEvents(e,t,i){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.set
1LinkClickEvents(`complete-your-profile|add-and-verify-${this.flowType}:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|${window.AB.DATALAYER.sanitizeAnalyticsText(this.continueButton)}`);else if("screenView"===e){let e={percentage:this.percentage,flowType:"dismiss"===t?t:`enter-${t}`,step:`add-your-${i}`};window.AB&&window.AB.DATALAYER.trackProfileCompletion(e)}}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E),$d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["landing-screen-profile-completion"]],inputs:{flowType:"flowType",isVisible:"isVisible",currentScreen:"currentScreen"},features:[ga],decls:35,vars:21,consts:[["showLoading",""],["landingErrorId",""],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["aria-live","polite",1,"reward-message"],[1,"reward-text","text-l","d-flex","align-items-center","justify-content-center"],["alt","",1,"profile-completion-modal__reward-icon","mr-1",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],[4,"ngIf"],["id","phone-info-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],[1,"body-text","mb-3"],[3,"formGroup"],[1,"pds-input-field-group","text-left","mb-0"],["formControlName","username","required","required","type","text","id","input1","placeholder"," ","aria-labelledby","phone-info-text input1-label",1,"pds-input-field-form-control",3,"input","readonly"],["id","input1-label","for","input1",1,"text-l","pds-input-field-group--label","mb-0"],["id","error-username","class","d-flex mt-1","role","alert","aria-live","polite",4,"ngIf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],[1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[4,"ngIf","ngIfElse"],["role","button","tabindex","0","data-tabindex","last",1,"profile-completion-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"keypress","click"],[1,"d-flex","justify-content-center"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24","mx-auto"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","error-username","role","alert","aria-live","polite",1,"d-flex","mt-1"],["aria-hidden","true",1,"pds-svg-error-icon","float-left","ml-3","mr-1"],["class","text-s pds-input-field-error-message",4,"ngIf"],[1,"text-s","pds-input-field-error-message"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"button",3),jf("click",(function(){return Wa(e),t.analyticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),Tf(2,"span",4),xf(),kf(3,"div",5)(4,"h2",6),am(5),xf(),kf(6,"div",7)(7,"span",8),am(8),xf(),kf(9,"div",9),am(10),xf()(),kf(11,"div",10)(12,"span",11),Tf(13,"img",12),am(14),xf()()()(),kf(15,"div",13),ph(16,zL,10,1,"ng-container",14),kf(17,"h3",15),am(18),xf(),kf(19,"div",16),am(20),xf(),kf(21,"form",17)(22,"div",18)(23,"input",19),jf("input",(function(i){return Wa(e),Ha("phone"==t.flowType&&t.onPhoneInput(i))})),xf(),kf(24,"label",20),am(25),xf(),ph(26,QL,9,5,"div",21),xf()()(),kf(27,"div",22)(28,"div",23)(29,"button",24),jf("click",(function(){return Wa(e),Ha(t.submitUsername(t.enterUsernameForm.value))})),ph(30,JL,2,1,"ng-container",25)(31,ZL,1,0,"ng-template",null,0,Wm),xf(),kf(33,"a",26),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProfileStep())})),am(34),xf()()()}if(2&e){let e=sm(32);
1Vd(5),lm(t.titleText),Vd(3),cm("Profile completed ",t.percentage,"%"),Vd(),Hh("width",t.percentage,"%"),gh("aria-valuenow",t.percentage),Vd(),cm("",t.percentage,"% "),Vd(3),zh("src",t.imgSrc,id),Vd(),cm(" ",t.title," "),Vd(2),zh("ngIf",t.errorPopup),Vd(2),cm(" ",t.subtitle," "),Vd(2),cm(" ",t.subText1," "),Vd(),zh("formGroup",t.enterUsernameForm),Vd(2),zh("readonly",t.loading),Vd(2),lm(t.field),Vd(),zh("ngIf",t.usernameForm.username.errors&&t.usernameForm.username.touched),Vd(3),zh("disabled",!t.enterUsernameForm.valid),gh("aria-label",t.continueButton),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(3),gh("aria-label",t.skipButton),Vd(),lm(t.skipButton)}},dependencies:[cy,DS,d_,$_,j_,nC,US,qS],encapsulation:2})}}return e})(),eF=["enterOTPError"],tF=["resendCodeSuccessPopup"],iF=e=>({"enter-otp__link--disabled":e});function nF(e,t){if(1&e&&(Ef(0),kf(1,"div",42,1)(3,"div",43)(4,"div",44),Tf(5,"span",45),xf(),kf(6,"div",46)(7,"div",47),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function rF(e,t){if(1&e&&(Ef(0),kf(1,"div",48,2)(3,"div",43)(4,"div",44),Tf(5,"span",49),xf(),kf(6,"div",46)(7,"div",47),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.resendCodeSuccessMsg," ")}}function sF(e,t){if(1&e&&(kf(0,"span",53),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.requiredOTPError)}}function aF(e,t){if(1&e&&(kf(0,"span",53),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.minlengthdOTPError)}}function oF(e,t){if(1&e&&(kf(0,"span",53),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.incorrectOTPError)}}function lF(e,t){if(1&e&&(kf(0,"div",50),Tf(1,"span",51),kf(2,"span",9),am(3,"Error:"),xf(),ph(4,sF,2,1,"span",52)(5,aF,2,1,"span",52)(6,oF,2,1,"span",52),xf()),2&e){let e=Yf();Vd(4),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.required),Vd(),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.minlength),Vd(),zh("ngIf",e.inlineAPIError)}}function cF(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.continueButton," ")}}function dF(e,t){1&e&&Tf(0,"div",54)}var uF=(()=>{class e{constructor(e,t,i){this.formBuilder=e,this.progProfService=t,this.profileCompletionService=i,this.loading=!1,this.formattedUsername=this.progProfService.enteredUsername,this.analyticsFlow="",this.errorPopup=!1,this.errorMsg="",this.resendCodeSuccess=!1,this.resendCodeDisabled=!1,this.timerResendCodeDisabled=!1,this.inlineAPIError=!1,this.analyticsResendCode=!1,this.confirmationCodeText="",this.resendText="",this.resendSubText1="",this.resendSubText2="",this.confirmationCheckboxLabel1="",this.confirmationCheckboxLabel2="",this.confirmationCheckboxLabel3="",this.imgSrc="",this.addEmailorPhonText="",this.verifySubTitleText="",this.checkboxValue=!1,this.continueButton="",this.skipButton="",this.expandText="",this.title="",this.percentage=0,this.changeBtnArialabel="",this.submitOTP=this.formBuilder.group({otpCode:["",[g_.required,g_.minLength(6),g_.maxLength(6)]]})}ngOnInit(){let e=this.progProfService.otpData.factorType;this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),"sms"===e?this.profileCompletionService.setArialabel("phone verification"):"email"===e&&this.profileCompletionService.setArialabel("email verification"),this.disableResendCodeLink(),this.loadExperienceFragment()}get form(){return this.submitOTP.controls}ngAfterViewInit(){this.analyticsEvents("screenView",this.analyticsFlow,"phone"===this.analyticsFlow?"phone-number":"email"),setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}loadExperienceFragment(){this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}updatedContent(e){let t=this.progProfService.otpData.factorType;this.aemData=e,"sms"==t?(this.formattedUsername=this.progProfService.formatPhoneNumber(this.progProfService.enteredUsername),this.analyticsFlow="phone"):(this.formattedUsername=this.progProfService.enteredUsername,this.analyticsFlow="email"),this.confirmationCodeText=("sms"===t?this.aemData?.phoneConfirmationCodeText:this.aemData?.emailConfirmationCodeText)||"",this.resendText=("sms"===t?this.aemData?.phoneResendText:this.aemData?.emailResendText)||"",this.resendSubText1=("sms"===t?this.aemData?.phoneResendSubText1:this.aemData?.emailResendSubText1)||"",this.resendSubText2=("sms"===t?this.aemData?.phoneResendSubText2:this.aemData?.emailResendSubText2)||"",this.confirmationCheckboxLabel1=("sms"===t?this.aemData?.phoneConfirmationCheckboxLabel1:this.aemData?.emailConfirmationCheckboxLabel1)||"",this.confirmationCheckboxLabel2=("sms"===t?this.aemData?.phoneConfirmationCheckboxLabel2:this.aemData?.emailConfirmationCheckboxLabel2)||"",this.confirmationCheckboxLabel3=("sms"===t?this.aemData?.phoneConfirmationCheckboxLabel3:this.aemData?.emailConfirmationCheckboxLabel3)||"",this.resendCodeSuccessMsg=this.aemData?.resendCodeSuccess||"We've sent you a new verification code",this.incorrectOTPError=this.aemData?.incorrectOTPError||"The verification code you entered is incorrect. Please try again.",this.technicalError=this.aemData?.technicalError||"Sorry we're having technical difficulties.",this.requiredOTPError="Please enter a verification code.",this.minlengthdOTPError="Please enter a verification code that c
1ontains 6 digits.",this.resendCodeErrorMsg=this.aemData?.resendCodeError||"Sorry, we couldn't send a verification code. Please try again",this.imgSrc=this.aemData?.dobImage||"",this.addEmailorPhonText=("sms"===t?this.aemData?.phoneTitle:this.aemData?.emailTitle)||"",this.verifySubTitleText=("sms"===t?this.aemData?.phoneConfirmationSubTitle:this.aemData?.emailConfirmationSubTitle)||"",this.continueButton=("sms"===t?this.aemData.phoneConfirmationCTAButton:this.aemData.emailConfirmationCTAButton)||"",this.skipButton=("sms"===t?this.aemData.phoneSkipButton:this.aemData.emailSkipButton)||"",this.expandText=("sms"===t?this.aemData.phoneExpandText:this.aemData.emailExpandText)||"",this.title=this.aemData?.dobTitle||"",this.changeBtnArialabel="sms"===t?"Change mobile number":"Change Email ID"}disableResendCodeLink(){let e=this;this.resendCodeDisabled=!0,setTimeout((function(){e.resendCodeDisabled=!1}),3e4)}verifyUsername(e){this.loading=!0,this.clearErrors();let t=this,i=window.AB.userInfo.UUID,n=this.progProfService.otpData.userPreference[0];n=f(h({},n),{value:t.checkboxValue?"A":"D"});let r=JSON.stringify({passCode:e.otpCode,preferences:[n]}),s=this.progProfService.otpData.factorId,a=this.progProfService.csmsEndpoint+"/customers/"+i+"/factors/"+s+"/lifecycle/activate",o=this.progProfService.getVerifyHeaders();o["x-abs-user-exp-journey"]="Identity-Profile";let l=new jy(o);this.progProfService.sendPostRequest(a,r,l).subscribe((e=>{e&&e.body&&e.body.profile&&(t.progProfService.otpData.successEmail=e.body.profile.email,t.progProfService.otpData.successPhone=e.body.profile.primaryPhone);let i="sms"===this.progProfService.otpData.factorType?"phone":"email",n=this.percentage+20;this.profileCompletionService.setProfileCompletionData({type:i,profileCompletionPercentage:n}),this.profileCompletionService.setProfileCompletionPercentage(n),this.analyticsEvents("trackCTA",i),n>=100?this.profileCompletionService.setNextScreen():t.progProfService.currentScreen.next("success"),t.loading=!1}),(e=>{if(e.error?.errors[0]?.message&&""!=e.error?.errors[0]?.message){let i=e.error?.errors[0]?.code;t.errorMsg="CSMS0213"==i||"CSMS0120"==i?t.incorrectOTPError:t.technicalError}t.errorPopup=!0,this.loading=!1}))}analyzeResendCodeData(e){let t=this;if(t.clearErrors(),t.disableResendCodeLink(),"success"==e.status){t.progProfService.verificationCodeTimer();let i=e.response.body;t.progProfService.otpData.stateToken=i.stateToken,t.progProfService.otpData.expiresAt=i.expiresAt,t.resendCodeSuccess=!0,setTimeout((function(){t.resendCodeSuccess=!1}),8e3),setTimeout((()=>{t.resendCodeSuccessPopup&&t.resendCodeSuccessPopup.nativeElement.focus()}),0)}else if("error"==e.status){let i="",n=e.response.error;n.errors&&n.errors[0]&&n.errors[0].code?(i=n.errors[0].code,"CSMS0139"==i&&(t.errorMsg="Please wait 30 seconds before trying to resend another code.")):t.errorMsg=t.resendCodeErrorMsg,t.errorPopup=!0,setTimeout((function(){t.clearErrors()}),8e3),setTimeout((()=>{t.otpError&&t.otpError.nativeElement.focus()}),0)}}keyPressNumbers(e){var t=e.which?e.which:e.keyCode;return!(t<48||t>57)||(e.preventDefault(),!1)}onFocus(){this.inlineAPIError&&(this.inlineAPIError=!1)}clearErrors(){this.resendCodeSuccess=!1,this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1}clearSubmitOTPForm(){this.submitOTP.controls.otpCode.setErrors(null),this.submitOTP.controls.otpCode.markAsPristine(),this.submitOTP.controls.otpCode.markAsUntouched(),this.submitOTP.controls.otpCode.setValue("")}onKeyPress(e){this.profileCompletionService.onKeyPress(e)}changeAccount(){this.clearErrors(),this.clearSubmitOTPForm(),Object.keys(this.progProfService.otpData).forEach((e=>delete this.progProfService.otpData[e])),this.progProfService.currentScreen.next("landing")}resendCode(){let e=this,t=window.AB.userInfo.UUID,i=this.progProfService.otpData.factorId,n=this.progProfService.csmsEndpoint+"/customers/"+t+"/factors/"+i+"/resend",r=new jy(this.progProfService.getVerifyHeaders());this.progProfService.sendPostRequest(n,{},r).subscribe((t=>{e.analyzeResendCodeData({status:"success",response:t})}),(t=>{e.analyzeResendCodeData({status:"error",response:t})}))}
1onCheckboxChange(){if(this.checkboxValue=!this.checkboxValue,"sms"===this.progProfService.otpData.factorType){let e=$("#learnMore");this.checkboxValue?(e.collapse("show"),$("#learnMoreParent").attr("aria-expanded","true")):(e.collapse("hide"),$("#learnMoreParent").attr("aria-expanded","false"))}}skipProfileStep(){this.analyticsEvents("linkClick","skip"),this.profileCompletionService.skipProfileFlow(),this.profileCompletionService.setNextScreen()}closeHandler(){this.analyticsEvents("linkClick","close"),this.analyticsEvents("screenView","dismiss"),$("#profile-completion").modal("hide"),this.changeAccount()}analyticsEvents(e,t,i){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.setLinkClickEvents(`complete-your-profile|otp-${this.analyticsFlow}:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|${window.AB.DATALAYER.sanitizeAnalyticsText(this.continueButton)}`);else if("crossScreenData"===e)window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"profileCompletionCheckBox",data:this.checkboxValue});else if("screenView"===e){let e={percentage:this.percentage,flowType:"dismiss"===t?t:`otp-${t}`,step:`cont-to-vrf-${i}`};window.AB&&window.AB.DATALAYER.trackProfileCompletion(e)}}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d($E),$d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["verify-screen-profile-completion"]],viewQuery:function(e,t){if(1&e&&(tm(eF,5),tm(tF,5)),2&e){let e;im(e=nm())&&(t.otpError=e.first),im(e=nm())&&(t.resendCodeSuccessPopup=e.first)}},decls:58,vars:45,consts:[["showLoading",""],["enterOTPError",""],["resendCodeSuccessPopup",""],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["aria-live","polite",1,"reward-message"],[1,"reward-text","text-l","d-flex","align-items-center","justify-content-center"],["alt","",1,"profile-completion-modal__reward-icon","mr-1",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center","d-flex","flex-column"],[4,"ngIf"],["id","phone-info-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],["id","verification-instruction-phone",1,"profile-completion-modal__subheading","body-text","mb-3"],[1,"text-l-b"],["href","javascript:void(0);","role","button",1,"profile-completion-modal__alt-number-link","link-l--primary","text-l-sb--primary",3,"keypress","click"],["role","form",1,"profile-completion-modal__otp-wrapper","pds-input-field-group","mb-3",3,"formGroup"],["formControlName","otpCode","type","text","id","input5","placeholder","ââââââ","maxlength","6","required","",1,"verification-input","pds-input-field-form-control","px-3","py-3",3,"keypress","focus","readonly"],["class","d-flex mt-1","role","alert","aria-live","polite",4,"ngIf"],["role","button","aria-describedby","resend-code-info","href","javascript:void(0);","tabindex","0",1,"profile-completion-modal__resend-link","link-l","mb-1",3,"click","keypress","ngClass"],["id","resend-code-info",1,"profile-completion-modal__resend-timer","text-l","mb-2"],[1,"checkbox","profile-completion-modal__promo","verify-modal__checkbox-container","mt-3"],["for","legalTextEmail",1,"pds-checkbox","checkbox__group","mb-0"],["aria-hidden","true",1,"checkbox__label","promo-checkbox-label","text-l-sb"],["type","checkbox","id","legalTextEmail",1,"checkbox__input",3,"change","checked"],[1,"checkbox__checkmark","pds-checkbox-checkmark"],[1,"svg-checkmark"],["id","promoText3",1,"profile-completion-modal__promo__text","verify-modal__checkbox-label","verify-modal__legal-text","text-left"],["aria-hidden","true"],["id","learnMoreParent","data-toggle","collapse","data-target","#learnMore","aria-expanded","fal
1se","href","javascript:void(0);","role","button",1,"profile-completion-modal__promo__caret","profile-completion-modal__promo__link","link-s--primary"],[1,"svg-caret-expand-pp"],[1,"svg-caret-collapse-pp"],["id","learnMore","data-parent","#learnMoreParent",1,"collapse","profile-completion-modal__promo__text","text-left","verify-modal__checkbox-label","verify-modal__legal-text"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],[1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[4,"ngIf","ngIfElse"],["role","button","tabindex","0","data-tabindex","last",1,"profile-completion-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"keypress","click"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-error","alert","fade","show","mx-auto"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1","role","alert","aria-live","polite",1,"popup","popup-light","popup-light-success","alert","fade","show","mx-auto"],[1,"svg-icon","svg-success-outline"],["role","alert","aria-live","polite",1,"d-flex","mt-1"],["aria-hidden","true",1,"pds-svg-error-icon","float-left","ml-3","mr-1"],["class","text-s pds-input-field-error-message",4,"ngIf"],[1,"text-s","pds-input-field-error-message"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"button",4),jf("click",(function(){return Wa(e),Ha(t.closeHandler())})),Tf(2,"span",5),xf(),kf(3,"div",6)(4,"h2",7),am(5),xf(),kf(6,"div",8)(7,"span",9),am(8),xf(),kf(9,"div",10),am(10),xf()(),kf(11,"div",11)(12,"span",12),Tf(13,"img",13),am(14),xf()()()(),kf(15,"div",14),ph(16,nF,9,1,"ng-container",15)(17,rF,9,1,"ng-container",15),kf(18,"h3",16),am(19),xf(),kf(20,"div",17),am(21),Tf(22,"br"),kf(23,"span",18),am(24),xf(),kf(25,"a",19),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.changeAccount())})),am(26),xf()(),kf(27,"div",20)(28,"input",21),jf("keypress",(function(i){return Wa(e),Ha(t.keyPressNumbers(i))}))("focus",(function(){return Wa(e),Ha(t.onFocus())})),xf(),ph(29,lF,7,3,"div",22),xf(),kf(30,"a",23),jf("click",(function(){return Wa(e),Ha(t.resendCode())}))("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))})),am(31),xf(),kf(32,"p",24),am(33),xf(),kf(34,"div",25)(35,"label",26)(36,"span",27),am(37),xf(),kf(38,"input",28),jf("change",(function(){return Wa(e),Ha(t.onCheckboxChange())})),xf(),kf(39,"span",29),Tf(40,"span",30),xf()(),kf(41,"div",31)(42,"span",32),am(43),xf(),kf(44,"a",33),am(45),Tf(46,"span",34)(47,"span",35),xf()(),kf(48,"div",36),am(49),xf()()(),kf(50,"div",37)(51,"div",38)(52,"button",39),jf("click",(function(){return Wa(e),Ha(t.verifyUsername(t.submitOTP.value))})),ph(53,cF,2,1,"ng-container",40)(54,dF,1,0,"ng-template",null,0,Wm),xf(),kf(56,"a",41),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProfileStep())})),am(57),xf()()()}if(2&e){let e=sm(55);Vd(5),lm(t.title),Vd(3),cm("Profile completed ",t.percentage,"%"),Vd(),Hh("width",t.percentage,"%"),gh("aria-valuenow",t.percentage),Vd(),cm("",t.percentage,"% "),Vd(3),zh("src",t.imgSrc,id),Vd(),cm(" ",t.addEmailorPhonText," "),Vd(2),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.resendCodeSuccess),Vd(2),cm(" ",t.verifySubTitleText," "),Vd(2),cm(" ",t.confirmationCodeText,""),Vd(3),cm("",t.formattedUsername," Â "),Vd(),gh("aria-label",t.changeBtnArialabel),Vd(),cm(" ",t.resendSubText2," "),Vd(),zh("formGroup",t.submitOTP),Vd(),Sh("aria-label","",t.confirmationCodeText.replace(":","")," ",t.formattedUsername,""),zh("readonly",t.loading),Vd(),zh("ngIf",(t.form.otpCode.errors||t.inlineAPIError)&&t.form.otpCode.touched),Vd(),zh("ngClass",Om(43,iF,1==t.resendCodeDisabled)),gh("aria-disabled",1==t.resendCodeDisabled&&"true"),Vd(),lm(t.resendText),Vd(2),cm(" ",t.resendSubText1,""),Vd(4),cm(" ",t.confirmationCheckboxLabel1," "),Vd(),Sh("aria-label","",t.confirmationCheckboxLabel1," ",t.confirmationCheckboxLabel2,""),zh("checked",t.checkboxValue),gh("aria-checked",t.checkboxValue),Vd(5),cm("",t.confirmationCheckboxLabel2," Â Â "),Vd(),Sh("aria-label","",t.confirmationCheckboxLabel1," ",t.confirmationCheckboxLabel3,""),Vd(),cm(" ",t.confirmationCheckboxLabel3," "),Vd(4),cm(" ",t.expandText," "),Vd(3),zh("disabled",!t.submitOTP.valid),gh("aria-label",t.continueButton),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(3),gh("aria-label",t.skipButton),Vd(),lm(t.skipButton)}},dependencies:[sy,cy,d_,$_,j_,nC,sC,US,qS],encapsulation:2})}}return e})(),pF=(()=>{class e{constructor(e,t,i){this.progProfService=e,this.formBuilder=t,this.profileCompletionService=i,this.flowType="",this.aemData={},this.phoneEmailCompleteTitle="",this.phoneEmailCompleteSubTitle="",this.phoneEmailCompleteText="",this.phoneEmailCompleteSaveButton="",this.phoneEmailCompleteImageReference=""}ngOnInit(){"phone"===this.flowType?this.profileCompletionService.setArialabel("phone confirmation"):"email"===this.flowType&&this.profileCompletionService.setArialabel("email confirmation"),this.loadExperienceFragment()}loadExperienceFragment(){this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}ngAfterViewInit(){this.analyticsEvents("screenView",this.flowType),setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}updatedContent(e){this.aemData=e;let t="email"===this.flowType?"Email":"Phone number";this.phoneEmailCompleteTitle=this.aemData.phoneEmailCompleteTitle?.replace("[Phone number/Email]",t)||"",this.phoneEmailCompleteSubTitle=this.aemData.phoneEmailCompleteSubTitle||"",this.phoneEmailCompleteText=this.aemData.phoneEmailCompleteText||"",this.phoneEmailCompleteSaveButton=this.aemData.phoneEmailCompleteSaveButton||"",this.phoneEmailCompleteImageReference=this.aemData.phoneEmailCompleteImageReference||""}continue(){this.analyticsEvents("trackCTA",this.flowType),this.profileCompletionService.setNextScreen()}analyticsEvents(e,t){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.set
1LinkClickEvents(`complete-your-profile|confirmation-${this.flowType}:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|profile-${window.AB.DATALAYER.sanitizeAnalyticsText(this.phoneEmailCompleteSaveButton)}`);else if("screenView"===e){let e=window.digitalData?.crossPageData?.profileCompletionCheckBox?.data,i={percentage:0,flowType:"dismiss"===t?t:`${"email"===t?"email":"phone"}-added${e?"-opt-in":""}`,step:"complete-"+("email"===t?"email":"phone-number")};window.AB&&window.AB.DATALAYER.trackProfileCompletion(i),window.AB.DATALAYER.setAnalyticsCrossPageData({action:"remove",name:"profileCompletionCheckBox"})}}static{this.ɵfac=function(t){return new(t||e)($d($E),$d(dC),$d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["success-screen-profile-completion"]],inputs:{flowType:"flowType"},decls:17,vars:6,consts:[[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[1,"d-flex"],["alt","",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],["id","phone-info-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],[1,"body-text"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],["data-tabindex","last",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"button",1),jf("click",(function(){return t.analyticsEvents("linkClick","close"),t.analyticsEvents("screenView","dismiss")})),Tf(2,"span",2),xf(),kf(3,"div",3)(4,"h2",4),am(5),xf(),kf(6,"div",5),Tf(7,"img",6),xf()()(),kf(8,"div",7)(9,"h3",8),am(10),xf(),kf(11,"div",9),am(12),xf()(),kf(13,"div",10)(14,"div",11)(15,"button",12),jf("click",(function(){return t.continue()}
1)),am(16),xf()()()),2&e&&(Vd(5),lm(t.phoneEmailCompleteTitle),Vd(2),zh("src",t.phoneEmailCompleteImageReference,id),Vd(3),cm(" ",t.phoneEmailCompleteSubTitle," "),Vd(2),cm(" ",t.phoneEmailCompleteText," "),Vd(3),gh("aria-label",t.phoneEmailCompleteSaveButton),Vd(),lm(t.phoneEmailCompleteSaveButton))},encapsulation:2})}}return e})(),hF=y(w()),fF=(()=>{class e{initRules(){let e;return e={"a-z":{field:"name",rule:[{field:"name",direction:-1,type:"string"}],label:"Alphabetical A - Z",sort_at:"client"},"a-z-description":{field:"description",rule:[{field:"description",direction:-1,type:"string"}],label:"Alphabetically",sort_at:"client"},"z-a":{field:"name",rule:[{field:"name",direction:-1,type:"string"}],label:"Alphabetical Z - A",sort_at:"client"},"search-rank":{field:"searchRank",rule:[{field:"searchRank",direction:-1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Search Ranking",sort_at:"client"},"most-popular":{field:"salesRank",rule:[{field:"salesRank",direction:1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Most Popular",sort_at:"client"},"price-low-high":{field:"price",rule:[{field:"price",direction:1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Price - Low to High",sort_at:"client"},"purchase-history":{field:"purchaseRank",rule:[{field:"purchaseRank",direction:-1,type:"string"}],label:"Purchase History",sort_at:"client"},"new-offers":{field:"arrivalRank",rule:[{field:"arrivalRank",direction:1,type:"string"}],label:"New Offers",sort_at:"client"},"about-to-expire":{field:"expiryRank",rule:[{field:"expiryRank",direction:1,type:"string"}],label:"About to Expire",sort_at:"client"},category:{field:"categoryId",rule:[{field:"categoryId",direction:1,type:"string"}],label:"Category",sort_at:"client"},"expiry-date":{field:"endDate",rule:[{field:"endDate",direction:1,type:"string"}],label:"Expiry Date",sort_at:"client"},"added-date":{field:"addedDate",rule:[{field:"addedDate",direction:1,type:"string"}],label:"Added Date",sort_at:"client"},"reward-card-specials":{field:"promoDescription",rule:[{field:"promoDescription",direction:-1,type:"custom",callback:(e,t)=>this.isPromoMatch(e[t.field])?"AAA":"ZZZ"},{field:"name",direction:-1,type:"string"}],label:this.appConfigService.getPromoDescription(),sort_at:"client"},aisles:{field:"groupByTemplate",rule:[],label:"Aisles",sort_at:"client"},aisles_departmentName:{field:"departmentName",rule:[{field:"departmentName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},aisles_aisleName:{field:"aisleName",rule:[{field:"aisleName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},aisles_shelfName:{field:"shelfName",rule:[{field:"shelfName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},"bloomreach-top-sellers":{field:"salesRank+asc",rule:null,label:"Top sellers",sort_at:"server"},"bloomreach-price-low-high":{field:"price+asc",rule:null,label:"Price low to high",sort_at:"server"},"bloomreach-best-match":{field:"",rule:null,label:"Best Match",sort_at:"server"},"bloomreach-club-card":{field:"promoType+asc",rule:null,label:this.appConfigService.getPromoDescription(),sort_at:"server"},aisles_coupons:{field:"purchaseInd",rule:[{field:"purchaseInd",direction:-1,type:"string"}],label:"Type of Coupons",sort_at:"client"},FREQUENCY:{field:"FREQUENCY",rule:null,label:"Frequently Purchased",sort_at:"server"},PURCHASE_DATE:{field:"PURCHASE_DATE",rule:null,label:"Purchase Date",sort_at:"server"},RECOMMENDED:{field:"RECOMMENDED",rule:null,label:"Recommended",sort_at:"server"},RECENTLY_PURCHASED:{field:"PURCHASE_DATE",rule:null,label:"Recently Purchased",sort_at:"server"}},e}isPromoMatch(e){let t=this.appConfigService.getPromorulesArray();if(!t||0===t.length)return!1;let i=!1;return t.forEach((function(t){e&&e.length>0&&e.match(t.rule)&&(i=!0)})),i}constructor(e){this.appConfigService=e,this.sorts=new Array,this.rules=this.initRules(),this.available=window.AB.availableSorts||[],this.hasSort()&&this.generate()}setAvailableSort(e){this.available=e}getDefaultSort(){return this.default||(this.available.filter((e=>"a-z"===e)).length>0?this.default=this.getSortByName("a-z"):this.default=this.available[0]?this.get
1SortByName(this.available[0]):this.getSortByName("a-z")),this.default}getDefaultSortForConfigurableSort(e){return this.available.filter((t=>t===e)).length>0?this.default=this.getSortByName(e):this.default=this.available[0]?this.getSortByName(this.available[0]):this.getSortByName(e),this.default}hasSort(){return!!this.available.length}getSortByName(e){return this.rules[e]}getSortOptions(e){let t=[];return e&&e.split(",").forEach(((e,i)=>{let n=this.getSortByName(e.trim());n&&t.push(new lP(n))})),t}getSorts(){return this.sorts}sort(e,t){let i=e&&e.rule?e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})):"",n=e&&e.rule?e.rule.map((e=>1===e.direction?"asc":"desc")):"";return hF.sortBy(t,i,n)}couponsSort(e,t){let i=e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})),n=e.rule.map((e=>1===e.direction?"asc":"desc"));return hF.sortBy(t,i,n)}generate(){0!==this.available.length&&(this.sorts=[],this.available.forEach(((e,t)=>{let i=this.rules[e];if(i){if("groupByTemplate"===i.field){let e="aisles_"+window.AB.headerType;i.rule=this.rules[e]?this.rules[e].rule:""}this.sorts.push(new lP(i)),void 0===this.default&&e===window.AB.defaultSort&&(this.default=i)}})))}static{this.ɵfac=function(t){return new(t||e)(lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),mF=y(oe(),1),gF=y(ue(),1),bF={authnUrl:"/authn",factorsUrl:"/authn/factors/",signupUrl:"/signup",convertUrl:"/api/uca/customers/",local:{currentEnv:"local",baseURL:"https://api-aem-qa1.albertsons.com",businessBaseURL:"https://api-aem-qa1.albertsons.com",csmsApimEndpoint:"/abs/qaint/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/qaint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"b63410670d33422186409d4ad55c9030"},oktaConfig:{issuer:"abs-qa1.oktapreview.com/oauth2",issuerSingleDomain:"acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oadvi6nvsQ3z9hKh0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27n0ivpn7iHSD40h8",safeway:"0oa27n0c9twKbv6Zv0h8",acmemarkets:"0oa27n0hu1wR4vTYA0h8",shaws:"0oa27n0hrqsUIUwJx0h8",vons:"0oa27n0jjkzlxqf4T0h8",randalls:"0oa27n2a33g39cNvv0h8",balduccis:"0oa27n26mx5Zlg7Pc0h8",carrsqc:"0oa27n2ue9lasfAQ00h8",jewelosco:"0oa27n2ues5bAMewQ0h8",starmarket:"0oa27n2vx3ipVb0Cd0h8",kingsfoodmarkets:"0oa27n318xgzXs2zr0h8",andronicos:"0oa27v8r15qL0AXSi0h8",haggen:"0oa27v8sc6sOp1tt80h8",tomthumb:"0oa27v8tv4rakPyq90h8",pavilions:"0oa27v8rdq5SuSPis0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27n3aorklQMJqy0h8",safeway:"0oa27n31vdswZwjVl0h8",acmemarkets:"0oa27n3wps699VkPV0h8",shaws:"0oa27n3z1z8Q7k0lq0h8",vons:"0oa27n4069fw9sioh0h8",randalls:"0oa27n406e5Dt4m340h8",balduccis:"0oa27n43k9rVkHNb10h8",carrsqc:"0oa27n493dovcmGtD0h8",jewelosco:"0oa27n4a0q6Obsyrh0h8",starmarket:"0oa27n49kwu8JajO00h8",kingsfoodmarkets:"0oa27n4aaetKbK3Kr0h8",andronicos:"0oa27v8y9nrqcxkZh0h8",haggen:"0oa27v8vkfkJJGBbg0h8",tomthumb:"0oa27v9r2yyyHeoXX0h8",pavilions:"0oa27v9wui37nmxKu0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}},b2bOktaConfig:{issuer:"business-acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oa1ry1uzbwyY3F7Y0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},dev1:{currentEnv:"dev1",baseURL:"https://api-aem-qa2.albertsons.com",businessBaseURL:"https://api-aem-qa2.albertsons.com",csmsApimEndpoint:"/abs/acceptanceint/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/devint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},oktaConfig:{issuer:"abs-qa1.oktapreview.com/oauth2",issuerSingleDomain:"acam-dev.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oadvi6nvsQ3z9hKh0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27n0ivpn7iHSD40h8",safeway:"0oa27n0c9twKbv6Zv0h8",acmemarkets:"0oa27n0hu1wR4vTYA0h8",shaws:"0oa27n0hrqsUIUwJx0h8",vons:"0oa27n0jjkzlxqf4T0h8",randalls:"0oa27n2a33g39cNvv0h8",balduccis:"0oa27n26mx5Zlg7Pc0h8",carrsqc:"0oa27n2ue9lasfAQ00h8",jewelosco:"0oa27n2ues5bAMewQ0h8",starmarket:"0oa27n2vx3ipVb0Cd0h8",kingsfoodmarkets:"0oa27n318xgzXs2zr0h8",andronicos:"0oa27v8r15qL0AXSi0h8",haggen:"0oa27v8sc6sOp1tt80h8",tomthumb:"0oa27v8tv4rakPyq90h8",pavilions:"0oa27v8rdq5SuSPis0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27n3aorklQMJqy0h8",safeway:"0oa27n31vdswZwjVl0h8",acmemarkets:"0oa27n3wps699VkPV0h8",shaws:"0oa27n3z1z8Q7k0lq0h8",vons:"0oa27n4069fw9sioh0h8",randalls:"0oa27n406e5Dt4m340h8",balduccis:"0oa27n43k9rVkHNb10h8",carrsqc:"0oa27n493dovcmGtD0h8",jewelosco:"0oa27n4a0q6Obsyrh0h8",starmarket:"0oa27n49kwu8JajO00h8",kingsfoodmarkets:"0oa27n4aaetKbK3Kr0h8",andronicos:"0oa27v8y9nrqcxkZh0h8",haggen:"0oa27v8vkfkJJGBbg0h8",tomthumb:"0oa27v9r2yyyHeoXX0h8",pavilions:"0oa27v9wui37nmxKu0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}}
1,b2bOktaConfig:{issuer:"business-acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oa1ry1uzbwyY3F7Y0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},dev2:{currentEnv:"qa1",baseURL:"https://api-aem-qa2.albertsons.com",businessBaseURL:"https://api-aem-qa2.albertsons.com",csmsApimEndpoint:"/abs/acceptanceint/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/devint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},oktaConfig:{issuer:"abs-qa1.oktapreview.com/oauth2",issuerSingleDomain:"acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oadvi6nvsQ3z9hKh0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27n0ivpn7iHSD40h8",safeway:"0oa27n0c9twKbv6Zv0h8",acmemarkets:"0oa27n0hu1wR4vTYA0h8",shaws:"0oa27n0hrqsUIUwJx0h8",vons:"0oa27n0jjkzlxqf4T0h8",randalls:"0oa27n2a33g39cNvv0h8",balduccis:"0oa27n26mx5Zlg7Pc0h8",carrsqc:"0oa27n2ue9lasfAQ00h8",jewelosco:"0oa27n2ues5bAMewQ0h8",starmarket:"0oa27n2vx3ipVb0Cd0h8",kingsfoodmarkets:"0oa27n318xgzXs2zr0h8",andronicos:"0oa27v8r15qL0AXSi0h8",haggen:"0oa27v8sc6sOp1tt80h8",tomthumb:"0oa27v8tv4rakPyq90h8",pavilions:"0oa27v8rdq5SuSPis0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27n3aorklQMJqy0h8",safeway:"0oa27n31vdswZwjVl0h8",acmemarkets:"0oa27n3wps699VkPV0h8",shaws:"0oa27n3z1z8Q7k0lq0h8",vons:"0oa27n4069fw9sioh0h8",randalls:"0oa27n406e5Dt4m340h8",balduccis:"0oa27n43k9rVkHNb10h8",carrsqc:"0oa27n493dovcmGtD0h8",jewelosco:"0oa27n4a0q6Obsyrh0h8",starmarket:"0oa27n49kwu8JajO00h8",kingsfoodmarkets:"0oa27n4aaetKbK3Kr0h8",andronicos:"0oa27v8y9nrqcxkZh0h8",haggen:"0oa27v8vkfkJJGBbg0h8",tomthumb:"0oa27v9r2yyyHeoXX0h8",pavilions:"0oa27v9wui37nmxKu0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}},b2bOktaConfig:{issuer:"business-acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oa1ry1uzbwyY3F7Y0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},qa1:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",businessBaseURL:"https://business-qa1.{banner}.com",csmsApimEndpoint:"/abs/qapub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/qaint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"b63410670d33422186409d4ad55c9030"},oktaConfig:{issuer:"abs-qa1.oktapreview.com/oauth2",issuerSingleDomain:"acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oadvi6nvsQ3z9hKh0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27n0ivpn7iHSD40h8",safeway:"0oa27n0c9twKbv6Zv0h8",acmemarkets:"0oa27n0hu1wR4vTYA0h8",shaws:"0oa27n0hrqsUIUwJx0h8",vons:"0oa27n0jjkzlxqf4T0h8",randalls:"0oa27n2a33g39cNvv0h8",balduccis:"0oa27n26mx5Zlg7Pc0h8",carrsqc:"0oa27n2ue9lasfAQ00h8",jewelosco:"0oa27n2ues5bAMewQ0h8",starmarket:"0oa27n2vx3ipVb0Cd0h8",kingsfoodmarkets:"0oa27n318xgzXs2zr0h8",andronicos:"0oa27v8r15qL0AXSi0h8",haggen:"0oa27v8sc6sOp1tt80h8",tomthumb:"0oa27v8tv4rakPyq90h8",pavilions:"0oa27v8rdq5SuSPis0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27n3aorklQMJqy0h8",safeway:"0oa27n31vdswZwjVl0h8",acmemarkets:"0oa27n3wps699VkPV0h8",shaws:"0oa27n3z1z8Q7k0lq0h8",vons:"0oa27n4069fw9sioh0h8",randalls:"0oa27n406e5Dt4m340h8",balduccis:"0oa27n43k9rVkHNb10h8",carrsqc:"0oa27n493dovcmGtD0h8",jewelosco:"0oa27n4a0q6Obsyrh0h8",starmarket:"0oa27n49kwu8JajO00h8",kingsfoodmarkets:"0oa27n4aaetKbK3Kr0h8",andronicos:"0oa27v8y9nrqcxkZh0h8",haggen:"0oa27v8vkfkJJGBbg0h8",tomthumb:"0oa27v9r2yyyHeoXX0h8",pavilions:"0oa27v9wui37nmxKu0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}}
1,b2bOktaConfig:{issuer:"business-acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oa1ry1uzbwyY3F7Y0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},qa2:{currentEnv:"qa2",baseURL:"https://www-qa2.{banner}.com",businessBaseURL:"https://business-qa2.{banner}.com",csmsApimEndpoint:"/abs/acceptancepub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/acceptanceint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"e5b1bf4a9c124561ba364ac53c2cbc66"},oktaConfig:{issuer:"abs-qa1.oktapreview.com/oauth2",issuerSingleDomain:"acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oadvi6nvsQ3z9hKh0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27n0ivpn7iHSD40h8",safeway:"0oa27n0c9twKbv6Zv0h8",acmemarkets:"0oa27n0hu1wR4vTYA0h8",shaws:"0oa27n0hrqsUIUwJx0h8",vons:"0oa27n0jjkzlxqf4T0h8",randalls:"0oa27n2a33g39cNvv0h8",balduccis:"0oa27n26mx5Zlg7Pc0h8",carrsqc:"0oa27n2ue9lasfAQ00h8",jewelosco:"0oa27n2ues5bAMewQ0h8",starmarket:"0oa27n2vx3ipVb0Cd0h8",kingsfoodmarkets:"0oa27n318xgzXs2zr0h8",andronicos:"0oa27v8r15qL0AXSi0h8",haggen:"0oa27v8sc6sOp1tt80h8",tomthumb:"0oa27v8tv4rakPyq90h8",pavilions:"0oa27v8rdq5SuSPis0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27n3aorklQMJqy0h8",safeway:"0oa27n31vdswZwjVl0h8",acmemarkets:"0oa27n3wps699VkPV0h8",shaws:"0oa27n3z1z8Q7k0lq0h8",vons:"0oa27n4069fw9sioh0h8",randalls:"0oa27n406e5Dt4m340h8",balduccis:"0oa27n43k9rVkHNb10h8",carrsqc:"0oa27n493dovcmGtD0h8",jewelosco:"0oa27n4a0q6Obsyrh0h8",starmarket:"0oa27n49kwu8JajO00h8",kingsfoodmarkets:"0oa27n4aaetKbK3Kr0h8",andronicos:"0oa27v8y9nrqcxkZh0h8",haggen:"0oa27v8vkfkJJGBbg0h8",tomthumb:"0oa27v9r2yyyHeoXX0h8",pavilions:"0oa27v9wui37nmxKu0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}},b2bOktaConfig:{issuer:"business-acam-qa.albertsons.com/oauth2",serverId:"ausdvuyculRIYitXg0h7",clientId:"0oa1ry1uzbwyY3F7Y0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},qa3:{currentEnv:"qa3",baseURL:"https://www-qa3.{banner}.com",businessBaseURL:"https://business-qa3.{banner}.com",csmsApimEndpoint:"/abs/perfpub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/perfint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"2af9cc1fbd3348f1bf4c47ee480542e5"},oktaConfig:{issuer:"abs-prf.oktapreview.com/oauth2",issuerSingleDomain:"acam-prf.albertsons.com/oauth2",serverId:"ausdwyebrzlqF3sZQ0h7",clientId:"0oadwzr395MFijA6b0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27lwnwjplYngYp0h8",safeway:"0oa27hr0i5h75fGH30h8",acmemarkets:"0oa27lx196mtuktTT0h8",shaws:"0oa27lx7t4qokcMdn0h8",vons:"0oa27lx4c8vZdMq4B0h8",randalls:"0oa27lxdufheCzom20h8",balduccis:"0oa27mxtnrmLZfzdS0h8",carrsqc:"0oa27mxongwSmmh8B0h8",jewelosco:"0oa27mxsjqaOzase70h8",starmarket:"0oa27mxsob47klEAH0h8",kingsfoodmarkets:"0oa27mxze3rNxxNWW0h8",andronicos:"0oa27ttcmqxKnzhRE0h8",haggen:"0oa27ttgon8B6Hlko0h8",tomthumb:"0oa27tub4djmKbClh0h8",pavilions:"0oa27tue8yhSTdYHO0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27mz0ik5KhkPKF0h8",safeway:"0oa27mys4rl6NW7F30h8",acmemarkets:"0oa27myzrcxvuFahj0h8",shaws:"0oa27mz624u2xJzxI0h8",vons:"0oa27mz47zf21IYmr0h8",randalls:"0oa27mz1eg3Xj7AkB0h8",balduccis:"0oa27mz4xmi1gqar10h8",carrsqc:"0oa27mz5fx7qCVTkc0h8",jewelosco:"0oa27mzaz6lrHLq5A0h8",starmarket:"0oa27mzfn3uDVEHLT0h8",kingsfoodmarkets:"0oa27mze5vlyAD8eK0h8",andronicos:"0oa27tuc6n7iWxNdr0h8",haggen:"0oa27tutov26DVKXp0h8",tomthumb:"0oa27tutchi9VMFT
1U0h8",pavilions:"0oa27tutshkv4mTCC0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}},b2bOktaConfig:{issuer:"business-acam-prf.albertsons.com/oauth2",serverId:"ausdwyebrzlqF3sZQ0h7",clientId:"0oa1t4ok2btKsU27L0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},stage:{currentEnv:"stage",baseURL:"https://www-stage.{banner}.com",businessBaseURL:"https://business-stage.{banner}.com",csmsApimEndpoint:"/abs/stgpub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/stgint/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"38c2e3420b8b450d9ffd5564ff22c4f0"},oktaConfig:{issuer:"abs-prf.oktapreview.com/oauth2",issuerSingleDomain:"acam-prf.albertsons.com/oauth2",serverId:"ausdwyebrzlqF3sZQ0h7",clientId:"0oadwzr395MFijA6b0h7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oa27lwnwjplYngYp0h8",safeway:"0oa27hr0i5h75fGH30h8",acmemarkets:"0oa27lx196mtuktTT0h8",shaws:"0oa27lx7t4qokcMdn0h8",vons:"0oa27lx4c8vZdMq4B0h8",randalls:"0oa27lxdufheCzom20h8",balduccis:"0oa27mxtnrmLZfzdS0h8",carrsqc:"0oa27mxongwSmmh8B0h8",jewelosco:"0oa27mxsjqaOzase70h8",starmarket:"0oa27mxsob47klEAH0h8",kingsfoodmarkets:"0oa27mxze3rNxxNWW0h8",andronicos:"0oa27ttcmqxKnzhRE0h8",haggen:"0oa27ttgon8B6Hlko0h8",tomthumb:"0oa27tub4djmKbClh0h8",pavilions:"0oa27tue8yhSTdYHO0h8",shopamigos:"0oa2g4yuaf5Aqe5s70h8",shopunitedsupermarkets:"0oa2gxmexpsdJ34Yw0h8",shopalbertsonsmarket:"0oa2gxmdo28HgByJb0h8",shopmarketstreet:"0oa2hen3l3jz0127l0h8"},appleIdp:{albertsons:"0oa27mz0ik5KhkPKF0h8",safeway:"0oa27mys4rl6NW7F30h8",acmemarkets:"0oa27myzrcxvuFahj0h8",shaws:"0oa27mz624u2xJzxI0h8",vons:"0oa27mz47zf21IYmr0h8",randalls:"0oa27mz1eg3Xj7AkB0h8",balduccis:"0oa27mz4xmi1gqar10h8",carrsqc:"0oa27mz5fx7qCVTkc0h8",jewelosco:"0oa27mzaz6lrHLq5A0h8",starmarket:"0oa27mzfn3uDVEHLT0h8",kingsfoodmarkets:"0oa27mze5vlyAD8eK0h8",andronicos:"0oa27tuc6n7iWxNdr0h8",haggen:"0oa27tutov26DVKXp0h8",tomthumb:"0oa27tutchi9VMFTU0h8",pavilions:"0oa27tutshkv4mTCC0h8",shopamigos:"0oa2g4zg0z1D4sS360h8",shopunitedsupermarkets:"0oa2gxmw5ifM4E6ed0h8",shopalbertsonsmarket:"0oa2gxmxwneJ1TDJR0h8",shopmarketstreet:"0oa2hemgwicVxH5i00h8"}},b2bOktaConfig:{issuer:"business-acam-prf.albertsons.com/oauth2",serverId:"ausdwyebrzlqF3sZQ0h7",clientId:"0oa1t4ok2btKsU27L0h8",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},betaprod:{currentEnv:"prod",baseURL:"https://www-beta.{banner}.com",businessBaseURL:"https://business-beta.{banner}.com",csmsApimEndpoint:"/abs/pub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/int/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"1d8f9e6f8b0d4ce29468d6d82f5847b8"},oktaConfig:{issuer:"albertsons.okta.com/oauth2",issuerSingleDomain:"ciam.albertsons.com/oauth2",serverId:"ausp6soxrIyPrm8rS2p6",clientId:"0oap6ku01XJqIRdl42p6",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oaz3z8102VeMQpUa2p7",safeway:"0oaz3z1jmdZo4Zllm2p7",acmemarkets:"0oaz3z91doyV4jehU2p7",shaws:"0oaz3z70x5YKXz4m52p7",vons:"0oaz3xtzakTXQVeMq2p7",randalls:"0oaz3z6aw56x2NMWa2p7",balduccis:"0oaz3z7zs5Wa0W2YL2p7",carrsqc:"0oaz3zdzvcQllnTQD2p7",jewelosco:"0oaz3z8bj4lc8n7kd2p7",starmarket:"0oaz3z7odrleEcmNN2p7",kingsfoodmarkets:"0oaz3zbph6tYFKNTb2p7",andronicos:"0oaz3zduvwZ8hY7Ek2p7",haggen:"0oaz3zdftfijCugmz2p7",tomthumb:"0oaz3zdavoAq1kpYX2p7",pavilions:"0oaz3zbpm3Epjy09G2p7",shopamigos:"0oa18crodgbc31vUP2p8",shopunitedsupermarkets:"0oa18crpapqnMAsnE2p8",shopalbertsonsmarket:"0oa18crl0y6ylDJi52p8",shopmarketstreet:"0oa18crku0nSEPBNv2p8"},appleIdp:{albertsons:"0oaz3ypq1baMH9h2v2p7",safeway:"0oaz3yqi4gfcmmG4i2p7",acmemarkets:"0oaz3ypv93Q5dxy3D2p7",shaws:"0oaz3yqwrcbua5PsR2p7",vons:"0oaz3xfwfqOGT3zV82p7",randalls:"0oaz3yt5k2kOaVNSp2p7",balduccis:"0oaz3yt85h1toCsnZ2p7",carrsqc:"0oaz3yzvcqBYIWUjq2p7",jewelosco:"0oaz3yuz85zsxXAGa2p7",starmarket:"0oaz3yscvqc9XvnTJ2p7",kingsfoodmarkets:"0oaz3yuw8jGAKHyhs2p7",andronicos:"0oaz3yuzoo8m34vlt2p7",haggen:"0oaz3z0krvYNdA3bJ2p7",tomthumb:"0oaz3yy1u6m6HKk9O2p7",pavilions:"0oaz3yx3nhR2E0Xa12p7",shopamigos:"0oa18iavyhvVQoXlB2p8",shopunitedsupermarkets:"0oa18cros79As5vu92p8",shopalbertsonsmarket:"0oa18crpd3ulA97B92p8",shopmarketstreet:"0oa18crkqrgUbUkA82p8"}},b2bOktaConfig:{issuer:"business-ciam.albertsons.com/oauth2",serverId:"ausp6soxrIyPrm8rS2p6",clientId:"0oapeguuj92adDSD22p7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},prod:{currentEnv:"prod",baseURL:"https://www.{banner}.com",businessBaseURL:"https://business.{banner}.com",csmsApimEndpoint:"/abs/pub/cnc/csmsservice/api/csms",postLoginEndpoint:"/abs/int/sso/api/v1/auth/postLogin",datapowerConfig:{cncSubscriptionKey:"9e38e3f1d32a4279a49a264e0831ea46"},oktaConfig:{issuer:"albertsons.okta.com/oauth2",issuerSingleDomain:"ciam.albertsons.com/oauth2",serverId:"ausp6soxrIyPrm8rS2p6",clientId:"0oap6ku01XJqIRdl42p6",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal",googleIdp:{albertsons:"0oaz3z8102VeMQpUa2p7",safeway:"0oaz3z1jmdZo4Zllm2p7",acmemarkets:"0oaz3z91doyV4jehU2p7",shaws:"0oaz3z70x5YKXz4m52p7",vons:"0oaz3xtzakTXQVeMq2p7",randalls:"0oaz3z6aw56x2NMWa2p7",balduccis:"0oaz3z7zs5Wa0W2YL2p7",carrsqc:"0oaz3zdzvcQllnTQD2p7",jewelosco:"0oaz3z8bj4lc8n7kd2p7",starmarket:"0oaz3z7odrleEcmNN2p7",kingsfoodmarkets:"0oaz3zbph6tYFKNTb2p7",andronicos:"0oaz3zduvwZ8hY7Ek2p7",haggen:"0oaz3zdftfijCugmz2p7",tomthumb:"0oaz3zdavoAq1kpYX2p7",pavilions:"0oaz3zbpm3Epjy09G2p7",shopamigos:"0oa18crodgbc31vUP2p8",shopunitedsupermarkets:"0oa18crpapqnMAsnE2p8",shopalbertsonsmarket:"0oa18crl0y6ylDJi52p8",shopmarketstreet:"0oa18crku0nSEPBNv2p8"},appleIdp:{albertsons:"0oaz3ypq1baMH9h2v2p7",safeway:"0oaz3yqi4gfcmmG4i2p7",acmemarkets:"0oaz3ypv93Q5dxy3D2p7",shaws:"0oaz3yqwrcbua5PsR2p7",vons:"0oaz3xfwfqOGT3zV82p7",randalls:"0oaz3yt5k2kOaVNSp2p7",balduccis:"0oaz3yt85h1toCsnZ2p7",carrsqc:"0oaz3yzvcqBYIWUjq2p7",jewelosco:"0oaz3yuz85zsxXAGa2p7",starmarket:"0oaz3yscvqc9XvnTJ2p7",kingsfoodmarkets:"0oaz3yuw8jGAKHyhs2p7",andronicos:"0oaz3yuzoo8m34vlt2p7",haggen:"0oaz3z0krvYNdA3bJ2p7",tomthumb:"0oaz3yy1u6m6HKk9O2p7",pavilions:"0oaz3yx3nhR2E0Xa12p7",shopamigos:"0oa18iavyhvVQoXlB2p8",shopunitedsupermarkets:"0oa18cros79As5vu92p8",shopalbertsonsmarket:"0oa18crpd3ulA97B92p8",shopmarketstreet:"0oa18crkqrgUbUkA82p8"}},b2bOktaConfig:{issuer:"business-ciam.albertsons.com/oauth2",serverId:"ausp6soxrIyPrm8rS2p6",clientId:"0oapeguuj92adDSD22p7",redirectUri:"/bin/safeway/unified/sso/authorize",spaRedirectUri:"/abs/qaint/sso/api/v1/auth/postLoginInternal"}},adjectives:["aback","abaft","abandoned","abashed","aberrant","abhorrent","abiding","abject","ablaze","able","abnormal","aboard","aboriginal","abortive","abounding","abrasive","abrupt","absent","absorbed","absorbing","abstracted","absurd","abundant","abusive","acceptable","accessible","accidental","accurate","acid","acidic","acoustic","acrid","action","active","actual","actually","adamant","adaptable","addicted","addicting","adept","adhesive","adjoining","adorable","adored","adroit","adventurous","affectionate","afraid","aggressive","agile","agonizing","agreeable","ahead","airy","ajar","alcoholic","alert","alike","alive","alleged","alluring","aloof","alter","amazing","ambiguous","ambitious","amiable","ample","amuck","amused","amusing","ancient","angry","animated","annoyed","annoying","anxious","apathetic","apt","aquatic","ardent","aromatic","arrogant","ashamed","aspiring","assorted","astonishing","astute","attractive","august","auspicious","automatic","available","average","avid","awake","aware","awesome","awful","axiomatic","bad","balmy","barbarous","bashful","bawdy","beautiful","beefy","befitting","belligerent","beneficial","benevolent","bent","berserk","best","better","bewildered","big","billowing","billowy","bitter","bizarre","black","blessed","bloody","blue","blushing","boiling","bold","boorish","bored","boring","boss","bouncy","boundless","brainy","brash","brave","brawny","breakable","breezy","brief","bright","brisk","broad","broken","brown","bumpy","burly","bustling","busy","cagey","calculating","callous","calm","can","canny","capable","capricious","cared","careful","careless","caring","casual","cautious","ceaseless","celestial","certain","changeable","charming","cheap","cheerful","chemical","chic","chief","childlike","chilly","chivalrous","choice","chosen","chubby","chummy","chunky","civic","civil","clammy","classy","clean","clear","clever","cloistered","close","closed","cloudy","clumsy","cluttered","cogent","coherent","cold","colorful","colossal","combative","comfortable","common","complete","complex","composed","concerned","condemned","confused","conscious","cooing","cool","cooperative","coordinated","cosmic","courageous","cowardly","cozy","crabby","craven","crazy","creepy","crooked","crowded","cruel","cuddly","cultured","cumbersome","curious","curly","curved","curvy","cut","cute","cynical","daffy","daily","dainty","damaged","damaging","damp","dandy","dangerous","dapper","daring","dark","dashing","dazzling","dead","deadpan","deafening","dear","debonair","decent","decisive","decorous","deep","deeply","defeated","defective","defiant","deft","delicate","delicious","delightful","delirious","deluxe","demonic","dependent","depressed","deranged","descriptive","deserted","detailed","determined","devilish","devout","didactic","different","difficult","diligent","direct","direful","dirty","disagreeable","disastrous","discreet","disgusted","disgusting","disillusioned","dispensable","distinct","disturbed","divergent","divine","dizzy","domineering","doted","doting","doubtful","drab","draconian","dramatic","dreamy","dreary","driven","drunk","dry","dull","dusty","dynamic","dysfunctional","eager","early","earsplitting","earthy","easy","eatable","economic","educated","efficacious","efficie
1nt","eight","elastic","elated","elderly","electric","elegant","elfin","elite","embarrassed","eminent","empty","enchanted","enchanting","encouraging","end","endurable","energetic","energized","enigmatic","enormous","entertaining","enthusiastic","envious","equable","equal","erect","erratic","ethereal","evanescent","evasive","even","evil","exact","excellent","excited","exciting","exclusive","exotic","expensive","expert","exuberant","exultant","fabulous","faded","faint","fair","faithful","fallacious","false","famed","familiar","famous","fanatical","fancy","fantastic","far","fascinated","fast","fat","faulty","fearful","fearless","feeble","feigned","female","fertile","festive","few","fierce","fiery","filthy","fine","finicky","first","fit","five","fixed","flagrant","flaky","flashy","flat","flawless","fleet","flimsy","flippant","flowery","flowing","fluent","fluffy","fluttering","flying","foamy","fond","foolish","for","foregoing","forgetful","forlorn","fortunate","four","fragile","frail","frank","frantic","free","freezing","frequent","fresh","fretful","friendly","frightened","frightening","full","fumbling","fun","functional","funny","furry","furtive","fuscia","future","futuristic","fuzzy","gabby","gainful","gamy","gaping","garrulous","gas","gaudy","general","genial","gentle","giant","giddy","gifted","gigantic","giving","glad","glamorous","gleaming","glib","glistening","glorious","glossy","gnarly","godly","gold","golden","good","goodly","goofy","gorgeous","graceful","grand","grandiose","grateful","gratis","gray","greasy","great","greedy","green","grey","grieving","groovy","grotesque","grouchy","grubby","gruesome","grumpy","guarded","guided","guiltless","gullible","gusty","gutsy","guttural","habitual","half","hallowed","haloed","halting","handsome","handsomely","handy","hanging","hapless","happy","hard","hardy","harmonious","harsh","hateful","heady","healthy","heartbreaking","hearty","heavenly","heavy","hellish","helpful","helpless","heroic","hesitant","hideous","high","highfalutin","hilarious","hip","hissing","historical","holistic","hollow","holy","homeless","homely","honest","honorable","horrible","hospitable","hot","huge","hulking","human","humane","humble","humdrum","humorous","hungry","hunky","hurried","hurt","hushed","husky","hypnotic","hysterical","icky","icy","ideal","idiotic","ignorant","ill","illegal","illustrious","imaginary","immense","imminent","immune","impartial","imperfect","impolite","important","imported","impossible","incandescent","incompetent","inconclusive","incredible","indigo","industrious","inexpensive","infamous","innate","innocent","inquisitive","insidious","instinctive","intelligent","interesting","internal","invincible","irate","irritating","itchy","jaded","jagged","jazzed","jazzy","jealous","jittery","jobless","jolly","jovial","joyful","joyous","jubilant","judicious","juicy","jumbled","jumpy","just","juvenile","kaput","keen","khaki","kind","kindhearted","kindly","kingly","knotty","knowing","knowledgeable","known","labored","lackadaisical","lacking","lame","lamentable","languid","large","last","late","laughable","lavish","lawful","lazy","lean","learned","left","legal","legit","lethal","level","lewd","light","like","likeable","liked","likely","limber","limitless","limping","literate","little","lively","living","lonely","long","longing","loose","lopsided","loud","lousy","loutish","loved","lovely","loving","low","lowly","loyal","lucid","lucky","ludicrous","lumpy","lush","luxuriant","lying","lyrical","macabre","macho","maddening","madly","magenta","magical","magnificent","main","majestic","major","makeshift","male","malicious","mammoth","maniacal","many","marked","married","marvelous","massive","master","material","materialistic","mature","max","maxed","mean","measly","meaty","medical","meek","mellow","melodic","melted","merciful","mere","merry","messy","mighty","military","milky","mindless","miniature","minor","mint","mirthful","miscreant","misty","mixed","moaning","modern","modest","moldy","momentous","money","moonlit","moral","motionless","mountainous","moving","mucho","muddled","mundane","murky","mushy","mute","mutual","mysterious","naive","nappy","narrow","nasty","native","natural","naughty","nauseating","near","neat","nebulous","necessary","needed","needless","needy","neighborly","nervous","new","next","nice","nifty","nimble","nine","nippy","noble","noiseless","noisy","nonchalant","nondescript","nonstop","normal","nostalgic","nosy","noted","novel","noxious","null","numberless","numero","numerous","nutritious","nutty","oafish","obedient","obeisant","obese","obnoxious","obscene","obsequious","observant","obsolete","obtainable","oceanic","odd","offbeat","okay","old","omniscient","one","onerous","open","opposite","optimal","orange","ordinary","organic","ossified","outgoing","outrageous","outstanding","oval","overconfident","overjoyed","overrated","overt","overwrought","pacific","painful","painstaking","pale","paltry","panicky","panoramic","parallel","parched","parsimonious","past","pastoral","pathetic","peaceful","peachy","penitent","peppy","perfect","periodic","permissible","perpetual","petite","phobic","physical","picayune","pink","piquant","pithy","placid","plain","plant","plastic","plausible","pleasant","plucky","plum","poetic","pointless","poised","polite","political","poor","posh","possessive","possible","potent","powerful","precious","premium","present","pretty","previous","pricey","prickly","prime","primo","private","prized","pro","probable","productive","profuse","prompt","proper","protective","proud","psychedelic","psychotic","public","puffy","pumped","punchy","puny","pure","purple","purring","pushy","puzzled","puzzling","quack","quaint","quarrelsome","questionable","quick","quickest","quiet","quirky","quixotic","quizzical","rabid","racial","rad","radioactive","ragged","rainy","rambunctious","rampant","rapid","rare","raspy","ratty","reach","ready","real","rebel","receptive","recondite","red","redundant","reflective","regal","regular","relieved","remarkable","reminiscent","repulsive","resilient","resolute","resonant","responsible","rhetorical","rich","right","righteou
1s","rightful","rigid","ripe","ritzy","roasted","robust","romantic","roomy","rooted","rosy","rotten","rough","round","royal","ruddy","rude","rugged","rural","rustic","ruthless","sable","sad","safe","salty","same","sassy","satisfying","saucy","savory","savvy","scandalous","scarce","scared","scary","scattered","scenic","scientific","scintillating","scrawny","screeching","second","secret","secretive","sedate","seemly","selective","selfish","sensitive","separate","serene","serious","shaggy","shaky","shallow","sharp","shiny","shivering","shocking","short","showy","shrewd","shrill","shut","shy","sick","silent","silky","silly","simple","simplistic","sincere","six","skillful","skinny","sleek","sleepy","slick","slim","slimy","slippery","sloppy","slow","small","smart","smelly","smiley","smiling","smoggy","smooth","snappy","snazzy","sneaky","snobbish","snotty","snowy","snugly","social","soft","soggy","sole","solid","solitary","somber","sophisticated","sordid","sore","sound","sour","spacial","sparkling","special","spectacular","spicy","spiffy","spiky","spiritual","spiteful","splendid","spooky","spotless","spotted","spotty","spry","spurious","squalid","square","squealing","squeamish","stable","staking","stale","standing","star","stark","statuesque","steadfast","steady","steep","stereotyped","sticky","stiff","stimulating","stingy","stoic","stormy","straight","strange","striped","strong","stunning","stupendous","stupid","sturdy","suave","subdued","subsequent","substantial","subtle","successful","succinct","sudden","sulky","sunny","sunset","super","superb","superficial","supreme","sure","swank","swanky","sweet","swell","sweltering","swift","symptomatic","synonymous","taboo","tacit","tacky","talented","tall","tame","tan","tangible","tangy","tart","tasteful","tasteless","tasty","tawdry","teal","tearful","tedious","teeny","telling","temporary","ten","tender","tense","tenuous","terrible","terrific","tested","testy","thankful","the","therapeutic","thick","thin","thinkable","third","thirsty","thoughtful","thoughtless","threatening","three","thriving","thundering","tidy","tight","tightfisted","timely","tiny","tired","tiresome","toothsome","top","tops","torpid","tough","touted","towering","tranquil","trashy","tremendous","tricky","trim","trite","tropical","troubled","truculent","true","trusty","truthful","try","two","typical","ubiquitous","ugliest","ugly","ultra","unable","unaccountable","unadvised","unarmed","unbecoming","unbiased","uncovered","understood","undesirable","undisturbed","unequal","unequaled","uneven","unhealthy","uninterested","unique","united","unkempt","unknown","unnatural","unruly","unsightly","unsuitable","untidy","unused","unusual","unwavering","unwieldy","unwritten","upbeat","uplifting","uppity","upset","uptight","urbane","usable","used","useful","useless","utmost","utopian","utter","uttermost","vacuous","vagabond","vague","valid","valuable","various","vast","vengeful","venomous","verdant","versed","vestal","viable","victorious","vigorous","violent","violet","vital","vivacious","vivid","vocal","vogue","voiceless","volatile","voracious","vulgar","wacky","waggish","waiting","wakeful","wandering","wanted","wanting","warlike","warm","wary","wasteful","watery","weak","wealthy","weary","wet","whimsical","whispering","white","whole","wholesale","wicked","wide","wiggly","wild","willing","windy","winged","wired","wiry","wise","wistful","witty","woebegone","womanly","wonderful","wooden","woozy","workable","worried","worthless","worthy","wrathful","wretched","wrong","wry","xenophobic","yellow","yielding","young","youthful","yummy","zany","zealous","zesty","zippy","zonked"],nouns:["account","achiever","acoustics","act","action","activity","actor","addition","adjustment","advertisement","advice","aftermath","afternoon","afterthought","agreement","air","airplane","airport","alarm","amount","amusement","anger","angle","animal","ants","apparatus","apparel","appliance","approval","arch","argument","arithmetic","arm","army","art","attack","attraction","aunt","authority","babies","baby","back","badge","bag","bait","balance","ball","base","baseball","basin","basket","basketball","bat","bath","battle","bead","bear","bed","bedroom","beds","bee","beef","beginner","behavior","belief","believe","bell","bells","berry","bike","bikes","bird","birds","birth","birthday","bit","bite","blade","blood","blow","board","boat","bomb","bone","book","books","boot","border","bottle","boundary","box","boy","brake","branch","brass","breath","brick","bridge","brother","bubble","bucket","building","bulb","burst","bushes","business","butter","button","cabbage","cable","cactus","cake","cakes","calculator","calendar","camera","camp","can","cannon","canvas","cap","caption","car","card","care","carpenter","carriage","cars","cart","cast","cat","cats","cattle","cause","cave","celery","cellar","cemetery","cent","chalk","chance","change","channel","cheese","cherries","cherry","chess","chicken","chickens","children","chin","church","circle","clam","class","cloth","clover","club","coach","coal","coast","coat","cobweb","coil","collar","color","committee","company","comparison","competition","condition","connection","control","cook","copper","corn","cough","country","cover","cow","cows","crack","cracker","crate","crayon","cream","creator","creature","credit","crib","crime","crook","crow","crowd","crown","cub","cup","current","curtain","curve","cushion","dad","daughter","day","death","debt","decision","deer","degree","design","de
1sire","desk","destruction","detail","development","digestion","dime","dinner","dinosaurs","direction","dirt","discovery","discussion","distance","distribution","division","dock","doctor","dog","dogs","doll","dolls","donkey","door","downtown","drain","drawer","dress","drink","driving","drop","duck","ducks","dust","ear","earth","earthquake","edge","education","effect","egg","eggnog","eggs","elbow","end","engine","error","event","example","exchange","existence","expansion","experience","expert","eye","eyes","face","fact","fairies","fall","fang","farm","fear","feeling","field","finger","fire","fireman","fish","flag","flame","flavor","flesh","flight","flock","floor","flower","flowers","fly","fog","fold","food","foot","force","fork","form","fowl","frame","friction","friend","friends","frog","frogs","front","fruit","fuel","furniture","gate","geese","ghost","giants","giraffe","girl","girls","glass","glove","gold","government","governor","grade","grain","grandfather","grandmother","grape","grass","grip","ground","group","growth","guide","guitar","gun","hair","haircut","hall","hammer","hand","hands","harbor","harmony","hat","hate","head","health","heat","hill","history","hobbies","hole","holiday","home","honey","hook","hope","horn","horse","horses","hose","hospital","hot","hour","house","houses","humor","hydrant","ice","icicle","idea","impulse","income","increase","industry","ink","insect","instrument","insurance","interest","invention","iron","island","jail","jam","jar","jeans","jelly","jellyfish","jewel","join","judge","juice","jump","kettle","key","kick","kiss","kittens","kitty","knee","knife","knot","knowledge","laborer","lace","ladybug","lake","lamp","land","language","laugh","leather","leg","legs","letter","letters","lettuce","level","library","limit","line","linen","lip","liquid","loaf","lock","locket","look","loss","love","low","lumber","lunch","lunchroom","machine","magic","maid","mailbox","man","marble","mark","market","mask","mass","match","meal","measure","meat","meeting","memory","men","metal","mice","middle","milk","mind","mine","minister","mint","minute","mist","mitten","mom","money","monkey","month","moon","morning","mother","motion","mountain","mouth","move","muscle","name","nation","neck","need","needle","nerve","nest","night","noise","north","nose","note","notebook","number","nut","oatmeal","observation","ocean","offer","office","oil","orange","oranges","order","oven","page","pail","pan","pancake","paper","parcel","part","partner","party","passenger","payment","peace","pear","pen","pencil","person","pest","pet","pets","pickle","picture","pie","pies","pig","pigs","pin","pipe","pizzas","place","plane","planes","plant","plantation","plants","plastic","plate","play","playground","pleasure","plot","plough","pocket","point","poison","pollution","popcorn","porter","position","pot","potato","powder","power","price","produce","profit","property","prose","protest","pull","pump","punishment","purpose","push","quarter","quartz","queen","question","quicksand","quiet","quill","quilt","quince","quiver","rabbit","rabbits","rail","railway","rain","rainstorm","rake","range","rat","rate","ray","reaction","reading","reason","receipt","recess","record","regret","relation","religion","representative","request","respect","rest","reward","rhythm","rice","riddle","rifle","ring","rings","river","road","robin","rock","rod","roll","roof","room","root","rose","route","rub","rule","run","sack","sail","salt","sand","scale","scarecrow","scarf","scene","scent","school","science","scissors","screw","sea","seashore","seat","secretary","seed","selection","self","sense","servant","shade","shake","shame","shape","sheep","sheet","shelf","ship","shirt","shock","shoe","shoes","shop","show","side","sidewalk","sign","silk","silver","sink","sister","sisters","size","skate","skin","skirt","sky","slave","sleep","sleet","slip","slope","smash","smell","smile","smoke","snail","snails","snake","snakes","sneeze","snow","soap","society","sock","soda","sofa","son","song","songs","sort","sound","soup","space","spade","spark","spiders","sponge","spoon","spot","spring","spy","square","squirrel","stage","stamp","star","start","statement","station","steam","steel","stem","step","stew","stick","sticks","stitch","stocking","stomach","stone","stop","store","story","stove","stranger","straw","stream","street","stretch","string","structure","substance","sugar","suggestion","suit","summer","sun","supp
1ort","surprise","sweater","swim","swing","system","table","tail","talk","tank","taste","tax","teaching","team","teeth","temper","tendency","tent","territory","test","texture","theory","thing","things","thought","thread","thrill","throat","throne","thumb","thunder","ticket","tiger","time","tin","title","toad","toe","toes","tomatoes","tongue","tooth","toothbrush","toothpaste","top","touch","town","toy","toys","trade","trail","train","trains","tramp","transport","tray","treatment","tree","trees","trick","trip","trouble","trousers","truck","trucks","tub","turkey","turn","twig","twist","umbrella","uncle","underwear","unit","use","vacation","value","van","vase","vegetable","veil","vein","verse","vessel","vest","view","visitor","voice","volcano","volleyball","voyage","walk","wall","war","wash","waste","watch","water","wave","waves","wax","way","wealth","weather","week","weight","wheel","whip","whistle","wilderness","wind","window","wine","wing","winter","wire","wish","woman","women","wood","wool","word","work","worm","wound","wren","wrench","wrist","writer","writing","yak","yam","yard","yarn","year","yoke","zebra","zephyr","zinc","zipper","zoo"],cities:["bangor","orono","augusta","portland","camden","verona","bucksport","hampden","brewer","hermon","kennebunkport","acadia","barharbor","presqueisle","etna","waterville","scaroborough","perry","eastport","freeport"],names:["annie","brielle","bill","arvind","sumit","sriram","ashutosh","lee","tahla","umair","jen","bernardo","sean","gerard","harsha","uma","hatim","edwin","shamal","girish"]};function yF(){return window}var vF=(()=>{class e{constructor(e){this._http=e,this.env="",this.config=bF,this.resignIn="false",this.correlationId="",this.flowType=new Tt(""),this.flowType$=this.flowType.asObservable(),this.createAccountFlow="normal",this.landingPage=new Tt(!1),this.landingPage$=this.landingPage.asObservable(),this.isPageView=new Tt(!1),this.isPageView$=this.isPageView.asObservable(),this.closeModal=new Tt(!1),this.closeModal$=this.closeModal.asObservable(),this.timerValue=new Tt(300),this.timerValue$=this.timerValue.asObservable(),this.thirdPartyFlow="false",this.googleSignInFlag=!1,this.appleSignInFlag=!1,this.closeBtnFocusEventSubject=new kt,this.closeBtnFocusEvent$=this.closeBtnFocusEventSubject.asObservable(),this.singleSignInPageEnabled=!1,this.is1PsingleSignInPageEnabled=!1,this.chicoryObj={clientId:"",redirectUri:"",state:"",urlParams:{},chicoryFlow:!1,loginHint:{username:""}},this.loginHintFlow=new Tt(!1),this.loginHintFlow$=this.loginHintFlow.asObservable(),this.__encode=function(e){let t="",i=e.length;for(let n=0;n<i;n++)t+=e.charCodeAt(n).toString(10);return Number(t)},this.triggerThirdPartyAuthFlow=function(){let e=window.location.search;if(this.chicoryObj.clientId=this.getURLParameterByName("clientId",!0),this.chicoryObj.redirectUri=this.getURLParameterByName("redirect_uri",!0),this.chicoryObj.version=this.getURLParameterByName("v",!0),this.chicoryObj.state=this.getURLParameterByName("state",!0),null!==this.chicoryObj.clientId&&null!==this.chicoryObj.redirectUri||"2.0"==this.chicoryObj.version&&null!==this.chicoryObj.state||this.singleSignInPageEnabled&&null!==this.chicoryObj.state){if(new URLSearchParams(e).forEach(((e,t)=>{"clientId"!==t&&"redirect_uri"!==t&&(this.chicoryObj.urlParams[t]=e)})),this.chicoryObj.chicoryFlow=!0,"2.0"==this.chicoryObj.version&&this.chicoryObj.state){this.chicoryObj.loginHint=this.getLoginHint();let e=this.getURLParameterByName("comp_id",!0);this.chicoryObj.loginHint&&""!==this.chicoryObj.loginHint.username&&"diff-acct"!==e&&this.loginHintFlow.next(!0)}}else window.location.href="error/404.html"},this.getGrantsAndRedirect=function(e){let t,i=!1,n=!1,r="2.0"==this.getURLParameterByName("v",!0),s=this.isB2BSite?this.config[this.env]?.b2bOktaConfig:this.config[this.env]?.oktaConfig,a=r?s.serverId:yF().SWY.CONFIGSERVICE.oktaConfig.thirdPartyOauth2ServerId;if(t=yF().SWY.CONFIGSERVICE.oktaConfig.thirdPartyUrl+"/"+a+"/v1/authorize?prompt=&response_type=code&response_mode=query&nonce=ovJgrUobDYQKhiownVT9jU1GvtkRdpC4Eoyal2SfgGu6ezXG5b03393l08xbDGw8&sessionToken="+e,r){for(let e in this.chicoryObj.urlParam
1s)this.chicoryObj.urlParams.hasOwnProperty(e)&&"v"!==e&&"comp_id"!==e&&(t+=`&${e}=${this.chicoryObj.urlParams[e]}`);t+="&redirect_uri="+window.location.origin+this.config[this.env]?.postLoginEndpoint+"&client_id="+s.clientId+"&scope=openid%20profile%20email%20offline_access"}else{t+="&client_id="+this.chicoryObj.clientId+"&redirect_uri="+this.chicoryObj.redirectUri;for(let e in this.chicoryObj.urlParams)this.chicoryObj.urlParams.hasOwnProperty(e)&&(t+=`&${e}=${this.chicoryObj.urlParams[e]}`,"state"==e?i=!0:"scope"==e&&(n=!0));i||(t+="&state="+this.generateWords(4)),n||(t+="&scope=openid%20loyalty%20cart")}window.location.href=t},this.getURLParameterByName=function(e,t){let i=RegExp("[?&]"+e+"=([^&]*)").exec(window.location.search);return 0==t?i?i[1].replace(/\+/g," "):null:i?decodeURIComponent(i[1].replace(/\+/g," ")):null},this.env=this.getCurrentEnvironment(),this.banner=yF().AB.userInfo.banner,this.isB2BSite=yF().AB.COMMON.isB2BSite(),this.CSMS_ENDPOINT=this.config[this.env]?.csmsApimEndpoint}formatPhoneNumber(e){if(e&&e.length>0){return"("+e.slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}}generateUUID(e,t){if(this.correlationId.length>0)return this.correlationId;{let i=(new Date).getTime(),n=Math.floor(performance.now()*i);return e&&e.length>0&&!isNaN(e)&&(n+=Number(e)),t&&t.length>0&&(n+=this.__encode(t)),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/([xy])/g,(function(e){let t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===e?t:3&t|8).toString(16)}))}}getCurrentEnvironment(){let e="";return e=window.location.origin.indexOf("dev1")>0||window.location.origin.indexOf("dev2")>0||window.location.origin.indexOf("dev3")>0||window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?"local":window.location.origin.indexOf("beta")>0?"betaprod":"prod",e}generateHash(e){let t,i=yF().SWY?.CONFIGSERVICE?.featureToggleConfig?.isCryptoJsDecomissioned,n=e.toUpperCase();return t=i?(0,gF.sha256)(n):(0,mF.SHA256)(n).toString(mF.enc.Hex),t}getDeviceToken(){if(yF().SWY?.CONFIGSERVICE?.featureToggleConfig?.isCryptoJsDecomissioned)return yF().AB.COMMON.getDeviceId();let e=navigator.userAgent+navigator.mimeTypes.length+navigator.plugins.length+window.screen.width+window.screen.height+window.screen.pixelDepth;return(0,mF.MD5)(e).toString(mF.enc.Hex)}getHeaders(){return{"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json","ocp-apim-subscription-key":this.config[this.env]?.datapowerConfig.cncSubscriptionKey,"x-swy-correlation-id":this.generateUUID(),"x-swy-date":(new Date).toUTCString(),"x-swy-banner":this.banner,"x-swy-client-id":"web-portal"}}getHeadersNewDeviceLoginV2(){return{"Content-Type":"application/vnd.safeway.v2+json",Accept:"application/vnd.safeway.v2+json","ocp-apim-subscription-key":this.config[this.env]?.datapowerConfig.cncSubscriptionKey,"x-swy-correlation-id":this.generateUUID(),"x-swy-date":(new Date).toUTCString(),"x-swy-banner":this.banner,"x-swy-client-id":"web-portal"}}getHeadersSignUp(){let e=this.generateUUID();return{"Content-Type":"application/vnd.safeway.v2+json",Accept:"application/vnd.safeway.v2+json","ocp-apim-subscription-key":this.config[this.env]?.datapowerConfig.cncSubscriptionKey,"x-swy-correlation-id":e,"x-swy-request-id":e,"x-swy-date":(new Date).toUTCString(),"x-swy_banner":this.banner,"x-swy-client-id":"web-portal"}}getUcaHttpOptionsV3(){let e=this.generateUUID(),t=this.config[this.env]?.datapowerConfig.cncSubscriptionKey;return{Accept:"application/vnd.safeway.v3+json","x-swy-banner":this.banner,"ocp-apim-subscription-key":t,"Content-Type":"application/vnd.safeway.v3+json","x-swy-client-name":"web-portal","x-swy-correlation-id":e,"x-swy-date":(new Date).toUTCString()}}getCSMSEndpoint(){let e;return e=this.isB2BSite?this.getBusinessBaseUrl():this.getBaseUrl().replace("{banner}",this.banner),e+this.config[this.env]?.csmsApimEndpoint}getBaseUrl(){return this.config[this.env]?.baseURL}getBusinessBaseUrl(){return this.config[this.env]?.businessBaseURL.replace("{banner}",this.banner)}getAuthorizeURL(e){let t,i,n=this.isB2BSite?this.config[this.env]?.b2bOktaConfig:this.config[this.env]?.oktaConfig,r=window.location.origin,s=window.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableOktaSingleDomain?n.issuerSingleDomain:n.issuer;if(this.singleSignInPageEnabled){let a=this.getURLParameterByName("state",!0);a=e?this.get3pSocialStateParam(a,e)+"&prompt=login":a,t=r+this.config[this.env]?.postLoginEndpoint,i="https://"+s+"/"+n.serverId+"/v1/authorize?client_id="+n.clientId+"&redirect_uri="+t+"&response_type=code&response_mode=query&nonce=ovJgrUobDYQKhiownVT9jU1GvtkRdpC4Eoyal2SfgGu6ezXG5b03393l08xbDGw8&scope=openid%20profile%20email%20offline_access%20used_credentials%20metadata&state="+a}else{if(this.is1PsingleSignInPageEnabled){let e=this.getRedirectFromState();yF().SWY.CONFIGSERVICE.setCookie("ECommRedirectURL",e,1)}t=r+n.redirectUri,i="https://"+s+"/"+n.serverId+"/v1/authorize?client_id="+n.clientId+"&redirect_uri="+t+"&response_type=code&response_mode=query&nonce=ovJgrUobDYQKhiownVT9jU1GvtkRdpC4Eoyal2SfgGu6ezXG5b03393l08xbDGw8&scope=openid%20profile%20email%20offline_access%20used_credentials%20metadata&state="+this.generateWords(4)}return i}getSignInRegPageURLWithParam(e){let t=window.location.search,i=new URLSearchParams(t);i.set("v","2.0"),i.set("comp_id","login");let n=i.toString();return"signIn"==e?"/account/sign-in.html?"+n:"/account/short-registration.html?"+n}get3pSocialStateParam(e,t){let i=atob(e),n=JSON.parse(i);n.sl=t;let r=JSON.stringify(n);return r=btoa(r),r}getSocialAuthorizeURL(e){let t,i=this.isB2BSite?this.config[this.env]?.b2bOktaConfig:this.config[this.env]?.oktaConfig;if("true"==this.thirdPartyFlow)t=this.get3pAuthorizeURL(e);else if(this.singleSignInPageEnabled)t=this.getAuthorizeURL(e),"google"==e&&(t+="&idp="+i.googleIdp[this.banner]),"apple"==e&&(t+="&idp="+i.appleIdp[this.banner]);else{t=this.getAuthorizeURL();let n=yF().SWY.CONFIGSERVICE.featureToggleConfig?.enableSingleSignInPage?this.get
1SourceFromURL():"";"google"==e&&(t+="-googleidp"+n+"&idp="+i.googleIdp[this.banner]),"apple"==e&&(t+="-appleidp"+n+"&idp="+i.appleIdp[this.banner]),t+="&prompt=login"}return t}getSourceFromURL(){let e="",t=new URLSearchParams(location.search).get("state");if(t){let i=atob(t),{payload:n}=JSON.parse(i);e=n?.src||""}return e&&(e=`-${e.toUpperCase()}`),e}getRedirectFromState(){let e="",t=new URLSearchParams(location.search).get("state");if(t){let i=atob(t),{payload:n}=JSON.parse(i);e=n?.purl||""}return e}sendPostRequest(e,t,i){return this._http.post(e,t,{headers:i,responseType:"json",observe:"response"})}generateWords(e){let t=new Array(e),i=e/2+1,n=new Array(i),r=new Array(i),s=null,a=bF.cities,o=bF.names,l=null,c=null,d=null,u=-1;for(let i=0;i<e;i++){i%2==0?(s=bF.adjectives,l=n):(s=bF.nouns,l=r),u=-1;do{u=this.getRandomInt(s.length)}while(l.indexOf(u)>-1);l.push(u),t[i]=s[u]}c=t[0]+"-"+t[1],d=t[2]+"-"+t[3];let p=a[Math.floor(Math.random()*a.length)],h=o[Math.floor(Math.random()*o.length)];return"true"==this.resignIn?c+="-"+p+"-"+h:"false"==this.resignIn?c+="-"+p+"-"+t[2]:c+="-"+d,c}getRandomInt(e){return Math.floor(Math.random()*Math.floor(e))}setDatalayerError(e,t,i){yF().AB.DATALAYER&&window.AB.DATALAYER.setError(e,t,i)}verificationCodeTimer(){this.timerSubscription&&this.timerSubscription.unsubscribe(),this.timer$=Ui(1e3).pipe(bi((e=>300-e)),pn((e=>e>=0))),this.timerSubscription=this.timer$.subscribe({next:e=>{this.timerValue.next(e)}})}getLoginHint(){let e=atob(this.chicoryObj.state),t=JSON.parse(e),i={username:""};return t&&t.payload&&t.payload.lh&&(i.username=t.payload.lh),i}get3pAuthorizeURL(e){let t=this.isB2BSite?this.config[this.env]?.b2bOktaConfig:this.config[this.env]?.oktaConfig,i=this.getURLParameterByName("state",!0),n=this.get3pSocialStateParam(i,e),r="google"==e?t.googleIdp[this.banner]:t.appleIdp[this.banner],s="2.0"==this.getURLParameterByName("v",!0)?t.serverId:yF().SWY.CONFIGSERVICE.oktaConfig.thirdPartyOauth2ServerId;return yF().SWY.CONFIGSERVICE.oktaConfig.thirdPartyUrl+"/"+s+"/v1/authorize?prompt=login&response_type=code&response_mode=query&nonce=ovJgrUobDYQKhiownVT9jU1GvtkRdpC4Eoyal2SfgGu6ezXG5b03393l08xbDGw8&redirect_uri="+window.location.origin+this.config[this.env]?.postLoginEndpoint+"&client_id="+t.clientId+"&scope=openid%20profile%20email%20offline_access&state="+n+"&idp="+r}closeModalFocus(){this.closeBtnFocusEventSubject.next()}socialLoginFlags(){let e="2.0"===this.getURLParameterByName("v",!0),t=!this.isB2BSite,i=window.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableAppleSignIn;(this.thirdPartyFlow&&e||"false"==this.thirdPartyFlow)&&(this.googleSignInFlag=t,i&&(this.appleSignInFlag=t))}setLandingPageFlag(){let e="sign-intro"==this.getURLParameterByName("comp_id",!0);this.landingPage.next(e)}setOnboardEventCookie(e){let t=encodeURIComponent(JSON.stringify(e));yF().AB.COMMON.setCookie("ACI_S_onboardEvent",t,0)}singleSignInPage(){let e=this.getURLParameterByName("state",!0);if(e){let t;try{t=JSON.parse(atob(e))}catch(e){return void console.warn("state is not a JSON",e)}"2"==t?.payload?.ver&&0==t?.payload?.is1p?(this.singleSignInPageEnabled=!0,this.triggerThirdPartyAuthFlow()):"2"==t?.payload?.ver&&1==t?.payload?.is1p&&(this.is1PsingleSignInPageEnabled=!0)}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function wF(e,t){if(1&e&&(kf(0,"div",17)(1,"div",18),am(2,"*View details in "),kf(3,"a",19),am(4,"terms and conditions "),xf()()()),2&e){let e=Yf();Vd(3),Jf("href",e.lpProps.termsConditionsLink,id)}}var _F=(()=>{class e{constructor(e){this.authService=e}ngOnInit(){}displaySignInPage(){this.authService.flowType.next("signIn"),this.authService.landingPage.next(!1)}displayCreateAccountPage(){this.authService.flowType.next("createAccount"),this.authService.landingPage.next(!1)}static{this.ɵfac=function(t){return new(t||e)($d(vF))}}static{this.ɵcmp=Qr({type:e,selectors:[["landing-page"]],inputs:{lpProps:"lpProps"},decls:39,vars:15,consts:[[1,"landing-pg"],[1,"landing-pg__sign-in"],[1,"landing-pg__title"],[1,"body-text-sm","landing-pg__body"],["tabindex","0","aria-label","Sign in",1,"btn","btn-md","btn-primary","auth-styles__btn","mb-2
10",3,"click"],[1,"landing-pg__create-acct"],[1,"title-sm","landing-pg__info__title"],[1,"body-text","landing-pg__body"],["aria-label","Create account","tabindex","0",1,"btn","btn-md","btn-secondary","auth-styles__btn",3,"click"],[1,"landing-pg__info"],[1,"landing-pg__benefits"],[1,"landing-pg__benefit"],["loading","lazy",1,"landing-pg__benefit__icon",3,"src"],[1,"landing-pg__benefit__text"],[1,"title-xs"],[1,"body-text-xs","landing-pg__benefit__subtext"],["ngIf","lpProps.termsConditionsLink","class","landing-pg__benefit__tc",4,""],["ngIf","lpProps.termsConditionsLink",1,"landing-pg__benefit__tc"],[1,"body-text-xxs"],["data-tabindex","last","tabindex","0","target","_blank","aria-label","Terms and Conditions, opens in a new tab",1,"privacy-policy","link-underline",3,"href"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"h1",2),am(3),xf(),kf(4,"div",3),am(5),xf(),kf(6,"button",4),jf("click",(function(){return t.displaySignInPage()})),am(7),xf()(),kf(8,"div",5)(9,"div",6),am(10),xf(),kf(11,"div",7),am(12),xf(),kf(13,"button",8),jf("click",(function(){return t.displayCreateAccountPage()})),am(14),xf()(),kf(15,"div",9)(16,"div",10)(17,"div",11),Tf(18,"img",12),kf(19,"div",13)(20,"div",14),am(21),xf(),kf(22,"div",15),am(23),xf()()(),kf(24,"div",11),Tf(25,"img",12),kf(26,"div",13)(27,"div",14),am(28),xf(),kf(29,"div",15),am(30),xf()()(),kf(31,"div",11),Tf(32,"img",12),kf(33,"div",13)(34,"div",14),am(35),xf(),kf(36,"div",15),am(37),xf()()(),ph(38,wF,5,1,"div",16),xf()()()),2&e&&(Vd(3),lm(t.lpProps.guestSignInTitle),Vd(2),lm(t.lpProps.guestSignInSubTitle),Vd(2),lm(t.lpProps.guestSignInButton),Vd(3),lm(t.lpProps.guestCreateAccountTitle),V
1d(2),lm(t.lpProps.guestCreateAccountSubtitle),Vd(2),lm(t.lpProps.guestCreateAccountButton),Vd(4),Jf("src",t.lpProps.promo1ImageReference,id),Vd(3),lm(t.lpProps.Promo1Text),Vd(2),lm(t.lpProps.Promo1Subtext),Vd(2),Jf("src",t.lpProps.promo2ImageReference,id),Vd(3),lm(t.lpProps.Promo2Text),Vd(2),lm(t.lpProps.Promo2Subtext),Vd(2),Jf("src",t.lpProps.promo3ImageReference,id),Vd(3),lm(t.lpProps.Promo3Text),Vd(2),lm(t.lpProps.Promo3Subtext))},dependencies:[cy],encapsulation:2})}}return e})();function SF(){return window}var CF=(()=>{class e{constructor(e){this.authService=e,this.SIGNUP_URL=bF.signupUrl,this.SEND_URL=bF.factorsUrl,this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this.createAcctData={},this.createAcctFormData={},this.currentScreen.next("createAccountForm")}setFormData(e){this.createAcctFormData=e}getFormData(){return this.createAcctFormData}changeAccount(){this.currentScreen.next("enterUsername")}clearCreateAcctData(){Object.keys(this.createAcctData).forEach((e=>delete this.createAcctData[e])),Object.keys(this.createAcctFormData).forEach((e=>delete this.createAcctFormData[e]))}autoSignInAfterRegistration(e){let t=!!SF().SWY.CONFIGSERVICE.featureToggleConfig?.enableSHLandingScreen,i=!!SF().SWY.CONFIGSERVICE.featureToggleConfig?.enablePostAuthNotifyMessage;if(e&&e.length>0){let n=this.authService.getAuthorizeURL()+"&sessionToken="+e,r={emailOptIn:!!this.createAcctFormData&&this.createAcctFormData.emailSubscribe,smsOptIn:!!this.createAcctFormData&&this.createAcctFormData.textSubscribe};if(i?SF().AB.COMMON.postAuthUserNotifyReload("Account created. You're now signed in!"):SF().AB.COMMON.userNotifyReloadPage("Account created. You're now signed in!"),localStorage.setItem("create-account-success","true"),localStorage.setItem("complete-b2b-business-profile","created"),localStorage.setItem("analyticsEmailAndSmsOptIn",JSON.stringify(r)),SF().SWY.CONFIGSERVICE.checkLocalStorageRefresh(),t&&SF().AB.COMMON.authorize()){let t=window.location.pathname.includes("pharmacy")?"&newPharmacyAccount=true":"";SF().AB.COMMON.setCookie("ECommRedirectURL",window.location.origin+window.location.pathname+"?sessionToken="+e+t,0),SF().SWY.OKTA.silentSignOutFromOkta(event)}else SF().SWY.CONFIGSERVICE.setDomainCookie("SAFEWAY_KMSI",!0,SF().SWY.CONFIGSERVICE.resolvedBanner+".com",90),SF().location.href=n}}static{this.ɵfac=function(t){return new(t||e)(lr(vF))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),IF=(()=>{class e{constructor(e){this.host=e}ngAfterViewInit(){setTimeout((()=>{this.host.nativeElement.focus()}),100)}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵdir=ts({type:e,selectors:[["","authautofocus",""]]})}}return e})(),AF=["createAccountFormError"],kF=e=>({"input-field--error":e});function xF(e,t){if(1&e&&(kf(0,"h1",52),am(1),xf()),2&e){let e=Yf();Vd(),lm(e.createAccountProps.createAccountTitle)}}function TF(e,t){if(1&e&&(kf(0,"h2",52),am(1),xf()),2&e){let e=Yf();Vd(),lm(e.createAccountProps.createAccountTitle)}}function PF(e,t){if(1&e&&(kf(0,"div",49),am(1),xf()),2&e){let e=Yf(2);Vd(),cm("",e.errorMsg," ")}}function EF(e,t){if(1&e){let e=Mf();kf(0,"div",49),am(1," The email address you've entered is associated with an existing active account. "),kf(2,"a",59),jf("click",(function(){return Wa(e),Ha(Yf(2).goToSignIn())}))("keydown.space",(function(){return Wa(e),Ha(Yf(2).goToSignIn())})),am(3," Sign in"),xf(),am(4," to convert your account or try a different email address. "),xf()}}function DF(e,t){if(1&e){let e=Mf();kf(0,"div",49),am(1," The phone number you've entered is associated with an existing active account. "),kf(2,"a",59),jf("click",(function(){return Wa(e),Ha(Yf(2).goToSignIn())}))("keydown.space",(function(){return Wa(e),Ha(Yf(2).goToSignIn())})),am(3," Sign in "),xf(),am(4," to convert your account or try a different phone number. "),xf()}}function OF(e,t){if(1&e){let e=Mf();kf(0,"div",49),am(1," The email address or phone number you entered is associated with an existing active account. "),kf(2,"a",59),jf("click",(function(){return Wa(e),Ha(Yf(2).goToSignIn())}))("keydown.space",(function(){return Wa(e),Ha(Yf(2).goToSignIn())}
1)),am(3," Sign in "),xf(),am(4," to convert your account or try a different email address or phone number. "),xf()}}function BF(e,t){if(1&e&&(Ef(0),kf(1,"div",53,2)(3,"div",54)(4,"div",55),Tf(5,"span",56),xf(),kf(6,"div",57),ph(7,PF,2,1,"div",58)(8,EF,5,0,"div",58)(9,DF,5,0,"div",58)(10,OF,5,0,"div",58),xf()()(),Df()),2&e){let e=Yf();Vd(7),zh("ngIf",!e.existingEmail&&!e.existingPhoneNumber),Vd(),zh("ngIf",e.existingEmail),Vd(),zh("ngIf",e.existingPhoneNumber),Vd(),zh("ngIf",e.existingEmailPhoneNumber)}}function MF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter your first name."),xf())}function RF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a first name that is between 2-30 characters."),xf())}function LF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a first name that includes only letters and hyphens."),xf())}function FF(e,t){if(1&e&&(kf(0,"div",60)(1,"div",61),Tf(2,"span",62),kf(3,"span",63),am(4,"Error:"),xf()(),ph(5,MF,2,0,"div",64)(6,RF,2,0,"div",64)(7,LF,2,0,"div",64),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.createAcctForm.firstName.errors.required),Vd(),zh("ngIf",e.createAcctForm.firstName.errors.length),Vd(),zh("ngIf",e.createAcctForm.firstName.errors.specialChars)}}function NF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter your last name."),xf())}function UF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a last name that is between 2-30 characters."),xf())}function VF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a last name that includes only letters and hyphens."),xf())}function qF(e,t){if(1&e&&(kf(0,"div",66)(1,"div",61),Tf(2,"span",62),kf(3,"span",63),am(4,"Error:"),xf()(),ph(5,NF,2,0,"div",64)(6,UF,2,0,"div",64)(7,VF,2,0,"div",64),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.createAcctForm.lastName.errors.required),Vd(),zh("ngIf",e.createAcctForm.lastName.errors.length),Vd(),zh("ngIf",e.createAcctForm.lastName.errors.specialChars)}}function $F(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a mobile number."),xf())}function jF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a valid mobile number."),xf())}function zF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a mobile phone number that doesn't start with a 0 or 1."),xf())}function WF(e,t){if(1&e&&(kf(0,"div",67)(1,"div",61),Tf(2,"span",62),kf(3,"span",63),am(4,"Error:"),xf()(),ph(5,$F,2,0,"div",64)(6,jF,2,0,"div",64)(7,zF,2,0,"div",64),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",null==e.createAcctForm.phoneNumber.errors?null:e.createAcctForm.phoneNumber.errors.required),Vd(),zh("ngIf",null==e.createAcctForm.phoneNumber.errors?null:e.createAcctForm.phoneNumber.errors.invalidPhone),Vd(),zh("ngIf",null==e.createAcctForm.phoneNumber.errors?null:e.createAcctForm.phoneNumber.errors.mobilePattern)}}function HF(e,t){1&e&&(kf(0,"div",68),am(1," Message and data rates may apply. "),xf())}function YF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter your email address."),xf())}function GF(e,t){1&e&&(kf(0,"div",65),am(1,"Please enter a valid email address."),xf())}function KF(e,t){if(1&e&&(kf(0,"div",69)(1,"div",61),Tf(2,"span",62),kf(3,"span",63),am(4,"Error:"),xf()(),ph(5,YF,2,0,"div",64)(6,GF,2,0,"div",64),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",null==e.createAcctForm.emailAddress.errors?null:e.createAcctForm.emailAddress.errors.required),Vd(),zh("ngIf",null==e.createAcctForm.emailAddress.errors?null:e.createAcctForm.emailAddress.errors.invalid)}}function QF(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.createAccountProps.createAccountButtonLabel," ")}}function JF(e,t){1&e&&Tf(0,"div",70)}function ZF(e,t){if(1&e){let e=Mf();kf(0,"button",71),jf("click",(function(){return Wa(e),Ha(Yf().socialSignIn("google"))})),Tf(1,"img",72),am(2),xf()}if(2&e){let e=Yf();Vd(),Jf("src",null==e.createAccountProps?null:e.createAccountProps.createAcctGoogleLogo,id),Vd(),cm(" ",null==e.createAccountProps?null:e.createAccountProps.createAcctgoogleBtnLabel,"")}}function XF(e,t){if(1&e){let e=Mf();kf(0,"button",73),jf("click",(function(){return Wa(e),Ha(Yf().socialSignIn("apple"))})),Tf(1,"img",72),am(2),xf()}if(2&e){let e=Yf();Vd(),Jf("src",null==e.createAccountProps?null:e.createAccountProps.createAcctAppleLogo,id),Vd(),cm(" ",null==e.createAccountProps?null:e.createAccountProps.createAcctAppleButtonLabel," ")}}function eN(e,t){if(1&e&&(kf(0,"div",74)(1,"span")(2,"span")(3,"span",75),am(4),xf(),kf(5,"a",76),am(6),xf(),kf(7,"a",77),am(8),xf(),am(9," and "),kf(10,"a",78),am(11),xf(),am(12," and have read and agree to our "),kf(13,"a",50),am(14),xf(),kf(15,"span",75),am(16),xf()(),kf(17,"a",79),am(18,"Learn more "),Tf(19,"span",33)(20,"span",34),xf(
1)(),kf(21,"div",80),am(22),kf(23,"a",50),am(24),xf()()()),2&e){let e=Yf();Vd(4),lm(null==e.createAccountProps?null:e.createAccountProps.termsStartText),Vd(),gh("href",null==e.createAccountProps?null:e.createAccountProps.privacyPolicyLink,id),Vd(),cm(" ",null==e.createAccountProps?null:e.createAccountProps.privacyPolicyLinkLabel," "),Vd(),gh("href",null==e.createAccountProps?null:e.createAccountProps.financialIncentiveLink,id),Vd(),lm(null==e.createAccountProps?null:e.createAccountProps.financialIncentiveText),Vd(2),gh("href",null==e.createAccountProps?null:e.createAccountProps.loyaltyProgramsDisclaimerLink,id),Vd(),lm(null==e.createAccountProps?null:e.createAccountProps.loyaltyProgramsDisclaimerText),Vd(2),gh("href",null==e.createAccountProps?null:e.createAccountProps.termsLink,id),Vd(),cm(" ",null==e.createAccountProps?null:e.createAccountProps.termsLinkLabel," "),Vd(2),lm(null==e.createAccountProps?null:e.createAccountProps.termsEndText),Vd(6),cm(" ",null==e.createAccountProps?null:e.createAccountProps.termsLearnMore," "),Vd(),gh("href",null==e.createAccountProps?null:e.createAccountProps.termsLink,id),Vd(),cm(" ",null==e.createAccountProps?null:e.createAccountProps.termsLinkLabel," ")}}function tN(){return window}var iN=(()=>{class e{constructor(e,t,i){this.formBuilder=e,this.authService=t,this.createAcctService=i,this.loading=!1,this.authError=!1,this.referralProgramEnabled=!1,this.isPageView=!1,this.createAccountForm=this.formBuilder.group({firstName:["",this.validateName()],lastName:["",this.validateName()],phoneNumber:["",this.validatorPhone()],emailAddress:["",{validators:[this.validateEmail()],updateOn:"blur"}],textSubscribe:[!1],emailSubscribe:[!0]}),this.createAccountType=this.authService.createAccountFlow,this.isSHLandingScreenEnabled=!!tN().SWY.CONFIGSERVICE.featureToggleConfig?.enableSHLandingScreen}ngOnInit(){this.authService.socialLoginFlags(),this.enableGoogleSignIn=this.authService.googleSignInFlag,this.enableAppleSignIn=this.authService.appleSignInFlag,window.location.href.indexOf(".error-")>1&&(this.errorMsg="Sorry, we're experiencing technical difficulties.",this.errorPopup=!0),this.referralProgramEnabled=!!tN().SWY.CONFIGSERVICE.featureToggleConfig?.referralProgramEnabled,this.enableSocialConsent=!!tN().SWY.CONFIGSERVICE.featureToggleConfig?.enableSocialConsent,this.referralProgramEnabled&&(this.referralData=this.getReferralDataFromUrl()),this.createAccountForm.patchValue(this.createAcctService.getFormData()),this.authService.closeModal.subscribe((e=>{1==e&&(this.clearErrors(),this.clearForm(),this.createAcctService.clearCreateAcctData(),this.authService.closeModal.next(!1))})),this.authService.isPageView.subscribe({next:e=>{this.isPageView=e}})}get createAcctForm(){return this.createAccountForm.controls}getReferralDataFromUrl(){let e=new URLSearchParams(window.location.search),t=new Map([["referralCode","rfCode"],["referralUuid","rfUuid"],["referralOfferId","rfOfferId"],["referralHhLinkHash","rfHhLinkHash"],["referralCampaignId","rfCampaignId"]]),i=new Map([["rfCode","code"],["rfUuid","uuid"],["rfOfferId","offerId"],["rfHhLinkHash","hhLinkHash"],["rfCampaignId","campaignId"]]),n={},r={};return t.forEach(((t,s)=>{e.has(s)&&(n[t]=e.get(s),r[i.get(t)]=n[t])})),{referralCookieData:n,referralApiData:r}}setReferralCookie(e){let t=encodeURIComponent(JSON.stringify(e));tN().AB.COMMON.setCookie("ACI_S_onboardEvent",t,0)}validatorPhone(){let e=new RegExp("^[0-9]+$");return t=>{let i={required:!1,invalidPhone:!1,mobilePattern:!1};return 0==t.value.length?(i.required=!0,i):"0"===t.value.charAt(0)||"1"===t.value.charAt(0)?(i.mobilePattern=!0,i):10===t.value.length&&e.test(t.value)?void 0:(i.invalidPhone=!0,i)}}socialSignIn(e){let t=this.authService.getSocialAuthorizeURL(e),{value:i}=this.createAccountForm,n={event:"socialSign",values:"",pgm:"",status:"",smsConsent:i.textSubscribe?"A":"D",emailConsent:i.emailSubscribe?"A":"D"};if(this.referralProgramEnabled){let{referralCookieData:e}=this.referralData||{};e&&Object.keys(e).length>=1&&(n.values=e,n.pgm="referrer")}this.setReferralCookie(n),window.AB?.DATALAYER&&(window.AB.DATALAYER.setModalClickEvents(`createAccount Modal|continue-with-${e}`),window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"acip371626Social",data:!0,isAcrossPages:!0})),window.location.href=t}validateEmail(){let e=new RegExp("^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$");return t=>{let i={required:!1,invalid:!1};return 0==t.value.length?(i.required=!0,i):e.test(t.value)?void 0:(i.invalid=!0,i)}}submitcreateAccountForm(e){let t=this.authService.getCSMSEndpoint()+this.createAcctService.SIGNUP_URL,i=e.textSubscribe?"A":"D",n=e.emailSubscribe?"A":"D",r=this.authService.getDeviceToken(),s=this.authService.generateHash(e.phoneNumber+e.emailAddress),a={firstName:e.firstName,lastName:e.lastName,email:e.emailAddress,phoneNumber:e.phoneNumber,smsConsent:i,emailConsent:n,context:{deviceToken:r}};if(this.referralProgramEnabled){let{referralApiData:e}=this.referralData;Object.keys(e).length>=1&&(a.referral=e)}this.authService.isB2BSite&&(a.customerType="B");let o=this.authService.getHeadersSignUp();if(o["x-aci-user-hash"]=s,this.isSHLandingScreenEnabled&&"linked"==this.createAccountType){let e=tN().AB.userInfo.SWY_SHOP_TOKEN;o.Authorization="Bearer "+e}let l=new jy(o);this.signUp(t,a,l)}goToSignIn(){Object.keys(this.createAccountForm.controls).forEac
1h((e=>{let t=this.createAccountForm.controls[e];console.log(t.value),"textSubscribe"==e?t.setValue(!1):"emailSubscribe"==e?t.setValue(!0):t.setValue(""),t.setErrors(null),t.markAsPristine(),t.markAsUntouched()})),window.AB?.DATALAYER&&window.AB.DATALAYER.setSignInModalEvents("view","otp:lets-find-your-account|view","","sign-in"),tN().AB.COMMON.authorize()?tN().SWY.OKTA.silentSignOutFromOkta(event):this.authService.flowType.next("signIn")}validateName(){let e=new RegExp("^[a-zA-Z][ a-zA-Z-]*$");return t=>{let i={required:!1,length:!1,specialChars:!1};return 0==t.value.length?(i.required=!0,i):t.value.length<2||t.value.length>30?(i.length=!0,i):e.test(t.value)?void 0:(i.specialChars=!0,i)}}signUp(e,t,i){this.loading=!0;let n={emailOptIn:t.emailConsent,smsOptIn:t.smsConsent};this.clearErrors();let r=this;this.authService.sendPostRequest(e,t,i).subscribe((e=>{r.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let i=e.body;if(201==e.status&&(r.createAcctService.createAcctData=i,i.factors?.forEach((e=>{"email"==e.factorType?r.createAcctService.createAcctData.emailFactorId=e.id:"sms"==e.factorType&&(r.createAcctService.createAcctData.smsFactorId=e.id)})),r.createAcctService.createAcctData.phoneNumber=t.phoneNumber,r.createAcctService.createAcctData.email=t.email,r.referralProgramEnabled)){let{referralCookieData:e}=r.referralData;if(Object.keys(e).length>=1){let t={event:"normalReg",values:e,pgm:"referrer",status:""};r.setReferralCookie(t)}}r.createAcctService.emailAndSmsOptIn=n,r.createAcctService.currentScreen.next("verifyAccount"),r.authService.verificationCodeTimer(),r.loading=!1,window.AB?.DATALAYER&&window.AB.DATALAYER.setModalClickEvents("createAccount Modal|continue")}),(e=>{let t=e&&e.error&&e.error?.errors?e.error?.errors:"",i=t[0]&&t[0].code?t[0].code:"",n=t[0]&&t[0].message?t[0].message:r.sharedProps?.techDiffError;"CSMS0233"==i?r.existingEmail=!0:"CSMS0234"==i?r.existingPhoneNumber=!0:"CSMS0138"==i||"CSMS0211"==i?r.errorMsg=r.sharedProps?.techDiffError:"CSMS0232"==i?r.existingEmailPhoneNumber=!0:r.errorMsg=n,r.errorPopup=!0,r.loading=!1,setTimeout((()=>r.formError.nativeElement.focus()),0),r.authService.setDatalayerError(i,"create-account-error",r.errorMsg)}))}clearErrors(){this.errorPopup=!1,this.existingEmail=!1,this.existingPhoneNumber=!1,this.existingEmailPhoneNumber=!1,this.errorMsg=""}clearForm(){Object.keys(this.createAccountForm.controls).forEach((e=>{let t=this.createAccountForm.controls[e];t.setErrors(null),t.markAsPristine(),t.markAsUntouched(),"textSubscribe"==e?t.setValue(!1):"emailSubscribe"==e?t.setValue(!0):t.setValue("")}))}analyticsEvents(e){window.AB?.DATALAYER&&window.AB.DATALAYER.accountInputErrorTracking(e)}learnMoreSMSToggle(e){e.target.checked?$("#textLearnMoreExpanded").collapse("show"):$("#textLearnMoreExpanded").collapse("hide")}ngOnDestroy(){this.createAcctService.setFormData(this.createAccountForm.value)}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d(vF),$d(CF))}}static{this.ɵcmp=Qr({type:e,selectors:[["create-account-form"]],viewQuery:function(e,t){if(1&e&&tm(AF,5),2&e){let e;im(e=nm())&&(t.formError=e.first)}},inputs:{createAccountProps:"createAccountProps",sharedProps:"sharedProps"},decls:87,vars:44,consts:[["showHelperText",""],["showLoading",""],["createAccountFormError",""],[1,"create-acct"],["class","auth-styles__title","authautofocus","",4,"ngIf"],[4,"ngIf"],[1,"body-text","auth-styles__subtitle"],[3,"ngSubmit","formGroup"],[1,"input-name-field",2,"display","flex"],[1,"input-field","input-name-field__first-name"],[1,"input-field__wrapper",3,"ngClass"],["for","firstName",1,"input-field__float-label"],["id","firstName","type","text","placeholder","","aria-label","First name","formControlName","firstName","aria-describedby","error-fname","required","required","tabindex","0",3,"focusout"],["class","input-field__help-text body-text-xs","id","error-fname","aria-live","assertive","role","alert",4,"ngIf"],[1,"input-field",2,"width","50%"],["for","lastName",1,"input-field__float-label"],["id","lastName","type","text","placeholder","","aria-label","Last name","formControlName","lastName","aria-describedby","error-lname","required","required","tabindex","0",3,"focusout"],["class","input-field__help-text body-text-xs","id","error-lname","aria-live","assertive","role","alert",4,"ngIf"],[1,"input-field"],["for","phonenumber",1,"input-field__float-label"],["id","phonenumber","type","text","placeholder"," ","aria-label","Primary phone number (mobile)","aria-describedby","error-phoneNumber","formControlName","phoneNumber","required","required",3,"focusout"],["class","input-field__help-text body-text-xs","id","error-phoneNumber",4,"ngIf","ngIfElse"],["for","emailAddress",1,"input-field__float-label"],["id","emailAddress","type","text","placeholder"," ","aria-label","Email address","aria-describedby","error-email","formControlName","emailAddress","required","required",3,"focusout"],["class","input-field__help-text body-text-xs","id","error-email","aria-live","assertive","role","alert",4,"ngIf"],[1,"checkbox","create-acct__promo"],["for","textSubscribe",1,"checkbox__group"],["type","checkbox","id","textSubscribe","aria-describedby","textSubscribeLegalHeader","formControlName","textSubscribe",1,"checkbox__input",3,"change"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],[1,"checkbox__label","promo-checkbox-label"],["id","textSubscribeLegalHeader",1,"create-acct__promo__text"],["role","button","id","textLearnMore","data-toggle","collapse","data-target","#textLearnMoreExpanded","aria-expanded","fal
1se","tabindex","0","href","javascript:void(0);",1,"create-acct__promo__caret","create-acct__promo__link"],[1,"svg-caret-expand-pp"],[1,"svg-caret-collapse-pp"],["id","textLearnMoreExpanded","data-parent","#textLearnMore",1,"collapse","create-acct__promo__text"],["for","emailSubscribe",1,"checkbox__group"],["type","checkbox","checked","checked","aria-describedby","emailSubscribeLegalHeader","id","emailSubscribe","formControlName","emailSubscribe",1,"checkbox__input"],["id","emailSubscribeLegalHeader",1,"create-acct__promo__text"],["role","button","id","emailLearnMore","data-toggle","collapse","data-target","#emailLearnMoreExpanded","aria-expanded","false","tabindex","0","href","javascript:void(0);",1,"create-acct__promo__caret","create-acct__promo__link"],["id","emailLearnMoreExpanded","data-parent","#emailLearnMore",1,"collapse","create-acct__promo__text"],["type","submit",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"disabled"],[4,"ngIf","ngIfElse"],["class","btn btn-xl btn-secondary--neutral-dark auth-styles__btn mt-42","aria-label","Sign in with Google",3,"click",4,"ngIf"],["class","btn btn-xl btn-secondary--neutral-dark auth-styles__btn","aria-label","Sign in with Apple",3,"click",4,"ngIf"],["class","body-text-xxs create-acct__legal",4,"ngIf"],[1,"enter-username__create-acct"],[1,"enter-username__create-acct__text","title-xs"],["role","button","tabindex","0","href","javascript:void(0);",1,"enter-username__create-acct__link","link-reg",3,"click","keydown.space"],[1,"body-text-xs"],["target","_blank","aria-label","Terms of Use, opens in a new tab","tabindex","0","role","link","id","terms-text-ada",1,"terms-of-use","link-underline"],["data-tabindex","last","target","_blank","aria-label","Privacy Policy, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["authautofocus","",1,"auth-styles__title"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],["class","body-text-xs ",4,"ngIf"],["role","button","href","javascript:void(0);",3,"click","keydown.space"],["id","error-fname","aria-live","assertive","role","alert",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["id","error-lname","aria-live","assertive","role","alert",1,"input-field__help-text","body-text-xs"],["id","error-phoneNumber",1,"input-field__help-text","body-text-xs"],["aria-live","polite",1,"input-field__help-text","body-text-xs"],["id","error-email","aria-live","assertive","role","alert",1,"input-field__help-text","body-text-xs"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],["aria-label","Sign in with Google",1,"btn","btn-xl","btn-secondary--neutral-dark","auth-styles__btn","mt-42",3,"click"],["alt","",3,"src"],["aria-label","Sign in with Apple",1,"btn","btn-xl","btn-secondary--neutral-dark","auth-styles__btn",3,"click"],[1,"body-text-xxs","create-acct__legal"],["id","agree-text-ada"],["target","_blank","aria-label","Privacy Policy, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["target","_blank","aria-label","Notice of Financial Incentive, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["target","_blank","aria-label","loyalty Programs Disclaimer, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["role","button","id","learnMoreParent2","data-toggle","collapse","data-target","#learnMore2","aria-expanded","false","href","javascript:void(0);",1,"body-text-xxs","create-acct__promo__caret","link-underline"],["id","learnMore2","data-parent","#learnMoreParent2",1,"collapse","create-acct__legal__text"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",3),ph(1,xF,2,1,"h1",4)(2,TF,2,1,"h2",4)(3,BF,11,4,"ng-container",5),kf(4,"div",6),am(5),xf(),kf(6,"form",7),jf("ngSubmit",(function(){return Wa(e),Ha(t.submitcreateAccountForm(t.createAccountForm.value))})),kf(7,"div",8)(8,"div",9)(9,"div",10)(10,"label",11)(11,"input",12),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))})),xf(),kf(12,"span"),am(13,"First name"),xf()()(),ph(14,FF,8,3,"div",13),xf(),kf(15,"div",14)(16,"div",10)(17,"label",15)(18,"input",16),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))})),xf(),kf(19,"span"),am(20,"Last name"),xf()()(),ph(21,qF,8,3,"div",17),xf()(),kf(22,"div",18)(23,"div",10)(24,"label",19)(25,"input",20),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))})),xf(),kf(26,"span"),am(27,"Primary phone number (mobile)"),xf()()(),ph(28,WF,8,3,"div",21)(29,HF,2,0,"ng-template",null,0,Wm),xf(),kf(31,"div",18)(32,"div",10)(33,"label",22)(34,"input",23),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))})),xf(),kf(35,"span"),am(36,"Email address"),xf()()(),ph(37,KF,7,2,"div",24),xf(),kf(38,"div",25)(39,"label",26)(40,"input",27),jf("change",(function(i){return Wa(e),Ha(t.learnMoreSMSToggle(i))})),xf(),kf(41,"span",28),Tf(42,"span",29),xf(),kf(43,"span",30),am(44),xf()(),kf(45,"div",31),am(46),kf(47,"a",32),am(48,"Learn more "),Tf(49,"span",33)(50,"span",34),xf(
1)(),kf(51,"div",35),am(52),xf()(),kf(53,"div",25)(54,"label",36),Tf(55,"input",37),kf(56,"span",28),Tf(57,"span",29),xf(),kf(58,"span",30),am(59),xf()(),kf(60,"div",38),am(61),kf(62,"a",39),am(63,"Learn more "),Tf(64,"span",33)(65,"span",34),xf()(),kf(66,"div",40),am(67),xf()(),kf(68,"div")(69,"button",41),ph(70,QF,2,1,"ng-container",42)(71,JF,1,0,"ng-template",null,1,Wm),xf()()(),ph(73,ZF,3,2,"button",43)(74,XF,3,2,"button",44)(75,eN,25,13,"div",45),kf(76,"div",46)(77,"div",47),am(78),kf(79,"a",48),jf("click",(function(){return Wa(e),Ha(t.goToSignIn())}))("keydown.space",(function(){return Wa(e),Ha(t.goToSignIn())})),am(80),xf()()(),kf(81,"div",49)(82,"a",50),am(83),xf(),am(84," and "),kf(85,"a",51),am(86),xf()()()}if(2&e){let e=sm(30),i=sm(72);Vd(),zh("ngIf",!t.isPageView),Vd(),zh("ngIf",t.isPageView),Vd(),zh("ngIf",t.errorPopup),Vd(2),cm(" ",null==t.createAccountProps?null:t.createAccountProps.createAccountSubTitle," "),Vd(),zh("formGroup",t.createAccountForm),Vd(3),zh("ngClass",Om(36,kF,t.createAcctForm.firstName.invalid&&t.createAcctForm.firstName.touched)),Vd(5),zh("ngIf",t.createAcctForm.firstName.invalid&&t.createAcctForm.firstName.touched),Vd(2),zh("ngClass",Om(38,kF,t.createAcctForm.lastName.invalid&&t.createAcctForm.lastName.touched)),Vd(5),zh("ngIf",t.createAcctForm.lastName.invalid&&t.createAcctForm.lastName.touched),Vd(2),zh("ngClass",Om(40,kF,t.createAcctForm.phoneNumber.invalid&&t.createAcctForm.phoneNumber.touched)),Vd(5),zh("ngIf",t.createAcctForm.phoneNumber.errors&&t.createAcctForm.phoneNumber.touched)("ngIfElse",e),Vd(4),zh("ngClass",Om(42,kF,t.createAcctForm.emailAddress.invalid&&t.createAcctForm.emailAddress.touched)),Vd(5),zh("ngIf",t.createAcctForm.emailAddress.errors&&t.createAcctForm.emailAddress.touched),Vd(3),gh("aria-checked",t.createAccountForm.value.textSubscribe),Vd(4),lm(t.createAccountProps.textSubscribeCheckboxLabel),Vd(2),cm("",t.createAccountProps.textSubscribeLegalHeader," "),Vd(),gh("aria-label",t.createAccountProps.textSubscribeCheckboxLabel+" Learn More"),Vd(5),cm(" ",t.createAccountProps.textSusbcribeLegalExpanded," "),Vd(3),gh("aria-checked",t.createAccountForm.value.emailSubscribe),Vd(4),lm(t.createAccountProps.emailSubscribeCheckboxLabel),Vd(2),cm("",t.createAccountProps.emailSubscribeLegalHeader," "),Vd(),gh("aria-label",t.createAccountProps.emailSubscribeCheckboxLabel+" Learn More"),Vd(5),cm(" ",t.createAccountProps.emailSusbcribeLegalExpanded," "),Vd(2),zh("disabled",!t.createAccountForm.valid),Vd(),zh("ngIf",!t.loading)("ngIfElse",i),Vd(3),zh("ngIf",t.enableGoogleSignIn&&"linked"!==t.createAccountType&&"unlinked"!==t.createAccountType),Vd(),zh("ngIf",t.enableAppleSignIn&&"linked"!==t.createAccountType&&"unlinked"!==t.createAccountType),Vd(),zh("ngIf",t.enableGoogleSignIn||t.enableAppleSignIn),Vd(3),cm(" ",t.createAccountProps.signInPrompt," "),Vd(2),cm(" ",t.createAccountProps.signInLinkLabel," "),Vd(2),gh("href",null==t.createAccountProps?null:t.createAccountProps.termsLink,id),Vd(),cm(" ",null==t.createAccountProps?null:t.createAccountProps.termsLinkLabel," "),Vd(2),gh("href",null==t.createAccountProps?null:t.createAccountProps.privacyPolicyLink,id),Vd(),cm(" ",null==t.createAccountProps?null:t.createAccountProps.privacyPolicyLinkLabel," ")}},dependencies:[sy,cy,DS,d_,o_,$_,j_,nC,US,qS,IF],encapsulation:2})}}return e})(),nN=["verifyAcctError"],rN=["resendCodeSuccessPopup"],sN=e=>({"input-field--error":e}),aN=e=>({"create-acct__resend-code-link--disabled":e}),oN=e=>({"enter-otp__link--disabled":e});function lN(e,t){if(1&e&&(kf(0,"h1",33),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.verifyAcctTitle,"")}}function cN(e,t){if(1&e&&(kf(0,"h2",33),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.verifyAcctTitle,"")}}function dN(e,t){if(1&e&&(Ef(0),kf(1,"div",34,3)(3,"div",35)(4,"div",36),Tf(5,"span",37),xf(),kf(6,"div",38)(7,"div",39),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function uN(e,t){if(1&e&&(Ef(0),kf(1,"div",40,4)(3,"div",35)(4,"div",36),Tf(5,"span",41),xf(),kf(6,"div",38)(7,"div",39),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",null==e.enterOtpProps?null:e.enterOtpProps.resendCodeSuccessMsg," ")}}function pN(e,t){if(1&e&&(Ef(0),kf(1,"p",42),am(2),xf(),kf(3,"div",43),am(4),xf(),Df()),2&e){let e=Yf();Vd(2),cm("Verification code expires in ",e.formattedRemainingTime,""),Vd(2),lm(e.timerADAUpdate)}}function hN(e,t){if(1&e){let e=Mf();kf(0,"span",44),am(1,"Verification code expired. "),xf(),kf(2,"button",45),jf("click",(function(){return Wa(e),Ha(Yf().resendCodeThroughTimer())})),am(3," Resend Code"),xf()}if(2&e){let e=Yf();Vd(2),zh("ngClass",Om(3,oN,!0===e.timerResendCodeDisabled)),gh("disabled",!0===e.timerResendCodeDisabled?"disabled":null)("aria-disabled",!0===e.timerResendCodeDisabled&&"true")}}function fN(e,t){1&e&&(kf(0,"div",51),am(1,"Please enter a verification code."),xf())}function mN(e,t){1&e&&(kf(0,"div",51),am(1,"Please enter a one time passcode that c
1ontains 6 digits."),xf())}function gN(e,t){if(1&e&&(kf(0,"div",51),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.inlineAPIErrorMsg)}}function bN(e,t){if(1&e&&(kf(0,"div",46)(1,"div",47),Tf(2,"span",48),kf(3,"span",49),am(4,"Error:"),xf()(),ph(5,fN,2,0,"div",50)(6,mN,2,0,"div",50)(7,gN,2,1,"div",50),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.required),Vd(),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.invalidLength),Vd(),zh("ngIf",e.inlineAPIError)}}function yN(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",52),jf("click",(function(){return Wa(e),Ha(Yf().changeVerificationMode())})),am(2),Tf(3,"span",53),xf(),Df()}if(2&e){let e=Yf();Vd(),Jf("name",e.formattedSwitchModeLink),gh("aria-label",e.formattedSwitchModeLink),Vd(),cm(" ",e.formattedSwitchModeLink,"")}}function vN(e,t){if(1&e){let e=Mf();kf(0,"button",54),jf("click",(function(){return Wa(e),Ha(Yf().changeVerificationMode())})),am(1),xf()}if(2&e){let e=Yf();Jf("name",e.formattedSwitchModeLink),gh("aria-label",e.formattedSwitchModeLink),Vd(),cm(" ",e.formattedSwitchModeLink,"")}}function wN(e,t){1&e&&(kf(0,"div",55),am(1,"Please wait 30 seconds before requesting another verification code. "),xf())}function _N(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.createAccountProps.verifyAcctBtnLabel," ")}}function SN(e,t){1&e&&Tf(0,"div",56)}function CN(){return window}var IN=(()=>{class e{constructor(e,t,i){this.formBuilder=e,this.authService=t,this.createAcctService=i,this.closeButtonFocusEvent=new _l,this.loading=!1,this.verifyError=!1,this.errorPopup=!1,this.errorMsg="",this.resendCodeSuccess=!1,this.resendCodeDisabled=!1,this.timerResendCodeDisabled=!1,this.inlineAPIError=!1,this.inlineAPIErrorMsg="",this.switchModeLoading=!1,this.isPageView=!1,this.referralProgramEnabled=!1,this.isReceiptsOnboardEventEnabled=!1,this.verifyAccountForm=this.formBuilder.group({otpCode:["",this.validatorOTP()]}),this.createAccountType=this.authService.createAccountFlow,this.isSHLandingScreenEnabled=!!CN().SWY.CONFIGSERVICE.featureToggleConfig?.enableSHLandingScreen}ngOnInit(){this.isReceiptsOnboardEventEnabled=CN().SWY.CONFIGSERVICE.featureToggleConfig?.isReceiptsOnboardEventEnabled,this.referralProgramEnabled=CN().SWY.CONFIGSERVICE.featureToggleConfig?.referralProgramEnabled,this.updateScreenForVerificationMode(this.createAcctService.createAcctData.factorType),this.disableResendCodeLink(),this.authService.closeModal.subscribe((e=>{1==e&&(this.clearErrors(),this.clearForm(),this.createAcctService.clearCreateAcctData(),this.authService.closeModal.next(!1),this.createAcctService.currentScreen.next("createAccountForm"))})),this.authService.timerValue.subscribe((e=>{this.remainingTime=e;let t=Math.floor(e/60),i=e%60;this.formattedRemainingTime=`${t} minutes ${i} seconds`,(30==i||0==i)&&(this.timerADAUpdate="Verification code expires in "+this.formattedRemainingTime)})),this.authService.isPageView.subscribe({next:e=>{this.isPageView=e}})}ngAfterViewInit(){this.closeButtonFocusEvent.emit()}get form(){return this.verifyAccountForm.controls}disableResendCodeLink(){let e=this;this.resendCodeDisabled=!0,setTimeout((function(){e.resendCodeDisabled=!1}),3e4)}resendCodeThroughTimer(){let e=this;this.timerResendCodeDisabled=!0,setTimeout((function(){e.timerResendCodeDisabled=!1}),1e4),this.resendCode()}validatorOTP(){return e=>{let t={required:!1,invalidLength:!1};return 0==e.value.length?(t.required=!0,t):e.value.length<6?(t.invalidLength=!0,t):void 0}}keyPressNumbers(e){let t=e.which?e.which:e.keyCode;return!(t<48||t>57)||(e.preventDefault(),!1)}onFocus(){this.inlineAPIError&&(this.inlineAPIError=!1,this.inlineAPIErrorMsg="")}goToCreateAccount(){this.createAcctService.currentScreen.next("createAccountForm"),"sms"===this.createAcctService.createAcctData.factorType?(this.analyticsEvents("OTP:mobile-verification-code|change","modalClick"),this.analyticsEvents("createAccount Modal|view","goToAccount")):(this.analyticsEvents("OTP:email-verification-code|change","modalClick"),this.analyticsEvents("createAccount Modal|view","goToAccount"))}changeVerificationMode(){let e;this.clearErrors(),this.switchModeLoading=!0,"email"==this.createAcctService.createAcctData.factorType?(e=this.createAcctService.createAcctData.smsFactorId,this.analyticsEvents("OTP:email-verification-code|text-me-verification-code-instead","modalClick")):(e=null==this.createAcctService.createAcctData.emailFactorId?"email":this.createAcctService.createAcctData.emailFactorId,this.analyticsEvents("OTP:mobile-verification-code|email-me-verification-code-instead","modalClick"));let t=this.authService.getCSMSEndpoint()+this.createAcctService.SEND_URL+e+"/send",i={stateToken:this.createAcctService.createAcctData.stateToken,oktaId:this.createAcctService.createAcctData.oktaId,expiresAt:this.createAcctService.createAcctData.expiresAt,loginId:this.createAcctService.createAcctData.userId},n=this.authService.getHeaders(),r=new jy(n);this.callSendApi(t,i,r)}updateScreenForVerificationMode(e){if(this.disableResendCodeLink(),"sms"==e){this.verifyAcctTitle=this.enterOtpProps?.verifyAcctPhoneTitle;let e=this.createAcctService.createAcctData.phoneNumber;this.formattedUsername=this.authService.formatPhoneNumber(e),this.formattedSwitchModeLink=this.createAccountProps?.switchModeLink.replace("{email/text}","Email"),this.analyticsEvents("OTP:mobile-verification-code|view","modalView")}else this.verifyAcctTitle=this.enterOtpProps?.verifyAcctEmailTitle,this.formattedUsername=this.createAcctService.createAcctData.email,this.formattedSwitchModeLink=this.createAccountProps?.switchModeLink.replace("{email/text}","Text"),this.analyticsEvents("OTP:email-verification-code|view","modalView")}analyticsEvents(e,t){window.AB?.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({modalAndLinkData:e,eventType:t})}submitCreateAccount(e){let t;this.clearErrors(),this.loading=!0,t="sms"==this.createAcctService.createAcctData.factorType?this.createAcctService.createAcctData.smsFactorId:this.createAcctService.createAcctData.emailFactorId;let i=this.authService.getCSMSEndpoint()+this.createAcctService.SIGNUP_URL+"/factors/"+t+"/verify",n="";
1n="2.0"==this.authService.getURLParameterByName("v",!0)?this._getSourceFromURL():this._getSourceOfReg();let r=window.AB.userInfo.j4u.storeId||window.SWY.CONFIGSERVICE.storeResolutionConfig.bannerDefaultStoreId,s=window.AB.userInfo.j4u.zipcode||window.SWY.CONFIGSERVICE.storeResolutionConfig.bannerDefaultZipcode,a=window.AB.userInfo.preferenceMode.toUpperCase(),o={stateToken:this.createAcctService.createAcctData.stateToken,passCode:e.otpCode,status:this.createAcctService.createAcctData.status,factorType:this.createAcctService.createAcctData.factorType,sourceProgram:n,storeId:r,zipCode:s,fulfillmentPreference:a},l=this.authService.getHeadersSignUp();if(this.isSHLandingScreenEnabled&&"linked"==this.createAccountType){let e=CN().AB.userInfo.SWY_SHOP_TOKEN;l.Authorization="Bearer "+e}let c=new jy(l);this.signUpVerify(i,o,c,this.createAccountType)}_getSourceOfReg(){let e="";if(e=new URLSearchParams(location.search).get("source"),CN().AB.COMMON.getCookie("ECommRedirectURL").length>0){let t=new URLSearchParams(window.AB.COMMON.getCookie("ECommRedirectURL"));t.has("sourceProgram")&&(e=t.get("sourceProgram"))}return this.authService.singleSignInPageEnabled&&(e=this.getSourceFromStateParam()),(""==e||null==e)&&(e="WEB_REGISTRATION"),e}getSourceFromStateParam(){let e="",t=new URLSearchParams(location.search).get("state");return t&&(e=JSON.parse(atob(t))?.payload?.src||""),e}_getSourceFromURL(){let e="",t=new URLSearchParams(location.search).get("state");if(t){let i=atob(t),{payload:n}=JSON.parse(i);e=n?.src||""}return e=e?`${e.toUpperCase()}_WEB_REGISTRATION`:"GROCERY_WEB_REGISTRATION",e}signUpVerify(e,t,i,n="normal"){let r=this;this.authService.sendPostRequest(e,t,i).subscribe((e=>{let t=e.body;if(this.isSHLandingScreenEnabled&&"unlinked"==n){let e=window.location.search,t=window.location.host+"/pharmacy.html"+e;CN().SWY.CONFIGSERVICE.setCookie("ECommRedirectURL",t,1)}if(202==e.status){let i=t.registrationIndicator;if(this.isReceiptsOnboardEventEnabled&&i&&"STORE_ONLINE_USER"===i){let e=this.referralProgramEnabled?window.AB.COMMON.getCookie("ACI_S_onboardEvent"):null,t=e?f(h({},JSON.parse(e)),{event:"STORE_ONLINE_USER_REG"}):{event:"STORE_ONLINE_USER_REG",values:"",pgm:"",status:""};this.authService.setOnboardEventCookie(t)}if(t.sessionToken){let i=CN().AB.COMMON.getCookie("ECommRedirectURL");if(CN().AB?.INSTANTALLOCATION?.isEligibleForOffer&&i&&-1!==i.indexOf("/foru/coupons-deals.html?")&&this._updateCorrelationData(t,e),this.isSHLandingScreenEnabled&&"linked"==n){let e=CN().SWY.ENFORCEMENTUTILS.parseSessionCookie("SWY_SHARED_SESSION_INFO");CN().localStorage.setItem("previousSharedSessionInfo",JSON.stringify(e))}let s=t.sessionToken;1==r.authService.chicoryObj.chicoryFlow?r.authService.getGrantsAndRedirect(t.sessionToken):r.createAcctService.autoSignInAfterRegistration(s)}else this.authService.flowType.next("signIn")}}),(e=>{let t=e&&e.error&&e.error?.errors?e.error?.errors:"",i=t[0]&&t[0].code?t[0].code:"",n=t[0]&&t[0].message?t[0].message:r.sharedProps?.techDiffError;"CSMS0120"==i?(r.inlineAPIError=!0,r.inlineAPIErrorMsg=this.enterOtpProps?.incorrectOtpError):r.errorMsg=n,r.errorMsg.length>0&&(r.errorPopup=!0,setTimeout((()=>{r.verifyAcctError&&r.verifyAcctError.nativeElement.focus()}),0)),r.loading=!1,r.authService.setDatalayerError(i,"create-account-error",n)}))}callSendApi(e,t,i){let n=this;this.authService.sendPostRequest(e,t,i).subscribe((e=>{n.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let t=e.body;n.createAcctService.createAcctData.expiresAt=t.expiresAt,n.createAcctService.createAcctData.factorType=t.factor.factorType,n.createAcctService.createAcctData.stateToken=t.stateToken,"sms"==t.factor.factorType?n.createAcctService.createAcctData.smsFactorId=t.factor.id:n.createAcctService.createAcctData.emailFactorId=t.factor.id,n.authService.verificationCodeTimer(),n.updateScreenForVerificationMode(t.factor.factorType),n.switchModeLoading=!1}),(e=>{let t=e.error?.errors,i=t[0]&&t[0].errorCode?t[0].errorCode:"",r=t[0]&&t[0].message?t[0].message:n.sharedProps?.techDiffError;n.errorMsg="CSMS0139"==i?"Please wait 30 seconds before trying to resend another code.":r,n.errorMsg.length>0&&(n.errorPopup=!0,setTimeout((()=>n.verifyAcctError.nativeElement.focus()),0)),n.switchModeLoading=!1,n.authService.setDatalayerError(i,"create-account-error",r)}))}clearErrors(){this.resendCodeSuccess=!1,this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1,this.inlineAPIErrorMsg=""}clearSubmitOTPForm(){this.verifyAccountForm.controls.otpCode.setErrors(null),this.verifyAccountForm.controls.otpCode.markAsPristine(),this.verifyAccountForm.controls.otpCode.markAsUntouched(),this.verifyAccountForm.controls.otpCode.setValue("")}_updateCorrelationData(e,t){let i=CN().AB.COMMON.getCookie("ECommRedirectURL"),n="";if(t.headers.get("X-Swy-Correlation-Id")&&(n+="&eventCorrelationId="+t.headers.get("X-Swy-Correlation-Id")+"&"),e.accountStatuses)for(let t in e.accountStatuses)if("ONLINE_ENROLLMENT"===e.accountStatuses[t].type&&e.accountStatuses[t].effectiveTimePeriods[0]&&e.accountStatuses[t].effectiveTimePeriods[0].startDate){let i="";i=e.accountStatuses[t].effectiveTimePeriods[0].startDate+"T"+e.accountStatuses[t].effectiveTimePeriods[0].startTime+"Z",n+="eventDateTime="+i}let r=i+encodeURIComponent(n);CN().AB.COMMON.setCookie("ECommRedirectURL",r,0)}resendCode(){let e,t=this;t.clearErrors(),t.disableResendCodeLink(),"sms"==this.createAcctService.createAcctData.factorType?(e=this.createAcctService.createAcctData.smsFactorId,this.analyticsEvents("OTP:mobile-verification-code|resend-code","modalClick")):(e=this.createAcctService.createAcctData.emailFactorId,this.analyticsEvents("OTP:email-verification-code|resend-code","modalClick"));let i=this.authService.getCSMSEndpoint()+this.createAcctService.SEND_URL+e+"/okta/"+this.createAcctService.createAcctData.oktaId+"/resend",n={stateToken:this.createAcctService.createAcctData.stateToken,expiresAt:this.createAcctService.createAcctData.expiresAt,loginId:this.createAcctService.createAcctData.userId},r=new jy(this.authService.getHeaders());this.authService.sendPostRequest(i,n,r).subscribe((e=>{t.authService.verificationCodeTimer(),t.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let i=e.body;t.createAcctService.createAcctData.stateToken=i.stateToken,t.createAcctService.createAcctData.expiresAt=i.expiresAt,t.resendCodeSuccess=!0,setTimeout((function(){t.resendCodeSuccess=!1}),8e3),setTimeout((()=>{t.resendCodeSuccess&&t.resendCodeSuccessPopup.nativeElement.focus()}),0)}),(e=>{let i=e.error?.errors,n=i[0]&&i[0].code?i[0].code:"",r=i[0]&&i[0].message?i[0].message:t.sharedProps?.resendCodeErrorMsg;t.errorMsg="CSMS0139"==n?"Please wait 30 seconds before trying to resend another code.":r,t.errorPopup=!0,setTimeout((function(){t.clearErrors()}),8e3),setTimeout((()=>{t.verifyAcctError&&t.verifyAcctError.nativeElement.focus()}),0),t.authService.setDatalayerError(n,"create-account-error",r)}))}clearForm(){let e=this.verifyAccountForm.controls.otpCode;e.setValue(""),e.setErrors(null),e.markAsPristine(),e.markAsUntouched()}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d(vF),$d(CF))}}static{this.ɵcmp=Qr({type:e,selectors:[["verify-account"]],viewQuery:function(e,t){if(1&e&&(tm(nN,5),tm(rN,5)),2&e){let e;im(e=nm())&&(t.verifyAcctError=e.first),im(e=nm())&&(t.resendCodeSuccessPopup=e.first)}}
1,inputs:{createAccountProps:"createAccountProps",sharedProps:"sharedProps",enterOtpProps:"enterOtpProps"},outputs:{closeButtonFocusEvent:"closeButtonFocusEvent"},decls:59,vars:38,consts:[["timeExpired",""],["showDisabled",""],["showLoading",""],["verifyAcctError",""],["resendCodeSuccessPopup",""],["class","auth-styles__title","authautofocus","",4,"ngIf"],[4,"ngIf"],[1,"body-text","enter-otp__subtitle"],[1,"title-xs","text-break"],["tabindex","0","role","button","aria-label","Change email or mobile number","href","javascript:void(0);",1,"link-reg","enter-otp__change",3,"click"],[1,"enter-otp__timer"],[1,"svg-timer-icon"],[4,"ngIf","ngIfElse"],[3,"ngSubmit","formGroup"],["aria-live","polite",1,"input-field","mt-24"],[1,"input-field__wrapper",3,"ngClass"],[1,"input-field__nonfloat-label"],[1,"word-highlight-xs"],["type","text","aria-label","Enter Verification Code","placeholder","------","maxlength","6","size","6","min","6","max","6","formControlName","otpCode","aria-describedby","error-otp","required","required",1,"input-field__otp-code",3,"keypress","focus"],["class","input-field__help-text body-text-xs","id","error-otp","aria-live","assertive","role","alert",4,"ngIf"],["name","resend-code","type","button","aria-label","Resend Code","id","resend-code",1,"link-reg","create-acct__resend-code-link",3,"click","ngClass"],["class","body-text-sm auth-styles__resend-code-text",4,"ngIf"],["id","create-account-btn-webotp","type","submit",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"disabled"],[1,"body-text-xxs","create-acct__legal"],["id","agree-text-ada"],["target","_blank","aria-label","Privacy Policy, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["target","_blank","aria-label","Notice of Financial Incentive, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["target","_blank","aria-label","loyalty Programs Disclaimer, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["target","_blank","aria-label","Terms of Use, opens in a new tab","tabindex","0","role","link","id","terms-text-ada",1,"terms-of-use","link-underline"],["role","button","id","learnMoreParent2","data-toggle","collapse","data-target","#learnMore2","aria-expanded","false","href","javascript:void(0);","data-tabindex","last",1,"body-text-xxs","create-acct__promo__caret","link-underline"],[1,"svg-caret-expand-pp"],[1,"svg-caret-collapse-pp"],["id","learnMore2","data-parent","#learnMoreParent2",1,"collapse","create-acct__legal__text"],["authautofocus","",1,"auth-styles__title"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1",1,"popup","popup-light","popup-light-success","alert","fade","show"],[1,"svg-icon","svg-success-outline"],["aria-hidden","true",1,"enter-otp__timer__text"],["id","alert","role","alert","aria-live","assertive",1,"sr-only"],["aria-live","alert","role","alert"],["tabindex","0","aria-label","Resend Code","role","button","name","resend-code-timer","type","button","id","resend-code-timer",1,"link-reg","enter-otp__link","enter-otp__timer__link",3,"click","ngClass"],["id","error-otp","aria-live","assertive","role","alert",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["type","button","id","change-verification-mode",1,"confirm-acct__info",3,"click","name"],[1,"svg-caret-right"],["type","button","id","change-verification-mode",1,"confirm-acct__info","create-acct__link--disabled",3,"click","name"],[1,"body-text-sm","auth-styles__resend-code-text"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();ph(0,lN,2,1,"h1",5)(1,cN,2,1,"h2",5)(2,dN,9,1,"ng-container",6)(3,uN,9,1,"ng-container",6),kf(4,"div",7),am(5),kf(6,"p",8),am(7),kf(8,"span")(9,"a",9),jf("click",(function(){return Wa(e),Ha(t.goToCreateAccount())})),am(10,"Change"),xf()()()(),kf(11,"div",10),Tf(12,"span",11),ph(13,pN,5,2,"ng-container",12)(14,hN,4,5,"ng-template",null,0,Wm),xf(),kf(16,"form",13),jf("ngSubmit",(function(){return Wa(e),Ha(t.submitCreateAccount(t.verifyAccountForm.value))})),kf(17,"div",14)(18,"div",15)(19,"div",16)(20,"label",17),am(21,"Enter Verification Code"),xf(),kf(22,"input",18),jf("keypress",(function(i){return Wa(e),Ha(t.keyPressNumbers(i))}))("focus",(function(){return Wa(e),Ha(t.onFocus())}
1)),xf()()(),ph(23,bN,8,3,"div",19),xf(),ph(24,yN,4,3,"ng-container",12)(25,vN,2,3,"ng-template",null,1,Wm),kf(27,"button",20),jf("click",(function(){return Wa(e),Ha(t.resendCode())})),am(28),xf(),ph(29,wN,2,0,"div",21),kf(30,"button",22),ph(31,_N,2,1,"ng-container",12)(32,SN,1,0,"ng-template",null,2,Wm),xf()(),kf(34,"div",23)(35,"span")(36,"span")(37,"span",24),am(38),xf(),kf(39,"a",25),am(40),xf(),kf(41,"a",26),am(42),xf(),am(43," and "),kf(44,"a",27),am(45),xf(),am(46," and have read and agree to our "),kf(47,"a",28),am(48),xf(),kf(49,"span",24),am(50),xf()(),kf(51,"a",29),am(52,"Learn more "),Tf(53,"span",30)(54,"span",31),xf()(),kf(55,"div",32),am(56),kf(57,"a",28),am(58),xf()()()}if(2&e){let e=sm(15),i=sm(26),n=sm(33);zh("ngIf",!t.isPageView),Vd(),zh("ngIf",t.isPageView),Vd(),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.resendCodeSuccess),Vd(2),cm(" ",t.enterOtpProps.verifyAcctSubtitle," "),Vd(2),cm(" ",t.formattedUsername," "),Vd(6),zh("ngIf",t.remainingTime>0)("ngIfElse",e),Vd(3),zh("formGroup",t.verifyAccountForm),Vd(2),zh("ngClass",Om(34,sN,t.form.otpCode.errors&&t.form.otpCode.touched||t.inlineAPIError)),Vd(5),zh("ngIf",(t.form.otpCode.errors||t.inlineAPIError)&&t.form.otpCode.touched),Vd(),zh("ngIf",!t.switchModeLoading)("ngIfElse",i),Vd(3),zh("ngClass",Om(36,aN,!0===t.resendCodeDisabled)),gh("disabled",!0===t.resendCodeDisabled?"disabled":null)("aria-disabled",!0===t.resendCodeDisabled&&"true"),Vd(),cm(" ",null==t.enterOtpProps?null:t.enterOtpProps.resendCodeLabel," "),Vd(),zh("ngIf",!0===t.resendCodeDisabled),Vd(),zh("disabled",!(t.verifyAccountForm.valid&&t.verifyAccountForm.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",n),Vd(7),lm(null==t.createAccountProps?null:t.createAccountProps.termsStartText),Vd(),gh("href",null==t.createAccountProps?null:t.createAccountProps.privacyPolicyLink,id),Vd(),cm(" ",null==t.createAccountProps?null:t.createAccountProps.privacyPolicyLinkLabel," "),Vd(),gh("href",null==t.createAccountProps?null:t.createAccountProps.financialIncentiveLink,id),Vd(),lm(null==t.createAccountProps?null:t.createAccountProps.financialIncentiveText),Vd(2),gh("href",null==t.createAccountProps?null:t.createAccountProps.loyaltyProgramsDisclaimerLink,id),Vd(),lm(null==t.createAccountProps?null:t.createAccountProps.loyaltyProgramsDisclaimerText),Vd(2),gh("href",null==t.createAccountProps?null:t.createAccountProps.termsLink,id),Vd(),cm(" ",null==t.createAccountProps?null:t.createAccountProps.termsLinkLabel," "),Vd(2),lm(null==t.createAccountProps?null:t.createAccountProps.termsEndText),Vd(6),cm(" ",null==t.createAccountProps?null:t.createAccountProps.termsLearnMore," "),Vd(),gh("href",null==t.createAccountProps?null:t.createAccountProps.termsLink,id),Vd(),cm(" ",null==t.createAccountProps?null:t.createAccountProps.termsLinkLabel," ")}},dependencies:[sy,cy,DS,d_,$_,j_,nC,sC,US,qS,IF],encapsulation:2})}}return e})();function AN(e,t){if(1&e&&(Ef(0),Tf(1,"create-account-form",1),Df()),2&e){let e=Yf();Vd(),zh("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)("createAccountProps",null==e.logInProps?null:e.logInProps.createAccountProps)}}function kN(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"verify-account",2),jf("closeButtonFocusEvent",(function(){return Wa(e),Ha(Yf().closeButtonFocus())})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("createAccountProps",null==e.logInProps?null:e.logInProps.createAccountProps)("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)("enterOtpProps",null==e.logInProps?null:e.logInProps.enterOtpProps)}}var xN=(()=>{class e{constructor(e,t){this.authService=e,this.createAcctService=t,this.closeButtonFocusEventCreateAcct=new _l}ngOnInit(){this.createAcctService.currentScreen.subscribe((e=>{this.view=e,this.authService.closeModalFocus()}))}closeButtonFocus(){this.closeButtonFocusEventCreateAcct.emit()}static{this.ɵfac=function(t){return new(t||e)($d(vF),$d(CF))}}static{this.ɵcmp=Qr({type:e,selectors:[["create-account"]],inputs:{logInProps:"logInProps"},outputs:{closeButtonFocusEventCreateAcct:"closeButtonFocusEventCreateAcct"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"sharedProps","createAccountProps"],[3,"closeButtonF
1ocusEvent","createAccountProps","sharedProps","enterOtpProps"]],template:function(e,t){1&e&&ph(0,AN,2,2,"ng-container",0)(1,kN,2,3,"ng-container",0),2&e&&(zh("ngIf","createAccountForm"===t.view),Vd(),zh("ngIf","verifyAccount"===t.view))},dependencies:[cy,iN,IN],encapsulation:2})}}return e})(),TN=(()=>{class e{constructor(e,t){this._http=e,this.authService=t,this.otpData={},this.AUTHN_URL=bF.authnUrl,this.VERIFY_URL=bF.factorsUrl,this.CONVERT_URL=bF.convertUrl,this.currentScreen=new Tt(""),this.currentScreen$=this.currentScreen.asObservable(),this.signInFlowType=new Tt(""),this.signInFlowType$=this.signInFlowType.asObservable(),this.resendCodeData=new Tt(""),this.resendCodeData$=this.resendCodeData.asObservable(),this.currentScreen.next("enterUsername")}changeAccount(){this.authService.loginHintFlow.next(!1),Object.keys(this.otpData).forEach((e=>delete this.otpData[e])),this.currentScreen.next("enterUsername")}createAccount(){this.authService.loginHintFlow.next(!1),Object.keys(this.otpData).forEach((e=>delete this.otpData[e])),this.authService.flowType.next("createAccount")}resendCode(){let e=this,t=this.authService.getCSMSEndpoint()+this.VERIFY_URL+this.otpData.factorId+"/okta/"+this.otpData.oktaId+"/resend",i={stateToken:this.otpData.stateToken,expiresAt:this.otpData.expiresAt,loginId:this.otpData.userId},n=new jy(this.authService.getHeaders());this.authService.sendPostRequest(t,i,n).subscribe((t=>{e.resendCodeData.next({status:"success",response:t})}),(t=>{e.resendCodeData.next({status:"error",response:t})}))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(vF))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function PN(e,t){if(1&e&&(Ef(0),Tf(1,"enter-username",1),Df()),2&e){let e=Yf();Vd(),zh("resignIn",null==e.logInProps?null:e.logInProps.reSignIn)("signInFlowType",e.signInFlowType)("enterUsernameProps",null==e.logInProps?null:e.logInProps.enterUsernameProps)("b2bAcctMigrationProps",null==e.logInProps?null:e.logInProps.b2bAcctMigrationProps)("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)("thirdPartyProps",null==e.logInProps?null:e.logInProps.thirdPartyProps)}}function EN(e,t){if(1&e&&(Ef(0),Tf(1,"enter-otp",2),Df()),2&e){let e=Yf();Vd(),zh("signInFlowType",e.signInFlowType)("enterOtpProps",null==e.logInProps?null:e.logInProps.enterOtpProps)("newDeviceLoginProps",null==e.logInProps?null:e.logInProps.newDeviceLoginProps)("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)("thirdPartyPage",null==e.logInProps?null:e.logInProps.thirdPartyFlow)}}function DN(e,t){if(1&e&&(Ef(0),Tf(1,"enter-password",3),Df()),2&e){let e=Yf();Vd(),zh("signInFlowType",e.signInFlowType)("enterPWProps",null==e.logInProps?null:e.logInProps.enterPWProps)("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)("changeLink",null==e.logInProps?null:e.logInProps.enterOtpProps.changeUsernameLabel)("thirdPartyPage",null==e.logInProps?null:e.logInProps.thirdPartyFlow)}}function ON(e,t){if(1&e&&(Ef(0),Tf(1,"new-device-login",4),Df()),2&e){let e=Yf();Vd(),zh("signInFlowType",e.signInFlowType)("newDeviceLoginProps",null==e.logInProps?null:e.logInProps.newDeviceLoginProps)("sharedProps",null==e.logInProps?null:e.logInProps.sharedProps)}}function BN(e,t){if(1&e&&(Ef(0),Tf(1,"b2b-intermittent-pg",5),Df()),2&e){let e=Yf();Vd(),zh("signInFlowType",e.signInFlowType)("intermittentPgProps",null==e.logInProps?null:e.logInProps.b2bIntermittentPageProps)("shProps",null==e.logInProps?null:e.logInProps.shProps)}}function MN(e,t){if(1&e&&(Ef(0),Tf(1,"b2b-acct-migration",6),Df()),2&e){let e=Yf();Vd(),zh("signInFlowType",e.signInFlowType)("acctMigrationProps",null==e.logInProps?null:e.logInProps.b2bAcctMigrationProps)("termsProps",null==e.logInProps?null:e.logInProps.createAccountProps)}}var RN=(()=>{class e{constructor(e,t){this.authService=e,this.signInService=t,this.changeViewType=new _l,this.resendCode=!1}ngOnInit(){this.signInService.currentScreen.subscribe((e=>{"enterOtp-resend"==e?(this.signInService.resendCode(),this.signInService.currentScreen.next("enterOtp")):(this.view=e,this.changeViewType.emit(e)),this.authService.closeModalFocus()})),this.signInService.signInFlowType.subscribe((e=>{this.signInFlowType=e}))}static{this.ɵfac=function(t){return new(t||e)($d(vF),$d(TN))}}static{this.ɵcmp=Qr({type:e,selectors:[["sign-in"]],inputs:{logInProps:"logInProps"},outputs:{changeViewType:"changeViewType"},decls:6,vars:6,consts:[[4,"ngIf"],[3,"resignIn","signInFlowType","enterUsernameProps","b2bAcctMigrationProps","sharedProps","thirdPartyProps"],[3,"signInFlowType","enterOtpProps","newDeviceLoginProps","sharedProps","thirdPartyPage"],[3,"signInFlowType","enterPWProps","
1sharedProps","changeLink","thirdPartyPage"],[3,"signInFlowType","newDeviceLoginProps","sharedProps"],[3,"signInFlowType","intermittentPgProps","shProps"],[3,"signInFlowType","acctMigrationProps","termsProps"]],template:function(e,t){1&e&&ph(0,PN,2,6,"ng-container",0)(1,EN,2,5,"ng-container",0)(2,DN,2,5,"ng-container",0)(3,ON,2,3,"ng-container",0)(4,BN,2,3,"ng-container",0)(5,MN,2,3,"ng-container",0),2&e&&(zh("ngIf","enterUsername"===t.view),Vd(),zh("ngIf","enterOtp"===t.view),Vd(),zh("ngIf","enterPassword"===t.view),Vd(),zh("ngIf","newDeviceLogin"===t.view),Vd(),zh("ngIf","b2bIntermittent"===t.view),Vd(),zh("ngIf","accountMigration"===t.view))},encapsulation:2})}}return e})();function LN(){return window}var FN=(()=>{class e{constructor(e){this.authService=e}ngOnInit(){this.title=this.shProps?.title,this.subTitle=this.shProps?.subTitle,this.getStartedText=this.shProps?.getStartedText,this.getStartedSubText=this.shProps?.getStartedSubText,this.createAcctBtnLabel=this.shProps?.createAcctBtnLabel,this.signInPromptLabel=this.shProps?.signInPromptLabel,this.signInLinkLabel=this.shProps?.signInLinkLabel,this.createAcctPromptLinkLabel=this.shProps?.createAcctPromptLinkLabel,this.groceryBlockImg=this.shProps?.groceryBlockImg,this.groceryBlockImgAlt=this.shProps?.groceryBlockImgAlt,this.pharmacyBlockImg=this.shProps?.pharmacyBlockImg,this.pharmacyBlockImgAlt=this.shProps?.pharmacyBlockImgAlt,document.getElementById("create_account_btn")?.focus({preventScroll:!0})}signIn(e){LN().AB.COMMON.authorize()?LN().SWY.OKTA.silentSignOutFromOkta(e):this.authService.flowType.next("signIn")}createAccount(){this.authService.createAccountFlow="linked",this.authService.flowType.next("createAccount")}continueAsNewUser(e){LN().AB.DATALAYER&&"unlinked"===e&&LN().AB.DATALAYER.setLinkClickEvents("household|account-not-linked"),this.authService.createAccountFlow=e,this.authService.flowType.next("createAccount")}static{this.ɵfac=function(t){return new(t||e)($d(vF))}}static{this.ɵcmp=Qr({type:e,selectors:[["sh-landing"]],inputs:{shProps:"shProps"},decls:27,vars:12,consts:[[1,"web-otp"],[1,"auth-styles"],[1,"auth-styles__sh-landing-screen"],[1,"heading-m"],[1,"text-l--medium"],[1,"d-flex","flex-row","justify-content-center","sh-image-container"],["height","101","width","110",3,"src","alt"],[1,"d-flex","justify-content-center","align-items-center","mx-5"],[1,"svg-pharmacy-plus","sh-plus-icon"],["height","101","width","110",1,"",3,"src","alt"],[1,"heading-s","subHeading"],[1,"text-l--medium","description-spacing"],["id","create_account_btn",1,"sh-primary-button","pds-btn","pds-btn-size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"],[1,"text-center"],[1,"d-flex","justify-content-center","align-items-start","sign-in-link-container"],[1,"text-m--medium","m-0"],["role","link",1,"sh-links","pds-btn","link-m--primary","sign-in-link","w-auto","p-0",3,"click"],[1,"pds-btn","link-m--primary","sh-links",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),am(4),xf(),kf(5,"div")(6,"p",4),am(7),xf()(),kf(8,"div",5),Tf(9,"img",6),kf(10,"div",7),Tf(11,"span",8),xf(),Tf(12,"img",9),xf(),kf(13,"h3",10),am(14),xf(),kf(15,"p",11),am(16),xf(),kf(17,"button",12),jf("click",(function(){return t.createAccount()})),am(18),xf(),kf(19,"div",13)(20,"div",14)(21,"p",15),am(22),xf(),kf(23,"button",16),jf("click",(function(e){return t.signIn(e)})),am(24),xf()(),kf(25,"button",17),jf("click",(function(){return t.continueAsNewUser("unlinked")})),am(26),xf()()()()()),2&e&&(Vd(4),lm(t.title),Vd(3),lm(t.subTitle),Vd(2),Jf("src",t.pharmacyBlockImg,id),Jf("alt",t.pharmacyBlockImgAlt),Vd(3),Jf("src",t.groceryBlockImg,id),Jf("alt",t.groceryBlockImgAlt),Vd(2),lm(t.getStartedText),Vd(2),lm(t.getStartedSubText),Vd(2),lm(t.createAcctBtnLabel),Vd(4),cm("",t.signInPromptLabel," "),Vd(2),lm(t.signInLinkLabel),Vd(2),lm(t.createAcctPromptLinkLabel))}})}}return e})();function NN(){return window}var UN=(()=>{class e{constructor(e){this.authService=e}ngOnInit(){this.createPharmProfTitle=this.shProps.createPharmProfTitle,this.createPharmProfText1=this.shPro
1ps.createPharmProfText1,this.createPharmProfText2=this.shProps.createPharmProfText2,this.createPharmProfText3=this.shProps.createPharmProfText3,this.createPharmProfText4=this.shProps.createPharmProfText4,this.createPharmProfCreateCTA=this.shProps.createPharmProfCreateCTA,this.createPharmGetStartedCTA=this.shProps.createPharmGetStartedCTA;let e=new RegExp("^[0-9]+$"),t=NN().AB?.userInfo?.profileEmail,i=NN().AB?.userInfo?.profilePhone;this.username=t||i,e.test(this.username)&&(this.username=this.username.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3")),document.getElementById("create_pharmacy_profile_btn").focus()}createPharmacyProfile(){window.location.href=this.shProps?.createPharmProfCreateLink?this.shProps.createPharmProfCreateLink:"#"}createPharmGetStarted(){this.authService.flowType.next("shLandingScreen")}static{this.ɵfac=function(t){return new(t||e)($d(vF))}}static{this.ɵcmp=Qr({type:e,selectors:[["sh-create-acct"]],inputs:{shProps:"shProps"},decls:23,vars:8,consts:[[1,"web-otp"],[1,"auth-styles"],[1,"auth-styles__rx-landing-screen"],[1,"heading-m","auth-styles__rx-landing-screen--heading"],[1,"auth-styles__rx-landing-screen__option"],[1,"auth-styles__rx-landing-screen__option-title"],[1,"text-l-b--medium"],[1,"text-l--medium"],[1,"text-l-b--medium","text-break"],["id","create_pharmacy_profile_btn","role","button","tabindex","0",1,"pds-btn","pds-btn-size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center","auth-styles__rx-landing-screen__option-btn","auth-styles__rx-landing-screen__option-btn--primary",3,"click"],[1,"auth-styles__rx-landing-screen__option","auth-styles__rx-landing-screen__option--second"],["role","button","tabindex","0",1,"pds-btn","pds-btn-size__large","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center","auth-styles__rx-landing-screen__option-btn","auth-styles__rx-landing-screen__option-btn--secondary",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),am(4),xf(),kf(5,"div",4)(6,"div",5)(7,"div",6),am(8),xf(),kf(9,"div",7),am(10),kf(11,"span",8),am(12),xf()()(),kf(13,"button",9),jf("click",(function(){return t.createPharmacyProfile()})),am(14),xf()(),kf(15,"div",10)(16,"div",5)(17,"div",6),am(18),xf(),kf(19,"div",7),am(20),xf()(),kf(21,"button",11),jf("click",(function(){return t.createPharmGetStarted()})),am(22),xf()()()()()),2&e&&(Vd(4),lm(t.createPharmProfTitle),Vd(4),lm(t.createPharmProfText1),Vd(2),cm(" ",t.createPharmProfText2," "),Vd(2),lm(t.username),Vd(2),cm(" ",t.createPharmProfCreateCTA,""),Vd(4),lm(t.createPharmProfText3),Vd(2),lm(t.createPharmProfText4),Vd(2),cm(" ",t.createPharmGetStartedCTA,""))},encapsulation:2})}}return e})();function VN(){return window}var qN=(()=>{class e{constructor(e){this.authService=e}ngOnInit(){this.title=this.linkedAccountPageProps?.linkedAccountTitle,this.subTitle=this.linkedAccountPageProps?.linkedAccountSubTitle,this.subTitle2=this.linkedAccountPageProps?.linkedAccountSubTitle2,this.signInBtn=this.linkedAccountPageProps?.linkedAccountSignInButtonLabel,this.createAccountBtn=this.linkedAccountPageProps?.linkedAccountCreateAccountButtonLabel,this.titleImage=this.linkedAccountPageProps?.linkedAccountImageReference,this.titleImageAlt=this.linkedAccountPageProps?.linkedAccountImageAltText}signIn(){let e=this.authService.getSignInRegPageURLWithParam("signIn");VN().AB.COMMON.setCookie("ECommRedirectURL",e,1),VN().SWY.OKTA.silentSignOutFromOkta(event)}createAccount(){let e=this.authService.getSignInRegPageURLWithParam("createAccount");VN().AB.COMMON.setCookie("ECommRedirectURL",e,1),VN().SWY.OKTA.silentSignOutFromOkta(event)}static{this.ɵfac=function(t){return new(t||e)($d(vF))}}static{this.ɵcmp=Qr({type:e,selectors:[["linked-account"]],inputs:{linkedAccountPageProps:"linkedAccountPageProps"},decls:15,vars:7,consts:[[1,"partner-linked-account"],[1,"partner-linked-account__logo-wrapper"],[1,"partner-linked-account__logo",3,"src","alt"],[1,"partner-linked-account__content"],[1,"heading-m","partner-linked-account__heading"],[1,"partner-linked-account__description"],[1,"text-l"],["type","button","id","signIN_btn","role","link",1,"partner-linked-account__button","pds-btn","pds-btn-size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"],["href","#",1,"partner-linked-account__link","link-m--primary",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1),Tf(2,"img",2),xf(
1),kf(3,"div",3)(4,"h2",4),am(5),xf(),kf(6,"p",5)(7,"span",6),am(8),xf(),kf(9,"span",6),am(10),xf()(),kf(11,"button",7),jf("click",(function(){return t.signIn()})),am(12),xf(),kf(13,"a",8),jf("click",(function(){return t.createAccount()})),am(14),xf()()()),2&e&&(Vd(2),zh("src",t.titleImage,id)("alt",t.titleImageAlt),Vd(3),lm(t.title),Vd(3),lm(t.subTitle),Vd(2),lm(t.subTitle2),Vd(2),cm("",t.signInBtn," "),Vd(2),lm(t.createAccountBtn))},encapsulation:2})}}return e})(),$N=["closeBtn"],jN=["webOtpPage"];function zN(e,t){1&e&&Of(0)}function WN(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"button",14,2),jf("click",(function(){return Wa(e),Ha(Yf().closeModal())})),Tf(7,"span",15),xf()(),kf(8,"div",16),ph(9,zN,1,0,"ng-container",17),xf()()()(),Df()}if(2&e){let e=Yf(),t=sm(4);Vd(),gh("aria-label",e.modalAriaLabel),Vd(8),zh("ngTemplateOutlet",t)}}function HN(e,t){1&e&&Of(0)}function YN(e,t){if(1&e&&(kf(0,"div",18,3),ph(2,HN,1,0,"ng-container",17),xf()),2&e){let e=Yf(),t=sm(4);gh("role",e.isAuthorizedUser?null:"main"),Vd(2),zh("ngTemplateOutlet",t)}}function GN(e,t){if(1&e&&(Ef(0),kf(1,"div",19),Tf(2,"landing-page",20),xf(),Df()),2&e){let e=Yf(2);Vd(2),zh("lpProps",e.logInProps.lpProps)}}function KN(e,t){if(1&e&&(Ef(0),Tf(1,"linked-account",21),Df()),2&e){let e=Yf(3);Vd(),zh("linkedAccountPageProps",e.logInProps.linkedAccountPageProps)}}function QN(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"create-account",23),jf("closeButtonFocusEventCreateAcct",(function(){return Wa(e),Ha(Yf(4).closeBtnFocus())})),xf(),Df()}if(2&e){let e=Yf(4);Vd(),zh("logInProps",e.logInProps)}}function JN(e,t){if(1&e&&(Ef(0),Tf(1,"sh-landing",24),Df()),2&e){let e=Yf(5);Vd(),zh("shProps",null==e.logInProps?null:e.logInProps.shProps)}}function ZN(e,t){if(1&e&&(Ef(0),Tf(1,"sh-create-acct",24),Df()),2&e){let e=Yf(6);Vd(),zh("shProps",null==e.logInProps?null:e.logInProps.shProps)}}function XN(e,t){if(1&e){let e=Mf();kf(0,"sign-in",25),jf("changeViewType",(function(t){return Wa(e),Ha(Yf(6).updateViewType(t))})),xf()}if(2&e){zh("logInProps",Yf(6).logInProps)}}function eU(e,t){if(1&e&&ph(0,ZN,2,1,"ng-container",9)(1,XN,1,1,"ng-template",null,8,Wm),2&e){let e=sm(2),t=Yf(5);zh("ngIf",t.isSHLandingScreenEnabled&&"shCreateAcct"===t.flowType)("ngIfElse",e)}}function tU(e,t){if(1&e&&ph(0,JN,2,1,"ng-container",9)(1,eU,3,2,"ng-template",null,7,Wm),2&e){let e=sm(2),t=Yf(4);zh("ngIf",t.isSHLandingScreenEnabled&&"shLandingScreen"===t.flowType)("ngIfElse",e)}}function iU(e,t){if(1&e&&(kf(0,"div",19)(1,"div",22),ph(2,QN,2,1,"ng-container",9)(3,tU,3,2,"ng-template",null,6,Wm),xf()()),2&e){let e=sm(4),t=Yf(3);Vd(2),zh("ngIf","createAccount"===t.flowType)("ngIfElse",e)}}function nU(e,t){if(1&e&&ph(0,KN,2,1,"ng-container",9)(1,iU,5,2,"ng-template",null,5,Wm),2&e){let e=sm(2);zh("ngIf","linkedAccount"===Yf(2).flowType)("ngIfElse",e)}}function rU(e,t){if(1&e&&ph(0,GN,3,1,"ng-container",9)(1,nU,3,2,"ng-template",null,4,Wm),2&e){let e=sm(2);zh("ngIf",Yf().landingPage)("ngIfElse",e)}}function sU(){return window}var aU=(()=>{class e{constructor(e){this.authService=e,this.modalAriaLabel="Sign in / up modal",this.landingPage=!1,this.isPageView=!1,this.isAuthorizedUser=sU()?.AB?.COMMON?.authorize()??!1,this.isSHLandingScreenEnabled=!!sU().SWY.CONFIGSERVICE.featureToggleConfig?.enableSHLandingScreen}ngOnInit(){sU().SWY?.CONFIGSERVICE?.featureToggleConfig?.enableSingleSignInPage&&sU().SWY?.CONFIGSERVICE?.featureToggleConfig?.enableOktaSingleDomain&&this.authService.singleSignInPage(),"true"==this.logInProps?.thirdPartyFlow&&(this.authService.thirdPartyFlow="true",this.authService.triggerThirdPartyAuthFlow(),this.authService.setLandingPageFlag(),this.authService.landingPage.subscribe((e=>this.landingPage=e))),this.authService.resignIn=this.logInProps?.reSignIn,"true"==this.logInProps?.createAccountPage?this.authService.flowType.next("createAccount"):"true"==this.logInProps?.signInPage?this.authService.flowType.next("signIn"):"true"==this.logInProps?.linkedAccount&&this.authService.flowType.next("linkedAccount"),this.authService.flowType.subscribe({next:e=>{this.flowType=e}}),this.closeBtnFocusSubscription=this.authService.closeBtnFocusEvent$.subscribe({next:()=>{this.isPageView?this.webOtpPageFocus():this.closeBtnFocus()}}),("true"==this.logInProps?.signInPage||"true"==this.logInProps?.createAccountPage||"true"==this.logInProps?.linkedAccount)&&(this.isPageView=!0,this.authService.isPageView.next(!0))}ngOnChanges(e){"signIn"==e.originalView.currentValue?(this.modalAriaLabel="Sign in modal",this.authService.flowType.next("signIn")):"createAccount"==e.originalView.currentValue?(this.modalAriaLabel="Create account modal",this.authService.flowType.next("createAccount")):this.isSHLandingScreenEnabled&&"shLandingScreen"==e.originalView.currentValue?(this.modalAriaLabel="Sincerely Health Modal",this.authService.flowType.next("shLandingScreen")):this.isSHLandingScreenEnabled&&"shCreateAcct"==e.originalView.currentValue&&(this.modalAriaLabel="Sincerely Health Modal",this.authService.flowType.next("shCreateAcct"))}ngOnDestroy(){this.authService.flowType.unsubscribe(),this.closeBtnFocusSubscription.unsubscribe()}closeModal(){this.authService.flowType.next(this.originalView),this.authService.correlationId="",this.authService.closeModal.next(!0),this.analyticsModalEvents("close"),setTimeout((()=>{let e=document.getElementById("auth_signin_link");e&&e.focus()}),100)}closeBtnFocus(){this.closeBtn?.nativeElement.focus()}webOtpPageFocus(){this.webOtpPage?.nativeElement.focus()}
1updateViewType(e){this.viewType=e.view}analyticsModalEvents(e){if(window.AB?.DATALAYER){let t=window.digitalData?.modal?.modalAction?.toLowerCase();if(!t||-1===t.indexOf("view")&&-1===t.indexOf("continue"))"newDeviceLogin"===this.viewType&&"close"===e&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:"modalClick",modalAndLinkData:"new-device-signin-modal|close"});else{let e=t.substring(t.indexOf("|")+1),i=t.replace(e,"close");window.AB.DATALAYER.setSignInModalEvents("click",i),window.digitalData.pageFlags={}}}}static{this.ɵfac=function(t){return new(t||e)($d(vF))}}static{this.ɵcmp=Qr({type:e,selectors:[["authentication"]],viewQuery:function(e,t){if(1&e&&(tm($N,5),tm(jN,5)),2&e){let e;im(e=nm())&&(t.closeBtn=e.first),im(e=nm())&&(t.webOtpPage=e.first)}},inputs:{logInProps:"logInProps",originalView:"originalView"},features:[ga],decls:5,vars:2,consts:[["pageTemplate",""],["webOTPContent",""],["closeBtn",""],["webOtpPage",""],["regularFlow",""],["authContent",""],["checkShLanding",""],["pharmaCreateAcct",""],["signIn",""],[4,"ngIf","ngIfElse"],["data-backdrop","static","id","modal-authenticate","role","dialog","aria-hidden","true",1,"modal","sheets","fade","web-otp"],["role","document",1,"modal-dialog","modal
1-dialog-scrollable"],[1,"modal-content","web-otp__modal-content"],[1,"modal-header"],["type","button","id","auth_modal_close_btn","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"close",3,"click"],[1,"svg-icon","svg-close-primary"],[1,"modal-body","default-styles"],[4,"ngTemplateOutlet"],["tabindex","-1",1,"web-otp","web-otp__page"],[1,"auth-styles"],[3,"lpProps"],[3,"linkedAccountPageProps"],[1,"auth-styles__content"],[3,"closeButtonFocusEventCreateAcct","logInProps"],[3,"shProps"],[3,"changeViewType","logInProps"]],template:function(e,t){if(1&e&&ph(0,WN,10,2,"ng-container",9)(1,YN,3,2,"ng-template",null,0,Wm)(3,rU,3,2,"ng-template",null,1,Wm),2&e){let e=sm(2);zh("ngIf",!t.isPageView)("ngIfElse",e)}},dependencies:[cy,by,_F,xN,RN,FN,UN,qN],encapsulation:2})}}return e})(),oU=["enterOTPError"],lU=["resendCodeSuccessPopup"],cU=["otpCodeInput"],dU=e=>({"input-field--error":e}),uU=e=>({"enter-otp__link--disabled":e});function pU(e,t){if(1&e&&(kf(0,"h1",24),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.verifyAcctTitle,"")}}function hU(e,t){if(1&e&&(kf(0,"h2",24),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.verifyAcctTitle,"")}}function fU(e,t){if(1&e&&(Ef(0),kf(1,"div",25,3)(3,"div",26)(4,"div",27),Tf(5,"span",28),xf(),kf(6,"div",29)(7,"div",30),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function mU(e,t){if(1&e&&(Ef(0),kf(1,"div",31,4)(3,"div",26)(4,"div",27),Tf(5,"span",32),xf(),kf(6,"div",29)(7,"div",30),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",null==e.enterOtpProps?null:e.enterOtpProps.resendCodeSuccessMsg," ")}}function gU(e,t){if(1&e){let e=Mf();kf(0,"span")(1,"a",33),jf("click",(function(){Wa(e);let t=Yf();return t.changeAccount(),Ha(t.analyticsModalEvents("click","change"))}))("keydown.space",(function(){Wa(e);let t=Yf();return t.changeAccount(),Ha(t.analyticsModalEvents("click","change"))})),am(2),xf()()}if(2&e){let e=Yf();Vd(2),lm(null==e.enterOtpProps?null:e.enterOtpProps.changeUsernameLabel)}}function bU(e,t){if(1&e&&(Ef(0),kf(1,"p",34),am(2),xf(),kf(3,"div",35),am(4),xf(),Df()),2&e){let e=Yf();Vd(2),cm("Verification code expires in ",e.formattedRemainingTime,""),Vd(2),lm(e.timerADAUpdate)}}function yU(e,t){if(1&e){let e=Mf();kf(0,"div",36)(1,"span",37),am(2,"Verification code expired. "),xf(),kf(3,"button",38),jf("click",(function(){return Wa(e),Ha(Yf().resendCodeThroughTimer())})),am(4," Resend Code"),xf()()}if(2&e){let e=Yf();Vd(3),zh("ngClass",Om(3,uU,!0===e.timerResendCodeDisabled)),gh("disabled",!0===e.timerResendCodeDisabled?"disabled":null)("aria-disabled",!0===e.timerResendCodeDisabled&&"true")}}function vU(e,t){1&e&&(kf(0,"div",44),am(1,"Please enter a verification code."),xf())}function wU(e,t){1&e&&(kf(0,"div",44),am(1,"Please enter a verification code that contains 6 digits."),xf())}function _U(e,t){if(1&e&&(kf(0,"div",44),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.enterOtpProps?null:e.enterOtpProps.incorrectOtpError)}}function SU(e,t){if(1&e&&(kf(0,"div",39)(1,"div",40),Tf(2,"span",41),kf(3,"span",42),am(4,"Error:"),xf()(),ph(5,vU,2,0,"div",43)(6,wU,2,0,"div",43)(7,_U,2,1,"div",43),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.required),Vd(),zh("ngIf",e.form.otpCode.errors&&e.form.otpCode.errors.minlength),Vd(),zh("ngIf",e.inlineAPIError)}}function CU(e,t){1&e&&(kf(0,"div",45),am(1,"Please wait 30 seconds before requesting another verification code. "),xf())}function IU(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",null==e.sharedProps?null:e.sharedProps.signInBtnLabel," ")}}function AU(e,t){1&e&&Tf(0,"div",46)}function kU(e,t){if(1&e){let e=Mf();kf(0,"div",47)(1,"div",48)(2,"button",49),jf("click",(function(){return Wa(e),Ha(Yf().usePassword())})),am(3),xf()()()}if(2&e){let e=Yf();Vd(3),lm(null==e.enterOtpProps?null:e.enterOtpProps.signInWithPwLabel)}}function xU(){return window}var TU=(()=>{class e{constructor(e,t,i,n){this.formBuilder=e,this.authService=t,this.authComp=i,this.signInService=n,this.loading=!1,this.formattedUsername=this.signInService.otpData.username,this.isNewDeviceLogin=this.signInService.otpData.isNewDeviceLogin,this.errorPopup=!1,this.errorMsg="",this.resendCodeSuccess=!1,this.resendCodeDisabled=!1,this.timerResendCodeDisabled=!1,this.inlineAPIError=!1,this.analyticsResendCode=!1,this.isPageView=!1,this.isReceiptsOnboardEventEnabled=!1,this.submitOTP=this.formBuilder.group({otpCode:["",[g_.required,g_.minLength(6),g_.maxLength(6)]],otpKmsi:[!0]})}ngOnInit(){this.isReceiptsOnboardEventEnabled=xU().SWY.CONFIGSERVICE.featureToggleConfig?.isReceiptsOnboardEventEnabled,"mobile"==this.signInFlowType&&this.formattedUsername&&!this.formattedUsername.includes("@")?(this.formattedUsername=this.authService.formatPhoneNumber(this.formattedUsername),this.verifyAcctTitle=this.enterOtpProps?.verifyAcctPhoneTitle):this.verifyAcctTitle=this.enterOtpProps?.verifyAcctEmailTitle,this.isNewDeviceLogin?(this.verifyAcctTitle=this.newDeviceLoginProps?.newDeviceOTPScreenTitle,this.verifyAcctSubtitle=this.newDeviceLoginProps?.newDeviceOTPScreenSubtitle):this.verifyAcctSubtitle=this.enterOtpProps?.verifyAcctSubtitle,this.signInService.resendCodeData.subscribe((e=>{this.analyzeResendCodeData(e)})),this.authService.closeModal.subscribe((e=>{1==e&&(this.changeAccount(),this.authService.closeModal.next(!1))})),this.authService.timerValue.subscribe((e=>{this.remainingTime=e;let t=Math.floor(e/60),i=e%60;this.formattedRemainingTime=`${t} minutes ${i} seconds`,(30==i||0==i)&&(this.timerADAUpdate="Verification code expires in "+this.formattedRemainingTime)})),this.authService.isPageView.subscribe({next:e=>{this.isPageView=e}})}ngAfterViewInit(){this.authComp.closeBtnFocus()}get form(){return this.submitOTP.controls}disableResendCodeLink(){let e=this;this.resendCodeDisabled=!0,setTimeout((function(){e.resendCodeDisabled=!1}),3e4)}resendCodeThroughTimer(){let e=this;this.timerResendCodeDisabled=!0,setTimeout((function(){e.timerResendCodeDisabled=!1}),1e4),this.signInService.resendCode(),this.analyticsModalEvents("click","resend-code")}signIn(e){this.loading=!0,this.clearErrors();let t=this,i=e.otpCode,n=this.authService.getCSMSEndpoint()+this.signInService.VERIFY_URL+this.signInService.otpData.factorId+"/okta/"+this.signInService.otpData.oktaId+"/verify",r={stateToken:this.signInService.otpData.stateToken,passCode:i,avsi:this.signInService.otpData.avsi};(this.isNewDeviceLogin||this.isReceiptsOnboardEventEnabled)&&(n=this.authService.getCSMSEndpoint()+this.signInService.VERIFY_URL+this.signInService.otpData.factorId+"/verify",r.id=this.signInService.otpData.oktaId);let s=t.isNewDeviceLogin||this.isReceiptsOnboardEventEnabled?new jy(this.authService.getHeadersNewDeviceLoginV2()):new jy(this.authService.getHeaders()),a=!!xU().SWY.CONFIGSERVICE.featureToggleConfig?.enablePostAuthNotifyMessage;this.authService.sendPostRequest(n,r,s).subscribe((e=>{t.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let i=e.body;if("SUCCESS"===i.status){let e=i.registrationIndicator;if(this.isReceiptsOnboardEventEnabled&&e&&"STORE_ONLINE_USER"===e){let e={event:"STORE_ONLINE_USER_SIGN",values:"",pgm:"",status:""};this.authService.setOnboardEventCookie(e)}if("false"==this.thirdPartyPage&&window.SWY.CONFIGSERVICE.setDomainCookie("SAFEWAY_KMSI",!0,window.SWY.CONFIGSERVICE.resolvedBanner+".com",90),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleReSignIn(),window.SWY.CONFIGSERVICE.isLSEnabled&&localStorage.setItem("userSignInSuccess","true"),"B"!=t.signInService.otpData.customerType||t.authService.isB2BSite)if(""!=t.signInService.otpData.customerType&&null!=t.signInService.otpData.customerType||!t.authService.isB2BSite)if(1==t.authService.chicoryObj.chicoryFlow)t.authService.getGrantsAndRedirect(i.sessionToken);else{let e=this.authService.getAuthorizeURL()+"&sessionToken="+i.sessionToken;a?xU().AB.COMMON.postAuthUserNotifyReload("Welcome back. you're now signed in."):xU().AB.COMMON.userNotifyReloadPage("Welcome back. you're now signed in."),localStorage.setItem("analyticsSignInMessage","toast-message|welcome-back-you're-now-signed-in"),window.location.href=e}else t.signInService.otpData.sessionToken=i.sessionToken,t.signInService.currentScreen.next("accountMigration");else t.signInService.currentScreen.next("b2bIntermittent")}}),(e=>{let i=e.error?.errors,n=i[0]&&i[0].code?i[0].code:i[0]&&i[0].errorCode?i[0].errorCode:"",r=i[0]&&i[0].message?i[0].message:t.sharedProps?.techDiffError;"CSMS0120"==n?t.inlineAPIError=!0:t.errorMsg="CSMS0043"==n?"Sorry, your session has expired. Please refresh the page and try again.":r,t.errorMsg.length>0&&(t.errorPopup=!0,setTimeout((()=>t.otpError.nativeElement.focus()),0)),t.loading=!1,t.authService.setDatalayerError(n,"OTP-error",this.signInFlowType+r)}))}analyzeResendCodeData(e){let t=this;if(t.clearErrors(),t.disableResendCodeLink(),"success"==e.status){t.authService.verificationCodeTimer();let i=e.response.body;t.signInService.otpData.stateToken=i.stateToken,t.signInService.otpData.expiresAt=i.expiresAt,t.resendCodeSuccess=!0,setTimeout((function(){t.resendCodeSuccess=!1,t.otpCodeInput.nativeElement.focus()}),8e3),setTimeout((()=>{t.resendCodeSuccessPopup&&t.resendCodeSuccessPopup.nativeElement.focus()}),0),t.analyticsResendCode&&(t.analyticsModalEvents("view",`OTP:${t.signInFlowType}
1-code-sent|view`,t.enterOtpProps?.resendCodeSuccessMsg),t.analyticsResendCode=!1)}else if("error"==e.status){let i="",n=e.response.error;n.errors&&n.errors[0]&&n.errors[0].errorCode?(i=n.errors[0].errorCode,"CSMS0139"==i&&(t.errorMsg="Please wait 30 seconds before trying to resend another code.")):t.errorMsg=t.enterOtpProps?.resendCodeErrorMsg,t.errorPopup=!0,setTimeout((function(){t.clearErrors()}),8e3),setTimeout((()=>{t.otpError&&t.otpError.nativeElement.focus()}),0),t.authService.setDatalayerError(i,"OTP-error",t.errorMsg)}}usePassword(){this.clearErrors(),this.clearSubmitOTPForm(),this.signInService.currentScreen.next("enterPassword"),this.analyticsModalEvents("click","use-password"),this.analyticsModalEvents("view",`OTP:${this.signInFlowType}-password-modal|view`)}keyPressNumbers(e){let t=e.which?e.which:e.keyCode;return 13===t||(!(t<48||t>57)||(e.preventDefault(),!1))}onFocus(){this.inlineAPIError&&(this.inlineAPIError=!1)}clearErrors(){this.resendCodeSuccess=!1,this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1}clearSubmitOTPForm(){this.submitOTP.controls.otpCode.setErrors(null),this.submitOTP.controls.otpCode.markAsPristine(),this.submitOTP.controls.otpCode.markAsUntouched(),this.submitOTP.controls.otpCode.setValue("")}changeAccount(){this.clearErrors(),this.clearSubmitOTPForm(),this.signInService.changeAccount()}analyticsModalEvents(e,t,i){if(window.AB?.DATALAYER){let n="click"===e?`OTP:${this.signInFlowType}-code-sent|${t}`:t;window.AB.DATALAYER.setSignInModalEvents(e,n,i),"change"===t?window.AB.DATALAYER.setSignInModalEvents("view","otp:lets-find-your-account|view"):"resend-code"===t&&(this.analyticsResendCode=!0)}}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d(vF),$d(aU),$d(TN))}}static{this.ɵcmp=Qr({type:e,selectors:[["enter-otp"]],viewQuery:function(e,t){if(1&e&&(tm(oU,5),tm(lU,5),tm(cU,5)),2&e){let e;im(e=nm())&&(t.otpError=e.first),im(e=nm())&&(t.resendCodeSuccessPopup=e.first),im(e=nm())&&(t.otpCodeInput=e.first)}},inputs:{signInFlowType:"signInFlowType",enterOtpProps:"enterOtpProps",thirdPartyPage:"thirdPartyPage",sharedProps:"sharedProps",newDeviceLoginProps:"newDeviceLoginProps"},decls:32,vars:28,consts:[["timeExpired",""],["otpCodeInput",""],["showLoading",""],["enterOTPError",""],["resendCodeSuccessPopup",""],[1,"enter-otp"],["class","auth-styles__title","authautofocus","",4,"ngIf"],[4,"ngIf"],[1,"body-text","enter-otp__subtitle"],[1,"title-xs"],[1,"enter-otp__timer"],[1,"svg-timer-icon"],[4,"ngIf","ngIfElse"],[3,"ngSubmit","formGroup"],[1,"input-field","mt-24"],[1,"input-field__wrapper",3,"ngClass"],[1,"input-field__nonfloat-label"],[1,"word-highlight-xs"],["type","text","aria-label","Enter Verification Code","placeholder","------","maxlength","6","size","6","min","6","max","6","formControlName","otpCode","aria-describedby","error-otp","required","required",1,"input-field__otp-code",3,"keypress","focus"],["class","input-field__help-text body-text-xs","id","error-otp","aria-live","assertive",4,"ngIf"],["name","resend-code","type","button","aria-label","Resend Code","id","resend-code",1,"link-reg","enter-otp__link",3,"click","ngClass"],["class","body-text-sm auth-styles__resend-code-text",4,"ngIf"],["type","submit","aria-label","Sign in",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"disabled"],["class","auth-styles__action-group",4,"ngIf"],["authautofocus","",1,"auth-styles__title"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1",1,"popup","popup-light","popup-light-success","alert","fade","show"],[1,"svg-icon","svg-success-outline"],["tabindex","0","role","button","aria-label","Change email or mobile number","href","javascript:void(0);",1,"link-reg","enter-otp__change",3,"click","keydown.space"],["aria-hidden","true",1,"enter-otp__timer__text"],["id","alert","role","alert","aria-live","assertive",1,"sr-only"],[1,"enter-otp__timer__text"],["id","alert-expired","role","alert","aria-live","assertive"],["tabindex","0","aria-label","Resend Code","role","button","name","resend-code
1-timer","type","button","id","resend-code-timer",1,"link-reg","enter-otp__link","enter-otp__timer__link",3,"click","ngClass"],["id","error-otp","aria-live","assertive",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],[1,"body-text-sm","auth-styles__resend-code-text"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],[1,"auth-styles__action-group"],[1,"auth-styles__action-item"],["type","button","tabindex","0","data-tabindex","last",1,"btn","enter-otp__use-pw-btn","btn-secondary",3,"click"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",5),ph(1,pU,2,1,"h1",6)(2,hU,2,1,"h2",6)(3,fU,9,1,"ng-container",7)(4,mU,9,1,"ng-container",7),kf(5,"div",8),am(6),xf(),kf(7,"p",9),am(8),ph(9,gU,3,1,"span",7),xf(),kf(10,"div",10),Tf(11,"span",11),ph(12,bU,5,2,"ng-container",12)(13,yU,5,5,"ng-template",null,0,Wm),xf(),kf(15,"form",13),jf("ngSubmit",(function(){return Wa(e),Ha(t.signIn(t.submitOTP.value))})),kf(16,"div",14)(17,"div",15)(18,"div",16)(19,"label",17),am(20,"Enter Verification Code"),xf(),kf(21,"input",18,1),jf("keypress",(function(i){return Wa(e),Ha(t.keyPressNumbers(i))}))("focus",(function(){return Wa(e),Ha(t.onFocus())})),xf()()(),ph(23,SU,8,3,"div",19),xf(),kf(24,"button",20),jf("click",(function(){return Wa(e),t.signInService.resendCode(),Ha(t.analyticsModalEvents("click","resend-code"))})),am(25),xf(),ph(26,CU,2,0,"div",21),kf(27,"button",22),ph(28,IU,2,1,"ng-container",12)(29,AU,1,0,"ng-template",null,2,Wm),xf()(),ph(31,kU,4,1,"div",23),xf()}if(2&e){let e=sm(14),i=sm(30);Vd(),zh("ngIf",!t.isPageView),Vd(),zh("ngIf",t.isPageView),Vd(),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.resendCodeSuccess),Vd(2),cm(" ",t.verifyAcctSubtitle," "),Vd(2),cm(" ",t.formattedUsername," "),Vd(),zh("ngIf",!t.isNewDeviceLogin),Vd(3),zh("ngIf",t.remainingTime>0)("ngIfElse",e),Vd(3),zh("formGroup",t.submitOTP),Vd(2),zh("ngClass",Om(24,dU,t.form.otpCode.errors&&t.form.otpCode.touched||t.inlineAPIError)),Vd(4),gh("data-tabindex",!0!==t.resendCodeDisabled||!t.isNewDeviceLogin||t.submitOTP.valid&&t.submitOTP.dirty?null:"last"),Vd(2),zh("ngIf",(t.form.otpCode.errors||t.inlineAPIError)&&t.form.otpCode.touched),Vd(),zh("ngClass",Om(26,uU,!0===t.resendCodeDisabled)),gh("disabled",!0===t.resendCodeDisabled?"disabled":null)("aria-disabled",!0===t.resendCodeDisabled&&"true")("data-tabindex",!1!==t.resendCodeDisabled||!t.isNewDeviceLogin||t.submitOTP.valid&&t.submitOTP.dirty?null:"last"),Vd(),cm(" ",null==t.enterOtpProps?null:t.enterOtpProps.resendCodeLabel," "),Vd(),zh("ngIf",!0===t.resendCodeDisabled),Vd(),zh("disabled",!(t.submitOTP.valid&&t.submitOTP.dirty)),gh("data-tabindex",!t.loading&&t.submitOTP.valid&&t.submitOTP.dirty&&t.isNewDeviceLogin?"last":null),Vd(),zh("ngIf",!t.loading)("ngIfElse",i),Vd(3),zh("ngIf",!t.isNewDeviceLogin)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,sC,US,qS,IF],encapsulation:2})}}return e})(),PU=["enterPasswordError"],EU=e=>({"input-field--error":e});function DU(e,t){if(1&e&&(kf(0,"h1",19),am(1),xf()),2&e){let e=Yf();Vd(),lm(null==e.enterPWProps?null:e.enterPWProps.enterPwTitle)}}function OU(e,t){if(1&e&&(kf(0,"h2",19),am(1),xf()),2&e){let e=Yf();Vd(),lm(null==e.enterPWProps?null:e.enterPWProps.enterPwTitle)}}function BU(e,t){if(1&e){let e=Mf();kf(0,"div",27),am(1," The password entered doesn't match our records. Please make sure your info is correct or "),kf(2,"a",28),jf("click",(function(){return Wa(e),Ha(Yf(2).switchToCreateAccount())}))("keydown.space",(function(){return Wa(e),Ha(Yf(2).switchToCreateAccount())})),am(3,"create a new account"),xf()()}}function MU(e,t){if(1&e&&(Ef(0),kf(1,"div",20,1)(3,"div",21)(4,"div",22),Tf(5,"span",23),xf(),kf(6,"div",24),ph(7,BU,4,0,"div",25),kf(8,"div",26),am(9),xf()()()(),Df()),2&e){let e=Yf();Vd(7),zh("ngIf",e.invalidPassword),Vd(2),cm("",e.errorMsg," ")}}function RU(e,t){if(1&e&&(kf(0,"div",29),Tf(1,"div",30),kf(2,"div",31),am(3),xf()()),2&e){let e=Yf();Vd(3),lm(null==e.enterPWProps?null:e.enterPWProps.enterPwReqError)}}function LU(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",null==e.sharedProps?null:e.sharedProps.signInBtnLabel," ")}}function FU(e,t){1&e&&Tf(0,"div",32)}function NU(e,t){if(1&e){let e=Mf();kf(0,"a",33),jf("click",(function(){return Wa(e),Ha(Yf().useOTP())}))("keydown.space",(function(){return Wa(e),Ha(Yf().useOTP())})),am(1),xf()}if(2&e){let e=Yf();Vd(),lm(null==e.enterPWProps?null:e.enterPWProps.signInWithoutPwLabel)}}function UU(){return window}
1var VU=(()=>{class e{constructor(e,t,i,n){this.formBuilder=e,this.authService=t,this.authComp=i,this.signInService=n,this.loading=!1,this.formattedUsername=this.signInService.otpData.username,this.errorPopup=!1,this.errorMsg="",this.invalidPassword=!1,this.isPhoneVerified=!1,this.isPageView=!1,this.submitPassword=this.formBuilder.group({password:["",[g_.required,g_.minLength(8),g_.maxLength(40)]],otpKmsi:[!0]})}ngOnInit(){this.isPhoneVerified="mobile"!=this.signInFlowType||this.signInService.isphoneVerified,"mobile"==this.signInFlowType&&this.formattedUsername&&!this.formattedUsername.includes("@")&&(this.formattedUsername=this.authService.formatPhoneNumber(this.formattedUsername)),this.authService.closeModal.subscribe((e=>{1==e&&(this.changeAccount(),this.authService.closeModal.next(!1))})),this.authService.isPageView.subscribe({next:e=>{this.isPageView=e}})}get form(){return this.submitPassword.controls}ngAfterViewInit(){this.authComp.closeBtnFocus()}showHide(e,t){let i=document,n=i.getElementById(e),r=i.getElementById(t);"password"===n.type?(n.type="text",n.focus(),r.innerText="Hide",r.ariaLabel="hide password"):(n.type="password",n.focus(),r.innerText="Show",r.ariaLabel="show password")}signInWithPassword(e){this.loading=!0,this.clearErrors();let t=this,i=!!UU().SWY.CONFIGSERVICE.featureToggleConfig?.enablePostAuthNotifyMessage,n=e.password,r={stateToken:this.signInService.otpData.stateToken,passCode:n,avsi:this.signInService.otpData.avsi},s=this.authService.getCSMSEndpoint()+this.signInService.VERIFY_URL+"password/verify";r.id=this.signInService.otpData.oktaId;let a=new jy(this.authService.getHeadersNewDeviceLoginV2());this.authService.sendPostRequest(s,r,a).subscribe((e=>{t.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let n=e.body;if("SUCCESS"===n.status)if("false"==this.thirdPartyPage&&window.SWY.CONFIGSERVICE.setDomainCookie("SAFEWAY_KMSI",!0,window.SWY.CONFIGSERVICE.resolvedBanner+".com",90),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleReSignIn(),window.SWY.CONFIGSERVICE.isLSEnabled&&localStorage.setItem("userSignInSuccess","true"),"B"!=t.signInService.otpData.customerType||t.authService.isB2BSite)if(""!=t.signInService.otpData.customerType&&null!=t.signInService.otpData.customerType||!t.authService.isB2BSite)if(1==t.authService.chicoryObj.chicoryFlow)t.authService.getGrantsAndRedirect(n.sessionToken);else{let e=this.authService.getAuthorizeURL()+"&sessionToken="+n.sessionToken;i?UU().AB.COMMON.postAuthUserNotifyReload("Welcome back. you're now signed in."):UU().AB.COMMON.userNotifyReloadPage("Welcome back. you're now signed in."),localStorage.setItem("analyticsSignInMessage","toast-message|welcome-back-you're-now-signed-in"),window.location.href=e}else t.signInService.otpData.sessionToken=n.sessionToken,t.signInService.currentScreen.next("accountMigration");else t.signInService.currentScreen.next("b2bIntermittent");else"MFA_REQUIRED"===n.status&&(n.stateToken&&(t.signInService.otpData.stateToken=n.stateToken),t.signInService.otpData.factors=n.factors,t.signInService.currentScreen.next("newDeviceLogin"))}),(e=>{console.log("error "+e.errors);let i=e.error?.errors,n=i[0]&&i[0].code?i[0].code:i[0]&&i[0].errorCode?i[0].errorCode:"",r=i&&i[0]&&i[0].message?i[0].message:t.sharedProps?.techDiffError;"CSMS0120"==n?t.invalidPassword=!0:t.errorMsg="CSMS0043"==n?"Sorry, your session has expired. Please refresh the page and try again.":r,t.errorPopup=!0,t.loading=!1,t.authService.setDatalayerError(n,"OTP-error",this.signInFlowType+"| "+t.errorMsg),setTimeout((()=>t.pwError.nativeElement.focus()),0)}))}useOTP(){this.signInService.currentScreen.next("enterOtp-resend"),this.analyticsModalEvents("click","use-verification-code-instead")}clearErrors(){this.errorPopup=!1,this.errorMsg="",this.invalidPassword=!1}switchToCreateAccount(){this.clearErrors(),this.signInService.changeAccount(),this.authService.flowType.next("createAccount")}clearSubmitPWForm(){let e=this.submitPassword.controls.password;e.setErrors(null),e.setValue(""),e.markAsPristine(),e.markAsUntouched()}changeAccount(){this.clearErrors(),this.clearSubmitPWForm(),this.signInService.changeAccount()}forgotPassword(e){return this.analyticsModalEvents("click","forgot-password"),window.SWY.OKTA.silentSignOutAndForgotPasswordRedirect(e,"forgot-password")}analyticsModalEvents(e,t){if(window.AB?.DATALAYER){let i="click"===e?`OTP:${this.signInFlowType}-password-modal|${t}`:t;window.AB.DATALAYER.setSignInModalEvents(e,i),"change"===t&&window.AB.DATALAYER.setSignInModalEvents("view","otp:lets-find-your-account|view")}}analyticsEvents(e){window.AB?.DATALAYER&&window.AB.DATALAYER.accountInputErrorTracking(e)}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d(vF),$d(aU),$d(TN))}}static{this.ɵcmp=Qr({type:e,selectors:[["enter-password"]],viewQuery:function(e,t){if(1&e&&tm(PU,5),2&e){let e;im(e=nm())&&(t.pwError=e.first)}},inputs:{signInFlowType:"signInFlowType",sharedProps:"sharedProps",enterPWProps:"enterPWProps",changeLink:"changeLink",thirdPartyPage:"thirdPartyPage"},decls:28,vars:17,consts:[["showLoading",""],["enterPasswordError",""],[1,"enter-otp"],["class","auth-styles__title","authautofocus","",4,"ngIf"],[4,"ngIf"],[1,"body-text","enter-otp__subtitle"],[1,"title-xs"],["tabindex","0","role","button","aria-label","Change email or mobile number","href","javascript:void(0);",1,"link-reg","enter-otp__change",3,"click","keydown.space"],[3,"ngSubmit","formGroup"],[1,"input-field","mb-8"],[1,"input-field__wrapper","input-field__end-icon",3,"ngClass"],["for","password",1,"input-field__float-label"],["id","password","type","password","placeholder"," ","aria-label","Password","formControlName","password","aria-describedby","error-pw","maxlength","40","required","required",3,"focusout"],["name","password-show-hide","type","button","aria-label","Show Password","id","password-show-hide",1,"input-field__end-icon__icon","input-field__link","link-sm",3,"click"],["class","input-field__help-text body-text-xs","id","error-pw","aria-live","polite",4,"ngIf"],["name","forgot-password","tabindex","0","role","link","aria-label","Forgot Password","id","forgot-password","href","javascript:void(0);",1,"link-reg","enter-otp__link","mt-24",3,"click","keydown.space"],["type","submit","aria-label","Sign in",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"disabled"],[4,"ngIf","ngIfElse"],["class","link-reg enter-otp__link mt-24","tabindex","0","role","button","data-tabindex","last","href","javascript:void(0);",3,"click","keydown.space",4,"ngIf"],["authautofocus","",1,"auth-styles__title"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],["class","body-text-xs ",4,"ngIf"],["id","errorMsg-pw",1,"body-text-xs"],[1,"body-text-xs"],["tabindex","0","role","button","href","javascript:void(0);",1,"link-xs","enter-otp__link",3,"click","keydown.space"],["id","error-pw","aria-live","polite",1,"input-field__help-text","body-text-xs"],[1,"svg-input-error-icon"],[1,"input-field__help-text--error"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],["tabindex","0","role","button","data-tabindex","last","href","javascript:void(0);",1,"link-reg","enter-otp__link","mt-24",3,"click","keydown.space"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2),ph(1,DU,2,1,"h1",3)(2,OU,2,1,"h2",3)(3,MU,10,2,"ng-container",4),kf(4,"div",5),am(5),xf(),kf(6,"p",6),am(7),kf(8,"span")(9,"a",7),jf("click",(function(){return Wa(e),t.signInService.changeAccount(),Ha(t.analyticsModalEvents("click","change"))}))("keydown.space",(function(){return Wa(e),t.signInService.changeAccount(),Ha(t.analyticsModalEvents("click","change"))})),am(10),xf()()(),kf(11,"form",8),jf("ngSubmit",(function(){return Wa(e),Ha(t.signInWithPassword(t.submitPassword.value))})),kf(12,"div",9)(13,"div",10)(14,"label",11)(15,"input",12),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))})),xf(),kf(16,"span"),am(17,"Password"),xf()(),kf(18,"button",13),jf("click",(function(){return Wa(e),Ha(t.showHide("password","password-show-hide"))})),am(19,"Show"),xf()(),ph(20,RU,4,1,"div",14),kf(21,"a",15),jf("click",(function(i){return Wa(e),Ha(t.forgotPassword(i))}))("keydown.space",(function(i){return Wa(e),Ha(t.forgotPassword(i))}
1)),am(22),xf()(),kf(23,"button",16),ph(24,LU,2,1,"ng-container",17)(25,FU,1,0,"ng-template",null,0,Wm),xf()(),ph(27,NU,2,1,"a",18),xf()}if(2&e){let e=sm(26);Vd(),zh("ngIf",!t.isPageView),Vd(),zh("ngIf",t.isPageView),Vd(),zh("ngIf",t.errorPopup),Vd(2),cm(" ",null==t.enterPWProps?null:t.enterPWProps.enterPwSubtitle," "),Vd(2),cm("",t.formattedUsername," "),Vd(3),lm(t.changeLink),Vd(),zh("formGroup",t.submitPassword),Vd(2),zh("ngClass",Om(15,EU,t.form.password.invalid&&t.form.password.touched)),Vd(7),zh("ngIf",t.form.password.invalid&&t.form.password.touched),Vd(),gh("data-forgotPassLink",null==t.enterPWProps?null:t.enterPWProps.forgotPwLink),Vd(),lm(null==t.enterPWProps?null:t.enterPWProps.forgotPwLabel),Vd(),zh("disabled",!(t.submitPassword.valid&&t.submitPassword.dirty)),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(3),zh("ngIf",t.isPhoneVerified)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,sC,US,qS,IF],encapsulation:2})}}return e})(),qU=["enterUsernameError"],$U=e=>({"input-field--error":e});function jU(e,t){if(1&e&&(kf(0,"h1",20),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.landingPageTitle,"")}}function zU(e,t){if(1&e&&(kf(0,"h2",20),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.landingPageTitle,"")}}function WU(e,t){if(1&e&&(Ef(0),kf(1,"div",21,3)(3,"div",22)(4,"div",23),Tf(5,"span",24),xf(),kf(6,"div",25)(7,"div",26),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function HU(e,t){if(1&e&&(Ef(0),kf(1,"div",27,4)(3,"div",22)(4,"div",23),Tf(5,"span",28),xf(),kf(6,"div",25)(7,"div",26),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.convertSuccessMsg," ")}}function YU(e,t){if(1&e&&(kf(0,"div",34),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.enterUsernameProps?null:e.enterUsernameProps.inputReqError)}}function GU(e,t){if(1&e&&(kf(0,"div",34),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.sharedProps?null:e.sharedProps.invalidEmailError)}}function KU(e,t){if(1&e&&(kf(0,"div",34),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.sharedProps?null:e.sharedProps.invalidPhoneError)}}function QU(e,t){if(1&e&&(kf(0,"div",34),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.sharedProps?null:e.sharedProps.phoneFormatError)}}function JU(e,t){if(1&e&&(kf(0,"div",34),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.inlineAPIErrorMsg)}}function ZU(e,t){if(1&e&&(kf(0,"div",29)(1,"div",30),Tf(2,"span",31),kf(3,"span",32),am(4,"Error:"),xf()(),ph(5,YU,2,1,"div",33)(6,GU,2,1,"div",33)(7,KU,2,1,"div",33)(8,QU,2,1,"div",33)(9,JU,2,1,"div",33),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.required),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidEmail),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.invalidPhone),Vd(),zh("ngIf",null==e.usernameForm.username.errors?null:e.usernameForm.username.errors.mobilePattern),Vd(),zh("ngIf",e.inlineAPIError)}}function XU(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.lpFirstSubmitBtnLabel," ")}}function eV(e,t){1&e&&Tf(0,"div",35)}function tV(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.lpSecondSubmitBtnLabel," ")}}function iV(e,t){1&e&&Tf(0,"div",35)}function nV(e,t){if(1&e){let e=Mf();kf(0,"button",36),jf("click",(function(){return Wa(e),Ha(Yf().socialSignIn("google"))})),Tf(1,"img",37),am(2),xf()}if(2&e){let e=Yf();Vd(),Jf("src",null==e.enterUsernameProps?null:e.enterUsernameProps.googleLogo,id),Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.googleButtonLabel," ")}}function rV(e,t){if(1&e){let e=Mf();kf(0,"button",38),jf("click",(function(){return Wa(e),Ha(Yf().socialSignIn("apple"))})),Tf(1,"img",37),am(2),xf()}if(2&e){let e=Yf();Vd(),Jf("src",null==e.enterUsernameProps?null:e.enterUsernameProps.applelogo,id),Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.appleButtonLabel," ")}}function sV(e,t){if(1&e&&(Ef(0),Tf(1,"span",41),am(2),Df()),2&e){let e=Yf(2);
1Vd(2),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.passkeyButtonLabel," ")}}function aV(e,t){1&e&&Tf(0,"div",35)}function oV(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"p",39),am(2),xf(),kf(3,"button",40),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.submitUsername(t.enterUsernameForm.value,"pk"))})),ph(4,sV,3,1,"ng-container",16)(5,aV,1,0,"ng-template",null,5,Wm),xf()()}if(2&e){let e=sm(6),t=Yf();Vd(2),lm(null==t.enterUsernameProps?null:t.enterUsernameProps.passkeyText),Vd(),zh("disabled",!(t.enterUsernameForm.valid&&t.enterUsernameForm.dirty||t.isResignIn)),Vd(),zh("ngIf",!t.loadingPK)("ngIfElse",e)}}function lV(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",42),jf("click",(function(t){return Wa(e),Ha(Yf().signInWithDiffAcc(t))}))("keydown.space",(function(t){return Wa(e),Ha(Yf().signInWithDiffAcc(t))})),am(2,"Sign in with a different account"),xf(),Df()}}function cV(e,t){if(1&e){let e=Mf();kf(0,"div",43)(1,"div",44),am(2),kf(3,"a",45),jf("click",(function(){return Wa(e),Ha(Yf().goToCreateAcct())}))("keydown.space",(function(){return Wa(e),Ha(Yf().goToCreateAcct())})),am(4),xf()()(),kf(5,"div",43)(6,"div",44),am(7),kf(8,"a",46),am(9),xf()()()}if(2&e){let e=Yf();Vd(2),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.createAcctPrompt," "),Vd(2),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.createAcctLinkLabel," "),Vd(3),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.businessAcctPrompt," "),Vd(),gh("href",e.businessCreateAccount,id),Vd(),cm(" ",null==e.enterUsernameProps?null:e.enterUsernameProps.businessAcctLinkLabel," ")}}function dV(){return window}var uV=(()=>{class e{constructor(e,t,i){this.formBuilder=e,this.authService=t,this.signInService=i,this.loading=!1,this.loadingPW=!1,this.loadingPK=!1,this.enterUsernameForm=this.formBuilder.group({username:[{value:"",disabled:!1},this.validatorUsername()]}),this.enablePasskey=!!dV().SWY.CONFIGSERVICE.featureToggleConfig?.enablePasskey,this.errorPopup=!1,this.inlineAPIError=!1,this.inlineAPIErrorMsg="",this.successPopup=!1,this.convertSuccessMsg="Congratulations, your business account has been set up. Please sign in.",this.enableGoogleSignIn=!1,this.enableAppleSignIn=!1,this.loginHintFlow=!1,this.isPageView=!1,this.prepopulateEmailFieldProgProf=function(){if(new URLSearchParams(window.location.search).get("progProfUser")){let e=sessionStorage.getItem("ppUsername");e&&""!==e&&(this.enterUsernameForm.get("username")?.setValue(e),this.enterUsernameForm.get("username")?.disable(),this.isResignIn=!0)}},this.passkeySignIn=e=>v(this,null,(function*(){try{let t,i=this,n=e.stateToken,r=this.strToBin(e.challenge.challenge),s=yield navigator.credentials.get({publicKey:{challenge:r}});if(s){let e=s.response;t={clientData:this.binToStr(e.clientDataJSON),authenticatorData:this.binToStr(e.authenticatorData),signatureData:this.binToStr(e.signature),stateToken:n}}let a=this.authService.getCSMSEndpoint()+this.signInService.VERIFY_URL+"webauthn/verify",o=new jy(this.authService.getHeadersNewDeviceLoginV2()),l=!!dV().SWY.CONFIGSERVICE.featureToggleConfig?.enablePostAuthNotifyMessage;t?.clientData&&t?.authenticatorData&&t?.signatureData&&t?.stateToken&&(this.loadingPK=!0,this.authService.sendPostRequest(a,t,o).subscribe((e=>{let t=e.body;if(t&&t.sessionToken)if("true"==this.authService.thirdPartyFlow)this.authService.getGrantsAndRedirect(t.sessionToken);else{let e=this.authService.getAuthorizeURL()+"&sessionToken="+t.sessionToken;l?dV().AB.COMMON.postAuthUserNotifyReload("Welcome back. you're now signed in."):dV().AB.COMMON.userNotifyReloadPage("Welcome back. you're now signed in."),localStorage.setItem("analyticsSignInMessage","toast-message|welcome-back-you're-now-signed-in"),window.location.href=e}}),(e=>{console.log("error "+e.errors);let t=e.error?.errors;t[0]&&t[0].code?t[0].code:t[0]&&t[0].errorCode&&t[0].errorCode;i.errorMsg=t&&t[0]&&t[0].message?t[0].message:i.sharedProps?.techDiffError,i.errorPopup=!0,i.loadingPK=!1})))}catch{this.errorMsg="Sorry, we're experiencing technical difficulties.",this.errorPopup=!0,this.loadingPK=!1}}))}ngOnInit(){if(this.authService.socialLoginFlags(),this.enableGoogleSignIn=this.authService.googleSignInFlag,this.enableAppleSign
1In=this.authService.appleSignInFlag,this.prePouplateUsernameResetPwd(),this.resignInUserName(),this.prepopulateEmailFieldProgProf(),this.updateBusinessRegistrationURL(),window.location.href.indexOf(".error-")>1){let e=dV().AB.COMMON.getCookie("SAFEWAY_KMSI");if(!0===e||"true"===e)dV().SWY.OKTA.silentSignOutFromOkta();else{let e=dV().SWY.CONFIGSERVICE.featureToggleConfig?.isCookieACIPrefixEnabled?"ACI_S_B_convt_acc_success":"B_convt_acc_success",t=dV().AB.COMMON.getCookie(e);!1===t||"false"===t?(this.successPopup=!0,document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"):(this.errorMsg="Sorry, we're experiencing technical difficulties.",window.location.href.indexOf("error")>1&&(this.errorMsg=this.enterUsernameProps.errorMessage,window.location.href.indexOf("OSSM-100")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyGenericError:window.location.href.indexOf("OSSM-101")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyReqParamsError:window.location.href.indexOf("OSSM-102")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyPromptReqdError:window.location.href.indexOf("OSSM-103")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyResponseTypeReqdError:window.location.href.indexOf("OSSM-104")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyResponseModeReqdError:window.location.href.indexOf("OSSM-105")>1?this.errorMsg=this.thirdPartyProps?.thirdPartyInvalidEmailOrPhone:this.enterUsernameProps.errorMessage&&(this.errorMsg=this.enterUsernameProps.errorMessage)),this.authService.isB2BSite&&(window.location.href.indexOf("IAUC0242")>1?this.errorMsg=this.b2bAcctMigrationProps?.tribeAccountError:window.location.href.indexOf("IAUC0241")>1||window.location.href.indexOf("OSBB-403")>1?this.errorMsg=this.b2bAcctMigrationProps?.householdWithActiveCustomersError:window.location.href.indexOf("IAUC0240")>1?this.errorMsg=this.b2bAcctMigrationProps?.alreadyBusinessAccountError:window.location.href.indexOf("IAUC0239")>1?this.errorMsg=this.b2bAcctMigrationProps?.alreadyEmployeeError:window.location.href.indexOf("IAUC0238")>1?this.errorMsg=this.b2bAcctMigrationProps?.notOnlineEnrolledError:window.location.href.indexOf("IAUC0245")>1||window.location.href.indexOf("OSBB-404")>1?this.errorMsg=this.b2bAcctMigrationProps?.pharmacyAccountError:window.location.href.indexOf("OSBB-402")>1?this.errorMsg=this.b2bAcctMigrationProps?.inFlightAccountError:this.errorMsg="We apologize, we cannot complete your request to convert your account into a business account at this time. Please call Customer Service at 855-767-2547 for assistance."),this.errorPopup=!0)}}if(window.location.href.indexOf("error=jit_failure")>1?(this.errorMsg=this.enterUsernameProps.jitFailureError,this.errorPopup=!0):window.location.href.indexOf("error=access_denied")>1&&(this.errorMsg=this.enterUsernameProps.accessDeniedError,this.errorPopup=!0),-1!=window.location.pathname.search("account")&&window.location.search.indexOf("emailToken")>-1){dV().AB.COMMON.setCookie("ECommRedirectURL","/customer-account/communication-preference",1);let e=new URLSearchParams(window.location.search).get("emailToken"),t=this.authService.getUcaHttpOptionsV3();if(delete t.Authorization,e){let i=this;$.ajax({url:dV().AB.anonymousUnsubscribe+"?token="+e,type:"GET",headers:t,success:function(e){e&&e.emailAddress&&i.populateUserName(e.emailAddress),console.log("Email from unsubscribe returned:",e.emailAddress)},error:function(e){console.log("Failed to return emailAddress from unsubscribe API",e)}})}}this.authService.closeModal.subscribe((e=>{1==e&&(this.clearErrors(),this.clearEnterUsernameForm(),this.signInService.changeAccount(),this.authService.closeModal.next(!1))})),this.authService.loginHintFlow.subscribe((e=>{e&&(this.loginHintFlow=!0,this.enterUsernameForm.get("username")?.setValue(this.authService.chicoryObj.loginHint?.username),this.enterUsernameForm.get("username")?.disable(),this.submitUsername(this.authService.chicoryObj.loginHint,"otp"))})),this.authService.isPageView.subscribe({next:e=>{this.isPageView=e}})}prePouplateUsernameResetPwd(){let e=new URLSearchParams(window.location.search).get("reset_hint");e&&(this.enterUsernameForm.get("username")?.setValue(e),Object.keys(this.enterUsernameForm.controls).forEac
1h((e=>{this.enterUsernameForm.get(e)?.markAsDirty()})))}socialSignIn(e){let t=this.authService.getSocialAuthorizeURL(e);window.AB?.DATALAYER&&(window.AB.DATALAYER.setModalClickEvents(`otp:lets-find-your-account|sign-in-with-${e}`),window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"acip371626Social",data:!0,isAcrossPages:!0})),window.location.href=t}updateBusinessRegistrationURL(){this.businessCreateAccount=this.authService.getBusinessBaseUrl()+this.enterUsernameProps?.businessAcctLink}get usernameForm(){return this.enterUsernameForm.controls}resignInUserName(){!dV().SWY.previousLogin.email&&dV().AB.userInfo.email&&(dV().SWY.previousLogin.email=dV().AB.userInfo.email),dV().SWY.previousLogin.email&&""!=dV().SWY.previousLogin.email?this.populateUserName(dV().SWY.previousLogin.email):$("body").on("onGetUserInfoLoad",((e,t)=>{let i=JSON.parse(t);if(i){let e=i.profileEmail?i.profileEmail:i.profilePhone;this.populateUserName(e)}}))}populateUserName(e){e&&""!==e&&(this.enterUsernameForm.get("username")?.setValue(e),this.enterUsernameForm.get("username")?.disable(),this.isResignIn=!0)}validatorUsername(){let e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,t=new RegExp("^[0-9]+$");return i=>{let n={required:!1,invalidEmail:!1,invalidPhone:!1,mobilePattern:!1};if(null==i.value||null==i.value||i.value&&0==i.value.length)return n.required=!0,n;if(t.test(i.value)){if("0"===i.value.charAt(0)||"1"===i.value.charAt(0))return n.mobilePattern=!0,n;if(10!==i.value.length)return n.invalidPhone=!0,n;this.signInService.signInFlowType.next("mobile")}else{if(i.value&&""!=i.value&&!e.test(i.value))return n.invalidEmail=!0,n;this.signInService.signInFlowType.next("email")}}}goToCreateAcct(){this.clearEnterUsernameForm(),this.clearErrors(),window.AB?.DATALAYER&&window.AB.DATALAYER.setSignInModalEvents("view","createAccount Modal|view","","create-account"),this.authService.flowType.next("createAccount")}signInWithDiffAcc(e){this.signInService.changeAccount(),dV().SWY.OKTA.silentSignOutFromOkta(e),dV().AB.COMMON.openAuthenticateModal("signIn")}submitUsername(e,t){"pw"===t?this.loadingPW=!0:"pk"===t?this.loadingPK=!0:this.loading=!0,this.clearErrors();let i=this;window.AB?.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:"modalClick",modalAndLinkData:"pk"===t?"otp:lets-find-your-account|sign-in-with-passkey":`signIn Modal|signin-${"pw"===t?"with":"without"}-pswd`}),this.signInService.otpData.username=e.username;let n=this.authService.generateHash(e.username),r=this.authService.getDeviceToken(),s="pw"===t||"pk"===t?this.authService.getHeadersNewDeviceLoginV2():this.authService.getHeaders();s["x-aci-user-hash"]=n;let a={userId:e.username,context:{deviceToken:r}},o=new jy(s),l=this.authService.getCSMSEndpoint()+this.signInService.AUTHN_URL;"pw"===t?l+="?mode=nonotp":"pk"===t&&(l+="?mode=webauthn"),this.authService.sendPostRequest(l,a,o).subscribe((e=>{i.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let n=e.body;i.signInService.otpData.oktaId=n.oktaId,i.signInService.otpData.stateToken=n.stateToken,i.signInService.otpData.userId=n.userId,i.signInService.otpData.expiresAt=n.expiresAt,i.signInService.otpData.customerType=n.ct,i.signInService.otpData.avsi=n.avsi,"ACTIVE"==n.status?(i.signInService.isphoneVerified=!1,"pk"===t&&n.stateToken&&!n.errors?(this.loadingPK=!1,this.passkeySignIn(n)):"CSMS0208"==n.errors?.[0]?.errorCode?(i.signInService.currentScreen.next("enterPassword"),window.AB?.DATALAYER&&window.AB.DATALAYER.setSignInModalEvents("view",`OTP:${i.signInFlowType}-password-modal|view`)):(n.factors?.forEach((e=>{"email"==i.signInFlowType&&"email"==e.factorType?i.signInService.otpData.factorId=e.id:"mobile"==i.signInFlowType&&"sms"==e.factorType&&(i.signInService.isphoneVerified=!0,i.signInService.otpData.factorId=e.id)})),"pw"===t?(i.loadingPW=!1,i.signInService.currentScreen.next("enterPassword"),window.AB?.DATALAYER&&window.AB.DATALAYER.setSignInModalEvents("view",`OTP:${i.signInFlowType}-password-modal|view`)):(i.loading=!1,i.signInService.currentScreen.next("enterOtp"),window.AB?.DATALAYER&&window.AB.DATALAYER.setSignInModalEvents("view",`OTP:${i.signInFlowType}-code-sent|view`)),i.authService.verificationCodeTimer())):"PASSWORD_EXPIRED"==n.status?(i.errorMsg="Your password has expired. You might have started password reset that was never completed.",i.errorPopup=!0,i.loading=!1,i.loadingPW=!1):n.status}),(e=>{if(500==e.status&&e.error){let t=e.error;i.errorMsg=t.message}else{let t=e&&e.error&&e.error?.errors?e.error?.errors:"";t[0]&&"CSMS0149"==t[0].errorCode?i.errorMsg="Because of multiple login attempts your account has been temporarily locked for security reasons, please try again in 1 hour.":t[0]&&"CSMS0206"==t[0].errorCode?(i.inlineAPIErrorMsg=i.sharedProps?.multAcctError,i.inlineAPIError=!0):t[0]&&"CSMS0139"==t[0].errorCode?(i.inlineAPIErrorMsg="A verification code was recently sent. Please wait 30 seconds before trying again",i.inlineAPIError=!0):t[0]&&t[0].message?(this.loginHintFlow&&this.enterUsernameForm.get("username")?.enable(),""===i.inl
1ineAPIErrorMsg&&(i.inlineAPIErrorMsg=t[0].message),i.inlineAPIError=!0):i.errorMsg=this.sharedProps?.techDiffError,i.authService.setDatalayerError(t[0]?.errorCode,"OTP-error",this.signInFlowType+"| "+this.errorMsg)}""!==i.errorMsg&&(i.errorPopup=!0,setTimeout((()=>i.authnError.nativeElement.focus()),0)),i.loading=!1,i.loadingPW=!1,i.loadingPK=!1}))}clearEnterUsernameForm(){let e=this.enterUsernameForm.controls.username;e.setErrors(null),e.setValue(""),e.markAsPristine(),e.markAsUntouched()}analyticsEvents(e){window.AB?.DATALAYER&&window.AB.DATALAYER.accountInputErrorTracking(e)}clearErrors(){this.errorPopup=!1,this.errorMsg="",this.inlineAPIError=!1,this.inlineAPIErrorMsg=""}strToBin(e){e=e.replace(/-/g,"+").replace(/_/g,"/"),e+="=".repeat((4-e.length%4)%4);let t=window.atob(e),i=t.length,n=new Uint8Array(i);for(let e=0;e<i;e++)n[e]=t.charCodeAt(e);return n}binToStr(e){return btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}static{this.ɵfac=function(t){return new(t||e)($d(dC),$d(vF),$d(TN))}}static{this.ɵcmp=Qr({type:e,selectors:[["enter-username"]],viewQuery:function(e,t){if(1&e&&tm(qU,5),2&e){let e;im(e=nm())&&(t.authnError=e.first)}},inputs:{enterUsernameProps:"enterUsernameProps",sharedProps:"sharedProps",signInFlowType:"signInFlowType",resignIn:"resignIn",b2bAcctMigrationProps:"b2bAcctMigrationProps",thirdPartyProps:"thirdPartyProps"},decls:29,vars:21,consts:[["showLoading",""],["showLoadingPW",""],["createAccountSection",""],["enterUsernameError",""],["convertSuccess",""],["showLoadingPK",""],["class","auth-styles__title","authautofocus","",4,"ngIf"],[4,"ngIf"],[1,"body-text","auth-styles__subtitle"],[3,"formGroup"],[1,"input-field","mb-8"],[1,"input-field__wrapper",3,"ngClass"],["for","enterUsername",1,"input-field__float-label"],["id","enterUsername","type","text","placeholder"," ","aria-label","Email or mobile number","aria-describedby","error-username","formControlName","username","required","required",3,"focusout"],["class","input-field__help-text body-text-xs","id","error-username","aria-live","polite",4,"ngIf"],["type","submit",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"click","disabled"],[4,"ngIf","ngIfElse"],["type","button",1,"btn","btn-lg","btn-secondary","auth-styles__btn",3,"click","disabled"],["class","btn btn-xl btn-secondary--neutral-dark auth-styles__btn mt-42","aria-label","Sign in with Google",3,"click",4,"ngIf"],["class","btn btn-xl btn-secondary--neutral-dark auth-styles__btn","aria-label","Sign in with Apple",3,"click",4,"ngIf"],["authautofocus","",1,"auth-styles__title"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["tabindex","-1",1,"popup","popup-light","popup-light-success","alert","fade","show"],[1,"svg-icon","svg-success-outline"],["id","error-username","aria-live","polite",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],[1,"sr-only"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],["aria-label","Sign in with Google",1,"btn","btn-xl","btn-secondary--neutral-dark","auth-styles__btn","mt-42",3,"click"],["alt","",3,"src"],["aria-label","Sign in with Apple",1,"btn","btn-xl","btn-secondary--neutral-dark","auth-styles__btn",3,"click"],[1,"mt-3"],["aria-label","Sign in with Passkey",1,"btn","btn-xl","btn-secondary--neutral-dark","w-50","font-weight-normal",3,"click","disabled"],[1,"svg-icon","align-middle","svg-passkey-icon-24"],["href","javascript:void(0);",1,"enter-username__diff-acc","link-reg",3,"click","keydown.space"],[1,"enter-username__create-acct-sign-in-pg"],[1,"enter-username__create-acct-sign-in-pg__text","title-xs-light"],["role","button","tabindex","0","href","javascript:void(0);",1,"enter-username__create-acct-sign-in-pg__link","link-reg",3,"click","keydown.space"],["data-tabindex","last","role","link","tabindex","0",1,"enter-username__create-acct-sign-in-pg__link","link-reg"]],template:function(e,t){if(1&e){let e=Mf();ph(0,jU,2,1,"h1",6)(1,zU,2,1,"h2",6)(2,WU,9,1,"ng-container",7)(3,HU,9,1,"ng-container",7),kf(4,"div",8),am(5),xf(),kf(6,"form",9)(7,"div",10)(8,"div",11)(9,"label",12)(10,"input",13),jf("focusout",(function(i){return Wa(e),Ha(t.analyticsEvents(i.currentTarget))}
1)),xf(),kf(11,"span"),am(12,"Email or mobile number"),xf()()(),ph(13,ZU,10,5,"div",14),xf(),kf(14,"div")(15,"button",15),jf("click",(function(){return Wa(e),Ha(t.submitUsername(t.enterUsernameForm.value,"otp"))})),ph(16,XU,2,1,"ng-container",16)(17,eV,1,0,"ng-template",null,0,Wm),xf(),kf(19,"button",17),jf("click",(function(){return Wa(e),Ha(t.submitUsername(t.enterUsernameForm.value,"pw"))})),ph(20,tV,2,1,"ng-container",16)(21,iV,1,0,"ng-template",null,1,Wm),xf()(),ph(23,nV,3,2,"button",18)(24,rV,3,2,"button",19)(25,oV,7,4,"div",7),xf(),ph(26,lV,3,0,"ng-container",16)(27,cV,10,5,"ng-template",null,2,Wm)}if(2&e){let e=sm(18),i=sm(22),n=sm(28);zh("ngIf",!t.isPageView),Vd(),zh("ngIf",t.isPageView),Vd(),zh("ngIf",t.errorPopup),Vd(),zh("ngIf",t.successPopup),Vd(2),cm(" ",null==t.enterUsernameProps?null:t.enterUsernameProps.landingPageSubtitle,"\n"),Vd(),zh("formGroup",t.enterUsernameForm),Vd(2),zh("ngClass",Om(19,$U,t.usernameForm.username.invalid&&t.usernameForm.username.touched||t.inlineAPIError)),Vd(5),zh("ngIf",(t.usernameForm.username.errors||t.inlineAPIError)&&t.usernameForm.username.touched||t.loginHintFlow&&t.inlineAPIError),Vd(2),zh("disabled",!(t.enterUsernameForm.valid&&t.enterUsernameForm.dirty||t.isResignIn)),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(3),zh("disabled",!(t.enterUsernameForm.valid&&t.enterUsernameForm.dirty||t.isResignIn)),Vd(),zh("ngIf",!t.loadingPW)("ngIfElse",i),Vd(3),zh("ngIf",t.enableGoogleSignIn),Vd(),zh("ngIf",t.enableAppleSignIn),Vd(),zh("ngIf",t.enablePasskey),Vd(),zh("ngIf",t.isResignIn)("ngIfElse",n)}},dependencies:[sy,cy,DS,d_,$_,j_,nC,US,qS,IF],encapsulation:2})}}return e})(),pV=["newDeviceLoginError"];function hV(e,t){if(1&e&&(Ef(0),kf(1,"div",12,1)(3,"div",13)(4,"div",14),Tf(5,"span",15),xf(),kf(6,"div",16)(7,"div",17),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function fV(e,t){if(1&e){let e=Mf();kf(0,"label",18)(1,"input",19),mm("ngModelChange",(function(t){Wa(e);let i=Yf();return fm(i.selectedOption,t)||(i.selectedOption=t),Ha(t)})),xf(),kf(2,"span",20),Tf(3,"span",21),xf(),kf(4,"span",22),am(5),xf()()}if(2&e){let e=t.$implicit,i=Yf();Vd(),hm("ngModel",i.selectedOption),zh("value",e.factorType),gh("data-tabindex",i.selectedOption||i.loading?null:"last")("aria-labelledby",e.factorType),Vd(3),zh("id",e.factorType),Vd(),cm(" ",i.getVerificationMessage(e)," ")}}function mV(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",null==e.newDeviceLoginProps?null:e.newDeviceLoginProps.newDeviceButtonLabel," ")}}function gV(e,t){1&e&&Tf(0,"div",23)}var bV=(()=>{class e{constructor(e,t,i){this.authService=e,this.signInService=t,this.authComp=i,this.selectedOption="",this.factors=[],this.loading=!1,this.errorPopup=!1}ngOnInit(){this.factors=this.signInService.otpData.factors.filter((e=>"email"===e.factorType||"sms"===e.factorType)),this.analyticsEvents("modalView","new-device-signin-modal|view")}ngAfterViewInit(){this.authComp.closeBtnFocus()}getVerificationMessage(e){switch(e.factorType){case"VoiceCall":return`Call code to ${e.profile.phoneNumber||""}`;case"webauthn":return"Use passkey";case"email":return`Send code to ${e.profile.email||""}`;default:return`Text code to ${e.profile.phoneNumber||""}`}}onContinue(){this.loading=!0;let e=this.factors.find((e=>e.factorType===this.selectedOption)),t=e?.id,i=""+("email"===e.factorType?"email":"mobile");this.analyticsEvents("topNav",`new-device-signin-modal|${i}-continue`);let n=this.authService.getCSMSEndpoint()+this.signInService.VERIFY_URL+t+"/send",r={stateToken:this.signInService.otpData.stateToken,oktaId:this.signInService.otpData.oktaId,expiresAt:this.signInService.otpData.expiresAt,loginId:this.signInService.otpData.userId},s=this.authService.getHeadersNewDeviceLoginV2(),a=new jy(s);this.callSendApi(n,r,a)}callSendApi(e,t,i){let n=this;this.authService.sendPostRequest(e,t,i).subscribe((e=>{n.authService.correlationId=e.headers.get("x-swy-correlation-id")?e.headers.get("x-swy-correlation-id"):"";let t=e.body;n.signInService.otpData.expiresAt=t.expiresAt,n.signInService.otpData.factorType=t.factors[0].factorType,n.sign
1InService.otpData.stateToken=t.stateToken,n.signInService.otpData.factorId=t.factors[0].id,n.signInService.otpData.isNewDeviceLogin=!0;let i=this.factors.find((e=>e.factorType===this.selectedOption));if(i)switch(i.factorType){case"email":this.signInService.otpData.username=i?.profile?.email??t.username;break;case"sms":this.signInService.otpData.username=i?.profile?.phoneNumber??t.username}n.loading=!1,n.signInService.signInFlowType.next(i.factorType),n.signInService.currentScreen.next("enterOtp"),n.authService.verificationCodeTimer()}),(e=>{let t=e.error?.errors,i=t[0]&&t[0].errorCode?t[0].errorCode:"",r=t[0]&&t[0].message?t[0].message:n.sharedProps?.techDiffError;n.errorMsg="CSMS0139"==i?"Please wait 30 seconds before trying to resend another code.":r,n.errorMsg.length>0&&(n.errorPopup=!0,setTimeout((()=>n.authnError.nativeElement.focus()),0)),n.loading=!1,n.authService.setDatalayerError(i,"new-device-login",r)}))}analyticsEvents(e,t){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:t})}static{this.ɵfac=function(t){return new(t||e)($d(vF),$d(TN),$d(aU))}}static{this.ɵcmp=Qr({type:e,selectors:[["new-device-login"]],viewQuery:function(e,t){if(1&e&&tm(pV,5),2&e){let e;im(e=nm())&&(t.authnError=e.first)}},inputs:{newDeviceLoginProps:"newDeviceLoginProps",signInFlowType:"signInFlowType",sharedProps:"sharedProps"},decls:14,vars:8,consts:[["showLoading",""],["newDeviceLoginError",""],[1,"web-otp"],[1,"verify-device"],[1,"auth-styles__title"],[4,"ngIf"],[1,"body-text","auth-styles__subtitle"],["id","verifyOptionForm","data-focus","false","role","form",1,"verify-device__form"],[1,"radioButton"],["class","d-flex pds-radio",4,"ngFor","ngForOf"],[1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"click","disabled"],[4,"ngIf","ngIfElse"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],[1,"d-flex","pds-radio"],["type","radio","name","verify-device",1,"verify-device__radio-input",3,"ngModelChange","ngModel","value"],[1,"d-flex","align-items-center","justify-content-center","pds-radio-bullet-container"],[1,"pds-radio-bullet"],["aria-hidden","true",1,"ml-2","pds-radio-label",3,"id"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"div",3)(2,"h2",4),am(3),xf(),ph(4,hV,9,1,"ng-container",5),kf(5,"div",6),am(6),xf(),kf(7,"form",7)(8,"div",8),ph(9,fV,6,6,"label",9),xf()(),kf(10,"button",10),jf("click",(function(){return Wa(e),Ha(t.onContinue())})),ph(11,mV,2,1,"ng-container",11)(12,gV,1,0,"ng-template",null,0,Wm),xf()()()}if(2&e){let e=sm(13);Vd(3),lm(null==t.newDeviceLoginProps?null:t.newDeviceLoginProps.newDeviceTitle),Vd(),zh("ngIf",t.errorPopup),Vd(2),cm(" ",null==t.newDeviceLoginProps?null:t.newDeviceLoginProps.newDeviceSubtitle," "),Vd(3),zh("ngForOf",t.factors),Vd(),zh("disabled",!t.selectedOption||t.loading),gh("data-tabindex",t.selectedOption&&!t.loading?"last":null),Vd(),zh("ngIf",!t.loading)("ngIfElse",e)}},dependencies:[oy,cy,DS,d_,LS,$_,j_,ES,IS],encapsulation:2})}}return e})();function yV(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",5)(4,"h1",6),am(5),xf(),kf(6,"p",7),am(7),xf(),kf(8,"button",8),jf("click",(function(){return Wa(e),Ha(Yf(2).tryDiffAccount())})),am(9),xf(),kf(10,"div",9)(11,"button",10),jf("click",(function(){return Wa(e),Ha(Yf(2).createAccount())})),am(12),xf()()()()(),Df()}if(2&e){let e=Yf(2);Vd(5),lm(e.shPgTitle),Vd(2),lm(e.shPgSubTitle),Vd(),gh("aria-label",e.shPgTryDiffAcct),Vd(),lm(e.shPgTryDiffAcct),Vd(3),lm(e.shPgCreateAcctLinkText)}}function vV(e,t){if(1&e){let e=Mf();kf(0,"div",11)(1,"h1",12),am(2),xf(),kf(3,"div",13),am(4),xf(),kf(5,"a",14),am(6),xf(),kf(7,"div",15)(8,"div",16)(9,"a",17),jf("click",(function(){return Wa(e),Ha(Yf(2).tryDiffAccount())})),am(10),xf()()()()}if(2&e){let e=Yf(2);Vd(2),lm(null==e.intermittentPgProps?null:e.intermittentPgProps.title),Vd(2),lm(e.bodyText),Vd(),gh("href",e.businessLink,id)("aria-label",e.buttonText),Vd(),lm(e.buttonText),Vd(3),gh("aria-label",e.tryDiffAcctText),V
1d(),lm(e.tryDiffAcctText)}}function wV(e,t){if(1&e&&(Ef(0),ph(1,yV,13,5,"ng-container",2)(2,vV,11,7,"ng-template",null,1,Wm),Df()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf",t.pharmaPage)("ngIfElse",e)}}function _V(e,t){if(1&e){let e=Mf();kf(0,"div",11)(1,"h1",12),am(2),xf(),kf(3,"p",13),am(4),xf(),kf(5,"div",13),am(6),xf(),kf(7,"a",18),jf("click",(function(){return Wa(e),Ha(Yf().tryDiffAccount())})),am(8),xf()()}if(2&e){let e=Yf();Vd(2),lm(e.businessNaTitle),Vd(2),lm(e.businessNaBT1),Vd(2),lm(e.businessNaBT2),Vd(),gh("aria-label",e.businessNaBtnTxt),Vd(),lm(e.businessNaBtnTxt)}}var SV=(()=>{class e{constructor(e,t){this.authService=e,this.signInService=t,this.pharmaPage=!1}ngOnInit(){window.location.pathname.includes("pharmacy.html")&&(this.pharmaPage=!0),this.shPgTitle=this.shProps?.shIntermittentPageTitle,this.shPgSubTitle=this.shProps?.shIntermittentSubTitle,this.shPgTryDiffAcct=this.shProps?.shIntermittentPageTryDiffAcct,this.shPgCreateAcctLinkText=this.shProps?.shIntermittentPageCreateAcctLinkText,"mobile"==this.signInFlowType?(this.tryDiffAcctText=this.intermittentPgProps?.tryDiffAcct.replace("{email/number}","number"),this.bodyText=this.intermittentPgProps?.bodyText.replace("{emailAddress/mobileNumber}","mobile number").replace("{email/number}","number"),this.businessNaBT1=this.intermittentPgProps?.businessSiteNotAvailableBodyText1?this.intermittentPgProps?.businessSiteNotAvailableBodyText1.replace("{email/number}","number"):"",this.shPgSubTitle=this.shPgSubTitle.replace("{email/number}","mobile number")):(this.tryDiffAcctText=this.intermittentPgProps?.tryDiffAcct.replace("{email/number}","email"),this.bodyText=this.intermittentPgProps?.bodyText.replace("{emailAddress/mobileNumber}","email address").replace("{email/number}","email"),this.businessNaBT1=this.intermittentPgProps?.businessSiteNotAvailableBodyText1?this.intermittentPgProps?.businessSiteNotAvailableBodyText1.replace("{email/number}","email address"):"",this.shPgSubTitle=this.shPgSubTitle.replace("{email/number}","email address"));let e=this.authService.banner.charAt(0).toUpperCase()+this.authService.banner.slice(1);this.bodyText=this.bodyText.replace("{banner}",e),this.buttonText=this.intermittentPgProps?.buttonText.replace("{banner}",e),this.businessLink=this.authService.getBusinessBaseUrl(),this.businessNaFlag="true"==this.intermittentPgProps?.isBusinessSiteEnabled,this.businessNaTitle=this.intermittentPgProps?.businessSiteNotAvailableTitle,this.businessNaBT2=this.intermittentPgProps?.businessSiteNotAvailableBodyText2?this.intermittentPgProps?.businessSiteNotAvailableBodyText2.replaceAll("{banner}",e):"",this.businessNaBtnTxt=this.intermittentPgProps?.businessSiteNotAvailableButtonText}tryDiffAccount(){this.signInService.changeAccount()}createAccount(){this.signInService.createAccount()}static{this.ɵfac=function(t){return new(t||e)($d(vF),$d(TN))}}static{this.ɵcmp=Qr({type:e,selectors:[["b2b-intermittent-pg"]],inputs:{intermittentPgProps:"intermittentPgProps",signInFlowType:"signInFlowType",shProps:"shProps"},decls:3,vars:2,consts:[["b2bNotavailable",""],["regularb2bNotAvailable",""],[4,"ngIf","ngIfElse"],[1,"web-otp"],[1,"auth-styles"],[1,"auth-styles__sh-landing-screen"],[1,"heading-l"],[1,"text-l","description-spacing"],[1,"sh-primary-button","pds-btn","pds-btn-size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center","mb-3",3,"click"],[1,"text-center"],[1,"sh-links","pds-btn","link-m--primary",3,"click"],[1,"b2b"],["authautofocus","",1,"auth-styles__title"],[1,"body-text","b2b__subtitle"],["tabindex","0","role","link",1,"btn","btn-lg","btn-primary","auth-styles__btn"],[1,"enter-username__create-acct"],[1,"links"],["tabindex","0","role","link","data-tabindex","last",1,"links__action","body-text","link-underline",3,"click"],["tabindex","0","role","link",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"click"]],template:function(e,t){if(1&e&&ph(0,wV,4,2,"ng-container",2)(1,_V,9,5,"ng-template",null,0,Wm),2&e){let e=sm(2);zh("ngIf",!t.businessNaFlag)("ngIfElse",e)}},dependencies:[cy,IF],encapsulation:2})}}return e})();function CV(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"h1",3),am(2),xf(),kf(3,"div",4),am(4),xf(),kf(5,"form",5),jf("ngSubmit",(function(){Wa(e);let t=Yf();return Ha(t.submitExistingAcct(t.existingAccount.value))})),kf(6,"div",6)(7,"div",7),Tf(8,"input",8),kf(9,"label",9),am(10),xf()(),Tf(11,"hr"),kf(12,"div",7),Tf(13,"input",10),kf(14,"label",11),am(15),xf()(),Tf(16,"hr"),xf(),kf(17,"button",12),am(18),xf()(),kf(19,"div",13)(20,"span")(21,"div",14),am(22),xf(),am(23),kf(24,"a",15),jf("click",(function(){return Wa(e),Ha(Yf().analyticsEvents("goToBanner","click"))})),am(25),xf()()(),Df()}if(2&e){let e=Yf();Vd(2),lm(null==e.acctMigrationProps?null:e.acctMigrationProps.useExistingAcctTitle),V
1d(2),cm("",e.subtitle," "),Vd(),zh("formGroup",e.existingAccount),Vd(5),lm(null==e.acctMigrationProps?null:e.acctMigrationProps.radioButton1Text),Vd(5),cm("",null==e.acctMigrationProps?null:e.acctMigrationProps.radioButton2Text," "),Vd(2),zh("disabled",!(e.existingAccount.valid&&e.existingAccount.dirty)),Vd(),cm(" ",null==e.acctMigrationProps?null:e.acctMigrationProps.buttonLabel," "),Vd(4),cm(" ",null==e.acctMigrationProps?null:e.acctMigrationProps.switchToB2cText,""),Vd(),cm(" ",null==e.acctMigrationProps?null:e.acctMigrationProps.switchToB2cLinkLabel," "),Vd(),gh("href",e.businessLink,id),Vd(),lm(e.businessLinkLabel)}}function IV(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(2);Vd(),cm(" ",null==e.acctMigrationProps?null:e.acctMigrationProps.confirmConversionButtonLabel," ")}}function AV(e,t){1&e&&Tf(0,"div",36)}function kV(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"h1",3),am(2),xf(),kf(3,"div",16)(4,"div",17)(5,"div",18),Tf(6,"img",19),xf(),kf(7,"div",20),am(8),xf()(),kf(9,"div",17)(10,"div",18),Tf(11,"img",19),xf(),kf(12,"div",20),am(13),xf()(),kf(14,"div",17)(15,"div",18),Tf(16,"img",19),xf(),kf(17,"div",20),am(18),xf()()(),kf(19,"div",21),am(20),xf(),kf(21,"div",22)(22,"label",23)(23,"span",24),Tf(24,"div",25),kf(25,"a",26),am(26),xf(),am(27," and "),kf(28,"a",27),am(29),xf()(),kf(30,"input",28),jf("change",(function(t){return Wa(e),Ha(Yf().termsToggle(t))})),xf(),kf(31,"span",29),Tf(32,"span",30),xf()()(),kf(33,"button",31),jf("click",(function(){return Wa(e),Ha(Yf().convertAccount())})),ph(34,IV,2,1,"ng-container",32)(35,AV,1,0,"ng-template",null,0,Wm),xf(),kf(37,"div",33)(38,"a",34),jf("click",(function(){return Wa(e),Ha(Yf().createNewBusinessAccount())})),am(39),Tf(40,"span",35),xf()(),Df()}if(2&e){let e=sm(36),t=Yf();Vd(2),lm(t.confirmTitle),Vd(4),Zf("src"," ",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit1Image,"",id),Jf("alt",t.bnft1Text),Vd(2),lm(t.bnft1Text),Vd(3),Zf("src"," ",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit2Image,"",id),Jf("alt",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit2Text),Vd(2),cm(" ",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit2Text," "),Vd(3),Zf("src"," ",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit3Image,"",id),Jf("alt",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit3Text),Vd(2),cm(" ",null==t.acctMigrationProps?null:t.acctMigrationProps.benefit3Text," "),Vd(2),lm(t.confirmSubtitle),Vd(4),zh("innerHTML",null==t.acctMigrationProps?null:t.acctMigrationProps.confirmConversionTerms,ed),Vd(),gh("href",null==t.termsProps?null:t.termsProps.termsLink,id),Vd(),cm(" ",null==t.termsProps?null:t.termsProps.termsLinkLabel," "),Vd(2),gh("href",null==t.termsProps?null:t.termsProps.privacyPolicyLink,id),Vd(),cm(" ",null==t.termsProps?null:t.termsProps.privacyPolicyLinkLabel," "),Vd(),gh("aria-checked",t.acceptedTerms),Vd(3),zh("disabled",!t.acceptedTerms),gh("aria-label",null==t.acctMigrationProps?null:t.acctMigrationProps.confirmConversionButtonLabel),Vd(),zh("ngIf",!t.loading)("ngIfElse",e),Vd(5),cm(" ",t.diffAcctText," ")}}function xV(){return window}var TV=(()=>{class e{constructor(e,t,i){this.authService=e,this.signInService=t,this.formBuilder=i,this.migrationView="firstScreen",this.loading=!1,this.banner=this.authService.banner,this.acceptedTerms=!1,this.existingAccount=this.formBuilder.group({option:["",[g_.required]]})}ngOnInit(){let e=this.banner.charAt(0).toUpperCase()+this.authService.banner.slice(1),t="mobile"==this.signInFlowType?this.acctMigrationProps?.useExistingAcctSubitle.replace("{email/number}","number"):this.acctMigrationProps?.useExistingAcctSubitle.replace("{email/number}","email");this.subtitle=t.replace("{banner}",e),this.businessLinkLabel=e+".com",this.businessLink=this.authService.getBaseUrl().replace("{banner}",this.banner),this.confirmTitle=this.acctMigrationProps?.confirmConversionTitle.replace("{banner}",e),this.bnft1Text=this.acctMigrationProps?.benefit1Text.replace("{banner}",e),this.confirmSubtitle=this.acctMigrationProps?.confirmConversionText.replace("{banner}",this.banner),this.diffAcctText="mobile"==this.signInFlowType?this.acctMigrationProps?.differentAcctText.replace("{email/number}","number"):this.acctMigrationProps?.differentAcctText.replace("{email/number}","email"),this.analyticsEvents("view","view")}submitExistingAcct(e){"createNewAcct"==e.option?(this.analyticsEvents("new","click"),this.createNewBusinessAccount()):(this.analyticsEvents("convert","click"),this.migrationView="confirmMigration")}convertAccount(){this.loading=!0;let e=this.authService.getAuthorizeURL()+"&sessionToken="+this.signInService.otpData.sessionToken;localStorage.setItem("create-account-success","convert");let t=xV().SWY.CONFIGSERVICE.featureToggleConfig?.isCookieACIPrefixEnabled?"ACI_S_B_convt_acc":"B_convt_acc";xV().AB.COMMON.setCookie(t,!0,0),window.location.href=e}createNewBusinessAccount(){this.authService.flowType.next("createAccount"),this.signInService.changeAccount()}termsToggle(e){this.acceptedTerms=e.target.checked}analyticsEvents(e,t){xV()?.AB?.DATALAYER&&xV().AB.DATALAYER.setConvertAccountModalEvents(e,t)}static{this.ɵfac=function(t){return new(t||e)($d(vF),$d(TN),$d(dC))}}static{this.ɵcmp=Qr({type:e,selectors:[["b2b-acct-migration"]],inputs:{acctMigrationProps:"acctMigrationProps",signInFlowType:"signInFlowType",termsProps:"termsProps"},decls:3,vars:2,consts:[["showLoading",""],[1,"b2b"],[4,"ngIf"],["authautofocus","",1,"auth-styles__title"],[1,"body-text","b2b__subtitle"],[1,"existing-account",3,"ngSubmit","formGroup"],[1,"radioButton"],[1,"radioButton__group"],["type","radio","id","convertAcct","formControlName","option","value","convertAcct",1,"radioButton__input"],["for","convertAcct",1,"radioButton__label","radioButton__label--md","body-text"],["type","radio","id","createNewAcct","formControlName","option","value","createNewAcct",1,"radioButton__input"],["for","createNewAcct",1,"radioButton__label","radioButton__label--md","body-text"],["type","submit","aria-label","Continue",1,"btn","btn-lg","btn-primary","auth-styles__btn",3,"disabled"],[1,"enter-username__create-acct"],[1,"enter-username__create-acct__text","t
1itle-xs-light"],["data-tabindex","last","tabindex","0","role","link",1,"enter-username__create-acct__link","link-reg",3,"click"],[1,"b2b__list-container"],[1,"list-item__container"],[1,"list-item__img"],[3,"src","alt"],[1,"list-item__text","body-text-sm"],[1,"body-text-sm","b2b__subtitle"],[1,"checkbox"],["for","checkboxSmallLabel","aria-label","Checkbox Label",1,"checkbox__group"],[1,"checkbox__label","checkbox__label--sm"],[3,"innerHTML"],["target","_blank","aria-label","Terms of Use, opens in a new tab","tabindex","0","role","link","id","terms-text-ada",1,"terms-of-use","link-underline"],["target","_blank","aria-label","Privacy Policy, opens in a new tab","tabindex","0","role","link",1,"privacy-policy","link-underline"],["type","checkbox","id","checkboxSmallLabel",1,"checkbox__input",3,"change"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],[1,"btn","btn-lg","btn-primary","auth-styles__btn","mt-24",3,"click","disabled"],[4,"ngIf","ngIfElse"],[1,"b2b__diff-acct-link"],["data-tabindex","last","tabindex","0","role","link",1,"links__action","body-text",3,"click"],[1,"svg-chevron-right-icon"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){1&e&&(kf(0,"div",1),ph(1,CV,26,11,"ng-container",2)(2,kV,41,25,"ng-container",2),xf()),2&e&&(Vd(),zh("ngIf","firstScreen"===t.migrationView),Vd(),zh("ngIf","confirmMigration"===t.migrationView))},dependencies:[cy,DS,d_,LS,$_,j_,US,qS,IF],encapsulation:2})}}return e})(),PV=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[vF,CF,TN,{provide:"environment",useValue:bF},Ev(Ov())],imports:[Ly,uC,pC]})}}return e})();Em(RN,[cy,TU,VU,uV,bV,SV,TV],[]);var EV=(()=>{class e{constructor(e,t){this.elementRef=e,this.zone=t,this.logInProps={sharedProps:{},enterUsernameProps:{},enterOtpProps:{},enterPWProps:{},newDeviceLoginProps:{},thirdPartyProps:{},createAccountProps:{},b2bAcctMigrationProps:{},b2bIntermittentPageProps:{},lpProps:{},shProps:{},linkedAccountPageProps:{}},this.logInProps.signInPage=this.elementRef.nativeElement.getAttribute("data-sign-in-page")?this.elementRef.nativeElement.getAttribute("data-sign-in-page"):"",this.logInProps.createAccountPage=this.elementRef.nativeElement.getAttribute("data-create-account-page")?this.elementRef.nativeElement.getAttribute("data-create-account-page"):"",this.logInProps.reSignIn=this.elementRef.nativeElement.getAttribute("data-reSignIn")?this.elementRef.nativeElement.getAttribute("data-reSignIn"):"",this.logInProps.thirdPartyFlow=this.elementRef.nativeElement.getAttribute("data-third-party-flow")?this.elementRef.nativeElement.getAttribute("data-third-party-flow"):"",this.logInProps.linkedAccount=this.elementRef.nativeElement.getAttribute("data-linked-account-page")?this.elementRef.nativeElement.getAttribute("data-linked-account-page"):"",this.logInProps.sharedProps.techDiffError=this.elementRef.nativeElement.getAttribute("data-tech-diff-error")?this.elementRef.nativeElement.getAttribute("data-tech-diff-error"):"",this.logInProps.sharedProps.accountLockedError=this.elementRef.nativeElement.getAttribute("data-account-locked-error")?this.elementRef.nativeElement.getAttribute("data-account-locked-error"):"",this.logInProps.sharedProps.phoneFormatError=this.elementRef.nativeElement.getAttribute("data-phone-format-error")?this.elementRef.nativeElement.getAttribute("data-phone-format-error"):"",this.logInProps.sharedProps.invalidPhoneError=this.elementRef.nativeElement.getAttribute("data-invalid-phone-error")?this.elementRef.nativeElement.getAttribute("data-invalid-phone-error"):"",this.logInProps.sharedProps.invalidEmailError=this.elementRef.nativeElement.getAttribute("data-invalid-email-error")?this.elementRef.nativeElement.getAttribute("data-invalid-email-error"):"",this.logInProps.sharedProps.multAcctError=this.elementRef.nativeElement.getAttribute("data-multiple-acct-error")?this.elementRef.nativeElement.getAttribute("data-multiple-acct-error"):"",this.logInProps.sharedProps.signInBtnLabel=this.elementRef.nativeElement.getAttribute("data-signin-button-label")?this.elementRef.nativeElement.getAttribute("data-signin-button-label"):"",this.logInProps.shProps.title=this.elementRef.nativeElement.getAttribute("data-sincerely-health-title")?this.elementRef.nativeElement.getAttribute("data-sincerely-health-title"):"",this.logInProps.shProps.subTitle=this.elementRef.nativeElement.getAttribute("data-sincerely-health-subtitle")?this.elementRef.nativeElement.getAttribute("data-sincerely-health-subtitle"):"",this.logInProps.shProps.pharmacyBlockImg=this.elementRef.nativeElement.getAttribute("data-pharmacy-block-img")?this.elementRef.nativeElement.getAttribute("data-pharmacy-block-img"):"",this.logInProps.shProps.pharmacyBlockImgAlt=this.elementRef.nativeElement.getAttribute("data-pharmacy-block-img-alt")?this.elementRef.nativeElement.getAttribute("data-pharmacy-block-img-alt"):"",this.logInProps.shProps.groceryBlockImg=this.elementRef.nativeElement.getAttribute("data-grocery-block-img")?this.elementRef.nativeElement.getAttribute("data-grocery-block-img"):"",this.logInProps.shProps.groceryBlockImgAlt=this.elementRef.nativeElement.getAttribute("data-grocery-block-img-alt")?this.elementRef.nativeElement.getAttribute("data-grocery-block-img-alt"):"",this.logInProps.shProps.getStartedText=this.elementRef.nativeElement.getAttribute("data-get-started-text")?this.elementRef.nativeElement.getAttribute("data-get-started-text"):"",this.logInProps.shProps.getStartedSubText=this.elementRef.nativeElement.getAttribute("data-get-started-sub-text")?this.elementRef.nativeElement.getAttribute("data-get-started-sub-text"):"",this.logInProps.shProps.createAcctBtnLabel=this.elementRef.nativeElement.getAttribute("data-create-acct-btn-label")?this.elementRef.nativeElement.getAttribute("data-create-acct-btn-label"):"",this.logInProps.shProps.signInPromptLabel=this.elementRef.nativeElement.getAttribute("data-signin-prompt-label")?this.elementRef.nativeElement.getAttribute("data-signin-prompt-label"):"",this.logInProps.shProps.signInLinkLabel=this.elementRef.nativeElement.getAttribute("data-sh-signin-link-label")?this.elementRef.nativeElement.getAttribute("data-sh-signin-link-label"):"",this.logInProps.shProps.createAcctPromptLinkLabel=this.elementRef.nativeElement.getAttribute("data-create-acct-prompt-link-label")?this.elementRef.nativeElement.getAttribute("data-create-acct-prompt-link-label"):"",this.logInProps.shProps.shIntermittentPageTitle=this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-title")?this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-title"):"",this.logInProps.shProps.shIntermittentSubTitle=this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-subtitle")?this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-subtitle"):"",this.logInProps.shProps.shIntermittentPageTryDiffAcct=this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-try-diff-acct")?this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-try-diff-acct"):"",this.logInProps.shProps.shIntermittentPageCreateAcctLinkText=this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-create-acct-link")?this.elementRef.nativeElement.getAttribute("data-sh-intermittent-pg-create-acct-link"):"",this.logInProps.shProps.createPharmProfTitle=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-title")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-title"):"",this.logInProps.shProps.createPharmProfText1=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text1")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text1"):"",this.logInProps.shProps.createPharmProfText2=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text2")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text2"):"",this.logInProps.shProps.createPharmProfText3=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text3")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text3"):"",this.logInProps.shProps.createPharmProfText4=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text4")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-text4"):"",this.logInProps.shProps.createPharmProfCreateCTA=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-create-cta")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-create-cta"):"",this.logInProps.shProps.createPharmGet
1StartedCTA=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-getstarted-cta")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-getstarted-cta"):"",this.logInProps.shProps.createPharmProfCreateLink=this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-create-link")?this.elementRef.nativeElement.getAttribute("data-create-pharmacy-profile-create-link"):"",this.logInProps.enterUsernameProps.googleButtonLabel=this.elementRef.nativeElement.getAttribute("data-google-btn-txt")?this.elementRef.nativeElement.getAttribute("data-google-btn-txt"):"",this.logInProps.enterUsernameProps.googleLogo=this.elementRef.nativeElement.getAttribute("data-google-img")?this.elementRef.nativeElement.getAttribute("data-google-img"):"",this.logInProps.enterUsernameProps.appleButtonLabel=this.elementRef.nativeElement.getAttribute("data-apple-btn-txt")?this.elementRef.nativeElement.getAttribute("data-apple-btn-txt"):"",this.logInProps.enterUsernameProps.applelogo=this.elementRef.nativeElement.getAttribute("data-apple-img")?this.elementRef.nativeElement.getAttribute("data-apple-img"):"",this.logInProps.enterUsernameProps.landingPageTitle=this.elementRef.nativeElement.getAttribute("data-landing-pg-title")?this.elementRef.nativeElement.getAttribute("data-landing-pg-title"):"",this.logInProps.enterUsernameProps.landingPageSubtitle=this.elementRef.nativeElement.getAttribute("data-landing-pg-subtitle")?this.elementRef.nativeElement.getAttribute("data-landing-pg-subtitle"):"",this.logInProps.enterUsernameProps.lpFirstSubmitBtnLabel=this.elementRef.nativeElement.getAttribute("data-first-submit-btn-label")?this.elementRef.nativeElement.getAttribute("data-first-submit-btn-label"):"",this.logInProps.enterUsernameProps.lpSecondSubmitBtnLabel=this.elementRef.nativeElement.getAttribute("data-second-submit-btn-label")?this.elementRef.nativeElement.getAttribute("data-second-submit-btn-label"):"",this.logInProps.enterUsernameProps.createAcctPrompt=this.elementRef.nativeElement.getAttribute("data-create-acct-prompt")?this.elementRef.nativeElement.getAttribute("data-create-acct-prompt"):"",this.logInProps.enterUsernameProps.createAcctLinkLabel=this.elementRef.nativeElement.getAttribute("data-create-acct-link")?this.elementRef.nativeElement.getAttribute("data-create-acct-link"):"",this.logInProps.enterUsernameProps.businessAcctPrompt=this.elementRef.nativeElement.getAttribute("data-business-acct-prompt")?this.elementRef.nativeElement.getAttribute("data-business-acct-prompt"):"",this.logInProps.enterUsernameProps.businessAcctLinkLabel=this.elementRef.nativeElement.getAttribute("data-business-acct-link-label")?this.elementRef.nativeElement.getAttribute("data-business-acct-link-label"):"",this.logInProps.enterUsernameProps.businessAcctLink=this.elementRef.nativeElement.getAttribute("data-business-acct-link")?this.elementRef.nativeElement.getAttribute("data-business-acct-link"):"",this.logInProps.enterUsernameProps.inputReqError=this.elementRef.nativeElement.getAttribute("data-input-req-error")?this.elementRef.nativeElement.getAttribute("data-input-req-error"):"",this.logInProps.enterUsernameProps.errorMessage=this.elementRef.nativeElement.getAttribute("data-uca-error-msg")?this.elementRef.nativeElement.getAttribute("data-uca-error-msg"):"",this.logInProps.enterUsernameProps.jitFailureError=this.elementRef.nativeElement.getAttribute("data-jit-failure-scenario")?this.elementRef.nativeElement.getAttribute("data-jit-failure-scenario"):"",this.logInProps.enterUsernameProps.accessDeniedError=this.elementRef.nativeElement.getAttribute("data-acess-denied-scenario")?this.elementRef.nativeElement.getAttribute("data-acess-denied-scenario"):"",this.logInProps.enterUsernameProps.passkeyText=this.elementRef.nativeElement.getAttribute("data-passkey-text")?this.elementRef.nativeElement.getAttribute("data-passkey-text"):"",this.logInProps.enterUsernameProps.passkeyButtonLabel=this.elementRef.nativeElement.getAttribute("data-passkey-button-label")?this.elementRef.nativeElement.getAttribute("data-passkey-button-label"):"",this.logInProps.enterOtpProps.verifyAcctPhoneTitle=this.elementRef.nativeElement.getAttribute("data-verify-acct-phone-title")?this.elementRef.nativeElement.getAttribute("data-verify-acct-phone-title"):"",this.logInProps.enterOtpProps.verifyAcctEmailTitle=this.elementRef.nativeElement.getAttribute("data-verify-acct-email-title")?this.elementRef.nativeElement.getAttribute("data-verify-acct-email-title"):"",this.logInProps.enterOtpProps.verifyAcctSubtitle=this.elementRef.nativeElement.getAttribute("data-verify-acct-subtitle")?this.elementRef.nativeElement.getAttribute("data-verify-acct-subtitle"):"",this.logInProps.enterOtpProps.changeUsernameLabel=this.elementRef.nativeElement.getAttribute("data-change-username-label")?this.elementRef.nativeElement.getAttribute("data-change-username-label"):"",this.logInProps.enterOtpProps.resendCodeLabel=this.elementRef.nativeElement.getAttribute("data-resend-code
1-label")?this.elementRef.nativeElement.getAttribute("data-resend-code-label"):"",this.logInProps.enterOtpProps.resendCodeSuccessMsg=this.elementRef.nativeElement.getAttribute("data-resend-code-successMsg")?this.elementRef.nativeElement.getAttribute("data-resend-code-successMsg"):"",this.logInProps.enterOtpProps.resendCodeErrorMsg=this.elementRef.nativeElement.getAttribute("data-resend-code-errorMsg")?this.elementRef.nativeElement.getAttribute("data-resend-code-errorMsg"):"",this.logInProps.enterOtpProps.incorrectOtpError=this.elementRef.nativeElement.getAttribute("data-incorrect-otp-error")?this.elementRef.nativeElement.getAttribute("data-incorrect-otp-error"):"",this.logInProps.enterOtpProps.signInWithPwLabel=this.elementRef.nativeElement.getAttribute("data-signin-with-pw-label")?this.elementRef.nativeElement.getAttribute("data-signin-with-pw-label"):"",this.logInProps.enterPWProps.enterPwTitle=this.elementRef.nativeElement.getAttribute("data-enter-password-title")?this.elementRef.nativeElement.getAttribute("data-enter-password-title"):"",this.logInProps.enterPWProps.enterPwSubtitle=this.elementRef.nativeElement.getAttribute("data-enter-password-subtitle")?this.elementRef.nativeElement.getAttribute("data-enter-password-subtitle"):"",this.logInProps.enterPWProps.enterPwReqError=this.elementRef.nativeElement.getAttribute("data-password-req-error")?this.elementRef.nativeElement.getAttribute("data-password-req-error"):"",this.logInProps.enterPWProps.incorrectPWError=this.elementRef.nativeElement.getAttribute("data-incorrect-password-error")?this.elementRef.nativeElement.getAttribute("data-incorrect-password-error"):"",this.logInProps.enterPWProps.forgotPwLabel=this.elementRef.nativeElement.getAttribute("data-forgotpw-label")?this.elementRef.nativeElement.getAttribute("data-forgotpw-label"):"",this.logInProps.enterPWProps.forgotPwLink=this.elementRef.nativeElement.getAttribute("data-forgotpw-link")?this.elementRef.nativeElement.getAttribute("data-forgotpw-link"):"",this.logInProps.enterPWProps.signInWithoutPwLabel=this.elementRef.nativeElement.getAttribute("data-signin-without-pw-label")?this.elementRef.nativeElement.getAttribute("data-signin-without-pw-label"):"",this.logInProps.newDeviceLoginProps.newDeviceTitle=this.elementRef.nativeElement.getAttribute("data-new-device-title")?this.elementRef.nativeElement.getAttribute("data-new-device-title"):"",this.logInProps.newDeviceLoginProps.newDeviceSubtitle=this.elementRef.nativeElement.getAttribute("data-new-device-subtitle")?this.elementRef.nativeElement.getAttribute("data-new-device-subtitle"):"",this.logInProps.newDeviceLoginProps.newDeviceButtonLabel=this.elementRef.nativeElement.getAttribute("data-new-device-button-label")?this.elementRef.nativeElement.getAttribute("data-new-device-button-label"):"",this.logInProps.newDeviceLoginProps.newDeviceOTPScreenTitle=this.elementRef.nativeElement.getAttribute("data-new-device-otp-screen-title")?this.elementRef.nativeElement.getAttribute("data-new-device-otp-screen-title"):"",this.logInProps.newDeviceLoginProps.newDeviceOTPScreenSubtitle=this.elementRef.nativeElement.getAttribute("data-new-device-otp-screen-subtitle")?this.elementRef.nativeElement.getAttribute("data-new-device-otp-screen-subtitle"):"",this.logInProps.createAccountProps.createAccountTitle=this.elementRef.nativeElement.getAttribute("data-create-account-title")?this.elementRef.nativeElement.getAttribute("data-create-account-title"):"",this.logInProps.createAccountProps.createAccountSubTitle=this.elementRef.nativeElement.getAttribute("data-create-account-sub-title")?this.elementRef.nativeElement.getAttribute("data-create-account-sub-title"):"",this.logInProps.createAccountProps.textSubscribeCheckboxLabel=this.elementRef.nativeElement.getAttribute("data-phone-legal-checkbox")?this.elementRef.nativeElement.getAttribute("data-phone-legal-checkbox"):"",this.logInProps.createAccountProps.textSubscribeLegalHeader=this.elementRef.nativeElement.getAttribute("data-phone-legal-header")?this.elementRef.nativeElement.getAttribute("data-phone-legal-header"):"",this.logInProps.createAccountProps.textSusbcribeLegalExpanded=this.elementRef.nativeElement.getAttribute("data-phone-legal-text")?this.elementRef.nativeElement.getAttribute("data-phone-legal-text"):"",this.logInProps.createAccountProps.emailSubscribeCheckboxLabel=this.elementRef.nativeElement.getAttribute("data-email-legal-checkbox")?this.elementRef.nativeElement.getAttribute("data-email-legal-checkbox"):"",this.logInProps.createAccountProps.emailSubscribeLegalHeader=this.elementRef.nativeElement.getAttribute("data-email-legal-header")?this.elementRef.nativeElement.getAttribute("data-email-legal-header"):"",this.logInProps.createAccountProps.emailSusbcribeLegalExpanded=this.elementRef.nativeElement.getAttribute("data-email-legal-text")?this.elementRef.nativeElement.getAttribute("data-email-legal-text"):"",this.logInProps.createAccountProps.createAccountButtonLabel=this.elementRef.nativeElement.getAttribute("data-create-account-button-label")?this.elementRef.nativeElement.getAttribute("data-create-account-button-label"):"",this.logInProps.createAccountProps.signInPrompt=this.elementRef.nativeElement.getAttribute("data-sign-in-prompt")?this.elementRef.nativeElement.getAttribute("data-sign-in-prompt"):"",this.logInProps.createAccountProps.signInLinkLabel=this.elementRef.nativeElement.getAttribute("data-sign-in-link-label")?this.elementRef.nativeElement.getAttribute("data-sign-in-link-label"):"",this.logInProps.createAccountProps.switchModeLink=this.elementRef.nativeElement.getAttribute("data-switch-otp-mode-link")?this.elementRef.nativeElement.getAttribute("data-switch-otp-mode-link"):"",this.logInProps.createAccountProps.verifyAcctBtnLabel=this.elementRef.nativeElement.getAttribute("data-verify-account-btn-label")?this.elementRef.nativeElement.getAttribute("data-verify-account-btn-label"):"",this.logInProps.createAccountProps.termsStartText=this.elementRef.nativeElement.getAttribute("data-terms-start-text")?this.elementRef.nativeElement.getAttribute("data-terms-start-text"):"",this.logInProps.createAccountProps.termsLinkLabel=this.elementRef.nativeElement.getAttribute("data-terms-link-label")?this.elementRef.nativeElement.getAttribute("data-terms-link-label"):"",this.logInProps.createAccountProps.termsLink=this.elementRef.nativeElement.getAttribute("data-terms-link")?this.elementRef.nativeElement.getAttribute("data-terms-link"):"",this.logInProps.createAccountProps.termsEndText=this.elementRef.nativeElement.getAttribute("data-terms-end-text")?this.elementRef.nativeElement.getAttribute("data-terms-end-text"):"",this.logInProps.createAccountProps.termsLearnMore=this.elementRef.nativeElement.getAttribute("data-terms-learn-more")?this.elementRef.nativeElement.getAttribute("data-terms-learn-more"):"",this.logInProps.createAccountProps.privacyPolicyLinkLabel=this.elementRef.nativeElement.getAttribute("data-privacy-policy-link-label")?this.elementRef.nativeElement.getAttribute("data-privacy-policy-link-label"):"",this.logInProps.createAccountProps.privacyPolicyLink=this.elementRef.nativeElement.getAttribute("data-privacy-policy-link")?this.elementRef.nativeElement.getAttribute("data-privacy-policy-link"):"",this.logInProps.createAccountProps.financialIncentiveText=this.elementRef.nativeElement.getAttribute("data-financial-incentive-label")?this.elementRef.nativeElement.getAttribute("data-financial-incentive-label"):"",this.logInProps.createAccountProps.financialIncentiveLink=this.elementRef.nativeElement.getAttribute("data-financial-incentive-link")?this.elementRef.nativeElement.getAttribute("data-financial-incentive-link"):"",this.logInProps.createAccountProps.loyaltyProgramsDisclaimerText=this.elementRef.nativeElement.getAttribute("data-loyalty-programs-disclaimer-label")?this.elementRef.nativeElement.getAttribute("data-loyalty-programs-disclaimer-label"):"",this.logInProps.createAccountProps.loyaltyProgramsDisclaimerLink=this.elementRef.nativeElement.getAttribute("data-loyalty-programs-disclaimer-link")?this.elementRef.nativeElement.getAttribute("data-loyalty-programs-disclaimer-link"):"",this.logInProps.createAccountProps.createAcctgoogleBtnLabel=this.elementRef.nativeElement.getAttribute("data-create-acct-google-btn-txt")?this.elementRef.nativeElement.getAttribute("data-create-acct-google-btn-txt"):"",this.logInProps.createAccountProps.createAcctGoogleLogo=this.elementRef.nativeElement.getAttribute("data-create-acct-google-img")?this.elementRef.nativeElement.getAttribute("data-create-acct-google-img"):"",this.logInProps.createAccountProps.createAcctAppleButtonLabel=this.elementRef.nativeElement.getAttribute("data-create-acct-apple-btn-txt")?this.elementRef.nativeElement.getAttribute("data-create-acct-apple-btn-txt"):"",this.logInProps.createAccountProps.createAcctAppleLogo=this.elementRef.nativeElement.getAttribute("data-create-acct-apple-img")?this.elementRef.nativeElement.getAttribute("data-create-acct-apple-img"):"",this.logInProps.b2bAcctMigrationProps.useExistingAcctTitle=this.elementRef.nativeElement.getAttribute("data-existing-acct-title")?this.elementRef.nativeElement.getAttribute("data-existing-acct-title"):"",this.logInProps.b2bAcctMigrationProps.useExistingAcctSubitle=this.elementRef.nativeElement.getAttribute("data-existing-acct-subtitle")?this.elementRef.nativeElement.getAttribute("data-existing-acct-subtitle"):"",this.logInProps.b2bAcctMigrationProps.radioButton1Text=this.elementRef.nativeElement.getAttribute("data-convert-to-business-acct")?this.elementRef.nativeElement.getAttribute("data-convert-to-business-acct"):"",this.logInProps.b2bAcctMigrationProps.radioButton2Text=this.elementRef.nativeElement.getAttribute("data-create-new-business-acct")?this.elementRef.nativeElement.getAttribute("data-create-new-business-acct"):"",this.logInProps.b2bAcctMigrationProps.buttonLabel=this.elementRef.nativeElement.getAttribute("data-account-migration-btn-text")?this.elementRef.nativeElement.getAttribute("data-account-migration-btn-text"):"",this.logInProps.b2bAcctMigrationProps.switchToB2cText=this.elementRef.nativeElement.getAttribute("data-switch-to-b2c-text")?this.elementRef.nativeElement.getAttribute("data-switch-to-b2c-text"):"",this.logInProps.b2bAcctMigrationProps.switchToB2cLinkLabel=this.elementRef.nativeElement.getAttribute("data-switch-to-b2c-linklabel")?this.elementRef.nativeElement.getAttribute("data-switch-to-b2c-linklabel"):"",this.logInProps.b2bAcctMigrationProps.confirmConversionTitle=this.elementRef.nativeElement.getAttribute("data-confirm-conversion-title")?this.elementRef.nativeElement.getAttribute("data-confirm-conversion-title"):"",this.logInProps.b2bAcctMigrationProps.benefit1Text=this.elementRef.nativeElement.getAttribute("data-bnft1-text")?this.elementRef.nativeElement.getAttribute("data-bnft1-text"):"",this.logInProps.b2bAcctMigrationProps.benefit2Text=this.elementRef.nativeElement.getAttribute("data-bnft2-text")?this.elementRef.nativeElement.getAttribute("data-bnft2-text"):"",this.logInProps.b2bAcctMigrationProps.benefit3Text=this.elementRef.nativeElement.getAttribute("data-bnft3-text")?this.elementRef.nativeElement.getAttribute("data-bnft3-text"):"",this.logInProps.b2bAcctMigrationProps.benefit1Image=this.elementRef.nativeElement.getAttribute("data-bnft1-image")?this.elementRef.nativeElement.getAttribute("data-bnft1-image"):"",this.logInProps.b2bAcctMigrationProps.benefit2Image=this.elementRef.nativeElement.getAttribute("data-bnft2-image")?this.elementRef.nativeElement.getAttribute("data-bnft2-image"):"",this.logInProps.b2bAcctMigrationProps.benefit3Image=this.elementRef.nativeElement.getAttribute("data-bnft3-image")?this.elementRef.nativeElement.getAttribute("data-bnft3-image"):"",this.logInProps.b2bAcctMigrationProps.benefit1ImageAltText=this.elementRef.nativeElement.getAttribute("data-bnft1-alt")?this.elementRef.nativeElement.getAttribute("data-bnft1-alt"):"",this.logInProps.b2bAcctMigrationProps.benefit2ImageAltText=this.elementRef.nativeElement.getAttribute("data-bnft2-alt")?this.elementRef.nativeElement.getAttribute("data-bnft2-alt"):"",this.logInProps.b2bAcctMigrationProps.benefit3ImageAltText=this.elementRef.nativeElement.getAttribute("data-bnft3-alt")?this.elementRef.nativeElement.getAttribute("data-bnft3-alt"):"",this.logInProps.b2bAcctMigrationProps.confirmConversionText=this.elementRef.nativeElement.getAttribute("data-confirm-conversion-text")?this.elementRef.nativeElement.getAttribute("data-confirm-conversion-text"):"",this.logInProps.b2bAcctMigrationProps.confirmConversionTerms=this.elementRef.nativeElement.getAttribute("data-confirm-conversion-termsofuse")?this.elementRef.nativeElement.getAttribute("data-confirm-conversion-termsofuse"):"",this.logInProps.b2bAcctMigrationProps.confirmConversionButtonLabel=this.elementRef.nativeElement.getAttribute("data-confirm-button-text")?this.elementRef.nativeElement.getAttribute("data-confirm-button-text"):"",this.logInProps.b2bAcctMigrationProps.differentAcctText=this.elementRef.nativeElement.getAttribute("data-different-email-linklabel")?this.elementRef.nativeElement.getAttribute("data-different-email-linklabel"):"",this.logInProps.b2bAcctMigrationProps.tribeAccountError=this.elementRef.nativeElement.getAttribute("data-tribe-account-error")?this.elementRef.nativeElement.getAttribute("data-tribe-account-error"):"",this.logInProps.b2bAcctMigrationProps.householdWithActiveCustomersError=this.elementRef.nativeElement.getAttribute("data-household-with-active-error")?this.elementRef.nativeElement.getAttribute("data-household-with-active-error"):"",this.logInProps.b2bAcctMigrationProps.alreadyBusinessAccountError=this.elementRef.nativeElement.getAttribute("data-already-business-account-error")?this.elementRef.nativeElement.getAttribute("data-already-business-account-error"):"",this.logInProps.b2bAcctMigrationProps.alreadyEmployeeError=this.elementRef.nativeElement.getAttribute("data-already-employee-error")?this.elementRef.nativeElement.getAttribute("data-already-employee-error"):"",this.logInProps.b2bAcctMigrationProps.notOnlineEnrolledError=this.elementRef.nativeElement.getAttribute("data-not-online-enrolled-error")?this.elementRef.nativeElement.getAttribute("data-not-online-enrolled-error"):"",this.logInProps.b2bAcctMigrationProps.pharmacyAccountError=this.elementRef.nativeElement.getAttribute("data-pharmacy-account-scenario")?this.elementRef.nativeElement.getAttribute("data-pharmacy-account-scenario"):"",this.logInProps.b2bAcctMigrationProps.inFlightAccountError=this.elementRef.nativeElement.getAttribute("data-in-flight-account-scenario")?this.elementRef.nativeElement.getAttribute("data-in-flight-account-scenario"):"",this.logInProps.thirdPartyProps.thirdPartyGenericError=this.elementRef.nativeElement.getAttribute("data-third-party-generic-error")?this.elementRef.nativeElement.getAttribute("data-third-party-generic-error"):"",this.logInProps.thirdPartyProps.thirdPartyReqParamsError=this.elementRef.nativeElement.getAttribute("data-third-party-req-params-error")?this.elementRef.nativeElement.getAttribute("data-third-party-req-params-error"):"",this.logInProps.thirdPartyProps.thirdPartyPromptReqdError=this.elementRef.nativeElement.getAttribute("data-third-party-prompt-reqd-error")?this.elementRef.nativeElement.getAttribute("data-third-party-prompt-reqd-error"):"",this.logInProps.thirdPartyProps.thirdPartyResponseTypeReqdError=this.elementRef.nativeElement.getAttribute("data-third-party-response-type-reqd-error")?this.elementRef.nativeElement.getAttribute("data-third-party-response-type-reqd-error"):"",this.logInProps.thirdPartyProps.thirdPartyResponseTypeReqdError=this.elementRef.nativeElement.getAttribute("data-third-party-response-mode-reqd-error")?this.elementRef.nativeElement.getAttribute("data-third-party-response-mode-reqd-error"):"",this.logInProps.thirdPartyProps.thirdPartyResponseModeReqdError=this.elementRef.nativeElement.getAttribute("data-third-party-response-mode-reqd-error")?this.elementRef.nativeElement.getAttribute("data-third-party-response-mode-reqd-error"):"",this.logInProps.thirdPartyProps.thirdPartyInvalidEmailOrPhone=this.elementRef.nativeElement.getAttribute("data-third-party-invalid-email-phone")?this.elementRef.nativeElement.getAttribute("data-third-party-invalid-email-phone"):"",this.logInProps.b2bIntermittentPageProps.title=this.elementRef.nativeElement.getAttribute("data-
1intermittent-pg-title")?this.elementRef.nativeElement.getAttribute("data-intermittent-pg-title"):"",this.logInProps.b2bIntermittentPageProps.bodyText=this.elementRef.nativeElement.getAttribute("data-intermittent-pg-text")?this.elementRef.nativeElement.getAttribute("data-intermittent-pg-text"):"",this.logInProps.b2bIntermittentPageProps.buttonText=this.elementRef.nativeElement.getAttribute("data-intermittent-pg-btn")?this.elementRef.nativeElement.getAttribute("data-intermittent-pg-btn"):"",this.logInProps.b2bIntermittentPageProps.tryDiffAcct=this.elementRef.nativeElement.getAttribute("data-intermittent-pg-try-dif-acct")?this.elementRef.nativeElement.getAttribute("data-intermittent-pg-try-dif-acct"):"",this.logInProps.b2bIntermittentPageProps.isBusinessSiteEnabled=this.elementRef.nativeElement.getAttribute("data-b2b-not-available-flag")?this.elementRef.nativeElement.getAttribute("data-b2b-not-available-flag"):"",this.logInProps.b2bIntermittentPageProps.businessSiteNotAvailableTitle=this.elementRef.nativeElement.getAttribute("data-b2b-not-available-Title")?this.elementRef.nativeElement.getAttribute("data-b2b-not-available-Title"):"",this.logInProps.b2bIntermittentPageProps.businessSiteNotAvailableBodyText1=this.elementRef.nativeElement.getAttribute("data-b2b-not-available-bt1")?this.elementRef.nativeElement.getAttribute("data-b2b-not-available-bt1"):"",this.logInProps.b2bIntermittentPageProps.businessSiteNotAvailableBodyText2=this.elementRef.nativeElement.getAttribute("data-b2b-not-available-bt2")?this.elementRef.nativeElement.getAttribute("data-b2b-not-available-bt2"):"",this.logInProps.b2bIntermittentPageProps.businessSiteNotAvailableButtonText=this.elementRef.nativeElement.getAttribute("data-b2b-not-available-button-txt")?this.elementRef.nativeElement.getAttribute("data-b2b-not-available-button-txt"):"",this.logInProps.linkedAccountPageProps.linkedAccountImageReference=this.elementRef.nativeElement.getAttribute("data-linked-account-img")?this.elementRef.nativeElement.getAttribute("data-linked-account-img"):"",this.logInProps.linkedAccountPageProps.linkedAccountImageAltText=this.elementRef.nativeElement.getAttribute("data-linked-account-img-alt")?this.elementRef.nativeElement.getAttribute("data-linked-account-img-alt"):"",this.logInProps.linkedAccountPageProps.linkedAccountTitle=this.elementRef.nativeElement.getAttribute("data-linked-account-title")?this.elementRef.nativeElement.getAttribute("data-linked-account-title"):"",this.logInProps.linkedAccountPageProps.linkedAccountSubTitle=this.elementRef.nativeElement.getAttribute("data-linked-account-subtitle")?this.elementRef.nativeElement.getAttribute("data-linked-account-subtitle"):"",this.logInProps.linkedAccountPageProps.linkedAccountSubTitle2=this.elementRef.nativeElement.getAttribute("data-linked-account-subtitle2")?this.elementRef.nativeElement.getAttribute("data-linked-account-subtitle2"):"",this.logInProps.linkedAccountPageProps.linkedAccountSignInButtonLabel=this.elementRef.nativeElement.getAttribute("data-linked-account-singin-button")?this.elementRef.nativeElement.getAttribute("data-linked-account-singin-button"):"",this.logInProps.linkedAccountPageProps.linkedAccountCreateAccountButtonLabel=this.elementRef.nativeElement.getAttribute("data-linked-account-create-account-button")?this.elementRef.nativeElement.getAttribute("data-linked-account-create-account-button"):"",this.logInProps.lpProps.guestSignInTitle=this.elementRef.nativeElement.getAttribute("data-guest-signin-title")?this.elementRef.nativeElement.getAttribute("data-guest-signin-title"):"",this.logInProps.lpProps.guestSignInSubTitle=this.elementRef.nativeElement.getAttribute("data-guest-signin-subtitle")?this.elementRef.nativeElement.getAttribute("data-guest-signin-subtitle"):"",this.logInProps.lpProps.guestSignInButton=this.elementRef.nativeElement.getAttribute("data-guest-signin-button")?this.elementRef.nativeElement.getAttribute("data-guest-signin-button"):"",this.logInProps.lpProps.guestCreateAccountTitle=this.elementRef.nativeElement.getAttribute("data-guest-create-account-title")?this.elementRef.nativeElement.getAttribute("data-guest-create-account-title"):"",this.logInProps.lpProps.guestCreateAccountSubtitle=this.elementRef.nativeElement.getAttribute("data-guest-create-account-subtitle")?this.elementRef.nativeElement.getAttribute("data-guest-create-account-subtitle"):"",this.logInProps.lpProps.guestCreateAccountButton=this.elementRef.nativeElement.getAttribute("data-guest-create-account-button")?this.elementRef.nativeElement.getAttribute("data-guest-create-account-button"):"",this.logInProps.lpProps.promo1ImageReference=this.elementRef.nativeElement.getAttribute("data-promo1-image-reference")?this.elementRef.nativeElement.getAttribute("data-promo1-image-reference"):"",this.logInProps.lpProps.Promo1Text=this.elementRef.nativeElement.getAttribute("data-promo1-text")?this.elementRef.nativeElement.getAttribute("data-promo1-text"):"",this.logInProps.lpProps.Promo1Subtext=this.elementRef.nativeElement.getAttribute("data-promo1-subtext")?this.elementRef.nativeElement.getAttribute("data-promo1-subtext"):"",this.logInProps.lpProps.promo2ImageReference=this.elementRef.nativeElement.getAttribute("data-promo2-image-reference")?this.elementRef.nativeElement.getAttribute("data-promo2-image-reference"):"",this.logInProps.lpProps.Promo2Text=this.elementRef.nativeElement.getAttribute("data-promo2-text")?this.elementRef.nativeElement.getAttribute("data-promo2-text"):"",this.logInProps.lpProps.Promo2Subtext=this.elementRef.nativeElement.getAttribute("data-promo2-subtext")?this.elementRef.nativeElement.getAttribute("data-promo2-subtext"):"",this.logInProps.lpProps.promo3ImageReference=this.elementRef.nativeElement.getAttribute("data-promo3-image-reference")?this.elementRef.nativeElement.getAttribute("data-promo3-image-reference"):"",this.logInProps.lpProps.Promo3Text=this.elementRef.nativeElement.getAttribute("data-promo3-text")?this.elementRef.nativeElement.getAttribute("data-promo3-text"):"",this.logInProps.lpProps.Promo3Subtext=this.elementRef.nativeElement.getAttribute("data-promo3-subtext")?this.elementRef.nativeElement.getAttribute("data-promo3-subtext"):"",this.logInProps.lpProps.termsConditionsLink=this.elementRef.nativeElement.getAttribute("data-terms-conditions-link")?this.elementRef.nativeElement.getAttribute("data-terms-conditions-link"):"",window.signInModal={zone:t,component:this}}ngOnInit(){}
1showModal(e){this.originalView=e,$("#modal-authenticate").modal({show:!0}),window.AB?.COMMON?.modalTrapKeyboard("#modal-authenticate"),setTimeout((()=>{$("#modal-authenticate").on("shown.bs.modal",(function(){$("#modal-authenticate .close")[0].focus()}))}),0)}showSignUpForm(){this.originalView="createAccount"}showSHLandingScreen(){this.originalView="shLandingScreen"}showSignInForm(){this.originalView="signIn"}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Tl))}}static{this.ɵcmp=Qr({type:e,selectors:[["login-wrapper"]],decls:1,vars:2,consts:[[3,"logInProps","originalView"]],template:function(e,t){1&e&&Tf(0,"authentication",0),2&e&&zh("logInProps",t.logInProps)("originalView",t.originalView)},dependencies:[aU],encapsulation:2})}}return e})(),DV=class{constructor(e,t){this.open=e,this.close=t||e}isManual(){return"manual"===this.open||"manual"===this.close}},OV={hover:["mouseover","mouseout"],focus:["focusin","focusout"]};function BV(e,t=OV){let i=(e||"").trim();if(0===i.length)return[];let n=i.split(/\s+/).map((e=>e.split(":"))).map((e=>{let i=t[e[0]]||e;return new DV(i[0],i[1])})),r=n.filter((e=>e.isManual()));if(r.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(1===r.length&&n.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return n}var MV,RV=typeof window<"u"&&window||{},LV=RV.document,FV=(RV.location,RV.gc,RV.performance&&RV.performance,RV.Event,RV.MouseEvent,RV.KeyboardEvent,RV.EventTarget,RV.History,RV.Location,RV.EventListener,function(e){return e.isBs4="bs4",e.isBs5="bs5",e}(FV||{}));function NV(){let e=RV.document.createElement("span");e.innerText="testing bs version",e.classList.add("d-none"),e.classList.add("pl-1"),RV.document.head.appendChild(e);let t=RV.getComputedStyle(e).paddingLeft;return t&&parseFloat(t)?(RV.document.head.removeChild(e),"bs4"):(RV.document.head.removeChild(e),"bs5")}function UV(){return{isBs4:(MV||(MV=NV()),"bs4"===MV),isBs5:(MV||(MV=NV()),"bs5"===MV)}}function VV(){let e="Change";return function(t,i){let n=` __${i}Value`;Object.defineProperty(t,i,{get(){return this[n]},set(t){let r=this[n];this[n]=t,r!==t&&this[i+e]&&this[i+e].emit(t)}})}}var qV=class{static reflow(e){e.offsetHeight}static getStyles(e){let t=e.ownerDocument.defaultView;return(!t||!t.opener)&&(t=RV),t.getComputedStyle(e)}static stackOverflowConfig(){let e=function(){let e=UV(),t=Object.keys(e).find((t=>e[t]));return FV[t]}();return{crossorigin:"anonymous",integrity:"bs5"===e?"sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65":"sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2",cdnLink:"bs5"===e?"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css":"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"}}};typeof console>"u"||console;var $V=function(e){return e.top="top",e.bottom="bottom",e.left="left",e.right="right",e.auto="auto",e.end="right",e.start="left",e["top left"]="top left",e["top right"]="top right",e["right top"]="right top",e["right bottom"]="right bottom",e["bottom right"]="bottom right",e["bottom left"]="bottom left",e["left bottom"]="left bottom",e["left top"]="left top",e["top start"]="top left",e["top end"]="top right",e["end top"]="right top",e["end bottom"]="right bottom",e["bottom end"]="bottom right",e["bottom start"]="bottom left",e["start bottom"]="start bottom",e["start top"]="left top",e}($V||{}),jV=function(e){return e.top="top",e.bottom="bottom",e.left="start",e.right="end",e.auto="auto",e.end="end",e.start="start",e["top left"]="top start",e["top right"]="top end",e["right top"]="end top",e["right bottom"]="end bottom",e["bottom right"]="bottom end",e["bottom left"]="bottom start",e["left bottom"]="start bottom",e["left top"]="start top",e["top start"]="top start",e["top end"]="top end",e["end top"]="end top",e["end bottom"]="end bottom",e["bottom end"]="bottom end",e["bottom start"]="bottom start",e["start bottom"]="start bottom",e["start top"]="start top",e}(jV||{});function zV(e,t){if(1!==e.nodeType)return[];let i=e.ownerDocument.defaultView?.getComputedStyle(e,null);return t?i&&i[t]:i}function WV(e){if(!e)return document.documentElement;let t,i=e?.offsetParent;for(;null===i&&e.nextElementSibling&&t!==e.nextElementSibling;)t=e.nextElementSibling,i=t.offsetParent;let n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?i&&-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===zV(i,"position")?WV(i):i:t?t.ownerDocument.documentElement:document.documentElement}function HV(e){return null!==e.parentNode?HV(e.parentNode):e}function YV(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;let i=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?e:t,r=i?t:e,s=document.createRange();s.setStart(n,0),s.setEnd(r,0);let a=s.commonAncestorContainer;if(e!==a&&t!==a||n.contains(r))return function(e){let{nodeName:t}=e;return"BODY"!==t&&("HTML"===t||WV(e.firstElementChild)===e)}(a)?a:WV(a);let o=HV(e);return o.host?YV(o.host,t):YV(e,HV(t).host)}function GV(e){if(!e||!e.parentElement)return document.documentElement;let t=e.parentElement;for(;t?.parentElement&&"none"===zV(t,"transform");)t=t.parentElement;return t||document.documentElement}function KV(e,t){let i="x"===t?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(e[`border${i}Width`])+parseFloat(e[`border${n}Width`])}function QV(e,t,i){let n=t,r=i;return Math.max(n[`offset${e}`],n[`scroll${e}`],r[`client${e}`],r[`offset${e}`],r[`scroll${e}`],0)}function JV(e){let t=e.body,i=e.documentElement;return{height:QV("Height",t,i),width:QV("Width",t,i)}}function ZV(e){return f(h({},e),{right:(e.left||0)+e.width,bottom:(e.top||0)+e.height})}function XV(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function eq(e){let t=e.getBoundingClientRect();if(!(t&&XV(t.top)&&XV(t.left)&&XV(t.bottom)&&XV(t.right)))return t;let i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top}
1,n="HTML"===e.nodeName?JV(e.ownerDocument):void 0,r=n?.width||e.clientWidth||XV(t.right)&&XV(i.left)&&t.right-i.left||0,s=n?.height||e.clientHeight||XV(t.bottom)&&XV(i.top)&&t.bottom-i.top||0,a=e.offsetWidth-r,o=e.offsetHeight-s;if(a||o){let t=zV(e);a-=KV(t,"x"),o-=KV(t,"y"),i.width-=a,i.height-=o}return ZV(i)}function tq(e,t,i=!1){let n="HTML"===t.nodeName,r=eq(e),s=eq(t),a=zV(t),o=parseFloat(a.borderTopWidth),l=parseFloat(a.borderLeftWidth);i&&n&&(s.top=Math.max(s.top??0,0),s.left=Math.max(s.left??0,0));let c=ZV({top:(r.top??0)-(s.top??0)-o,left:(r.left??0)-(s.left??0)-l,width:r.width,height:r.height});if(c.marginTop=0,c.marginLeft=0,n){let e=parseFloat(a.marginTop),t=parseFloat(a.marginLeft);XV(c.top)&&(c.top-=o-e),XV(c.bottom)&&(c.bottom-=o-e),XV(c.left)&&(c.left-=l-t),XV(c.right)&&(c.right-=l-t),c.marginTop=e,c.marginLeft=t}return c}function iq(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function nq(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}let{overflow:t,overflowX:i,overflowY:n}=zV(e);return/(auto|scroll|overlay)/.test(String(t)+String(n)+String(i))?e:nq(iq(e))}function rq(e,t="top"){let i="top"===t?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){let t=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||t)[i]}return e[i]}function sq(e){let t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===zV(e,"position")||sq(iq(e)))}function aq(e,t,i=0,n,r=!1){let s={top:0,left:0},a=r?GV(e):YV(e,t);if("viewport"===n)s=function(e,t=!1){let i=e.ownerDocument.documentElement,n=tq(e,i),r=Math.max(i.clientWidth,window.innerWidth||0),s=Math.max(i.clientHeight,window.innerHeight||0),a=t?0:rq(i),o=t?0:rq(i,"left");return ZV({top:a-Number(n?.top)+Number(n?.marginTop),left:o-Number(n?.left)+Number(n?.marginLeft),width:r,height:s})}(a,r);else{let i;"scrollParent"===n?(i=nq(iq(t)),"BODY"===i.nodeName&&(i=e.ownerDocument.documentElement)):i="window"===n?e.ownerDocument.documentElement:n;let o=tq(i,a,r);if(o&&"HTML"===i.nodeName&&!sq(a)){let{height:t,width:i}=JV(e.ownerDocument);XV(s.top)&&XV(o.top)&&XV(o.marginTop)&&(s.top+=o.top-o.marginTop),XV(s.top)&&(s.bottom=Number(t)+Number(o.top)),XV(s.left)&&XV(o.left)&&XV(o.marginLeft)&&(s.left+=o.left-o.marginLeft),XV(s.top)&&(s.right=Number(i)+Number(o.left))}else o&&(s=o)}return XV(s.left)&&(s.left+=i),XV(s.top)&&(s.top+=i),XV(s.right)&&(s.right-=i),XV(s.bottom)&&(s.bottom-=i),s}function oq({width:e,height:t}){return e*t}function lq(e,t,i,n,r=["top","bottom","right","left"],s="viewport",a=0){if(-1===e.indexOf("auto"))return e;let o=aq(i,n,a,s),l={top:{width:o?.width??0,height:(t?.top??0)-(o?.top??0)},right:{width:(o?.right??0)-(t?.right??0),height:o?.height??0},bottom:{width:o?.width??0,height:(o?.bottom??0)-(t?.bottom??0)},left:{width:(t.left??0)-(o?.left??0),height:o?.height??0}},c=Object.keys(l).map((e=>f(h({position:e},l[e]),{area:oq(l[e])}))).sort(((e,t)=>t.area-e.area)),d=c.filter((({width:e,height:t})=>e>=i.clientWidth&&t>=i.clientHeight));d=d.filter((({position:e})=>r.some((t=>t===e))));let u=d.length>0?d[0].position:c[0].position,p=e.split(" ")[1];return i.className=i.className.replace(/bs-tooltip-auto/g,`bs-tooltip-${UV().isBs5?jV[u]:u}`),u+(p?`-${p}`:"")}var cq=(e,t=0)=>e?parseFloat(e):t;function dq(e){let t=e.ownerDocument.defaultView?.getComputedStyle(e),i=cq(t?.marginTop)+cq(t?.marginBottom),n=cq(t?.marginLeft)+cq(t?.marginRight);return{width:Number(e.offsetWidth)+n,height:Number(e.offsetHeight)+i}}function uq(e,t,i){return tq(t,i?GV(e):YV(e,t),i)}function pq(e,t,i){let n=i.split(" ")[0],r=dq(e),s={width:r.width,height:r.height},a=-1!==["right","left"].indexOf(n),o=a?"top":"left",l=a?"left":"top",c=a?"height":"width",d=a?"width":"height";return s[o]=(t[o]??0)+t[c]/2-r[c]/2,s[l]=n===l?(t[l]??0)-r[d]:t[function(e){let t={left:"r
1ight",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(e=>t[e]))}(l)]??0,s}function hq(e,t){return!!e.modifiers[t]?.enabled}var fq={top:["top","top start","top end"],bottom:["bottom","bottom start","bottom end"],start:["start","start top","start bottom"],end:["end","end top","end bottom"]};function mq(e,t){return!!UV().isBs5&&fq[t].includes(e)}function gq(e,t){let i=e.instance.target,n=i.className,r=UV().isBs5?jV[e.placement]:e.placement;e.placementAuto&&(n=n.replace(/bs-popover-auto/g,`bs-popover-${r}`),n=n.replace(/ms-2|me-2|mb-2|mt-2/g,""),n=n.replace(/bs-tooltip-auto/g,`bs-tooltip-${r}`),n=n.replace(/\sauto/g,` ${r}`),-1!==n.indexOf("popover")&&(n=n+" "+function(e){return UV().isBs5?mq(e,"end")?"ms-2":mq(e,"start")?"me-2":mq(e,"top")?"mb-2":mq(e,"bottom")?"mt-2":"":""}(r)),-1!==n.indexOf("popover")&&-1===n.indexOf("popover-auto")&&(n+=" popover-auto"),-1!==n.indexOf("tooltip")&&-1===n.indexOf("tooltip-auto")&&(n+=" tooltip-auto")),n=n.replace(/left|right|top|bottom|end|start/g,`${r.split(" ")[0]}`),t?t.setAttribute(i,"class",n):i.className=n}function bq(e,t,i){!e||!t||Object.keys(t).forEach((n=>{let r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&function(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(Number(e))}(t[n])&&(r="px"),i?i.setStyle(e,n,`${String(t[n])}${r}`):e.style[n]=String(t[n])+r}))}function yq(e){let t=e.offsets.target,i=e.instance.target.querySelector(".arrow");if(!i)return e;let n=-1!==["left","right"].indexOf(e.placement.split(" ")[0]),r=n?"height":"width",s=n?"Top":"Left",a=s.toLowerCase(),o=n?"left":"top",l=n?"bottom":"right",c=dq(i)[r],d=e.placement.split(" ")[1];(e.offsets.host[l]??0)-c<(t[a]??0)&&(t[a]-=(t[a]??0)-((e.offsets.host[l]??0)-c)),Number(e.offsets.host[a])+Number(c)>(t[l]??0)&&(t[a]+=Number(e.offsets.host[a])+Number(c)-Number(t[l])),t=ZV(t);let u,p=zV(e.instance.target),h=parseFloat(p[`margin${s}`])||0,f=parseFloat(p[`border${s}Width`])||0;
1if(d){let t=parseFloat(p.borderRadius)||0,i=Number(h+f+t);u=a===d?Number(e.offsets.host[a])+i:Number(e.offsets.host[a])+Number(e.offsets.host[r]-i)}else u=Number(e.offsets.host[a])+Number(e.offsets.host[r]/2-c/2);let m=u-(t[a]??0)-h-f;return m=Math.max(Math.min(t[r]-(c+5),m),0),e.offsets.arrow={[a]:Math.round(m),[o]:""},e.instance.arrow=i,e}function vq(e){if(e.offsets.target=ZV(e.offsets.target),!hq(e.options,"flip"))return e.offsets.target=h(h({},e.offsets.target),pq(e.instance.target,e.offsets.host,e.placement)),e;let t=aq(e.instance.target,e.instance.host,0,"viewport",!1),i=e.placement.split(" ")[0],n=e.placement.split(" ")[1]||"",r=lq("auto",e.offsets.host,e.instance.target,e.instance.host,e.options.allowedPositions),s=[i,r];return s.forEach(((r,a)=>{if(i!==r||s.length===a+1)return;i=e.placement.split(" ")[0];let o="left"===i&&Math.floor(e.offsets.target.right??0)>Math.floor(e.offsets.host.left??0)||"right"===i&&Math.floor(e.offsets.target.left??0)<Math.floor(e.offsets.host.right??0)||"top"===i&&Math.floor(e.offsets.target.bottom??0)>Math.floor(e.offsets.host.top??0)||"bottom"===i&&Math.floor(e.offsets.target.top??0)<Math.floor(e.offsets.host.bottom??0),l=Math.floor(e.offsets.target.left??0)<Math.floor(t.left??0),c=Math.floor(e.offsets.target.right??0)>Math.floor(t.right??0),d=Math.floor(e.offsets.target.top??0)<Math.floor(t.top??0),u=Math.floor(e.offsets.target.bottom??0)>Math.floor(t.bottom??0),p="left"===i&&l||"right"===i&&c||"top"===i&&d||"bottom"===i&&u,f=-1!==["top","bottom"].indexOf(i),m=f&&"left"===n&&l||f&&"right"===n&&c||!f&&"left"===n&&d||!f&&"right"===n&&u;(o||p||m)&&((o||p)&&(i=s[a+1]),m&&(n=function(e){return"right"===e?"left":"left"===e?"right":e}(n)),e.placement=i+(n?` ${n}`:""),e.offsets.target=h(h({},e.offsets.target),pq(e.instance.target,e.offsets.host,e.placement)))})),e}function wq(e){if(!hq(e.options,"preventOverflow"))return e;let t="transform",i=e.instance.target.style,{top:n,left:r,[t]:s}=i;i.top="",i.left="",i[t]="";let a=aq(e.instance.target,e.instance.host,0,e.options.modifiers.preventOverflow?.boundariesElement||"scrollParent",!1);i.top=n,i.left=r,i[t]=s;let o={primary(t){let i=e.offsets.target[t];return(e.offsets.target[t]??0)<(a[t]??0)&&(i=Math.max(e.offsets.target[t]??0,a[t]??0)),{[t]:i}},secondary(t){let i="right"===t,n=i?"left":"top",r=i?"width":"height",s=e.offsets.target[n];return(e.offsets.target[t]??0)>(a[t]??0)&&(s=Math.min(e.offsets.target[n]??0,(a[t]??0)-e.offsets.target[r])),{[n]:s}}};return["left","right","top","bottom"].forEach((t=>{let i=-1!==["left","top","start"].indexOf(t)?o.primary:o.secondary;e.offsets.target=h(h({},e.offsets.target),i(t))})),e}function _q(e){let t=e.placement,i=t.split(" ")[0],n=t.split(" ")[1];if(n){let{host:t,target:r}=e.offsets,s=-1!==["bottom","top"].indexOf(i),a=s?"left":"top",o=s?"width":"height",l={start:{[a]:t[a]},end:{[a]:(t[a]??0)+t[o]-r[o]}};e.offsets.target=f(h({},r),{[a]:a===n?l.start[a]:l.end[a]})}return e}var Sq=new class{position(e,t){return this.offset(e,t)}offset(e,t){return uq(t,e)}positionElements(e,t,i,n,r){let s=[vq,_q,wq,yq],a=function(e,t,i,n){if(!e||!t)return;let r=uq(e,t);!i.match(/^(auto)*\s*(left|right|top|bottom|start|end)*$/)&&!i.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)&&(i="auto");let s=!!i.match(/auto/g),a=i.match(/auto\s(left|right|top|bottom|start|end)/)?i.split(" ")[1]||"auto":i,o=a.match(/^(left|right|top|bottom|start|end)* ?(?!\1)(left|right|top|bottom|start|end)?/);return o&&(a=o[1]+(o[2]?` ${o[2]}`:"")),-1!==["left right","right left","top bottom","bottom top"].indexOf(a)&&(a="auto"),a=lq(a,r,e,t,n?n.allowedPositions:void 0),{options:n||{modifiers:{}},instance:{target:e,host:t,arrow:void 0},offsets:{target:pq(e,r,a),host:r,arrow:void 0},positionFixed:!1,placement:a,placementAuto:s}}(t,e,$V[i],r);if(a)return s.reduce(((e,t)=>t(e)),a)}};function Cq(e,t,i,n,r,s){let a=Sq.positionElements(e,t,i,n,r);if(!a)return;let o=function(e){return{width:e.offsets.target.width,height:e.offsets.target.height,left:Math.floor(e.offsets.target.left??0),top:Math.round(e.offsets.target.top??0),bottom:Math.round(e.offsets.target.bottom??0),right:Math.floor(e.offsets.target.right??0)}}(a);bq(t,{"will-change":"transform",top:"0px",left:"0px",transform:`translate3d(${o.left}px, ${o.top}px, 0px)`},s),a.instance.arrow&&bq(a.instance.arrow,a.offsets.arrow,s),gq(a,s)}var Iq=(()=>{class e{constructor(e,t,i){this.update$$=new kt,this.positionElements=new Map,this.isDisabled=!1,Ny(i)&&e.runOutsideAngular((()=>{this.triggerEvent$=Vi(Li(window,"scroll",{passive:!0}),Li(window,"resize",{passive:!0}),fi(0,Ut),this.update$$),this.triggerEvent$.subscribe((()=>
1{this.isDisabled||this.positionElements.forEach((e=>{Cq(Aq(e.target),Aq(e.element),e.attachment,e.appendToBody,this.options,t.createRenderer(null,null))}))}))}))}position(e){this.addPositionElement(e)}get event$(){return this.triggerEvent$}disable(){this.isDisabled=!0}enable(){this.isDisabled=!1}addPositionElement(e){this.positionElements.set(Aq(e.element),e)}calcPosition(){this.update$$.next(null)}deletePositionElement(e){this.positionElements.delete(Aq(e))}setOptions(e){this.options=e}static{this.ɵfac=function(t){return new(t||e)(lr(Tl),lr(cp),lr(rc))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function Aq(e){return"string"==typeof e?document.querySelector(e):e instanceof Vl?e.nativeElement:e??null}var kq,xq=class{constructor(e,t,i){this.nodes=e,this.viewRef=t,this.componentRef=i}},Tq=class{constructor(e,t,i,n,r,s,a,o,l){this._viewContainerRef=e,this._renderer=t,this._elementRef=i,this._injector=n,this._componentFactoryResolver=r,this._ngZone=s,this._applicationRef=a,this._posService=o,this._document=l,this.onBeforeShow=new _l,this.onShown=new _l,this.onBeforeHide=new _l,this.onHidden=new _l,this._providers=[],this._isHiding=!1,this.containerDefaultSelector="body",this._listenOpts={},this._globalListener=Function.prototype}get isShown(){return!this._isHiding&&!!this._componentRef}attach(e){return this._componentFactory=this._componentFactoryResolver.resolveComponentFactory(e),this}to(e){return this.container=e||this.container,this}position(e){return e?(this.attachment=e.attachment||this.attachment,this._elementRef=e.target||this._elementRef,this):this}provide(e){return this._providers.push(e),this}show(e={}){if(this._subscribePositioning(),this._innerComponent=void 0,!this._componentRef){this.onBeforeShow.emit(),this._contentRef=this._getContentRef(e.content,e.context,e.initialState);let t=fl.create({providers:this._providers,parent:this._injector});if(!this._componentFactory)return;if(this._componentRef=this._componentFactory.create(t,this._contentRef.nodes),this._applicationRef.attachView(this._componentRef.hostView),this.instance=this._componentRef.instance,Object.assign(this._componentRef.instance,e),this.container instanceof Vl&&this.container.nativeElement.appendChild(this._componentRef.location.nativeElement),"string"==typeof this.container&&typeof this._document<"u"){let e=this._document.querySelector(this.container)||this._document.querySelector(this.containerDefaultSelector);if(!e)return;e.appendChild(this._componentRef.location.nativeElement)}!this.container&&this._elementRef&&this._elementRef.nativeElement.parentElement&&this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement),this._contentRef.componentRef&&(this._innerComponent=this._contentRef.componentRef.instance,this._contentRef.componentRef.changeDetectorRef.markForCheck(),this._contentRef.componentRef.changeDetectorRef.detectChanges()),this._componentRef.changeDetectorRef.markForCheck(),this._componentRef.changeDetectorRef.detectChanges(),this.onShown.emit(e.id?{id:e.id}:this._componentRef.instance)}return this._registerOutsideClick(),this._componentRef}hide(e){if(!this._componentRef)return this;this._posService.deletePositionElement(this._componentRef.location),this.onBeforeHide.emit(this._componentRef.instance);let t=this._componentRef.location.nativeElement;return t.parentNode?.removeChild(t),this._contentRef?.componentRef?.destroy(),this._viewContainerRef&&this._contentRef?.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef)),this._contentRef?.viewRef?.destroy(),this._componentRef?.destroy(),this._contentRef=void 0,this._componentRef=void 0,this._removeGlobalListener(),this.onHidden.emit(e?{id:e}:null),this}toggle(){this.isShown?this.hide():this.show()}dispose(){this.isShown&&this.hide(),this._unsubscribePositioning(),this._unregisterListenersFn&&this._unregisterListenersFn()}listen(e){this.triggers=e.triggers||this.triggers,this._listenOpts.outsideClick=e.outsideClick,this._listenOpts.outsideEsc=e.outsideEsc,e.target=e.target||this._elementRef?.
1nativeElement;let t=this._listenOpts.hide=()=>e.hide?e.hide():void this.hide(),i=this._listenOpts.show=t=>{e.show?e.show(t):this.show(t),t()};return this._renderer&&(this._unregisterListenersFn=function(e,t){let i=BV(t.triggers),n=t.target;if(1===i.length&&i[0].isManual())return Function.prototype;let r=[],s=[],a=()=>{s.forEach((e=>r.push(e()))),s.length=0};return i.forEach((i=>{let o=i.open===i.close,l=o?t.toggle:t.show;if(!o&&i.close&&t.hide){let r=i.close,a=t.hide,o=()=>e.listen(n,r,a);s.push(o)}l&&r.push(e.listen(n,i.open,(()=>l(a))))})),()=>{r.forEach((e=>e()))}}(this._renderer,{target:e.target,triggers:e.triggers,show:i,hide:t,toggle:e=>{this.isShown?t():i(e)}})),this}_removeGlobalListener(){this._globalListener&&(this._globalListener(),this._globalListener=Function.prototype)}attachInline(e,t){return e&&t&&(this._inlineViewRef=e.createEmbeddedView(t)),this}_registerOutsideClick(){if(!this._componentRef||!this._componentRef.location)return;let e=Function.prototype,t=Function.prototype;if(this._listenOpts.outsideClick){let t=this._componentRef.location.nativeElement;setTimeout((()=>{this._renderer&&this._elementRef&&(e=function(e,t){return t.outsideClick?e.listen("document","click",(e=>{t.target&&t.target.contains(e.target)||t.targets&&t.targets.some((t=>t.contains(e.target)))||t.hide&&t.hide()})):Function.prototype}(this._renderer,{targets:[t,this._elementRef.nativeElement],outsideClick:this._listenOpts.outsideClick,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()}))}))}if(this._listenOpts.outsideEsc&&this._renderer&&this._elementRef){let e=this._componentRef.location.nativeElement;t=function(e,t){return t.outsideEsc?e.listen("document","keyup.esc",(e=>{t.target&&t.target.contains(e.target)||t.targets&&t.targets.some((t=>t.contains(e.target)))||t.hide&&t.hide()})):Function.prototype}(this._renderer,{targets:[e,this._elementRef.nativeElement],outsideEsc:this._listenOpts.outsideEsc,hide:()=>this._listenOpts.hide&&this._listenOpts.hide()})}this._globalListener=()=>{e(),t()}}getInnerComponent(){return this._innerComponent}_subscribePositioning(){this._zoneSubscription||!this.attachment||(this.onShown.subscribe((()=>{this._posService.position({element:this._componentRef?.location,target:this._elementRef,attachment:this.attachment,appendToBody:"body"===this.container})})),this._zoneSubscription=this._ngZone.onStable.subscribe((()=>{this._componentRef&&this._posService.calcPosition()})))}_unsubscribePositioning(){this._zoneSubscription&&(this._zoneSubscription.unsubscribe(),this._zoneSubscription=void 0)}_getContentRef(e,t,i){if(!e)return new xq([]);if(e instanceof Yu){if(this._viewContainerRef){let i=this._viewContainerRef.createEmbeddedView(e,t);return i.markForCheck(),new xq([i.rootNodes],i)}let i=e.createEmbeddedView({});return this._applicationRef.attachView(i),new xq([i.rootNodes],i)}if("function"==typeof e){let t=this._componentFactoryResolver.resolveComponentFactory(e),n=fl.create({providers:this._providers,parent:this._injector}),r=t.create(n);return Object.assign(r.instance,i),this._applicationRef.attachView(r.hostView),new xq([[r.location.nativeElement]],r.hostView,r)}let n=this._renderer?[this._renderer.createText(`${e}`)]:[];return new xq([n])}},Pq=(()=>{class e{constructor(e,t,i,n,r,s){this._componentFactoryResolver=e,this._ngZone=t,this._injector=i,this._posService=n,this._applicationRef=r,this._document=s}createLoader(e,t,i){return new Tq(t,i,e,this._injector,this._componentFactoryResolver,this._ngZone,this._applicationRef,this._posService,this._document)}static{this.ɵfac=function(t){return new(t||e)(lr(lp),lr(Tl),lr(fl),lr(Iq),lr(sg),lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function Eq(e){return null!=e&&"false"!=`${e}`}try{kq=typeof Intl<"u"&&Intl.v8BreakIterator}catch{kq=!1}var Dq=(()=>{class e{constructor(e){this._platformId=e,this.isBrowser=this._platformId?Ny(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!kq)&&t
1ypeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.ɵfac=function(t){return new(t||e)(lr(rc))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Oq=(()=>{class e{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;let t=function(e){try{return e.frameElement}catch{return null}}(function(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(e));if(t&&(-1===Mq(t)||!this.isVisible(t)))return!1;let i=e.nodeName.toLowerCase(),n=Mq(e);return e.hasAttribute("contenteditable")?-1!==n:!("iframe"===i||"object"===i||this._platform.WEBKIT&&this._platform.IOS&&!function(e){let t=e.nodeName.toLowerCase(),i="input"===t&&e.type;return"text"===i||"password"===i||"select"===t||"textarea"===t}(e))&&("audio"===i?!!e.hasAttribute("controls")&&-1!==n:"video"===i?-1!==n&&(null!==n||(this._platform.FIREFOX||e.hasAttribute("controls"))):e.tabIndex>=0)}isFocusable(e,t){return function(e){return!function(e){return function(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function(e){let t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(e)||function(e){return function(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||Bq(e))}(e)&&!this.isDisabled(e)&&(t?.ignoreVisibility||this.isVisible(e))}static{this.ɵfac=function(t){return new(t||e)(lr(Dq))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function Bq(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))}function Mq(e){if(!Bq(e))return null;let t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var Rq=(()=>{class e{constructor(){this._focusTrapStack=[]}register(e){this._focusTrapStack=this._focusTrapStack.filter((t=>t!==e));let t=this._focusTrapStack;t.length&&t[t.length-1]._disable(),t.push(e),e._enable()}deregister(e){e._disable();let t=this._focusTrapStack,i=t.indexOf(e);-1!==i&&(t.splice(i,1),t.length&&t[t.length-1]._enable())}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Lq=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,i,n,r=!1){this._element=e,this._checker=t,this._ngZone=i,this._document=n,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,r||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),t&&(t.removeEventListener("focus",this.endAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular((()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))})),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise((e=>{this._executeOnStable((()=>e(this.focusInitialElement())))}))}focusFirstTabbableElementWhenReady(){return new Promise((e=>{this._executeOnStable((()=>e(this.focusFirstTabbableElement())))}))}focusLastTabbableElementWhenReady(){return new Promise((e=>{this._executeOnStable((()=>e(this.focusLastTabbableElement())))}))}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);for(let i=0;i<t.length;i++)t[i].hasAttribute(`cdk-focus-${e}`)?console.warn(`Found use of deprecated attribute 'cdk-focus-${e}', use 'cdkFocusRegion${e}' instead. The deprecated attribute will be removed in 8.0.0.`,t[i]):t[i].hasAttribute(`cdk-focus-region-${e}`)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${e}', use 'cdkFocusRegion${e}' instead. The deprecated attribute will be removed in 8.0.0.`,t[i]);return"start"==e?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(e.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",e),!this._checker.isFocusable(e)){let t=this._getFirstTabbableElement(e);return t?.focus(),!!t}return e.focus(),!0}return this.focusFirstTabbableElement()}focusFirstTabbableElement(){let e=this._getRegionBoundary("start");return e&&e.focus(),!!e}focusLastTabbableElement(){let e=this._getRegionBoundary("end");return e&&e.focus(),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children||e.childNodes;for(let e=0;e<t.length;e++){let i=t[e].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(t[e]):null;if(i)return i}return null}_getLastTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children||e.childNodes;for(let e=t.length-1;e>=0;e--){let i=t[e].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[e]):null;if(i)return i}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._ngZone.isStable?e():this._ngZone.onStable.pipe(Hi(1)).subscribe(e)}},Fq=(()=>{class e{constructor(e,t,i){this._checker=e,this._ngZone=t,this._document=i}create(e,t=!1){return new Lq(e,this._checker,this._ngZone,this._document,t)}static{this.ɵfac=function(t){return new(t||e)(lr(Oq),lr(Tl),lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Nq=(()=>{class e{get enabled(){return this.focusTrap.enabled}set enabled(e){this.focusTrap.enabled=Eq(e)}get autoCapture(){return this._autoCapture}set autoCapture(e){this._autoCapture=Eq(e)}constructor(e,t,i){this._elementRef=e,this._focusTrapFactory=t,this._previouslyFocusedElement=null,this._autoCapture=!1,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(e){let t=e.autoCapture;t&&!t.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Fq),$d(Qg))}}static{this.ɵdir=ts({type:e,selectors:[["","focusTrap",""]],inputs:{enabled:[0,"cdkTrapFocus","enabled"],autoCapture:[0,"cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["focusTrap"],standalone:!0,features:[xm([Rq,Dq,Oq]),ga]})}}return e})(),Uq=(()=>{class e{static forRoot(){return{ngModule:e,providers:[]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),Vq=["*"],qq=(()=>{class e{constructor(){this.hide=()=>{},this.setClass=()=>{}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),$q=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),jq={backdrop:!0,keyboard:!0,focus:!0,show:!1,ignoreBackdropClick:!1,class:"",animated:!0,initialState:{},closeInterceptor:void 0},zq=new Fn("override-default-config"),Wq="modal-scrollbar-measure",Hq="modal-open",Yq="fade",Gq="show",Kq=300,Qq=150,Jq="backdrop-click",Zq="esc",Xq="browser-back-navigation-clicked",e$=(()=>{class e{get isAnimated(){return this._isAnimated}set isAnimated(e){this._isAnimated=e}
1get isShown(){return this._isShown}set isShown(e){this._isShown=e,e?this.renderer.addClass(this.element.nativeElement,`${Gq}`):this.renderer.removeClass(this.element.nativeElement,`${Gq}`)}constructor(e,t){this._isAnimated=!1,this._isShown=!1,this.element=e,this.renderer=t}ngOnInit(){this.isAnimated&&(this.renderer.addClass(this.element.nativeElement,`${Yq}`),qV.reflow(this.element.nativeElement)),this.isShown=!0}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-modal-backdrop"]],hostAttrs:[1,"modal-backdrop"],standalone:!0,features:[Pm],decls:0,vars:0,template:function(e,t){},encapsulation:2})}}return e})(),t$=1,i$=(()=>{class e{constructor(e,t,i){this.clf=t,this.modalDefaultOption=i,this.onShow=new _l,this.onShown=new _l,this.onHide=new _l,this.onHidden=new _l,this.isBodyOverflowing=!1,this.originalBodyPadding=0,this.scrollbarWidth=0,this.modalsCount=0,this.lastHiddenId=null,this.loaders=[],this._focusEl=null,this._backdropLoader=this.clf.createLoader(),this._renderer=e.createRenderer(null,null),this.config=i?Object.assign({},jq,i):jq}show(e,t){this._focusEl=LV.activeElement,this.modalsCount++,this.lastHiddenId=null,this._createLoaders();let i=t?.id||t$++;return this.config=this.modalDefaultOption?Object.assign({},jq,this.modalDefaultOption,t):Object.assign({},jq,t),this.config.id=i,this._showBackdrop(),this.lastDismissReason=void 0,this._showModal(e)}hide(e){this.lastHiddenId!==e&&(this.lastHiddenId=e,(1===this.modalsCount||null==e)&&(this._hideBackdrop(),this.resetScrollbar()),this.modalsCount=this.modalsCount>=1&&null!=e?this.modalsCount-1:0,setTimeout((()=>{this._hideModal(e),this.removeLoaders(e)}),this.config.animated?Qq:0),this._focusEl&&this._focusEl.focus())}_showBackdrop(){let e=!0===this.config.backdrop||"static"===this.config.backdrop,t=!this.backdropRef||!this.backdropRef.instance.isShown;1===this.modalsCount&&(this.removeBackdrop(),e&&t&&(this._backdropLoader.attach(e$).to("body").show({isAnimated:this.config.animated}),this.backdropRef=this._backdropLoader._componentRef))}_hideBackdrop(){if(!this.backdropRef)return;this.backdropRef.instance.isShown=!1;let e=this.config.animated?Qq:0;setTimeout((()=>this.removeBackdrop()),e)}_showModal(e){let t=this.loaders[this.loaders.length-1];if(this.config&&this.config.providers)for(let e of this.config.providers)t.provide(e);let i=new qq,n=t.provide({provide:$q,useValue:this.config}).provide({provide:qq,useValue:i}).attach(n$).to("body");return i.hide=()=>n.instance?.hide(),i.setClass=e=>{n.instance&&(n.instance.config.class=e)},i.onHidden=new _l,i.onHide=new _l,this.copyEvent(t.onBeforeHide,i.onHide),this.copyEvent(t.onHidden,i.onHidden),n.show({content:e,isAnimated:this.config.animated,initialState:this.config.initialState,bsModalService:this,id:this.config.id}),n.instance&&(n.instance.level=this.getModalsCount(),i.content=t.getInnerComponent(),i.id=n.instance.config?.id),i}_hideModal(e){if(null!=e){let t=this.loaders.findIndex((t=>t.instance?.config.id===e)),i=this.loaders[t];i&&i.hide(e)}else this.loaders.forEach((e=>{e.instance&&e.hide(e.instance.config.id)}))}getModalsCount(){return this.modalsCount}setDismissReason(e){this.lastDismissReason=e}removeBackdrop(){this._renderer.removeClass(LV.body,Hq),this._renderer.setStyle(LV.body,"overflow-y",""),this._backdropLoader.hide(),this.backdropRef=void 0}checkScrollbar(){this.isBodyOverflowing=LV.body.clientWidth<window.innerWidth,this.scrollbarWidth=this.getScrollbarWidth()}setScrollbar(){LV&&(this.originalBodyPadding=parseInt(window.getComputedStyle(LV.body).getPropertyValue("padding-right")||"0",10),this.isBodyOverflowing&&(LV.body.style.paddingRight=`${this.originalBodyPadding+this.scrollbarWidth}px`))}resetScrollbar(){LV.body.style.paddingRight=`${this.originalBodyPadding}px`}getScrollbarWidth(){let e=this._renderer.createElement("div");this._renderer.addClass(e,Wq),this._renderer.appendChild(LV.body,e);let t=e.offsetWidth-e.clientWidth;return this._renderer.removeChild(LV.body,e),t}_createLoaders(){let e=this.clf.createLoader();this.copyEvent(e.onBeforeShow,this.onShow),this.copyEvent(e.onShown,this.onShown),this.copyEvent(e.onBeforeHide,this.onHide),this.copyEvent(e.onHidden,this.onHidden
1),this.loaders.push(e)}removeLoaders(e){if(null!=e){let t=this.loaders.findIndex((t=>t.instance?.config.id===e));t>=0&&(this.loaders.splice(t,1),this.loaders.forEach(((e,t)=>{e.instance&&(e.instance.level=t+1)})))}else this.loaders.splice(0,this.loaders.length)}copyEvent(e,t){e.subscribe((e=>{t.emit(this.lastDismissReason||e)}))}static{this.ɵfac=function(t){return new(t||e)(lr(cp),lr(Pq),lr(zq,8))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),n$=(()=>{class e{constructor(e,t,i){this._element=t,this._renderer=i,this.isShown=!1,this.isAnimated=!1,this._focusEl=null,this.isModalHiding=!1,this.clickStartedInContent=!1,this.config=Object.assign({},e)}ngOnInit(){this._focusEl=LV.activeElement,this.isAnimated&&this._renderer.addClass(this._element.nativeElement,Yq),this._renderer.setStyle(this._element.nativeElement,"display","block"),setTimeout((()=>{this.isShown=!0,this._renderer.addClass(this._element.nativeElement,Gq)}),this.isAnimated?Qq:0),LV&&LV.body&&(this.bsModalService&&1===this.bsModalService.getModalsCount()&&(this.bsModalService.checkScrollbar(),this.bsModalService.setScrollbar()),this._renderer.addClass(LV.body,Hq),this._renderer.setStyle(LV.body,"overflow-y","hidden")),this._element.nativeElement&&this._element.nativeElement.focus()}onClickStarted(e){this.clickStartedInContent=e.target!==this._element.nativeElement}onClickStop(e){let t=e.target===this._element.nativeElement&&!this.clickStartedInContent;!this.config.ignoreBackdropClick&&"static"!==this.config.backdrop&&t?(this.bsModalService?.setDismissReason(Jq),this.hide()):this.clickStartedInContent=!1}onPopState(){this.bsModalService?.setDismissReason(Xq),this.hide()}onEsc(e){this.isShown&&((27===e.keyCode||"Escape"===e.key)&&e.preventDefault(),this.config.keyboard&&this.level===this.bsModalService?.getModalsCount()&&(this.bsModalService?.setDismissReason(Zq),this.hide()))}ngOnDestroy(){this.isShown&&this._hide()}hide(){if(!this.isModalHiding){if(this.config.closeInterceptor)return void this.config.closeInterceptor().then((()=>this._hide()),(()=>{}));this._hide()}}_hide(){this.isModalHiding=!0,this._renderer.removeClass(this._element.nativeElement,Gq),setTimeout((()=>{this.isShown=!1,this.bsModalService?.hide(this.config.id),LV&&LV.body&&0===this.bsModalService?.getModalsCount()&&(this._renderer.removeClass(LV.body,Hq),this._renderer.setStyle(LV.body,"overflow-y","")),this.bsModalService?.hide(this.config.id),this.isModalHiding=!1,this._focusEl&&this._focusEl.focus()}),this.isAnimated?Kq:0)}static{this.ɵfac=function(t){return new(t||e)($d($q),$d(Vl),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["modal-container"]],hostAttrs:["role","dialog","tabindex","-1",1,"modal"],hostVars:3,hostBindings:function(e,t){1&e&&jf("mousedown",(function(e){return t.onClickStarted(e)}))("click",(function(e){return t.onClickStop(e)}))("popstate",(function(){return t.onPopState()}),!1,od)("keydown.esc",(function(e){return t.onEsc(e)}),!1,od),2&e&&gh("aria-modal",!0)("aria-labelledby",t.config.ariaLabelledBy)("aria-describedby",t.config.ariaDescribedby)},standalone:!0,features:[xm([i$]),Pm],ngContentSelectors:Vq,decls:3,vars:2,consts:[["role","document","focusTrap",""],[1,"modal-content"]],template:function(e,t){1&e&&(Kf(),kf(0,"div",0)(1,"div",1),Qf(2),xf()()),2&e&&Kh("modal-dialog"+(t.config.class?" "+t.config.class:""))},dependencies:[Nq],encapsulation:2})}}return e})(),r$=(()=>{class e{set config(e){this._config=this.getConfig(e)}get config(){return this._config}get isShown(){return this._isShown}constructor(e,t,i,n,r){this._element=e,this._renderer=i,this.onShow=new _l,this.onShown=new _l,this.onHide=new _l,this.onHidden=new _l,this._isShown=!1,this.isBodyOverflowing=!1,this.originalBodyPadding=0,this.scrollbarWidth=0,this.timerHideModal=0,this.timerRmBackDrop=0,this.isNested=!1,this.clickStartedInContent=!1,this._focusEl=null,this._backdrop=n.createLoader(e,t,i),this._config=r||jq}onClickStarted(e){this.clickStartedInContent=e.target!==this._element.nativeElement}onClickStop(e){let t=e.target===this._element.nativeElement&&!this.clickStartedInContent;!this.config.ignoreBackdropClick&&"static"!==this.config.backdrop&&t?(this.dismissReason=Jq,this.hide(e)):this.clickStartedInContent=!1}
1onEsc(e){this._isShown&&((27===e.keyCode||"Escape"===e.key)&&e.preventDefault(),this.config.keyboard&&(this.dismissReason=Zq,this.hide()))}ngOnDestroy(){this._isShown&&(this._isShown=!1,this.hideModal(),this._backdrop.dispose())}ngOnInit(){this._config=this._config||this.getConfig(),setTimeout((()=>{this._config.show&&this.show()}),0)}toggle(){return this._isShown?this.hide():this.show()}show(){this.dismissReason=void 0,this.onShow.emit(this),!this._isShown&&(clearTimeout(this.timerHideModal),clearTimeout(this.timerRmBackDrop),this._isShown=!0,this.checkScrollbar(),this.setScrollbar(),LV&&LV.body&&(LV.body.classList.contains(Hq)?this.isNested=!0:(this._renderer.addClass(LV.body,Hq),this._renderer.setStyle(LV.body,"overflow-y","hidden"))),this.showBackdrop((()=>{this.showElement()})))}hide(e){if(this._isShown){if(e&&e.preventDefault(),this.config.closeInterceptor)return void this.config.closeInterceptor().then((()=>this._hide()),(()=>{}));this._hide()}}_hide(){this.onHide.emit(this),RV.clearTimeout(this.timerHideModal),RV.clearTimeout(this.timerRmBackDrop),this._isShown=!1,this._renderer.removeClass(this._element.nativeElement,Gq),this._config.animated?this.timerHideModal=RV.setTimeout((()=>this.hideModal()),300):this.hideModal(),this._focusEl&&this._focusEl.focus()}getConfig(e){return Object.assign({},this._config,e)}showElement(){(!this._element.nativeElement.parentNode||this._element.nativeElement.parentNode.nodeType!==Node.ELEMENT_NODE)&&LV&&LV.body&&LV.body.appendChild(this._element.nativeElement),this._renderer.setAttribute(this._element.nativeElement,"aria-hidden","false"),this._renderer.setAttribute(this._element.nativeElement,"aria-modal","true"),this._renderer.setStyle(this._element.nativeElement,"display","block"),this._renderer.setProperty(this._element.nativeElement,"scrollTop",0),this._config.animated&&qV.reflow(this._element.nativeElement),this._renderer.addClass(this._element.nativeElement,Gq);let e=()=>{this._config.focus&&this._element.nativeElement.focus(),this.onShown.emit(this)};this._config.animated?setTimeout(e,300):e()}hideModal(){this._renderer.setAttribute(this._element.nativeElement,"aria-hidden","true"),this._renderer.setStyle(this._element.nativeElement,"display","none"),this.showBackdrop((()=>{this.isNested||(LV&&LV.body&&(this._renderer.removeClass(LV.body,Hq),this._renderer.setStyle(LV.body,"overflow-y","")),this.resetScrollbar()),this.resetAdjustments(),this.focusOtherModal(),this.onHidden.emit(this)}))}showBackdrop(e){if(!this._isShown||!this.config.backdrop||this.backdrop&&this.backdrop.instance.isShown)if(!this._isShown&&this.backdrop){this.backdrop.instance.isShown=!1;let t=()=>{this.removeBackdrop(),e&&e()};this.backdrop.instance.isAnimated?this.timerRmBackDrop=RV.setTimeout(t,150):t()}else e&&e();else{if(this.removeBackdrop(),this._backdrop.attach(e$).to("body").show({isAnimated:this._config.animated}),this.backdrop=this._backdrop._componentRef,!e)return;if(!this._config.animated)return void e();setTimeout(e,150)}}removeBackdrop(){this._backdrop.hide()}focusOtherModal(){if(null==this._element.nativeElement.parentElement)return;let e=this._element.nativeElement.parentElement.querySelectorAll(".in[bsModal]");e.length&&e[e.length-1].focus()}resetAdjustments(){this._renderer.setStyle(this._element.nativeElement,"paddingLeft",""),this._renderer.setStyle(this._element.nativeElement,"paddingRight","")}checkScrollbar(){this.isBodyOverflowing=LV.body.clientWidth<RV.innerWidth,this.scrollbarWidth=this.getScrollbarWidth()}setScrollbar(){LV&&(this.originalBodyPadding=parseInt(RV.getComputedStyle(LV.body).getPropertyValue("padding-right")||0,10),this.isBodyOverflowing&&(LV.body.style.paddingRight=`${this.originalBodyPadding+this.scrollbarWidth}px`))}resetScrollbar(){LV.body.style.paddingRight=`${this.originalBodyPadding}px`}getScrollbarWidth(){let e=this._renderer.createElement("div");this._renderer.addClass(e,Wq),this._renderer.appendChild(LV.body,e);let t=e.offsetWidth-e.clientWidth;return this._renderer.removeChild(LV.body,e),t}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(yp),$d(dp),$d(Pq),$d(zq,8))}}static{this.ɵdir=ts({type:e,selectors:[["","bsModal",""]],hostBindings:function(e,t){1&e&&jf("mousedown",(function(e){return t.onClickStarted(e)}))("mouseup",(function(e){return t.onClickStop(e)}))("keydown.esc",(function(e){return t.onEsc(e)}))},inputs:{config:"config",closeInterceptor:"closeInterceptor"},outputs:{onShow:"onShow",onShown:"onShown",onHide:"onHide",onHidden:"onHidden"},exportAs:["bs-modal"],standalone:!0})}}return e})(),s$=(()=>{class e{static forRoot(){return{ngModule:e,providers:[i$,Pq,Iq]}}static forChild(){return{ngModule:e,providers:[i$,Pq,Iq]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Uq]})}}return e})(),a$=(()=>{class e{constructor(e,t){this._http=e,this._commonService=t,this.currentScreen=new Tt("
1celebration"),this.currentScreen$=this.currentScreen.asObservable(),this.showAddButton=new Tt(!0),this.config=Iw,this.correlationId="",this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment()}get _window(){return window}getHeaders(){let e=this._window,t=e.SWY.CONFIGSERVICE.datapowerConfig.cncSubscriptionKey,i=e.AB.userInfo.banner,n=this.correlationId||e.AB.COMMON.generateUUID();return new jy({"Content-Type":"application/vnd.safeway.v1+json",Accept:"application/vnd.safeway.v1+json","x-swy-client-id":"web-portal","x-swy-correlation-id":n,"x-swy-request-id":n,"x-swy-banner":i,"Ocp-Apim-Subscription-Key":t,Authorization:`Bearer ${e.AB.userInfo.SWY_SHOP_TOKEN}`,"x-swy-client-name":"web-portal"})}getUrl(){let e=this._window,t=e.AB?.userInfo?.UUID,i=e.AB?.userInfo?.banner,n=e.SWY?.CONFIGSERVICE?.datapowerConfig?.cncCtxPath||"";return`${this.config[this.currentEnv]?.baseURL?.replace("{banner}",i)||""}${n}/ucaservice/api/uca/customers/${t}/occasions`}getSpecialOccasions(){let e=this.getUrl(),t=this.getHeaders();return this._http.get(e,{headers:t})}postSpecialOccasion(e,t,i=""){let n=this.getUrl(),r={type:"SPECIAL_OCCASION",subType:e,value:t,description:i},s=this.getHeaders();return this._http.post(n,r,{headers:s})}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function o$(e,t){1&e&&(kf(0,"div",23),am(1,"What are you celebrating?"),xf())}function l$(e,t){if(1&e&&(kf(0,"option",24),am(1),xf()),2&e){let e=t.$implicit,i=Yf();zh("value",e),Vd(),lm(i.celebrationMap[e])}}function c$(e,t){1&e&&(kf(0,"div",29),am(1,"Select special event or holiday"),xf())}function d$(e,t){if(1&e&&(kf(0,"option",24),am(1),xf()),2&e){let e=t.$implicit,i=Yf(2);zh("value",e),Vd(),lm(i.specialEventMap[e])}}function u$(e,t){if(1&e){let e=Mf();kf(0,"div",25)(1,"div",10)(2,"label",26),ph(3,c$,2,0,"div",27),kf(4,"select",28),jf("change",(function(t){return Wa(e),Ha(Yf().onEventNameChange(t.target.value))})),kf(5,"option",14),am(6,"Select special event or holiday"),xf(),ph(7,d$,2,2,"option",15),xf(),kf(8,"span",16),am(9,"Select special event or holiday"),xf()()()()}if(2&e){let e=Yf();Vd(3),zh("ngIf",e.selectedEventName),Vd(),zh("disabled",!e.isSecondaryFieldEnabled),Vd(3),zh("ngForOf",e.specialEventKeys)}}function p$(e,t){if(1&e&&(kf(0,"div",34)(1,"div",35),Tf(2,"span",36),kf(3,"span",37),am(4,"Error:"),xf()(),kf(5,"div",38),am(6),xf()()),2&e){let e=Yf(2);Vd(6),lm(e.occasionDateError)}}function h$(e,t){if(1&e){let e=Mf();kf(0,"div",25)(1,"div",30)(2,"label",31)(3,"input",32),mm("ngModelChange",(function(t){Wa(e);let i=Yf();return fm(i.occasionDate,t)||(i.occasionDate=t),Ha(t)})),jf("keypress",(function(t){return Wa(e),Ha(Yf().allowOnlyNumbers(t))}))("input",(function(t){return Wa(e),Ha(Yf().handleOccasionDateInput(t))})),xf(),kf(4,"span"),am(5,"MM/DD"),xf()()(),ph(6,p$,7,1,"div",33),xf()}if(2&e){let e=Yf();Vd(3),zh("disabled",!e.isSecondaryFieldEnabled),hm("ngModel",e.occasionDate),Vd(3),zh("ngIf",e.occasionDateError)}}function f$(e,t){if(1&e&&(kf(0,"div",39)(1,"div",35),Tf(2,"span",36),kf(3,"span",37),am(4,"Error:"),xf()(),kf(5,"div",38),am(6),xf()()),2&e){let e=Yf();Vd(6),lm(e.apiErrorMessage)}}var m$=(()=>{class e{constructor(e){this.specialOccasionsService=e,this.showEventDropdown=!1,this.showMmddInputField=!0,this.isSaveButtonDisabled=!0,this.isSecondaryFieldEnabled=!1,this.selectedSpecialOccasion="",this.selectedEventName="",this.occasionDate="",this.isMmddValid=!0,this.occasionDateError="",this.apiErrorMessage=""}ngOnInit(){this.toggleFields("")}onSpecialOccasionsChange(e){this.apiErrorMessage="",this.selectedSpecialOccasion=e,this.isSecondaryFieldEnabled=""!==e,this.toggleFields(e),this.validateInputs()}onEventNameChange(e){this.apiErrorMessage="",this.selectedEventName=e,this.validateInputs()}allowOnlyNumbers(e){return!!/^[0-9]*$/.test(e.key)||(e.preventDefault(),!1)}handleOccasionDateInput(e){this.apiErrorMessage="";let t=e.target.value.replace(/\D/g,"");t.length>4&&(t=t.slice(0,4)),t.length>=2&&(t=`${t.slice(0,2)}/${t.slice(2)}`),(t.match(/\//g)||[]).length>1&&(t=t.replace(/\/$/,"")),this.occasionDate=t,this.validateOccasionDate(
1),this.validateInputs()}validateOccasionDate(){if(5!==this.occasionDate.length)return void(this.occasionDateError="");let[e,t]=this.occasionDate.split("/").map((e=>parseInt(e,10))),i=isNaN(e)||e<1||e>12,n=isNaN(t)||t<1;if(i||n)this.occasionDateError="Please enter a valid date";else{let i=new Date(2e3,e,0).getDate();this.occasionDateError=t>i?"Please enter a valid date":""}}toggleFields(e){"HOLIDAYS"===e?(this.showEventDropdown=!0,this.showMmddInputField=!1):(this.showEventDropdown=!1,this.showMmddInputField=!0)}validateInputs(){if("HOLIDAYS"===this.selectedSpecialOccasion)this.isSaveButtonDisabled=!this.selectedEventName||""===this.selectedEventName;else{let e=5===this.occasionDate.length;this.isSaveButtonDisabled=!e||!!this.occasionDateError||""===this.selectedSpecialOccasion}}saveCelebrationHandler(){this.apiErrorMessage="",this.isSaveButtonDisabled=!0;let e=this.selectedSpecialOccasion,t="";t="HOLIDAYS"===e?this.selectedEventName:this.occasionDate.replace(/\//g,"-"),this.specialOccasionsService.postSpecialOccasion(e,t,"").subscribe({next:e=>{this.specialOccasionsService.getSpecialOccasions().subscribe((e=>{let t=e?.occasions||[],i=0;for(let e=0;e<t.length;e++){let n=t[e]?.occasionInfos;Array.isArray(n)&&(i+=n.length)}let n=i<2;this.specialOccasionsService.showAddButton.next(n),this.specialOccasionsService.currentScreen.next("confirmation"),setTimeout((()=>{$("#confirmation_closeBtn").trigger("focus")}),0),this.isSaveButtonDisabled=!1}))},error:e=>{console.error("Error saving special occasion:",e),this.apiErrorMessage=e?.error?.message||e?.error?.errors?.[0]?.message||"Something went wrong. Please try again later.",this.isSaveButtonDisabled=!1}})}static{this.ɵfac=function(t){return new(t||e)($d(a$))}}static{this.ɵcmp=Qr({type:e,selectors:[["celebration-component"]],inputs:{celebrationTitle:"celebrationTitle",celebrationSubTitle:"celebrationSubTitle",celebrationSaveButton:"celebrationSaveButton",celebrationPrivacyText:"celebrationPrivacyText",celebrationPrivacyLink:"celebrationPrivacyLink",celebrationPrivacyLinkText:"celebrationPrivacyLinkText",celebrationMap:"celebrationMap",specialEventMap:"specialEventMap",celebrationKeys:"celebrationKeys",specialEventKeys:"specialEventKeys",celebrationImg:"celebrationImg",closeModal:"closeModal"},decls:32,vars:13,consts:[["id","setup-special-occasions-modal",1,"mb-9"],[1,"modal-header","special-occasions-modal__header"],[1,"special-occasions-modal__icon-container"],["alt","","aria-hidden","true",1,"special-occasions-modal__icon",3,"src"],["id","celebration_closeBtn","type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"special-occasions-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"special-occasions-modal__body"],[1,"body-text","special-occasions-modal__body__title","my-0"],[1,"body-text","special-occasions-modal__body__subtitle"],[1,"input-field","responsive-width","mb-2"],[1,"input-field__wrapper","text-dropdown-responsive"],["for","specialOccasions",1,"input-field__float-label"],["id","specialOccasionsLabel","class","sr-only",4,"ngIf"],["id","specialOccasions","name","specialOccasions","placeholder"," ","required","",1,"form-control",3,"change"],["value","","selected","","disabled",""],["aria-live","off",3,"value",4,"ngFor","ngForOf"],["aria-hidden","true",1,"word-highlight-xs"],["class","input-field responsive-width",4,"ngIf"],["class","input-field__help-text body-text-xs","aria-live","polite",4,"ngIf"],[1,"special-occasions-modal__body__btn-container","mt-3"],[1,"btn","btn-lg","btn-primary","primary-button",3,"click","disabled"],[1,"special-occasions-modal__body__link-container"],["target","_blank","tabindex","0","aria-label","Privacy Policy, opens in a new tab","data-tabindex","last",1,"links__action__inline","underline",3,"href"],["id","specialOccasionsLabel",1,"sr-only"],["aria-live","off",3,"value"],[1,"input-field","responsive-width"],["for","eventName",1,"input-field__float-label"],["id","eventNameLabel","class","sr-only",4,"ngIf"],["id","eventName","name","eventName","placeholder"," ","required","",1,"form-control",3,"change","disabled"],["id","eventNameLabel",1,"sr-only"],[1,"input-field__wrapper"],[1,"input-field__float-label"],["id","occasionDate","type","text","placeholder"," ","aria-label","Month and Date of occasion","maxlength","5",3,"ngModelChange","keypress","input","disabled","ngModel"],["class","input-field__help-text body-text-xs","id","error-occasionDate","aria-live","polite",4,"ngIf"],["id","error-occasionDate","aria-live","polite",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],[1,"sr-only"],[1,"input-field__help-text--error"],["aria-live","polite",1,"input-field__help-text","body-text-xs"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2),Tf(3,"img",3),xf(),kf(4,"button",4),jf("click",(function(){return t.closeModal()})),Tf(5,"span",5),xf()(),kf(6,"div",6)(7,"h1",7),am(8),xf(),kf(9,"div",8),am(10),xf(),kf(11,"div",9)(12,"div",10)(13,"label",11),p
1h(14,o$,2,0,"div",12),kf(15,"select",13),jf("change",(function(e){return t.onSpecialOccasionsChange(e.target.value)})),kf(16,"option",14),am(17,"What are you celebrating?"),xf(),ph(18,l$,2,2,"option",15),xf(),kf(19,"span",16),am(20,"What are you celebrating?"),xf()()()(),ph(21,u$,10,3,"div",17)(22,h$,7,3,"div",17)(23,f$,7,1,"div",18),kf(24,"div",19)(25,"button",20),jf("click",(function(){return t.saveCelebrationHandler()})),am(26),xf()(),kf(27,"div",21)(28,"span"),am(29),kf(30,"a",22),am(31),xf()()()()()),2&e&&(Vd(3),zh("src",t.celebrationImg,id),Vd(5),lm(t.celebrationTitle),Vd(2),lm(t.celebrationSubTitle),Vd(4),zh("ngIf",t.selectedSpecialOccasion),Vd(4),zh("ngForOf",t.celebrationKeys),Vd(3),zh("ngIf",t.showEventDropdown),Vd(),zh("ngIf",t.showMmddInputField),Vd(),zh("ngIf",t.apiErrorMessage),Vd(2),zh("disabled",t.isSaveButtonDisabled),Vd(),lm(t.celebrationSaveButton),Vd(3),cm("",t.celebrationPrivacyText," "),Vd(),zh("href",t.celebrationPrivacyLink,id),Vd(),cm(" ",t.celebrationPrivacyLinkText," "))},dependencies:[oy,cy,WS,KS,d_,$_,sC,ES]})}}return e})();function g$(e,t){if(1&e){let e=Mf();kf(0,"button",12),jf("click",(function(){return Wa(e),Ha(Yf().onAddOccasionHandler())})),Tf(1,"span",13),am(2),xf()}if(2&e){let e=Yf();Vd(2),cm(" ",e.confirmationAddOccasion," ")}}var b$=(()=>{class e{constructor(e){this.specialOccasionsService=e,this.showAddButton=!0}ngOnInit(){this.specialOccasionsService.showAddButton.subscribe((e=>{this.showAddButton=e}))}onAddOccasionHandler(){this.specialOccasionsService.currentScreen.next("celebration"),setTimeout((()=>{$("#celebration_closeBtn").trigger("focus")}),0)}static{this.ɵfac=function(t){return new(t||e)($d(a$))}}static{this.ɵcmp=Qr({type:e,selectors:[["confirmation-component"]],inputs:{confirmationTitle:"confirmationTitle",confirmationSubTitle:"confirmationSubTitle",confirmationAddOccasion:"confirmationAddOccasion",confirmationCloseButton:"confirmationCloseButton",confirmationImg:"confirmationImg",closeModal:"closeModal",showAddButton:"showAddButton"},decls:15,vars:5,consts:[["id","setup-confirmation-modal",1,"mb-9"],[1,"modal-header","special-occasions-modal__header"],[1,"special-occasions-modal__icon-container"],["alt","","aria-hidden","true",1,"special-occasions-modal__icon",3,"src"],["id","confirmation_closeBtn","type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"special-occasions-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon"],[1,"modal-body","special-occasions-modal__body"],[1,"body-text","special-occasions-modal__body__title","my-0"],[1,"body-text","special-occasions-modal__body__subtitle"],["class","btn btn--size__small pds-btn-transparent--primary d-flex align-items-center justify-content-center modal-body special-occasions-modal__body__button-add","aria-label","Add another occasion",3,"click",4,"ngIf"],[1,"special-occasions-modal__body__btn-container","mt-3"],["data-tabindex","last",1,"btn","btn-lg","btn-primary","primary-button",3,"click"],["aria-label","Add another occasion",1,"btn","btn--size__small","pds-btn-transparent--primary","d-flex","align-items-center","justify-content-center","modal-body","special-occasions-modal__body__button-add",3,"click"],["aria-hidden","true",1,"svg-icon","pds-svg-plus-icon-medium"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2),Tf(3,"img",3),xf(),kf(4,"button",4),jf("click",(function(){return t.closeModal()})),Tf(5,"span",5),xf()(),kf(6,"div",6)(7,"h1",7),am(8),xf(),kf(9,"div",8),am(10),xf(),ph(11,g$,3,1,"button",9),kf(12,"div",10)(13,"button",11),jf("click",(function(){return t.closeModal()})),am(14),xf()()()()),2&e&&(Vd(3),zh("src",t.confirmationImg,id),Vd(5),lm(t.confirmationTitle),Vd(2),lm(t.confirmationSubTitle),Vd(),zh("ngIf",t.showAddButton),Vd(3),lm(t.confirmationCloseButton))},dependencies:[cy]})}}return e})();function y$(e,t){if(1&e&&(Ef(0),Tf(1,"celebration-component",4),Df()),2&e){let e=Yf();Vd(),zh("celebrationTitle",e.celebrationTitle)("celebrationSubTitle",e.celebrationSubTitle)("celebrationSaveButton",e.celebrationSaveButton)("celebrationPrivacyText",e.celebrationPrivacyText)("celebrationPrivacyLink",e.celebrationPrivacyLink)("celebrationPrivacyLinkText",e.celebrationPrivacyLinkText)("celebrationMap",e.celebrationMap)("specialEventMap",e.specialEventMap)("celebrationKeys",e.celebrationKeys)("specialEventKeys",e.specialEventKeys)("celebrationImg",e.celebrationImg)("closeModal",e.closeModal.bind(e))}}function v$(e,t){if(1&e&&(Ef(0),Tf(1,"confirmation-component",5),Df()),2&e){let e=Yf();Vd(),zh("confirmationTitle",e.confirmationTitle)("confirmationSubTitle",e.confirmationSubTitle)("confirmationAddOccasion",e.confirmationAddOccasion)("confirmationCloseButton",e.confirmationCloseButton)("confirmationImg",e.confirmationImg)("closeModal",e.closeModal.bind(e))}}var w$=(()=>{class e{constructor(e,t,i,n){this.specialOccasionsService=e,this.elementRef=t,this.zone=i,this.http=n,this.onClose=new _l,this.celebrationMap={},this.specialEventMap={},this.celebrationKeys=[],this.specialEventKeys=[],this.utilityBarZoneID="",window.specialOccasionsModal={zone:i,component:this}}ngOnInit(){this.specialOccasionsService.currentScreen.subscribe((e=>{this.currentScreen=e})),this.specialOccasionsService.showAddButton.subscribe((e=>{this.showUtilityBar=e})),this.loadExperienceFragment()}loadExperienceFragment(){let e=`${window.location.origin}/content/experience-fragments/www/${window.AB.userInfo.banner}/en/generic_content/footer-v2/footer/jcr:content/root/responsivegrid/celebration_confirma.model.json`,t=`${window.location.origin}/content/dam/data/uca/settings/occasions_config.json`;Oi({data:this.http.get(e),occasionsData:this.http.get(t).pipe($i((e=>(console.error("Error fetching occasions config JSON:",e),fi({occasions:[]})))))}).subscribe({next:({data:e,occasionsData:t})=>{this.celebrationTitle=e.celebrationTitle,this.celebrationSubTitle=e.celebrationSubTitle,this.celebrationSaveButton=e.celebrationSaveButton,this.celebrationPrivacyText=e.celebrationPrivacyText,this.celebrationPrivacyLink=e.celebrationPrivacyLink,this.celebrationPrivacyLinkText=e.celebrationPrivacyLinkText,this.confirmationTitle=e.confirmationTitle,this.confirmationSubTitle=e.confirmationSubTitle,this.confirmationAddOccasion=e.confirmationAddOccasion,this.confirmationCloseButton=e.confirmationCloseButton,this.celebrationImg=e.celebrationImg,this.confirmationImg=e.confirmationImg;let i=t?.occasions;
1if(Array.isArray(i)&&i.length){this.celebrationMap=i.reduce(((e,t)=>("SPECIAL_OCCASION"===t?.type&&t?.subType&&t?.name&&(e[t.subType]=t.name),e)),{});let e=i.find((e=>"HOLIDAYS"===e?.subType))?.events;this.specialEventMap=Array.isArray(e)?e.reduce(((e,t)=>(t?.id&&t?.name&&(e[t.id]=t.name),e)),{}):{}}this.celebrationKeys=Object.keys(this.celebrationMap),this.specialEventKeys=Object.keys(this.specialEventMap)},error:e=>{console.error("Error fetching Experience Fragment:",e)}})}showSpecialOccasionsModal(e){let t="#modal-special-occasions";$(t).modal({show:!0}),window.AB.DIVISIONAL.modalTrapKeyboard(t),this.utilityBarZoneID=e?.zoneId||"",$(t).on("shown.bs.modal",(()=>{$("#celebration_closeBtn").trigger("focus")}))}closeModal(){$("#modal-special-occasions").modal("hide"),this.specialOccasionsService.currentScreen.next("celebration"),$("#modal-special-occasions").on("hidden.bs.modal",(()=>{$("#addBtnContainer").addClass("focus-outline"),$("#add-celebration-ai").trigger("focus"),$("#modal-special-occasions").off("hidden.bs.modal")})),this.showUtilityBar||window[this.utilityBarZoneID].zone.run((()=>{window[this.utilityBarZoneID].component.closeUtilityBar()}))}ngOnDestroy(){this.specialOccasionsService.currentScreen.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(a$),$d(Vl),$d(Tl),$d(ov))}}static{this.ɵcmp=Qr({type:e,selectors:[["special-occasions"]],outputs:{onClose:"onClose"},decls:6,vars:2,consts:[["data-backdrop","static","id","modal-special-occasions","role","dialog","aria-label","Special Occasions Modal","aria-hidden","true",1,"modal","sheets","fade"],["role","document",1,"modal-dialog","special-occasions-modal"],[1,"modal-content","special-occasions-modal__content"],[4,"ngIf"],[3,"celebrationTitle","celebrationSubTitle","celebrationSaveButton","celebrationPrivacyText","celebrationPrivacyLink","celebrationPrivacyLinkText","celebrationMap","specialEventMap","celebrationKeys","specialEventKeys","celebrationImg","closeModal"],[3,"confirmationTitle","confirmationSubTitle","confirmationAddOccasion","confirmationCloseButton","confirmationImg","closeModal"]],template:function(e,t){1&e&&(Ef(0),kf(1,"div",0)(2,"div",1)(3,"div",2),ph(4,y$,2,12,"ng-container",3)(5,v$,2,6,"ng-container",3),xf()()(),Df()),2&e&&(Vd(4),zh("ngIf","celebration"===t.currentScreen),Vd(),zh("ngIf","confirmation"===t.currentScreen))},dependencies:[cy,m$,b$],encapsulation:2})}}return e})();function _$(){return window}var S$=(()=>{class e{constructor(e,t){this._http=e,this._commonService=t,this.config=Iw,this.correlationId="",this.currentEnv="",this.profileUpdated$=new kt,this.onProfileUpdated$=this.profileUpdated$.asObservable(),this.profileArray=[{field:"email",status:"pending",msg:"Add your email address to get personalized deals delivered to your inbox.",addBtnAriaLabel:"Add your email."},{field:"phone",status:"pending",msg:"Add your phone number to redeem deals and coupons in the store.",addBtnAriaLabel:"Add your phone number."},{field:"verifiedEmail",status:"pending",msg:"Verify your email to so you can use it to recover your account in future.",addBtnAriaLabel:"Verify your email."},{field:"verifiedPhone",status:"pending",msg:"Verify your phone number to keep your account secure and up to date.",addBtnAriaLabel:"Verify your phone number."},{field:"dob",status:"pending",msg:"Add your birthday to get a birthday treat on us!",addBtnAriaLabel:"Add your date of birth."},{field:"address",status:"pending",msg:"Add your address for a faster checkout!",addBtnAriaLabel:"Add an address"},{field:"name",status:"pending",msg:"Add your name to personalize your experience!",addBtnAriaLabel:"Add your name."}],this.updateProfileArray=e=>this.profileArray.map((t=>("email"===t.field&&e?.emails&&e.emails.length>0?t.status="completed":"phone"===t.field&&e?.phones&&e.phones.length>0?e?.phones.filter((e=>{e?.purposes.length>0&&e.purposes.filter((e=>{"primary"===e?.name.toLowerCase()&&(t.status="completed")}))})):"verifiedEmail"===t.field&&e?.emails?.length>0?e?.emails.filter((e=>{"ACTIVE"===e?.factor?.status&&(t.status="completed")})):"verifiedPhone"===t.field&&e?.phones?.length>0?e?.phones.filter((e=>{"ACTIVE"===e?.factor?.status&&e.purposes.filter((e=>{"primary"===e.name.toLowerCase()&&(t.status="completed")}))})):("dob"===t.field&&e?.personalInfo?.age||"address"===t.field&&e?.addresses?.length>0||"name"===t.field&&e?.personalInfo?.name?.firstName&&e?.personalInfo?.name?.lastName)&&(t.status="completed"),t))),this.currentEnv=this._commonService.getCurrentEnviorment()}openSpecialOccasion(e,t){_$().AB.COMMON.addCelebration(e,t)}createCelebrationCookieOnClose(e){_$().AB.COMMON.createCelebrationCookie(e)}get _window(){return window}
1isAuthenticated(){return window?.AB?.COMMON?.authorize()}isCelebrationCookieExists(){return""!==_$().AB.COMMON.getCookie("ACI_F_SWY_CELEBRATION_SHOW")}getHeaders(){let e=this._window,t=e.SWY.CONFIGSERVICE.datapowerConfig.cncSubscriptionKey,i=e.AB.userInfo.banner,n=this.correlationId||e.AB.COMMON.generateUUID();return new jy({"Content-Type":"application/vnd.safeway.v4+json",Accept:"application/vnd.safeway.v4+json","x-swy-client-id":"web-portal","x-swy-correlation-id":n,"x-swy-request-id":n,"x-swy-banner":i,"Ocp-Apim-Subscription-Key":t,Authorization:`Bearer ${e.AB.userInfo.SWY_SHOP_TOKEN}`,"x-swy-client-name":"web-portal","x-abs-user-exp-journey":"Identity-Profile"})}getUrl(){let e=this._window,t=e.AB?.userInfo?.UUID,i=e.AB?.userInfo?.banner,n=e.SWY?.CONFIGSERVICE?.datapowerConfig?.cncCtxPath||"";return`${this.config[this.currentEnv]?.baseURL?.replace("{banner}",i)||""}${n}/ucaservice/api/uca/customers/${t}/profile?fl=loyalty,factors,identity,address,profilecompletion`}getProfile(){let e=sessionStorage.getItem("profileCompletionData");if(e&&"undefined"!==e){let t=JSON.parse(e),i=new Date(t.expiryTime).getTime();return(new Date).getTime()>i?this.setProfileData():fi(t)}return this.setProfileData()}setProfileData(){return this.getProfileData().pipe(bi((e=>{let t="",i=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.oktaConfig&&window.SWY.CONFIGSERVICE.oktaConfig.maxAge||0,n=new Date;n.setTime(n.getTime()+1e3*i),t=n.toUTCString();let r=e.profileCompletionPercentage<100&&this.updateProfileArray(e)||[],s={profileCompletionPercentage:e.profileCompletionPercentage,profileCompletionRewards:e.profileCompletionRewards,profileArray:r,expiryTime:t};return sessionStorage.setItem("profileCompletionData",JSON.stringify(s)),this.profileUpdated$.next(e),s})))}getProfileData(){let e=this.getUrl(),t=this.getHeaders();return this._http.get(e,{headers:t})}callProfileService(){}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function C$(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",5),Tf(4,"img",6),xf(),kf(5,"div",7),am(6),xf(),kf(7,"div",8)(8,"button",9),jf("click",(function(){Wa(e);let t=Yf(2);return Ha(t.onAddClick(t.utilityBarProps.utilityBarType))})),am(9),xf(),kf(10,"button",10),jf("click",(function(){return Wa(e),Ha(Yf(2).onCloseClick())})),Tf(11,"span",11),xf()()()(),Df()}if(2&e){let e=Yf(2);Vd(4),gh("src",e.utilityBarImage,id),Vd(2),cm(" ",e.utilityBarTitle," "),Vd(2),gh("id",e.addBtnID)("aria-label",e.addButtonAriaLabel),Vd(),lm(e.utilityBarProps.utilityBarCTAButtonLabel),Vd(),gh("aria-label",e.closeButtonAriaLabel)}}function I$(e,t){if(1&e){let e=Mf();kf(0,"div",12)(1,"div",13)(2,"div",14),Tf(3,"span",15),kf(4,"span",16),am(5),xf()(),kf(6,"div",17)(7,"div")(8,"div",18)(9,"span",19),am(10),xf(),kf(11,"span",20),Tf(12,"span",21),xf(),kf(13,"span",22),Tf(14,"span",21),xf(),kf(15,"div",23)(16,"p",24),am(17),xf()()()(),kf(18,"div",25)(19,"div",26),Tf(20,"span",15),kf(21,"span",16),am(22),xf()(),kf(23,"p",27),am(24),xf()(),kf(25,"div",28)(26,"button",29),jf("click",(function(){Wa(e);let t=Yf(2);return t.analyticsEvents(),Ha(t.onAddClick(t.utilityBarProps.utilityBarType))})),am(27),xf()()()()()}if(2&e){let e=Yf(2);Vd(2),gh("aria-label",e.utilityBarTitle),Vd(3),lm(e.utilityBarTitle),Vd(3),gh("aria-valuenow",e.profileCompletionPercent)("data-percentage",e.profileCompletionPercent),Vd(2),lm(e.profileCompletionPercentSRText),Vd(7),cm("",e.profileCompletionPercent,"%"),Vd(2),gh("aria-label",e.utilityBarTitle),Vd(3),lm(e.utilityBarTitle),Vd(2),lm(e.selectedProfileMsg),Vd(2),gh("id",e.addBtnID)("aria-label",e.addButtonAriaLabel),Vd(),cm(" ",e.profileCompletionBtnLable,"")}}function A$(e,t){if(1&e&&(Ef(0),ph(1,C$,12,6,"ng-container",2)(2,I$,28,12,"ng-template",null,0,Wm),Df()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf","celebration"===t.utilityBarType)("ngIfElse",e)}}var k$=(()=>{class e{constructor(e,t,i,n,r,s){this._commonService=e,this.elementRef=t,this.utilityBarService=i,this.specialOccasionsService=n,this.http=r,this.zone=s,this.onClose=new _l,this.showUtilityBar=!1,this.isAuthenticated=!1,this.isCookieExists=!1,this.utilityBarType="celebration",this.utilityBarImage="",this.selectedProfileMsg="",this.profileCompletionPercent="",this.profileCompletionPercentSRText="Profile completed",this.utilityBarTitle="",this.pointsTitle="Earn up to {points} Points by completing your profile!",this.noPointsTitle="Complete your profile!",this.addBtnID="add-celebration-ai",this.profileArray=[],this.zoneId="",this.onAddClick=e=>{"celebration"===e?this.utilityBarService.openSpecialOccasion(e,{zoneId:this.zoneId}):"profile-completion"===e&&this.utilityBarService.openSpecialOccasion(e,f(h({},this.profileComletionData),{zoneId:this.zoneId}))},this.onCloseClick=()=>{this.showUtilityBar=!1,this.utilityBarService.createCelebrationCookieOnClose(this.utilityBarProps?.utilityBarType)}}getSelectedProfileMsg(){let e=this.profileArray.find((e=>"pending"===e.status));this.profileCompletionBtnLable="verifiedEmail"===e?.field||"verifiedPhone"===e?.field?"Verify":this.utilityBarProps?.utilityBarCTAButtonLabel,this.selectedProfileMsg=e?e.msg:"",this.addButtonAriaLabel=e?e.addBtnAriaLabel:""}ngOnInit(){this.zoneId=(this.utilityBarProps?.utilityBarType||"utility-bar")+Math.floor(1e3*Math.random()),window[this.zoneId]={zone:this.zone,component:this},this.utilityBarType=this.utilityBarProps?.utilityBarType,this.utilityBarImage=this.utilityBarProps?.utilityBarImage,"celebration"===this.utilityBarProps?.utilityBarType?(this.addButtonAriaLabel="Add a special occasion",this.closeButtonAriaLabel="close special occasion"):(this.addBtnID="add-profile-ai",this.addButtonAriaLabel="Add",this.closeButtonAriaLabel="close"),this._commonService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&(this.isAuthenticated=this.utilityBarService.isAuthenticated(),this.isCookieExists=this.utilityBarService.isCelebrationCookieExists(),this.isAuthenticated&&window?.AB?.userInfo?.UUID&&this.checkEligibility(this.utilityBarType))}))}checkABTestEligibility(){let e=!1;if(window?.ttMETA&&Array.isArray(window.ttMETA)||localStorage?.getItem("abACIP499378")){let t=window.ttMETA||[],i=localStorage?.getItem("abACIP499378"),n=t.find((e=>e?.CampaignName?.includes("ACIP-499378_W_AB_Testing_Profile_Completion")));(n&&"Experience B"===n?.RecipeName||"b"===i)&&(e=!0)}return e}checkEligibility(e){"celebration"!==e||this.isCookieExists?"profile-completion"===e&&this.checkABTestEligibility()&&this.utilityBarService.getProfile().subscribe({next:e=>{e&&e.profileCompletionPercentage<100&&(this.updateProfileCompletionContent(e),this.showUtilityBar=!0)},error:e=>{console.error("Error fetching special occasions:",e),this.showUtilityBar=!1}}):this.specialOccasionsService.getSpecialOccasions().subscribe({next:e=>{let t=e?.occasions||[],i=0;if(t){for(let e=0;e<t.length;e++){let n=t[e]?.occasionInfos;Array.isArray(n)&&(i+=n.length)}i<2&&this.showUtilityBarContent()}else this.showUtilityBarContent()},error:e=>{console.error("Error fetching special occasions :",e),this.showUtilityBar=!1}})}updateProfileCompletionContent(e){this.profileCompletionPercent=e.profileCompletionPercentage,this.profileArray=e.profileArray,this.utilityBarTitle=e.profileCompletionRewards?.totalEligiblePoints?this.pointsTitle.replace("{points}",e.profileCompletionRewards?.totalEligiblePoints):this.noPointsTitle,this.analyticsPoints=e.profileCompletionRewards?.totalEligiblePoints||0,this.profileComletionData=e,this.get
1SelectedProfileMsg()}refershUtilityBar(e,t,i=!1){"profile-completion"===e&&t&&(t.profileCompletionPercentage<100?(i&&this.utilityBarService.getProfile().subscribe({next:e=>{e&&e.profileCompletionPercentage<100&&this.updateProfileCompletionContent(e)},error:e=>{console.error("Error fetching special occasions:",e)}}),$("#"+this.addBtnID).focus()):this.closeUtilityBar())}showUtilityBarContent(){this.utilityBarTitle=this.utilityBarProps?.utilityBarTitle||"",this.showUtilityBar=!0}closeUtilityBar(){let e=document.getElementById("auth_signin_link");e&&e.focus(),this.showUtilityBar=!1}analyticsEvents(){if(window.AB&&window.AB.DATALAYER){let e=this.profileArray?.find((e=>"pending"===e.status));window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|button|profile-add-${"dob"===e?.field?"birthday":e?.field}`),window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"profileCompletionPoints",data:this.analyticsPoints})}}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(Vl),$d(S$),$d(a$),$d(ov),$d(Tl))}}static{this.ɵcmp=Qr({type:e,selectors:[["utility-bar"]],inputs:{utilityBarProps:"utilityBarProps"},outputs:{onClose:"onClose"},decls:1,vars:1,consts:[["profilecompletion",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"special-occasions-modal__banner"],[1,"special-occasions-modal__banner__content"],[1,"special-occasions-modal__cake-icon-container"],["aria-hidden","true","alt","",1,"svg-icon","svg-cake-celebration-icon-32"],[1,"special-occasions-modal__text"],["id","addBtnContainer",1,"special-occasions-modal__right"],[1,"special-occasions-modal__add-btn",3,"click"],["id","add-celebration-cookie-ai",1,"special-occasions-modal__close-btn",3,"click"],["aria-hidden","true",1,"svg-icon","svg-modal-close-icon-white"],[1,"d-flex","flex-row","justify-content-center"],[1,"profile-banner","profile-completion-bar","d-flex","align-items-center","pb-0","my-1"],[1,"text-s","pds-tag","pds-tag-sizes--medium","pds-tag-primary-colors--PRIMARY","pds-me-dashboard__profile-mobile-only","pds-me-dashboard__mobile-profile-completion-bar-title","my-2"],["aria-hidden","true",1,"svg-icon","svg-profile-competion-rewards-icon"],[1,"text-s"],[1,"d-flex","flex-row","w-100","align-items-center"],["aria-valuemin","0","aria-valuemax","100","role","progressbar","aria-labelledby","profileCompletionLabel",1,"profile-banner__meter"],["id","profileCompletionLabel",1,"sr-only"],["aria-hidden","true",1,"profile-banner__half","profile-banner__half--left"],[1,"profile-banner__bar"],["aria-hidden","true",1,"profile-banner__half","profile-banner__half--right"],["aria-hidden","true",1,"profile-banner__value","d-flex","justify-content-center","align-items-center"],[1,"text-xs","content","m-0"],[1,"profile-banner__details","ml-3"],[1,"text-s","pds-tag","pds-tag-sizes--medium","pds-tag-primary-colors--PRIMARY","pds-me-dashboard__profile-tablet-desktop-only"],[1,"text-m","mt-1"],[1,"profile-banner__action"],[1,"pds-btn","pds-btn-size__small","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center","text-m--primary","ml-1",3,"click"]],template:function(e,t){1&e&&ph(0,A$,4,2,"ng-container",1),2&e&&zh("ngIf",!0===t.showUtilityBar)},dependencies:[cy],encapsulation:2})}}return e})(),x$=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})();function T$(e,t){if(1&e){let e=Mf();kf(0,"a",18),jf("click",(function(){return Wa(e),Ha(Yf().navigateToViewAll())})),am(1),xf()}if(2&e){let e=Yf();gh("aria-label",(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)+" "+(null==e.profileData?null:e.profileData.title)),Vd(),lm(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)}}function P$(e,t){if(1&e){let e=Mf();kf(0,"a",18),jf("click",(function(){return Wa(e),Ha(Yf().navigateToViewAll())})),am(1),xf()}if(2&e){let e=Yf();gh("aria-label",(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)+" "+(null==e.profileData?null:e.profileData.title)),Vd(),lm(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)}}function E$(e,t){if(1&e){let e=Mf();kf(0,"a",19),jf("click",(function(){return Wa(e),Ha(Yf().navigateToViewAll())})),am(1),xf()}if(2&e){let e=Yf();gh("aria-label",(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)+" "+(null==e.profileData?null:e.profileData.title)),Vd(),lm(null==e.profileData||null==e.profileData.webCtaProps?null:e.profileData.webCtaProps.ctaText)}}function D$(e,t){if(1&e&&(kf(0,"div",25),am(1),qm(2,"uppercase"),xf(
1)),2&e){let e=Yf().ngIf;Vd(),lm($m(2,1,e.userInitials))}}function O$(e,t){1&e&&(kf(0,"div",26),Tf(1,"span",27),xf())}function B$(e,t){if(1&e&&(kf(0,"span",28),am(1),qm(2,"titlecase"),xf()),2&e){let e=Yf().ngIf;Vd(),lm($m(2,1,e.fullName))}}function M$(e,t){if(1&e&&(kf(0,"a",29),am(1,"Add your name"),xf()),2&e){zh("href",Yf(2).profilePageLink,id)}}function R$(e,t){if(1&e&&(kf(0,"div")(1,"span",30),am(2),xf(),kf(3,"span",31),am(4),xf(),kf(5,"span",32),am(6,"primary"),xf(),kf(7,"span",33),Tf(8,"span",34),am(9),xf()()),2&e){let e=Yf().ngIf,t=Yf();Vd(2),dm("",t.formatPhoneNumber(e.profilePhone),", Primary Phone Number, ",e.phoneVerified?"Verified":"Unverified",""),Vd(2),lm(t.formatPhoneNumber(e.profilePhone)),Vd(4),zh("ngClass",e.phoneVerified?"svg-checkmark-outlined-icon":"svg-warning-outlined-icon"),Vd(),cm(" ",e.phoneVerified?"Verified":"Unverified"," ")}}function L$(e,t){if(1&e&&(kf(0,"div")(1,"a",35),am(2,"Add phone number"),xf(),kf(3,"span",36),am(4,"primary"),xf()()),2&e){let e=Yf(2);Vd(),zh("href",e.profilePageLink,id)}}function F$(e,t){if(1&e&&(kf(0,"div")(1,"span",30),am(2),xf(),kf(3,"span",31),am(4),xf(),kf(5,"span",33),Tf(6,"span",34),am(7),xf()()),2&e){let e=Yf().ngIf;Vd(2),dm("",e.profileEmail,", ",e.emailVerified?"Verified":"Unverified",""),Vd(2),lm(e.profileEmail),Vd(2),zh("ngClass",e.emailVerified?"svg-checkmark-outlined-icon":"svg-warning-outlined-icon"),Vd(),cm(" ",e.emailVerified?"Verified":"Unverified"," ")}}function N$(e,t){if(1&e&&(kf(0,"a",29),am(1,"Add email"),xf()),2&e){zh("href",Yf(2).profilePageLink,id)}}function U$(e,t){if(1&e&&(kf(0,"div",20),ph(1,D$,3,3,"div",21)(2,O$,2,0,"ng-template",null,0,Wm),kf(4,"div",22),ph(5,B$,3,3,"span",23)(6,M$,2,1,"ng-template",null,1,Wm)(8,R$,10,5,"div",24)(9,L$,5,1,"ng-template",null,2,Wm)(11,F$,8,5,"div",24)(12,N$,2,1,"ng-template",null,3,Wm),xf()()),2&e){let e=t.ngIf,i=sm(3),n=sm(7),r=sm(10),s=sm(13);Vd(),zh("ngIf",e.userInitials)("ngIfElse",i),Vd(4),zh("ngIf",e.fullName)("ngIfElse",n),Vd(3),zh("ngIf",e.profilePhone)("ngIfElse",r),Vd(3),zh("ngIf",e.profileEmail)("ngIfElse",s)}}var V$=(()=>{class e{constructor(e,t){this.elementRef=e,this.utilityBarService=t,this.profilePageLink="/customer-account/account-settings",this.addressPageLink="/customer-account/fulfillment-preferences",this.refreshTrigger$=new Tt(void 0)}ngOnInit(){let e=this.refreshTrigger$.pipe(dn((()=>this.utilityBarService.getProfileData())),$i((()=>fi(null)))),t=this.utilityBarService.onProfileUpdated$.pipe($i((()=>fi(null))));this.profileData$=Vi(e,t).pipe(cn(null),bi((e=>e?this.extractUserInfoFromProfileData(e):this.loadUserInfoFromWindow())),ln(1))}refreshProfile(){this.refreshTrigger$.next()}getCurrentProfile(){let e=null;return this.profileData$.pipe(Hi(1)).subscribe((t=>e=t)),e}extractUserInfoFromProfileData(e){let t=e.personalInfo?.name,i=t?.firstName||"",n=t?.lastName||"",r=e.emails?.find((e=>e.purposes?.some((e=>"primary"===e.name?.toLowerCase())))),s=r?.text||"",a="ACTIVE"===r?.factor?.status,o=e.ph
1ones?.find((e=>e.purposes?.some((e=>"primary"===e.name?.toLowerCase())))),l=o?.number||"",c="ACTIVE"===o?.factor?.status,d=(i?.charAt(0)||"")+(n?.charAt(0)||"");return{firstName:i,lastName:n,profileEmail:s,profilePhone:l,phoneVerified:c||!1,emailVerified:a||!1,userInitials:d,fullName:`${i||""} ${n||""}`.trim()}}loadUserInfoFromWindow(){let e=window.AB?.userInfo;if(e){let{firstName:t,lastName:i,profileEmail:n,profilePhone:r,phoneVerified:s,emailVerified:a}=e,o=t||"",l=i||"",c=(o?.charAt(0)||"")+(l?.charAt(0)||"");return{firstName:o,lastName:l,profileEmail:n||"",profilePhone:r||"",phoneVerified:"true"===s||!0===s,emailVerified:"true"===a||!0===a,userInitials:c,fullName:`${o||""} ${l||""}`.trim()}}return{firstName:"",lastName:"",profileEmail:"",profilePhone:"",phoneVerified:!1,emailVerified:!1,userInitials:"",fullName:""}}navigateTo(e){window.location.href=e}formatPhoneNumber(e){if(e&&e.length>0){return"("+e.slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}return""}analyticsTrackCTA(e){if(window.AB?.DATALAYER){let t=`cta:${window.AB.DATALAYER.initPathSections(!0).join("|")}${e}`;window.AB.DATALAYER.analyticsCTATracking(window.AB.DATALAYER.sanitizeAnalyticsText(t))}}navigateToViewAll(){this.analyticsTrackCTA("|link|profile-view-all"),this.navigateTo(this.profileData?.webCtaProps?.ctaLink)}navigateToPersonal(){this.analyticsTrackCTA("|button|profile-personal"),this.navigateTo(this.profilePageLink)}navigateToBirthday(){this.analyticsTrackCTA("|button|profile-birthday"),this.navigateTo(this.profilePageLink)}navigateToAddresses(){this.analyticsTrackCTA("|button|profile-addresses"),this.navigateTo(this.addressPageLink)}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(S$))}}static{this.ɵcmp=Qr({type:e,selectors:[["me-dashboard-profile"]],inputs:{utilityBarProps:"utilityBarProps",profileData:"profileData"},decls:24,vars:10,consts:[["guestAvatar",""],["addNameLink",""],["addPhoneLink",""],["addEmailLink",""],[1,"pds-me-dashboard","m-0"],[1,"pds-me-dashboard__profile-section"],[1,"pds-me-dashboard__profile-title-container","pds-me-dashboard__profile-desktop-only"],[1,"heading-m--medium","pds-me-dashboard__profile-title","mx-1"],["class","link-l--primary ml-2",3,"click",4,"ngIf"],[1,"pds-me-dashboard__profile-title-container","pds-me-dashboard__profile-tablet-only"],[1,"heading-s--medium","pds-me-dashboard__profile-title","mx-1"],[1,"pds-me-dashboard__profile-title-container","pds-me-dashboard__profile-mobile-only"],[1,"heading-xs--medium","pds-me-dashboard__profile-title","mx-1"],["class","link-s--primary ml-2",3,"click",4,"ngIf"],[3,"utilityBarProps"],["role","link",1,"pds-btn","pds-btn-size__medium","pds-btn-subtle--primary","pds-me-dashboard__profile-nav-links","my-2","mr-2","p-0",3,"click"],["role","link","aria-label","Addresses",1,"pds-btn","pds-btn-size__medium","pds-btn-subtle--primary","pds-me-dashboard__profile-nav-links","my-2","p-0",3,"click"],["class","d-flex flex-row my-3",4,"ngIf"],[1,"link-l--primary","ml-2",3,"click"],[1,"link-s--primary","ml-2",3,"click"],[1,"d-flex","flex-row","my-3"],["class","pds-me-dashboard__profile-avatar d-flex align-items-center justify-content-center heading-s--medium mr-3","aria-hidden","true",4,"ngIf","ngIfElse"],[1,"d-flex","flex-column"],["class","heading-s--medium pds-me-dashboard__full-name",4,"ngIf","ngIfElse"],[4,"ngIf","ngIfElse"],["aria-hidden","true",1,"pds-me-dashboard__profile-avatar","d-flex","align-items-center","justify-content-center","heading-s--medium","mr-3"],["aria-hidden","true",1,"pds-me-dashboard__profile-avatar","pds-me-dashboard__guest-avatar","d-flex","align-items-center","justify-content-center","heading-s--medium","mr-3"],[1,"svg-profile-user-icon"],[1,"heading-s--medium","pds-me-dashboard__full-name"],[1,"link-m--primary",3,"href"],[1,"sr-only"],["aria-hidden","true",1,"text-m","mr-3"],["aria-hidden","true",1,"text-m--medium","mr-3","pds-me-dashboard__desktop-only"],["aria-hidden","true",1,"text-m-sb","pds-me-dashboard__verified","d-inline-block"],[1,"pds-me-dashboard__verified-icon","align-middle",3,"ngClass"],["aria-label","Add primary phone number",1,"link-m--primary","mr-3",3,"href"],["aria-hidden","true",1,"text-m--medium","mr-3"]],template:function(e,t){1&e&&(kf(0,"div",4)(1,"div",5)(2,"div",6)(3,"h2",7),am(4),xf(),ph(5,T$,2,2,"a",8),xf(),kf(6,"div",9)(7,"h2",10),am(8),xf(),ph(9,P$,2,2,"a",8),xf(),kf(10,"div",11)(11,"h2",12),am(12),xf(),ph(13,E$,2,2,"a",13),xf(),Tf(14,"utility-bar",14),kf(15,"div")(16,"button",15),jf("click",(function(){return t.navigateToPersonal()})),am(17,"Personal"),xf(),kf(18,"button",15),jf("click",(function(){return t.navigateToBirthday()})),am(19,"Birthday"),xf(),kf(20,"button",16),jf("click",(function(){return t.navigateToAddresses()})),am(21,"Addresses"),xf()(),ph(22,U$,14,8,"div",17),qm(23,"async"),xf()()),2&e&&(Vd(4),lm(null==t.profileData?null:t.profileData.title),Vd(),zh("ngIf","true"===(null==t.profileData?null:t.profileData.webCta)),Vd(3),lm(null==t.profileData?null:t.profileData.title),Vd(),zh("ngIf","true"===(null==t.profileData?null:t.profileData.webCta)),Vd(3),lm(null==t.profileData?null:t.profileData.title),Vd(),zh("ngIf","true"===(null==t.profileData?null:t.profileData.webCta)),Vd(),zh("utilityBarProps",t.utilityBarProps),Vd(8),zh("ngIf",$m(23,8,t.profileData$)))},dependencies:[sy,cy,k$,_y,Ay,Iy]})}}return e})(),q$=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,x$]})}}return e})(),$$=["toastContainer"];
1function j$(e,t){1&e&&(Ef(0),Tf(1,"span",9),Df())}function z$(e,t){1&e&&(Ef(0),Tf(1,"span",10),Df())}function W$(e,t){1&e&&(Ef(0),Tf(1,"span",11),Df())}function H$(e,t){1&e&&(Ef(0),Tf(1,"span",12),Df())}function Y$(e,t){if(1&e){let e=Mf();kf(0,"button",13),jf("click",(function(){return Wa(e),Ha(Yf(2).onCloseClick())})),Tf(1,"span",14),xf()}}function G$(e,t){1&e&&(kf(0,"div",15)(1,"button",16),am(2,"Action"),xf()())}function K$(e,t){if(1&e&&(Ef(0),kf(1,"div",2,0)(3,"div",3)(4,"div",4),ph(5,j$,2,0,"ng-container",1)(6,z$,2,0,"ng-container",1)(7,W$,2,0,"ng-container",1)(8,H$,2,0,"ng-container",1),xf(),kf(9,"div",5)(10,"p",6),am(11),xf()(),ph(12,Y$,2,0,"button",7),xf(),ph(13,G$,3,0,"div",8),xf(),Df()),2&e){let e=Yf();Vd(5),zh("ngIf","Success"===e.NoticficationType),Vd(),zh("ngIf","Warning"===e.NoticficationType),Vd(),zh("ngIf","Error"===e.NoticficationType),Vd(),zh("ngIf","Info"===e.NoticficationType),Vd(3),lm(e.message),Vd(),zh("ngIf",e.closeBtnEnabled),Vd(),zh("ngIf",e.actionBtnEnabled)}}function Q$(){return window}var J$=(()=>{class e{constructor(){this.isOpen=!1,this.closeBtnEnabled=!1,this.actionBtnEnabled=!1,this.NoticficationType="Success",this.onCloseClick=()=>{this.isOpen=!1}}ngOnInit(){}ngAfterViewInit(){let e,t=localStorage.getItem("postAuthNotifyMessage"),i=Q$()?.SWY.CONFIGSERVICE?.featureToggleConfig?.enablePostAuthNotifyMessage&&Q$()?.AB.COMMON.getCookie("ACI_S_social_acc_success").length>0;try{e=JSON.parse(t)}catch{return}!i&&(!e?.message||!1!==e.isDisplayed)||(this.message=i?"Welcome back. you're now signed in.":e?.message,this.isOpen=!0,setTimeout((()=>{this.toastContainer&&this.toastContainer.nativeElement&&this.toastContainer.nativeElement.focus()}),0),setTimeout((()=>{this.isOpen=!1;let e="postAuthNotifyMessage";localStorage.getItem(e)&&localStorage.removeItem(e)}),8e3))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["post-auth-notification"]],viewQuery:function(e,t){if(1&e&&tm($$,5),2&e){let e;im(e=nm())&&(t.toastContainer=e.first)}},decls:1,vars:1,consts:[["toastContainer",""],[4,"ngIf"],["role","alert","aria-live","assertive","aria-atomic","true",1,"pds-toasts",2,"z-index","9999","position","fixed","top","80px","right","24px"],[1,"d-flex"],[1,"mr-2"],[1,"pds-toasts__body","ml-1"],[1,"text-m--snow","m-0"],["class","pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--inverse-neutral pds-toasts__button d-flex align-items-center justify-content-center pds-toasts__close","aria-label","Specific Performing Function",3,"click",4,"ngIf"],["class","pds-toasts__footer pt-2 ml-auto",4,"ngIf"],["aria-hidden","true",1,"pds-svg-positive-icon_inverse"],["aria-hidden","true",1,"pds-svg-warning-icon_inverse"],["aria-hidden","true",1,"pds-svg-error-icon_inverse"],["aria-hidden","true",1,"pds-svg-info-icon_inverse"],["aria-label","Specific Performing Function",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--inverse-neutral","pds-toasts__button","d-flex","align-items-center","justify-content-center","pds-toasts__close",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--inverse-neutral__icon"],[1,"pds-toasts__footer","pt-2","ml-auto"],["aria-label","Action",1,"pds-btn","pds-btn-size__small","pds-btn-outlined--inverse-neutral","pds-toasts__button","d-flex","align-items-center","justify-content-center"]],template:function(e,t){1&e&&ph(0,K$,14,7,"ng-container",1),2&e&&zh("ngIf",t.isOpen)},dependencies:[cy]})}}return e})(),Z$=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),X$=class{static loadComponent(e,t){e.clear();let i=e.createComponent(t);return Object.assign(i.instance,{isPopupWrapperView:!0}),i}},ej=class{static setupComponentEvents(e,t){e.instance.popupNextflow&&t.popupNextflow&&e.instance.popupNextflow.subscribe(t.popupNextflow),e.instance.onBack&&t.onBack&&e.instance.onBack.subscribe(t.onBack),e.instance.onSubmit&&t.onSubmit&&e.instance.onSubmit.subscribe(t.onSubmit),e.instance.onClose&&t.onClose&&e.instance.onClose.subscribe(t.onClose),e.instance.loadOptionalComponent&&t.loadOptionalComponent&&e.instance.loadOptionalComponent.subscribe(t.loadOptionalComponent)}},tj=["componentContainer"];var ij=(()=>{class e{constructor(e,t,i){this.zone=e,this.popupService=t,this.aemXfService=i,this.components=[],this.currentIndex=0,this.windowReload=new FD,this.ariaLabel="",this.dataId="",this.additionalClass="",window.popupWrapModal={zone:e,component:this}}ngOnInit(){}loadComponent(e){if(e>=0&&e<this.components.length){this.ariaLabel=this.components[e].ariaLabel,this.dataId=this.components[e].dataId,this.additionalClass=this.components[e]?.class||"";let t=X$.loadComponent(this.container,this.components[e].component);t&&"onPopupWrapperInit"in t.instance&&setTimeout((()=>{t.instance.onPopupWrapperInit()}),0),this.currentIndex=e,this.setupEventListeners(t),this.modalTrapFocus()}}loadOptionalComponent(e){this.ariaLabel=this.optionalComponents[e].ariaLabel,this.dataId=this.optionalComponents[e].dataId,this.additionalClass=this.components[e]?.class||"";let t=X$.loadComponent(this.container,this.optionalComponents[e].component);t&&"onPopupWrapperInit"in t.instance&&setTimeout((()=>{t.instance.onPopupWrapperInit()}),0),this.setupEventListeners(t),this.modalTrapFocus()}showPopupWrapper(e="",t=!0){let i=e||window.AB?.onboardingEvent?.pgm||"",n=this.popupService.triggerPopupFlow(i),r=n.urls;this.components=n.components,this.aemXfService.getInitalExperienceFragment(r.interstitialUrl).subscribe((e=>{this.aemXfService.updateExperienceFragmentState({[r.interstitialUrl.key]:e})})),r?.restUrls.length&&this.aemXfService.getExperienceFragments(r.restUrls).subscribe((e=>{this.aemXfService.updateExperienceFragmentState(e)})),n?.optionalComponents&&(this.optionalComponents=n.optionalComponents),this.loadComponent(0),$("#popup-wrapper").modal({show:t})}modalTrapFocus(){setTimeout((()=>{window.AB?.COMMON?.modalTrapKeyboard("#popup-wrapper"),$('#popup-wrapper [data-tabindex="first"]').focus()}),1e3)}setupEventListeners(e){ej.setupComponentEvents(e,{popupNextflow:e=>this.popupNextflow(e),loadOptionalComponent:e=>this.loadOptionalComponent(e),onBack:()=>this.handleBack(),onSubmit:()=>this.handleSubmit(),onClose:e=>this.handleClose(e)})}popupNextflow(e){let t=e||this.currentIndex+1;this.hasComponent(t)?this.loadComponent(t):this.handleClose()}hasComponent(e){return e<this.components.length}handleBack(){this.loadComponent(this.currentIndex-1)}handleSubmit(){console.log("Flow completed!")}handleClose(e=!0){($("#popup-wrapper").data("bs.modal")||{})._isShown&&($("#popup-wrapper").hide(),$(".modal-backdrop").hide(),e&&this.windowReload.locationReload())}
1handleKeyboardEvent(e){27===e.keyCode&&$("#popup-wrapper").is(":visible")&&(e.preventDefault(),this.handleClose())}static{this.ɵfac=function(t){return new(t||e)($d(Tl),$d(qR),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["popup-wrapper"]],viewQuery:function(e,t){if(1&e&&tm(tj,7,yp),2&e){let e;im(e=nm())&&(t.container=e.first)}},hostBindings:function(e,t){1&e&&jf("keydown.escape",(function(e){return t.handleKeyboardEvent(e)}),0,ld)},inputs:{eventType:"eventType"},decls:3,vars:4,consts:[["componentContainer",""],["data-backdrop","static","id","popup-wrapper","role","dialog","aria-hidden","true","aria-modal","true","tabindex","-1",1,"modal","fade","popup-wrapper"]],template:function(e,t){1&e&&(kf(0,"div",1),Of(1,null,0),xf()),2&e&&(Kh(t.additionalClass),gh("aria-label",t.ariaLabel)("data-id",t.dataId))},encapsulation:2})}}return e})(),nj=(()=>{class e{constructor(e,t){this.sincerelyHealthService=e,this.popupService=t,this.close=new _l,this.sincerelyHealthText="",this.sincerelyHealthSubText="",this.sincerelyHealthSkipText="",this.sincerelyHealthEarnText="",this.sincerelyHealthEarnSubText="",this.sincerelyHealthExploreText="",this.sincerelyHealthExploreSubText="",this.sincerelyHealthManageText="",this.sincerelyHealthManageSubText="",this.sincerelyHealthSetUpText="",this.sincerelyHealthDoThisLater="",this.sincerelyHealthImgReference="",this.sincerelyHealthMobileReference="",this.sincerelyHealthEarnImgReference="",this.sincerelyHealthExploreImgReference="",this.sincerelyHealthManageImgReference="",this.termsApplyText="",this.earlySavingsText="",this.comparisonBasedOn="",this.mayoClinicStudy="",this.termsUrl="",this.mayoClinicUrl="",this.isProgessiveProfileSkipped=!1}ngAfterViewInit(){this.sincerelyHealthService.analyticsEvents("modalView",(window.digitalData?.crossPageData?.acip371626Verified?.data?`account-verify-${window.digitalData?.crossPageData?.acip371626Verified?.data}-success-points`:"sincerely-health")+"|view")}addBirthday(){this.sincerelyHealthService.analyticsEvents("modalClick","sincerely-health|setup-sincerely-health"),this.sincerelyHealthService.currentScreen.next("birthdayScreen")}goToWelcome(){this.popupService.setSkippedSincerelyHealth(),this.sincerelyHealthService.analyticsEvents("modalClick","sincerely-health|do-this-later"),this.sincerelyHealthService.currentScreen.next("welcomeScreen")}static{this.ɵfac=function(t){return new(t||e)($d(ZB),$d(qR))}}static{this.ɵcmp=Qr({type:e,selectors:[["start-screen"]],inputs:{sincerelyHealthText:"sincerelyHealthText",sincerelyHealthSubText:"sincerelyHealthSubText",sincerelyHealthSkipText:"sincerelyHealthSkipText",sincerelyHealthEarnText:"sincerelyHealthEarnText",sincerelyHealthEarnSubText:"sincerelyHealthEarnSubText",sincerelyHealthExploreText:"sincerelyHealthExploreText",sincerelyHealthExploreSubText:"sincerelyHealthExploreSubText",sincerelyHealthManageText:"sincerelyHealthManageText",sincerelyHealthManageSubText:"sincerelyHealthManageSubText",sincerelyHealthSetUpText:"sincerelyHealthSetUpText",sincerelyHealthDoThisLater:"sincerelyHealthDoThisLater",sincerelyHealthImgReference:"sincerelyHealthImgReference",sincerelyHealthMobileReference:"sincerelyHealthMobileReference",sincerelyHealthEarnImgReference:"sincerelyHealthEarnImgReference",sincerelyHealthExploreImgReference:"sincerelyHealthExploreImgReference",sincerelyHealthManageImgReference:"sincerelyHealthManageImgReference",termsApplyText:"termsApplyText",earlySavingsText:"earlySavingsText",comparisonBasedOn:"comparisonBasedOn",mayoClinicStudy:"mayoClinicStudy",termsUrl:"termsUrl",mayoClinicUrl:"mayoClinicUrl",isProgessiveProfileSkipped:"isProgessiveProfileSkipped"},outputs:{close:"close"},decls:61,vars:24,consts:[["role","document",1,"modal-dialog","sincerely-health-modal"],[1,"modal-content","sincerely-health-modal__content"],[1,"modal-header","sincerely-health-modal__header"],["media","(max-width: 600px)",3,"srcset"],["alt","$10 off coupon when you sign up terms apply",1,"sincerely-health-modal__cover-image",3,"src"],["type","button","data-dismiss","modal","data-tabindex","first","aria-label","Close",1,"sincerely-health-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-close-primary","sincerely-health-modal__close-icon"],[1,"modal-body","sincerely-health-modal__body"],[1,"body-text","sincerely-health-modal__body__subtitle"],[1,"sincerely-health-modal__body__sub-text","body-text"],[1,"sincerely-health-modal__body__landing-pg","mt-2"],[1,"sincerely-health-modal__body__landing-pg__info"],[1,"sincerely-health-modal__body__landing-pg__benefits"],[1,"sincerely-health-modal__body__landing-pg__benefit"],["alt","",1,"sincerely-health-modal__body__landing-pg__benefit__icon",3,"src"],[1,"sincerely-health-modal__body__landing-pg__benefit__text"],["aria-hidden","true",1,"title-xs"],[1,"sr-only"],[1,"body-text-xs","
1sincerely-health-modal__body__landing-pg__benefit__subtext"],[1,"title-xs"],["aria-hidden","true",1,"body-text-xs","sincerely-health-modal__body__landing-pg__benefit__subtext"],[1,"sincerely-health-modal__body__landing-pg__terms"],["target","_blank","aria-label","Footnote 1, terms apply opens in a new tab",1,"links__action__inline","underline",3,"href"],["aria-hidden","true"],["target","_blank","aria-label","Footnote 3,Comparison based on 2020 Mayo Clinic study, opens in a new tab",1,"links__action__inline","underline",3,"href"],[1,"sincerely-health-modal__body__btn-container","mt-3"],[1,"btn","btn-lg","btn-primary","sincerely-health-button",3,"click"],[1,"links","sincerely-health-modal__body__link-container"],["href","javascript:void(0);","role","button","data-tabindex","last","aria-label","I will do this later",1,"links__action","underline","body-text",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"picture"),Tf(5,"source",3)(6,"img",4),xf(),kf(7,"button",5),jf("click",(function(){return t.close.emit()})),Tf(8,"span",6),xf()()(),kf(9,"div",7)(10,"h1",8),am(11),xf(),kf(12,"span",9),am(13),xf(),kf(14,"div",10)(15,"div",11)(16,"div",12)(17,"div",13),Tf(18,"img",14),kf(19,"div",15)(20,"div",16),am(21),xf(),kf(22,"div",17),am(23),xf(),kf(24,"div",18),am(25),xf()()(),kf(26,"div",13),Tf(27,"img",14),kf(28,"div",15)(29,"div",19),am(30),xf(),kf(31,"div",20),am(32),xf(),kf(33,"div",17),am(34,"Sincerely Health customers log approximately 2x more steps per day vs. the national average. Footnote 3 Comparison based on 2020 Mayo Clinic study"),xf()()(),kf(35,"div",13),Tf(36,"img",14),kf(37,"div",15)(38,"div",19),am(39),xf(),kf(40,"div",18),am(41),xf()()()()(),kf(42,"div",21)(43,"span"),am(44,"* "),xf(),kf(45,"a",22),am(46),xf(),kf(47,"div",23),am(48),xf(),kf(49,"div",17),am(50),xf(),kf(51,"div"),am(52),kf(53,"a",24),am(54),xf()()()(),kf(55,"div",25)(56,"button",26),jf("click",(function(){return t.addBirthday()})),am(57),xf()(),kf(58,"div",27)(59,"a",28),jf("click",(function(){return t.goToWelcome()})),am(60),xf()()()()()),2&e&&(Vd(5),zh("srcset",t.sincerelyHealthMobileReference),Vd(),zh("src",t.sincerelyHealthImgReference,id),Vd(5),lm(t.isProgessiveProfileSkipped?t.sincerelyHealthSkipText:t.sincerelyHealthText),Vd(2),lm(t.sincerelyHealthSubText),Vd(5),zh("src",t.sincerelyHealthEarnImgReference,id),Vd(3),lm(t.sincerelyHealthEarnText),Vd(2),dm("",t.sincerelyHealthEarnText," Footnote 2 ",t.earlySavingsText,""),Vd(2),lm(t.sincerelyHealthEarnSubText),Vd(2),zh("src",t.sincerelyHealthExploreImgReference,id),Vd(3),lm(t.sincerelyHealthExploreText),Vd(2),lm(t.sincerelyHealthExploreSubText),Vd(4),zh("src",t.sincerelyHealthManageImgReference,id),Vd(3),lm(t.sincerelyHealthManageText),Vd(2),lm(t.sincerelyHealthManageSubText),Vd(4),zh("href",t.termsUrl,id),Vd(),lm(t.termsApplyText),Vd(2),lm(t.earlySavingsText),Vd(2),cm("Footnote 2, ",t.earlySavingsText,""),Vd(2),cm("",t.comparisonBasedOn," "),Vd(),zh("href",t.mayoClinicUrl,id),Vd(),lm(t.mayoClinicStudy),Vd(3),lm(t.sincerelyHealthSetUpText),Vd(3),lm(t.sincerelyHealthDoThisLater))},encapsulation:2})}}return e})(),rj=["boBUpdateError"];function sj(e,t){if(1&e&&(Ef(0),kf(1,"div",32,1)(3,"div",33)(4,"div",34),Tf(5,"span",35),xf(),kf(6,"div",36)(7,"div",37),am(8),xf()()()(),Df()),2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function aj(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.monthDayError)}}function oj(e,t){if(1&e&&(kf(0,"div",38)(1,"div",39),Tf(2,"span",40),kf(3,"span",23),am(4,"Error:"),xf()(),ph(5,aj,2,1,"div",41),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.monthDayError)}}function lj(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.yearError)}}function cj(e,t){if(1&e&&(kf(0,"div",43)(1,"div",39),Tf(2,"span",40),kf(3,"span",23),am(4,"Error:"),xf()(),ph(5,lj,2,1,"div",41),xf()),2&e){let e=Yf();Vd(5),zh("ngIf",e.yearError)}}function dj(e,t){if(1&e){let e=Mf();kf(0,"div",44)(1,"div",45)(2,"label",46)(3,"input",47),mm("ngModelChange",(function(t){Wa(e);let i=Yf();return fm(i.termsAccepted,t)||(i.termsAccepted=t),Ha(t)})),xf(),kf(4,"div",48),am(5),kf(6,"a",49),am(7),xf()(),kf(8,"span",50),Tf(9,"span",51),xf()()()()}if(2&e){let e=Yf();Vd(3),hm("ngModel",e.termsAccepted),Vd(2),cm("",e.birthdayTermsText," "),Vd(),zh("href",e.birthdayTermsPath,id),gh("data-tabindex",e.isFormValid()?null:"last"),Vd(),lm(e.birthdayTermsButtonText)}}function uj(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.sincHealthSetupButton," ")}}function pj(e,t){1&e&&Tf(0,"div",52)}function hj(e,t){if(1&e&&(kf(0,"div",53)(1,"span"),am(2),kf(3,"a",54),am(4),xf(),kf(5,"span",55),am(6,", "),xf(),kf(7,"a",54),am(8),xf(),kf(9,"span",55),am(10,", "),xf(),kf(11,"a",56),am(12),xf(),kf(13,"span",55),am(14,"."),xf()()()),2&e){let e=Yf();Vd(2),cm(" ",e.birthdayTermsText," "),Vd(),zh("href",e.birthdayTermsPath,id),gh("aria-label",e.birthdayTermsButtonText+" - opens in a new window"),Vd(),lm(e.birthdayTermsButtonText),Vd(3),zh("href",e.birthdayTermsPath1,id),gh("aria-label",e.birthdayTermsLinkSubText+" - opens in a new window"),Vd(),lm(e.birthdayTermsLinkSubText),Vd(3),zh("href",e.birthdayTermsPath2,id),gh("aria-label",e.birthdayTermsButtonText1+" - opens in a new window"),Vd(),lm(e.birthdayTermsButtonText1)}}var fj=(()=>{class e{constructor(e){this.sincerelyHealthService=e,this.close=new _l,this.birthdayHeader="",this.birthdayText="",this.birthdaySubText="",this.birthdayTermsText="",this.birthdayTermsPath="",this.birthdayTermsButtonText="",this.sincHealthSetupButton="",this.sincerelyHealthImgReference="",this.sincerelyHealthMobileReference="",this.birthdayTermsLinkSubText="",this.birthdayTermsButtonText1="",this.birthdayTermsPath1="",this.birthdayTermsPath2="",this.monthDay="",this.year="",this.monthDayError="",this.yearError="",this.termsAccepted=!1,this.errorMsg="",this.errorPopup=!1,this.ucaApiSucess=!1,this.rxApiSuccess=!1,this.rxApiLoading=!1,this.ucaApiLoading=!1,this.enableLegalDisclaimer=!1}ngOnInit(){this.enableLegalDisclaimer=!!window?.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableLegalDisclaimer}ngAfterViewInit(){this.sincerelyHealthService.analyticsEvents("modalView","sincerely-health-add-birthday|view")}validateMonthDay(){if(!/^\d{1,2}\/\d{1,2}$/.test(this.monthDay))return void(this.monthDayError="Please enter the date in MM/DD format");let[e,t]=this.monthDay.split("/").map((e=>parseInt(e,10))),i=new Date,n=new Date(`${this.year}-${e}-${t}`);isNaN(e)||e<1||e>12?this.monthDayError="Please enter a valid month (01-12)":isNaN(t)||t<1||t>31?this.monthDayError="Please enter a valid day (01-31)":n>i?(this.monthDayError="Date cannot be in the future",this.yearError=""):this.monthDayError=""}
1validateYear(){let e=parseInt(this.year,10),t=(new Date).getFullYear(),[i,n]=this.monthDay.split("/").map((e=>parseInt(e,10))),r=new Date(`${e}-${i}-${n}`);4!==this.year.length||isNaN(e)?this.yearError="Please enter the year in YYYY format":e>t?this.yearError=`Please enter a valid year (up to ${t})`:r>new Date?(this.yearError="Date cannot be in the future",this.monthDayError=""):this.yearError=""}allowOnlyNumbers(e){return!!/^[0-9]*$/.test(e.key)||(e.preventDefault(),!1)}handleMonthDayInput(e){let t=e.target.value.replace(/\D/g,"");t.length>4&&(t=t.slice(0,4)),t.length>=2&&(t=`${t.slice(0,2)}/${t.slice(2)}`),(t.match(/\//g)||[]).length>1&&(t=t.replace(/\/$/,"")),this.monthDay=t}isFormValid(){let e=this.enableLegalDisclaimer||this.termsAccepted;return this.monthDay&&this.year&&!this.monthDayError&&!this.yearError&&e}updateUcaUserProfile(){this.ucaApiLoading=!0;let[e,t]=this.monthDay.split("/").map((e=>e.padStart(2,"0"))),i=JSON.stringify({personalInfo:{age:{dateOfBirth:"2996-"+e+"-"+t}}});this.sincerelyHealthService.updateBirthdayUCA(i).subscribe((e=>{this.ucaApiLoading=!1,e?.personalInfo?.age?.dateOfBirth?(this.ucaApiSucess=!0,this.goToWelcome()):this.setError()}),(e=>{this.ucaApiLoading=!1,this.setError()}))}updateRxUserProfile(){this.rxApiLoading=!0;let e=`${this.monthDay}/${this.year}`;this.sincerelyHealthService.updateBirthdayRx(e).subscribe((e=>{this.rxApiLoading=!1,e?.data?.createStagedUser?.error?this.setError():(this.rxApiSuccess=!0,this.goToWelcome())}),(e=>{this.rxApiLoading=!1,this.setError()}))}setError(){!this.rxApiLoading&&!this.ucaApiLoading&&(this.errorPopup=!0,this.errorMsg="We're having trouble setting up your Sincerely Health profile. Please try again now or set up your profile later.",setTimeout((()=>this.boBUpdateError.nativeElement.focus()),0))}submitDob(){this.validateMonthDay(),this.validateYear(),this.isFormValid()&&(this.sincerelyHealthService.analyticsEvents("modalView","sincerely-health-add-birthday|setup-health-profile"),this.updateUcaUserProfile(),this.updateRxUserProfile())}goToWelcome(){(this.rxApiSuccess||this.ucaApiSucess)&&this.sincerelyHealthService.currentScreen.next("welcomeScreen")}isLoading(){return this.rxApiLoading||this.ucaApiLoading}static{this.ɵfac=function(t){return new(t||e)($d(ZB))}}static{this.ɵcmp=Qr({type:e,selectors:[["birthday-screen"]],viewQuery:function(e,t){if(1&e&&tm(rj,5),2&e){let e;im(e=nm())&&(t.boBUpdateError=e.first)}},inputs:{birthdayHeader:"birthdayHeader",birthdayText:"birthdayText",birthdaySubText:"birthdaySubText",birthdayTermsText:"birthdayTermsText",birthdayTermsPath:"birthdayTermsPath",birthdayTermsButtonText:"birthdayTermsButtonText",sincHealthSetupButton:"sincHealthSetupButton",sincerelyHealthImgReference:"sincerelyHealthImgReference",sincerelyHealthMobileReference:"sincerelyHealthMobileReference",birthdayTermsLinkSubText:"birthdayTermsLinkSubText",birthdayTermsButtonText1:"birthdayTermsButtonText1",birthdayTermsPath1:"birthdayTermsPath1",birthdayTermsPath2:"birthdayTermsPath2"},outputs:{close:"close"},decls:44,vars:16,consts:[["showLoading",""],["boBUpdateError",""],["role","document",1,"modal-dialog","sincerely-health-modal"],[1,"modal-content","sincerely-health-modal__content"],[1,"modal-header","sincerely-health-modal__header"],["media","(max-width: 600px)",3,"srcset"],["alt","",1,"sincerely-health-modal__cover-image",3,"src"],["type","button","data-dismiss","modal","aria-label","Close","data-tabindex","first",1,"sincerely-health-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-close-primary","sincerely-health-modal__close-icon"],[1,"modal-body","sincerely-health-modal__body"],[1,"body-text","sincerely-health-modal__body__subtitle","mt-0"],[4,"ngIf"],[1,"sincerely-health-modal__body__detail"],[1,"sincerely-health-modal__body__form"],[1,"input-field","mr-1"],[1,"input-field__wrapper"],[1,"input-field__float-label"],["type","text","placeholder"," ","aria-label","Enter your birth date and month","aria-describedby","error-monthDay","maxlength","5",3,"ngModelChange","blur","keypress","input","ngModel"],["class","input-field__help-text body-text-xs","id","error-monthDay","aria-live","polite","role","alert",4,"ngIf"],[1,"input-field","ml-1"],[1,"input-field__wrapper","input-field__end-icon"],["type","text","placeholder"," ","aria-label","Enter your birth year","aria-describedby","error-year","maxlength","4",3,"ngModelChange","blur","keypress","ngModel"],[1,"input-field__end-icon__icon","svg-sincerely-health-icon"],[1,"sr-only"],["class","input-field__help-text body-text-xs","id","error-year","aria-live","polite","role","alert",4,"ngIf"],[1,"sincerely-health-modal__body__form-info-text","text-center"],[1,"svg-icon","svg-sincerely-health-icon"],["class","sincerely-health-modal__body__terms-agreement",4,"ngIf"],[1,"sincerely-health-modal__body__btn-container","mt-5"],[1,"btn","btn-lg","btn-primary","sincerely-health-button",3,"click","disabled"],[4,"ngIf","ngIfElse"],["class","sincerely-health-modal__body__form-info-text text-center mt-3",4,"ngIf"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24","mx-auto"],[1,"popup__content"],[1,"popup__content__icon"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","error-monthDay","aria-live","polite","role","alert",1,"input-field__help-text","body-text-xs"],[2,"display","flex"],["aria-hidden","true",1,"svg-input-error-icon"],["class","input-field__help-text--error",4,"ngIf"],[1,"input-field__help-text--error"],["id","error-year","aria-live","polite","role","alert",1,"input-field__help-text","body-text-xs"],[1,"sincerely-health-modal__body__terms-agreement"],[1,"checkbox"],["for","checkboxLarge","aria-label","By setting up your sincerely Health profile I accept the terms & conditions checkbox",1,"checkbox__group"],["type","checkbox","aria-checked","fal
1se","id","checkboxLarge",1,"checkbox__input",3,"ngModelChange","ngModel"],[1,"checkbox__label","checkbox__label--lg","checkbox__label--dark"],["target","_blank",1,"links__action__inline","underline","body-text",3,"href"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],[1,"sincerely-health-modal__body__form-info-text","text-center","mt-3"],["target","_blank",1,"links__action__inline","underline","disclaimer-text",3,"href"],["aria-hidden","true"],["data-tabindex","last","target","_blank",1,"links__action__inline","underline","disclaimer-text",3,"href"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"div",3)(2,"div",4)(3,"div")(4,"picture"),Tf(5,"source",5)(6,"img",6),xf(),kf(7,"button",7),jf("click",(function(){return Wa(e),Ha(t.close.emit())})),Tf(8,"span",8),xf()()(),kf(9,"div",9)(10,"h1",10),am(11),xf(),ph(12,sj,9,1,"ng-container",11),kf(13,"span",12),am(14),xf(),kf(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16)(19,"input",17),mm("ngModelChange",(function(i){return Wa(e),fm(t.monthDay,i)||(t.monthDay=i),Ha(i)})),jf("blur",(function(){return Wa(e),Ha(t.validateMonthDay())}))("keypress",(function(i){return Wa(e),Ha(t.allowOnlyNumbers(i))}))("input",(function(i){return Wa(e),Ha(t.handleMonthDayInput(i))})),xf(),kf(20,"span"),am(21,"MM/DD"),xf()()(),ph(22,oj,6,1,"div",18),xf(),kf(23,"div",19)(24,"div",20)(25,"label",16)(26,"input",21),mm("ngModelChange",(function(i){return Wa(e),fm(t.year,i)||(t.year=i),Ha(i)})),jf("blur",(function(){return Wa(e),Ha(t.validateYear())}))("keypress",(function(i){return Wa(e),Ha(t.allowOnlyNumbers(i))})),xf(),kf(27,"span"),am(28,"YYYY"),xf()(),Tf(29,"div",22),kf(30,"span",23),am(31,"Sincerely health icon"),xf()(),ph(32,cj,6,1,"div",24),xf()(),kf(33,"div",25),Tf(34,"span",26),kf(35,"span"),am(36),xf()(),ph(37,dj,10,5,"div",27),kf(38,"div",28)(39,"button",29),jf("click",(function(){return Wa(e),Ha(t.submitDob())})),ph(40,uj,2,1,"ng-container",30)(41,pj,1,0,"ng-template",null,0,Wm),xf()(),ph(43,hj,15,10,"div",31),xf()()()}if(2&e){let e=sm(42);Vd(5),zh("srcset",t.sincerelyHealthMobileReference),Vd(),zh("src",t.sincerelyHealthImgReference,id),Vd(5),lm(t.birthdayHeader),Vd(),zh("ngIf",t.errorPopup),Vd(2),lm(t.birthdayText),Vd(5),hm("ngModel",t.monthDay),Vd(3),zh("ngIf",t.monthDayError),Vd(4),hm("ngModel",t.year),Vd(6),zh("ngIf",t.yearError),Vd(4),lm(t.birthdaySubText),Vd(),zh("ngIf",!t.enableLegalDisclaimer),Vd(2),zh("disabled",!t.isFormValid()),gh("data-tabindex",!t.enableLegalDisclaimer&&t.isFormValid()?"last":null),Vd(),zh("ngIf",!t.isLoading())("ngIfElse",e),Vd(3),zh("ngIf",t.enableLegalDisclaimer)}},dependencies:[cy,d_,o_,$_,sC,ES],encapsulation:2})}}return e})(),mj=(()=>{class e{constructor(e){this.sincerelyHealthService=e,this.close=new _l,this.onPopupNextflow=new _l,this.welcomeSincerelyButton="",this.sincerelyReference="",this.sincerelyMobileReference="",this.confirmationPage1Title="",this.confirmationPage1SubTitle="",this.confirmationPage1BodyText="",this.confirmationPage2Title="",this.confirmationPage2SubTitle="",this.confirmationPage3SubTitle="",this.confirmationPage3BodyText="",this.confirmationPage4BodyText="",this.isProgessiveProfileSkipped=!1,this.isSincerelyHealthSkipped=!1,this.welcomeSincerelyHeader="",this.welcomeSincerelyText="",this.welcomeSincerelySubText=""}ngOnInit(){this.initializeWelcomeContent(),this.sincerelyHealthService.analyticsEvents("modalView",`sincerely-health-welcome${window.digitalData?.crossPageData?.acip371626Verified?.data?"-earned":""}|view`)}startShopping(){this.sincerelyHealthService.analyticsEvents("modalClick",`sincerely-health-welcome${window.digitalData?.crossPageData?.acip371626Verified?.data?"-earned":""}|start-shopping`),this.onPopupNextflow.emit()}initializeWelcomeContent(){this.isProgessiveProfileSkipped&&this.isSincerelyHealthSkipped?this.setContent(this.confirmationPage1Title,this.confirmationPage1SubTitle,this.confirmationPage1BodyText):this.isProgessiveProfileSkipped?this.setContent(this.confirmationPage2Title,this.confirmationPage2SubTitle,this.confirmationPage1BodyText):this.isSincerelyHealthSkipped?this.setContent(this.confirmationPage1Title,this.confirmationPage3SubTitle,this.confirmationPage3BodyText):this.setContent(this.confirmationPage2Title,this.confirmationPage2SubTitle,this.confirmationPage4BodyText)}setContent(e,t,i){this.welcomeSincerelyHeader=e,this.welcomeSincerelyText=t,this.welcomeSincerelySubText=i}static{this.ɵfac=function(t){return new(t||e)($d(ZB))}}
1static{this.ɵcmp=Qr({type:e,selectors:[["welcome-screen"]],inputs:{welcomeSincerelyButton:"welcomeSincerelyButton",sincerelyReference:"sincerelyReference",sincerelyMobileReference:"sincerelyMobileReference",confirmationPage1Title:"confirmationPage1Title",confirmationPage1SubTitle:"confirmationPage1SubTitle",confirmationPage1BodyText:"confirmationPage1BodyText",confirmationPage2Title:"confirmationPage2Title",confirmationPage2SubTitle:"confirmationPage2SubTitle",confirmationPage3SubTitle:"confirmationPage3SubTitle",confirmationPage3BodyText:"confirmationPage3BodyText",confirmationPage4BodyText:"confirmationPage4BodyText",isProgessiveProfileSkipped:"isProgessiveProfileSkipped",isSincerelyHealthSkipped:"isSincerelyHealthSkipped"},outputs:{close:"close",onPopupNextflow:"onPopupNextflow"},decls:19,vars:6,consts:[["role","document",1,"modal-dialog","sincerely-health-modal"],[1,"modal-content","sincerely-health-modal__content"],[1,"modal-header","sincerely-health-modal__header"],["media","(max-width: 600px)",3,"srcset"],["alt","",1,"sincerely-health-modal__cover-image",3,"src"],["type","button","data-dismiss","modal","data-tabindex","first","aria-label","Close",1,"sincerely-health-modal__close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-close-primary","sincerely-health-modal__close-icon"],[1,"modal-body","sincerely-health-modal__body"],[1,"body-text","sincerely-health-modal__body__subtitle"],[1,"sincerely-health-modal__body__detail"],[1,"sincerely-health-modal__body__detail","pb-5"],[1,"sincerely-health-modal__body__btn-container","mt-5"],["aria-label","Start shopping","data-tabindex","last",1,"btn","btn-lg","btn-primary","sincerely-health-button",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"div")(4,"picture"),Tf(5,"source",3)(6,"img",4),xf(),kf(7,"button",5),jf("click",(function(){return t.close.emit()})),Tf(8,"span",6),xf()()(),kf(9,"div",7)(10,"h1",8),am(11),xf(),kf(12,"span",9),am(13),xf(),kf(14,"span",10),am(15),xf(),kf(16,"div",11)(17,"button",12),jf("click",(function(){return t.startShopping()})),am(18),xf()()()()()),2&e&&(Vd(5),zh("srcset",t.sincerelyMobileReference),Vd(),zh("src",t.sincerelyReference,id),Vd(5),lm(t.welcomeSincerelyHeader),Vd(2),lm(t.welcomeSincerelyText),Vd(2),lm(t.welcomeSincerelySubText),Vd(3),lm(t.welcomeSincerelyButton))},encapsulation:2})}}return e})(),gj=["streetAddress"];function bj(e,t){if(1&e&&(kf(0,"div",46),Tf(1,"span",47),kf(2,"span",8),am(3,"Error:"),xf(),kf(4,"span",48),am(5),xf()()),2&e){let e=Yf();Vd(5),lm(e.errorMessages.streetAddress[0].message)}}function yj(e,t){if(1&e&&(kf(0,"span",52),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function vj(e,t){if(1&e&&(Ef(0),ph(1,yj,2,1,"span",51),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",i.addressForm.get("zipCode").hasError(e.type))}}function wj(e,t){if(1&e&&(kf(0,"div",49),Tf(1,"span",47),kf(2,"span",8),am(3,"Error:"),xf(),ph(4,vj,2,1,"ng-container",50),xf()),2&e){let e=Yf();Vd(4),zh("ngForOf",e.errorMessages.zipCode)}}function _j(e,t){if(1&e&&(kf(0,"div",53),Tf(1,"span",47),kf(2,"span",8),am(3,"Error:"),xf(),kf(4,"span",48),am(5),xf()()),2&e){let e=Yf();Vd(5),lm(e.errorMessages.state[0].message)}}function Sj(e,t){if(1&e&&(kf(0,"div",54),Tf(1,"span",47),kf(2,"span",8),am(3,"Error:"),xf(),kf(4,"span",48),am(5),xf()()),2&e){let e=Yf();Vd(5),lm(e.errorMessages.city[0].message)}}function Cj(e,t){1&e&&(kf(0,"div",55),Tf(1,"span",47),kf(2,"span",8),am(3,"Error:"),xf(),kf(4,"span",56),am(5,"Cannot save this address as default. Please deselect the checkbox to continue."),xf()())}function Ij(e,t){1&e&&(Ef(0),kf(1,"div",62),am(2," Sorry, but delivery service is not available for your address. "),xf(),Df())}function Aj(e,t){if(1&e&&(Ef(0),kf(1,"div",62),am(2),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",e.addressErrorMessage," ")}}function kj(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",57)(2,"div",58)(3,"a",59),jf("click",(function(){return Wa(e),Ha(Yf().closeError())})),Tf(4,"span",60),xf(),kf(5,"div",61),ph(6,Ij,3,0,"ng-container",40)(7,Aj,3,1,"ng-container",40),xf()()(),Df()}if(2&e){let e=Yf();Vd(6),zh("ngIf",e.isAddressValid),Vd(),zh("ngIf",!e.isAddressValid)}}function xj(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.addressSaveButton," ")}}function Tj(e,t){1&e&&Tf(0,"div",63)}function Pj(){return window}
1var Ej=(()=>{class e{constructor(e,t){this.storeFulfillmentService=e,this.profileCompletionService=t,this.aemData={},this.addressTitle="",this.addressSubtitle="",this.addressSubtitle2="",this.addressField="",this.addressSaveButton="",this.addressSkipButton="",this.addressImage="",this.percentage=0,this.isAddrFormSubmitted=!1,this.isStoreByAddressValidated=!1,this.addressErrorMessage="",this.isAddressValid=!1,this.ADDRESS_NOT_VERIFIED="Address could not be verified. Please try again",this.STORE_BY_ADDRESS_NETWORK_ERROR="Apologies, our site is currently experiencing technical difficulties, please try again later.",this.apiLoading=!1,this.addressForm=new oS({streetAddress:new xS("",[g_.required,g_.minLength(2)]),apartment:new xS(""),zipCode:new xS("",[g_.required,this.zipCodeValidator(),g_.minLength(5)]),state:new xS("",[g_.required,g_.minLength(2),this.stateValidator()]),city:new xS("",[g_.required,g_.minLength(2)]),defaultAddress:new xS(!1)}),this.errorMessages={streetAddress:[{type:"minlength",message:"Please enter your street address."}],zipCode:[{type:"required",message:"Please enter your ZIP Code."}
1,{type:"pattern",message:"Please enter a ZIP Code that contains only numbers."},{type:"minlength",message:"Please enter 5 numbers or more."},{type:"zipCodeInvalid",message:"Please enter a valid ZIP Code."}],state:[{type:"required",message:"Please enter your state."}],city:[{type:"required",message:"Please enter your City."}]},this.isDefaultError=!1,this.parseStoreAddressResponse=e=>{if(e&&e?.stores?.length>0)this.saveUserAddress(e);else if(this.apiLoading=!1,e?.validationStatuses?.length>0)for(let t=0;t<e?.validationStatuses?.length;t++){if(this.focusErrorCloseBtn(),"CCVS1001"===(e?.validationStatuses)[t]?.code){this.isStoreByAddressValidated=!0,this.isAddressValid=!0;break}this.addressErrorMessage=this.ADDRESS_NOT_VERIFIED,this.isStoreByAddressValidated=!0,this.isAddressValid=!1}}}ngOnInit(){this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),this.profileCompletionService.setArialabel("add your address"),this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}ngAfterViewInit(){this.addressForm.valueChanges.subscribe((()=>{this.onFormChange()})),this.analyticsEvents("screenView"),this.analyticsEvents("crossScreenData"),setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}updatedContent(e){this.aemData=e,this.addressTitle=this.aemData.addressTitle||"",this.addressSubtitle=this.aemData.addressSubtitle||"",this.addressSubtitle2=this.aemData.addressSubtitle2||"",this.addressField=this.aemData.addressField||"",this.addressSaveButton=this.aemData.addressSaveButton||"",this.addressSkipButton=this.aemData.addressSkipButton||"",this.addressImage=this.aemData.addressImage||""}onBlur(e){this.addressForm.get(e)?.markAsTouched()}validateZipcode(e){let t=e.target.value;5==t.length&&this.storeFulfillmentService.getZipcodeValidity(t).subscribe((e=>{e&&e?.geo&&!e?.geo?.errors?(this.addressForm.patchValue({zipCode:e.geo.postalCode,state:e.geo.region,city:e.geo.address2}),setTimeout((()=>{this.profileCompletionService.updateInputFieldClasses()}),0)):e?.geo?.errors&&this.setZipcodeError()}),(e=>{(404===e.status||406===e.status)&&this.setZipcodeError()}))}setZipcodeError(){this.addressForm.controls.zipCode.setErrors({zipCodeInvalid:!0})}zipCodeValidator(){return e=>{let t=e.value,i=g_.minLength(5)(e),n=g_.pattern("^[0-9]*$")(e);return i||n?t&&5===t.length?n:i&&n?i:void 0:null}}stateValidator(){return e=>{let t=e.value;return t&&/\d/.test(t)?{numeric:!0}:null}}skipProfileStep(){this.analyticsEvents("linkClick","skip"),this.profileCompletionService.skipProfileFlow(),this.profileCompletionService.setNextScreen()}onKeyPress(e){this.profileCompletionService.onKeyPress(e)}callStoreByAddressApi(){let e=this.addressForm;this.isAddrFormSubmitted=!0,this.apiLoading=!0;let t={address:{addressLine1:e.value.streetAddress?e.value.streetAddress:null,addressLine2:e.value.apartment?e.value.a
1partment:null,city:e.value.city?e.value.city:null,countryCode:null,postalCode:e.value.zipCode?e.value.zipCode:null,stateCode:e.value.state?e.value.state:null}};this.storeFulfillmentService.getAddressAvailability(t).subscribe((e=>{this.isAddrFormSubmitted=!1,e&&this.parseStoreAddressResponse(e)}),(e=>{this.apiLoading=!1,this.focusErrorCloseBtn(),this.isAddrFormSubmitted=!1,this.addressErrorMessage="Apologies, our site is currently experiencing technical difficulties, please try again later.",this.isStoreByAddressValidated=!0}))}saveUserAddress(e){let{addressLine1:t,addressLine2:i,city:n,postalCode:r,stateCode:s,addressRef:a,longitude:o,latitude:l}=e?.address,c=null,d={address:{address1:`${t}`?.trim(),address2:`${i||""}`?.trim(),city:n,stateCode:s,postalCode:r?.split("-")?.[0],postalCodeExtn:r?.split("-")?.[1],addressTypes:[{type:1}],purposes:[{name:"DELIVERY"}],isSelectedAddress:!0,selectedAddressBanner:Pj().SWY.CONFIGSERVICE.getResolvedBanner(),selectedAddressPurposes:[{name:"DELIVERY"}],addressHash:a,geoCodes:{latitude:l,longitude:o},statuses:[]}};if(e?.validationStatuses&&(d.address.statuses=e?.validationStatuses),e?.stores&&e?.stores.length>0&&(d.address.deliveryStores=[],e?.stores.forEach((e=>{e.polarisBannerName===Pj().SWY.CONFIGSERVICE.getResolvedBanner()&&(c=e.polarisBannerName),d.address.deliveryStores.push({storeId:e.locationId,banner:e.polarisBannerName})}))),this.addressForm.get("defaultAddress").value&&c)d.address.isDefaultAddress=!0,d.address.defaultAddressBanner=Pj().SWY.CONFIGSERVICE.getResolvedBanner(),d.address.defaultAddressPurpose="DELIVERY";else{if(this.addressForm.get("defaultAddress").value)return this.apiLoading=!1,this.isDefaultError=!0,this.focusOnDefaultAddress(),!1;d.address.isDefaultAddress=!1}this.storeFulfillmentService.addUserAddressV2(d).subscribe((e=>{this.apiLoading=!1;let t=this.percentage+20;this.profileCompletionService.setProfileCompletionData({type:"address",profileCompletionPercentage:t}),this.profileCompletionService.setProfileCompletionPercentage(t),this.profileCompletionService.setNextScreen()}),(e=>{this.apiLoading=!1,"IAUC0334"===e?.error?.errors?.[0]?.code?(this.focusOnDefaultAddress(),this.isDefaultError=!0):"IAUC0057"===e?.error?.errors?.[0]?.code?(this.focusErrorCloseBtn(),this.isStoreByAddressValidated=!0,this.isAddressValid=!0):(this.focusErrorCloseBtn(),this.addressErrorMessage=this.STORE_BY_ADDRESS_NETWORK_ERROR,this.isStoreByAddressValidated=!0)}))}onDefaultAddressChange(){this.analyticsEvents("crossScreenData"),this.isDefaultError=!1}onFormChange(){this.isDefaultError=!1}focusOnDefaultAddress(){$("#address-checkbox")[0].focus()}closeError(){this.isStoreByAddressValidated=!1,this.isAddressValid=!1,this.streetAddress.nativeElement.focus()}focusErrorCloseBtn(){setTimeout((()=>{$("#addressErrorCloseBtn")[0].focus()}),3e3)}analyticsEvents(e,t){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.setLinkClickEvents(`complete-your-profile|address:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|profile-${window.AB.DATALAYER.sanitizeAnalyticsText(this.addressSaveButton)}`);else if("crossScreenData"===e){let e=$("#address-checkbox")?.prop("checked");window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"profileCompletionCheckBox",data:e})}else if("screenView"===e){let e={percentage:this.percentage,flowType:t||"add-address",step:"complete-your-a
1ddress"};window.AB&&window.AB.DATALAYER.trackProfileCompletion(e)}}static{this.ɵfac=function(t){return new(t||e)($d(HD),$d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["add-address"]],viewQuery:function(e,t){if(1&e&&tm(gj,5),2&e){let e;im(e=nm())&&(t.streetAddress=e.first)}},decls:61,vars:22,consts:[["streetAddress",""],["showLoading",""],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["aria-live","polite",1,"reward-message"],[1,"reward-text","text-l","d-flex","align-items-center","justify-content-center"],["alt","",1,"profile-completion-modal__reward-icon","mr-1",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],["id","add-address-title",1,"profile-completion-modal__body__title","heading-m","mb-3"],["id","add-address-form","novalidate","",1,"mb-0",3,"formGroup"],[1,"pds-input-field-group","text-left","mb-3"],["formControlName","streetAddress","type","text","id","street-address","placeholder","","required","","aria-describedby","streetAddr","aria-label","street address",1,"pds-input-field-form-control"],["for","street-address",1,"text-l","pds-input-field-group--label","mb-0"],["class"," d-flex mt-1","id","streetAddr","aria-live","polite",4,"ngIf"],["formControlName","apartment","type","text","id","apt-suite","placeholder"," ","maxlength","19",1,"pds-input-field-form-control"],["for","apt-suite",1,"text-l","pds-input-field-group--label","mb-0"],[1,"d-flex"],[1,"pds-input-field-group","text-left","mb-3","mr-3","flex-fill"],["type","text","maxlength","5","formControlName","zipCode","id","zip-code","placeholder"," ","required","","aria-label","zipcode","aria-describedby","postalCode",1,"pds-input-field-form-control",3,"input"],["for","zip-code",1,"text-l","pds-input-field-group--label","mb-0"],["class","d-flex mt-1","id","postalCode","aria-live","polite",4,"ngIf"],[1,"pds-input-field-group","text-left","mb-3","flex-fill"],["formControlName","state","type","text","id","state","placeholder"," ","required","","aria-label","state","aria-describedby","userState","maxlength","2",1,"pds-input-field-form-control"],["for","state",1,"text-l","pds-input-field-group--label","mb-0"],["class","d-flex mt-1","id","userState","aria-live","polite",4,"ngIf"],["formControlName","city","aria-label","city","aria-describedby","userCity","type","text","id","city","placeholder"," ","required","",1,"pds-input-field-form-control"],["for","city",1,"text-l","pds-input-field-group--label","mb-0"],["class"," d-flex mt-1","id","userCity","aria-live","polite",4,"ngIf"],["for","address-checkbox","aria-label","Set address as default",1,"d-flex","pds-checkbox","mb-0"],["aria-checked","false","type","checkbox","id","address-checkbox","formControlName","defaultAddress",3,"change"],[1,"d-flex","align-items-center","justify-content-center","pds-checkbox-checkmark"],[1,"pds-svg-checkbox-checkmark"],["aria-hidden","true",1,"ml-2","pds-checkbox-label"],["class","d-flex mt-1","id","defaultAddress_error","aria-live","polite",4,"ngIf"],[4,"ngIf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],[1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[4,"ngIf","ngIfElse"],["role","button","aria-label","Skip this
1step","tabindex","0","data-tabindex","last",1,"profile-completion-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"keypress","click"],["id","streetAddr","aria-live","polite",1,"d-flex","mt-1"],["aria-hidden","true",1,"pds-svg-error-icon","float-left","ml-3","mr-1"],[1,"text-s","pds-input-field-error-message"],["id","postalCode","aria-live","polite",1,"d-flex","mt-1"],[4,"ngFor","ngForOf"],["class","input-field__help-text--error ",4,"ngIf"],[1,"input-field__help-text--error"],["id","userState","aria-live","polite",1,"d-flex","mt-1"],["id","userCity","aria-live","polite",1,"d-flex","mt-1"],["id","defaultAddress_error","aria-live","polite",1,"d-flex","mt-1"],["role","alert",1,"text-s","pds-input-field-error-message"],[1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24","mx-auto"],[1,"popup__content"],["role","button","href","javascript:void(0);","id","addressErrorCloseBtn","aria-label","Close error","tabindex","0","aria-hidden","true",1,"popup__content__icon",3,"click"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],["role","alert",1,"body-text-xs"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"button",3),jf("click",(function(){return Wa(e),t.analyticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),Tf(2,"span",4),xf(),kf(3,"div",5)(4,"h2",6),am(5),xf(),kf(6,"div",7)(7,"span",8),am(8),xf(),kf(9,"div",9),am(10),xf()(),kf(11,"div",10)(12,"span",11),Tf(13,"img",12),am(14),xf()()()(),kf(15,"div",13)(16,"h3",14),am(17),xf(),kf(18,"form",15)(19,"div",16),Tf(20,"input",17,0),kf(22,"label",18),am(23,"Street Address"),xf(),ph(24,bj,6,1,"div",19),xf(),kf(25,"div",16),Tf(26,"input",20),kf(27,"label",21),am(28,"Apt. Suite, etc (optional)"),xf()(),kf(29,"div",22)(30,"div",23)(31,"input",24),jf("input",(function(i){return Wa(e),Ha(t.validateZipcode(i))}))("input",(function(i){return Wa(e),Ha(t.validateZipcode(i))})),xf(),kf(32,"label",25),am(33,"Zip Code"),xf(),ph(34,wj,5,1,"div",26),xf(),kf(35,"div",27),Tf(36,"input",28),kf(37,"label",29),am(38,"State"),xf(),ph(39,_j,6,1,"div",30),xf()(),kf(40,"div",16),Tf(41,"input",31),kf(42,"label",32),am(43,"City"),xf(),ph(44,Sj,6,1,"div",33),xf(),kf(45,"label",34)(46,"input",35),jf("change",(function(){return Wa(e),Ha(t.onDefaultAddressChange())})),xf(),kf(47,"span",36),Tf(48,"span",37),xf(),kf(49,"span",38),am(50),xf()(),ph(51,Cj,6,0,"div",39),xf(),ph(52,kj,8,2,"ng-container",40),xf(),kf(53,"div",41)(54,"div",42)(55,"button",43),jf("click",(function(){return Wa(e),Ha(t.callStoreByAddressApi())})),ph(56,xj,2,1,"ng-container",44)(57,Tj,1,0,"ng-template",null,1,Wm),xf(),kf(59,"a",45),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProfileStep())})),am(60),xf()()()}if(2&e){let e=sm(58);Vd(5),lm(t.addressTitle),Vd(3),cm("Profile completed ",t.percentage,"%"),Vd(),Hh("width",t.percentage,"%"),gh("aria-valuenow",t.percentage),Vd(),cm("",t.percentage,"% "),Vd(3),zh("src",t.addressImage,id),Vd(),cm(" ",t.addressSubtitle," "),Vd(3),cm(" ",t.addressSubtitle2," "),Vd(),zh("formGroup",t.addressForm),Vd(6),zh("ngIf",t.addressForm.get("streetAddress").invalid&&(t.addressForm.get("streetAddress").dirty||t.addressForm.get("streetAddress").touched)),Vd(10),zh("ngIf",t.addressForm.get("zipCode").invalid&&(t.addressForm.get("zipCode").dirty||t.addressForm.get("zipCode").touched)),Vd(5),zh("ngIf",t.addressForm.get("state").invalid&&(t.addressForm.get("state").dirty||t.addressForm.get("state").touched)),Vd(5),zh("ngIf",t.addressForm.get("city").invalid&&(t.addressForm.get("city").dirty||t.addressForm.get("city").touched)),Vd(6),lm(t.addressField),Vd(),zh("ngIf",t.isDefaultError),Vd(),zh("ngIf",t.isStoreByAddressValidated),Vd(3),zh("disabled",t.addressForm.invalid),gh("aria-label",t.addressSaveButton),Vd(),zh("ngIf",!t.apiLoading)("ngIfElse",e),Vd(4),lm(t.addressSkipButton)}},dependencies:[oy,cy,DS,d_,o_,$_,j_,nC,sC,US,qS],encapsulation:2})}}return e})(),Dj=["boBUpdateError"];function Oj(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",27,1)(3,"div",28)(4,"a",29),jf("click",(function(){return Wa(e),Ha(Yf().closeError())}
1)),Tf(5,"span",30),xf(),kf(6,"div",31)(7,"div",32),am(8),xf()()()(),Df()}if(2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function Bj(e,t){1&e&&(kf(0,"span",36),am(1,"Please enter a valid month (01-12)"),xf())}function Mj(e,t){1&e&&(kf(0,"span",36),am(1,"Please enter a valid date"),xf())}function Rj(e,t){1&e&&(kf(0,"span",36),am(1,"Please enter a valid date"),xf())}function Lj(e,t){1&e&&(kf(0,"span",36),am(1,"Please enter the date in MM/DD format"),xf())}function Fj(e,t){1&e&&(kf(0,"span",36),am(1,"Please enter the date in MM/DD format"),xf())}function Nj(e,t){if(1&e&&(kf(0,"div",33),Tf(1,"span",34),kf(2,"span",9),am(3,"Error:"),xf(),ph(4,Bj,2,0,"span",35)(5,Mj,2,0,"span",35)(6,Rj,2,0,"span",35)(7,Lj,2,0,"span",35)(8,Fj,2,0,"span",35),xf()),2&e){let e=Yf();Vd(4),zh("ngIf",e.addressForm.get("birthday").hasError("month")),Vd(),zh("ngIf",e.addressForm.get("birthday").hasError("day")),Vd(),zh("ngIf",!e.addressForm.get("birthday").hasError("day")&&e.addressForm.get("birthday").hasError("invalidDayForMonth")),Vd(),zh("ngIf",e.addressForm.get("birthday").hasError("pattern")&&!e.addressForm.get("birthday").hasError("month")&&!e.addressForm.get("birthday").hasError("day")),Vd(),zh("ngIf",e.addressForm.get("birthday").hasError("required"))}}function Uj(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.dobSaveButton," ")}}function Vj(e,t){1&e&&Tf(0,"div",37)}var qj=(()=>{class e{constructor(e,t){this.fb=e,this.profileCompletionService=t,this.aemData={},this.dobTitle="",this.dobSubtitle="",this.dobText1="",this.dobText2="",this.dobField="",this.dobSaveButton="",this.dobSkipButton="",this.dobImage="",this.percentage=0,this.apiLoading=!1,this.errorPopup=!1,this.errorMsg="",this.addressForm=this.fb.group({birthday:["",[g_.required,g_.pattern(/^\d{2}\/\d{2}$/),this.monthValidator,this.dayValidator,this.dateValidator]]})}ngOnInit(){this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),this.profileCompletionService.setArialabel("add your birthday"),this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}ngAfterViewInit(){this.analyticsEvents("screenView"),setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}updatedContent(e){this.aemData=e,this.dobTitle=this.aemData.dobTitle||"",this.dobSubtitle=this.aemData.dobSubtitle||"",this.dobText1=this.aemData.dobText1||"",this.dobField=this.aemData.dobField||"",this.dobSaveButton=this.aemData.dobSaveButton||"",this.dobSkipButton=this.aemData.dobSkipButton||"",this.dobImage=this.aemData.dobImage||"",this.dobText2=this.aemData.dobText2||""}onBirthdayInput(e){let t=e.target.value.replace(/\D/g,"");t.length>4&&(t=t.slice(0,4)),t.length>2&&(t=`${t.slice(0,2)}/${t.slice(2)}`),(t.match(/\//g)||[]).length>1&&(t=t.replace(/\/$/,"")),this.addressForm.get("birthday")?.setValue(t)}onBlur(e){this.addressForm.get(e)?.markAsTouched()}monthValidator(e){let t=e.value;if(t&&t.length>=2){let e=parseInt(t.split("/")[0],10);if(e<1||e>12)return{month:!0}}return null}dayValidator(e){let t=e.value;if(t&&5===t.length){let e=parseInt(t.split("/")[1],10);if(e<1||e>31)return{day:!0}}return null}dateValidator(e){let t=e.value;if(t&&5===t.length){let[e,i]=t.split("/").map((e=>parseInt(e,10)));if(i>new Date(2024,e,0).getDate())return{invalidDayForMonth:!0}}return null}skipProfileStep(){this.analyticsEvents("linkClick","skip"),this.profileCompletionService.skipProfileFlow(),this.profileCompletionService.setNextScreen()}saveDob(){this.apiLoading=!0;let e=this.addressForm.get("birthday")?.value||"",[t,i]=e.split("/").map((e=>e.padStart(2,"0"))),n=JSON.stringify({personalInfo:{age:{dateOfBirth:"2996-"+t+"-"+i}}});this.profileCompletionService.updateProfile(n).subscribe((e=>{if(this.apiLoading=!1,e?.personalInfo?.age?.dateOfBirth){let t=Number(e?.profileCompletionPercentage);e?.profileCompletionPercentage&&this.profileCompletionService.setProfileCompletionPercentage(Number(e?.profileCompletionPercentage)),this.profileCompletionService.setProfileCompletionData({type:"dob",profileCompletionPercentage:t}),this.profileCompletionService.setNextScreen()}else this.setError()}),(e=>{this.apiLoading=!1,this.setError()}))}setError(){this.errorPopup=!0,this.errorMsg="Sorry, we're having technical difficulties and working on fixing them, please check back later.",setTimeout((()=>{$("#errorCloseBtn")[0].focus()}),3e3)}onKeyPress(e){this.profileCompletionService.onKeyPress(e)}closeError(){this.errorPopup=!1}analyticsEvents(e,t){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.set
1LinkClickEvents(`complete-your-profile|birthday:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|profile-${window.AB.DATALAYER.sanitizeAnalyticsText(this.dobSaveButton)}`);else if("screenView"===e){let e={percentage:this.percentage,flowType:t||"add-birthday",step:"complete-your-birthday"};window.AB&&window.AB.DATALAYER.trackProfileCompletion(e)}}static{this.ɵfac=function(t){return new(t||e)($d(cC),$d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["add-birthday"]],viewQuery:function(e,t){if(1&e&&tm(Dj,5),2&e){let e;im(e=nm())&&(t.boBUpdateError=e.first)}},decls:35,vars:22,consts:[["showLoading",""],["boBUpdateError",""],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[4,"ngIf"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["aria-live","polite",1,"reward-message"],[1,"reward-text","text-l","d-flex","align-items-center","justify-content-center"],["alt","",1,"profile-completion-modal__reward-icon","mr-1",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],["id","birthday-info-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],[1,"body-text","mb-3"],[3,"formGroup"],[1,"pds-input-field-group","text-left","mb-0"],["type","text","formControlName","birthday","id","add-birthday","placeholder","","maxlength","5","formControlName","birthday","required","","aria-describedby","userDob",1,"pds-input-field-form-control",3,"input","blur"],["id","birthday-label","for","add-birthday","aria-hidden","true",1,"text-l","pds-input-field-group--label","mb-0"],["class"," d-flex mt-1","id","userDob","aria-live","assertive",4,"ngIf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],[1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[4,"ngIf","ngIfElse"],["role","button","aria-label","Skip this step","tabindex","0","data-tabindex","last",1,"profile-completion-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"keypress","click"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24","mx-auto"],[1,"popup__content"],["role","button","href","javascript:void(0);","id","errorCloseBtn","aria-label","Close error","tabindex","0","aria-hidden","true",1,"popup__content__icon",3,"click"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","userDob","aria-live","assertive",1,"d-flex","mt-1"],["aria-hidden","true",1,"pds-svg-error-icon","float-left","ml-3","mr-1"],["class","text-s pds-input-field-error-message",4,"ngIf"],[1,"text-s","pds-input-field-error-message"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"button",3),jf("click",(function(){return Wa(e),t.analyticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),Tf(2,"span",4),xf(),kf(3,"div",5)(4,"h2",6),am(5),xf(),ph(6,Oj,9,1,"ng-container",7),kf(7,"div",8)(8,"span",9),am(9),xf(),kf(10,"div",10),am(11),xf()(),kf(12,"div",11)(13,"span",12),Tf(14,"img",13),am(15),xf()()()(),kf(16,"div",14)(17,"h3",15),am(18),xf(),kf(19,"div",16),am(20),xf(),kf(21,"form",17)(22,"div",18)(23,"input",19),jf("input",(function(i){return Wa(e),Ha(t.onBirthdayInput(i))}))("blur",(function(){return Wa(e),Ha(t.onBlur("birthday"))})),xf(),kf(24,"label",20),am(25),xf(),ph(26,Nj,9,5,"div",21),xf()()(),kf(27,"div",22)(28,"div",23)(29,"button",24),jf("click",(function(){return Wa(e),Ha(t.saveDob())})),ph(30,Uj,2,1,"ng-container",25)(31,Vj,1,0,"ng-template",null,0,Wm),xf(),kf(33,"a",26),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProfileStep())})),am(34),xf()()()}if(2&e){let e=sm(32);
1Vd(5),lm(t.dobTitle),Vd(),zh("ngIf",t.errorPopup),Vd(3),cm("Profile completed ",t.percentage,"%"),Vd(),Hh("width",t.percentage,"%"),gh("aria-valuenow",t.percentage),Vd(),cm("",t.percentage,"% "),Vd(3),zh("src",t.dobImage,id),Vd(),cm(" ",t.dobSubtitle," "),Vd(3),cm(" ",t.dobText1," "),Vd(2),cm(" ",t.dobText2," "),Vd(),zh("formGroup",t.addressForm),Vd(2),Sh("aria-label","",t.dobText1," ",t.dobField," Add birthday month and date"),Vd(2),lm(t.dobField),Vd(),zh("ngIf",t.addressForm.get("birthday").invalid&&t.addressForm.get("birthday").touched),Vd(3),zh("disabled",t.addressForm.invalid),gh("aria-label",t.dobSaveButton),Vd(),zh("ngIf",!t.apiLoading)("ngIfElse",e),Vd(4),lm(t.dobSkipButton)}},dependencies:[cy,DS,d_,$_,j_,nC,sC,US,qS],encapsulation:2})}}return e})(),$j=["boBUpdateError"];function jj(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",30,1)(3,"div",31)(4,"a",32),jf("click",(function(){return Wa(e),Ha(Yf().closeError())})),Tf(5,"span",33),xf(),kf(6,"div",34)(7,"div",35),am(8),xf()()()(),Df()}if(2&e){let e=Yf();Vd(8),cm("",e.errorMsg," ")}}function zj(e,t){if(1&e&&(kf(0,"span",40),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function Wj(e,t){if(1&e&&(Ef(0),ph(1,zj,2,1,"span",39),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",i.addressForm.get("firstName").hasError(e.type))}}function Hj(e,t){if(1&e&&(kf(0,"div",36),Tf(1,"span",37),kf(2,"span",9),am(3,"Error:"),xf(),ph(4,Wj,2,1,"ng-container",38),xf()),2&e){let e=Yf();Vd(4),zh("ngForOf",e.errorMessages.firstName)}}function Yj(e,t){if(1&e&&(kf(0,"span",40),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function Gj(e,t){if(1&e&&(Ef(0),ph(1,Yj,2,1,"span",39),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",i.addressForm.get("lastName").hasError(e.type))}}function Kj(e,t){if(1&e&&(kf(0,"div",41),Tf(1,"span",37),kf(2,"span",9),am(3,"Error:"),xf(),ph(4,Gj,2,1,"ng-container",38),xf()),2&e){let e=Yf();Vd(4),zh("ngForOf",e.errorMessages.lastName)}}function Qj(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf();Vd(),cm(" ",e.nameSaveButton," ")}}function Jj(e,t){1&e&&Tf(0,"div",42)}var Zj=(()=>{class e{constructor(e){this.profileCompletionService=e,this.aemData={},this.nameTitle="",this.nameSubtitle="",this.nameSubtitle2="",this.nameSaveButton="",this.nameSkipButton="",this.nameImage="",this.percentage=0,this.apiLoading=!1,this.errorPopup=!1,this.errorMsg="",this.addressForm=new oS({lastName:new xS("",[this.validateName()]),firstName:new xS("",[this.validateName()])}),this.errorMessages={firstName:[{type:"required",message:"Please enter your first name"},{type:"minlength",message:"Please enter a first name that is between 2-30 characters"},{type:"specialChars",message:"Names are limited to letters, apostrophes, periods and hyphens"}],lastName:[{type:"required",message:"Please enter your last name"},{type:"minlength",message:"Please enter a last name that is between 2-30 characters"},{type:"specialChars",message:"Names are limited to letters, apostrophes, periods and hyphens"}]}}ngOnInit(){this.profileCompletionService.setArialabel("add your name"),this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}ngAfterViewInit(){this.analyticsEvents("screenView"),setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}updatedContent(e){this.aemData=e,this.nameTitle=this.aemData.nameTitle||"",this.nameSubtitle=this.aemData.nameSubtitle||"",this.nameSubtitle2=this.aemData.nameSubtitle2||"",this.nameSaveButton=this.aemData.nameSaveButton||"",this.nameSkipButton=this.aemData.nameSkipButton||"",this.nameImage=this.aemData.nameImage||""}validateName(){let e=new RegExp("^[a-zA-Z][ a-zA-Z-]*$");return t=>{let i={required:!1,minlength:!1,specialChars:!1};return 0==t.value.length?(i.required=!0,i):t.value.length<2||t.value.length>30?(i.minlength=!0,i):e.test(t.value)?void 0:(i.specialChars=!0,i)}}skipProfileStep(){this.analyticsEvents("linkClick","skip"),this.profileCompletionService.skipProfileFlow(),this.profileCompletionService.setNextScreen()}saveProfileName(){this.apiLoading=!0;let e=this.addressForm.get("firstName")?.value,t=this.addressForm.get("lastName")?.value,i=JSON.stringify({personalInfo:{name:{firstName:e,lastName:t}}});this.profileCompletionService.updateProfile(i).subscribe((i=>{if(this.analyticsEvents("trackCTA"),this.apiLoading=!1,i?.personalInfo?.name?.firstName){let n=Number(i?.profileCompletionPercentage);i?.profileCompletionPercentage&&this.profileCompletionService.setProfileCompletionPercentage(n),this.profileCompletionService.setProfileCompletionData({type:"name",profileCompletionPercentage:n}),this.profileCompletionService.setProfileData({firstName:e,lastName:t}),this.profileCompletionService.setNextScreen()}else this.setError()}),(e=>{this.apiLoading=!1,this.setError()}))}setError(){this.errorPopup=!0,this.errorMsg="Sorry, we're having technical difficulties and working on fixing them, please check back later.",setTimeout((()=>{$("#errorCloseBtn")[0].focus()}),3e3)}onKeyPress(e){this.profileCompletionService.onKeyPress(e)}closeError(){this.errorPopup=!1}analyticsEvents(e,t){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.set
1LinkClickEvents(`complete-your-profile|last-step:${t}`);else if("trackCTA"===e)window.AB.DATALAYER.analyticsCTATracking(`cta:${window.digitalData?.pageDetails?.subSection1}:${window.digitalData?.pageDetails?.subSection2}|button|profile-${window.AB.DATALAYER.sanitizeAnalyticsText(this.nameSaveButton)}`);else if("screenView"===e){let e=window.digitalData?.crossPageData?.profileCompletionCheckBox?.data,i={percentage:this.percentage,flowType:t||"last-step"+(e?"-address-opt-in":""),step:"complete-your-name"};window.AB&&window.AB.DATALAYER.trackProfileCompletion(i),window.AB.DATALAYER.setAnalyticsCrossPageData({action:"remove",name:"profileCompletionCheckBox"})}}static{this.ɵfac=function(t){return new(t||e)($d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["add-name"]],viewQuery:function(e,t){if(1&e&&tm($j,5),2&e){let e;im(e=nm())&&(t.boBUpdateError=e.first)}},decls:38,vars:18,consts:[["showLoading",""],["boBUpdateError",""],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[4,"ngIf"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["aria-live","polite",1,"reward-message"],[1,"reward-text","text-l","d-flex","align-items-center","justify-content-center"],["alt","",1,"profile-completion-modal__reward-icon","mr-1",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],["id","last-step-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],[1,"address-form",3,"formGroup"],[1,"pds-input-field-group","text-left","mb-3"],["type","text","id","add-first-name","placeholder","","formControlName","firstName","required","","data-qa","G_ff_procmp_add_bs_fn","aria-describedby","userFirstName",1,"pds-input-field-form-control"],["for","add-first-name",1,"text-l","pds-input-field-group--label","mb-0"],["class"," d-flex mt-1","id","userFirstName","aria-live","assertive",4,"ngIf"],[1,"pds-input-field-group","text-left","mb-0"],["type","text","id","add-last-name","formControlName","lastName","placeholder","","required","","ria-describedby","userLastName",1,"pds-input-field-form-control"],["for","add-last-name",1,"text-l","pds-input-field-group--label","mb-0"],["class"," d-flex mt-1","aria-live","assertive","id","userLastName",4,"ngIf"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],[1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[4,"ngIf","ngIfElse"],["role","button","aria-label","Skip this step","tabindex","0","data-tabindex","last",1,"profile-completion-modal__footer-link","link-m--primary","pds-modal-footer__link",3,"keypress","click"],["tabindex","-1",1,"popup","popup-light","popup-light-error","alert","fade","show","mb-24","mx-auto"],[1,"popup__content"],["role","button","href","javascript:void(0);","id","errorCloseBtn","aria-label","Close error","tabindex","0","aria-hidden","true",1,"popup__content__icon",3,"click"],[1,"svg-icon","svg-error-outline"],[1,"popup__content__text"],[1,"body-text-xs"],["id","userFirstName","aria-live","assertive",1,"d-flex","mt-1"],["aria-hidden","true",1,"pds-svg-error-icon","float-left","ml-3","mr-1"],[4,"ngFor","ngForOf"],["class","text-s pds-input-field-error-message",4,"ngIf"],[1,"text-s","pds-input-field-error-message"],["aria-live","assertive","id","userLastName",1,"d-flex","mt-1"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"button",3),jf("click",(function(){return Wa(e),t.anal
1yticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),Tf(2,"span",4),xf(),kf(3,"div",5)(4,"h2",6),am(5),xf(),ph(6,jj,9,1,"ng-container",7),kf(7,"div",8)(8,"span",9),am(9),xf(),kf(10,"div",10),am(11),xf()(),kf(12,"div",11)(13,"span",12),Tf(14,"img",13),am(15),xf()()()(),kf(16,"div",14)(17,"h3",15),am(18),xf(),kf(19,"form",16)(20,"div",17),Tf(21,"input",18),kf(22,"label",19),am(23,"First name"),xf(),ph(24,Hj,5,1,"div",20),xf(),kf(25,"div",21),Tf(26,"input",22),kf(27,"label",23),am(28,"Last name"),xf(),ph(29,Kj,5,1,"div",24),xf()()(),kf(30,"div",25)(31,"div",26)(32,"button",27),jf("click",(function(){return Wa(e),Ha(t.saveProfileName())})),ph(33,Qj,2,1,"ng-container",28)(34,Jj,1,0,"ng-template",null,0,Wm),xf(),kf(36,"a",29),jf("keypress",(function(i){return Wa(e),Ha(t.onKeyPress(i))}))("click",(function(){return Wa(e),Ha(t.skipProfileStep())})),am(37),xf()()()}if(2&e){let e=sm(35);Vd(5),lm(t.nameTitle),Vd(),zh("ngIf",t.errorPopup),Vd(3),cm("Profile completed ",t.percentage,"%"),Vd(),Hh("width",t.percentage,"%"),gh("aria-valuenow",t.percentage),Vd(),cm("",t.percentage,"% "),Vd(3),zh("src",t.nameImage,id),Vd(),cm(" ",t.nameSubtitle," "),Vd(3),cm(" ",t.nameSubtitle2," "),Vd(),zh("formGroup",t.addressForm),Vd(5),zh("ngIf",t.addressForm.get("firstName").invalid&&(t.addressForm.get("firstName").dirty||t.addressForm.get("firstName").touched)),Vd(5),zh("ngIf",t.addressForm.get("lastName").invalid&&(t.addressForm.get("lastName").dirty||t.addressForm.get("lastName").touched)),Vd(3),zh("disabled",t.addressForm.invalid),gh("aria-label",t.nameSaveButton),Vd(),zh("ngIf",!t.apiLoading)("ngIfElse",e),Vd(4),lm(t.nameSkipButton)}},dependencies:[oy,cy,DS,d_,$_,j_,nC,US,qS],encapsulation:2})}}return e})();function Xj(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1)(2,"button",2),jf("click",(function(){Wa(e);let t=Yf();return t.analyticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),Tf(3,"span",3),xf(),kf(4,"div",4)(5,"h2",5),am(6),xf(),kf(7,"div",6),Tf(8,"span",7),xf()()(),kf(9,"div",8)(10,"h3",9),am(11),xf(),kf(12,"div",10),am(13),xf()(),kf(14,"div",11)(15,"div",12)(16,"button",13),am(17),xf()()(),Df()}if(2&e){let e=Yf();
1Vd(6),lm(e.completeTitle),Vd(5),cm(" ",e.completeSubTitle," "),Vd(2),cm(" ",e.completeTotalPoints," "),Vd(3),gh("aria-label",e.completeCloseButton),Vd(),lm(e.completeCloseButton)}}function ez(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1)(2,"button",14),Tf(3,"span",3),xf(),kf(4,"div",4)(5,"h2",5),am(6),xf(),kf(7,"div",6),Tf(8,"img",15),xf()()(),kf(9,"div",16)(10,"div",17)(11,"span",18),am(12),xf(),kf(13,"div",19),am(14),xf()(),kf(15,"div",10),am(16),xf()(),kf(17,"div",11)(18,"div",12)(19,"button",20),jf("click",(function(){Wa(e);let t=Yf();return t.analyticsEvents("linkClick","close"),Ha(t.analyticsEvents("screenView","dismiss"))})),am(20),xf()()(),Df()}if(2&e){let e=Yf();Vd(6),lm(e.completeLaterTitle),Vd(2),zh("src",e.completeLaterImage,id),Vd(4),cm("Profile completed ",e.percentage,"%"),Vd(),Hh("width",e.percentage,"%"),gh("aria-valuenow",e.percentage),Vd(),cm("",e.percentage,"% "),Vd(2),cm(" ",e.completeLaterPoints," "),Vd(3),gh("aria-label",e.completeCloseButton),Vd(),lm(e.completeCloseButton)}}var tz=(()=>{class e{constructor(e){this.profileCompletionService=e,this.aemData={},this.completeTitle="",this.completeSubTitle="",this.completeTotalPoints="",this.completeCloseButton="",this.completeLaterTitle="",this.completeLaterPoints="",this.completeImage="",this.completeLaterImage="",this.isCompleteView=!1,this.percentage=0,this.firstName=""}ngOnInit(){let e=this.profileCompletionService.hasProfileFlowSkipped();if(this.isCompleteView=!e,this.isCompleteView){let{firstName:e,profileCompletionRewards:t}=this.profileCompletionService.getProfileData()||{};this.firstName=e||window.AB?.userInfo?.firstName||"",this.profileCompletionRewards=t||"",this.profileCompletionService.setArialabel("profile complete confirmation"),this.analyticsEvents("screenView","profile-complete")}else this.profileCompletionService.setArialabel('"complete your profile later'),this.pendingRewards=this.profileCompletionService.getPendingRewards(),this.percentage=this.profileCompletionService.getProfileCompletionPercentage(),this.analyticsEvents("screenView","complete-later");this.profileCompletionService.aemData$.subscribe((e=>{e&&this.updatedContent(e)}))}ngAfterViewInit(){setTimeout((()=>{$('#profile-completion [data-tabindex="first"]').focus()}),1e3)}updatedContent(e){this.aemData=e,this.completeTitle=this.aemData.completeTitle||"",this.completeSubTitle=this.aemData.completeSubTitle&&this.aemData.completeSubTitle.replace("[First name]",this.firstName)||"",this.completeTotalPoints=this.aemData.completeTotalPoints&&this.aemData.completeTotalPoints.replace("[200/100]",this.profileCompletionRewards)||"",this.completeCloseButton=this.aemData.completeCloseButton||"",this.completeLaterTitle=this.aemData.completeLaterTitle||"",this.completeLaterPoints=this.aemData.completeLaterPoints&&this.aemData.completeLaterPoints.replace("[200/100]",this.pendingRewards)||"",this.completeImage=this.aemData.completeImage||"",this.completeLaterImage=this.aemData.completeLaterImage||""}analyticsEvents(e,t,i){if(window.AB&&window.AB.DATALAYER)if("linkClick"===e)window.AB.DATALAYER.setLinkClickEvents(`complete-your-profile|profile-${this.isCompleteView?"complete":"later"}:${t}`);else if("screenView"===e){let e={percentage:this.percentage,flowType:`${t}`,step:"check-it-out"};window.AB&&window.AB.DATALAYER.trackProfileCompletion(e)}}static{this.ɵfac=function(t){return new(t||e)($d(jL))}}static{this.ɵcmp=Qr({type:e,selectors:[["completion-status"]],decls:2,vars:2,consts:[[4,"ngIf"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pt-0","pb-3"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],[1,"profile-completion-modal__header-container","pds-modal-header__box","d-flex","flex-column","align-items-center"],[1,"profile-completion-modal__title","heading-xs","mb-3"],[1,"d-flex"],["aria-hidden","true",1,"svg-icon","svg-bag-celebration-icon"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-3","text-center"],["id","phone-info-text",1,"profile-completion-modal__body__title","heading-m","mb-3"],[1,"body-text"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],["data-dismiss","modal","data-tabindex","last",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center"],["aria-label","Close","data-dismiss","modal","data-tabindex","first",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-trans
1parent--neutral","d-flex","align-items-center","justify-content-center","ml-auto"],["alt","",3,"src"],[1,"modal-body","pds-modal-body--small","text-l","pt-0","pb-0","text-center"],[1,"d-flex","profile-completion-modal__progress","mb-3","w-100"],[1,"sr-only"],["role","progressbar","aria-valuemin","0","aria-valuemax","100","aria-hidden","true",1,"progress-bar","profile-completion-modal__progress-bar","text-m","d-flex","flex-column","justify-content-center"],["data-dismiss","modal","data-tabindex","last",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"]],template:function(e,t){1&e&&ph(0,Xj,18,5,"ng-container",0)(1,ez,21,10,"ng-container",0),2&e&&(zh("ngIf",t.isCompleteView),Vd(),zh("ngIf",!t.isCompleteView))},dependencies:[cy],encapsulation:2})}}return e})();function iz(e,t){if(1&e&&Tf(0,"progressive-profile",5),2&e){let e=Yf();zh("isProfileCompleteView",!0)("profileCompletionflowType",e.currentView)("isProfileModalViewed",e.isVisible)("key",e.currentView)}}function nz(e,t){if(1&e&&Tf(0,"progressive-profile",5),2&e){let e=Yf();zh("isProfileCompleteView",!0)("profileCompletionflowType",e.currentView)("isProfileModalViewed",e.isVisible)("key",e.currentView)}}function rz(e,t){1&e&&Tf(0,"add-address")}function sz(e,t){1&e&&Tf(0,"add-birthday")}function az(e,t){1&e&&Tf(0,"add-name")}function oz(e,t){1&e&&Tf(0,"completion-status")}var lz=(()=>{class e{constructor(e,t,i){this.zone=e,this.profileCompletionService=t,this.aemXfService=i,this.profileArray=[],this.eligibleScreens=[],this.index=0,this.landingScreen=!1,this.flowtype="",this.ariaLabel="",this.profileScreens=[],this.triggerElement=null,this.utilityBarZoneID="",this.isVisible=!1,window.profileCompletionModal={zone:e,component:this}}ngOnInit(){this.loadExperienceFragment(),this.profileCompletionService.setProfileCompletionPercentage(20),this.profileCompletionService.currentScreen$.subscribe((e=>{this.currentView=e})),this.profileCompletionService.ariaLabel$.subscribe((e=>{let t=this.ariaLabel;""!==e&&e!==t.replace(" dialog","").trim()&&(this.landingScreen&&(window.navigator.platform.toLowerCase().includes("win")&&(e+=" dialog"),this.landingScreen=!1),this.ariaLabel=e)})),$("profile-completion").on("hidden.bs.modal",(()=>{this.isVisible=!1;let e=this.profileCompletionService.getProfileCompletionData(),t=this.profileCompletionService.isProfileCompletionDataUpdated;t&&sessionStorage.removeItem("profileCompletionData"),window[this.utilityBarZoneID].zone.run((()=>{window[this.utilityBarZoneID].component.refershUtilityBar("profile-completion",e,t)}))}))}onInputEvent(e){this.profileCompletionService.updateInputFieldClasses()}switchView(e){this.profileCompletionService.setCurrentScreen(e)}loadExperienceFragment(){let e=`${window.location.origin}/content/experience-fragments/www/account/b2c/onboarding/master/jcr:content/root/responsivegrid/profile_completion.model.json`;this.aemXfService.getExperienceFragment(e).subscribe((e=>{this.profileCompletionService.setAemData(e)}),(e=>{console.error("Error fetching Experience Fragment:",e)}))}showProfileCompletionModal(e){this.profileCompletionService.isProfileCompletionDataUpdated=!1,this.triggerElement=document.activeElement,this.profileCompletionService.profileCompletionData.next(e),this.profileCompletionService.setProfileCompletionPercentage(Number(e.profileCompletionPercentage)||0),this.profileCompletionService.setProfileData({profileCompletionRewards:e.profileCompletionRewards?.totalEligiblePoints||0}),this.profileCompletionService.resetSkipProfileFlow(),this.utilityBarZoneID=e.zoneId||"",this.profileScreens=[],e.profileArray.forEach((e=>{"pending"===e.status&&("verifiedEmail"===e.field?this.profileScreens.includes("email")||this.profileScreens.push("email"):"verifiedPhone"===e.field?this.profileScreens.includes("phone")||this.profileScreens.push("phone"):this.profileScreens.includes(e.field)||this.profileScreens.push(e.field))})),this.profileScreens.length>0&&(this.landingScreen=!0,this.profileCompletionService.resetIndex(),this.loadNextScreen())}loadNextScreen(){this.switchView(this.profileScreens[0]),$("#profile-completion").modal({show:!0}),this.isVisible=!0,this.modalTrapFocus(),this.profileCompletionService.index$.subscribe((e=>{e&&(e<this.profileScreens.length?this.switchView(this.profileScreens[e]):this.switchView("status"))}))}modalTrapFocus(){setTimeout((()=>{window.AB?.COMMON?.modalTrapKeyboard("#profile-completion")}),1e3)}static{this.ɵfac=function(t){return new(t||e)($d(Tl),$d(jL),$d(jE))}}static{this.ɵcmp=Qr({type:e,selectors:[["profile-completion"]],hostBindings:function(e,t){1&e&&jf("input",(function(e){return t.onInputEvent(e)}))},decls:9,vars:7,consts:[["id","profile-completion","data-backdrop","static","data-keyboard","false","tabindex","-1","role","dialog","aria-hidden","true",1,"modal","fade","profile-completion-modal"],[1,"modal-dialog","pds-modal-size__medium","pds-modal-dialog"],[1,"modal-content","pds-modal-content"],[3,"isProfileCompleteView","profileCompletionflowType","isProfileModalViewed","key",4,"ngIf"],[4,"ngIf"],[3,"isProfileCompleteView","profileCompletionflowType","isProfileModalViewed","key"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2),ph(3,iz,1,4,"progressive-profile",3)(4,nz,1,4,"progressive-profile",3)(5,rz,1,0,"add-address",4)(6,sz,1,0,"add-birthday",4)(7,az,1,0,"add-name",4)(8,oz,1,0,"completion-status",4),xf()()()),2&e&&(gh("aria-label",t.ariaLabel),V
1d(3),zh("ngIf","email"===t.currentView),Vd(),zh("ngIf","phone"===t.currentView),Vd(),zh("ngIf","address"===t.currentView),Vd(),zh("ngIf","dob"===t.currentView),Vd(),zh("ngIf","name"===t.currentView),Vd(),zh("ngIf","status"===t.currentView))},dependencies:[cy,hD,Ej,qj,Zj,tz],encapsulation:2})}}return e})(),cz=(()=>{class e{constructor(e){this.elementRef=e,this.utilityBarProps={}}ngOnInit(){this.wrapper=this.elementRef.nativeElement.parentNode?.parentNode,this.utilityBarProps.utilityBarTitle=this.wrapper.getAttribute("data-lazy-utility-bar-title"),this.utilityBarProps.utilityBarImage=this.wrapper.getAttribute("data-lazy-utility-bar-image"),this.utilityBarProps.utilityBarCTAButtonLabel=this.wrapper.getAttribute("data-lazy-utility-bar-cta-button-label"),this.utilityBarProps.utilityBarType=this.wrapper.getAttribute("data-lazy-utility-bar-type")}ngOnDestroy(){}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["utility-bar-wrapper"]],decls:2,vars:1,consts:[[1,"utility-bar-wrapper"],[3,"utilityBarProps"]],template:function(e,t){1&e&&(kf(0,"div",0),Tf(1,"utility-bar",1),xf()),2&e&&(Vd(),zh("utilityBarProps",t.utilityBarProps))},dependencies:[k$],encapsulation:2})}}return e})(),dz=(()=>{class e{constructor(e){this.elementRef=e,this.utilityBarProps={},this.profileData=null}ngOnInit(){this.wrapper=this.elementRef.nativeElement.parentNode?.parentNode,this.utilityBarProps.utilityBarCTAButtonLabel="Add",this.utilityBarProps.utilityBarType="profile-completion",this.profileData=this.wrapper.getAttribute("data-profile-content")?JSON.parse(this.wrapper.getAttribute("data-profile-content")):null}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["me-dashboard-profile-wrapper"]],decls:1,vars:2,consts:[[3,"utilityBarProps","profileData"]],template:function(e,t){1&e&&Tf(0,"me-dashboard-profile",0),2&e&&zh("utilityBarProps",t.utilityBarProps)("profileData",t.profileData)},dependencies:[V$],encapsulation:2})}}return e})(),uz=".carousel-coupon-card--marketing, .pds-marketing-card",pz="pds-marketing-card",hz='.pc__tap-zone, .pds-marketing-card__button, .pds-marketing-card__action-link, .pds-marketing-card__tag[role="button"]',fz='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), span[role="button"], a[role="button"], img[role="button"], a',mz=new WeakMap,gz="deals-module-mkt-card";function bz(e){return e.split("?")[0]}function yz(e,t){let i=`$${gz}-${t}$`;return`${bz(e)}?${i}`}function vz(...e){for(let t of e)if("string"==typeof t&&t.trim())return t.trim();return null}function wz(e=window?.innerWidth??1024){return e<768?"mobile":e<1024?"tablet":"desktop"}function _z(e){if(!e)return null;let t=e.webCtaProps?h({},e.webCtaProps):void 0,i=t;return t&&Object.prototype.hasOwnProperty.call(i,"newTab")&&!t.openNewTab&&(t.openNewTab=i.newTab),t&&!t.openNewTab&&(t.openNewTab="false"),f(h({},e),{webCtaProps:t})}function Sz(e){if(!e||"true"!==e.getAttribute("data-mt-includeMarketingTile"))return null;let t=e.getAttribute("data-mt-marketingTileJson");if(!t)return null;try{return _z(JSON.parse(t))}catch(e){return console.error("Unable to parse marketing tile JSON",e),null}}function Cz(e){return!(!e||!e.backgroundImg&&!e.backgroundColor)}function Iz(e){return"true"===e?"_blank":"_self"}function Az(e){return vz(e?.backgroundImgAltText,e?.marketingTileTitle,e?.marketingTileSubtitle,e?.webCtaProps?.ctaText)}function kz(e,t="desktop"){return e?.iconBackgroundImage?function(e,t){let i=`$${gz}-icon-${t}$`;return`${bz(e)}?${i}`}(e.iconBackgroundImage,t):""}function xz(e){let t=e;return t?.querySelector?t.querySelector(hz):null}function Tz(e){let t=mz.get(e);t&&(t.element.removeEventListener("focus",t.handler),mz.delete(e))}function Pz(e){let t=function(e){let t=e;return t?.querySelectorAll?Array.from(t.querySelectorAll(fz)):[]}(e),i=t[t.length-1]??null;if(window.innerWidth>=768)return void Tz(e);if(t.forEach((e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")})),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden"),e.classList.contains("slick-active")||!e.nextElementSibling?.classList?.contains("slick-active")&&!e.previousElementSibling?.classList?.contains("slick-active"))return void Tz(e);let n=!!e.previousElementSibling?.classList?.contains("slick-active");!function(e,t,i){if(!t)return void Tz(e);let n=mz.get(e);if(n&&n.direction===i&&n.element===t)return;Tz(e);let r=function(e){return e.closest("#carousel-coupons, .carousel-content-wrapper")}(e);if(!r)return;let s=()=>
1{$(r).slick("next"===i?"slickNext":"slickPrev")};t.addEventListener("focus",s),mz.set(e,{direction:i,element:t,handler:s})}(e,n?xz(e):i??xz(e),n?"next":"prev")}function Ez(e,t){let i=e;if(!i?.querySelector)return null;let n=i.querySelector(`.slick-slide[data-slick-index="${t}"]`);return n?n.querySelector('.coupon-carousel-title [tabindex="0"], .coupon-carousel-title button, .coupon-carousel-title [href], .coupon-carousel-title, .pc__tap-zone, .pds-marketing-card__button, .pds-marketing-card__action-link, .pds-marketing-card__tag[role="button"]'):null}function Dz(e){let t=e;t?.querySelectorAll&&Array.from(t.querySelectorAll(".slick-slide")).forEach((e=>{let t=!!e.querySelector(uz),i=e.classList.contains(pz);!t||i?!t&&i&&e.classList.remove(pz):e.classList.add(pz)}))}function Oz(e){let t=e;t?.querySelectorAll&&Array.from(t.querySelectorAll(".slick-slide")).forEach((e=>{let t=e;t.classList.contains(pz)?Pz(t):Tz(t)}))}function Bz(e){if(typeof MutationObserver>"u")return Dz(e),Oz(e),null;let t=e;if(!t)return null;Dz(e),Oz(e);let i=new MutationObserver((()=>{Dz(e),Oz(e)}));return i.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),i}var Mz=e=>({"pds-marketing-card--left d-flex justify-content-center align-items-stretch w-100":e});function Rz(e,t){if(1&e&&Tf(0,"a",8),2&e){let e=Yf(2);zh("target",e.linkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.tapZoneAriaLabel)}}function Lz(e,t){if(1&e&&(kf(0,"div",15),am(1),xf()),2&e){let e=Yf(3);Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.eyebrow," ")}}function Fz(e,t){if(1&e&&(kf(0,"div",16)(1,"a",17),am(2),xf()()),2&e){let e=Yf(3);Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),zh("target",e.linkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.ctaAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText," ")}}function Nz(e,t){if(1&e&&(kf(0,"div",9)(1,"div",10),ph(2,Lz,2,3,"div",11),kf(3,"div",12),am(4),xf(),kf(5,"div",13),am(6),xf()(),ph(7,Fz,3,6,"div",14),xf()),2&e){let e=Yf(2);Vd(2),zh("ngIf",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.eyebrow),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileTitle," "),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileSubtitle," "),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText))}}function Uz(e,t){if(1&e&&Tf(0,"img",23),2&e){let e=Yf(3);zh("src",e.iconSrc,id)("alt",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.iconImageAltText)}}function Vz(e,t){if(1&e&&(kf(0,"a",24),am(1),xf()),2&e){let e=Yf(3);Hh("--cta-color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor)("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),zh("target",e.linkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.ctaAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText," ")}}function qz(e,t){if(1&e&&(kf(0,"div",18),ph(1,Uz,1,2,"img",19),kf(2,"div",20),am(3),xf(),kf(4,"div",21),am(5),xf(),ph(6,Vz,2,8,"a",22),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","icon"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.badgeSetupType)&&e.iconSrc),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileTitle," "),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileSubtitle," "),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText))}}function $z(e,t){if(1&e&&(kf(0,"div",27),am(1),xf()),2&e){let e=Yf(3);
1gh("aria-label",e.disclaimerAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerText," ")}}function jz(e,t){if(1&e&&(kf(0,"a",28),am(1),xf()),2&e){let e=Yf(3);zh("target",e.disclaimerTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink,id)("aria-label",e.disclaimerAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerText," ")}}function zz(e,t){if(1&e&&(Ef(0),ph(1,$z,2,2,"div",25)(2,jz,2,4,"a",26),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!(null!=e.normalizedMarketingTile&&null!=e.normalizedMarketingTile.webCtaProps&&e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink)),Vd(),zh("ngIf",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink)}}function Wz(e,t){if(1&e&&(kf(0,"div",1)(1,"div",2),ph(2,Rz,1,3,"a",3),kf(3,"div",4),ph(4,Nz,8,8,"div",5)(5,qz,7,8,"div",6)(6,zz,3,2,"ng-container",7),xf()()()),2&e){let e=Yf();Vd(),zh("ngClass",Om(6,Mz,e.isLeftAligned)),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink)),Vd(),zh("ngStyle",e.backgroundStyles),Vd(),zh("ngIf","imageOnly"!==(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.displayType)&&e.isLeftAligned),Vd(),zh("ngIf","imageOnly"!==(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.displayType)&&!e.isLeftAligned),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&"true"===(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.showDisclaimer))}}var Hz=(()=>{class e{constructor(){this.marketingTile=null,this.normalizedMarketingTile=null,this.viewportDeviceType=wz()}ngOnChanges(){this.normalizedMarketingTile=_z(this.marketingTile)}onResize(e){this.viewportDeviceType=wz(e)}get shouldRender(){return Cz(this.normalizedMarketingTile)}get backgroundStyles(){return function(e,t="desktop"){if(!e)return{};switch(e.displayType){case"imageOnly":return e.backgroundImg?{"background-image":`url(${yz(e.backgroundImg,t)})`}:{};case"colorTextPlate":case"transparentTextPlate":return e.backgroundImg?{"background-image":`url(${yz(e.backgroundImg,t)})`}:e.backgroundColor?{"background-color":e.backgroundColor}:{};default:return{}}}(this.normalizedMarketingTile,this.viewportDeviceType)}get isLeftAligned(){return"left"===this.normalizedMarketingTile?.alignment}get linkTarget(){return Iz(this.normalizedMarketingTile?.webCtaProps?.openNewTab)}get disclaimerTarget(){return Iz(this.normalizedMarketingTile?.webCtaProps?.disclaimerExternalBrowser)}get tapZoneAriaLabel(){return Az(this.normalizedMarketingTile)}get ctaAriaLabel(){return function(e){return vz(e?.webCtaProps?.ctaAltText,e?.webCtaProps?.ctaText,e?.marketingTileTitle,Az(e))}(this.normalizedMarketingTile)}get disclaimerAriaLabel(){return function(e){return vz(e?.webCtaProps?.disclaimerAltText,e?.webCtaProps?.disclaimerText,e?.marketingTileTitle)}(this.normalizedMarketingTile)}get iconSrc(){return kz(this.normalizedMarketingTile,this.viewportDeviceType)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["marketing-card"]],hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e.target.innerWidth)}),0,od)},inputs:{marketingTile:"marketingTile"},features:[ga],decls:1,vars:1,consts:[["class","marketing-card-slide h-100 d-flex",4,"ngIf"],[1,"marketing-card-slide","h-100","d-flex"],[1,"pds-marketing-card","full-height","position-relative",3,"ngClass"],["class","w-100 h-100 position-absolute pc__tap-zone coupon-carousel-title",3,"target",4,"ngIf"],[1,"pds-marketing-card__background","full-height",3,"ngStyle"],["class","pds-marketing-card__text-plate d-flex flex-column justify-content-end align-items-start w-100",4,"ngIf"],["class","pds-marketing-card__text-plate",4,"ngIf"],[4,"ngIf"],[1,"w-100","h-100","position-absolute","pc__tap-zone","coupon-carousel-title",3,"target"],[1,"pds-marketing-card__text-plate","d-flex","flex-column","justify-content-end","align-items-start","w-100"],[1,"pds-marketing-card__text","d-flex","flex-column","align-items-start"],["class","pds-marketing-card__eyebrow eyebrow-m text-start",3,"color",4,"ngIf"],[1,"pds-marketing-card__heading-left","heading-xxs","text-start"],[1,"pds-marketing-card__desc-left","text-s","text-start","mt-0"],["class","pds-marketing-card__pds-link d-flex align-items-start",4,"ngIf"],[1,"pds-marketing-card__eyebrow","eyebrow-m","text-start"],[1,"pds-marketing-card__pds-link","d-flex","align-items-start"],[1,"pds-marketing-card__action-link","link-s","align-self-start",3,"target"],[1,"pds-marketing-card__text-plate"],["class","pds-marketing-card__image",3,"src","alt",4,"ngIf"],[1,"pds-marketing-card__heading","poppins"],[1,"pds-marketing-card__desc","nunito-sans"],["class","pds-marketing-card__button pds-btn pds-btn-size__small pds-btn-outlined--neutral d-flex align-items-center justify-content-center","role","button",3,"--cta-color","color","target",4,"ngIf"],[1,"pds-marketing-card__image",3,"src","alt"],["role","button",1,"pds-marketing-card__button","pds-btn","pds-btn-size__small","pds-btn-outlined--neutral","d-flex","align-items-center","justify-content-center",3,"target"],["class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent","tabindex","0",4,"ngIf"],["class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent pds-tag-interactive","role","button",3,"target",4,"ngIf"],["tabindex","0",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent"],["role","button",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent","pds-tag-interactive",3,"target"]],template:function(e,t){1&e&&ph(0,Wz,7,8,"div",0),2&e&&zh("ngIf",t.shouldRender)},dependencies:[sy,cy,gy],styles:["[_nghost-%COMP%]{display:block;height:100%}.marketing-card-slide[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;gap:var(--pds-global-space-0, 0);height:232px;justify-content:center;max-width:var(--pds-global-size-height-max_h-2300, 256px);min-width:var(--pds-global-size-width-min_w-1400, 140px);padding:0 var(--pds-global-space-600, 24px);width:176px}.pds-marketing-card[_ngcontent-%COMP%]{height:232px;max-height:232px;min-height:232px;padding-left:0;width:100%}.pds-marketing-card__background[_ngcontent-%COMP%], .pds-marketing-card--left[_ngcontent-%COMP%] .pds-marketing-card__background[_ngcontent-%COMP%]{background-position:center;background-repeat:no-repeat;background-size:cover;height:232px;max-height:232px;min-height:232px;width:100%}.pds-marketing-card--left[_ngcontent-%COMP%] .pds-marketing-card__text-plate[_ngcontent-%COMP%]{height:192px}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]{z-index:1}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]:focus{outline-offset:-3px}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:hover{border:1px solid var(--cta-color, #1f1e1e)!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:focus{outline:2px solid var(--cta-color, #535250)!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag[_ngcontent-%COMP%]{z-index:5}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%]:hover{text-decoration:underline!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__action-link[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__action-link[_ngcontent-%COMP%]:hover{text-decoration-style:solid}"]})}}return e})(),Yz=(()=>{class e{static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[fF,FE,mP,SE,$E,jE,a$,Ev(Ov())],imports:[Ly,uw,uC,pC,PV,x$,q$,Z$,s$.forRoot()]})}}return e})();Em(hD,(function(){return[cy,by,gy,r$,AD,gL,BL,$L,tL,XL,pF,uF,fL]}),[]),Em(iM,(function(){return[cy,nj,fj,mj]}),[]);var Gz=["*"];function Kz(e,t){1&e&&Of(0)}function Qz(e,t){if(1&e&&(kf(0,"bar",3),Qf(1),xf()),2&e){let e=Yf();zh("type",e.type)("value",e._value)("max",e.max)("animate",e.animate)("striped",e.striped)}}function Jz(e,t){if(1&e&&(kf(0,"bar",3),am(1),xf()),2&e){let e=t.$implicit,i=Yf(2);zh("type",e.type)("value",e.value)("max",e.max||i.max)("animate",i.animate)("striped",i.striped),Vd(),lm(e.label)}}function Zz(e,t){if(1&e&&ph(0,Jz,2,6,"bar",4),2&e){zh("ngForOf",Yf()._values)}}var Xz=(()=>{class e{constructor(e,t){this.el=e,this.renderer=t,this.max=100,this.value=0,this.animate=!1,this.striped=!1,this.type="info",this.percent=100}ngOnChanges(e){(e.value||e.max)&&(this.percent=Number(e.value?.currentValue||this.value)/Number(e.max?.currentValue||this.max||100)*100),e.type&&this.applyTypeClasses()}
1applyTypeClasses(){if(this._prevType){let e=`progress-bar-${this._prevType}`,t=`bg-${this._prevType}`;this.renderer.removeClass(this.el.nativeElement,e),this.renderer.removeClass(this.el.nativeElement,t),this._prevType=void 0}if(this.type){let e=`progress-bar-${this.type}`,t=`bg-${this.type}`;this.renderer.addClass(this.el.nativeElement,e),this.renderer.addClass(this.el.nativeElement,t),this._prevType=this.type}}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["bar"]],hostAttrs:["role","progressbar","aria-valuemin","0"],hostVars:13,hostBindings:function(e,t){2&e&&(gh("aria-valuenow",t.value)("aria-valuetext",t.percent?t.percent.toFixed(0)+"%":"")("aria-valuemax",t.max),Hh("height","100","%")("width",t.percent,"%"),Yh("progress-bar",!0)("progress-bar-animated",t.animate)("progress-bar-striped",t.striped))},inputs:{max:"max",value:"value",animate:"animate",striped:"striped",type:"type"},standalone:!0,features:[ga,Pm],ngContentSelectors:Gz,decls:1,vars:0,template:function(e,t){1&e&&(Kf(),Qf(0))},encapsulation:2,changeDetection:0})}}return e})(),eW=(()=>{class e{constructor(){this.animate=!1,this.max=100}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),tW=(()=>{class e{set value(e){this.isStacked=Array.isArray(e),"number"==typeof e?(this._value=e,this._values=void 0):(this._value=void 0,this._values=e)}constructor(e){this.max=100,this.animate=!1,this.striped=!1,this.isStacked=!1,this._value=0,Object.assign(this,e)}static{this.ɵfac=function(t){return new(t||e)($d(eW))}}static{this.ɵcmp=Qr({type:e,selectors:[["progressbar"]],hostVars:3,hostBindings:function(e,t){2&e&&(gh("max",t.max),Yh("progress",!0))},inputs:{max:"max",animate:"animate",striped:"striped",type:"type",value:"value"},standalone:!0,features:[Pm],ngContentSelectors:Gz,decls:5,vars:3,consts:[["NotStacked",""],["Stacked",""],[4,"ngIf","ngIfThen","ngIfElse"],[3,"type","value","max","animate","striped"],[3,"type","value","max","animate","striped",4,"ngFor","ngForOf"]],template:function(e,t){if(1&e&&(Kf(),ph(0,Kz,1,0,"ng-container",2)(1,Qz,2,5,"ng-template",null,0,Wm)(3,Zz,1,1,"ng-template",null,1,Wm)),2&e){let e=sm(2),i=sm(4);zh("ngIf",!t.isStacked)("ngIfThen",e)("ngIfElse",i)}},dependencies:[cy,Xz,oy],styles:["[_nghost-%COMP%]{width:100%;display:flex}"],changeDetection:0})}}return e})(),iW=(()=>{class e{static forRoot(){return{ngModule:e,providers:[]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({})}}return e})();function nW(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function rW(e){return"string"==typeof e}function sW(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function aW(e){return e&&e.getTime&&!isNaN(e.getTime())}function oW(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function lW(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function cW(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function dW(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function uW(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function pW(e){return void 0===e}function hW(e){let t=+e,i=0;return 0!==t&&isFinite(t)&&(i=nW(t)),i}var fW={},mW={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function gW(e,t){let i=e.toLowerCase(),n=e;i in mW&&(n=mW[i]),fW[i]=fW[`${i}s`]=fW[t]=n}function bW(e){return rW(e)?fW[e]||fW[e.toLowerCase()]:void 0}var yW=0,vW=1,wW=2,_W=3,SW=4,CW=5,IW=6,AW=7,kW=8;function xW(e,t,i){let n=`${Math.abs(e)}`,r=t-n.length;return(e>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}var TW={},PW={},EW=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function DW(e,t,i,n){e&&(PW[e]=n),t&&(PW[t[0]]=function(){return xW(n.apply(null,arguments),t[1],t[2])}),i&&(PW[i]=function(t,i){return i.locale.ordinal(n.apply(null,arguments),e)})}function OW(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function BW(e,t,i){let n=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(n.getUTCFullYear())&&n.setUTCFullYear(e),n}function MW(e,t=0,i=1,n=0,r=0,s=0,a=0){let o=new Date(e,t,i,n,r,s,a);return e<100&&e>=0&&isFinite(o.getFullYear())&&o.setFullYear(e),o}function RW(e,t=!1){return t?e.getUTCHours():e.getHours()}
1function LW(e,t=!1){return t?e.getUTCMinutes():e.getMinutes()}function FW(e,t=!1){return t?e.getUTCSeconds():e.getSeconds()}function NW(e,t=!1){return t?e.getUTCMilliseconds():e.getMilliseconds()}function UW(e,t=!1){return t?e.getUTCDay():e.getDay()}function VW(e,t=!1){return t?e.getUTCDate():e.getDate()}function qW(e,t=!1){return t?e.getUTCMonth():e.getMonth()}function $W(e,t=!1){return t?e.getUTCFullYear():e.getFullYear()}function jW(e,t){return!(!e||!t)&&(zW(e,t)&&qW(e)===qW(t))}function zW(e,t){return!(!e||!t)&&$W(e)===$W(t)}function WW(e,t){return!(!e||!t)&&(zW(e,t)&&jW(e,t)&&VW(e)===VW(t))}var HW=/\d/,YW=/\d\d/,GW=/\d{3}/,KW=/\d{4}/,QW=/[+-]?\d{6}/,JW=/\d\d?/,ZW=/\d\d\d\d?/,XW=/\d\d\d\d\d\d?/,eH=/\d{1,3}/,tH=/\d{1,4}/,iH=/[+-]?\d{1,6}/,nH=/\d+/,rH=/[+-]?\d+/,sH=/Z|[+-]\d\d(?::?\d\d)?/gi,aH=/[+-]?\d+(\.\d{1,3})?/,oH=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lH={};function cH(e,t,i){oW(t)?lH[e]=t:lH[e]=function(e,n){return e&&i?i:t}}function dH(e,t){return dW(lH,e)?lH[e](!1,t):new RegExp(function(e){return uH(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,((e,t,i,n,r)=>t||i||n||r)))}(e))}function uH(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pH={};function hH(e,t){let i=rW(e)?[e]:e,n=t;if(lW(t)&&(n=function(e,i,n){return i[t]=hW(e),n}),cW(i)&&oW(n)){let e;for(e=0;e<i.length;e++)pH[i[e]]=n}}function fH(e,t){hH(e,(function(e,i,n,r){return n._w=n._w||{},t(e,n._w,n,r)}))}function mH(e,t,i){return null!=t&&dW(pH,e)&&pH[e](t,i._a,i,e),i}var gH={};function bH(e,t){gH[e]=t}function yH(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function vH(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():$W(e,t.isUTC).toString()}function wH(e){return hW(e)+(hW(e)>68?1900:2e3)}function _H(e){return SH(e)?366:365}function SH(e){return e%4==0&&e%100!=0||e%400==0}function CH(e,t){if(isNaN(e)||isNaN(t))return NaN;let i=function(e,t){return(e%t+t)%t}(t,12);return 1===i?SH(e+(t-i)/12)?29:28:31-i%7%2}var IH={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function AH(e,t){let i=Object.assign({},IH,t),n=e.getFullYear()+(i.year||0),r=e.getMonth()+(i.month||0),s=e.getDate()+(i.day||0);return i.month&&!i.day&&(s=Math.min(s,CH(n,r))),MW(n,r,s,e.getHours()+(i.hour||0),e.getMinutes()+(i.minute||0),e.getSeconds()+(i.seconds||0))}function kH(e,t){return lW(t)?t:e}function xH(e,t,i){let n=Math.min(VW(e),CH($W(e),t));return i?e.setUTCMonth(t,n):e.setMonth(t,n),e}function TH(e,t,i){return i?e.setUTCDate(t):e.setDate(t),e}function PH(e){return new Date(e.getTime())}function EH(e,t,i){let n=PH(e);switch(t){case"year":xH(n,0,i);case"quarter":case"month":TH(n,1,i);case"week":case"isoWeek":case"day":case"date":!function(e,t,i){i?e.setUTCHours(t):e.setHours(t)}(n,0,i);case"hours":!function(e,t,i){i?e.setUTCMinutes(t):e.setMinutes(t)}(n,0,i);case"minutes":!function(e,t,i){i?e.setUTCSeconds(t):e.setSeconds(t)}(n,0,i);case"seconds":!function(e,t,i){i?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(n,0,i)}return"week"===t&&function(e,t,i={}){let n=mG(e,i.locale,i.isUTC);uG(e,t-n,"day")}(n,0,{isUTC:i}),"isoWeek"===t&&function(e,t,i={}){let n=function(e,t=mY()){return rW(e)?t.weekdaysParse(e)%7||7:lW(e)&&isNaN(e)?null:e}(t,i.locale);hG(e,fG(e)%7?n:n-7)}(n,1),"quarter"===t&&xH(n,3*Math.floor(qW(n,i)/3),i),n}function DH(e,t,i){let n=t;return"date"===n&&(n="day"),function(e,t,i,n){let r=lG(t,i);return pG(e,r,-1,n)}(uG(EH(e,n,i),1,"isoWeek"===n?"week":n,i),1,"milliseconds",i)}function OH(e,t){let i=+EH(e,"day",t)-+EH(e,"year",t);return Math.round(i/864e5)+1}function BH(e,t,i){let n=t-i+7;return-(BW(e,0,n).getUTCDay()-t+7)%7+n-1}function MH(e,t,i,n){let r,s,a=BH($W(e,n),t,i),o=Math.floor((OH(e,n)-a-1)/7)+1;return o<1?(s=$W(e,n)-1,r=o+RH(s,t,i)):o>RH($W(e,n),t,i)?(r=o-RH($W(e,n),t,i),s=$W(e,n)+1):(s=$W(e,n),r=o),{week:r,year:s}}function RH(e,t,i){let n=BH(e,t,i),r=BH(e+1,t,i);return(_H(e)-n+r)/7}var LH=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,FH="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),NH="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),UH="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),VH="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qH="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$H={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},jH=oH,zH=oH,WH=class{constructor(e){e&&this.set(e)}set(e){let t;for(t in e){if(!e.hasOwnProperty(t))continue;let i=e[t];this[oW(i)?t:`_${t}`]=i}this._config=e}calendar(e,t,i){let n=this._calendar[e]||this._calendar.sameElse;return oW(n)?n.call(null,t,i):n}longDateFormat(e){let t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])}get invalidDate(){return this._invalidDate}set invalidDate(e){this._invalidDate=e}ordinal(e,t){return this._ordinal.replace("%d",e.toString(10))}preparse(e,t){return e}getFullYear(e,t=!1){return $W(e,t)}postformat(e){return e}relativeTime(e,t,i,n){let r=this._relativeTime[i];return oW(r)?r(e,t,i,n):r.replace(/%d/i,e.toString(10))}pastFuture(e,t){let i=this._relativeTime[e>0?"future":"past"];return oW(i)?i(t):i.replace(/%s/i,t)}months(e,t,i=!1){if(!e)return cW(this._months)?this._months:this._months.standalone;if(cW(this._months))return this._months[qW(e,i)];let n=(this._months.isFormat||LH).test(t)?"format":"standalone";return this._months[n][qW(e,i)]}monthsShort(e,t,i=!1){if(!e)return cW(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;if(cW(this._monthsShort))return this._monthsShort[qW(e,i)];let n=LH.test(t)?"format":"standalone";return this._monthsShort[n][qW(e,i)]}monthsParse(e,t,i){let n,r,s;if(this._monthsParseExact)return this.handleMonthStrictParse(e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(n=new Date(Date.UTC(2e3,s)),i&&!this._longMonthsParse[s]){let e=this.months(n,"",!0).replace(".",""),t=this.monthsShort(n,"",!0).replace(".","");this._longMonthsParse[s]=new RegExp(`^${e}$`,"i"),this._shortMonthsParse[s]=new RegExp(`^${t}$`,"i")}if(!i&&!this._monthsParse[s]&&(r=`^${this.months(n,"",!0)}|^${this.monthsShort(n,"",!0)}`,this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[s].test(e)||i&&"MMM"===t&&this._shortMonthsParse[s].test(e)||!i&&this._monthsParse[s].test(e))return s}}monthsRegex(e){return this._monthsParseExact?(dW(this,"_monthsRegex")||this.computeMonthsParse(),e?this._monthsStrictRegex:this._monthsRegex):(dW(this,"_monthsRegex")||(this._monthsRegex=zH),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}monthsShortRegex(e){return this._monthsParseExact?(dW(this,"_monthsRegex")||this.computeMonthsParse(),e?this._monthsShortStrictRegex:this._monthsShortRegex):(dW(this,"_monthsShortRegex")||(this._monthsShortRegex=jH),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}week(e,t){return MH(e,this._week.dow,this._week.doy,t).week}firstDayOfWeek(){return this._week.dow}firstDayOfYear(){return this._week.doy}weekdays(e,t,i){if(!e)return cW(this._weekdays)?this._weekdays:this._weekdays.standalone;if(cW(this._weekdays))return this._weekdays[UW(e,i)];let n=this._weekdays.isFormat.test(t)?"format":"standalone";return this._weekdays[n][UW(e,i)]}weekdaysMin(e,t,i){return e?this._weekdaysMin[UW(e,i)]:this._weekdaysMin}weekdaysShort(e,t,i){return e?this._weekdaysShort[UW(e,i)]:this._weekdaysShort}weekdaysParse(e,t,i){let n,r;if(this._weekdaysParseExact)return this.handleWeekStrictParse(e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){let s=hG(new Date(Date.UTC(2e3,1)),n,null,!0);if(i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp(`^${this.weekdays(s,"",!0).replace(".",".?")}$`,"i"),this._shortWeekdaysParse[n]=new RegExp(`^${this.weekdaysShort(s,"",!0).replace(".",".?")}$`,"i"),this._minWeekdaysParse[n]=new RegExp(`^${this.weekdaysMin(s,"",!0).replace(".",".?")}$`,"i")),this._weekdaysParse[n]||(r=`^${this.weekdays(s,"",!0)}|^${this.weekdaysShort(s,"",!0)}|^${this.weekdaysMin(s,"",!0)}`,this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),!(cW(this._fullWeekdaysParse)&&cW(this._shortWeekdaysParse)&&cW(this._minWeekdaysParse)&&cW(this._weekdaysParse)))return;if(i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}}weekdaysRegex(e){return this._weekdaysParseExact?(dW(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dW(this,"_weekdaysRegex")||(this._weekdaysRegex=oH),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}weekdaysShortRegex(e){return this._weekdaysParseExact?(dW(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dW(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=oH),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}weekdaysMinRegex(e){return this._weekdaysParseExact?(dW(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dW(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=oH),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}isPM(e){return"p"===e.toLowerCase().charAt(0)}meridiem(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}formatLongDate(e){this._longDateFormat=this._longDateFormat?this._longDateFormat:$H;let t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,(e=>e.slice(1))),this._longDateFormat[e])}handleMonthStrictParse(e,t,i){let n,r,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=new Date(2e3,n),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?(r=this._shortMonthsParse.indexOf(a),-1!==r?r:null):(r=this._longMonthsParse.indexOf(a),-1!==r?r:null):"MMM"===t?(r=this._shortMonthsParse.indexOf(a),-1!==r?r:(r=this._longMonthsParse.indexOf(a),-1!==r?r:null)):(r=this._longMonthsParse.indexOf(a),-1!==r?r:(r=this._shortMonthsParse.indexOf(a),-1!==r?r:null))}handleWeekStrictParse(e,t,i){let n,r=e.toLocaleLowerCase();if(!this._weekdaysParse){let e;for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],e=0;e<7;++e){let t=hG(new Date(Date.UTC(2e3,1)),e,null,!0);this._minWeekdaysParse[e]=this.weekdaysMin(t).toLocaleLowerCase(),this._shortWeekdaysParse[e]=this.weekdaysShort(t).toLocaleLowerCase(),this._weekdaysParse[e]=this.weekdays(t,"").toLocaleLowerCase()}}if(cW(this._weekdaysParse)&&cW(this._shortWeekdaysParse)&&cW(this._minWeekdaysParse))return i?"dddd"===t?(n=this._weekdaysParse.indexOf(r),-1!==n?n:null):"ddd"===t?(n=this._shortWeekdaysParse.indexOf(r),-1!==n?n:null):(n=this._minWeekdaysParse.indexOf(r),-1!==n?n:null):"dddd"===t?(n=this._weekdaysParse.indexOf(r),-1!==n||(n=this._shortWeekdaysParse.indexOf(r),-1!==n)?n:(n=this._minWeekdaysParse.indexOf(r),-1!==n?n:null)):"ddd"===t?(n=this._shortWeekdaysParse.indexOf(r),-1!==n||(n=this._weekdaysParse.indexOf(r),-1!==n)?n:(n=this._minWeekdaysParse.indexOf(r),-1!==n?n:null)):(n=this._minWeekdaysParse.indexOf(r),-1!==n||(n=this._weekdaysParse.indexOf(r),-1!==n)?n:(n=this._shortWeekdaysParse.indexOf(r),-1!==n?n:null))}computeMonthsParse(){let e,t,i=[],n=[],r=[];for(t=0;t<12;t++)e=new Date(2e3,t),i.push(this.monthsShort(e,"")),n.push(this.months(e,"")),r.push(this.months(e,"")),r.push(this.monthsShort(e,""));for(i.sort(HH),n.sort(HH),r.sort(HH),t=0;t<12;t++)i[t]=uH(i[t]),n[t]=uH(n[t]);for(t=0;t<24;t++)r[t]=uH(r[t]);this._monthsRegex=new RegExp(`^(${r.join("|")})`,"i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(`^(${n.join("|")})`,"i"),this._monthsShortStrictRegex=new RegExp(`^(${i.join("|")})`,"i")}computeWeekdaysParse(){let e,t=[],i=[],n=[],r=[];for(e=0;e<7;e++){let s=hG(new Date(Date.UTC(2e3,1)),e,null,!0),a=this.weekdaysMin(s),o=this.weekdaysShort(s),l=this.weekdays(s);t.push(a),i.push(o),n.push(l),r.push(a),r.push(o),r.push(l)}for(t.sort(HH),i.sort(HH),n.sort(HH),r.sort(HH),e=0;e<7;e++)i[e]=uH(i[e]),n[e]=uH(n[e]),r[e]=uH(r[e]);this._weekdaysRegex=new RegExp(`^(${r.join("|")})`,"i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(`^(${n.join("|")})`,"i"),this._weekdaysShortStrictRegex=new RegExp(`^(${i.join("|")})`,"i"),this._weekdaysMinStrictRegex=new RegExp(`^(${t.join("|")})`,"i")}};function HH(e,t){return t.length-e.length}var YH={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:$H,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:FH,monthsShort:NH,week:{dow:0,doy:6},weekdays:UH,weekdaysMin:qH,weekdaysShort:VH,meridiemParse:/[ap]\.?m?\.?/i};function GH(e,t,i){let n,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<r;n++)(i&&e[n]!==t[n]||!i&&hW(e[n])!==hW(t[n]))&&a++;return a+s}function KH(){DW("w",["ww",2,!1],"wo",(function(e,t){return QH(e,t.locale).toString(10)})),DW("W",["WW",2,!1],"Wo",(function(e){return function(e,t){return MH(e,1,4,t).week}(e).toString(10)})),gW("week","w"),gW("isoWeek","W"),bH("week",5),bH("isoWeek",5),cH("w",JW),cH("ww",JW,YW),cH("W",JW),cH("WW",JW,YW),fH(["w","ww","W","WW"],(function(e,t,i,n){return t[n.substr(0,1)]=hW(e),i}))}function QH(e,t=mY(),i){return t.week(e,i)}function JH(e,t){DW(null,[e,e.length,!1],null,t)}function ZH(e,t){return eY(e,t.locale).toString()}function XH(e){return tY(e).toString()}function eY(e,t=mY(),i){return MH(e,t.firstDayOfWeek(),t.firstDayOfYear(),i).year}function tY(e,t){return MH(e,1,4,t).year}function iY(){DW("X",null,null,(function(e){return function(e){return Math.floor(e.valueOf()/1e3)}(e).toString(10)})),DW("x",null,null,(function(e){return e.valueOf().toString(10)})),cH("x",rH),cH("X",aH),hH("X",(function(e,t,i){return i._d=new Date(1e3*parseFloat(e)),i})),hH("x",(function(e,t,i){return i._d=new Date(hW(e)),i}))}function nY(){DW("Q",null,"Qo",(function(e,t){return function(e,t=!1){return Math.ceil((qW(e,t)+1)/3)}(e,t.isUTC).toString(10)})),gW("quarter","Q"),bH("quarter",7),cH("Q",HW),hH("Q",(function(e,t,i){return t[vW]=3*(hW(e)-1),i}))}function rY(e,t){DW(e,null,null,(function(e,i){let n=function(e,t={}){let i=t._offset||0;
1return t._isUTC?i:function(e){return 15*-Math.round(e.getTimezoneOffset()/15)}(e)}(e,{_isUTC:i.isUTC,_offset:i.offset}),r="+";return n<0&&(n=-n,r="-"),r+xW(~~(n/60),2)+t+xW(~~n%60,2)}))}function sY(){rY("Z",":"),rY("ZZ",""),cH("Z",sH),cH("ZZ",sH),hH(["Z","ZZ"],(function(e,t,i){return i._useUTC=!0,i._tzm=function(e,t){let i=(t||"").match(e);if(null===i)return null;let n=i[i.length-1].match(aY)||["-","0","0"],r=60*parseInt(n[1],10)+hW(n[2]),s="+"===n[0]?r:-r;return 0===r?0:s}(sH,e),i}))}var aY=/([\+\-]|\d\d)/gi;function oY(){function e(e,t){return RW(e,t)%12||12}function t(e,t){DW(e,null,null,(function(e,i){return i.locale.meridiem(RW(e,i.isUTC),LW(e,i.isUTC),t)}))}function i(e,t){return t._meridiemParse}DW("H",["HH",2,!1],null,(function(e,t){return RW(e,t.isUTC).toString(10)})),DW("h",["hh",2,!1],null,(function(t,i){return e(t,i.isUTC).toString(10)})),DW("k",["kk",2,!1],null,(function(e,t){return function(e,t){return RW(e,t)||24}(e,t.isUTC).toString(10)})),DW("hmm",null,null,(function(t,i){return`${e(t,i.isUTC)}${xW(LW(t,i.isUTC),2)}`})),DW("hmmss",null,null,(function(t,i){return`${e(t,i.isUTC)}${xW(LW(t,i.isUTC),2)}${xW(FW(t,i.isUTC),2)}`})),DW("Hmm",null,null,(function(e,t){return`${RW(e,t.isUTC)}${xW(LW(e,t.isUTC),2)}`})),DW("Hmmss",null,null,(function(e,t){return`${RW(e,t.isUTC)}${xW(LW(e,t.isUTC),2)}${xW(FW(e,t.isUTC),2)}`})),t("a",!0),t("A",!1),gW("hour","h"),bH("hour",13),cH("a",i),cH("A",i),cH("H",JW),cH("h",JW),cH("k",JW),cH("HH",JW,YW),cH("hh",JW,YW),cH("kk",JW,YW),cH("hmm",ZW),cH("hmmss",XW),cH("Hmm",ZW),cH("Hmmss",XW),hH(["H","HH"],_W),hH(["k","kk"],(function(e,t,i){let n=hW(e);return t[_W]=24===n?0:n,i})),hH(["a","A"],(function(e,t,i){return i._isPm=i._locale.isPM(e),i._meridiem=e,i})),hH(["h","hh"],(function(e,t,i){return t[_W]=hW(e),yH(i).bigHour=!0,i})),hH("hmm",(function(e,t,i){let n=e.length-2;return t[_W]=hW(e.substr(0,n)),t[SW]=hW(e.substr(n)),yH(i).bigHour=!0,i})),hH("hmmss",(function(e,t,i){let n=e.length-4,r=e.length-2;return t[_W]=hW(e.substr(0,n)),t[SW]=hW(e.substr(n,2)),t[CW]=hW(e.substr(r)),yH(i).bigHour=!0,i})),hH("Hmm",(function(e,t,i){let n=e.length-2;return t[_W]=hW(e.substr(0,n)),t[SW]=hW(e.substr(n)),i})),hH("Hmmss",(function(e,t,i){let n=e.length-4,r=e.length-2;return t[_W]=hW(e.substr(0,n)),t[SW]=hW(e.substr(n,2)),t[CW]=hW(e.substr(r)),i}))}var lY,cY={},dY={};function uY(e){return e&&e.toLowerCase().replace("_","-")}function pY(e){return cY[e]||console.error(`Khronos locale error: please load locale "${e}" before using it`),cY[e]}function hY(e,t){let i;return e&&(pW(t)?i=mY(e):rW(e)&&(i=fY(e,t)),i&&(lY=i)),lY&&lY._abbr}function fY(e,t){if(null===t)return delete cY[e],lY=mY("en"),null;if(!t)return;let i=YH;if(t.abbr=e,null!=t.parentLocale){if(null==cY[t.parentLocale])return dY[t.parentLocale]||(dY[t.parentLocale]=[]),dY[t.parentLocale].push({name:e,config:t}),null;i=cY[t.parentLocale]._config}return cY[e]=new WH(function(e,t){let i=Object.assign({},e);for(let n in t)dW(t,n)&&(uW(e[n])&&uW(t[n])?(i[n]={},Object.assign(i[n],e[n]),Object.assign(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(let n in e)dW(e,n)&&!dW(t,n)&&uW(e[n])&&(i[n]=Object.assign({},i[n]));return i}(i,t)),dY[e]&&dY[e].forEach((function(e){fY(e.name,e.config)})),hY(e),cY[e]}function mY(e){if(cY.en||(hY("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal(e){let t=e%10;return e+(1===hW(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),KH(),DW(null,["gg",2,!1],null,(function(e,t){return(eY(e,t.locale)%100).toString()})),DW(null,["GG",2,!1],null,(function(e){return(tY(e)%100).toString()})),JH("gggg",ZH),JH("ggggg",ZH),JH("GGGG",XH),JH("GGGGG",XH),gW("weekYear","gg"),gW("isoWeekYear","GG"),bH("weekYear",1),bH("isoWeekYear",1),cH("G",rH),cH("g",rH),cH("GG",JW,YW),cH("gg",JW,YW),cH("GGGG",tH,KW),cH("gggg",tH,KW),cH("GGGGG",iH,QW),cH("ggggg",iH,QW),fH(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){return t[n.substr(0,2)]=hW(e),i})),fH(["gg","GG"],(function(e,t,i,n){return t[n]=wH(e),i})),DW("Y",null,null,(function(e,t){let i=$W(e,t.isUTC);return i<=9999?i.toString(10):`+${i}`})),DW(null,["YY",2,!1],null,(function(e,t){return($W(e,t.isUTC)%100).toString(10)})),DW(null,["YYYY",4,!1],null,vH),DW(null,["YYYYY",5,!1],null,vH),DW(null,["YYYYYY",6,!0],null,vH),gW("year","y"),bH("year",1),cH("Y",rH),cH("YY",JW,YW),cH("YYYY",tH,KW),cH("YYYYY",iH,QW),cH("YYYYYY",iH,QW),hH(["YYYYY","YYYYYY"],yW),hH("YYYY",(function(e,t,i){return t[yW]=2===e.length?wH(e):hW(e),i})),hH("YY",(function(e,t,i){return t[yW]=wH(e),i})),hH("Y",(function(e,t,i){return t[yW]=parseInt(e,10),i})),DW("z",null,null,(function(e,t){return t.isUTC?"UTC":""})),DW("zz",null,null,(function(e,t){return t.isUTC?"Coordinated Universal Time":""})),iY(),DW("s",["ss",2,!1],null,(function(e,t){return FW(e,t.isUTC).toString(10)})),gW("second","s"),bH("second",15),cH("s",JW),cH("ss",JW,YW),hH(["s","ss"],CW),nY(),sY(),DW("M",["MM",2,!1],"Mo",(function(e,t){return(qW(e,t.isUTC)+1).toString(10)})),DW("MMM",null,null,(function(e,t){return t.locale.monthsShort(e,t.format,t.isUTC)})),DW("MMMM",null,null,(function(e,t){return t.locale.months(e,t.format,t.isUTC)})),gW("month","M"),bH("month",8),cH("M",JW),cH("MM",JW,YW),cH("MMM",(function(e,t){return t.monthsShortRegex(e)})),cH("MMMM",(function(e,t){return t.monthsRegex(e)})),hH(["M","MM"],(function(e,t,i){return t[vW]=hW(e)-1,i})),hH(["MMM","MMMM"],(function(e,t,i,n){let r=i._locale.monthsParse(e,n,i._strict);return null!=r?t[vW]=r:yH(i).invalidMonth=!!e,i})),DW("m",["mm",2,!1],null,(function(e,t){return LW(e,t.isUTC).toString(10)})),gW("minute","m"),bH("minute",14),cH("m",JW),cH("mm",JW,YW),hH(["m","mm"],SW),function(){let e;for(DW("S",null,null,(function(e,t){return(~~(NW(e,t.isUTC)/100)).toString(10)})),DW(null,["SS",2,!1],null,(function(e,t){return(~~(NW(e,t.isUTC)/10)).toString(10)})),DW(null,["SSS",3,!1],null,(function(e,t){return NW(e,t.isUTC).toString(10)})),DW(null,["SSSS",4,!1],null,(function(e,t){return(10*NW(e,t.isUTC)).toString(10)})),DW(null,["SSSSS",5,!1],null,(function(e,t){return(100*NW(e,t.isUTC)).toString(10)})),DW(null,["SSSSSS",6,!1],null,(function(e,t){return(1e3*NW(e,t.isUTC)).toString(10)})),DW(null,["SSSSSSS",7,!1],null,(function(e,t){return(1e4*NW(e,t.isUTC)).toString(10)})),DW(null,["SSSSSSSS",8,!1],null,(function(e,t){return(1e5*NW(e,t.isUTC)).toString(10)})),DW(null,["SSSSSSSSS",9,!1],null,(function(e,t){return(1e6*NW(e,t.isUTC)).toString(10)})),gW("millisecond","ms"),bH("millisecond",16),cH("S",eH,HW),cH("SS",eH,YW),cH("SSS",eH,GW),e="SSSS";e.length<=9;e+="S")cH(e,nH);function t(e,t,i){return t[IW]=hW(1e3*parseFloat(`0.${e}`)),i}for(e="S";e.length<=9;e+="S")hH(e,t)}(),oY(),DW("DDD",["DDDD",3,!1],"DDDo",(function(e){return OH(e).toString(10)})),gW("dayOfYear","DDD"),bH("dayOfYear",4),cH("DDD",eH),cH("DDDD",GW),hH(["DDD","DDDD"],(function(e,t,i){return i._dayOfYear=hW(e),i})),DW("d",null,"do",(function(e,t){return UW(e,t.isUTC).toString(10)})),DW("dd",null,null,(function(e,t){return t.locale.weekdaysMin(e,t.format,t.isUTC)})),DW("ddd",null,null,(function(e,t){return t.locale.weekdaysShort(e,t.format,t.isUTC)})),DW("dddd",null,null,(function(e,t){return t.locale.weekdays(e,t.format,t.isUTC)})),DW("e",null,null,(function(e,t){return mG(e,t.locale,t.isUTC).toString(10)})),DW("E",null,null,(function(e,t){return function(e,t){return UW(e,t)||7}(e,t.isUTC).toString(10)})),gW("day","d"),gW("weekday","e"),gW("isoWeekday","E"),bH("day",11),bH("weekday",11),bH("isoWeekday",11),cH("d",JW),cH("e",JW),cH("E",JW),cH("dd",(function(e,t){return t.weekdaysMinRegex(e)})),cH("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),cH("dddd",(function(e,t){return t.weekdaysRegex(e)})),fH(["dd","ddd","dddd"],(function(e,t,i,n){let r=i._locale.weekdaysParse(e,n,i._strict);return null!=r?t.d=r:yH(i).invalidWeekday=!!e,i})),fH(["d","e","E"],(function(e,t,i,n){return t[n]=hW(e),i})),DW("D",["DD",2,!1],"Do",(function(e,t){return VW(e,t.isUTC).toString(10)})),gW("date","D"),bH("date",9),cH("D",JW),cH("DD",JW,YW),cH("Do",(function(e,t){return t._dayOfMonthOrdinalParse||t._ordinalParse})),hH(["D","DD"],wW),hH("Do",(function(e,t,i){return t[wW]=hW(e.match(JW)[0]),i}))),!e)return lY;return function(e){let t,i,n=0;for(;n<e.length;){let r=uY(e[n]).split("-"),s=r.length;for(t=uY(e[n+1]),t=t?t.split("-"):null;s>0;){if(i=pY(r.slice(0,s).join("-")),i)return i;if(t&&t.length>=s&&GH(r,t,!0)>=s-1)break;s--}n++}return null}(cW(e)?e:[e])}var gY=["year","quarter","month","week","day","hours","minutes","seconds","milliseconds"],bY=gY.reduce(((e,t)=>(e[t]=!0,e)),{});function yY(e){return e<0?Math.floor(e):Math.ceil(e)}function vY(e){return 4800*e/146097}function wY(e){return 146097*e/4800}var _Y=Math.round,SY=44,CY=45,IY=45,AY=22,kY=26,xY=11;function TY(e,t,i,n,r){return r.relativeTime(t||1,!!i,e,n)}var PY=class{constructor(e,t={}){this._data={},this._locale=mY(),this._locale=t&&t._locale||mY();let i=e,n=i.year||0,r=i.quarter||0,s=i.month||0,a=i.week||0,o=i.day||0,l=i.hours||0,c=i.minutes||0,d=i.seconds||0,u=i.milliseconds||0;return this._isValid=function(e){if(Object.keys(e).some((t=>t in bY&&null===e[t]||isNaN(e[t]))))return!1;let t=!1;for(let i=0;i<gY.length;++i)if(e[gY[i]]){if(t)return!1;e[gY[i]]!==hW(e[gY[i]])&&(t=!0)}return!0}(i),this._milliseconds=+u+1e3*d+60*c*1e3+1e3*l*60*60,this._days=+o+7*a,this._months=+s+3*r+12*n,function(e){let t=e._milliseconds,i=e._days,n=e._months,r=e._data;t>=0&&i>=0&&n>=0||t<=0&&i<=0&&n<=0||(t+=864e5*yY(wY(n)+i),i=0,n=0),r.milliseconds=t%1e3;let s=nW(t/1e3);r.seconds=s%60;let a=nW(s/60);r.minutes=a%60;let o=nW(a/60);
1r.hours=o%24,i+=nW(o/24);let l=nW(vY(i));n+=l,i-=yY(wY(l));let c=nW(n/12);return n%=12,r.day=i,r.month=n,r.year=c,e}(this)}isValid(){return this._isValid}humanize(e){if(!this.isValid())return this.localeData().invalidDate;let t=this.localeData(),i=function(e,t,i){let n=lG(e).abs(),r=_Y(n.as("s")),s=_Y(n.as("m")),a=_Y(n.as("h")),o=_Y(n.as("d")),l=_Y(n.as("M")),c=_Y(n.as("y")),d=r<=SY&&["s",r]||r<CY&&["ss",r]||s<=1&&["m"]||s<IY&&["mm",s]||a<=1&&["h"]||a<AY&&["hh",a]||o<=1&&["d"]||o<kY&&["dd",o]||l<=1&&["M"]||l<xY&&["MM",l]||c<=1&&["y"]||["yy",c],u=[d[0],d[1],t,+e>0,i];return TY.apply(null,u)}(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}localeData(){return this._locale}locale(e){return e?(this._locale=mY(e)||this._locale,this):this._locale._abbr}abs(){let e=Math.abs,t=this._data;return this._milliseconds=e(this._milliseconds),this._days=e(this._days),this._months=e(this._months),t.milliseconds=e(t.milliseconds),t.seconds=e(t.seconds),t.minutes=e(t.minutes),t.hours=e(t.hours),t.month=e(t.month),t.year=e(t.year),this}as(e){if(!this.isValid())return NaN;let t,i,n=this._milliseconds,r=bW(e);if("month"===r||"year"===r)return t=this._days+n/864e5,i=this._months+vY(t),"month"===r?i:i/12;switch(t=this._days+Math.round(wY(this._months)),r){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hours":return 24*t+n/36e5;case"minutes":return 1440*t+n/6e4;case"seconds":return 86400*t+n/1e3;case"milliseconds":return Math.floor(864e5*t)+n;default:throw new Error(`Unknown unit ${r}`)}}valueOf(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*hW(this._months/12):NaN}};function EY(e){if(null==e._isValid){let t=yH(e),i=Array.prototype.some.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d&&e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function DY(e,t){return e._d=new Date(NaN),Object.assign(yH(e),t||{userInvalidated:!0}),e}var OY=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,BY=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,MY=/Z|[+-]\d\d(?::?\d\d)?/,RY=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/,!0],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/,!0],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/,!0],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/,!0],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/,!0],["YYYYMMDD",/\d{8}/,!0],["GGGG[W]WWE",/\d{4}W\d{3}/,!0],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/,!0]],LY=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],FY=/^\/?Date\((\-?\d+)/i,NY={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},UY=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function VY(e){if(!rW(e._i))return e;let t,i,n,r,s,a,o=e._i,l=OY.exec(o)||BY.exec(o);if(!l)return e._isValid=!1,e;for(s=0,a=RY.length;s<a;s++)if(RY[s][1].exec(l[1])){i=RY[s][0],t=!1!==RY[s][2];break}if(null==i)return e._isValid=!1,e;if(l[3]){for(s=0,a=LY.length;s<a;s++)if(LY[s][1].exec(l[3])){n=(l[2]||" ")+LY[s][0];break}if(null==n)return e._isValid=!1,e}if(!t&&null!=n)return e._isValid=!1,e;if(l[4]){if(!MY.exec(l[4]))return e._isValid=!1,e;r="Z"}return e._f=i+(n||"")+(r||""),QY(e)}function qY(e){let t=parseInt(e,10);return t<=49?t+2e3:t}function $Y(e){if(!rW(e._i))return e;let t=UY.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e._i));if(!t)return function(e){return e._isValid=!1,e}(e);let i=function(e,t,i,n,r,s){let a=[qY(e),NH.indexOf(t),parseInt(i,10),parseInt(n,10),parseInt(r,10)];return s&&a.push(parseInt(s,10)),a}(t[4],t[3],t[2],t[5],t[6],t[7]);return function(e,t,i){if(e&&VH.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay())return yH(i).weekdayMismatch=!0,i._isValid=!1,!1;return!0}(t[1],i,e)&&(e._a=i,e._tzm=function(e,t,i){if(e)return NY[e];
1if(t)return 0;{let e=parseInt(i,10),t=e%100;return(e-t)/100*60+t}}(t[8],t[9],t[10]),e._d=BW.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),yH(e).rfc2822=!0),e}function jY(e,t,i,n,r=0){let s=mY(i||"en");if(!s)throw new Error(`Locale "${i}" is not defined, please add it with "defineLocale(...)"`);let a=function(e,t,i,n,r=0){if(!aW(e))return i.invalidDate;let s=zY(t,i);return TW[s]=TW[s]||function(e){let t=e.match(EW),i=t.length,n=new Array(i);for(let e=0;e<i;e++)n[e]=PW[t[e]]?PW[t[e]]:OW(t[e]);return function(t,r,s,a=0){let o="";for(let l=0;l<i;l++)o+=oW(n[l])?n[l].call(null,t,{format:e,locale:r,isUTC:s,offset:a}):n[l];return o}}(s),TW[s](e,i,n,r)}(e,t||(n?"YYYY-MM-DDTHH:mm:ss[Z]":"YYYY-MM-DDTHH:mm:ssZ"),s,n,r);return a&&s.postformat(a)}function zY(e,t){let i=e,n=5,r=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,s=e=>t.formatLongDate(e)||e;for(r.lastIndex=0;n>=0&&r.test(i);)i=i.replace(r,s),r.lastIndex=0,n-=1;return i}function WY(e,t,i){return e??t??i}function HY(e){let t,i,n,r=[];if(e._d)return e;let s=function(e){let t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e);for(e._w&&null==e._a[wW]&&null==e._a[vW]&&function(e){let t,i,n,r,s,a,o,l=e._w;if(null!=l.GG||null!=l.W||null!=l.E)r=1,s=4,t=WY(l.GG,e._a[yW],MH(new Date,1,4).year),i=WY(l.W,1),n=WY(l.E,1),(n<1||n>7)&&(o=!0);else{r=e._locale._week.dow,s=e._locale._week.doy;let a=MH(new Date,r,s);t=WY(l.gg,e._a[yW],a.year),i=WY(l.w,a.week),null!=l.d?(n=l.d,(n<0||n>6)&&(o=!0)):null!=l.e?(n=l.e+r,(l.e<0||l.e>6)&&(o=!0)):n=r}i<1||i>RH(t,r,s)?yH(e)._overflowWeeks=!0:null!=o?yH(e)._overflowWeekday=!0:(a=function(e,t,i,n,r){let s,a,o=1+7*(t-1)+(7+i-n)%7+BH(e,n,r);return o<=0?(s=e-1,a=_H(s)+o):o>_H(e)?(s=e+1,a=o-_H(e)):(s=e,a=o),{year:s,dayOfYear:a}}(t,i,n,r,s),e._a[yW]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(n=WY(e._a[yW],s[yW]),(e._dayOfYear>_H(n)||0===e._dayOfYear)&&(yH(e)._overflowDayOfYear=!0),i=new Date(Date.UTC(n,0,e._dayOfYear)),e._a[vW]=i.getUTCMonth(),e._a[wW]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_W]&&0===e._a[SW]&&0===e._a[CW]&&0===e._a[IW]&&(e._nextDay=!0,e._a[_W]=0),e._d=(e._useUTC?BW:MW).apply(null,r);let a=e._useUTC?e._d.getUTCDay():e._d.getDay();return null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_W]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(yH(e).weekdayMismatch=!0),e}function YY(e){let t,i=e._a;return i&&-2===yH(e).overflow&&(t=i[vW]<0||i[vW]>11?vW:i[wW]<1||i[wW]>CH(i[yW],i[vW])?wW:i[_W]<0||i[_W]>24||24===i[_W]&&(0!==i[SW]||0!==i[CW]||0!==i[IW])?_W:i[SW]<0||i[SW]>59?SW:i[CW]<0||i[CW]>59?CW:i[IW]<0||i[IW]>999?IW:-1,yH(e)._overflowDayOfYear&&(t<yW||t>wW)&&(t=wW),yH(e)._overflowWeeks&&-1===t&&(t=AW),yH(e)._overflowWeekday&&-1===t&&(t=kW),yH(e).overflow=t),e}var GY="ISO_8601",KY="RFC_2822";function QY(e){if(e._f===GY)return VY(e);if(e._f===KY)return $Y(e);if(e._a=[],yH(e).empty=!0,cW(e._f)||!e._i&&0!==e._i)return e;let t,i,n,r,s=e._i.toString(),a=0,o=s.length,l=zY(e._f,e._locale).match(EW)||[];for(t=0;t<l.length;t++)i=l[t],n=(s.match(dH(i,e._locale))||[])[0],n&&(r=s.substr(0,s.indexOf(n)),r.length>0&&yH(e).unusedInput.push(r),s=s.slice(s.indexOf(n)+n.length),a+=n.length),PW[i]?(n?yH(e).empty=!1:yH(e).unusedTokens.push(i),mH(i,n,e)):e._strict&&!n&&yH(e).unusedTokens.push(i);return yH(e).charsLeftOver=o-a,s.length>0&&yH(e).unusedInput.push(s),e._a[_W]<=12&&!0===yH(e).bigHour&&e._a[_W]>0&&(yH(e).bigHour=void 0),yH(e).parsedDateParts=e._a.slice(0),yH(e).meridiem=e._meridiem,e._a[_W]=function(e,t,i){let n=t;if(null==i)return n;if(null!=e.meridiemHour)return e.meridiemHour(n,i);if(null==e.isPM)return n;let r=e.isPM(i);return r&&n<12&&(n+=12),!r&&12===n&&(n=0),n}(e._locale,e._a[_W],e._meridiem),HY(e),YY(e)}function JY(e){if(e._d)return e;let t=e._i;if(uW(t)){let i=function(e){let t,i,n={};for(i in e)dW(e,i)&&(t=bW(i),t&&(n[t]=e[i]));return n}(t);e._a=[i.year,i.month,i.day,i.hours,i.minutes,i.seconds,i.milliseconds].map((e=>rW(e)?parseInt(e,10):e))}return HY(e)}function ZY(e){let t=YY(function(e){let t=e._i,i=e._f;return e._locale=e._locale||mY(e._l),null===t||void 0===i&&""===t?DY(e,{nullInput:!0}):(rW(t)&&(e._i=t=e._locale.preparse(t,i)),sW(t)?(e._d=PH(t),e):(cW(i)?function(e){let t,i,n,r,s;if(!e._f||0===e._f.length)return yH(e).invalidFormat=!0,DY(e);for(s=0;s<e._f.length;s++)r=0,t=Object.assign({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[s],QY(t),EY(t)&&(r+=yH(t).charsLeftOver,r+=10*yH(t).unusedTokens.length,yH(t).score=r,(null==n||r<n)&&(n=r,i=t));Object.assign(e,i||t)}(e):i?QY(e):function(e){let t=e._i;if(pW(t))e._d=new Date;else if(sW(t))e._d=PH(t);else if(rW(t))!function(e){if(!rW(e._i))return e;let t=FY.exec(e._i);null!==t?e._d=new Date(+t[1]):(VY(e),!1!==e._isValid||(delete e._isValid,$Y(e),!1!==e._isValid||(delete e._isValid,DY(e))))}(e);else if(cW(t)&&t.length){let i=t.slice(0);e._a=i.map((e=>rW(e)?parseInt(e,10):e)),HY(e)}else if(uW(t))JY(e);else{if(!lW(t))return DY(e);e._d=new Date(t)}}(e),EY(e)||(e._d=null),e))}(e));return t._d=new Date(null!=t._d?t._d.getTime():NaN),EY(Object.assign({},t,{_isValid:null}))||(t._d=new Date(NaN)),t}function XY(e,t,i,n,r){let s={},a=e;return(uW(a)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;let t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(a)||cW(a)&&0===a.length)&&(a=void 0),s._useUTC=s._isUTC=r,s._l=i,s._i=a,s._f=t,s._strict=n,ZY(s)}function eG(e,t,i,n,r){return sW(e)?e:XY(e,t,i,n,r)._d}function tG(e){return e instanceof Date?new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()):null}function iG(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function nG(e,t,i="milliseconds"){return!(!e||!t)&&("milliseconds"===i?e.valueOf()>t.valueOf():t.valueOf()<EH(e,i).valueOf())}function rG(e,t,i="milliseconds"){return!(!e||!t)&&("milliseconds"===i?e.valueOf()<t.valueOf():DH(e,i).valueOf()<t.valueOf())}function sG(e,t,i="milliseconds"){if(!e||!t)return!1;if("milliseconds"===i)return e.valueOf()===t.valueOf();let n=t.valueOf();return EH(e,i).valueOf()<=n&&n<=DH(e,i).valueOf()}var aG=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,oG=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function lG(e,t,i={}){let n=function(e,t){if(null==e)return{};if(function(e){return e instanceof PY}(e))return{milliseconds:e._milliseconds,day:e._days,month:e._months};if(lW(e))return t?{[t]:e}:{milliseconds:e};if(rW(e)){let t=aG.exec(e);if(t){let e="-"===t[1]?-1:1;return{year:0,day:hW(t[wW])*e,hours:hW(t[_W])*e,minutes:hW(t[SW])*e,seconds:hW(t[CW])*e,milliseconds:hW(iG(1e3*hW(t[IW])))*e}}if(t=oG.exec(e),t){let e="-"===t[1]?-1:(t[1],1);return{year:cG(t[2],e),month:cG(t[3],e),week:cG(t[4],e),day:cG(t[5],e),hours:cG(t[6],e),minutes:cG(t[7],e),seconds:cG(t[8],e)}}}if(uW(e)&&("from"in e||"to"in e)){let t=function(e,t){if(!aW(e)||!aW
1(t))return{milliseconds:0,months:0};let i,n=function(e,t,i={}){if(!i._isUTC)return e;let n=PH(t),r=6e4*(i._offset||0),s=e.valueOf()-n.valueOf()+r;return n.setTime(n.valueOf()+s),n}(t,e,{_offset:e.getTimezoneOffset()});return rG(e,n)?i=dG(e,n):(i=dG(n,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i}(eG(e.from),eG(e.to));return{milliseconds:t.milliseconds,month:t.months}}return e}(e,t);return new PY(n,i)}function cG(e,t){let i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function dG(e,t){let i={milliseconds:0,months:0};return i.months=qW(t)-qW(e)+12*($W(t)-$W(e)),nG(uG(PH(e),i.months,"month"),t)&&--i.months,i.milliseconds=+t-+uG(PH(e),i.months,"month"),i}function uG(e,t,i,n){return pG(e,lG(t,i),1,n)}function pG(e,t,i,n){let r=t._milliseconds,s=iG(t._days),a=iG(t._months);return a&&xH(e,qW(e,n)+a*i,n),s&&TH(e,VW(e,n)+s*i,n),r&&function(e,t){e.setTime(t)}(e,function(e){return e.getTime()}(e)+r*i),PH(e)}function hG(e,t,i=mY(),n){let r=UW(e,n),s=function(e,t){if(!rW(e))return e;let i=parseInt(e,10);if(!isNaN(i))return i;let n=t.weekdaysParse(e);return lW(n)?n:null}(t,i);return uG(e,s-r,"day")}function fG(e,t){return UW(e,t)}function mG(e,t=mY(),i){return(UW(e,i)+7-t.firstDayOfWeek())%7}var gG=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},bG={s:["Ø£ÙÙ Ù
٠ثاÙÙØ©","ثاÙÙØ© ÙØ§ØØ¯Ø©",["ثاÙÙØªØ§Ù","ثاÙÙØªÙÙ"],"%d Ø«ÙØ§Ù","%d ثاÙÙØ©","%d ثاÙÙØ©"],m:["Ø£ÙÙ Ù
٠دÙÙÙØ©","دÙÙÙØ© ÙØ§ØØ¯Ø©",["دÙÙÙØªØ§Ù","دÙÙÙØªÙÙ"],"%d Ø¯ÙØ§Ø¦Ù","%d دÙÙÙØ©","%d دÙÙÙØ©"],h:["Ø£ÙÙ Ù
٠ساعة","ساعة ÙØ§ØØ¯Ø©",["ساعتاÙ","ساعتÙÙ"],"%d ساعات","%d ساعة","%d ساعة"],d:["Ø£ÙÙ Ù
Ù ÙÙÙ
","ÙÙÙ
ÙØ§ØØ¯",["ÙÙÙ
اÙ","ÙÙÙ
ÙÙ"],"%d Ø£ÙØ§Ù
","%d ÙÙÙ
ÙØ§","%d ÙÙÙ
"],M:["Ø£ÙÙ Ù
Ù Ø´ÙØ±","Ø´ÙØ± ÙØ§ØØ¯",["Ø´ÙØ±Ø§Ù","Ø´ÙØ±ÙÙ"],"%d Ø£Ø´ÙØ±","%d Ø´ÙØ±Ø§","%d Ø´ÙØ±"],y:["Ø£ÙÙ Ù
٠عاÙ
","عاÙ
ÙØ§ØØ¯",["عاÙ
اÙ","عاÙ
ÙÙ"],"%d Ø£Ø¹ÙØ§Ù
","%d عاÙ
ÙØ§","%d عاÙ
"]},yG=function(e){return function(t,i){let n=gG(t),r=bG[e][gG(t)];return 2===n&&(r=r[i?0:1]),r.replace(/%d/i,t.toString())}},vG=("Ø§ÙØ£ØØ¯_Ø§ÙØ¥Ø«ÙÙÙ_Ø§ÙØ«Ùاثاء_Ø§ÙØ£Ø±Ø¨Ø¹Ø§Ø¡_Ø§ÙØ®Ù
ÙØ³_Ø§ÙØ¬Ù
عة_Ø§ÙØ³Ø¨Øª".split("_"),"Ø£ØØ¯_إثÙÙÙ_Ø«ÙØ§Ø«Ø§Ø¡_أربعاء_Ø®Ù
ÙØ³_جÙ
عة_سبت".split("_"),"Ø_Ù_Ø«_ر_Ø®_ج_س".split("_"),yG("s"),yG("s"),yG("m"),yG("m"),yG("h"),yG("h"),yG("d"),yG
1("d"),yG("M"),yG("M"),yG("y"),yG("y"),"ÑнÑаÑи_ÑевÑÑаÑи_маÑÑ_апÑил_май_Ñни_Ñли_авгÑÑÑ_ÑепÑемвÑи_окÑомвÑи_ноемвÑи_декемвÑи".split("_"),"ÑнÑ_Ñев_маÑ_апÑ_май_Ñни_Ñли_авг_Ñеп_окÑ_ное_дек".split("_"),"неделÑ_понеделник_вÑоÑник_ÑÑÑда_ÑеÑвÑÑÑÑк_пеÑÑк_ÑÑбоÑа".split("_"),"нед_пон_вÑо_ÑÑÑ_ÑеÑ_пеÑ_ÑÑб".split("_"),"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),"gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.".split("_"),"ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des".split("_"),"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),"diu._dil._dim._dix._dij._div._dis.".split("_"),"dg_dl_dt_dc_dj_dv_ds".split("_"),"leden_únor_bÅezen_duben_kvÄten_Äerven_Äervenec_srpen_záÅÃ_ÅÃjen_listopad_prosinec".split("_")),wG="led_úno_bÅe_dub_kvÄ_Ävn_Ävc_srp_záÅ_ÅÃj_lis_pro".split("_");(function(e,t){let i,n=[];for(i=0;i<12;i++)n[i]=new RegExp("^"+e[i]+"$|^"+t[i]+"$","i")})(vG,wG),function(e){let t,i=[];for(t=0;t<12;t++)i[t]=new RegExp("^"+e[t]+"$","i")}(wG),function(e){let t,i=[];for(t=0;t<12;t++)i[t]=new RegExp("^"+e[t]+"$","i")}(vG),"nedÄle_pondÄlÃ_úterý_stÅeda_Ätvrtek_pátek_sobota".split("_"),"ne_po_út_st_Ät_pá_so".split("_"),"ne_po_út_st_Ät_pá_so".split("_"),"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),"Sø_Ma_Ti_On_To_Fr_Lø".split("_");"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),"P_E_T_K_N_R_L".split("_"),"P_E_T_K_N_R_L".split("_");var _G="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" ");_G[7],_G[8],_G[9];"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),"su_ma_ti_ke_to_pe_la".split("_"),"su_ma_ti_ke_to_pe_la".split("_"),"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),"dim._lun._mar._mer._jeu._ven._sam.".split("_"),"di_lu_ma_me_je_ve_sa".split("_"),"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),"dim._lun._mar._mer._jeu._ven._sam.".split("_"),"di_lu_ma_me_je_ve_sa".split("_"),"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),"xan_feb_mar_abr_mai_xuñ_xul_ago_set_out_nov_dec".split("_"),"xane
1iro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),"dom._lun._mar._mér._xov._ven._sáb.".split("_"),"do_lu_ma_mé_xo_ve_sá".split("_"),"×× ××ר_פ×ר××ר_×רץ_×פר××_×××_××× ×_××××_××××ס×_ספ×××ר_×××§×××ר_× ××××ר_×צ××ר".split("_"),"×× ×׳_פ×ר׳_×רץ_×פר׳_×××_××× ×_××××_×××׳_ספ×׳_××ק׳_× ××׳_×צ×׳".split("_"),"ר×ש××_×©× ×_ש××ש×_ר×××¢×_×××ש×_ש×ש×_ש×ת".split("_"),"×׳_×׳_×׳_×׳_×׳_×׳_ש׳".split("_"),"×_×_×_×_×_×_ש".split("_"),"à¤à¤¨à¤µà¤°à¥_फ़रवरà¥_मारà¥à¤_à¤
पà¥à¤°à¥à¤²_मà¤_à¤à¥à¤¨_à¤à¥à¤²à¤¾à¤_à¤
à¤à¤¸à¥à¤¤_सितमà¥à¤¬à¤°_à¤
à¤à¥à¤à¥à¤¬à¤°_नवमà¥à¤¬à¤°_दिसमà¥à¤¬à¤°".split("_"),"à¤à¤¨._फ़र._मारà¥à¤_à¤
पà¥à¤°à¥._मà¤_à¤à¥à¤¨_à¤à¥à¤²._à¤
à¤._सित._à¤
à¤à¥à¤à¥._नव._दिस.".split("_"),"रविवार_सà¥à¤®à¤µà¤¾à¤°_मà¤à¤à¤²à¤µà¤¾à¤°_बà¥à¤§à¤µà¤¾à¤°_à¤à¥à¤°à¥à¤µà¤¾à¤°_शà¥à¤à¥à¤°à¤µà¤¾à¤°_शनिवार".split("_"),"रवि_सà¥à¤®_मà¤à¤à¤²_बà¥à¤§_à¤à¥à¤°à¥_शà¥à¤à¥à¤°_शनि".split("_"),"र_सà¥_मà¤_बà¥_à¤à¥_शà¥_श".split("_"),"vasárnap hétfÅn kedden szerdán csütörtökön pénteken szombaton".split(" ");"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),"vasárnap_hétfÅ_kedd_szerda_csütörtök_péntek_szombat".split("_"),"vas_hét_kedd_sze_csüt_pén_szo".split("_"),"v_h_k_sze_cs_p_szo".split("_"),"SijeÄanj_VeljaÄa_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac".split("_"),"Sij_Velj_Ožu_Tra_Svi_Lip_Srp_Kol_Ruj_Lis_Stu_Pro".split("_"),"Nedjelja_Ponedjeljak_Utorak_Srijeda_Äetvrtak_Petak_Subota".split("_"),"Ned_Pon_Uto_Sri_Äet_Pet_Sub".split("_"),"Ne_Po_Ut_Sr_Äe_Pe_Su".split("_"),"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),"dom_lun_mar_mer_gio_ven_sab".split("_"),"do_lu_ma_me_gi_ve_sa".split("_"),"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),"æ¥ææ¥_æææ¥_ç«ææ¥_æ°´ææ¥_æ¨ææ¥_éææ¥_åææ¥".split("_"),"æ¥_æ_ç«_æ°´_æ¨_é_å".split("_"),"æ¥_æ_ç«_æ°´_æ¨_é_å".split("_"),"áááááá á¡_ááááá áááá¡_ááá á¢á¡_ááá áááá¡_áááá¡á¡_ááááá¡á¡_ááááá¡á¡_ááááá¡á¢á¡_á¡áá¥á¢ááááá á¡_áá¥á¢ááááá á¡_ááááááá á¡_áááááááá á¡".split("_"),"áááááá á_ááááá áááá_ááá á¢á_ááá ááá_áááá¡á_ááááá¡á_ááááá¡á_ááááá¡á¢á_á¡áá¥á¢ááááá á_áá¥á¢ááááá á_ááááááá á_áááááááá á".split("_"),"ááá_ááá_ááá _ááá _ááá_ááá_ááá_ááá_á¡áá¥_áá¥á¢_ááá_ááá".split("_"),"áááá á_áá á¨ááááá_á¡ááá¨ááááá_ááá®á¨ááááá_á®á£áá¨ááááá_ááá áá¡áááá_á¨ááááá".split("_"),"áááá áá¡_áá á¨ááááá¡_á¡ááá¨ááááá¡_ááá®á¨ááááá¡_á®á£áá¨ááááá¡_ááá áá¡áááá¡_á¨ááááá¡".split("_"),"ááá_áá á¨_á¡áá_ááá®_á®á£á_ááá _á¨áá".split("_"),"áá_áá _á¡á_áá_á®á£_áá_á¨á".split("_"),"ÒаңÑаÑ_аÒпан_наÑÑÑз_ÑÓÑÑÑ_мамÑÑ_маÑÑÑм_ÑÑлде_ÑамÑз_ÒÑÑкүйек_Òазан_ÒаÑаÑа_желÑоÒÑан".split("_"),"Òаң_аÒп_наÑ_ÑÓÑ_мам_маÑ_ÑÑл_Ñам_ÒÑÑ_Òаз_ÒаÑ_жел".split("_"),"жекÑенбÑ_дүйÑенбÑ_ÑейÑенбÑ_ÑÓÑÑенбÑ_бейÑенбÑ_жұма_ÑенбÑ".split("_"),"жек_дүй_Ñей_ÑÓÑ_бей_жұм_Ñен".split("_"),"жк_дй_Ñй_ÑÑ_бй_жм_Ñн".split("_"),"1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì".split("_"),"1ì_2ì_3ì_4ì_5ì_6ì_7ì_8ì_9ì_10ì_11ì_12ì".split("_"),"ì¼ìì¼_ììì¼_íìì¼_ììì¼_목ìì¼_ê¸ìì¼_í ìì¼".split("_"),"ì¼_ì_í_ì_목_ê¸_í ".split("_"),"ì¼_ì_í_ì_목_ê¸_í ".split("_");"sausio_vasario_kovo_balandžio_gegužÄs_birželio_liepos_rugpjÅ«Äio_rugsÄjo_spalio_lapkriÄio_gruodžio".split("_"),"sausis_vasaris_kovas_balandis_gegužÄ_birželis_liepa_rugpjÅ«tis_rugsÄjis_spalis_lapkritis_gruodis".split("_"),"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),"sekmadienį_pirmadienį_antradienį_treÄiadienį_ketvirtadienį_penktadienį_Å¡eÅ¡tadienį".split("_"),"sekmadienis_pirmadienis_antradienis_treÄiadienis_ketvirtadienis_penktadienis_Å¡eÅ¡tadienis".split("_"),"Sek_Pir_Ant_Tre_Ket_Pen_Å eÅ¡".split("_"),"S_P_A_T_K_Pn_Å ".split("_"),"JanvÄris_FebruÄris_Marts_AprÄ«lis_Maijs_JÅ«nijs_JÅ«lijs_Augusts_Septembris_Oktobris_Novembris_Decembris".split("_"),"Jan_Feb_Mar_Apr_Mai_JÅ«n_JÅ«l_Aug_Sep_Okt_Nov_Dec".split("_"),"SvÄtdiena_Pirmdiena_Otrdiena_TreÅ¡diena_Ceturtdiena_Piektdiena_Sestdiena".split("_"),"SvÄtd_P
1irmd_Otrd_TreÅ¡d_Ceturtd_Piektd_Sestd".split("_"),"Sv_Pi_Ot_Tr_Ce_Pk_Se".split("_");"ÐÑгдүгÑÑÑ ÑаÑ_ХоÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÓ©ÑөвдүгÑÑÑ ÑаÑ_ТавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑÑгадÑÐ³Ð°Ð°Ñ ÑаÑ_ÐолдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐаймдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑдүгÑÑÑ ÑаÑ_ÐÑавдÑÐ³Ð°Ð°Ñ ÑаÑ_ÐÑван нÑгдүгÑÑÑ ÑаÑ_ÐÑван Ñ
оÑÑдÑÐ³Ð°Ð°Ñ ÑаÑ".split("_"),"1 ÑаÑ_2 ÑаÑ_3 ÑаÑ_4 ÑаÑ_5 ÑаÑ_6 ÑаÑ_7 ÑаÑ_8 ÑаÑ_9 ÑаÑ_10 ÑаÑ_11 ÑаÑ_12 ÑаÑ".split("_"),"ÐÑм_Ðаваа_ÐÑгмаÑ_ÐÑ
агва_ÐÒ¯ÑÑв_ÐааÑан_ÐÑмба".split("_"),"ÐÑм_Ðав_ÐÑг_ÐÑ
а_ÐÒ¯Ñ_Ðаа_ÐÑм".split("_"),"ÐÑ_Ðа_ÐÑ_ÐÑ
_ÐÒ¯_Ðа_ÐÑ".split("_"),"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),"sø._ma._ti._on._to._fr._lø.".split("_"),"sø_ma_ti_on_to_fr_lø".split("_"),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),"zo._ma._di._wo._do._vr._za.".split("_"),"zo_ma_di_wo_do_vr_za".split("_"),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),"zo._ma._di._wo._do._vr._za.".split("_"),"zo_ma_di_wo_do_vr_za".split("_"),"styczeÅ_luty_marzec_kwiecieÅ_maj_czerwiec_lipiec_sierpieÅ_wrzesieÅ_październik_listopad_grudzieÅ".split("_"),"stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrzeÅnia_października_listopada_grudnia".split("_");"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),"niedziela_poniedziaÅek_wtorek_Åroda_czwartek_piÄ
tek_sobota".split("_"),"ndz_pon_wt_År_czw_pt_sob".split("_"),"Nd_Pn_Wt_År_Cz_Pt_So".split("_"),"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_");"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),"duminicÄ_luni_marÈi_miercuri_joi_vineri_sâmbÄtÄ".split("_"),"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_");"ÑнваÑÑ_ÑевÑалÑ_маÑÑа_апÑелÑ_маÑ_иÑнÑ_иÑлÑ_авгÑÑÑа_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_"),"ÑнваÑÑ_ÑевÑалÑ_маÑÑ_апÑелÑ_май_иÑнÑ_иÑлÑ_авгÑÑÑ_ÑенÑÑбÑÑ_окÑÑбÑÑ_ноÑбÑÑ_декабÑÑ".split("_"),"Ñнв._ÑевÑ._маÑ._апÑ._маÑ_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.".split("_"),"Ñнв._ÑевÑ._маÑÑ_апÑ._май_иÑнÑ_иÑлÑ_авг._ÑенÑ._окÑ._ноÑб._дек.".split("_"),"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑеда_ÑеÑвеÑг_пÑÑниÑа_ÑÑббоÑа".split("_"),"воÑкÑеÑенÑе_понеделÑник_вÑоÑник_ÑÑедÑ_ÑеÑвеÑг_пÑÑниÑÑ_ÑÑббоÑÑ".split("_"),"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),"вÑ_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_");"január_február_marec_aprÃl_máj_jún_júl_august_september_október_november_december".split("_"),"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),"nedeľa_pondelok_utorok_streda_Å¡tvrtok_piatok_sobota".split("_"),"ne_po_ut_st_Å¡t_pi_so".split("_"),"ne_po_ut_st_Å¡t_pi_so".split("_");"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),"nedelja_ponedeljek_torek_sreda_Äetrtek_petek_sobota".split("_"),"ned._pon._tor._sre._Äet._pet._sob.".split("_"),"ne_po_to_sr_Äe_pe_so".split("_"),"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),"E Dielë_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),"Di_He_Ma_Me_En_Pr_Sh".split("_"),"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),"söndag_mÃ¥ndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),"sön_mÃ¥n_tis_ons_tor_fre_lör".split("_"),"sö_mÃ¥_ti_on_to_fr_lö".split("_"),"มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡".split("_"),"ม.à¸._à¸.à¸._มี.à¸._à¹à¸¡.ย._à¸.à¸._มิ.ย._à¸.à¸._ส.à¸._à¸.ย._à¸.à¸._à¸.ย._à¸.à¸.".split("_"),"à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹".split("_"),"à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.".split("_"),"à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.".split("_");var SG={abbr:"th-be",months:"มà¸à¸£à¸²à¸à¸¡_à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹_มีà¸à¸²à¸à¸¡_à¹à¸¡à¸©à¸²à¸¢à¸_à¸à¸¤à¸©à¸ าà¸à¸¡_มิà¸à¸¸à¸à¸²à¸¢à¸_à¸à¸£à¸à¸à¸²à¸à¸¡_สิà¸à¸«à¸²à¸à¸¡_à¸à¸±à¸à¸¢à¸²à¸¢à¸_à¸à¸¸à¸¥à¸²à¸à¸¡_à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸_à¸à¸±à¸à¸§à¸²à¸à¸¡".split("_"),monthsShort:"ม.à¸._à¸.à¸._มี.à¸._à¹à¸¡.ย._à¸.à¸._มิ.ย._à¸.à¸._ส.à¸._à¸.ย._à¸.à¸._à¸.ย._à¸.à¸.".split("_"),monthsParseExact:!0,weekdays:"à¸à¸²à¸à¸´à¸à¸¢à¹_à¸à¸±à¸à¸à¸£à¹_à¸à¸±à¸à¸à¸²à¸£_à¸à¸¸à¸_à¸à¸¤à¸«à¸±à¸ªà¸à¸à¸µ_ศุà¸à¸£à¹_à¹à¸ªà¸²à¸£à¹".split("_"),weekdaysShort:"à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.".split("_"),weekdaysMin:"à¸à¸²._à¸._à¸._à¸._à¸à¸¤._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY à¹à¸§à¸¥à¸² H:mm",LLLL:"วัà¸ddddà¸à¸µà¹ D MMMM YYYY à¹à¸§à¸¥à¸² H:mm"},meridiemParse:/à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸|หลัà¸à¹à¸à¸µà¹à¸¢à¸/,isPM:e=>"หลัà¸à¹à¸à¸µà¹à¸¢à¸"===e,meridiem:(e,t,i)=>e<12?"à¸à¹à¸à¸à¹à¸à¸µà¹à¸¢à¸":"หลัà¸à¹à¸à¸µà¹à¸¢à¸",calendar:{sameDay:"[วัà¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",nextDay:"[à¸à¸£à¸¸à¹à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",nextWeek:"dddd[หà¸à¹à¸² à¹à¸§à¸¥à¸²] LT",lastDay:"[à¹à¸¡à¸·à¹à¸à¸§à¸²à¸à¸à¸µà¹ à¹à¸§à¸¥à¸²] LT",lastWeek:"[วัà¸]dddd[à¸à¸µà¹à¹à¸¥à¹à¸§ à¹à¸§à¸¥à¸²] LT",sameElse:"L"},relativeTime:{future:"à¸à¸µà¸ %s",past:"%sà¸à¸µà¹à¹à¸¥à¹à¸§",s:"à¹à¸¡à¹à¸à¸µà¹à¸§à¸´à¸à¸²à¸à¸µ",ss:"%d วิà¸à¸²à¸à¸µ",m:"1 à¸à¸²à¸à¸µ",mm:"%d à¸à¸²à¸à¸µ",h:"1 à¸à¸±à¹à¸§à¹à¸¡à¸",hh:"%d à¸à¸±à¹à¸§à¹à¸¡à¸",d:"1 วัà¸",dd:"%d วัà¸",M:"1 à¹à¸à¸·à¸à¸",MM:"%d à¹à¸à¸·à¸à¸",y:"1 à¸à¸µ",yy:"%d à¸à¸µ"},preparse(e,t){let i=SG.longDateFormat[t]?SG.longDateFormat[t]:t;if(-1!==i.indexOf("YYYY",i.length-4)){return e.substr(0,e.length-4)+(parseInt(e.substr(e.length-4),10)-543)}return e},getFullYear:(e,t=!1)=>543+(t?e.getUTCFullYear():e.getFullYear())};"Ocak_Åubat_Mart_Nisan_Mayıs_Haziran_Temmuz_AÄustos_Eylül_Ekim_Kasım_Aralık".split("_"),"Oca_Åub_Mar_Nis_May_Haz_Tem_AÄu_Eyl_Eki_Kas_Ara".split("_"),"Pazar_Pazartesi_Salı_ÃarÅamba_PerÅembe_Cuma_Cumartesi".split("_"),"Paz_Pts_Sal_Ãar_Per_Cum_Cts".split("_"),"Pz_Pt_Sa_Ãa_Pe_Cu_Ct".split("_");function CG(e){return function(t){return e+"о"+(11===RW(t)?"б":"")+"] LT"}}"ÑÑÑнÑ_лÑÑого_беÑезнÑ_квÑÑнÑ_ÑÑавнÑ_ÑеÑвнÑ_липнÑ_ÑеÑпнÑ_веÑеÑнÑ_жовÑнÑ_лиÑÑопада_гÑÑднÑ".split("_"),"ÑÑÑенÑ_лÑÑий_беÑезенÑ_квÑÑенÑ_ÑÑавенÑ_ÑеÑвенÑ_липенÑ_ÑеÑпенÑ_веÑеÑенÑ_жовÑенÑ_лиÑÑопад_гÑÑденÑ".split("_"),"ÑÑÑ_лÑÑ_беÑ_квÑÑ_ÑÑав_ÑеÑв_лип_ÑеÑп_веÑ_жовÑ_лиÑÑ_гÑÑд".split("_"),"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),"нд_пн_вÑ_ÑÑ_ÑÑ_пÑ_Ñб".split("_"),CG("[СÑÐ¾Ð³Ð¾Ð´Ð½Ñ "),CG("[ÐавÑÑа "),CG("[ÐÑоÑа "),CG("[У] dddd ["),"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),"chá»§ nháºt_thứ hai_thứ ba_thứ tư_thứ nÄm_thứ sáu_thứ bảy".split("_"),"CN_T2_T3_T4_T5_T6_T7".split("_"),"CN_T2_T3_T4_T5_T6_T7".split("_"),"䏿_äºæ_䏿_åæ_äºæ_å
æ_䏿_å
«æ_乿_åæ_å䏿_åäºæ".split("_"),"1æ_2æ_3æ_4æ_5æ_6æ_7æ_8æ_9æ_10æ_11æ_12æ".split("_"),"æææ¥_ææä¸_ææäº_ææä¸_ææå_ææäº_ææå
".split("_"),"卿¥_å¨ä¸_å¨äº_å¨ä¸_å¨å_å¨äº_å¨å
".split("_"),"æ¥_ä¸_äº_ä¸_å_äº_å
".split("_");var IG=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},AG={s:["Ú©Ù
تر از ÛÚ© ثاÙÛÙ","ÛÚ© ثاÙÛÙ",["د٠ثاÙÛÙ","د٠ثاÙÛÙ"],"%d ثاÙÛÙ","%d ثاÙÛÙ","%d ثاÙÛÙ"],m:["Ú©Ù
تر از ÛÚ© دÙÛÙÙ","ÛÚ© دÙÛÙÙ",["د٠دÙÛÙÙ","د٠دÙÛÙÙ"],"%d دÙÛÙÙ","%d دÙÛÙÙ","%d دÙÛÙÙ"],h:["Ú©Ù
تر از ÛÚ© ساعت","Û
1Ú© ساعت",["د٠ساعت","د٠ساعت"],"%d ساعت","%d ساعت","%d ساعت"],d:["Ú©Ù
تر از ÛÚ© Ø±ÙØ²","ÛÚ© Ø±ÙØ²",["Ø¯Ù Ø±ÙØ²","Ø¯Ù Ø±ÙØ²"],"%d Ø±ÙØ²","%d Ø±ÙØ²","%d Ø±ÙØ²"],M:["Ú©Ù
تر از ÛÚ© Ù
اÙ","ÛÚ© Ù
اÙ",["د٠Ù
اÙ","د٠Ù
اÙ"],"%d Ù
اÙ","%d Ù
اÙ","%d Ù
اÙ"],y:["Ú©Ù
تر از ÛÚ© ساÙ","ÛÚ© ساÙ",["د٠ساÙ","د٠ساÙ"],"%d ساÙ","%d ساÙ","%d ساÙ"]},kG=function(e){return function(t,i){let n=IG(t),r=AG[e][IG(t)];return 2===n&&(r=r[i?0:1]),r.replace(/%d/i,t.toString())}},xG=("ÛÚ©Ø´ÙØ¨Ù_Ø¯ÙØ´ÙبÙ_Ø³Ù Ø´ÙØ¨Ù_ÚÙØ§Ø±Ø´ÙبÙ_Ù¾ÙØ¬ Ø´ÙØ¨Ù_جÙ
عÙ_Ø´ÙØ¨Ù".split("_"),"ÛÚ©Ø´ÙØ¨Ù_دÙâØ´ÙØ¨Ù_سÙâØ´ÙØ¨Ù_ÚÙØ§Ø±âØ´ÙØ¨Ù_Ù¾ÙØ¬âØ´ÙØ¨Ù_جÙ
عÙ_Ø´ÙØ¨Ù".split("_"),"Û_د_س_Ú_Ù¾_ج_Ø´".split("_"),kG("s"),kG("s"),kG("m"),kG("m"),kG("h"),kG("h"),kG("d"),kG("d"),kG("M"),kG("M"),kG("y"),kG("y"),class extends Tt{constructor(e,t,i){super(e),t.pipe(ci(Nt)).pipe(an(((e,t)=>t?i(e,t):e),e)).subscribe((e=>this.next(e)))}}),TG=class e extends gt{constructor(e,t,i){super(),this._dispatcher=e,this._reducer=t,this.source=i}select(e){return(this.source?.pipe(bi(e))||(new gt).pipe(bi(e))).pipe(Ji())}lift(t){let i=new e(this._dispatcher,this._reducer,this);return i.operator=t,i}dispatch(e){this._dispatcher.next(e)}next(e){this._dispatcher.next(e)}error(e){this._dispatcher.error(e)}complete(){}};function PG(e,t){1&e&&(kf(0,"td"),am(1,"   "),xf())}function EG(e,t){if(1&e){let e=Mf();kf(0,"td")(1,"a",1),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.changeMinutes(t.minuteStep))})),Tf(2,"span",2),xf()()}if(2&e){let e=Yf();Vd(),Yh("disabled",!e.canIncrementMinutes||!e.isEditable)}}function DG(e,t){1&e&&(kf(0,"td"),am(1," "),xf())}function OG(e,t){if(1&e){let e=Mf();kf(0,"td")(1,"a",1),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.changeSeconds(t.secondsStep))})),Tf(2,"span",2),xf()()}if(2&e){let e=Yf();Vd(),Yh("disabled",!e.canIncrementSeconds||!e.isEditable)}}function BG(e,t){1&e&&(kf(0,"td"),am(1,"   "),xf())}function MG(e,t){1&e&&Tf(0,"td")}function RG(e,t){1&e&&(kf(0,"td"),am(1," : "),xf())}function LG(e,t){if(1&e){let e=Mf();kf(0,"td",4)(1,"input",5),jf("wheel",(function(t){Wa(e);let i=Yf();return i.prevDef(t),Ha(i.changeMinutes(i.minuteStep*i.wheelSign(t),"wheel"))}))("keydown.ArrowUp",(function(){Wa(e);let t=Yf();return Ha(t.changeMinutes(t.minuteStep,"key"))}))("keydown.ArrowDown",(function(){Wa(e);let t=Yf();return Ha(t.changeMinutes(-t.minuteStep,"key"))}))("change",(function(t){return Wa(e),Ha(Yf().updateMinutes(t.target))})),xf()()}if(2&e){let e=Yf();Yh("has-error",e.invalidMinutes),Vd(),Yh("is-invalid",e.invalidMinutes),zh("placeholder",e.minutesPlaceholder)("readonly",e.readonlyInput)("disabled",e.disabled)("value",e.minutes),gh("aria-label",e.labelMinutes)}}function FG(e,t){1&e&&(kf(0,"td"),am(1," : "),xf())}function NG(e,t){if(1&e){let e=Mf();kf(0,"td",4)(1,"input",5),jf("wheel",(function(t){Wa(e);let i=Yf();return i.prevDef(t),Ha(i.changeSeconds(i.secondsStep*i.wheelSign(t),"wheel"))}))("keydown.ArrowUp",(function(){Wa(e);let t=Yf();return Ha(t.changeSeconds(t.secondsStep,"key"))}))("keydown.ArrowDown",(function(){Wa(e);let t=Yf();return Ha(t.changeSeconds(-t.secondsStep,"key"))}))("change",(function(t){return Wa(e),Ha(Yf().updateSeconds(t.target))})),xf()()}if(2&e){let e=Yf();Yh("has-error",e.invalidSeconds),Vd(),Yh("is-invalid",e.invalidSeconds),zh("placeholder",e.secondsPlaceholder)("readonly",e.readonlyInput)("disabled",e.disabled)("value",e.seconds),gh("aria-label",e.labelSeconds)}}function UG(e,t){1&e&&(kf(0,"td"),am(1,"   "),xf())}function VG(e,t){if(1&e){let e=Mf();kf(0,"td")(1,"button",8),jf("click",(function(){return Wa(e),Ha(Yf().toggleMeridian())})),am(2),xf()()}if(2&e){let e=Yf();Vd(),Yh("disabled",!e.isEditable||!e.canToggleMeridian),zh("disabled",!e.isEditable||!e.canToggleMeridian),Vd(),cm("",e.meridian," ")}}function qG(e,t){1&e&&(kf(0,"td"),am(1,"   "),xf())}function $G(e,t){if(1&e){let e=Mf();kf(0,"td")(1,"a",1),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.changeMinutes(-t.minuteStep))})),Tf(2,"span",7),xf()()}if(2&e){let e=Yf();Vd(),Yh("disabled",!e.canDecrementMinutes||!e.isEditable)}}function jG(e,t){1&e&&(kf(0,"td"),am(1," "),xf())}function zG(e,t){if(1&e){let e=Mf();kf(0,"td")(1,"a",1),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.changeSeconds(-t.secondsStep))})),Tf(2,"span",7),xf()()}if(2&e){let e=Yf();Vd(),Yh("disabled",!e.canDecrementSeconds||!e.isEditable)}}function WG(e,t){1&e&&(kf(0,"td"),am(1,"   "),xf())}function HG(e,t){1&e&&Tf(0,"td")}var YG=(()=>{class e{static{this.WRITE_VALUE="[timepicker] write value from ng model"}static{this.CHANGE_HOURS="[timepicker] change hours"}static{this.CHANGE_MINUTES="[timepicker] change minutes"}static{this.CHANGE_SECONDS="[timepicker] change seconds"}static{this.SET_TIME_UNIT="[timepicker] set time unit"}static{this.UPDATE_CONTROLS="[timepicker] update controls"}writeValue(t){return{type:e.WRITE_VALUE,payload:t}}changeHours(t){return{type:e.CHANGE_HOURS,payload:t}}changeMinutes(t){return{type:e.CHANGE_MINUTES,payload:t}}changeSeconds(t){return{type:e.CHANGE_SECONDS,payload:t}}setTime(t){return{type:e.SET_TIME_UNIT,payload:t}}updateControls(t){return{type:e.UPDATE_CONTROLS,payload:t}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),GG=10,KG=24,QG=12,JG=60,ZG=60;
1function XG(e){return!(!e||e instanceof Date&&isNaN(e.getHours()))&&("string"!=typeof e||XG(new Date(e)))}function eK(e,t){return!(e.min&&t<e.min||e.max&&t>e.max)}function tK(e){return typeof e>"u"?NaN:"number"==typeof e?e:parseInt(e,GG)}function iK(e,t=!1){let i=tK(e);return isNaN(i)||i<0||i>(t?QG:KG)?NaN:i}function nK(e){let t=tK(e);return isNaN(t)||t<0||t>JG?NaN:t}function rK(e){let t=tK(e);return isNaN(t)||t<0||t>ZG?NaN:t}function sK(e){return"string"==typeof e?new Date(e):e}function aK(e,t){if(!e)return aK(lK(new Date,0,0,0),t);if(!t)return e;let i=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return t.hour&&(i+=tK(t.hour)),t.minute&&(n+=tK(t.minute)),t.seconds&&(r+=tK(t.seconds)),lK(e,i,n,r)}function oK(e,t){let i=iK(t.hour),n=nK(t.minute),r=rK(t.seconds)||0;return t.isPM&&12!==i&&(i+=QG),e?isNaN(i)||isNaN(n)?e:lK(e,i,n,r):isNaN(i)||isNaN(n)?e:lK(new Date,i,n,r)}function lK(e,t,i,n){let r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),t,i,n,e.getMilliseconds());return r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(e.getDate()),r}function cK(e){let t=e.toString();return t.length>1?t:`0${t}`}function dK(e,t){return!isNaN(iK(e,t))}function uK(e){return!isNaN(nK(e))}function pK(e){return!isNaN(rK(e))}function hK(e,t="0",i="0",n){return dK(e,n)&&uK(t)&&pK(i)}function fK(e,t){return!(e.readonlyInput||e.disabled||t&&("wheel"===t.source&&!e.mousewheel||"key"===t.source&&!e.arrowkeys))}function mK(e){let{hourStep:t,minuteStep:i,secondsStep:n,readonlyInput:r,disabled:s,mousewheel:a,arrowkeys:o,showSpinners:l,showMeridian:c,showSeconds:d,meridians:u,min:p,max:h}=e;return{hourStep:t,minuteStep:i,secondsStep:n,readonlyInput:r,disabled:s,mousewheel:a,arrowkeys:o,showSpinners:l,showMeridian:c,showSeconds:d,meridians:u,min:p,max:h}}var gK=(()=>{class e{constructor(){this.hourStep=1,this.minuteStep=5,this.secondsStep=10,this.showMeridian=!0,this.meridians=["AM","PM"],this.readonlyInput=!1,this.disabled=!1,this.allowEmptyTime=!1,this.mousewheel=!0,this.arrowkeys=!0,this.showSpinners=!0,this.showSeconds=!1,this.showMinutes=!0,this.hoursPlaceholder="HH",this.minutesPlaceholder="MM",this.secondsPlaceholder="SS",this.ariaLabelHours="hours",this.ariaLabelMinutes="minutes",this.ariaLabelSeconds="seconds"}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),bK={value:void 0,config:new gK,controls:{canIncrementHours:!0,canIncrementMinutes:!0,canIncrementSeconds:!0,canDecrementHours:!0,canDecrementMinutes:!0,canDecrementSeconds:!0,canToggleMeridian:!0}};function yK(e=bK,t){switch(t.type){case YG.WRITE_VALUE:return Object.assign({},e,{value:t.payload});case YG.CHANGE_HOURS:{if(!fK(e.config,t.payload)||!function(e,t){return!(!e.step||e.step>0&&!t.canIncrementHours||e.step<0&&!t.canDecrementHours)}(t.payload,e.controls))return e;let i=aK(e.value,{hour:t.payload.step});return!e.config.max&&!e.config.min||eK(e.config,i)?Object.assign({},e,{value:i}):e}case YG.CHANGE_MINUTES:{if(!fK(e.config,t.payload)||!function(e,t){return!(!e.step||e.step>0&&!t.canIncrementMinutes||e.step<0&&!t.canDecrementMinutes)}(t.payload,e.controls))return e;let i=aK(e.value,{minute:t.payload.step});return!e.config.max&&!e.config.min||eK(e.config,i)?Object.assign({},e,{value:i}):e}case YG.CHANGE_SECONDS:{if(!fK(e.config,t.payload)||!function(e,t){return!(!e.step||e.step>0&&!t.canIncrementSeconds||e.step<0&&!t.canDecrementSeconds)}(t.payload,e.controls))return e;let i=aK(e.value,{seconds:t.payload.step});return!e.config.max&&!e.config.min||eK(e.config,i)?Object.assign({},e,{value:i}):e}case YG.SET_TIME_UNIT:{if(!fK(e.config))return e;let i=oK(e.value,t.payload);return Object.assign({},e,{value:i})}case YG.UPDATE_CONTROLS:{let i=function(e,t){let{min:i,max:n,hourStep:r,minuteStep:s,secondsStep:a,showSeconds:o}=t,l={canIncrementHours:!0,canIncrementMinutes:!0,canIncrementSeconds:!0,canDecrementHours:!0,canDecrementMinutes:!0,canDecrementSeconds:!0,canToggleMeridian:!0};if(!e)return l;if(n){let t=aK(e,{hour:r});if(l.canIncrementHours=n>t&&e.getHours()+r<24,!l.canIncrementHours){let t=aK(e,{minute:s});l.canIncrementMinutes=o?n>t:n>=t}if(!l.canIncrementMinutes){let t=aK(e,{seconds:a});l.canIncrementSeconds=n>=t}e.getHours()<12&&(l.canToggleMeridian=aK(e,{hour:12})<n)}if(i){let t=aK(e,{hour:-r});if(l.canDecrementHours=i<t,!l.canDecrementHours){let t=aK(e,{minute:-s});l.canDecrementMinutes=o?i<t:i<=t}if(!l.canDecrementMinutes){let t=aK(e,{seconds:-a});l.canDecrementSeconds=i<=t}e.getHours()>=12&&(l.canToggleMeridian=aK(e,{hour:-12})>i)}return l}(e.value,t.payload),n={value:e.value,config:t.payload,controls:i};return e.config.showMeridian!==n.config.showMeridian&&e.value&&(n.value=new Date(e.value)),Object.assign({},e,n)}default:return e}}var vK=(()=>{class e extends TG{constructor(){let e=new Tt({type:"[mini-ngrx] dispatcher init"});super(e,yK,new xG(bK,e,yK))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),wK={provide:s_,useExisting:An((()=>_K)),multi:!0},_K=(()=>{class e{constructor(e,t,i,n){this._cd=t,this._store=i,this._timepickerActions=n,this.hourStep=1,this.minuteStep=5,this.secondsStep=10,this.readonlyInput=!1,this.disabled=!1,this.mousewheel=!0,this.arrowkeys=!0,this.showSpinners=!0,this.showMeridian=!0,this.showMinutes=!0,this.showSeconds=!1,this.meridians=["AM","PM"],this.hoursPlaceholder="HH",this.minutesPlaceholder="MM",this.secondsPlaceholder="SS",this.isValid=new _l,this.meridianChange=new _l,this.hours="",this.minutes="",this.seconds="",this.meridian="",this.invalidHours=!1,this.invalidMinutes=!1,this.invalidSeconds=!1,this.labelHours="hours",this.labelMinutes="minutes",this.labelSeconds="seconds",this.canIncrementHours=!0,this.canIncrementMinutes=!0,this.canIncrementSeconds=!0,this.canDecrementHours=!0,this.canDecrementMinutes=!0,this.canDecrementSeconds=!0,this.canToggleMeridian=!0,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.config=e,Object.assign(this,this.config),this.timepickerSub=i.select((e=>e.value)).subscribe((e=>{this._renderTime(e),this.onChange(e),this._store.dispatch(this._timepickerActions.updateControls(mK(this)))})),i.select((e=>e.controls)).subscribe((e=>{let i=hK(this.hours,this.minutes,this.seconds,this.isPM()),n=this.config.allowEmptyTime&&this.isOneOfDatesIsEmpty()||i;this.isValid.emit(n),Object.assign(this,e),t.markForCheck()}))}get isSpinnersVisible(){return this.showSpinners&&!this.readonlyInput}get isEditable(){return!(this.readonlyInput||this.disabled)}resetValidation(){this.invalidHours=!1,this.invalidMinutes=!1,this.invalidSeconds=!1}isPM(){return this.showMeridian&&this.meridian===this.meridians[1]}prevDef(e){e.preventDefault()}wheelSign(e){return-1*Math.sign(e.deltaY||0)}ngOnChanges(){this._store.dispatch(this._timepickerActions.updateControls(mK(this)))}changeHours(e,t=""){this.resetValidation(),this._store.dispatch(this._timepickerActions.changeHours({step:e,source:t}))}changeMinutes(e,t=""){this.resetValidation(),this._store.dispatch(this._timepickerActions.changeMinutes({step:e,source:t}))}changeSeconds(e,t=""){this.resetValidation(),this._store.dispatch(this._timepickerActions.changeSeconds({step:e,source:t}))}updateHours(e){this.resetValidation(),this.hours=e.value;let t=dK(this.hours,this.isPM())&&this.isValidLimit();if(!(this.config.allowEmptyTime&&this.isOneOfDatesIsEmpty()||t))return this.invalidHours=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()}updateMinutes(e){this.resetValidation(),this.minutes=e.value;let t=uK(this.minutes)&&this.isValidLimit();if(!(this.config.allowEmptyTime&&this.isOneOfDatesIsEmpty()||t))return this.invalidMinutes=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()}updateSeconds(e){this.resetValidation(),this.seconds=e.value;let t=pK(this.seconds)&&this.isValidLimit();if(!(this.config.allowEmptyTime&&this.isOneOfDatesIsEmpty()||t))return this.invalidSeconds=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()}isValidLimit(){return function(e,t,i){let n=oK(new Date,e);return!(!n||t&&n>t||i&&n<i)}({hour:this.hours,minute:this.minutes,seconds:this.seconds,isPM:this.isPM()},this.max,this.min)}isOneOfDatesIsEmpty(){return function(e,t,i){return 0===e.length||0===t.length||0===i.length}(this.hours,this.minutes,this.seconds)}_updateTime(){let e=this.showSeconds?this.seconds:void 0,t=this.showMinutes?this.minutes:void 0,i=hK(this.hours,t,e,this.isPM());if(!(this.config.allowEmptyTime&&this.isOneOfDatesIsEmpty()||i))return this.isValid.emit(!1),void this.onChange(null);this._store.dispatch(this._timepickerActions.setTime({hour:this.hours,minute:this.minutes,seconds:this.seconds,isPM:this.isPM()}))}toggleMeridian(){this.showMeridian&&this.isEditable&&this._store.dispatch(this._timepickerActions.changeHours({step:12,source:""}))}writeValue(e){XG(e)?(this.resetValidation(),this._store.dispatch(this._timepickerActions.writeValue(sK(e)))):null==e&&this._store.dispatch(this._timepickerActions.writeValue())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._cd.markForCheck()}ngOnDestroy(){this.timepickerSub?.unsubscribe()}_renderTime(e){if(!e||!XG(e))return this.hours="",this.minutes="",this.seconds="",this.meridian=this.meridians[0],void this.meridianChange.emit(this.meridian);let t=sK(e);if(!t)return;let i=t.getHours();this.showMeridian&&(this.meridian=this.meridians[i>=12?1:0],this.meridianChange.emit(this.meridian),i%=12,0===i&&(i=12)),this.hours=cK(i),this.minutes=cK(t.getMinutes()),this.seconds=cK(t.getUTCSeconds())}static{this.ɵfac=function(t){return new(t||e)($d(gK),$d(kg),$d(vK),$d(YG))}}static{this.ɵcmp=Qr({type:e,selectors:[["timepicker"]],inputs:{hourStep:"hourStep",minuteStep:"minuteStep",secondsStep:"secondsStep",readonlyInput:"readonlyInput",disabled:"disabled",mousewheel:"mousewheel",arrowkeys:"arrowkeys",showSpinners:"showSpinners",showMeridian:"showMeridian",showMinutes:"showMinutes",showSeconds:"showSeconds",meri
1dians:"meridians",min:"min",max:"max",hoursPlaceholder:"hoursPlaceholder",minutesPlaceholder:"minutesPlaceholder",secondsPlaceholder:"secondsPlaceholder"},outputs:{isValid:"isValid",meridianChange:"meridianChange"},standalone:!0,features:[xm([wK,vK,YG]),ga,Pm],decls:31,vars:33,consts:[[1,"text-center",3,"hidden"],["href","javascript:void(0);",1,"btn","btn-link",3,"click"],[1,"bs-chevron","bs-chevron-up"],[4,"ngIf"],[1,"form-group","mb-3"],["type","text","maxlength","2",1,"form-control","text-center","bs-timepicker-field",3,"wheel","keydown.ArrowUp","keydown.ArrowDown","change","placeholder","readonly","disabled","value"],["class","form-group mb-3",3,"has-error",4,"ngIf"],[1,"bs-chevron","bs-chevron-down"],["type","button",1,"btn","btn-default","text-center",3,"click","disabled"]],template:function(e,t){1&e&&(kf(0,"table")(1,"tbody")(2,"tr",0)(3,"td")(4,"a",1),jf("click",(function(){return t.changeHours(t.hourStep)})),Tf(5,"span",2),xf()(),ph(6,PG,2,0,"td",3)(7,EG,3,2,"td",3)(8,DG,2,0,"td",3)(9,OG,3,2,"td",3)(10,BG,2,0,"td",3)(11,MG,1,0,"td",3),xf(),kf(12,"tr")(13,"td",4)(14,"input",5),jf("wheel",(function(e){return t.prevDef(e),t.changeHours(t.hourStep*t.wheelSign(e),"wheel")}))("keydown.ArrowUp",(function(){return t.changeHours(t.hourStep,"key")}))("keydown.ArrowDown",(function(){return t.changeHours(-t.hourStep,"key")}))("change",(function(e){return t.updateHours(e.target)})),xf()(),ph(15,RG,2,0,"td",3)(16,LG,2,9,"td",6)(17,FG,2,0,"td",3)(18,NG,2,9,"td",6)(19,UG,2,0,"td",3)(20,VG,3,4,"td",3),xf(),kf(21,"tr",0)(22,"td")(23,"a",1),jf("click",(function(){return t.changeHours(-t.hourStep)})),Tf(24,"span",7),xf()(),ph(25,qG,2,0,"td",3)(26,$G,3,2,"td",3)(27,jG,2,0,"td",3)(28,zG,3,2,"td",3)(29,WG,2,0,"td",3)(30,HG,1,0,"td",3),xf()()()),2&e&&(Vd(2),zh("hidden",!t.showSpinners),Vd(2),Yh("disabled",!t.canIncrementHours||!t.isEditable),Vd(2),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showMeridian),Vd(),zh("ngIf",t.showMeridian),Vd(2),Yh("has-error",t.invalidHours),Vd(),Yh("is-invalid",t.invalidHours),zh("placeholder",t.hoursPlaceholder)("readonly",t.readonlyInput)("disabled",t.disabled)("value",t.hours),gh("aria-label",t.labelHours),Vd(),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showMeridian),Vd(),zh("ngIf",t.showMeridian),Vd(),zh("hidden",!t.showSpinners),Vd(2),Yh("disabled",!t.canDecrementHours||!t.isEditable),Vd(2),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showMinutes),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showSeconds),Vd(),zh("ngIf",t.showMeridian),Vd(),zh("ngIf",t.showMeridian))},dependencies:[cy],styles:[".bs-chevron{border-style:solid;display:block;width:9px;height:9px;position:relative;border-width:3px 0px 0 3px}.bs-chevron-up{-webkit-transform:rotate(45deg);transform:rotate(45deg);top:2px}.bs-chevron-down{-webkit-transform:rotate(-135deg);transform:rotate(-135deg);top:-2px}.bs-timepicker-field{width:65px;padding:.375rem .55rem}\n"],encapsulation:2,changeDetection:0})}}return e})(),SK=(()=>{class e{static forRoot(){return{ngModule:e,providers:[]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({})}}return e})(),CK=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(CK||{}),IK="*";function AK(e,t=null){return{type:CK.Animate,styles:t,timings:e}}function kK(e){return{type:CK.Style,styles:e,offset:null}}function xK(e,t,i){return{type:CK.State,name:e,styles:t,options:i}}function TK(e,t,i=null){return{type:CK.Transition,expr:e,animation:t,options:i}}var PK=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach((e=>e())),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask((()=>this._onFinish()))}_onStart(){this._onStartFns.forEach((e=>e())),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach((e=>e())),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((e=>e())),t.length=0}},EK=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,n=0,r=this.players.length;0==r?queueMicrotask((()=>
1this._onFinish())):this.players.forEach((e=>{e.onDone((()=>{++t==r&&this._onFinish()})),e.onDestroy((()=>{++i==r&&this._onDestroy()})),e.onStart((()=>{++n==r&&this._onStart()}))})),this.totalTime=this.players.reduce(((e,t)=>Math.max(e,t.totalTime)),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach((e=>e())),this._onDoneFns=[])}init(){this.players.forEach((e=>e.init()))}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((e=>e())),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((e=>e.play()))}pause(){this.players.forEach((e=>e.pause()))}restart(){this.players.forEach((e=>e.restart()))}finish(){this._onFinish(),this.players.forEach((e=>e.finish()))}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((e=>e.destroy())),this._onDestroyFns.forEach((e=>e())),this._onDestroyFns=[])}reset(){this.players.forEach((e=>e.reset())),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach((e=>{let i=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(i)}))}getPosition(){let e=this.players.reduce(((e,t)=>null===e||t.totalTime>e.totalTime?t:e),null);return null!=e?e.getPosition():0}beforeDestroy(){this.players.forEach((e=>{e.beforeDestroy&&e.beforeDestroy()}))}triggerCallback(e){let t="start"==e?this._onStartFns:this._onDoneFns;t.forEach((e=>e())),t.length=0}},DK=["*"],OK=(()=>{class e{constructor(){this.adaptivePosition=!0,this.placement="top",this.triggers="hover focus",this.delay=0}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),BK=(()=>{class e{get _bsVersions(){return UV()}constructor(e){Object.assign(this,e)}ngAfterViewInit(){this.classMap={in:!1,fade:!1},this.placement&&(this._bsVersions.isBs5&&(this.placement=jV[this.placement]),this.classMap[this.placement]=!0),this.classMap[`tooltip-${this.placement}`]=!0,this.classMap.in=!0,this.animation&&(this.classMap.fade=!0),this.containerClass&&(this.classMap[this.containerClass]=!0)}static{this.ɵfac=function(t){return new(t||e)($d(OK))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-tooltip-container"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(e,t){2&e&&(gh("id",t.id),Kh("show tooltip in tooltip-"+t.placement+" bs-tooltip-"+t.placement+" "+t.placement+" "+t.containerClass))},standalone:!0,features:[Pm],ngContentSelectors:DK,decls:3,vars:0,consts:[[1,"tooltip-arrow","arrow"],[1,"tooltip-inner"]],template:function(e,t){1&e&&(Kf(),Tf(0,"div",0),kf(1,"div",1),Qf(2),xf())},styles:[".tooltip[_nghost-%COMP%]{display:block;pointer-events:none;position:absolute}.tooltip[_nghost-%COMP%] .tooltip-arrow[_ngcontent-%COMP%]{position:absolute}"],changeDetection:0})}}return e})(),MK=0,RK=(()=>{class e{get isOpen(){return this._tooltip.isShown}set isOpen(e){e?this.show():this.hide()}set htmlContent(e){this.tooltip=e}set _placement(e){this.placement=e}set _isOpen(e){this.isOpen=e}get _isOpen(){return this.isOpen}set _enable(e){this.isDisabled=!e}get _enable(){return this.isDisabled}set _appendToBody(e){this.container=e?"body":this.container}get _appendToBody(){return"body"===this.container}set _popupClass(e){}set _tooltipContext(e){}set _tooltipPopupDelay(e){this.delay=e}get _tooltipTrigger(){return this.triggers}set _tooltipTrigger(e){this.triggers=(e||"").toString()}constructor(e,t,i,n,r,s){this._elementRef=n,this._renderer=r,this._positionService=s,this.tooltipId=MK++,this.adaptivePosition=!0,this.tooltipChange=new _l,this.placement="top",this.triggers="hover focus",this.containerClass="",this.isDisabled=!1,this.delay=0,this.tooltipAnimation=!0,this.tooltipFadeDuration=150,this.tooltipStateChanged=new _l,this._tooltip=t.createLoader(this._elementRef,e,this._renderer).provide({provide:OK,useValue:i}),Object.assign(this,i),this.onShown=this._tooltip.onShown,this.onHidden=this._tooltip.onHidden}ngOnInit(){this._tooltip.listen({triggers:this.triggers,show:()=>this.show()}),this.tooltipChange.subscribe((e=>{e||this._tooltip.hide()})),this.onShown.subscribe((()=>{this.setAriaDescribedBy()})),this.onHidden.subscribe((()=>{this.setAriaDescribedBy()}))}setAriaDescribedBy(){this._ariaDescribedby=this.isOpen?`tooltip-${this.tooltipId}`:void 0,this._ariaDescribedby?this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ariaDescribedby):this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby")}toggle(){if(this.isOpen)return this.hide();this.show()}show(){if(this._positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition},preventOverflow:{enabled:this.adaptivePosition,boundariesElement:this.boundariesElement||"scrollParent"}}}),this.isOpen||this.isDisabled||this._delayTimeoutId||!this.tooltip)return;let e=()=>{this._delayTimeoutId&&(this._delayTimeoutId=void 0),this._tooltip.attach(BK).to(this.container).position({attachment:this.placement}).show({content:this.tooltip,placement:this.placement,containerClass:this.containerClass,id:`tooltip-${this.tooltipId}`})},t=()=>{this._tooltipCancelShowFn&&this._tooltipCancelShowFn()};this.delay?(this._delaySubscription&&this._delaySubscription.unsubscribe(),this._delaySubscription=Ni(this.delay).subscribe((()=>{e(),t()}
1)),this.triggers&&BV(this.triggers).forEach((e=>{e.close&&(this._tooltipCancelShowFn=this._renderer.listen(this._elementRef.nativeElement,e.close,(()=>{this._delaySubscription?.unsubscribe(),t()})))}))):e()}hide(){this._delayTimeoutId&&(clearTimeout(this._delayTimeoutId),this._delayTimeoutId=void 0),this._tooltip.isShown&&(this._tooltip.instance?.classMap&&(this._tooltip.instance.classMap.in=!1),setTimeout((()=>{this._tooltip.hide()}),this.tooltipFadeDuration))}ngOnDestroy(){this._tooltip.dispose(),this.tooltipChange.unsubscribe(),this._delaySubscription&&this._delaySubscription.unsubscribe(),this.onShown.unsubscribe(),this.onHidden.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(yp),$d(Pq),$d(OK),$d(Vl),$d(dp),$d(Iq))}}static{this.ɵdir=ts({type:e,selectors:[["","tooltip",""],["","tooltipHtml",""]],inputs:{adaptivePosition:"adaptivePosition",tooltip:"tooltip",placement:"placement",triggers:"triggers",container:"container",containerClass:"containerClass",boundariesElement:"boundariesElement",isOpen:"isOpen",isDisabled:"isDisabled",delay:"delay",htmlContent:[0,"tooltipHtml","htmlContent"],_placement:[0,"tooltipPlacement","_placement"],_isOpen:[0,"tooltipIsOpen","_isOpen"],_enable:[0,"tooltipEnable","_enable"],_appendToBody:[0,"tooltipAppendToBody","_appendToBody"],tooltipAnimation:"tooltipAnimation",_popupClass:[0,"tooltipClass","_popupClass"],_tooltipContext:[0,"tooltipContext","_tooltipContext"],_tooltipPopupDelay:[0,"tooltipPopupDelay","_tooltipPopupDelay"],tooltipFadeDuration:"tooltipFadeDuration",_tooltipTrigger:[0,"tooltipTrigger","_tooltipTrigger"]},outputs:{tooltipChange:"tooltipChange",onShown:"onShown",onHidden:"onHidden",tooltipStateChanged:"tooltipStateChanged"},exportAs:["bs-tooltip"],standalone:!0,features:[xm([Pq,Iq])]})}}return function(e,t,i,n){var r,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(a=(s<3?r(a):s>3?r(t,i,a):r(t,i))||a);s>3&&a&&Object.defineProperty(t,i,a)}([VV(),Wt("design:type",Object)],e.prototype,"tooltip",void 0),e})(),LK=(()=>{class e{static forRoot(){return{ngModule:e,providers:[]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})();function FK(e,t){if(1&e){let e=Mf();kf(0,"button",2),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf().selectFromRanges(t))})),am(1),xf()}if(2&e){let e=t.$implicit;Yh("selected",Yf().compareRanges(e)),Vd(),cm(" ",e.label," ")}}function NK(e,t){if(1&e){let e=Mf();Ef(0),am(1," â "),kf(2,"button",2),jf("click",(function(){return Wa(e),Ha(Yf().view("month"))})),kf(3,"span"),am(4),xf()(),Df()}if(2&e){let e=Yf();Vd(2),zh("disabled",e.isDisabled),Vd(2),lm(e.calendar.monthTitle)}}var UK=[[["bs-datepicker-navigation-view"]],"*"],VK=["bs-datepicker-navigation-view","*"];function qK(e,t){1&e&&Tf(0,"bs-current-date",4)}function $K(e,t){1&e&&Tf(0,"bs-timepicker")}function jK(e,t){if(1&e){let e=Mf();kf(0,"td",4),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).viewYear(t))}))("mouseenter",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).hoverYear(t,!0))}))("mouseleave",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).hoverYear(t,!1))})),kf(1,"span"),am(2),xf()()}if(2&e){let e=t.$implicit;Yh("disabled",e.isDisabled)("is-highlighted",e.isHovered),Vd(),Yh("selected",e.isSelected),Vd(),lm(e.label)}}function zK(e,t){if(1&e&&(kf(0,"tr"),ph(1,jK,3,7,"td",3),xf()),2&e){let e=t.$implicit;Vd(),zh("ngForOf",e)}}function WK(e,t){if(1&e){let e=Mf();kf(0,"td",4),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).viewMonth(t))}))("mouseenter",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).hoverMonth(t,!0))}))("mouseleave",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).hoverMonth(t,!1))})),kf(1,"span"),am(2),xf()()}if(2&e){let e=t.$implicit;Yh("disabled",e.isDisabled)("is-highlighted",e.isHovered),Vd(),Yh("selected",e.isSelected),Vd(),lm(e.label)}}function HK(e,t){if(1&e&&(kf(0,"tr"),ph(1,WK,3,7,"td",3),xf()),2&e){let e=t.$implicit;Vd(),zh("ngForOf",e)}}var YK=["bsDatepickerDayDecorator",""];function GK(e,t){1&e&&Tf(0,"th")}function KK(e,t){if(1&e&&(kf(0,"th",5),am(1),xf()),2&e){let e=t.index,i=Yf();Vd(),cm("",i.calendar.weekdays[e]," ")}}function QK(e,t){if(1&e){let e=Mf();kf(0,"span",11),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf().selectWeek(t))})),am(1),xf()}if(2&e){let e=Yf(2).index,t=Yf();Vd(),lm(t.calendar.weekNumbers[e])}}function JK(e,t){if(1&e){let e=Mf();kf(0,"span",12),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf().selectWeek(t))}))("mouseenter",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf().weekHoverHandler(t,!0))}))("mouseleave",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf().weekHoverHandler(t,!1))})),am(1),xf()}if(2&e){let e=Yf(2).index,t=Yf();Vd(),lm(t.calendar.weekNumbers[e])}}function ZK(e,t){if(1&e&&(kf(0,"td",8),ph(1,QK,2,1,"span",9)(2,JK,2,1,"span",10),xf()),2&e){let e=Yf(2);Yh("active-week",e.isWeekHovered),Vd(),zh("ngIf",e.isiOS),Vd(),zh("ngIf",!e.isiOS)}}function XK(e,t){if(1&e){let e=Mf();kf(0,"span",17),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).selectDay(t))}))("mouseenter",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).hoverDay(t,!0))}))("mouseleave",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).hoverDay(t,!1))})),am(1),xf()}if(2&e){let e=Yf().$implicit;Jf("tooltip",e.tooltipText),zh("day",e),Vd(),cm("",e.label," 3")}}function eQ(e,t){if(1&e){let e=Mf();kf(0,"span",18),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).selectDay(t))}))("mouseenter",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).hoverDay(t,!0))}))("mouseleave",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).hoverDay(t,!1))})),am(1),xf()}if(2&e){let e=Yf().$implicit;zh("day",e),Vd(),cm("",e.label," 2")}}function tQ(e,t){if(1&e){let e=Mf();kf(0,"span",19),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(2).selectDay(t))})),am(1),xf()}if(2&e){let e=Yf().$implicit;zh("day",e),Vd(),cm("",e.label," 1")}}function iQ(e,t){if(1&e&&(kf(0,"td",13),ph(1,XK,2,3,"span",14)(2,eQ,2,2,"span",15)(3,tQ,2,2,"span",16),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isiOS&&e.isShowTooltip),Vd(),zh("ngIf",!e.isiOS&&!e.isShowTooltip),Vd(),zh("ngIf",e.isiOS)}}function nQ(e,t){if(1&e&&(kf(0,"tr"),ph(1,ZK,3,4,"td",6)(2,iQ,4,3,"td",7),xf()),2&e){let e=t.$implicit,i=Yf();Vd(),zh("ngIf",i.options&&i.options.showWeekNumbers),Vd(),zh("ngForOf",e.days)}}var rQ=["startTP"];function sQ(e,t){if(1&e){let e=Mf();kf(0,"bs-days-calendar-view",13),qm(1,"async"),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).dayHoverHandler(t))}))("onHoverWeek",(function(t){return Wa(e),Ha(Yf(3).weekHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).daySelectHandler(t))})),xf()}if(2&e){let e=t.$implicit,i=Yf(3);Yh("bs-datepicker-multiple",i.multipleCalendars),zh("calendar",e)("isDisabled",i.isDatePickerDisabled)("options",$m(1,5,i.options$))}}function aQ(e,t){if(1&e&&Tf(0,"timepicker",15,1),2&e){zh("disabled",Yf(4).isDatePickerDisabled)}}function oQ(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"timepicker",15,0),ph(3,aQ,2,1,"timepicker",16),xf()),2&e){let e=Yf(3);Vd(),zh("disabled",e.isDatePickerDisabled),Vd(2),zh("ngIf",e.isRangePicker)}}
1function lQ(e,t){if(1&e&&(Ef(0),kf(1,"div",10),ph(2,sQ,2,7,"bs-days-calendar-view",11),qm(3,"async"),xf(),ph(4,oQ,4,2,"div",12),Df()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",$m(3,2,e.daysCalendar$)),Vd(2),zh("ngIf",e.withTimepicker)}}function cQ(e,t){if(1&e){let e=Mf();kf(0,"bs-month-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).monthHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).monthSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function dQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,cQ,1,3,"bs-month-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.monthsCalendar))}}function uQ(e,t){if(1&e){let e=Mf();kf(0,"bs-years-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).yearHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).yearSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function pQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,uQ,1,3,"bs-years-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.yearsCalendar))}}function hQ(e,t){1&e&&(kf(0,"div",19)(1,"button",20),am(2,"Apply"),xf(),kf(3,"button",21),am(4,"Cancel"),xf()())}function fQ(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).setToday())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("today-left","left"===e.todayPos)("today-right","right"===e.todayPos)("today-center","center"===e.todayPos),Vd(2),lm(e.todayBtnLbl)}}function mQ(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).clearDate())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("clear-left","left"===e.clearPos)("clear-right","right"===e.clearPos)("clear-center","center"===e.clearPos),Vd(2),lm(e.clearBtnLbl)}}function gQ(e,t){if(1&e&&(kf(0,"div",19),ph(1,fQ,3,7,"div",22)(2,mQ,3,7,"div",23),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.showTodayBtn),Vd(),zh("ngIf",e.showClearBtn)}}function bQ(e,t){if(1&e){let e=Mf();kf(0,"div",27)(1,"bs-custom-date-view",28),jf("onSelect",(function(t){return Wa(e),Ha(Yf(2).setRangeOnCalendar(t))})),xf()()}if(2&e){let e=Yf(2);Vd(),zh("selectedRange",e.chosenRange)("ranges",e.customRanges)("customRangeLabel",e.customRangeBtnLbl)}}function yQ(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4),jf("@datepickerAnimation.done",(function(){return Wa(e),Ha(Yf().positionServiceEnable())})),kf(2,"div",5),qm(3,"async"),ph(4,lQ,5,4,"ng-container",6)(5,dQ,3,3,"div",7)(6,pQ,3,3,"div",7),xf(),ph(7,hQ,5,0,"div",8)(8,gQ,3,2,"div",8),xf(),ph(9,bQ,2,3,"div",9),xf()}if(2&e){let e=Yf();zh("ngClass",e.containerClass),Vd(),zh("@datepickerAnimation",e.animationState),Vd(),zh("ngSwitch",$m(3,9,e.viewMode)),Vd(2),zh("ngSwitchCase","day"),Vd(),zh("ngSwitchCase","month"),Vd(),zh("ngSwitchCase","year"),Vd(),zh("ngIf",!1),Vd(),zh("ngIf",e.showTodayBtn||e.showClearBtn),Vd(),zh("ngIf",e.customRanges&&e.customRanges.length>0)}}function vQ(e,t){if(1&e){let e=Mf();kf(0,"bs-days-calendar-view",13),qm(1,"async"),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).dayHoverHandler(t))}))("onHoverWeek",(function(t){return Wa(e),Ha(Yf(3).weekHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).daySelectHandler(t))})),xf()}if(2&e){let e=t.$implicit,i=Yf(3);Yh("bs-datepicker-multiple",i.multipleCalendars),zh("calendar",e)("isDisabled",i.isDatePickerDisabled)("options",$m(1,5,i.options$))}}function wQ(e,t){if(1&e&&Tf(0,"timepicker",15,1),2&e){zh("disabled",Yf(4).isDatePickerDisabled)}}function _Q(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"timepicker",15,0),ph(3,wQ,2,1,"timepicker",16),xf()),2&e){let e=Yf(3);Vd(),zh("disabled",e.isDatePickerDisabled),Vd(2),zh("ngIf",e.isRangePicker)}}
1function SQ(e,t){if(1&e&&(Ef(0),kf(1,"div",10),ph(2,vQ,2,7,"bs-days-calendar-view",11),qm(3,"async"),xf(),ph(4,_Q,4,2,"div",12),Df()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",$m(3,2,e.daysCalendar$)),Vd(2),zh("ngIf",e.withTimepicker)}}function CQ(e,t){if(1&e){let e=Mf();kf(0,"bs-month-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).monthHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).monthSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function IQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,CQ,1,3,"bs-month-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.monthsCalendar))}}function AQ(e,t){if(1&e){let e=Mf();kf(0,"bs-years-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).yearHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).yearSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function kQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,AQ,1,3,"bs-years-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.yearsCalendar))}}function xQ(e,t){1&e&&(kf(0,"div",19)(1,"button",20),am(2,"Apply"),xf(),kf(3,"button",21),am(4,"Cancel"),xf()())}function TQ(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).setToday())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("today-left","left"===e.todayPos)("today-right","right"===e.todayPos)("today-center","center"===e.todayPos),Vd(2),lm(e.todayBtnLbl)}}function PQ(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).clearDate())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("clear-left","left"===e.clearPos)("clear-right","right"===e.clearPos)("clear-center","center"===e.clearPos),Vd(2),lm(e.clearBtnLbl)}}function EQ(e,t){if(1&e&&(kf(0,"div",19),ph(1,TQ,3,7,"div",22)(2,PQ,3,7,"div",23),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.showTodayBtn),Vd(),zh("ngIf",e.showClearBtn)}}function DQ(e,t){if(1&e){let e=Mf();kf(0,"div",27)(1,"bs-custom-date-view",28),jf("onSelect",(function(t){return Wa(e),Ha(Yf(2).setRangeOnCalendar(t))})),xf()()}if(2&e){let e=Yf(2);Vd(),zh("selectedRange",e.chosenRange)("ranges",e.customRanges)("customRangeLabel",e.customRangeBtnLbl)}}function OQ(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4),jf("@datepickerAnimation.done",(function(){return Wa(e),Ha(Yf().positionServiceEnable())})),kf(2,"div",5),qm(3,"async"),ph(4,SQ,5,4,"ng-container",6)(5,IQ,3,3,"div",7)(6,kQ,3,3,"div",7),xf(),ph(7,xQ,5,0,"div",8)(8,EQ,3,2,"div",8),xf(),ph(9,DQ,2,3,"div",9),xf()}if(2&e){let e=Yf();zh("ngClass",e.containerClass),Vd(),zh("@datepickerAnimation",e.animationState),Vd(),zh("ngSwitch",$m(3,9,e.viewMode)),Vd(2),zh("ngSwitchCase","day"),Vd(),zh("ngSwitchCase","month"),Vd(),zh("ngSwitchCase","year"),Vd(),zh("ngIf",!1),Vd(),zh("ngIf",e.showTodayBtn||e.showClearBtn),Vd(),zh("ngIf",e.customRanges&&e.customRanges.length>0)}}var BQ=["endTP"];function MQ(e,t){if(1&e){let e=Mf();kf(0,"bs-days-calendar-view",13),qm(1,"async"),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).dayHoverHandler(t))}))("onHoverWeek",(function(t){return Wa(e),Ha(Yf(3).weekHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).daySelectHandler(t))})),xf()}if(2&e){let e=t.$implicit,i=Yf(3);Yh("bs-datepicker-multiple",i.multipleCalendars),zh("calendar",e)("isDisabled",i.isDatePickerDisabled)("options",$m(1,5,i.options$))}}function RQ(e,t){if(1&e&&Tf(0,"timepicker",15,1),2&e){zh("disabled",Yf(4).isDatePickerDisabled)}}function LQ(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"timepicker",15,0),ph(3,RQ,2,1,"timepicker",16),xf()),2&e){let e=Yf(3);Vd(),zh("disabled",e.isDatePickerDisabled),Vd(2),zh("ngIf",e.isRangePicker)}}
1function FQ(e,t){if(1&e&&(Ef(0),kf(1,"div",10),ph(2,MQ,2,7,"bs-days-calendar-view",11),qm(3,"async"),xf(),ph(4,LQ,4,2,"div",12),Df()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",$m(3,2,e.daysCalendar$)),Vd(2),zh("ngIf",e.withTimepicker)}}function NQ(e,t){if(1&e){let e=Mf();kf(0,"bs-month-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).monthHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).monthSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function UQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,NQ,1,3,"bs-month-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.monthsCalendar))}}function VQ(e,t){if(1&e){let e=Mf();kf(0,"bs-years-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).yearHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).yearSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function qQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,VQ,1,3,"bs-years-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.yearsCalendar))}}function $Q(e,t){1&e&&(kf(0,"div",19)(1,"button",20),am(2,"Apply"),xf(),kf(3,"button",21),am(4,"Cancel"),xf()())}function jQ(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).setToday())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("today-left","left"===e.todayPos)("today-right","right"===e.todayPos)("today-center","center"===e.todayPos),Vd(2),lm(e.todayBtnLbl)}}function zQ(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).clearDate())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("clear-left","left"===e.clearPos)("clear-right","right"===e.clearPos)("clear-center","center"===e.clearPos),Vd(2),lm(e.clearBtnLbl)}}function WQ(e,t){if(1&e&&(kf(0,"div",19),ph(1,jQ,3,7,"div",22)(2,zQ,3,7,"div",23),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.showTodayBtn),Vd(),zh("ngIf",e.showClearBtn)}}function HQ(e,t){if(1&e){let e=Mf();kf(0,"div",27)(1,"bs-custom-date-view",28),jf("onSelect",(function(t){return Wa(e),Ha(Yf(2).setRangeOnCalendar(t))})),xf()()}if(2&e){let e=Yf(2);Vd(),zh("selectedRange",e.chosenRange)("ranges",e.customRanges)("customRangeLabel",e.customRangeBtnLbl)}}function YQ(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4),jf("@datepickerAnimation.done",(function(){return Wa(e),Ha(Yf().positionServiceEnable())})),kf(2,"div",5),qm(3,"async"),ph(4,FQ,5,4,"ng-container",6)(5,UQ,3,3,"div",7)(6,qQ,3,3,"div",7),xf(),ph(7,$Q,5,0,"div",8)(8,WQ,3,2,"div",8),xf(),ph(9,HQ,2,3,"div",9),xf()}if(2&e){let e=Yf();zh("ngClass",e.containerClass),Vd(),zh("@datepickerAnimation",e.animationState),Vd(),zh("ngSwitch",$m(3,9,e.viewMode)),Vd(2),zh("ngSwitchCase","day"),Vd(),zh("ngSwitchCase","month"),Vd(),zh("ngSwitchCase","year"),Vd(),zh("ngIf",!1),Vd(),zh("ngIf",e.showTodayBtn||e.showClearBtn),Vd(),zh("ngIf",e.customRanges&&e.customRanges.length>0)}}function GQ(e,t){if(1&e){let e=Mf();kf(0,"bs-days-calendar-view",13),qm(1,"async"),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).dayHoverHandler(t))}))("onHoverWeek",(function(t){return Wa(e),Ha(Yf(3).weekHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).daySelectHandler(t))})),xf()}if(2&e){let e=t.$implicit,i=Yf(3);Yh("bs-datepicker-multiple",i.multipleCalendars),zh("calendar",e)("isDisabled",i.isDatePickerDisabled)("options",$m(1,5,i.options$))}}function KQ(e,t){if(1&e&&Tf(0,"timepicker",15,1),2&e){zh("disabled",Yf(4).isDatePickerDisabled)}}function QQ(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"timepicker",15,0),ph(3,KQ,2,1,"timepicker",16),xf()),2&e){let e=Yf(3);Vd(),zh("disabled",e.isDatePickerDisabled),Vd(2),zh("ngIf",e.isRangePicker)}}
1function JQ(e,t){if(1&e&&(Ef(0),kf(1,"div",10),ph(2,GQ,2,7,"bs-days-calendar-view",11),qm(3,"async"),xf(),ph(4,QQ,4,2,"div",12),Df()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",$m(3,2,e.daysCalendar$)),Vd(2),zh("ngIf",e.withTimepicker)}}function ZQ(e,t){if(1&e){let e=Mf();kf(0,"bs-month-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).monthHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).monthSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function XQ(e,t){if(1&e&&(kf(0,"div",10),ph(1,ZQ,1,3,"bs-month-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.monthsCalendar))}}function eJ(e,t){if(1&e){let e=Mf();kf(0,"bs-years-calendar-view",18),jf("onNavigate",(function(t){return Wa(e),Ha(Yf(3).navigateTo(t))}))("onViewMode",(function(t){return Wa(e),Ha(Yf(3).setViewMode(t))}))("onHover",(function(t){return Wa(e),Ha(Yf(3).yearHoverHandler(t))}))("onSelect",(function(t){return Wa(e),Ha(Yf(3).yearSelectHandler(t))})),xf()}if(2&e){let e=t.$implicit;Yh("bs-datepicker-multiple",Yf(3).multipleCalendars),zh("calendar",e)}}function tJ(e,t){if(1&e&&(kf(0,"div",10),ph(1,eJ,1,3,"bs-years-calendar-view",17),qm(2,"async"),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",$m(2,1,e.yearsCalendar))}}function iJ(e,t){1&e&&(kf(0,"div",19)(1,"button",20),am(2,"Apply"),xf(),kf(3,"button",21),am(4,"Cancel"),xf()())}function nJ(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).setToday())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("today-left","left"===e.todayPos)("today-right","right"===e.todayPos)("today-center","center"===e.todayPos),Vd(2),lm(e.todayBtnLbl)}}function rJ(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).clearDate())})),am(2),xf()()}if(2&e){let e=Yf(3);Yh("clear-left","left"===e.clearPos)("clear-right","right"===e.clearPos)("clear-center","center"===e.clearPos),Vd(2),lm(e.clearBtnLbl)}}function sJ(e,t){if(1&e&&(kf(0,"div",19),ph(1,nJ,3,7,"div",22)(2,rJ,3,7,"div",23),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.showTodayBtn),Vd(),zh("ngIf",e.showClearBtn)}}function aJ(e,t){if(1&e){let e=Mf();kf(0,"div",27)(1,"bs-custom-date-view",28),jf("onSelect",(function(t){return Wa(e),Ha(Yf(2).setRangeOnCalendar(t))})),xf()()}if(2&e){let e=Yf(2);Vd(),zh("selectedRange",e.chosenRange)("ranges",e.customRanges)("customRangeLabel",e.customRangeBtnLbl)}}function oJ(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4),jf("@datepickerAnimation.done",(function(){return Wa(e),Ha(Yf().positionServiceEnable())})),kf(2,"div",5),qm(3,"async"),ph(4,JQ,5,4,"ng-container",6)(5,XQ,3,3,"div",7)(6,tJ,3,3,"div",7),xf(),ph(7,iJ,5,0,"div",8)(8,sJ,3,2,"div",8),xf(),ph(9,aJ,2,3,"div",9),xf()}if(2&e){let e=Yf();zh("ngClass",e.containerClass),Vd(),zh("@datepickerAnimation",e.animationState),Vd(),zh("ngSwitch",$m(3,9,e.viewMode)),Vd(2),zh("ngSwitchCase","day"),Vd(),zh("ngSwitchCase","month"),Vd(),zh("ngSwitchCase","year"),Vd(),zh("ngIf",!1),Vd(),zh("ngIf",e.showTodayBtn||e.showClearBtn),Vd(),zh("ngIf",e.customRanges&&e.customRanges.length>0)}}var lJ=(()=>{class e{constructor(){this.adaptivePosition=!1,this.useUtc=!1,this.isAnimated=!1,this.startView="day",this.returnFocusToInput=!1,this.containerClass="theme-green",this.displayMonths=1,this.showWeekNumbers=!0,this.dateInputFormat="L",this.rangeSeparator=" - ",this.rangeInputFormat="L",this.monthTitle="MMMM",this.yearTitle="YYYY",this.dayLabel="D",this.monthLabel="MMMM",this.yearLabel="YYYY",this.weekNumbers="w",this.showTodayButton=!1,this.showClearButton=!1,this.todayPosition="center",this.clearPosition="right",this.todayButtonLabel="Today",this.clearButtonLabel="Clear",this.customRangeButtonLabel="Custom Range",this.withTimepicker=!1,this.allowedPositions=["top","bottom"],this.keepDatepickerOpened=!1,this.keepDatesOutOfRules=!1}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),cJ="220ms cubic-bezier(0, 0, 0.2, 1)",dJ=function(e,t){return{type:CK.Trigger,name:e,definitions:t,options:{}}}("datepickerAnimation",[xK("animated-down",kK({height:"*",overflow:"hidden"})),TK("* => animated-down",[kK({height:0,overflow:"hidden"}),AK(cJ)]),xK("animated-up",kK({height:"*",overflow:"hidden"})),TK("* => animated-up",[kK({height:"*",overflow:"hidden"}),AK(cJ)]),TK("* => unanimated",AK("0s"))]),uJ=class{constructor(){this.containerClass="",this.customRanges=[],this.chosen
1Range=[],this._daysCalendarSub=new Ye,this.selectedTimeSub=new Ye}set minDate(e){this._effects?.setMinDate(e)}set maxDate(e){this._effects?.setMaxDate(e)}set daysDisabled(e){this._effects?.setDaysDisabled(e)}set datesDisabled(e){this._effects?.setDatesDisabled(e)}set datesEnabled(e){this._effects?.setDatesEnabled(e)}set isDisabled(e){this._effects?.setDisabled(e)}set dateCustomClasses(e){this._effects?.setDateCustomClasses(e)}set dateTooltipTexts(e){this._effects?.setDateTooltipTexts(e)}set daysCalendar$(e){this._daysCalendar$=e,this._daysCalendarSub.unsubscribe(),this._daysCalendarSub.add(this._daysCalendar$.subscribe((e=>{this.multipleCalendars=!!e&&e.length>1})))}get daysCalendar$(){return this._daysCalendar$}setViewMode(e){}navigateTo(e){}dayHoverHandler(e){}weekHoverHandler(e){}monthHoverHandler(e){}yearHoverHandler(e){}timeSelectHandler(e,t){}daySelectHandler(e){}monthSelectHandler(e){}yearSelectHandler(e){}setRangeOnCalendar(e){}setToday(){}clearDate(){}_stopPropagation(e){e.stopPropagation()}},pJ=(()=>{class e{static{this.CALCULATE="[datepicker] calculate dates matrix"}static{this.FORMAT="[datepicker] format datepicker values"}static{this.FLAG="[datepicker] set flags"}static{this.SELECT="[datepicker] select date"}static{this.NAVIGATE_OFFSET="[datepicker] shift view date"}static{this.NAVIGATE_TO="[datepicker] change view date"}static{this.SET_OPTIONS="[datepicker] update render options"}static{this.HOVER="[datepicker] hover date"}static{this.CHANGE_VIEWMODE="[datepicker] switch view mode"}static{this.SET_MIN_DATE="[datepicker] set min date"}static{this.SET_MAX_DATE="[datepicker] set max date"}static{this.SET_DAYSDISABLED="[datepicker] set days disabled"}static{this.SET_DATESDISABLED="[datepicker] set dates disabled"}static{this.SET_DATESENABLED="[datepicker] set dates enabled"}static{this.SET_IS_DISABLED="[datepicker] set is disabled"}static{this.SET_DATE_CUSTOM_CLASSES="[datepicker] set date custom classes"}static{this.SET_DATE_TOOLTIP_TEXTS="[datepicker] set date tooltip texts"}static{this.SET_LOCALE="[datepicker] set datepicker locale"}static{this.SELECT_TIME="[datepicker] select time"}static{this.SELECT_RANGE="[daterangepicker] select dates range"}calculate(){return{type:e.CALCULATE}}format(){return{type:e.FORMAT}}flag(){return{type:e.FLAG}}select(t){return{type:e.SELECT,payload:t}}selectTime(t,i){return{type:e.SELECT_TIME,payload:{date:t,index:i}}}changeViewMode(t){return{type:e.CHANGE_VIEWMODE,payload:t}}navigateTo(t){return{type:e.NAVIGATE_TO,payload:t}}navigateStep(t){return{type:e.NAVIGATE_OFFSET,payload:t}}setOptions(t){return{type:e.SET_OPTIONS,payload:t}}selectRange(t){return{type:e.SELECT_RANGE,payload:t}}hoverDay(t){return{type:e.HOVER,payload:t.isHovered?t.cell.date:null}}minDate(t){return{type:e.SET_MIN_DATE,payload:t}}maxDate(t){return{type:e.SET_MAX_DATE,payload:t}}daysDisabled(t){return{type:e.SET_DAYSDISABLED,payload:t}}datesDisabled(t){return{type:e.SET_DATESDISABLED,payload:t}}datesEnabled(t){return{type:e.SET_DATESENABLED,payload:t}}isDisabled(t){return{type:e.SET_IS_DISABLED,payload:t}}setDateCustomClasses(t){return{type:e.SET_DATE_CUSTOM_CLASSES,payload:t}}setDateTooltipTexts(t){return{type:e.SET_DATE_TOOLTIP_TEXTS,payload:t}}setLocale(t){return{type:e.SET_LOCALE,payload:t}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),hJ=(()=>{class e{constructor(){this._defaultLocale="en",this._locale=new Tt(this._defaultLocale),this._localeChange=this._locale.asObservable()}get locale(){return this._locale}get localeChange(){return this._localeChange}get currentLocale(){return this._locale.getValue()}use(e){e!==this.currentLocale&&this._locale.next(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),fJ=(()=>{class e{constructor(e,t){this._actions=e,this._localeService=t,this._subs=[]}init(e){return this._store=e,this}setValue(e){this._store?.dispatch(this._actions.select(e))}setRangeValue(e){this._store?.dispatch(this._actions.selectRange(e))}setMinDate(e){return this._store?.dispatch(this._actions.minDate(e)),this}setMaxDate(e){return this._store?.dispatch(this._actions.maxDate(e)),this}setDaysDisabled(e){return this._store?.dispatch(this._actions.daysDisabled(e)),this}setDatesDisabled(e){return this._store?.dispatch(this._actions.datesDisabled(e)),this}setDatesEnabled(e){return this._store?.dispatch(this._actions.datesEnabled(e)),this}setDisabled(e){return this._store?.dispatch(this._actions.isDisabled(e)),this}setDateCustomClasses(e){return this._store?.dispatch(this._actions.setDateCustomClasses(e)),this}setDateTooltipTexts(e){return this._store?.dispatch(this._actions.setDateTooltipTexts(e)),this}setOptions(e){let t=Object.assign({locale:this._localeService.currentLocale},e);return this._store?.dispatch(this._actions.setOptions(t)),this}setBindings(e){return this._store?(e.selectedTime=this._store.select((e=>e.selectedTime)).pipe(qi((e=>!!e))),e.daysCalendar$=this._store.select((e=>e.flaggedMonths)).pipe(qi((e=>!!e))),e.monthsCalendar=this._store.select((e=>e.flaggedMonthsCalendar)).pipe(qi((e=>!!e))),e.yearsCalendar=this._store.select((e=>e.yearsCalendarFlagged)).pipe(qi((e=>!!e))),e.viewMode=this._store.select((e=>e.view?.mode)),e.options$=ki([this._store.select((e=>e.showWeekNumbers)),this._store.select((e=>e.displayMonths))]).pipe(bi((e=>({showWeekNumbers:e[0],displayMonths:e[1]})))),this):this}setEventHandlers(e){return e.setViewMode=e=>{this._store?.dispatch(this._actions.changeViewMode(e))},e.navigateTo=e=>{this._store?.dispatch(this._actions.navigateStep(e.step))},e.dayHoverHandler=e=>{let t=e.cell;t.isOtherMonth||t.isDisabled||(this._store?.dispatch(this._actions.hoverDay(e)),t.isHovered=e.isHovered)},e.monthHoverHandler=e=>{e.cell.isHovered=e.isHovered},e.yearHoverHandler=e=>{e.cell.isHovered=e.isHovered},this}registerDatepickerSideEffects(){return this._store?(this._subs.push(this._store.select((e=>e.view)).subscribe((()=>{this._store?.dispatch(this._actions.calculate())}))),this._subs.push(this._store.select((e=>e.monthsModel)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.format())))),this._subs.push(this._store.select((e=>e.formattedMonths)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.selectedDate)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.selectedRange)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.monthsCalendar)).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.yearsCalendarModel)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.hoveredDate)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.dateCustomClasses)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._store.select((e=>e.dateTooltipTexts)).pipe(qi((e=>!!e))).subscribe((()=>this._store?.dispatch(this._actions.flag())))),this._subs.push(this._localeService.localeChange.subscribe((e=>this._store?.dispatch(this._actions.setLocale(e))))),this):this}destroy(){for(let e of this._subs)e.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)(lr(pJ),lr(hJ))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),mJ={date:new Date,mode:"day"},gJ=Object.assign(new lJ,{locale:"en",view:mJ,selectedRange:[],selectedTime:[],monthViewOptions:{width:7,height:6}});function bJ(e,t){if(function(e,t){return e.getDay()===Number(t)}(e,t.firstDayOfWeek))return e;let i=function(e,t){let i=Number(t);if(isNaN(i))return 0;if(0===i)return e;let n=e-i%7;return n<0?n+7:n}(UW(e),t.firstDayOfWeek);return AH(e,{day:-i})}function yJ(e,t,i){let n=t&&rG(DH(e,"month"),t,"day"),r=i&&nG(EH(e,"month"),i,"day");return n||r||!1}function vJ(e,t,i){let n=t&&rG(DH(e,"year"),t,"day"),r=i&&nG(EH(e,"year"),i,"day");return n||r||!1}function wJ(e,t,i){return!!(t&&cW(t)&&t.length)&&(i&&"year"===i&&!t[0].getDate()?t.some((t=>sG(e,t,"year"))):t.some((t=>sG(e,t,"date"))))}function _J(e,t,i){return!!(t&&cW(t)&&t.length)&&!t.some((t=>sG(e,t,i||"date")))}function SJ(e,t=0){let i=e&&e.yearsCalendarModel&&e.yearsCalendarModel[t];return i?.years[0]&&i.years[0][0]&&i.years[0][0].date}function CJ(e,t){return!e||!t||!e.length&&!e[0].value||e.forEach((i=>(!i||!i.value||i.value instanceof Date||!(i.value instanceof Array&&i.value.length)||(i.value=AJ(i.value,t)),e))),e}function IJ(e,t){return!e||!t||e instanceof Array&&!e.length||e instanceof Date?e:AJ(e,t)}function AJ(e,t){return e instanceof Array?e.map((e=>e&&(nG(e,t,"date")&&(e=t),e))):e}function kJ(e){return e&&TJ(e)}function xJ(e){return e?.length&&e.map((e=>e&&TJ(e))),e}function TJ(e){let t=new Date;return e.setMilliseconds(t.getMilliseconds()),e.setSeconds(t.getSeconds()),e.setMinutes(t.getMinutes()),e.setHours(t.getHours()),e}
1function PJ(e,t){let i=e.initialDate,n=new Array(e.height);for(let r=0;r<e.height;r++){n[r]=new Array(e.width);for(let s=0;s<e.width;s++)n[r][s]=t(i),i=AH(i,e.shift)}return n}function EJ(e,t){let i=function(e){return MW(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds())}(e),n=bJ(i,t);return{daysMatrix:PJ({width:t.width||0,height:t.height||0,initialDate:n,shift:{day:1}},(e=>e)),month:i}}function DJ(e,t,i){return e.map((e=>e[0]?jY(e[0],t,i):""))}function OJ(e){let t=mY(e),i=t.weekdaysShort(),n=t.firstDayOfWeek();return[...i.slice(n),...i.slice(0,n)]}function BJ(e,t){return!t||e>=t}var MJ=4,RJ=3,LJ={month:1};function FJ(e,t){let i=EH(e,"year");return{months:PJ({width:RJ,height:MJ,initialDate:i,shift:LJ},(e=>({date:e,label:jY(e,t.monthLabel,t.locale)}))),monthTitle:"",yearTitle:jY(e,t.yearTitle,t.locale),hideRightArrow:!1,hideLeftArrow:!1,disableRightArrow:!1,disableLeftArrow:!1}}var NJ=4,UJ=4,VJ=NJ*UJ,qJ=-1*(Math.floor(VJ/2)-1),$J={year:1};function jJ(e,t,i){let n=function(e,t){return t&&e.getFullYear()>=t.getFullYear()&&e.getFullYear()<t.getFullYear()+VJ?t:AH(e,{year:qJ})}(e,i),r=PJ({width:UJ,height:NJ,initialDate:n,shift:$J},(e=>({date:e,label:jY(e,t.yearLabel,t.locale)}))),s=function(e,t){let i=jY(e[0][0].date,t.yearTitle,t.locale),n=jY(e[NJ-1][UJ-1].date,t.yearTitle,t.locale);return`${i} - ${n}`}(r,t);return{years:r,monthTitle:"",yearTitle:s,hideLeftArrow:!1,hideRightArrow:!1,disableLeftArrow:!1,disableRightArrow:!1}}function zJ(e,t){!e||!isNaN(e.getTime())||(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds()))}function WJ(e=gJ,t){switch(t.type){case pJ.CALCULATE:return function(e){if(!e.view)return e;let t;t=e.displayOneMonthRange&&GJ(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths||1;let i=e.view.date;if("day"===e.view.mode&&e.monthViewOptions){e.showPreviousMonth&&e.selectedRange&&0===e.selectedRange.length&&(i=AH(i,{month:-1})),e.monthViewOptions.firstDayOfWeek=mY(e.locale).firstDayOfWeek();let n=new Array(t);for(let r=0;r<t;r++)n[r]=EJ(i,e.monthViewOptions),i=AH(i,{month:1});if(e.preventChangeToNextMonth&&e.flaggedMonths&&e.hoveredDate){let t=EJ(e.view.date,e.monthViewOptions);e.flaggedMonths.length&&e.flaggedMonths[1].month.getMonth()===t.month.getMonth()&&(n=e.flaggedMonths.map((t=>e.monthViewOptions?EJ(t.month,e.monthViewOptions):null)).filter((e=>null!==e)))}return Object.assign({},e,{monthsModel:n})}if("month"===e.view.mode){let n=new Array(t);for(let r=0;r<t;r++)n[r]=FJ(i,HJ(e)),i=AH(i,{year:1});return Object.assign({},e,{monthsCalendar:n})}if("year"===e.view.mode){let n=new Array(t);for(let r=0;r<t;r++)n[r]=jJ(i,HJ(e),"year"===e.minMode?SJ(e,r):void 0),i=AH(i,{year:VJ});return Object.assign({},e,{yearsCalendarModel:n})}return e}(e);case pJ.FORMAT:return function(e){if(!e.view)return e;if("day"===e.view.mode&&e.monthsModel){let t=e.monthsModel.map(((t,i)=>function(e,t,i){return{month:e.month,monthTitle:jY(e.month,t.monthTitle,t.locale),yearTitle:jY(e.month,t.yearTitle,t.locale),weekNumbers:DJ(e.daysMatrix,t.weekNumbers,t.locale),weekdays:OJ(t.locale),weeks:e.daysMatrix.map(((e,n)=>({days:e.map(((e,r)=>({date:e,label:jY(e,t.dayLabel,t.locale),monthIndex:i,weekIndex:n,dayIndex:r})))}))),hideLeftArrow:!1,hideRightArrow:!1,disableLeftArrow:!1,disableRightArrow:!1}}(t,HJ(e),i)));return Object.assign({},e,{formattedMonths:t})}let t=e.displayMonths||1,i=e.view.date;if("month"===e.view.mode){let n=new Array(t);for(let r=0;r<t;r++)n[r]=FJ(i,HJ(e)),i=AH(i,{year:1});return Object.assign({},e,{monthsCalendar:n})}if("year"===e.view.mode){let n=new Array(t);for(let r=0;r<t;r++)n[r]=jJ(i,HJ(e)),i=AH(i,{year:16});return Object.assign({},e,{yearsCalendarModel:n})}return e}(e);case pJ.FLAG:return function(e){if(!e.view)return e;let t=GJ(e.view.date,e.minDate,e.maxDate)?1:e.displayMonths;if(e.formattedMonths&&"day"===e.view.mode){let i=e.formattedMonths.map(((i,n)=>function(e,t){return e.weeks.forEach((i=>{i.days.forEach(((n,r)=>{let s=!jW(n.date,e.month),a=!s&&WW(n.date,t.hoveredDate),o=!s&&t.selectedRange&&WW(n.date,t.selectedRange[0]),l=!s&&t.selectedRange&&WW(n.date,t.selectedRange[1]),c=!s&&WW(n.date,t.selectedDate)||o||l,d=!s&&t.selectedRange&&function(e,t,i){return!!(e&&t&&t[0])&&(t[1]?e>t[0]&&e<=t[1]:!!i&&e>t[0]&&e<=i)}(n.date,t.selectedRange,t.hoveredDate),u=t.isDisabled||rG(n.date,t.minDate,"day")||nG(n.date,t.maxDate,"day")||function(e,t){return!(typeof t>"u"||!t||!t.length)&&t.some((t=>t===e.getDay()))}(n.date,t.daysDisabled)||wJ(n.date,t.datesDisabled)||_J(n.date,t.datesEnabled),p=new Date,h=!s&&WW(n.date,p),f=t.dateCustomClasses&&t.dateCustomClasses.map((e=>WW(n.date,e.date)?e.classes:[])).reduce(((e,t)=>e.concat(t)),[]).join(" ")||"",m=t.dateTooltipTexts&&t.dateTooltipTexts.map((e=>WW(n.date,e.date)?e.tooltipText:"")).reduce(((e,t)=>(e.push(t),e)),[]).join(" ")||"",g=Object.assign({},n,{isOtherMonth:s,isHovered:a,isSelected:c,isSelectionStart:o,isSelectionEnd:l,isInRange:d,isDisabled:u,isToday:h,customClasses:f,tooltipText:m});(n.isOtherMonth!==g.isOtherMonth||n.isHovered!==g.isHovered||n.isSelected!==g.isSelected||n.isSelectionStart!==g.isSelectionStart||n.isSelectionEnd!==g.isSelectionEnd||n.isDisabled!==g.isDisabled||n.isInRange!==g.
1isInRange||n.customClasses!==g.customClasses||n.tooltipText!==g.tooltipText)&&(i.days[r]=g)}))})),e.hideLeftArrow=t.isDisabled||!!t.monthIndex&&t.monthIndex>0&&t.monthIndex!==t.displayMonths,e.hideRightArrow=t.isDisabled||(!!t.monthIndex||0===t.monthIndex)&&!!t.displayMonths&&t.monthIndex<t.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=yJ(AH(e.month,{month:-1}),t.minDate,t.maxDate),e.disableRightArrow=yJ(AH(e.month,{month:1}),t.minDate,t.maxDate),e}(i,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,daysDisabled:e.daysDisabled,datesDisabled:e.datesDisabled,datesEnabled:e.datesEnabled,hoveredDate:e.hoveredDate,selectedDate:e.selectedDate,selectedRange:e.selectedRange,displayMonths:t,dateCustomClasses:e.dateCustomClasses,dateTooltipTexts:e.dateTooltipTexts,monthIndex:n})));return Object.assign({},e,{flaggedMonths:i})}if("month"===e.view.mode&&e.monthsCalendar){let i=e.monthsCalendar.map(((i,n)=>function(e,t){return e.months.forEach(((i,n)=>{i.forEach(((i,r)=>{let s,a=jW(i.date,t.hoveredMonth),o=t.isDisabled||wJ(i.date,t.datesDisabled)||_J(i.date,t.datesEnabled,"month")||yJ(i.date,t.minDate,t.maxDate);!t.selectedDate&&t.selectedRange?(s=jW(i.date,t.selectedRange[0]),s||(s=jW(i.date,t.selectedRange[1]))):s=jW(i.date,t.selectedDate);let l=Object.assign(i,{isHovered:a,isDisabled:o,isSelected:s});(i.isHovered!==l.isHovered||i.isDisabled!==l.isDisabled||i.isSelected!==l.isSelected)&&(e.months[n][r]=l)}))})),e.hideLeftArrow=!!t.monthIndex&&t.monthIndex>0&&t.monthIndex!==t.displayMonths,e.hideRightArrow=(!!t.monthIndex||0===t.monthIndex)&&(!!t.displayMonths||0===t.displayMonths)&&t.monthIndex<t.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=vJ(AH(e.months[0][0].date,{year:-1}),t.minDate,t.maxDate),e.disableRightArrow=vJ(AH(e.months[0][0].date,{year:1}),t.minDate,t.maxDate),e}(i,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredMonth:e.hoveredMonth,selectedDate:e.selectedDate,datesDisabled:e.datesDisabled,datesEnabled:e.datesEnabled,selectedRange:e.selectedRange,displayMonths:t,monthIndex:n})));return Object.assign({},e,{flaggedMonthsCalendar:i})}if("year"===e.view.mode&&e.yearsCalendarModel){let i=e.yearsCalendarModel.map(((i,n)=>function(e,t){e.years.forEach(((i,n)=>{i.forEach(((i,r)=>{let s,a=zW(i.date,t.hoveredYear),o=t.isDisabled||wJ(i.date,t.datesDisabled,"year")||_J(i.date,t.datesEnabled,"year")||vJ(i.date,t.minDate,t.maxDate);!t.selectedDate&&t.selectedRange?(s=zW(i.date,t.selectedRange[0]),s||(s=zW(i.date,t.selectedRange[1]))):s=zW(i.date,t.selectedDate);let l=Object.assign(i,{isHovered:a,isDisabled:o,isSelected:s});(i.isHovered!==l.isHovered||i.isDisabled!==l.isDisabled||i.isSelected!==l.isSelected)&&(e.years[n][r]=l)}))})),e.hideLeftArrow=!!t.yearIndex&&t.yearIndex>0&&t.yearIndex!==t.displayMonths,e.hideRightArrow=!!t.yearIndex&&!!t.displayMonths&&t.yearIndex<t.displayMonths&&t.yearIndex+1!==t.displayMonths,e.disableLeftArrow=vJ(AH(e.years[0][0].date,{year:-1}),t.minDate,t.maxDate);let i=e.years.length-1,n=e.years[i].length-1;return e.disableRightArrow=vJ(AH(e.years[i][n].date,{year:1}),t.minDate,t.maxDate),e}(i,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredYear:e.hoveredYear,selectedDate:e.selectedDate,datesDisabled:e.datesDisabled,datesEnabled:e.datesEnabled,selectedRange:e.selectedRange,displayMonths:t,yearIndex:n})));return Object.assign({},e,{yearsCalendarFlagged:i})}return e}(e);case pJ.NAVIGATE_OFFSET:return function(e,t){if(!e.view)return e;let i=function(e,t){if(e.view){if("year"===e.view.mode&&"year"===e.minMode){let i=SJ(e,0);if(i){let e=AH(i,{year:-qJ});return AH(e,t.payload)}}return AH(EH(e.view.date,"month"),t.payload)}}(e,t);if(!i)return e;let n={view:{mode:e.view.mode,date:i}};return Object.assign({},e,n)}(e,t);case pJ.NAVIGATE_TO:{let i=t.payload;if(!e.view||!i.unit)return e;let n,r,s=function(e,t){return MW(kH(e.getFullYear(),t.year),kH(e.getMonth(),t.month),1,kH(e.getHours(),t.hour),kH(e.getMinutes(),t.minute),kH(e.getSeconds(),t.seconds),kH(e.getMilliseconds(),t.milliseconds))}(e.view.date,i.unit);return BJ(i.viewMode,e.minMode)?(r=i.viewMode,n={view:{date:s,mode:r}}):(r=e.view.mode,n={selectedDate:s,view:{date:s,mode:r}}),Object.assign({},e,n)}case pJ.CHANGE_VIEWMODE:{if(!BJ(t.payload,e.minMode)||!e.view)return e;let i=e.view.date,n=t.payload;return Object.assign({},e,{view:{date:i,mode:n}})}case pJ.HOVER:return Object.assign({},e,{hoveredDate:t.payload});case pJ.SELECT:{if(!e.view)return e;let i={selectedDate:t.payload,view:e.view};if(Array.isArray(e.selectedTime)){let t=e.selectedTime[0];i.selectedDate&&t&&zJ(i.selectedDate,t)}let n=e.view.mode,r=YJ(t.payload||e.view.date,e.minDate,e.maxDate);return i.view={mode:n,date:r},Object.assign({},e,i)}case pJ.SELECT_TIME:{let{date:i,index:n}=t.payload,r=e.selectedTime?[...e.selectedTime]:[];return r[n]=i,Object.assign({},e,{selectedTime:r})}case pJ.SET_OPTIONS:{if(!e.view)return e;
1let i=t.payload,n=i.minMode?i.minMode:e.view.mode,r=YJ(aW(i.value)&&i.value||cW(i.value)&&aW(i.value[0])&&i.value[0]||e.view.date,i.minDate,i.maxDate);return i.view={mode:n,date:r},i.value&&(cW(i.value)&&(i.selectedRange=i.value,i.selectedTime=i.value.map((e=>e))),i.value instanceof Date&&(i.selectedDate=i.value,i.selectedTime=[i.value])),Object.assign({},e,i)}case pJ.SELECT_RANGE:{if(!e.view)return e;let i={selectedRange:t.payload,view:e.view};i.selectedRange?.forEach(((t,i)=>{if(Array.isArray(e.selectedTime)){let n=e.selectedTime[i];n&&zJ(t,n)}}));let n=e.view.mode,r=YJ(t.payload&&t.payload[0]||e.view.date,e.minDate,e.maxDate);return i.view={mode:n,date:r},Object.assign({},e,i)}case pJ.SET_MIN_DATE:return Object.assign({},e,{minDate:t.payload});case pJ.SET_MAX_DATE:return Object.assign({},e,{maxDate:t.payload});case pJ.SET_IS_DISABLED:return Object.assign({},e,{isDisabled:t.payload});case pJ.SET_DATE_CUSTOM_CLASSES:return Object.assign({},e,{dateCustomClasses:t.payload});case pJ.SET_DATE_TOOLTIP_TEXTS:return Object.assign({},e,{dateTooltipTexts:t.payload});default:return e}}function HJ(e){return{locale:e.locale,monthTitle:e.monthTitle,yearTitle:e.yearTitle,dayLabel:e.dayLabel,monthLabel:e.monthLabel,yearLabel:e.yearLabel,weekNumbers:e.weekNumbers}}function YJ(e,t,i){let n=Array.isArray(e)?e[0]:e;return t&&nG(t,n,"day")?t:i&&rG(i,n,"day")?i:n}function GJ(e,t,i){return!(!i||!sG(i,e,"day"))||t&&i&&t.getMonth()===i.getMonth()}var KJ,QJ,JJ=(()=>{class e extends TG{constructor(){let e=new Tt({type:"[datepicker] dispatcher init"});super(e,WJ,new xG(gJ,e,WJ))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"platform"})}}return e})(),ZJ=(()=>{class e{constructor(){this.onSelect=new _l}selectFromRanges(e){this.onSelect.emit(e)}compareRanges(e){return JSON.stringify(e?.value)===JSON.stringify(this.selectedRange)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-custom-date-view"]],inputs:{ranges:"ranges",selectedRange:"selectedRange",customRangeLabel:"customRangeLabel"},outputs:{onSelect:"onSelect"},standalone:!0,features:[Pm],decls:2,vars:1,consts:[[1,"bs-datepicker-predefined-btns"],["type","button","class","btn",3,"selected","click",4,"ngFor","ngForOf"],["type","button",1,"btn",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",0),ph(1,FK,2,3,"button",1),xf()),2&e&&(Vd(),zh("ngForOf",t.ranges))},dependencies:[oy],encapsulation:2,changeDetection:0})}}return e})(),XJ=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(XJ||{}),eZ=(()=>{class e{constructor(){this.isDisabled=!1,this.onNavigate=new _l,this.onViewMode=new _l}navTo(e){this.onNavigate.emit(e?XJ.DOWN:XJ.UP)}view(e){this.isDisabled||this.onViewMode.emit(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-datepicker-navigation-view"]],inputs:{calendar:"calendar",isDisabled:"isDisabled"},outputs:{onNavigate:"onNavigate",onViewMode:"onViewMode"},standalone:!0,features:[Pm],decls:12,vars:9,consts:[["type","button",1,"previous",3,"click","disabled"],[4,"ngIf"],["type","button",1,"current",3,"click","disabled"],["type","button",1,"next",3,"click","disabled"]],template:function(e,t){1&e&&(kf(0,"button",0),jf("click",(function(){return t.navTo(!0)}
1)),kf(1,"span"),am(2,"â¹"),xf()(),ph(3,NK,5,2,"ng-container",1),am(4," â "),kf(5,"button",2),jf("click",(function(){return t.view("year")})),kf(6,"span"),am(7),xf()(),am(8," â "),kf(9,"button",3),jf("click",(function(){return t.navTo(!1)})),kf(10,"span"),am(11,"âº"),xf()()),2&e&&(Hh("visibility",t.calendar.hideLeftArrow?"hidden":"visible"),zh("disabled",t.calendar.disableLeftArrow),Vd(3),zh("ngIf",t.calendar&&t.calendar.monthTitle),Vd(2),zh("disabled",t.isDisabled),Vd(2),lm(t.calendar.yearTitle),Vd(2),Hh("visibility",t.calendar.hideRightArrow?"hidden":"visible"),zh("disabled",t.calendar.disableRightArrow))},dependencies:[cy],encapsulation:2,changeDetection:0})}}return e})(),tZ=(()=>{class e{constructor(){this.ampm="ok",this.hours=0,this.minutes=0}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-timepicker"]],standalone:!0,features:[Pm],decls:16,vars:3,consts:[[1,"bs-timepicker-container"],[1,"bs-timepicker-controls"],["type","button",1,"bs-decrease"],["type","text","placeholder","00",3,"value"],["type","button",1,"bs-increase"],["type","button",1,"switch-time-format"],["src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg==","alt",""]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"button",2),am(3,"-"),xf(),Tf(4,"input",3),kf(5,"button",4),am(6,"+"),xf()(),kf(7,"div",1)(8,"button",2),am(9,"-"),xf(),Tf(10,"input",3),kf(11,"button",4),am(12,"+"),xf()(),kf(13,"button",5),am(14),Tf(15,"img",6),xf()()),2&e&&(Vd(4),zh("value",t.hours),Vd(6),zh("value",t.minutes),Vd(4),cm("",t.ampm," "))},encapsulation:2})}}return e})(),iZ=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-current-date"]],inputs:{title:"title"},standalone:!0,features:[Pm],decls:3,vars:1,consts:[[1,"current-timedate"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"span"),am(2),xf()()),2&e&&(Vd(2),lm(t.title))},encapsulation:2})}}return e})(),nZ=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-calendar-layout"]],standalone:!0,features:[Pm],ngContentSelectors:VK,decls:6,vars:2,consts:[["title","hey there",4,"ngIf"],[1,"bs-datepicker-head"],[1,"bs-datepicker-body"],[4,"ngIf"],["title","hey there"]],template:function(e,t){1&e&&(Kf(UK),ph(0,qK,1,0,"bs-current-date",0),kf(1,"div",1),Qf(2),xf(),kf(3,"div",2),Qf(4,1),xf(),ph(5,$K,1,0,"bs-timepicker",3)),2&e&&(zh("ngIf",!1),Vd(5),zh("ngIf",!1))},dependencies:[cy,iZ,tZ],encapsulation:2})}}return e})(),rZ=(()=>{class e{constructor(){this.onNavigate=new _l,this.onViewMode=new _l,this.onSelect=new _l,this.onHover=new _l}navigateTo(e){let t=XJ.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t*VJ}})}viewYear(e){this.onSelect.emit(e)}hoverYear(e,t){this.onHover.emit({cell:e,isHovered:t})}changeViewMode(e){this.onViewMode.emit(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-years-calendar-view"]],inputs:{calendar:"calendar"},outputs:{onNavigate:"onNavigate",onViewMode:"onViewMode",onSelect:"onSelect",onHover:"onHover"},standalone:!0,features:[Pm],decls:5,vars:2,consts:[[3,"onNavigate","onViewMode","calendar"],["role","grid",1,"years"],[4,"ngFor","ngForOf"],["role","gridcell",3,"disabled","is-highlighted","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],["role","gridcell",3,"click","mouseenter","mouseleave"]],template:function(e,t){1&e&&(kf(0,"bs-calendar-layout")(1,"bs-datepicker-navigation-view",0),jf("onNavigate",(function(e){return t.navigateTo(e)}))("onViewMode",(function(e){return t.changeViewMode(e)}
1)),xf(),kf(2,"table",1)(3,"tbody"),ph(4,zK,2,1,"tr",2),xf()()()),2&e&&(Vd(),zh("calendar",t.calendar),Vd(3),zh("ngForOf",null==t.calendar?null:t.calendar.years))},dependencies:[nZ,eZ,oy],encapsulation:2})}}return e})(),sZ=(()=>{class e{constructor(){this.onNavigate=new _l,this.onViewMode=new _l,this.onSelect=new _l,this.onHover=new _l}navigateTo(e){let t=XJ.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t}})}viewMonth(e){this.onSelect.emit(e)}hoverMonth(e,t){this.onHover.emit({cell:e,isHovered:t})}changeViewMode(e){this.onViewMode.emit(e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-month-calendar-view"]],inputs:{calendar:"calendar"},outputs:{onNavigate:"onNavigate",onViewMode:"onViewMode",onSelect:"onSelect",onHover:"onHover"},standalone:!0,features:[Pm],decls:5,vars:2,consts:[[3,"onNavigate","onViewMode","calendar"],["role","grid",1,"months"],[4,"ngFor","ngForOf"],["role","gridcell",3,"disabled","is-highlighted","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],["role","gridcell",3,"click","mouseenter","mouseleave"]],template:function(e,t){1&e&&(kf(0,"bs-calendar-layout")(1,"bs-datepicker-navigation-view",0),jf("onNavigate",(function(e){return t.navigateTo(e)}))("onViewMode",(function(e){return t.changeViewMode(e)})),xf(),kf(2,"table",1)(3,"tbody"),ph(4,HK,2,1,"tr",2),xf()()()),2&e&&(Vd(),zh("calendar",t.calendar),Vd(3),zh("ngForOf",null==t.calendar?null:t.calendar.months))},dependencies:[nZ,eZ,oy],encapsulation:2})}}return e})(),aZ=(()=>{class e{constructor(e,t,i){this._config=e,this._elRef=t,this._renderer=i,this.day={date:new Date,label:""}}ngOnInit(){this.day?.isToday&&this._config&&this._config.customTodayClass&&this._renderer.addClass(this._elRef.nativeElement,this._config.customTodayClass),"string"==typeof this.day?.customClasses&&this.day?.customClasses.split(" ").filter((e=>e)).forEach((e=>{this._renderer.addClass(this._elRef.nativeElement,e)}))}static{this.ɵfac=function(t){return new(t||e)($d(lJ),$d(Vl),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["","bsDatepickerDayDecorator",""]],hostVars:16,hostBindings:function(e,t){2&e&&Yh("disabled",t.day.isDisabled)("is-highlighted",t.day.isHovered)("is-other-month",t.day.isOtherMonth)("is-active-other-month",t.day.isOtherMonthHovered)("in-range",t.day.isInRange)("select-start",t.day.isSelectionStart)("select-end",t.day.isSelectionEnd)("selected",t.day.isSelected)},inputs:{day:"day"},standalone:!0,features:[Pm],attrs:YK,decls:1,vars:1,template:function(e,t){1&e&&am(0),2&e&&lm(t.day&&t.day.label||"")},encapsulation:2,changeDetection:0})}}return e})(),oZ=(()=>{class e{constructor(e){this._config=e,this.onNavigate=new _l,this.onViewMode=new _l,this.onSelect=new _l,this.onHover=new _l,this.onHoverWeek=new _l,this.isiOS=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,this._config.dateTooltipTexts&&this._config.dateTooltipTexts.length>0&&(this.isShowTooltip=!0)}navigateTo(e){let t=XJ.DOWN===e?-1:1;this.onNavigate.emit({step:{month:t}})}changeViewMode(e){this.onViewMode.emit(e)}selectDay(e){this.onSelect.emit(e)}selectWeek(e){if(!this._config.selectWeek&&!this._config.selectWeekDateRange||0===e.days.length)return;if(this._config.selectWeek&&e.days[0]&&!e.days[0].isDisabled&&this._config.selectFromOtherMonth)return void this.onSelect.emit(e.days[0]);let t=e.days.find((e=>(this._config.selectFromOtherMonth||!e.isOtherMonth)&&!e.isDisabled));if(this.onSelect.emit(t),this._config.selectWeekDateRange){let t=e.days.slice(0).reverse().find((e=>(this._config.selectFromOtherMonth||!e.isOtherMonth)&&!e.isDisabled));this.onSelect.emit(t)}}weekHoverHandler(e,t){(this._config.selectWeek||this._config.selectWeekDateRange)&&e.days.find((e=>(this._config.selectFromOtherMonth||!e.isOtherMonth)&&!e.isDisabled))&&(e.isHovered=t,this.isWeekHovered=t,this.onHoverWeek.emit(e))}hoverDay(e,t){this._config.selectFromOtherMonth&&e.isOtherMonth&&(e.isOtherMonthHovered=t),this._config.dateTooltipTexts&&(e.tooltipText="",this._config.dateTooltipTexts.forEach((t=>{WW(t.date,e.date)&&(e.tooltipText=t.tooltipText)}))),this.onHover.emit({cell:e,isHovered:t})}static{this.ɵfac=function(t){return new(t||e)($d(lJ))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-days-calendar-view"]],inputs:{calendar:"calendar",options:"options",isDisabled:"isDisabled"},outputs:{onNavigate:"onNavigate",onViewMode:"onViewMode",onSelect:"onSelect",onHover:"onHover",onHoverWeek:"onHoverWeek"},standalone:!0,features:[Pm],decls:9,vars:5,consts:[[3,"onNavigate","onViewMode","calendar","isDisabled"],["role","grid",1,"days","weeks"],[4,"ngIf"],["aria-label","weekday",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],["aria-label","weekday"],["class","week",3,"active-week",4,"ngIf"],["role","gridcell",4,"ngFor","ngForOf"],[1,"week"],[3,"click",4,"ngIf"],[3,"click","mouseenter","mouseleave",4,"ngIf"],[3,"click"],[3,"click","mouseenter","mouseleave"],["role","gridcell"],["bsDatepickerDayDecorator","",3,"day","tooltip","click","mouseenter","mouseleave",4,"ngIf"],["bsDatepickerDayDecorator","",3,"day","click","mouseenter","mouseleave",4,"ngIf"],["bsDatepickerDayDecorator","",3,"day","click",4,"ngIf"],["bsDatepickerDayDecorator","",3,"click","mouseenter","mouseleave","day","tooltip"],["bsDatepickerDayDecorator","",3,"click","mouseenter","mouseleave","day"],["bsDatepickerDayDecorator","",3,"click","day"]],template:function(e,t){1&e&&(kf(0,"bs-calendar-layout")(1,"bs-datepicker-navigation-view",0),jf("onNavigate",(function(e){return t.navigateTo(e)}))("onViewMode",(function(e){return t.changeViewMode(e)})),xf(),kf(2,"table",1)(3,"thead")(4,"tr"),ph(5,GK,1,0,"th",2)(6,KK,2,1,"th",3),xf()(),kf(7,"tbody"),ph(8,nQ,3,2,"tr",4),xf()()()),2&e&&(Vd(),zh("calendar",t.calendar)("isDisabled",!!t.isDisabled),Vd(4),zh("ngIf",t.options&&t.options.showWeekNumbers),Vd(),zh("ngForOf",t.calendar.weekdays),Vd(2),zh("ngForOf",t.calendar.weeks))},dependencies:[nZ,eZ,cy,oy,aZ,LK,RK],encapsulation:2})}}return e})(),lZ=(()=>{class e extends uJ{set value(e){this._effects?.setValue(e)}get isDatePickerDisabled(){return!!this._config.isDisabled}get isDatepickerDisabled(){return this.isDatePickerDisabled?"":null}get isDatepickerReadonly(){return this.isDatePickerDisabled?"":null}constructor(e,t,i,n,r,s,a){super(),this._config=t,this._store=i,this._element=n,this._actions=r,this._positionService=a,this.valueChange=new _l,this.animationState="void",this.isRangePicker=!1,this._subs=[],this._effects=s,e.setStyle(n.nativeElement,"display","block"),e.setStyle(n.nativeElement,"position","absolute")}ngOnInit(){let e;this._positionService.setOptions({modifiers:{flip:{enabled:this._config.adaptivePosition},preventOverflow:{enabled:this._config.adaptivePosition}},allowedPositions:this._config.allowedPositions}),this._positionService.event$?.pipe(Hi(1)).subscribe((()=>{this._positionService.disable(),this._config.isAnimated?this.animationState=this.isTopPosition?"animated-up":"animated-down":this.animationState="unanimated"})),this.isOtherMonthsActive=this._config.selectFromOtherMonth,this.containerClass=this._config.containerClass,this.showTodayBtn=this._config.showTodayButton,this.todayBtnLbl=this._config.todayButtonLabel,this.todayPos=this._config.todayPosition,this.showClearBtn=this._config.showClearButton,this.clearBtnLbl=this._config.clearButtonLabel,this.clearPos=this._config.clearPosition,this.customRangeBtnLbl=this._config.customRangeButtonLabel,this.withTimepicker=this._config.withTimepicker,this._effects?.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select((e=>e.selectedDate)).subscribe((t=>{e=t,this.valueChange.emit(t)}))),this._subs.push(this._store.select((e=>e.selectedTime)).subscribe((t=>
1{!t||!t[0]||!(t[0]instanceof Date)||t[0]===e||this.valueChange.emit(t[0])}))),this._store.dispatch(this._actions.changeViewMode(this._config.startView))}ngAfterViewInit(){this.selectedTimeSub.add(this.selectedTime?.subscribe((e=>{Array.isArray(e)&&e.length>=1&&this.startTimepicker?.writeValue(e[0])}))),this.startTimepicker?.registerOnChange((e=>{this.timeSelectHandler(e,0)}))}get isTopPosition(){return this._element.nativeElement.classList.contains("top")}positionServiceEnable(){this._positionService.enable()}timeSelectHandler(e,t){this._store.dispatch(this._actions.selectTime(e,t))}daySelectHandler(e){!e||(this.isOtherMonthsActive?e.isDisabled:e.isOtherMonth||e.isDisabled)||this._store.dispatch(this._actions.select(e.date))}monthSelectHandler(e){!e||e.isDisabled||this._store.dispatch(this._actions.navigateTo({unit:{month:qW(e.date),year:$W(e.date)},viewMode:"day"}))}yearSelectHandler(e){!e||e.isDisabled||this._store.dispatch(this._actions.navigateTo({unit:{year:$W(e.date)},viewMode:"month"}))}setToday(){this._store.dispatch(this._actions.select(new Date))}clearDate(){this._store.dispatch(this._actions.select(void 0))}ngOnDestroy(){for(let e of this._subs)e.unsubscribe();this.selectedTimeSub.unsubscribe(),this._effects?.destroy()}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(lJ),$d(JJ),$d(Vl),$d(pJ),$d(fJ),$d(Iq))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-datepicker-container"]],viewQuery:function(e,t){if(1&e&&tm(rQ,5),2&e){let e;im(e=nm())&&(t.startTimepicker=e.first)}},hostAttrs:["role","dialog","aria-label","calendar",1,"bottom"],hostVars:2,hostBindings:function(e,t){1&e&&jf("click",(function(e){return t._stopPropagation(e)})),2&e&&gh("disabled",t.isDatepickerDisabled)("readonly",t.isDatepickerReadonly)},standalone:!0,features:[xm([JJ,fJ,pJ,Iq]),Wp,Pm],decls:2,vars:3,consts:[["startTP",""],["endTP",""],["class","bs-datepicker",3,"ngClass",4,"ngIf"],[1,"bs-datepicker",3,"ngClass"],[1,"bs-datepicker-container"],["role","application",1,"bs-calendar-container",3,"ngSwitch"],[4,"ngSwitchCase"],["class","bs-media-container",4,"ngSwitchCase"],["class","bs-datepicker-buttons",4,"ngIf"],["class","bs-datepicker-custom-range",4,"ngIf"],[1,"bs-media-container"],[3,"bs-datepicker-multiple","calendar","isDisabled","options","onNavigate","onViewMode","onHover","onHoverWeek","onSelect",4,"ngFor","ngForOf"],["class","bs-timepicker-in-datepicker-container",4,"ngIf"],[3,"onNavigate","onViewMode","onHover","onHoverWeek","onSelect","calendar","isDisabled","options"],[1,"bs-timepicker-in-datepicker-container"],[3,"disabled"],[3,"disabled",4,"ngIf"],[3,"bs-datepicker-multiple","calendar","onNavigate","onViewMode","onHover","onSelect",4,"ngFor","ngForOf"],[3,"onNavigate","onViewMode","onHover","onSelect","calendar"],[1,"bs-datepicker-buttons"],["type","button",1,"btn","btn-success"],["type","button",1,"btn","btn-default"],["class","btn-today-wrapper",3,"today-left","today-right","today-center",4,"ngIf"],["class","btn-clear-wrapper",3,"clear-left","clear-right","clear-center",4,"ngIf"],[1,"btn-today-wrapper"],[1,"btn","btn-success",3,"click"],[1,"btn-clear-wrapper"],[1,"bs-datepicker-custom-range"],[3,"onSelect","selectedRange","ranges","customRangeLabel"]],template:function(e,t){1&e&&(ph(0,yQ,10,11,"div",2),qm(1,"async")),2&e&&zh("ngIf",$m(1,1,t.viewMode))},dependencies:[cy,sy,hy,fy,oy,oZ,SK,_K,sZ,rZ,ZJ,_y],encapsulation:2,data:{animation:[dJ]}})}}return e})(),cZ=(()=>{class e{get readonlyValue(){return this.isDisabled?"":null}constructor(e,t,i,n,r){this._config=e,this._elementRef=t,this._renderer=i,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.isDestroy$=new kt,this.isDisabled=!1,this.bsValueChange=new _l,this._subs=[],this._dateInputFormat$=new kt,Object.assign(this,this._config),this._datepicker=r.createLoader(t,n,i),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new Tt(this.isOpen)}get isOpen(){return this._datepicker.isShown}set isOpen(e){this.isOpen$.next(e)}set bsValue(e){this._bsValue&&e&&this._bsValue.getTime()===e.getTime()||(!this._bsValue&&e&&!this._config.withTimepicker&&zJ(e,new Date),e&&this.bsConfig?.initCurrentTime&&(e=kJ(e)),this.initPreviousValue(),this._bsValue=e,this.bsValueChange.emit(e))}get dateInputFormat$(){return this._dateInputFormat$}ngOnInit(){this._datepicker.listen({outsideClick:this.outsideClick,outsideEsc:this.outsideEsc,triggers:this.triggers,show:()=>this.show()}),this.setConfig(),this.initPreviousValue()}initPreviousValue(){KJ=this._bsValue}ngOnChanges(e){e.bsConfig&&(e.bsConfig.currentValue?.initCurrentTime&&e.bsConfig.currentValue?.initCurrentTime!==e.bsConfig.previousValue?.initCurrentTime&&this._bsValue&&(this.initPreviousValue(),this._bsValue=kJ(this._bsValue),this.bsValueChange.emit(this._bsValue)),this.setConfig(),this._dateInputFormat$.next(this.bsConfig&&this.bsConfig.dateInputFormat)),this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses),e.dateTooltipTexts&&(this._datepickerRef.instance.dateTooltipTexts=this.dateTooltipTexts))}initSubscribes(){this._subs.push(this.bsValueChange.subscribe((e=>{this._datepickerRef&&(this._datepickerRef.instance.value=e)}))),this._datepickerRef&&this._subs.push(this._datepickerRef.instance.valueChange.subscribe((e=>{this.initPreviousValue(),this.bsValue=e,!this.keepDatepickerModalOpened()&&this.hide()})))}keepDatepickerModalOpened(){return!!(KJ&&this.bsConfig?.keepDatepickerOpened&&this._config.withTimepicker)&&this.isDateSame()}isDateSame(){return KJ instanceof Date&&this._bsValue?.getDate()===KJ?.getDate()&&this._bsValue?.getMonth()===KJ?.getMonth()&&this._bsValue?.getFullYear()===KJ?.getFullYear()}ngAfterViewInit(){this.isOpen$.pipe(qi((e=>e!==this.isOpen)),un(this.isDestroy$)).subscribe((()=>this.toggle()))}show(){this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:lJ,useValue:this._config}).attach(lZ).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this.initSubscribes())}hide(){this.isOpen&&this._datepicker.hide();for(let e of this._subs)e.unsubscribe();this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()}toggle(){if(this.isOpen)return this.hide();this.show()}setConfig(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._config.keepDatesOutOfRules?this._bsValue:IJ(this._bsValue,this.maxDate||this.bsConfig&&this.bsConfig.maxDate),isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,daysDisabled:this.daysDisabled||this.bsConfig&&this.bsConfig.daysDisabled,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,dateTooltipTexts:this.dateTooltipTexts||this.bsConfig&&this.bsConfig.dateTooltipTexts,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,minMode:this.minMode||this.bsConfig&&this.bsConfig.minMode,initCurrentTime:this.bsConfig?.initCurrentTime,keepDatepickerOpened:this.bsConfig?.keepDatepickerOpened,keepDatesOutOfRules:this.bsConfig?.keepDatesOutOfRules})}unsubscribeSubscriptions(){this._subs?.length&&(this._subs.map((e=>e.unsubscribe())),this._subs.length=0)}ngOnDestroy(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(null),this.isDestroy$.complete()),this.unsubscribeSubscriptions()}static{this.ɵfac=function(t){return new(t||e)($d(lJ),$d(Vl),$d(dp),$d(yp),$d(Pq))}}static{this.ɵdir=ts({type:e,selectors:[["","bsDatepicker",""]],hostVars:1,hostBindings:function(e,t){2&e&&gh("readonly",t.readonlyValue)},inputs:{placement:"placement",triggers:"triggers",outsideClick:"outsideClick",container:"container",outsideEsc:"outsideEsc",isDisabled:"isDisabled",minDate:"minDate",maxDate:"maxDate",ignoreMinMaxErrors:"ignoreMinMaxErrors",minMode:"minMode",daysDisabled:"daysDisabled",datesDisabled:"datesDisabled",datesEnabled:"datesEnabled",dateCustomClasses:"dateCustomClasses",dateTooltipTexts:"dateTooltipTexts",isOpen:"isOpen",bsValue:"bsValue",bsConfig:"bsConfig"},outputs:{onShown:"onShown",onHidden:"onHidden",bsValueChange:"bsValueChange"},exportAs:["bsDatepicker"],standalone:!0,features:[xm([Pq]),ga]})}}return e})(),dZ=(()=>{class e extends lZ{get disabledValue(){return this.isDatePickerDisabled?"":null}get readonlyValue(){return this.isDatePickerDisabled?"":null}constructor(e,t,i,n,r,s,a){super(e,t,i,n,r,s,a),e.setStyle(n.nativeElement,"display","inline-block"),e.setStyle(n.nativeElement,"position","static")}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(lJ),$d(JJ),$d(Vl),$d(pJ),$d(fJ),$d(Iq))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-datepicker-inline-container"]],hostVars:2,hostBindings:function(e,t){1&e&&jf("click",(function(e){return t._stopPropagation(e)})),2&e&&gh("disabled",t.disabledValue)("readonly",t.readonlyValue)},standalone:!0,features:[xm([JJ,fJ,Iq]),Wp,Pm],decls:2,vars:3,consts:[["startTP",""],["endTP",""],["class","bs-datepicker",3,"ngClass",4,"ngIf"],[1,"bs-datepicker",3,"ngClass"],[1,"bs-datepicker-container"],["role","application",1,"bs-calendar-container",3,"ngSwitch"],[4,"ngSwitchCase"],["class","bs-media-container",4,"ngSwitchCase"],["class","bs-datepicker-buttons",4,"ngIf"],["class","bs-datepicker-custom-range",4,"ngIf"],[1,"bs-media-container"],[3,"bs-datepicker-multiple","calendar","isDisabled","options","onNavigate","onViewMode","onHover","onHoverWeek","onSelect",4,"ngFor","ngForOf"],["class","bs-timepicker-in-datepicker-container",4,"ngIf"],[3,"onNavigate","onViewMode","onHover","onHoverWeek","onSelect","calendar","isDisabled","options"],[1,"bs-timepicker-in-datepicker-container"],[3,"disabled"],[3,"disabled",4,"ngIf"],[3,"bs-datepicker-multiple","calendar","onNavigate","onViewMode","onHover","onSelect",4,"ngFor","ngForOf"],[3,"onNavigate","onViewMode","onHover","onSelect","calendar"],[1,"bs-datepicker-buttons"],["type","button",1,"btn","btn-success"],["type","button",1,"btn","btn-default"],["class","btn-today-wrapper",3,"today-left","today-right","today-center",4,"ngIf"],["class","btn-clear-wrapper",3,"clear-left","clear-right","clear-center",4,"ngIf"],[1,"btn-today-wrapper"],[1,"btn","btn-success",3,"click"],[1,"btn-clear-wrapper"],[1,"bs-datepicker-custom-range"],[3,"onSelect","selectedRange","ranges","customRangeLabel"]],template:function(e,t){1&e&&(ph(0,OQ,10,11,"div",2),qm(1,"async")),2&e&&zh("ngIf",$m(1,1,t.viewMode))},dependencies:[cy,sy,hy,fy,oy,oZ,SK,_K,sZ,rZ,ZJ,_y],encapsulation:2,data:{animation:[dJ]}})}}return e})(),uZ=(()=>{class e extends uJ{set value(e){this._effects?.setRangeValue(e)}get isDatePickerDisabled(){return!!this._config.isDisabled}get isDatepickerDisabled(){return this.isDatePickerDisabled?"":null}get isDatepickerReadonly(){return this.isDatePickerDisabled?"":null}constructor(e,t,i,n,r,s,a){super(),this._config=t,this._store=i,this._element=n,this._actions=r,this._positionService=a,this.valueChange=new _l,this.animationState="void",this._rangeStack=[],this.chosen
1Range=[],this._subs=[],this.isRangePicker=!0,this._effects=s,this.customRanges=this._config.ranges||[],this.customRangeBtnLbl=this._config.customRangeButtonLabel,e.setStyle(n.nativeElement,"display","block"),e.setStyle(n.nativeElement,"position","absolute")}ngOnInit(){let e;this._positionService.setOptions({modifiers:{flip:{enabled:this._config.adaptivePosition},preventOverflow:{enabled:this._config.adaptivePosition}},allowedPositions:this._config.allowedPositions}),this._positionService.event$?.pipe(Hi(1)).subscribe((()=>{this._positionService.disable(),this._config.isAnimated?this.animationState=this.isTopPosition?"animated-up":"animated-down":this.animationState="unanimated"})),this.containerClass=this._config.containerClass,this.isOtherMonthsActive=this._config.selectFromOtherMonth,this.withTimepicker=this._config.withTimepicker,this._effects?.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select((e=>e.selectedRange)).subscribe((t=>{e=t,this.valueChange.emit(t),this.chosenRange=t||[]}))),this._subs.push(this._store.select((e=>e.selectedTime)).subscribe((t=>{!t||!t[0]||!t[1]||!(t[0]instanceof Date)||!(t[1]instanceof Date)||e&&t[0]===e[0]&&t[1]===e[1]||(this.valueChange.emit(t),this.chosenRange=t||[])})))}ngAfterViewInit(){this.selectedTimeSub.add(this.selectedTime?.subscribe((e=>{Array.isArray(e)&&e.length>=2&&(this.startTimepicker?.writeValue(e[0]),this.endTimepicker?.writeValue(e[1]))}))),this.startTimepicker?.registerOnChange((e=>{this.timeSelectHandler(e,0)})),this.endTimepicker?.registerOnChange((e=>{this.timeSelectHandler(e,1)}))}get isTopPosition(){return this._element.nativeElement.classList.contains("top")}positionServiceEnable(){this._positionService.enable()}timeSelectHandler(e,t){this._store.dispatch(this._actions.selectTime(e,t))}daySelectHandler(e){!e||(this.isOtherMonthsActive?e.isDisabled:e.isOtherMonth||e.isDisabled)||this.rangesProcessing(e)}monthSelectHandler(e){if(e&&!e.isDisabled){if(e.isSelected=!0,"month"!==this._config.minMode){if(e.isDisabled)return;return void this._store.dispatch(this._actions.navigateTo({unit:{month:qW(e.date),year:$W(e.date)},viewMode:"day"}))}this.rangesProcessing(e)}}yearSelectHandler(e){if(e&&!e.isDisabled){if(e.isSelected=!0,"year"!==this._config.minMode){if(e.isDisabled)return;return void this._store.dispatch(this._actions.navigateTo({unit:{year:$W(e.date)},viewMode:"month"}))}this.rangesProcessing(e)}}rangesProcessing(e){1===this._rangeStack.length&&(this._rangeStack=e.date>=this._rangeStack[0]?[this._rangeStack[0],e.date]:[e.date]),this._config.maxDateRange&&this.setMaxDateRangeOnCalendar(e.date),0===this._rangeStack.length&&(this._rangeStack=[e.date],this._config.maxDateRange&&this.setMaxDateRangeOnCalendar(e.date)),this._store.dispatch(this._actions.selectRange(this._rangeStack)),2===this._rangeStack.length&&(this._rangeStack=[])}ngOnDestroy(){for(let e of this._subs)e.unsubscribe();this.selectedTimeSub.unsubscribe(),this._effects?.destroy()}setRangeOnCalendar(e){e&&(this._rangeStack=e.value instanceof Date?[e.value]:e.value),this._store.dispatch(this._actions.selectRange(this._rangeStack))}setMaxDateRangeOnCalendar(e){let t=new Date(e);if(this._config.maxDate){let i=this._config.maxDate.getTime(),n=e.getTime()+864e5*(this._config.maxDateRange||0);t=n>i?new Date(this._config.maxDate):new Date(n)}else t.setDate(e.getDate()+(this._config.maxDateRange||0));this._effects?.setMaxDate(t)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(lJ),$d(JJ),$d(Vl),$d(pJ),$d(fJ),$d(Iq))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-daterangepicker-container"]],viewQuery:function(e,t){if(1&e&&(tm(rQ,5),tm(BQ,5)),2&e){let e;im(e=nm())&&(t.startTimepicker=e.first),im(e=nm())&&(t.endTimepicker=e.first)}},hostAttrs:["role","dialog","aria-label","calendar",1,"bottom"],hostVars:2,hostBindings:function(e,t){1&e&&jf("click",(function(e){return t._stopPropagation(e)})),2&e&&gh("disabled",t.isDatepickerDisabled)("readonly",t.isDatepickerReadonly)},standalone:!0,features:[xm([JJ,fJ,pJ,Iq]),Wp,Pm],decls:2,vars:3,consts:[["startTP",""],["endTP",""],["class","bs-datepicker",3,"ngClass",4,"ngIf"],[1,"bs-datepicker",3,"ngClass"],[1,"bs-datepicker-container"],["role","application",1,"bs-calendar-container",3,"ngSwitch"],[4,"ngSwitchCase"],["class","bs-media-container",4,"ngSwitchCase"],["class","bs-datepicker-buttons",4,"ngIf"],["class","bs-datepicker-custom-range",4,"ngIf"],[1,"bs-media-container"],[3,"bs-datepicker-multiple","calendar","isDisabled","options","onNavigate","onViewMode","onHover","onHoverWeek","onSelect",4,"ngFor","ngForOf"],["class","bs-timepicker-in-datepicker-container",4,"ngIf"],[3,"onNavigate","onViewMode","onHover","onHoverWeek","onSelect","calendar","isDisabled","options"],[1,"bs-timepicker-in-datepicker-container"],[3,"disabled"],[3,"disabled",4,"ngIf"],[3,"bs-datepicker-multiple","calendar","onNavigate","onViewMode","onHover","onSelect",4,"ngFor","ngForOf"],[3,"onNavigate","onViewMode","onHover","onSelect","calendar"],[1,"bs-datepicker-buttons"],["type","button",1,"btn","btn-success"],["type","button",1,"btn","btn-default"],["class","btn-today-wrapper",3,"today-left","today-right","today-center",4,"ngIf"],["class","btn-clear-wrapper",3,"clear-left","clear-right","clear-center",4,"ngIf"],[1,"btn-today-wrapper"],[1,"btn","btn-success",3,"click"],[1,"btn-clear-wrapper"],[1,"bs-datepicker-custom-range"],[3,"onSelect","selectedRange","ranges","customRangeLabel"]],template:function(e,t){1&e&&(ph(0,YQ,10,11,"div",2),qm(1,"async")),2&e&&zh("ngIf",$m(1,1,t.viewMode))},dependencies:[cy,sy,hy,fy,oy,oZ,SK,_K,sZ,rZ,ZJ,_y],encapsulation:2,data:{animation:[dJ]}})}}return e})(),pZ=(()=>{class e extends uZ{get disabledValue(){return this.isDatePickerDisabled?"":null}get readonlyValue(){return this.isDatePickerDisabled?"":null}constructor(e,t,i,n,r,s,a){super(e,t,i,n,r,s,a),e.setStyle(n.nativeElement,"display","inline-block"),e.setStyle(n.nativeElement,"position","static")}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(lJ),$d(JJ),$d(Vl),$d(pJ),$d(fJ),$d(Iq))}}static{this.ɵcmp=Qr({type:e,selectors:[["bs-daterangepicker-inline-container"]],hostVars:2,hostBindings:function(e,t){1&e&&jf("click",(function(e){return t._stopPropagation(e)})),2&e&&gh("disabled",t.disabledValue)("readonly",t.readonlyValue)},standalone:!0,features:[xm([JJ,fJ,pJ,Iq]),Wp,Pm],decls:2,vars:3,consts:[["startTP",""],["endTP",""],["class","bs-datepicker",3,"ngClass",4,"ngIf"],[1,"bs-datepicker",3,"ngClass"],[1,"bs-datepicker-container"],["role","application",1,"bs-calendar-container",3,"ngSwitch"],[4,"ngSwitchCase"],["class","bs-media-container",4,"ngSwitchCase"],["class","bs-datepicker-buttons",4,"ngIf"],["class","bs-datepicker-custom-range",4,"ngIf"],[1,"bs-media-container"],[3,"bs-datepicker-multiple","calendar","isDisabled","options","onNavigate","onViewMode","onHover","onHoverWeek","onSelect",4,"ngFor","ngForOf"],["class","bs-timepicker-in-datepicker-container",4,"ngIf"],[3,"onNavigate","onViewMode","onHover","onHoverWeek","onSelect","calendar","isDisabled","options"],[1,"bs-timepicker-in-datepicker-container"],[3,"disabled"],[3,"disabled",4,"ngIf"],[3,"bs-datepicker-multiple","calendar","onNavigate","onViewMode","onHover","onSelect",4,"ngFor","ngForOf"],[3,"onNavigate","onViewMode","onHover","onSelect","calendar"],[1,"bs-datepicker-buttons"],["type","button",1,"btn","btn-success"],["type","button",1,"btn","btn-default"],["class","btn-today-wrapper",3,"today-left","today-right","today-center",4,"ngIf"],["class","btn-clear-wrapper",3,"clear-left","clear-right","clear-center",4,"ngIf"],[1,"btn-today-wrapper"],[1,"btn","btn-success",3,"click"],[1,"btn-clear-wrapper"],[1,"bs-datepicker-custom-range"],[3,"onSelect","selectedRange","ranges","customRangeLabel"]],template:function(e,t){1&e&&(ph(0,oJ,10,11,"div",2),qm(1,"async")),2&e&&zh("ngIf",$m(1,1,t.viewMode))},dependencies:[cy,sy,hy,fy,oy,oZ,SK,_K,sZ,rZ,ZJ,_y],encapsulation:2,data:{animation:[dJ]}})}}return e})(),hZ={provide:s_,useExisting:An((()=>mZ)),multi:!0},fZ={provide:h_,useExisting:An((()=>mZ)),multi:!0},mZ=(()=>{class e{constructor(e,t,i,n,r){this._picker=e,this._localeService=t,this._renderer=i,this._elRef=n,this.changeDetection=r,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._val
1idatorChange=Function.prototype,this._subs=new Ye}onChange(e){this.writeValue(e.target.value),this._onChange(this._value),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),this._onTouched()}onBlur(){this._onTouched()}hide(){this._picker.hide(),this._renderer.selectRootElement(this._elRef.nativeElement).blur(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()}ngOnInit(){let e=e=>{this._setInputValue(e),this._value!==e&&(this._value=e,this._onChange(e),this._onTouched()),this.changeDetection.markForCheck()};this._picker._bsValue&&e(this._picker._bsValue),this._subs.add(this._picker.bsValueChange.subscribe(e)),this._subs.add(this._localeService.localeChange.subscribe((()=>{this._setInputValue(this._value)}))),this._subs.add(this._picker.dateInputFormat$.pipe(Ji()).subscribe((()=>{this._setInputValue(this._value)})))}ngOnDestroy(){this._subs.unsubscribe()}_setInputValue(e){let t=e?jY(e,this._picker._config.dateInputFormat,this._localeService.currentLocale):"";this._renderer.setProperty(this._elRef.nativeElement,"value",t)}validate(e){let t=e.value;if(null==t||""===t)return null;if(sW(t)){if(!aW(t))return{bsDate:{invalid:t}};if(this._picker&&this._picker.minDate&&rG(t,this._picker.minDate,"date"))return this.writeValue(this._picker.minDate),this._picker.ignoreMinMaxErrors?null:{bsDate:{minDate:this._picker.minDate}};if(this._picker&&this._picker.maxDate&&nG(t,this._picker.maxDate,"date"))return this.writeValue(this._picker.maxDate),this._picker.ignoreMinMaxErrors?null:{bsDate:{maxDate:this._picker.maxDate}}}return null}registerOnValidatorChange(e){this._validatorChange=e}writeValue(e){if(e){let t=this._localeService.currentLocale;if(!mY(t))throw new Error(`Locale "${t}" is not defined, please add it with "defineLocale(...)"`);if(this._value=eG(e,this._picker._config.dateInputFormat,this._localeService.currentLocale),this._picker._config.useUtc){let e=tG(this._value);this._value=null===e?void 0:e}}else this._value=void 0;this._picker.bsValue=this._value}setDisabledState(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}static{this.ɵfac=function(t){return new(t||e)($d(cZ,1),$d(hJ),$d(dp),$d(Vl),$d(kg))}}static{this.ɵdir=ts({type:e,selectors:[["input","bsDatepicker",""]],hostBindings:function(e,t){1&e&&jf("change",(function(e){return t.onChange(e)}))("blur",(function(){return t.onBlur()}))("keyup.esc",(function(){return t.hide()}))("keydown.enter",(function(){return t.hide()}))},standalone:!0,features:[xm([hZ,fZ])]})}}return e})(),gZ=(()=>{class e extends lJ{constructor(){super(...arguments),this.displayMonths=2}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),bZ=(()=>{class e{get isOpen(){return this._datepicker.isShown}set isOpen(e){this.isOpen$.next(e)}set bsValue(e){this._bsValue!==e&&(e&&this.bsConfig?.initCurrentTime&&(e=xJ(e)),this.initPreviousValue(),this._bsValue=e,this.bsValueChange.emit(e))}get isDatepickerReadonly(){return this.isDisabled?"":null}get rangeInputFormat$(){return this._rangeInputFormat$}constructor(e,t,i,n,r){this._config=e,this._elementRef=t,this._renderer=i,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.outsideEsc=!0,this.isDestroy$=new kt,this.isDisabled=!1,this.bsValueChange=new _l,this._subs=[],this._rangeInputFormat$=new kt,this._datepicker=r.createLoader(t,n,i),Object.assign(this,e),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden,this.isOpen$=new Tt(this.isOpen)}ngOnInit(){this.isDestroy$=new kt,this._datepicker.listen({outsideClick:this.outsideClick,outsideEsc:this.outsideEsc,triggers:this.triggers,show:()=>this.show()}),this.initPreviousValue(),this.setConfig()}ngOnChanges(e){e.bsConfig&&(e.bsConfig.currentValue?.initCurrentTime&&e.bsConfig.currentValue?.initCurrentTime!==e.bsConfig.previousValue?.initCurrentTime&&this._bsValue&&(this.initPreviousValue(),this._bsValue=xJ(this._bsValue),this.bsValueChange.emit(this._bsValue)),this.setConfig(),this._rangeInputFormat$.next(e.bsConfig.currentValue&&e.bsConfig.currentValue.rangeInputFormat)),this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.datesDisabled&&(this._datepickerRef.instance.datesDisabled=this.datesDisabled),e.datesEnabled&&(this._datepickerRef.instance.datesEnabled=this.datesEnabled),e.daysDisabled&&(this._datepickerRef.instance.daysDisabled=this.daysDisabled),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled),e.dateCustomClasses&&(this._datepickerRef.instance.dateCustomClasses=this.dateCustomClasses))}ngAfterViewInit(){this.isOpen$.pipe(qi((e=>e!==this.isOpen)),un(this.isDestroy$)).subscribe((()=>this.toggle()))}show(){this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:lJ,useValue:this._config}).attach(uZ).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this.initSubscribes())}initSubscribes(){this._subs.push(this.bsValueChange.subscribe((e=>{this._datepickerRef&&(this._datepickerRef.instance.value=e)}))),this._datepickerRef&&this._subs.push(this._datepickerRef.instance.valueChange.pipe(qi((e=>e&&e[0]&&!!e[1]))).subscribe((e=>{this.initPreviousValue(),this.bsValue=e,!this.keepDatepickerModalOpened()&&this.hide()})))}initPreviousValue(){QJ=this._bsValue}keepDatepickerModalOpened(){return!!(QJ&&this.bsConfig?.keepDatepickerOpened&&this._config.withTimepicker)&&this.isDateSame()}isDateSame(){return this._bsValue?.[0]?.getDate()===QJ?.[0]?.getDate()&&this._bsValue?.[0]?.getMonth()===QJ?.[0]?.getMonth()&&this._bsValue?.[0]?.getFullYear()===QJ?.[0]?.getFullYear()&&this._bsValue?.[1]?.getDate()===QJ?.[1]?.getDate()&&this._bsValue?.[1]?.getMonth()===QJ?.[1]?.getMonth()&&this._bsValue?.[1]?.getFullYear()===QJ?.[1]?.getFullYear()}setConfig(){this._config=Object.assign({},this._config,this.bsConfig,{value:this.bsConfig?.keepDatesOutOfRules?this._bsValue:IJ(this._bsValue,this.maxDate||this.bsConfig&&this.bsConfig.maxDate),isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate,daysDisabled:this.daysDisabled||this.bsConfig&&this.bsConfig.daysDisabled,dateCustomClasses:this.dateCustomClasses||this.bsConfig&&this.bsConfig.dateCustomClasses,datesDisabled:this.datesDisabled||this.bsConfig&&this.bsConfig.datesDisabled,datesEnabled:this.datesEnabled||this.bsConfig&&this.bsConfig.datesEnabled,ranges:CJ(this.bsConfig&&this.bsConfig.ranges,this.maxDate||this.bsConfig&&this.bsConfig.maxDate),maxDateRange:this.bsConfig&&this.bsConfig.maxDateRange,initCurrentTime:this.bsConfig?.initCurrentTime,keepDatepickerOpened:this.bsConfig?.keepDatepickerOpened,keepDatesOutOfRules:this.bsConfig?.keepDatesOutOfRules})}hide(){this.isOpen&&this._datepicker.hide();for(let e of this._subs)e.unsubscribe();this._config.returnFocusToInput&&this._renderer.selectRootElement(this._elementRef.nativeElement).focus()}toggle(){if(this.isOpen)return this.hide();this.show()}unsubscribeSubscriptions(){this._subs?.length&&(this._subs.map((e=>e.unsubscribe())),this._subs.length=0)}ngOnDestroy(){this._datepicker.dispose(),this.isOpen$.next(!1),this.isDestroy$&&(this.isDestroy$.next(null),this.isDestroy$.complete()),this.unsubscribeSubscriptions()}static{this.ɵfac=function(t){return new(t||e)($d(gZ),$d(Vl),$d(dp),$d(yp),$d(Pq))}}static{this.ɵdir=ts({type:e,selectors:[["","bsDaterangepicker",""]],hostVars:1,hostBindings:function(e,t){2&e&&gh("readonly",t.isDatepickerReadonly)},inputs:{placement:"placement",triggers:"triggers",outsideClick:"outsideClick",container:"container",outsideEsc:"outsideEsc",isOpen:"isOpen",bsValue:"bsValue",bsConfig:"bsConfig",isDisabled:"isDisabled",minDate:"minDate",maxDate:"maxDate",dateCustomClasses:"dateCustomClasses",daysDisabled:"daysDisabled",datesDisabled:"datesDisabled",datesEnabled:"datesEnabled"},outputs:{onShown:"onShown",onHidden:"onHidden",bsValueChange:"bsValueChange"},exportAs:["bsDaterangepicker"],standalone:!0,features:[xm([Pq]),ga]})}}return e})(),yZ={provide:s_,useExisting:An((()=>wZ)),multi:!0},vZ={provide:h_,useExisting:An((()=>wZ)),multi:!0},wZ=(()=>{class e{constructor(e,t,i,n,r){this._picker=e,this._localeService=t,this._renderer=i,this._elRef=n,this.changeDetection=r,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._val
1idatorChange=Function.prototype,this._subs=new Ye}ngOnInit(){this._picker._bsValue&&(e=>{this._setInputValue(e),this._value!==e&&(this._value=e,this._onChange(e),this._onTouched()),this.changeDetection.markForCheck()})(this._picker._bsValue),this._subs.add(this._picker.bsValueChange.subscribe((e=>{this._setInputValue(e),this._value!==e&&(this._value=e,this._onChange(e),this._onTouched()),this.changeDetection.markForCheck()}))),this._subs.add(this._localeService.localeChange.subscribe((()=>{this._setInputValue(this._value)}))),this._subs.add(this._picker.rangeInputFormat$.pipe(Ji()).subscribe((()=>{this._setInputValue(this._value)})))}ngOnDestroy(){this._subs.unsubscribe()}onKeydownEvent(e){(13===e.keyCode||"Enter"===e.code)&&this.hide()}_setInputValue(e){let t="";if(e){let i=e[0]?jY(e[0],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"",n=e[1]?jY(e[1],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"";t=i&&n?i+this._picker._config.rangeSeparator+n:""}this._renderer.setProperty(this._elRef.nativeElement,"value",t)}onChange(e){this.writeValue(e.target.value),this._onChange(this._value),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus(),this._onTouched()}validate(e){let t=e.value,i=[];if(null==t||!cW(t))return null;t=t.slice().sort(((e,t)=>e.getTime()-t.getTime()));let n=aW(t[0]),r=aW(t[1]);return n?r?(this._picker&&this._picker.minDate&&rG(t[0],this._picker.minDate,"date")&&(t[0]=this._picker.minDate,i.push({bsDate:{minDate:this._picker.minDate}})),this._picker&&this._picker.maxDate&&nG(t[1],this._picker.maxDate,"date")&&(t[1]=this._picker.maxDate,i.push({bsDate:{maxDate:this._picker.maxDate}})),i.length>0?(this.writeValue(t),i):null):{bsDate:{invalid:t[1]}}:{bsDate:{invalid:t[0]}}}registerOnValidatorChange(e){this._validatorChange=e}writeValue(e){if(e){let t=this._localeService.currentLocale;if(!mY(t))throw new Error(`Locale "${t}" is not defined, please add it with "defineLocale(...)"`);let i=[];if("string"==typeof e){let t=this._picker._config.rangeSeparator.trim();i=e.replace(/[^-]/g,"").length>1?e.split(this._picker._config.rangeSeparator):e.split(t.length>0?t:this._picker._config.rangeSeparator).map((e=>e.trim()))}Array.isArray(e)&&(i=e),this._value=i.map((e=>this._picker._config.useUtc?tG(eG(e,this._picker._config.rangeInputFormat,this._localeService.currentLocale)):eG(e,this._picker._config.rangeInputFormat,this._localeService.currentLocale))).map((e=>isNaN(e.valueOf())?void 0:e))}else this._value=void 0;this._picker.bsValue=this._value}setDisabledState(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}onBlur(){this._onTouched()}hide(){this._picker.hide(),this._renderer.selectRootElement(this._elRef.nativeElement).blur(),this._picker._config.returnFocusToInput&&this._renderer.selectRootElement(this._elRef.nativeElement).focus()}static{this.ɵfac=function(t){return new(t||e)($d(bZ,1),$d(hJ),$d(dp),$d(Vl),$d(kg))}}static{this.ɵdir=ts({type:e,selectors:[["input","bsDaterangepicker",""]],hostBindings:function(e,t){1&e&&jf("change",(function(e){return t.onChange(e)}))("keyup.esc",(function(){return t.hide()}))("keydown",(function(e){return t.onKeydownEvent(e)}))("blur",(function(){return t.onBlur()}))},standalone:!0,features:[xm([yZ,vZ])]})}}return e})(),_Z=(()=>{class e{static forRoot(){return{ngModule:e,providers:[]}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,LK,SK,oZ,lZ,dZ,uZ,pZ]})}}return e})();function SZ(e){return new mn(3e3,!1)}function CZ(e){switch(e.length){case 0:return new PK;case 1:return e[0];default:return new EK(e)}}function IZ(e,t,i=new Map,n=new Map){let r=[],s=[],a=-1,o=null;if(t.forEach((t=>{let l=t.get("offset"),c=l==a,d=c&&o||new Map;t.forEach(((t,s)=>{let a=s,o=t;if("offset"!==s)switch(a=e.normalizePropertyName(a,r),o){case"!":o=i.get(s);break;case IK:o=n.get(s);break;default:o=e.normalizeStyleValue(s,a,o,r)}d.set(a,o)})),c||s.push(d),o=d,a=l})),r.length)throw new mn(3502,!1);return s}function AZ(e,t,i,n){switch(t){case"start":e.onStart((()=>n(i&&kZ(i,"start",e))));break;case"done":e.onDone((()=>n(i&&kZ(i,"done",e))));break;
1case"destroy":e.onDestroy((()=>n(i&&kZ(i,"destroy",e))))}}function kZ(e,t,i){let n=i.totalTime,r=!!i.disabled,s=xZ(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,n??e.totalTime,r),a=e._data;return null!=a&&(s._data=a),s}function xZ(e,t,i,n,r="",s=0,a){return{element:e,triggerName:t,fromState:i,toState:n,phaseName:r,totalTime:s,disabled:!!a}}function TZ(e,t,i){let n=e.get(t);return n||e.set(t,n=i),n}function PZ(e){let t=e.indexOf(":");return[e.substring(1,t),e.slice(t+1)]}var EZ=typeof document>"u"?null:document.documentElement;function DZ(e){let t=e.parentNode||e.host||null;return t===EZ?null:t}var OZ=null,BZ=!1;function MZ(e){OZ||(OZ=(typeof document<"u"?document.body:null)||{},BZ=!!OZ.style&&"WebkitAppearance"in OZ.style);let t=!0;return OZ.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in OZ.style,!t&&BZ&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in OZ.style)),t}function RZ(e,t){for(;t;){if(t===e)return!0;t=DZ(t)}return!1}function LZ(e,t,i){if(i)return Array.from(e.querySelectorAll(t));let n=e.querySelector(t);return n?[n]:[]}var FZ=(()=>{class e{validateStyleProperty(e){return MZ(e)}containsElement(e,t){return RZ(e,t)}getParentElement(e){return DZ(e)}query(e,t,i){return LZ(e,t,i)}computeStyle(e,t,i){return i||""}animate(e,t,i,n,r,s=[],a){return new PK(i,n)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),NZ=class{static{this.NOOP=new FZ}},UZ=class{},VZ=1e3,qZ="ng-enter",$Z="ng-leave",jZ="ng-trigger",zZ=".ng-trigger",WZ="ng-animating",HZ=".ng-animating";function YZ(e){if("number"==typeof e)return e;let t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:GZ(parseFloat(t[1]),t[2])}function GZ(e,t){return"s"===t?e*VZ:e}function KZ(e,t,i){return e.hasOwnProperty("duration")?e:function(e,t,i){let n,r=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,s=0,a="";if("string"==typeof e){let i=e.match(r);if(null===i)return t.push(SZ()),{duration:0,delay:0,easing:""};n=GZ(parseFloat(i[1]),i[2]);let o=i[3];null!=o&&(s=GZ(parseFloat(o),i[4]));let l=i[5];l&&(a=l)}else n=e;if(!i){let e=!1,i=t.length;n<0&&(t.push(new mn(3100,!1)),e=!0),s<0&&(t.push(new mn(3101,!1)),e=!0),e&&t.splice(i,0,SZ())}return{duration:n,delay:s,easing:a}}(e,t,i)}function QZ(e,t,i){t.forEach(((t,n)=>{let r=rX(n);i&&!i.has(n)&&i.set(n,e.style[r]),e.style[r]=t}))}function JZ(e,t){t.forEach(((t,i)=>{let n=rX(i);e.style[n]=""}))}function ZZ(e){return Array.isArray(e)?1==e.length?e[0]:function(e,t=null){return{type:CK.Sequence,steps:e,options:t}}(e):e}function XZ(e,t,i){let n=t.params||{},r=tX(e);r.length&&r.forEach((e=>{n.hasOwnProperty(e)||i.push(new mn(3001,!1))}))}var eX=new RegExp("{{\\s*(.+?)\\s*}}","g");function tX(e){let t=[];if("string"==typeof e){let i;for(;i=eX.exec(e);)t.push(i[1]);eX.lastIndex=0}return t}function iX(e,t,i){let n=`${e}`,r=n.replace(eX,((e,n)=>{let r=t[n];return null==r&&(i.push(new mn(3003,!1)),r=""),r.toString()}));return r==n?e:r}var nX=/-+([a-z0-9])/g;function rX(e){return e.replace(nX,((...e)=>e[1].toUpperCase()))}function sX(e,t,i){switch(t.type){case CK.Trigger:return e.visitTrigger(t,i);case CK.State:return e.visitState(t,i);case CK.Transition:return e.visitTransition(t,i);case CK.Sequence:return e.visitSequence(t,i);case CK.Group:return e.visitGroup(t,i);case CK.Animate:return e.visitAnimate(t,i);case CK.Keyframes:return e.visitKeyframes(t,i);case CK.Style:return e.visitStyle(t,i);case CK.Reference:return e.visitReference(t,i);case CK.AnimateChild:return e.visitAnimateChild(t,i);case CK.AnimateRef:return e.visitAnimateRef(t,i);case CK.Query:return e.visitQuery(t,i);case CK.Stagger:return e.visitStagger(t,i);default:throw t.type,new mn(3004,!1)}}function aX(e,t){return window.getComputedStyle(e)[t]}var oX=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),lX=class extends UZ{normalizePropertyName(e,t){return rX(e)}normalizeStyleValue(e,t,i,n){let r="",s=i.toString().trim();if(oX.has(t)&&0!==i&&"0"!==i)if("number"==typeof i)r="px";else{let e=i.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&n.push(new mn(3005,!1))}return s+r}},cX="*";function dX(e,t){let i=[];
1return"string"==typeof e?e.split(/\s*,\s*/).forEach((e=>function(e,t,i){if(":"==e[0]){let n=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return t.push(new mn(3016,!1)),"* => *"}}(e,i);if("function"==typeof n)return void t.push(n);e=n}let n=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return i.push(new mn(3015,!1)),t;let r=n[1],s=n[2],a=n[3];t.push(hX(r,a));let o=r==cX&&a==cX;"<"==s[0]&&!o&&t.push(hX(a,r))}(e,i,t))):i.push(e),i}var uX=new Set(["true","1"]),pX=new Set(["false","0"]);function hX(e,t){let i=uX.has(e)||pX.has(e),n=uX.has(t)||pX.has(t);return(r,s)=>{let a=e==cX||e==r,o=t==cX||t==s;return!a&&i&&"boolean"==typeof r&&(a=r?uX.has(e):pX.has(e)),!o&&n&&"boolean"==typeof s&&(o=s?uX.has(t):pX.has(t)),a&&o}}var fX=":self",mX=new RegExp(`s*${fX}s*,?`,"g");function gX(e,t,i,n){return new bX(e).build(t,i,n)}var bX=class{constructor(e){this._driver=e}build(e,t,i){let n=new yX(t);return this._resetContextStyleTimingState(n),sX(this,ZZ(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles=new Map,e.collectedStyles.set("",new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,n=t.depCount=0,r=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push(new mn(3006,!1)),e.definitions.forEach((e=>{if(this._resetContextStyleTimingState(t),e.type==CK.State){let i=e,n=i.name;n.toString().split(/\s*,\s*/).forEach((e=>{i.name=e,r.push(this.visitState(i,t))})),i.name=n}else if(e.type==CK.Transition){let r=this.visitTransition(e,t);i+=r.queryCount,n+=r.depCount,s.push(r)}else t.errors.push(new mn(3007,!1))})),{type:CK.Trigger,name:e.name,states:r,transitions:s,queryCount:i,depCount:n,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),n=e.options&&e.options.params||null;if(i.containsDynamicStyles){let r=new Set,s=n||{};i.styles.forEach((e=>{e instanceof Map&&e.forEach((e=>{tX(e).forEach((e=>{s.hasOwnProperty(e)||r.add(e)}))}))})),r.size&&t.errors.push((e.name,r.values(),new mn(3008,!1)))}return{type:CK.State,name:e.name,style:i,options:n?{params:n}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=sX(this,ZZ(e.animation),t),n=dX(e.expr,t.errors);return{type:CK.Transition,matchers:n,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:vX(e.options)}}visitSequence(e,t){return{type:CK.Sequence,steps:e.steps.map((e=>sX(this,e,t))),options:vX(e.options)}}visitGroup(e,t){let i=t.currentTime,n=0,r=e.steps.map((e=>{t.currentTime=i;let r=sX(this,e,t);return n=Math.max(n,t.currentTime),r}));return t.currentTime=n,{type:CK.Group,steps:r,options:vX(e.options)}}visitAnimate(e,t){let i=function(e,t){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e){return wX(KZ(e,t).duration,0,"")}let i=e;if(i.split(/\s+/).some((e=>"{"==e.charAt(0)&&"{"==e.charAt(1)))){let e=wX(0,0,"");return e.dynamic=!0,e.strValue=i,e}let n=KZ(i,t);return wX(n.duration,n.delay,n.easing)}(e.timings,t.errors);t.currentAnimateTimings=i;let n,r=e.styles?e.styles:kK({});if(r.type==CK.Keyframes)n=this.visitKeyframes(r,t);else{let r=e.styles,s=!1;if(!r){s=!0;let e={};i.easing&&(e.easing=i.easing),r=kK(e)}t.currentTime+=i.duration+i.delay;let a=this.visitStyle(r,t);a.isEmptyStep=s,n=a}return t.currentAnimateTimings=null,{type:CK.Animate,timings:i,style:n,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let e of n)"string"==typeof e?e===IK?i.push(e):t.errors.push(new mn(3002,!1)):i.push(new Map(Object.entries(e)));let r=!1,s=null;return i.forEach((e=>{if(e instanceof Map&&(e.has("easing")&&(s=e.get("easing"),e.delete("easing")),!r))for(let t of e.values())if(t.toString().indexOf("{{")>=0){r=!0;break}})),{type:CK.Style,styles:i,easing:s,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,n=t.currentTime,r=t.currentTime;i&&r>
10&&(r-=i.duration+i.delay),e.styles.forEach((e=>{"string"!=typeof e&&e.forEach(((e,i)=>{let s=t.collectedStyles.get(t.currentQuerySelector),a=s.get(i),o=!0;a&&(r!=n&&r>=a.startTime&&n<=a.endTime&&(t.errors.push((a.startTime,a.endTime,new mn(3010,!1))),o=!1),r=a.startTime),o&&s.set(i,{startTime:r,endTime:n}),t.options&&XZ(e,t.options,t.errors)}))}))}visitKeyframes(e,t){let i={type:CK.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(new mn(3011,!1)),i;let n=0,r=[],s=!1,a=!1,o=0,l=e.steps.map((e=>{let i=this._makeStyleAst(e,t),l=null!=i.offset?i.offset:function(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach((e=>{if(e instanceof Map&&e.has("offset")){let i=e;t=parseFloat(i.get("offset")),i.delete("offset")}}));else if(e instanceof Map&&e.has("offset")){let i=e;t=parseFloat(i.get("offset")),i.delete("offset")}return t}(i.styles),c=0;return null!=l&&(n++,c=i.offset=l),a=a||c<0||c>1,s=s||c<o,o=c,r.push(c),i}));a&&t.errors.push(new mn(3012,!1)),s&&t.errors.push(new mn(3200,!1));let c=e.steps.length,d=0;n>0&&n<c?t.errors.push(new mn(3202,!1)):0==n&&(d=1/(c-1));let u=c-1,p=t.currentTime,h=t.currentAnimateTimings,f=h.duration;return l.forEach(((e,n)=>{let s=d>0?n==u?1:d*n:r[n],a=s*f;t.currentTime=p+h.delay+a,h.duration=a,this._validateStyleAst(e,t),e.offset=s,i.styles.push(e)})),i}visitReference(e,t){return{type:CK.Reference,animation:sX(this,ZZ(e.animation),t),options:vX(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:CK.AnimateChild,options:vX(e.options)}}visitAnimateRef(e,t){return{type:CK.AnimateRef,animation:this.visitReference(e.animation,t),options:vX(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,n=e.options||{};t.queryCount++,t.currentQuery=e;let[r,s]=function(e){let t=!!e.split(/\s*,\s*/).find((e=>e==fX));return t&&(e=e.replace(mX,"")),e=e.replace(/@\*/g,zZ).replace(/@\w+/g,(e=>zZ+"-"+e.slice(1))).replace(/:animating/g,HZ),[e,t]}(e.selector);t.currentQuerySelector=i.length?i+" "+r:r,TZ(t.collectedStyles,t.currentQuerySelector,new Map);let a=sX(this,ZZ(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:CK.Query,selector:r,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:vX(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(new mn(3013,!1));let i="full"===e.timings?{duration:0,delay:0,easing:"full"}:KZ(e.timings,t.errors,!0);return{type:CK.Stagger,animation:sX(this,ZZ(e.animation),t),timings:i,options:null}}};var yX=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function vX(e){return e?(e=h({},e)).params&&(e.params=function(e){return e?h({},e):null}(e.params)):e={},e}function wX(e,t,i){return{duration:e,delay:t,easing:i}}function _X(e,t,i,n,r,s,a=null,o=!1){return{type:1,element:e,keyframes:t,preStyleProps:i,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:a,subTimeline:o}}var SX=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},CX=new RegExp(":enter","g"),IX=new RegExp(":leave","g");function AX(e,t,i,n,r,s=new Map,a=new Map,o,l,c=[]){return(new kX).buildKeyframes(e,t,i,n,r,s,a,o,l,c)}var kX=class{buildKeyframes(e,t,i,n,r,s,a,o,l,c=[]){l=l||new SX;let d=new TX(e,t,l,n,r,c,[]);d.options=o;let u=o.delay?YZ(o.delay):0;d.currentTimeline.delayNextStep(u),d.currentTimeline.setStyles([s],null,d.errors,o),sX(this,i,d);let p=d.timelines.filter((e=>e.containsAnimation()));if(p.length&&a.size){let e;for(let i=p.length-1;i>=0;i--){let n=p[i];if(n.element===t){e=n;break}}e&&!e.allowOnlyTimelineStyles()&&e.setStyles([a],null,d.errors,o)}return p.length?p.map((e=>e.buildKeyframes())):[_X(t,[],[],[],0,u,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}
1visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let n=t.createSubContext(e.options),r=t.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);r!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let n of e){let e=n?.delay;if(e){let r="number"==typeof e?e:YZ(iX(e,n?.params??{},t.errors));i.delayNextStep(r)}}}_visitSubInstructions(e,t,i){let n=t.currentTimeline.currentTime,r=null!=i.duration?YZ(i.duration):null,s=null!=i.delay?YZ(i.delay):null;return 0!==r&&e.forEach((e=>{let i=t.appendInstructionToTimeline(e,r,s);n=Math.max(n,i.duration+i.delay)})),n}visitReference(e,t){t.updateOptions(e.options,!0),sX(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,n=t,r=e.options;if(r&&(r.params||r.delay)&&(n=t.createSubContext(r),n.transformIntoNewTimeline(),null!=r.delay)){n.previousNode.type==CK.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=xX);let e=YZ(r.delay);n.delayNextStep(e)}e.steps.length&&(e.steps.forEach((e=>sX(this,e,n))),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],n=t.currentTimeline.currentTime,r=e.options&&e.options.delay?YZ(e.options.delay):0;e.steps.forEach((s=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),sX(this,s,a),n=Math.max(n,a.currentTimeline.currentTime),i.push(a.currentTimeline)})),i.forEach((e=>t.currentTimeline.mergeTimelineCollectedStyles(e))),t.transformIntoNewTimeline(n),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue;return KZ(t.params?iX(i,t.params,t.errors):i,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),n=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),n.snapshotCurrentStyles());let r=e.style;r.type==CK.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(i.duration),this.visitStyle(r,t),n.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,n=t.currentAnimateTimings;!n&&i.hasCurrentStyleProperties()&&i.forwardFrame();let r=n&&n.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(r):i.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,n=t.currentTimeline.duration,r=i.duration,s=t.createSubContext().currentTimeline;s.easing=i.easing,e.styles.forEach((e=>{let i=e.offset||0;s.forwardTime(i*r),s.setStyles(e.styles,e.easing,t.errors,t.options),s.applyStylesToKeyframe()})),t.currentTimeline.mergeTimelineCollectedStyles(s),t.transformIntoNewTimeline(n+r),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,n=e.options||{},r=n.delay?YZ(n.delay):0;r&&(t.previousNode.type===CK.Style||0==i&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=xX);let s=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,t.errors);t.currentQueryTotal=a.length;let o=null;a.forEach(((i,n)=>{t.currentQueryIndex=n;let a=t.createSubContext(e.options,i);r&&a.delayNextStep(r),i===t.element&&(o=a.currentTimeline),sX(this,e.animation,a),a.currentTimeline.applyStylesToKeyframe();let l=a.currentTimeline.currentTime;s=Math.max(s,l)})),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),o&&(t.currentTimeline.mergeTimelineCollectedStyles(o),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,n=t.currentTimeline,r=e.timings,s=Math.abs(r.duration),a=s*(t.currentQueryTotal-1),o=s*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":o=a-o;break;case"full":o=i.currentStaggerTime}let l=t.currentTimeline;o&&l.delayNextStep(o);let c=l.currentTime;sX(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=n.currentTime-c+(n.startTime-i.currentTimeline.startTime)}},xX={},TX=class e{constructor(e,t,i,n,r,s,a,o){this._driver=e,this.element=t,this.subInstru
1ctions=i,this._enterClassName=n,this._leaveClassName=r,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=xX,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=o||new PX(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,n=this.options;null!=i.duration&&(n.duration=YZ(i.duration)),null!=i.delay&&(n.delay=YZ(i.delay));let r=i.params;if(r){let e=n.params;e||(e=this.options.params={}),Object.keys(r).forEach((i=>{(!t||!e.hasOwnProperty(i))&&(e[i]=iX(r[i],e,this.errors))}))}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach((e=>{i[e]=t[e]}))}}return e}createSubContext(t=null,i,n){let r=i||this.element,s=new e(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(t),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(e){return this.previousNode=xX,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let n={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},r=new EX(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(r),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,n,r,s){let a=[];if(n&&a.push(this.element),e.length>0){e=(e=e.replace(CX,"."+this._enterClassName)).replace(IX,"."+this._leaveClassName);let t=1!=i,n=this._driver.query(this.element,e,t);0!==i&&(n=i<0?n.slice(n.length+i,n.length):n.slice(0,i)),a.push(...n)}return!r&&0==a.length&&s.push(new mn(3014,!1)),a}},PX=class e{constructor(e,t,i,n){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=n,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(t,i){return this.applyStylesToKeyframe(),new e(this._driver,t,i||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}
1applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[e,t]of this._globalTimelineStyles)this._backFill.set(e,t||IK),this._currentKeyframe.set(e,IK);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,n){t&&this._previousKeyframe.set("easing",t);let r=n&&n.params||{},s=function(e,t){let i,n=new Map;return e.forEach((e=>{if("*"===e){i??=t.keys();for(let e of i)n.set(e,IK)}else for(let[t,i]of e)n.set(t,i)})),n}(e,this._globalTimelineStyles);for(let[e,t]of s){let n=iX(t,r,i);this._pendingStyles.set(e,n),this._localTimelineStyles.has(e)||this._backFill.set(e,this._globalTimelineStyles.get(e)??IK),this._updateStyle(e,n)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach(((e,t)=>{this._currentKeyframe.set(t,e)})),this._pendingStyles.clear(),this._localTimelineStyles.forEach(((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)})))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}
1mergeTimelineCollectedStyles(e){e._styleSummary.forEach(((e,t)=>{let i=this._styleSummary.get(t);(!i||e.time>i.time)&&this._updateStyle(t,e.value)}))}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=1===this._keyframes.size&&0===this.duration,n=[];this._keyframes.forEach(((r,s)=>{let a=new Map([...this._backFill,...r]);a.forEach(((i,n)=>{"!"===i?e.add(n):i===IK&&t.add(n)})),i||a.set("offset",s/this.duration),n.push(a)}));let r=[...e.values()],s=[...t.values()];if(i){let e=n[0],t=new Map(e);e.set("offset",0),t.set("offset",1),n=[e,t]}return _X(this.element,n,r,s,this.duration,this.startTime,this.easing,!1)}},EX=class extends PX{constructor(e,t,i,n,r,s,a=!1){super(e,t,s.delay),this.keyframes=i,this.preStyleProps=n,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],s=i+t,a=t/s,o=new Map(e[0]);o.set("offset",0),r.push(o);let l=new Map(e[0]);l.set("offset",DX(a)),r.push(l);let c=e.length-1;for(let n=1;n<=c;n++){let a=new Map(e[n]),o=t+a.get("offset")*i;a.set("offset",DX(o/s)),r.push(a)}i=s,t=0,n="",e=r}return _X(this.element,e,this.preStyleProps,this.postStyleProps,i,t,n,!0)}};function DX(e,t=3){let i=Math.pow(10,t-1);return Math.round(e*i)/i}function OX(e,t,i,n,r,s,a,o,l,c,d,u,p){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:i,fromStyles:s,toState:n,toStyles:a,timelines:o,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:p}}var BX={},MX=class{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,n){return function(e,t,i,n,r){return e.some((e=>e(t,i,n,r)))}(this.ast.matchers,e,t,i,n)}buildStyles(e,t,i){let n=this._stateStyles.get("*");return void 0!==e&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(t,i):new Map}build(e,t,i,n,r,s,a,o,l,c){let d=[],u=this.ast.options&&this.ast.options.params||BX,p=a&&a.params||BX,h=this.buildStyles(i,p,d),f=o&&o.params||BX,m=this.buildStyles(n,f,d),g=new Set,b=new Map,y=new Map,v="void"===n,w={params:RX(f,u),delay:this.ast.options?.delay},_=c?[]:AX(e,t,this.ast.animation,r,s,h,m,w,l,d),S=0;return _.forEach((e=>{S=Math.max(e.duration+e.delay,S)})),d.length?OX(t,this._triggerName,i,n,v,h,m,[],[],b,y,S,d):(_.forEach((e=>{let i=e.element,n=TZ(b,i,new Set);e.preStyleProps.forEach((e=>n.add(e)));let r=TZ(y,i,new Set);e.postStyleProps.forEach((e=>r.add(e))),i!==t&&g.add(i)})),OX(t,this._triggerName,i,n,v,h,m,_,[...g.values()],b,y,S))}};function RX(e,t){let i=h({},t);return Object.entries(e).forEach((([e,t])=>{null!=t&&(i[e]=t)})),i}var LX=class{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,n=RX(e,this.defaultParams);return this.styles.styles.forEach((e=>{"string"!=typeof e&&e.forEach(((e,r)=>{e&&(e=iX(e,n,t));let s=this.normalizer.normalizePropertyName(r,t);e=this.normalizer.normalizeStyleValue(r,s,e,t),i.set(r,e)}))})),i}};var FX=class{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach((e=>{let t=e.options&&e.options.params||{};this.states.set(e.name,new LX(e.style,t,i))})),NX(this.states,"true","1"),NX(this.states,"false","0"),t.transitions.forEach((t=>{this.transitionFactories.push(new MX(e,t,this.states))})),this.fallbackTransition=function(e,t){let i=[(e,t)=>!0],n={type:CK.Sequence,steps:[],options:null},r={type:CK.Transition,animation:n,matchers:i,options:null,queryCount:0,depCount:0};return new MX(e,r,t)}(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,n){return this.transitionFactories.find((r=>r.match(e,t,i,n)))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function NX(e,t,i){e.has(t)?e.has(i)||e.set(i,e.get(t)):e.has(i)&&e.set(t,e.get(i))}var UX=new SX,VX=class{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let i=[],n=[],r=gX(this._driver,t,i,n);if(i.length)throw new mn(3503,!1);this._animations.set(e,r)}_buildPlayer(e,t,i){let n=e.element,r=IZ(this._normalizer,e.keyframes,t,i);return this._driver.animate(n,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let n,r=[],s=this._animations.get(e),a=new Map;if(s?(n=AX(this._driver,t,s,qZ,$Z,new Map,new Map,i,UX,r),n.forEac
1h((e=>{let t=TZ(a,e.element,new Map);e.postStyleProps.forEach((e=>t.set(e,null)))}))):(r.push(new mn(3300,!1)),n=[]),r.length)throw new mn(3504,!1);a.forEach(((e,t)=>{e.forEach(((i,n)=>{e.set(n,this._driver.computeStyle(t,n,IK))}))}));let o=CZ(n.map((e=>{let t=a.get(e.element);return this._buildPlayer(e,new Map,t)})));return this._playersById.set(e,o),o.onDestroy((()=>this.destroy(e))),this.players.push(o),o}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw new mn(3301,!1);return t}listen(e,t,i,n){let r=xZ(t,"","","");return AZ(this._getPlayer(e),i,r,n),()=>{}}command(e,t,i,n){if("register"==i)return void this.register(e,n[0]);if("create"==i){let i=n[0]||{};return void this.create(e,t,i)}let r=this._getPlayer(e);switch(i){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e)}}},qX="ng-animate-queued",$X="ng-animate-disabled",jX=[],zX={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},WX={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},HX="__ng_removed",YX=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),n=i?e.value:e;if(this.value=function(e){return e??null}(n),i){let t=e,{value:i}=t,n=g(t,["value"]);this.options=n}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let e=this.options.params;Object.keys(t).forEach((i=>{null==e[i]&&(e[i]=t[i])}))}}},GX="void",KX=new YX(GX),QX=class{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"
1+e,n1(t,this._hostClassName)}listen(e,t,i,n){if(!this._triggers.has(t))throw new mn(3302,!1);if(null==i||0==i.length)throw new mn(3303,!1);if(!function(e){return"start"==e||"done"==e}(i))throw new mn(3400,!1);let r=TZ(this._elementListeners,e,[]),s={name:t,phase:i,callback:n};r.push(s);let a=TZ(this._engine.statesByElement,e,new Map);return a.has(t)||(n1(e,jZ),n1(e,jZ+"-"+t),a.set(t,KX)),()=>{this._engine.afterFlush((()=>{let e=r.indexOf(s);e>=0&&r.splice(e,1),this._triggers.has(t)||a.delete(t)}))}}register(e,t){return!this._triggers.has(e)&&(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw new mn(3401,!1);return t}trigger(e,t,i,n=!0){let r=this._getTrigger(t),s=new ZX(this.id,t,e),a=this._engine.statesByElement.get(e);a||(n1(e,jZ),n1(e,jZ+"-"+t),this._engine.statesByElement.set(e,a=new Map));let o=a.get(t),l=new YX(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&o&&l.absorbOptions(o.options),a.set(t,l),o||(o=KX),l.value!==GX&&o.value===l.value){if(!function(e,t){let i=Object.keys(e),n=Object.keys(t);if(i.length!=n.length)return!1;for(let n=0;n<i.length;n++){let r=i[n];if(!t.hasOwnProperty(r)||e[r]!==t[r])return!1}return!0}(o.params,l.params)){let t=[],i=r.matchStyles(o.value,o.params,t),n=r.matchStyles(l.value,l.params,t);t.length?this._engine.reportError(t):this._engine.afterFlush((()=>{JZ(e,i),QZ(e,n)}))}return}let c=TZ(this._engine.playersByElement,e,[]);c.forEach((e=>{e.namespaceId==this.id&&e.triggerName==t&&e.queued&&e.destroy()}));let d=r.matchTransition(o.value,l.value,e,l.params),u=!1;if(!d){if(!n)return;d=r.fallbackTransition,u=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:d,fromState:o,toState:l,player:s,isFallbackTransition:u}),u||(n1(e,qX),s.onStart((()=>{r1(e,qX)}))),s.onDone((()=>{let t=this.players.indexOf(s);t>=0&&this.players.splice(t,1);let i=this._engine.playersByElement.get(e);if(i){let e=i.indexOf(s);e>=0&&i.splice(e,1)}})),this.players.push(s),c.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach((t=>t.delete(e))),this._elementListeners.forEach(((t,i)=>{this._elementListeners.set(i,t.filter((t=>t.name!=e)))}))}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach((e=>e.destroy())),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,zZ,!0);i.forEach((e=>{if(e[HX])return;let i=this._engine.fetchNamespacesByElement(e);i.size?i.forEach((i=>i.triggerLeaveAnimation(e,t,!1,!0))):this.clearElementCache(e)})),this._engine.afterFlushAnimationsDone((()=>i.forEach((e=>this.clearElementCache(e)))))}triggerLeaveAnimation(e,t,i,n){let r=this._engine.statesByElement.get(e),s=new Map;if(r){let a=[];if(r.forEach(((t,i)=>{if(s.set(i,t.value),this._triggers.has(i)){let t=this.trigger(e,i,GX,n);t&&a.push(t)}})),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),i&&CZ(a).onDone((()=>this._engine.processLeaveNode(e))),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let n=new Set;t.forEach((t=>{let r=t.name;if(n.has(r))return;n.add(r);let s=this._triggers.get(r).fallbackTransition,a=i.get(r)||KX,o=new YX(GX),l=new ZX(this.id,r,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:s,fromState:a,toState:o,player:l,isFallbackTransition:!0})}))}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let n=!1;if(i.totalAnimations){let t=i.players.length?i.playersByQueriedElement.get(e):[];if(t&&t.length)n=!0;else{let t=e;for(;t=t.parentNode;)if(i.statesByElement.get(t)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)i.markElementAsRemoved(this.id,e,!1,t);else{let n=e[HX];(!n||n===zX)&&(i.afterFlush((()=>this.clearElementCache(e))),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){n1(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach((i=>{let n=i.player;if(n.destroyed)return;let r=i.element,s=this._elementListeners.get(r);
1s&&s.forEach((t=>{if(t.name==i.triggerName){let n=xZ(r,i.triggerName,i.fromState.value,i.toState.value);n._data=e,AZ(i.player,t.phase,n,t.callback)}})),n.markedForDestroy?this._engine.afterFlush((()=>{n.destroy()})):t.push(i)})),this._queue=[],t.sort(((e,t)=>{let i=e.transition.ast.depCount,n=t.transition.ast.depCount;return 0==i||0==n?i-n:this._engine.driver.containsElement(e.element,t.element)?1:-1}))}destroy(e){this.players.forEach((e=>e.destroy())),this._signalRemovalForInnerTriggers(this.hostElement,e)}},JX=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(e,t)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach((t=>{t.players.forEach((t=>{t.queued&&e.push(t)}))})),e}createNamespace(e,t){let i=new QX(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,n=this.namespacesByHostElement;if(i.length-1>=0){let r=!1,s=this.driver.getParentElement(t);for(;s;){let t=n.get(s);if(t){let n=i.indexOf(t);i.splice(n+1,0,e),r=!0;break}s=this.driver.getParentElement(s)}r||i.unshift(e)}else i.push(e);return n.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let n=this._namespaceLookup[e];n&&n.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush((()=>{})),this.afterFlushAnimationsDone((()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let n=this._namespaceList.indexOf(i);n>=0&&this._namespaceList.splice(n,1),i.destroy(t),delete this._namespaceLookup[e]})))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i)for(let e of i.values())if(e.namespaceId){let i=this._fetchNamespace(e.namespaceId);i&&t.add(i)}return t}trigger(e,t,i,n){if(XX(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,i,n),!0}return!1}insertNode(e,t,i,n){if(!XX(t))return;let r=t[HX];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let e=this.collectedLeaveElements.indexOf(t);e>=0&&this.collectedLeaveElements.splice(e,1)}if(e){let n=this._fetchNamespace(e);n&&n.insertNode(t,i)}n&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),n1(e,$X)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),r1(e,$X))}removeNode(e,t,i){if(XX(t)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,n,r){this.collectedLeaveElements.push(t),t[HX]={namespaceId:e,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,i,n,r){return XX(t)?this._fetchNamespace(e).listen(t,i,n,r):()=>{}}_buildInstruction(e,t,i,n,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,n,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,zZ,!0);t.forEach((e=>this.destroyActiveAnimationsForElement(e))),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,HZ,!0),t.forEach((e=>this.finishActiveQueriedAnimationOnElement(e))))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach((e=>{e.queued?e.markedForDestroy=!0:e.destroy()}))}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach((e=>e.finish()))}whenRenderingDone(){return new Promise((e=>{if(this.players.length)return CZ(this.players).onDone((()=>e()));e()}))}processLeaveNode(e){let t=e[HX];if(t&&t.setForRemoval){if(e[HX]=zX,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains($X)&&this.markElementAsDisabled(e,!1),this.driver.query(e,".ng-animate-disabled",!0).forEac
1h((e=>{this.markElementAsDisabled(e,!1)}))}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach(((e,t)=>this._balanceNamespaceList(e,t))),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let e=0;e<this.collectedEnterElements.length;e++){n1(this.collectedEnterElements[e],"ng-star-inserted")}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{t=this._flushAnimations(i,e)}finally{for(let e=0;e<i.length;e++)i[e]()}}else for(let e=0;e<this.collectedLeaveElements.length;e++){let t=this.collectedLeaveElements[e];this.processLeaveNode(t)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach((e=>e())),this._flushFns=[],this._whenQuietFns.length){let e=this._whenQuietFns;this._whenQuietFns=[],t.length?CZ(t).onDone((()=>{e.forEach((e=>e()))})):e.forEach((e=>e()))}}reportError(e){throw new mn(3402,!1)}_flushAnimations(e,t){let i=new SX,n=[],r=new Map,s=[],a=new Map,o=new Map,l=new Map,c=new Set;this.disabledNodes.forEach((e=>{c.add(e);let t=this.driver.query(e,".ng-animate-queued",!0);for(let e=0;e<t.length;e++)c.add(t[e])}));let d=this.bodyNode,u=Array.from(this.statesByElement.keys()),p=i1(u,this.collectedEnterElements),h=new Map,f=0;p.forEach(((e,t)=>{let i=qZ+f++;h.set(t,i),e.forEach((e=>n1(e,i)))}));let m=[],g=new Set,b=new Set;for(let e=0;e<this.collectedLeaveElements.length;e++){let t=this.collectedLeaveElements[e],i=t[HX];i&&i.setForRemoval&&(m.push(t),g.add(t),i.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach((e=>g.add(e))):b.add(t))}let y=new Map,v=i1(u,Array.from(g));v.forEach(((e,t)=>{let i=$Z+f++;y.set(t,i),e.forEach((e=>n1(e,i)))})),e.push((()=>{p.forEach(((e,t)=>{let i=h.get(t);e.forEach((e=>r1(e,i)))})),v.forEach(((e,t)=>{let i=y.get(t);e.forEach((e=>r1(e,i)))})),m.forEach((e=>{this.processLeaveNode(e)}))}));let w=[],_=[];for(let e=this._namespaceList.length-1;e>=0;e--)this._namespaceList[e].drainQueuedTransitions(t).forEach((e=>{let t=e.player,r=e.element;if(w.push(t),this.collectedEnterElements.length){let i=r[HX];if(i&&i.setForMove){if(i.previousTriggersValues&&i.previousTriggersValues.has(e.triggerName)){let t=i.previousTriggersValues.get(e.triggerName),n=this.statesByElement.get(e.element);if(n&&n.has(e.triggerName)){let i=n.get(e.triggerName);i.value=t,n.set(e.triggerName,i)}}return void t.destroy()}}let c=!d||!this.driver.containsElement(d,r),u=y.get(r),p=h.get(r),f=this._buildInstruction(e,i,p,u,c);if(f.errors&&f.errors.length)return void _.push(f);if(c)return t.onStart((()=>JZ(r,f.fromStyles))),t.onDestroy((()=>QZ(r,f.toStyles))),void n.push(t);if(e.isFallbackTransition)return t.onStart((()=>JZ(r,f.fromStyles))),t.onDestroy((()=>QZ(r,f.toStyles))),void n.push(t);let m=[];f.timelines.forEach((e=>{e.stretchStartingKeyframe=!0,this.disabledNodes.has(e.element)||m.push(e)})),f.timelines=m,i.append(r,f.timelines);let g={instruction:f,player:t,element:r};s.push(g),f.queriedElements.forEach((e=>TZ(a,e,[]).push(t))),f.preStyleProps.forEach(((e,t)=>{if(e.size){let i=o.get(t);i||o.set(t,i=new Set),e.forEach(((e,t)=>i.add(t)))}})),f.postStyleProps.forEach(((e,t)=>{let i=l.get(t);i||l.set(t,i=new Set),e.forEach(((e,t)=>i.add(t)))}))}));if(_.length){let e=[];_.forEach((t=>{e.push((t.triggerName,t.errors,new mn(3505,!1)))})),w.forEach((e=>e.destroy())),this.reportError(e)}let S=new Map,C=new Map;s.forEach((e=>{let t=e.element;i.has(t)&&(C.set(t,t),this._beforeAnimationBuild(e.player.namespaceId,e.instruction,S))})),n.forEach((e=>{let t=e.element;this._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach((e=>{TZ(S,t,[]).push(e),e.destroy()}))}));let I=m.filter((e=>o1(e,o,l))),A=new Map;t1(A,this.driver,b,l,IK).forEach((e=>{o1(e,o,l)&&I.push(e)}));let k=new Map;p.forEach(((e,t)=>{t1(k,this.driver,new Set(e),o,"!")})),I.forEach((e=>{let t=A.get(e),i=k.get(e);A.set(e,new Map([...t?.entries()??[],...i?.entries()??[]]))}));let x=[],T=[],P={};s.forEach((e=>{let{element:t,player:s,instruction:a}=e;if(i.has(t)){if(c.has(t))return s.onDestroy((()=>QZ(t,a.toStyles))),s.disabled=!0,s.overrideTotalTime(a.totalTime),void n.push(s);let e=P;if(C.size>1){let i=t,n=[];for(;i=i.parentNode;){let t=C.get(i);if(t){e=t;break}n.push(i)}n.forEach((t=>C.set(t,e)))}let i=this._buildAnimation(s.namespaceId,a,S,r,k,A);if(s.setRealPlayer(i),e===P)x.push(s);else{let t=this.playersByElement.get(e);t&&t.length&&(s.parentPlayer=CZ(t)),n.push(s)}}else JZ(t,a.fromStyles),s.onDestroy((()=>QZ(t,a.toStyles))),T.push(s),c.has(t)&&n.push(s)})),T.forEach((e=>{let t=r.get(e.element);if(t&&t.length){let i=CZ(t);e.setRealPlayer(i)}}
1)),n.forEach((e=>{e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()}));for(let e=0;e<m.length;e++){let t=m[e],i=t[HX];if(r1(t,$Z),i&&i.hasAnimation)continue;let n=[];if(a.size){let e=a.get(t);e&&e.length&&n.push(...e);let i=this.driver.query(t,HZ,!0);for(let e=0;e<i.length;e++){let t=a.get(i[e]);t&&t.length&&n.push(...t)}}let r=n.filter((e=>!e.destroyed));r.length?s1(this,t,r):this.processLeaveNode(t)}return m.length=0,x.forEach((e=>{this.players.push(e),e.onDone((()=>{e.destroy();let t=this.players.indexOf(e);this.players.splice(t,1)})),e.play()})),x}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,n,r){let s=[];if(t){let t=this.playersByQueriedElement.get(e);t&&(s=t)}else{let t=this.playersByElement.get(e);if(t){let e=!r||r==GX;t.forEach((t=>{t.queued||!e&&t.triggerName!=n||s.push(t)}))}}return(i||n)&&(s=s.filter((e=>!(i&&i!=e.namespaceId||n&&n!=e.triggerName)))),s}_beforeAnimationBuild(e,t,i){let n=t.triggerName,r=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:n;for(let e of t.timelines){let n=e.element,o=n!==r,l=TZ(i,n,[]);this._getPreviousPlayers(n,o,s,a,t.toState).forEach((e=>{let t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),l.push(e)}))}JZ(r,t.fromStyles)}_buildAnimation(e,t,i,n,r,s){let a=t.triggerName,o=t.element,l=[],c=new Set,d=new Set,u=t.timelines.map((t=>{let u=t.element;c.add(u);let p=u[HX];if(p&&p.removedBeforeQueried)return new PK(t.duration,t.delay);let h=u!==o,f=function(e){let t=[];return a1(e,t),t}((i.get(u)||jX).map((e=>e.getRealPlayer()))).filter((e=>{let t=e;return!!t.element&&t.element===u})),m=r.get(u),g=s.get(u),b=IZ(this._normalizer,t.keyframes,m,g),y=this._buildPlayer(t,b,f);if(t.subTimeline&&n&&d.add(u),h){let t=new ZX(e,a,u);t.setRealPlayer(y),l.push(t)}return y}));l.forEach((e=>{TZ(this.playersByQueriedElement,e.element,[]).push(e),e.onDone((()=>function(e,t,i){let n=e.get(t);if(n){if(n.length){let e=n.indexOf(i);n.splice(e,1)}0==n.length&&e.delete(t)}return n}(this.playersByQueriedElement,e.element,e)))})),c.forEach((e=>n1(e,WZ)));let p=CZ(u);return p.onDestroy((()=>{c.forEach((e=>r1(e,WZ))),QZ(o,t.toStyles)})),d.forEach((e=>{TZ(n,e,[]).push(p)})),p}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new PK(e.duration,e.delay)}},ZX=class{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new PK,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach(((t,i)=>{t.forEach((t=>AZ(e,i,void 0,t)))})),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart((()=>t.triggerCallback("start"))),e.onDone((()=>this.finish())),e.onDestroy((()=>this.destroy()))}_queueEvent(e,t){TZ(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function XX(e){return e&&1===e.nodeType}function e1(e,t){let i=e.style.display;return e.style.display=t??"none",i}function t1(e,t,i,n,r){let s=[];
1i.forEach((e=>s.push(e1(e))));let a=[];n.forEach(((i,n)=>{let s=new Map;i.forEach((e=>{let i=t.computeStyle(n,e,r);s.set(e,i),(!i||0==i.length)&&(n[HX]=WX,a.push(n))})),e.set(n,s)}));let o=0;return i.forEach((e=>e1(e,s[o++]))),a}function i1(e,t){let i=new Map;if(e.forEach((e=>i.set(e,[]))),0==t.length)return i;let n=new Set(t),r=new Map;function s(e){if(!e)return 1;let t=r.get(e);if(t)return t;let a=e.parentNode;return t=i.has(a)?a:n.has(a)?1:s(a),r.set(e,t),t}return t.forEach((e=>{let t=s(e);1!==t&&i.get(t).push(e)})),i}function n1(e,t){e.classList?.add(t)}function r1(e,t){e.classList?.remove(t)}function s1(e,t,i){CZ(i).onDone((()=>e.processLeaveNode(t)))}function a1(e,t){for(let i=0;i<e.length;i++){let n=e[i];n instanceof EK?a1(n.players,t):t.push(n)}}function o1(e,t,i){let n=i.get(e);if(!n)return!1;let r=t.get(e);return r?n.forEach((e=>r.add(e))):t.set(e,n),i.delete(e),!0}var l1=class{constructor(e,t,i){this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(e,t)=>{},this._transitionEngine=new JX(e.body,t,i),this._timelineEngine=new VX(e.body,t,i),this._transitionEngine.onRemovalComplete=(e,t)=>this.onRemovalComplete(e,t)}registerTrigger(e,t,i,n,r){let s=e+"-"+n,a=this._triggerCache[s];if(!a){let e=[],t=[],i=gX(this._driver,r,e,t);if(e.length)throw new mn(3404,!1);t.length,a=function(e,t,i){return new FX(e,t,i)}(n,i,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,n,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,n){this._transitionEngine.insertNode(e,t,i,n)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,n){if("@"==i.charAt(0)){let[e,r]=PZ(i),s=n;this._timelineEngine.command(e,t,r,s)}else this._transitionEngine.trigger(e,t,i,n)}listen(e,t,i,n,r){if("@"==i.charAt(0)){let[e,n]=PZ(i);return this._timelineEngine.listen(e,t,n,r)}return this._transitionEngine.listen(e,t,i,n,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};var c1=class e{static{this.initialStylesByElement=new WeakMap}constructor(t,i,n){this._element=t,this._startStyles=i,this._endStyles=n,this._state=0;let r=e.initialStylesByElement.get(t);r||e.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&QZ(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(QZ(this._element,this._initialStyles),this._endStyles&&(QZ(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(JZ(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(JZ(this._element,this._endStyles),this._endStyles=null),QZ(this._element,this._initialStyles),this._state=3)}};function d1(e){let t=null;return e.forEach(((e,i)=>{(function(e){return"display"===e||"position"===e})(i)&&(t=t||new Map,t.set(i,e))})),t}var u1=class{constructor(e,t,i,n){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach((e=>e())),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy((()=>{this.domPlayer.removeEventListener("finish",t)}))}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach((e=>{t.push(Object.fromEntries(e))})),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((e=>e())),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((e=>e())),this._onDestroyFns=[])}setPosition(e){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach(((t,i)=>{"offset"!==i&&e.set(i,this._finished?t:aX(this.element,i))}
1)),this.currentSnapshot=e}triggerCallback(e){let t="start"===e?this._onStartFns:this._onDoneFns;t.forEach((e=>e())),t.length=0}},p1=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return RZ(e,t)}getParentElement(e){return DZ(e)}query(e,t,i){return LZ(e,t,i)}computeStyle(e,t,i){return aX(e,t)}animate(e,t,i,n,r,s=[]){let a={duration:i,delay:n,fill:0==n?"both":"forwards"};r&&(a.easing=r);let o=new Map,l=s.filter((e=>e instanceof u1));(function(e,t){return 0===e||0===t})(i,n)&&l.forEach((e=>{e.currentSnapshot.forEach(((e,t)=>o.set(t,e)))}));let c=function(e){return e.length?e[0]instanceof Map?e:e.map((e=>new Map(Object.entries(e)))):[]}(t).map((e=>new Map(e)));c=function(e,t,i){if(i.size&&t.length){let n=t[0],r=[];if(i.forEach(((e,t)=>{n.has(t)||r.push(t),n.set(t,e)})),r.length)for(let i=1;i<t.length;i++){let n=t[i];r.forEach((t=>n.set(t,aX(e,t))))}}return t}(e,c,o);let d=function(e,t){let i=null,n=null;return Array.isArray(t)&&t.length?(i=d1(t[0]),t.length>1&&(n=d1(t[t.length-1]))):t instanceof Map&&(i=d1(t)),i||n?new c1(e,i,n):null}(e,c);return new u1(e,c,a,d)}},h1="@",f1="@.disabled",m1=class{constructor(e,t,i,n){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=n,this.ɵtype=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone((()=>{queueMicrotask((()=>{this.delegate.destroy()}))})),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,n=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,n)}removeChild(e,t,i){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,n){this.delegate.setAttribute(e,t,i,n)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,n){this.delegate.setStyle(e,t,i,n)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==h1&&t==f1?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},g1=class extends m1{constructor(e,t,i,n,r){super(t,i,n,r),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==h1?"."==t.charAt(1)&&t==f1?(i=void 0===i||!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if(t.charAt(0)==h1){let n=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e),r=t.slice(1),s="";return r.charAt(0)!=h1&&([r,s]=function(e){let t=e.indexOf("."),i=e.substring(0,t),n=e.slice(t+1);return[i,n]}(r)),this.engine.listen(this.namespaceId,n,r,s,(e=>{let t=e._data||-1;this.factory.scheduleListenerCallback(t,i,e)}))}return this.delegate.listen(e,t,i)}};var b1=class{constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(e,t)=>{t?.removeChild(null,e)}}createRenderer(e,t){let i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let e=this._rendererCache,t=e.get(i);if(!t){let n=()=>e.delete(i);t=new m1("",i,this.engine,n),e.set(i,t)}return t}let n=t.id,r=t.id+"-"+this._currentId;this._currentId++,this.engine.register(r,e);let s=t=>{Array.isArray(t)?t.forEach(s):this.engine.registerTrigger(n,r,e,t.name,t)};return t.data.animation.forEach(s),new g1(this,r,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask((()=>{this._microtaskId++}))}scheduleListenerCallback(e,t,i){if(e>=0&&e<this._microtaskId)return void this._zone.run((()=>t(i)));let n=this._animationCallbacksBuffer;0==n.length&&queueMicrotask((()=>{this._zone.run((()=>
1{n.forEach((e=>{let[t,i]=e;t(i)})),this._animationCallbacksBuffer=[]}))})),n.push([t,i])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular((()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)})),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}},y1=(()=>{class e extends l1{constructor(e,t,i){super(e,t,i)}ngOnDestroy(){this.flush()}static{this.ɵfac=function(t){return new(t||e)(lr(Qg),lr(NZ),lr(UZ))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();var v1=[{provide:UZ,useFactory:function(){return new lX}},{provide:l1,useClass:y1},{provide:cp,useFactory:function(e,t,i){return new b1(e,t,i)},deps:[Kv,l1,Tl]}],w1=[{provide:NZ,useFactory:()=>new p1},{provide:sc,useValue:"BrowserAnimations"},...v1],_1=[{provide:NZ,useClass:FZ},{provide:sc,useValue:"NoopAnimations"},...v1],S1=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?_1:w1}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:w1,imports:[uw]})}}return e})(),C1=e=>({btn:!0,"grid-coupon-btn":!0,"btn-default":!0,"loading-coupon-item":e}),I1=(e,t)=>({color:e,fontSize:t}),A1=e=>({"grid-coupon-clip-button":!0,clipped:e}),k1=e=>({btn:!0,"grid-coupon-btn":!0,"btn-default":!0,"loading-coupon-item":e}),x1=e=>({btn:!0,"btn-default":!0,"loading-offer-detail":e}),T1=e=>({"m-0":e}),P1=(e,t)=>({color:e,fontSize:t});function E1(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",1),jf("click",(function(){return Wa(e),Ha(Yf(2).startChallenge())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(2).startChallenge())})),am(2),xf(),Df()}if(2&e){let e=Yf(2);Vd(),Zf("id","couponAddBtn",e.id,""),zh("ngClass",Om(5,C1,e.showLoadingCoupon)),gh("aria-describedby",e.startChallengeLabel),Vd(),lm(e.startChallengeLabel)}}function D1(e,t){if(1&e&&(Ef(0),kf(1,"div",2)(2,"span",3),am(3),xf(),kf(4,"span",4),am(5),xf(),kf(6,"span",5),am(7,"/ "),xf(),kf(8,"span",6),am(9),xf()(),Tf(10,"progressbar",7),Df()),2&e){let e=Yf(2);Vd(3),cm("",e.offerDataDisplay(e.continuity).prefix,": "),Vd(2),cm("",e.offerDataDisplay(e.continuity).progressVal," "),Vd(4),cm("",e.offerDataDisplay(e.continuity).targetVal," "),Vd(),Jf("max",e.continuity.targetValue),Jf("value",e.continuity.progressValue),zh("animate",!1)}}function O1(e,t){if(1&e&&(Ef(0),kf(1,"div",8)(2,"span"),So(),kf(3,"svg",9)(4,"g",10)(5,"g",11),Tf(6,"polygon",12),xf()()()(),Co(),kf(7,"span",13),am(8),xf()(),Df()),2&e){let e=Yf(2);Vd(2),gh("aria-describedby",e.challengeCompletedLabel),Vd(3),gh("fill",e.challengeCompletedLabelColor),Vd(2),zh("ngStyle",Bm(4,I1,e.challengeCompletedLabelColor,e.fontSize)),Vd(),lm(e.challengeCompletedLabel)}}function B1(e,t){if(1&e&&(Ef(0),ph(1,E1,3,7,"ng-container",0)(2,D1,11,6,"ng-container",0)(3,O1,9,7,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf",0===e.continuity.progressValue&&!e.isClipped),Vd(),zh("ngIf",e.isClipped&&e.continuity.progressValue>=0&&e.continuity.progressValue<e.continuity.targetValue),Vd(),zh("ngIf",e.isClipped&&e.continuity.progressValue===e.continuity.targetValue)}}function M1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){return Wa(e),Ha(Yf(4).startChallenge())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(4).startChallenge())})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","couponAddBtn",e.id,""),zh("ngClass",Om(5,k1,e.showLoadingCoupon)),gh("aria-describedby",e.startChallengeLabel),Vd(),cm(" ",e.startChallengeLabel," ")}}function R1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){return Wa(e),Ha(Yf(4).startChallenge())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(4).startChallenge())})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","couponAddBtn",e.id,""),zh("ngClass",Om(5,k1,e.showLoadingCoupon)),gh("aria-describedby",e.startChallengeLabel),Vd(),cm(" ",e.behavioralOfferAttrs.addToMyListBtnText," ")}}function L1(e,t){if(1&e&&(Ef(0),kf(1,"div",14)(2,"div",15),ph(3,M1,2,7,"button",16)(4,R1,2,7,"button",16),xf()(),Df()),2&e){let e=Yf(3);Vd(2),Zf("id","clippedCouponGrid",null==e.couponData?null:e.couponData.couponID,""),zh("ngClass",Om(5,A1,"C"==(null==e.couponData?null:e.couponData.status))),Vd(),zh("ngIf",e.couponData.status&&"U"===e.couponData.status&&!e.couponData.deleted),Vd(),zh("ngIf",e.couponData.status&&"U"===e.couponData.status&&e.couponData.deleted)}}function F1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){return Wa(e),Ha(Yf(4).startChallenge(
1))}))("keydown.enter",(function(){return Wa(e),Ha(Yf(4).startChallenge())})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","offerDetailButton",e.id,""),zh("ngClass",Om(5,x1,e.showLoadingCoupon)),gh("aria-describedby",e.startChallengeLabel),Vd(),cm(" ",e.startChallengeLabel," ")}}function N1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){return Wa(e),Ha(Yf(4).startChallenge())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(4).startChallenge())})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","offerDetailButton",e.id,""),zh("ngClass",Om(5,x1,e.showLoadingCoupon)),gh("aria-describedby",e.startChallengeLabel),Vd(),cm(" ",e.behavioralOfferAttrs.addToMyListBtnText," ")}}function U1(e,t){if(1&e&&(Ef(0),ph(1,F1,2,7,"button",16)(2,N1,2,7,"button",16),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.couponData.status&&"U"===e.couponData.status&&!e.couponData.deleted),Vd(),zh("ngIf",e.couponData.status&&"U"===e.couponData.status&&e.couponData.deleted)}}function V1(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",17),jf("click",(function(){return Wa(e),Ha(Yf(3).startChallenge())})),am(2),xf(),Df()}if(2&e){let e=Yf(3);Vd(),Zf("id","couponAddBtn",e.id,""),gh("aria-describedby",e.startChallengeLabel),Vd(),lm(e.startChallengeLabel)}}function q1(e,t){if(1&e&&(Ef(0),ph(1,L1,5,7,"ng-container",0)(2,U1,3,2,"ng-container",0)(3,V1,3,4,"ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isOfferDetailsPage&&!e.isCouponCarosel),Vd(),zh("ngIf",e.isOfferDetailsPage&&!e.isCouponCarosel),Vd(),zh("ngIf",e.isCouponCarosel)}}function $1(e,t){if(1&e){let e=Mf();kf(0,"span",21)(1,"a",22),jf("click",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))})),am(2),xf()()}if(2&e){let e=Yf(5);Vd(),Jf("href",e.behavioralOfferAttrs.startShoppingLink,id),Vd(),lm(e.behavioralOfferAttrs.startShoppingText)}}function j1(e,t){if(1&e){let e=Mf();kf(0,"span",23)(1,"a",22),jf("click",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))})),am(2),xf()()}if(2&e){let e=Yf(5);Vd(),Jf("href",e.behavioralOfferAttrs.startShoppingLink,id),Vd(),lm(e.behavioralOfferAttrs.startShoppingText)}}function z1(e,t){if(1&e&&(Ef(0),kf(1,"div",2)(2,"span",3),am(3),xf(),kf(4,"span",4),am(5),xf(),kf(6,"span",5),am(7,"/Â "),xf(),kf(8,"span",6),am(9),xf()(),ph(10,$1,3,2,"span",18),Tf(11,"progressbar",19),ph(12,j1,3,2,"span",20),Df()),2&e){let e=Yf(4);Vd(3),cm("",e.offerDataDisplay(null==e.couponData?null:e.couponData.continuity).prefix,":Â "),Vd(2),cm("",e.offerDataDisplay(null==e.couponData?null:e.couponData.continuity).progressVal,"Â "),Vd(4),cm("",e.offerDataDisplay(null==e.couponData?null:e.couponData.continuity).targetVal,"Â "),Vd(),zh("ngIf",e.isOfferDetailsPage&&e.continuityOfferService.isFreshpassContinuityCoupon(e.couponData)),Vd(),zh("ngClass",Om(9,T1,!e.isOfferDetailsPage))("max",e.convertString(null==e.couponData?null:e.couponData.continuity.targetValue))("value",e.convertString(null==e.couponData?null:e.couponData.continuity.progressValue))("animate",!1),Vd(),zh("ngIf",!e.isOfferDetailsPage&&e.continuityOfferService.isFreshpassContinuityCoupon(e.couponData))}}function W1(e,t){if(1&e){let e=Mf();kf(0,"a",22),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))})),am(1),xf()}if(2&e){let e=Yf(6);Jf("href",e.behavioralOfferAttrs.grClipLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipButtonText)}}function H1(e,t){if(1&e){let e=Mf();kf(0,"a",22),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))})),am(1),xf()}if(2&e){let e=Yf(6);Jf("href",e.behavioralOfferAttrs.ucaEmailOptInLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInButtonText)}}function Y1(e,t){if(1&e){let e=Mf();kf(0,"a",22),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))})),am(1),xf()}if(2&e){let e=Yf(6);
1Jf("href",e.behavioralOfferAttrs.ecomFulfillmentLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentButtonText)}}function G1(e,t){if(1&e&&(kf(0,"div",25)(1,"span",26),am(2),xf(),kf(3,"span",27)(4,"span",23),ph(5,W1,2,2,"a",28)(6,H1,2,2,"a",28)(7,Y1,2,2,"a",28),xf()()()),2&e){let e=Yf(5);Vd(2),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.inProgressStatusText),Vd(3),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipTextOMS.trim().toLowerCase())),Vd(),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInTextOMS.trim().toLowerCase())),Vd(),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentTextOMS.trim().toLowerCase()))}}function K1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))})),am(1),xf()}if(2&e){let e=Yf(6);Zf("id","offerDetailButton",e.id,""),zh("ngClass",Om(5,x1,e.showLoadingCoupon)),gh("aria-describedby",null==e.couponData?null:e.couponData.qualificationBehavior),Vd(),cm(" ",null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipButtonText," ")}}function Q1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))})),am(1),xf()}if(2&e){let e=Yf(6);Zf("id","offerDetailButton",e.id,""),zh("ngClass",Om(5,x1,e.showLoadingCoupon)),gh("aria-describedby",null==e.couponData?null:e.couponData.qualificationBehavior),Vd(),cm(" ",null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInButtonText," ")}}function J1(e,t){if(1&e){let e=Mf();kf(0,"button",1),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))})),am(1),xf()}if(2&e){let e=Yf(6);Zf("id","offerDetailButton",e.id,""),zh("ngClass",Om(5,x1,e.showLoadingCoupon)),gh("aria-describedby",null==e.couponData?null:e.couponData.qualificationBehavior),Vd(),cm(" ",null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentButtonText," ")}}function Z1(e,t){if(1&e&&(Ef(0),ph(1,K1,2,7,"button",16)(2,Q1,2,7,"button",16)(3,J1,2,7,"button",16),Df()),2&e){let e=Yf(5);Vd(),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior)===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipTextOMS)),Vd(),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior)===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInTextOMS)),Vd(),zh("ngIf",(null==e.couponData?null:e.couponData.qualificationBehavior)===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentTextOMS))}}function X1(e,t){if(1&e&&(Ef(0),ph(1,G1,8,4,"div",24)(2,Z1,4,3,"ng-container",0),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",!e.isOfferDetailsPage),Vd(),zh("ngIf",e.isOfferDetailsPage)}}function e0(e,t){if(1&e&&(Ef(0),ph(1,z1,13,11,"ng-container",0)(2,X1,3,2,"ng-container",0),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.isContinuityCoupon),Vd(),zh("ngIf",e.isBehaviorCoupon)}}function t0(e,t){if(1&e){let e=Mf();kf(0,"span",31)(1,"a",22),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))})),am(2),xf()()}if(2&e){let e=Yf(4);Vd(),Jf("href",e.behavioralOfferAttrs.freshPassOfferLink,id),Vd(),lm(e.behavioralOfferAttrs.freshPassOfferText)}}function i0(e,t){if(1&e){let e=Mf();kf(0,"span",31)(1,"a",22),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.myListLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.myListLink))})),am(2),xf()()}if(2&e){let e=Yf(4);
1Vd(),Jf("href",e.behavioralOfferAttrs.myListLink,id),Vd(),lm(e.behavioralOfferAttrs.viewInMyListText)}}function n0(e,t){if(1&e){let e=Mf();kf(0,"div",31)(1,"a",22),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))})),am(2),xf()()}if(2&e){let e=Yf(4);Vd(),Jf("href",e.behavioralOfferAttrs.freshPassOfferLink,id),Vd(),lm(e.behavioralOfferAttrs.freshPassOfferText)}}function r0(e,t){if(1&e&&(Ef(0),kf(1,"div",29)(2,"span"),So(),kf(3,"svg",9)(4,"g",10)(5,"g",11),Tf(6,"polygon",12),xf()()()(),Co(),kf(7,"span",13),am(8),xf(),ph(9,t0,3,2,"span",30)(10,i0,3,2,"span",30),xf(),ph(11,n0,3,2,"div",30),Df()),2&e){let e=Yf(3);Vd(),zh("ngClass",Om(8,T1,!e.isOfferDetailsPage)),Vd(),gh("aria-describedby",e.challengeCompletedLabel),Vd(3),gh("fill",e.challengeCompletedLabelColor),Vd(2),zh("ngStyle",Bm(10,P1,e.challengeCompletedLabelColor,e.fontSize)),Vd(),lm(e.challengeCompletedLabel),Vd(),zh("ngIf",e.isOfferDetailsPage&&e.continuityOfferService.isFreshpassContinuityCoupon(e.couponData)),Vd(),zh("ngIf",e.isOfferDetailsPage&&!e.continuityOfferService.isFreshpassContinuityCoupon(e.couponData)),Vd(),zh("ngIf",!e.isOfferDetailsPage&&e.continuityOfferService.isFreshpassContinuityCoupon(e.couponData))}}function s0(e,t){if(1&e&&(Ef(0),ph(1,e0,3,2,"ng-container",0)(2,r0,12,13,"ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isBonusPathCompleted),Vd(),zh("ngIf",e.isBonusPathCompleted)}}function a0(e,t){if(1&e&&(Ef(0),ph(1,q1,4,3,"ng-container",0)(2,s0,3,2,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf",!e.isCouponClipped),Vd(),zh("ngIf",e.isCouponClipped)}}var o0=[{unit:"ITEM",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"ITEMS",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"AMOUNT",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"DOLLARS",usePrefix:"Purchased",valuePrefix:"$",valuePostFix:""},{unit:"QUANTITY_PRICE",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"POUND",usePrefix:"Purchased",valuePostFix:"Lbs",valuePrefix:""},{unit:"PER POUND",usePrefix:"Purchased",valuePostFix:"Lbs",valuePrefix:""},{unit:"WEIGHT_VOLUME",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""},{unit:"WEIGHT/VOLUME",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""},{unit:"QUANTITY",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""}],l0=(()=>{class e{constructor(e){this.continuityOfferService=e,this.continuity={},this.programType="",this.challengeCompletedLabelColor="#757575",this.fontSize="inherit",this.startChallengeEvent=new _l,this.isClipped=!1,this.showLoadingCoupon=!1,this.isOfferDetailsPage=!1,this.isBehaviorCoupon=!1,this.isContinuityCoupon=!1,this.isCouponClipped=!1,this.isBonusPathCompleted=!1,this.isBonusPathV2Active=!0,this.behavioralOfferAttrs=this.continuityOfferService.behavioralOfferAttrs,this.startChallengeLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.SCC,this.challengeCompletedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CC}ngOnInit(){}ngOnChanges(e){this.isOfferDetailsPage&&this.couponData.deleted&&(this.couponData.status="U"),this.isBonusPathV2Active&&this.checkOfferStatus()}startChallenge(){this.showLoadingCoupon=!0,this.startChallengeEvent.emit()}navigateTo(e){this.showLoadingCoupon=!0,window.location.pathname=e}offerDataDisplay(e){let t={};if(e?.units){let i=o0.findIndex((t=>t.unit.toLowerCase()===e.units.toLowerCase()));if(i>=0){let n=o0[i];t={prefix:n.usePrefix,progressVal:n.valuePrefix?`${n.valuePrefix}${e.progressValue}`:n.valuePostFix?`${e.progressValue}${n.valuePostFix}`:e.progressValue,targetVal:n.valuePrefix?`${n.valuePrefix}${e.targetValue}`:n.valuePostFix?`${e.targetValue}${n.valuePostFix}`:e.targetValue}}}else t={prefix:"Transactions",progressVal:e.progressValue,targetVal:e.targetValue};return t}checkOfferStatus(){this.couponData.status&&"C"===this.couponData.status||!this.couponData.status&&!this.couponData.deleted?(this.isCouponClipped=!0,this.couponData.continuity?(this.isBonusPathCompleted=this.couponData.continuity.progressValue===this.couponData.continuity.targetValue,this.isContinuityCoupon=!0,this.isBehaviorCoupon=!1):this.couponData.qualificationBehavior&&""!==this.couponData.qualificationBehavior&&(this.isBonusPathCompleted=""!==this.couponData.bonusPathStatus&&"inprogress"!==this.couponData.bonusPathStatus.toLowerCase(),this.isContinuityCoupon=!1,this.isBehaviorCoupon=!0)):"U"===this.couponData.status&&!this.couponData.deleted&&(this.isCouponClipped=!1)}convertString(e){return parseFloat(e)}static{this.ɵfac=function(t){return new(t||e)($d(TD))}}static{this.ɵcmp=Qr({type:e,selectors:[["continuity-offer-challenge"]],inputs:{continuity:"continuity",programType:"programType",challengeCompletedLabelColor:"challengeCompletedLabelColor",fontSize:"fontSize",isClipped:"isClipped",showLoadingCoupon:"showLoadingCoupon",couponData:"couponData",isOfferDetailsPage:"isOfferDetailsPage",behavioralOfferAttrs:"behavioralOfferAttrs",isCouponCarosel:"isCouponCarosel"},outputs:{startChallengeEvent:"startChallengeEvent"},features:[ga],decls:2,vars:2,consts:[[4,"ngIf"],["role","button",3,"click","keydown.enter","ngClass","id"],[1,"progress-offer-status"],[1,"progress-msg"],[1,"pgs-lwrlmt"],[1,"limit-separator"],[1,"pgs-uprlmt"],[3,"max","value","animate"],[1,"challenge-info"],["width","16px","height","16px","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray"],["id","GreenCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236"],[1,"status",3,"ngStyle"],[1,"grid-coupon-clip-button-wrapper"],[3,"id","ngClass"],["role","button",3,"ngClass","id","click","keydown.enter",4,"ngIf"],["type","button",1,"btn","btn-md","btn-primary",3,"click","id"],["class","behaviour-link body-text-xs ml-2 float-right",4,"ngIf"],[3,"ngClass","max","value","animate"],["class","behaviour-link body-text-xs ",4,"ngIf"],[1,"behaviour-link","body-text-xs","ml-2","float-right"],["role","link",1,"links__action","links__action__inline","underline",3,"click","keydown.enter","href"],[1,"behaviour-link","body-text-xs"],["class","progress-behaviour-status",4,"ngIf"],[1,"progress-behaviour-status"],[1,"body-text-xs"],[1,"behaviour-link-container"],["class","links__action links__action__inline underline","role","link",3,"href","click","keydown.enter",4,"ngIf"],[1,"challenge-info",3,"ngClass"],["class","behaviour-link body-text-xs ml-2",4,"ngIf"],[1,"behaviour-link","body-text-xs","ml-2"]],template:function(e,t){1&e&&ph(0,B1,4,3,"ng-container",0)(1,a0,3,2,"ng-container",0),2&e&&(zh("ngIf",!t.isBonusPathV2Active),Vd(),zh("ngIf",t.isBonusPathV2Active))},dependencies:[sy,cy,gy,tW],encapsulation:2})}}return e})(),c0=(e,t,i)=>({color:e,"background-color":t,"font-size.px":i});function d0(e,t){if(1&e&&(kf(0,"span",2),am(1),xf()),2&e){let e=Yf(2);zh("ngStyle",Mm(2,c0,e.UDCDealsCouponTXColor,e.UDCDealsCouponBGColor,e.UDCDealsCouponFontSize)),Vd(),lm(e.UDClabelheading)}}function u0(e,t){if(1&e&&(Ef(0),ph(1,d0,2,6,"span",1),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.UDClabelheading)}}function p0(e,t){if(1&e&&(Ef(0),Tf(1,"img",3),Df()),2&e){let e=Yf();Vd(),Jf("src",e.logoProps[e.iconImage].logo,id),Jf("alt",e.logoProps[e.iconImage].altText),gh("aria-label",e.logoProps[e.iconImage].altText)}}function h0(e,t){1&e&&(Ef(0),Tf(1,"img",4),Df())}var f0=(()=>{class e{constructor(){this.iconImage=""}ngOnInit(){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["j4u-logo-container"]],inputs:{iconImage:"iconImage",logoProps:"logoProps"},decls:3,vars:3,consts:[[4,"ngIf"],["class","roundedbox-text",3,"ngStyle",4,"ngIf"],[1,"roundedbox-text",3,"ngStyle"],[1,"svg-icon","just-for-you-16px","icon-position",3,"src","alt"],["src","/etc/designs/wcax-commons/images/icons/for-u-logo.png","alt","Just 4 U logo","attr.aria-label","Just 4 U logo",1,"svg-icon","just-for-you-16px","icon-position"]],template:function(e,t){1&e&&ph(0,u0,2,1,"ng-container",0)(1,p0,2,3,"ng-container",0)(2,h0,2,0,"ng-container",0),2&e&&(zh("ngIf","UDCDealIconImage"===t.iconImage),Vd(),zh("ngIf",t.logoProps&&t.iconImage&&"UDCDealIconImage"!==t.iconImage),Vd(),zh("ngIf",!t.logoProps&&"UDCDealIconImage"!==t.iconImage))},dependencies:[cy,gy],encapsulation:2})}}return e})(),m0=e=>({fontSize:e});
1function g0(e,t){if(1&e&&(kf(0,"div"),Tf(1,"img",19),xf()),2&e){let e=Yf();Vd(),Jf("src",e.logoPath,id)}}function b0(e,t){if(1&e&&(kf(0,"div"),Tf(1,"j4u-logo-container",20),xf()),2&e){let e=Yf();Vd(),zh("iconImage",e.iconImage)("logoProps",e.logoProps)}}function y0(e,t){if(1&e){let e=Mf();kf(0,"button",22),jf("click",(function(){Wa(e);let t=Yf(3);return Ha(t.clipCoupon(t.coupon.offerId))})),am(1),xf()}if(2&e){let e=Yf(3);Zf("id","couponAddBtn",e.coupon.offerId,""),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(null!=e.coupon&&e.coupon.deleted?e.continuityOfferService.behavioralOfferAttrs&&null!=e.continuityOfferService.behavioralOfferAttrs&&e.continuityOfferService.behavioralOfferAttrs.addToMyListBtnText?null==e.continuityOfferService.behavioralOfferAttrs?null:e.continuityOfferService.behavioralOfferAttrs.addToMyListBtnText:"Add to My List":e.clipCouponLabel)}}function v0(e,t){if(1&e&&(kf(0,"div")(1,"div",23),Tf(2,"span",24),kf(3,"span",25)(4,"span",26),am(5,"Coupon has already been "),xf(),am(6,"Clipped"),xf()()()),2&e){let e=Yf(3);Vd(),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId)}}function w0(e,t){if(1&e&&(Ef(0),ph(1,y0,2,4,"button",21)(2,v0,7,1,"div",6),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf","U"==e.coupon.status),Vd(),zh("ngIf","C"==e.coupon.status)}}function _0(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"continuity-offer-challenge",27),jf("startChallengeEvent",(function(){Wa(e);let t=Yf(2);return Ha(t.clipCoupon(t.coupon.offerId))})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("showLoadingCoupon",e.showLoadingCoupon)("couponData",e.coupon)("behavioralOfferAttrs",e.behavioralOfferAttrs)("isCouponCarosel",!0)}}function S0(e,t){if(1&e&&(Ef(0),ph(1,w0,3,2,"ng-container",6)(2,_0,2,4,"ng-container",6),Df()),2&e){let e=Yf();Vd(),zh("ngIf",!e.continuityOfferService.isBehaviourOrContinuityCoupon(e.coupon)),Vd(),zh("ngIf",e.continuityOfferService.isBehaviourOrContinuityCoupon(e.coupon))}}function C0(e,t){if(1&e&&(Ef(0),Tf(1,"continuity-offer-challenge",29),Df()),2&e){let e=Yf(2);Vd(),zh("isClipped",!0)("continuity",e.coupon.continuity)("programType",(null==e.coupon?null:e.coupon.offerProgramType)||(null==e.coupon?null:e.coupon.offerProtoType))("challengeCompletedLabelColor","#0C7D50")("fontSize",e.fontSize)}}function I0(e,t){if(1&e){let e=Mf();kf(0,"button",30),jf("click",(function(){Wa(e);let t=Yf(2);return Ha(t.clipCoupon(t.coupon.offerId))})),am(1),xf()}if(2&e){let e=Yf(2);Zf("id","couponAddBtn",e.coupon.offerId,""),zh("ngStyle",Om(5,m0,e.continuityOfferService.isContinuity(e.coupon)?"small":"initial")),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(e.continuityOfferService.isContinuity(e.coupon)?e.startChallengeLabel:e.clipCouponLabel)}}function A0(e,t){if(1&e&&(Ef(0),Tf(1,"continuity-offer-challenge",32),Df()),2&e){let e=Yf(3);Vd(),zh("isClipped",e.continuityOfferService.isClippedStatus(e.coupon))("continuity",e.coupon.continuity)("programType",(null==e.coupon?null:e.coupon.offerProgramType)||(null==e.coupon?null:e.coupon.offerProtoType))("challengeCompletedLabelColor","#0C7D50")}}function k0(e,t){if(1&e&&(kf(0,"div",23),Tf(1,"span",24),kf(2,"span",25)(3,"span",26),am(4,"Coupon has already been "),xf(),am(5,"Clipped"),xf()()),2&e){let e=Yf(3);gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId)}}function x0(e,t){if(1&e&&(kf(0,"div"),ph(1,A0,2,4,"ng-container",31)(2,k0,6,1,"ng-template",null,2,Wm),xf()),2&e){let e=sm(3),t=Yf(2);Vd(),zh("ngIf",t.continuityOfferService.isContinuity(t.coupon))("ngIfElse",e)}}function T0(e,t){if(1&e&&(Ef(0),ph(1,C0,2,5,"ng-container",6)(2,I0,2,7,"button",28)(3,x0,4,2,"div",6),Df()),2&e){let e=Yf();Vd(),zh("ngIf","U"==e.coupon.status&&e.continuityOfferService.isClippedStatus(e.coupon)),Vd(),zh("ngIf","U"==e.coupon.status&&!e.continuityOfferService.isClippedStatus(e.coupon)),Vd(),zh("ngIf","C"==e.coupon.status)}}function P0(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",23),Tf(2,"span",24),kf(3,"span",25)(4,"a",33),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.openDetailsDrawer("offer-detail",t.coupon))}
1)),am(5,"Shop Deal"),xf()()(),Df()}if(2&e){let e=Yf();Vd(),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(3),gh("aria-label","Shop Deal for "+e.coupon.description)}}var E0=(()=>{class e{set coupon(e){try{(e=e.value?e.value:e).brand=e.brand?e.brand:e.name?e.name:"",e.brand=e.brand+".",e.refineDescription=e.description,e.refineOfferPrice=e.offerPrice&&""!=e.offerPrice?e.offerPrice:e.forUDescription?e.forUDescription:"",e.refineOfferPrice=e.priceTitle?e.priceTitle+" "+e.refineOfferPrice:e.refineOfferPrice,e.refineEndDate=this.dateConversion(e.endDate),e.offerId=e.offerId?e.offerId:e.couponID,e.usageTypeTxt=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[e.usageType],e.offerPgmLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponTypes[e.offerPgm],this.clipLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CL,e.status=e.deleted?"U":e.status,e.offerType=e.offerType?e.offerType:e.offerPgm,this._coupon=e;let t="/etc/designs/wcax-commons/images/icons/for-u-logo.png",i={iconImage:"",logoSVGCouponItemImageEnable:!0,logoSVGCouponItemImage:!0,freshPassEnable:!0,freshPassCouponEventListener:["freshpass credit","freshpass perks","freshpass deals"],events:this._coupon&&this._coupon.hierarchies&&this._coupon.hierarchies.events,UDCDealsEnable:!1};this._j4uService.findIconToDisplay(i),this.iconImage=i.iconImage,"FreshPassIconImage"==this.iconImage&&(t="/etc/designs/wcax-commons/images/icons/freshpass-logo.svg"),this._j4uService.isRewardCoupon(this.coupon)&&(this.iconImage="RewardsIconImage"),this.logoPath=t}catch(e){this._elementRef.nativeElement.remove(),console.warn(e)}}get coupon(){return this._coupon}constructor(e,t,i,n,r,s,a){this._appConfigService=e,this._j4uService=t,this._http=i,this._modalService=n,this._elementRef=r,this.continuityOfferService=s,this._commonService=a,this.isWWW=!0,this.isShop=!1,this.showBoxtop=!1,this.modalAttrName="modal",this.modalIdName="#boxtop-modal-cc",this.showLoadingCoupon=!1,this.refreshTitleEvent=ne
1w _l,this.refreshSlickCarousel=new _l,this.iconImage="",this.offerCompleted=!1,this.sm="575px",this.md="768px",this.imagePath=window.AB.dMTProductCard,this.fontSize="small",this.isBonusPathV2Active=!0,this.enableJ4ULogoContainer=!0,this.enableFreeSort=!0}ngOnInit(){window.AB.isWWW?this.couponDetailPath=this._appConfigService.getCouponDetailPathWww():this.couponDetailPath=this._appConfigService.getCouponDetailPathShop(),this.isWWW=window.AB.isWWW,this.isShop=!this.isWWW,this.showBoxtop=!0,this._modalService.showBoxtop.subscribe((e=>{this.showBoxtop=e})),this.clipCouponLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLC,this.clippedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLD,this.startChallengeLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.SCC,this.challengeCompletedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CC,this._j4uService.couponUpdated.subscribe((e=>{this._coupon.offerId==e.id&&(this._coupon.status=e.status,this._coupon.deleted=e.deleted,this.coupon=this._coupon,this.refreshTitleEvent.next(this._coupon),this.refreshSlickCarousel.emit(!0))})),this.behavioralOfferAttrs=h({},this.continuityOfferService.behavioralOfferAttrs)}getImageUrl(e){let t=this.imagePath;return t?t.replace("${product.id}",this.coupon.imageId).replace("${viewport}",e):""}clipCoupon(e){this._isRegistered()?window.SWY.ENFORCEMENT.isTokenActive()?(this.showBoxTopModal(),this.j4uClipCoupon(e),this._updateAnalyticsCarouselName()):window.SWY.ENFORCEMENT.checkAuthorizedCookie()?this._http.get(window.AB.userInfoPath).subscribe((t=>
1{window.AB.userInfo.updateTokenRefreshProperty(),this.showBoxTopModal(),this.j4uClipCoupon(e),this._updateAnalyticsCarouselName()}),(e=>{let t="Coupon Clip - Soft Token is not expired, but AEM servlet returns "+e.status+"status. Redirects to 500 error message";window.AB.DATALAYER.setError(this.coupon.offerId.toString(),"coupon clipping",t),setTimeout((function(){window.AB.COMMON.redirectErrorPage()}),500)})):(window.AB.DATALAYER.setError(this.coupon.offerId.toString(),"coupon clipping","Coupon Clip - Session is expired, reloading the page"),setTimeout((function(){window.location.reload()}),500)):this.showBoxTopModal()||(window.AB.COMMON.showSignInModal_OTP(window.location.href),$("#createAccountModalj4u").attr("data-value","couponAddBtn"+e))}j4uClipCoupon(e){this.showLoadingCoupon=!0;let t=window.AB.userInfo.j4u.storeId,i={nativeElement:this._elementRef.nativeElement};this._j4uService.clipCoupon(this._coupon,t,i).pipe(tn((()=>{this.showLoadingCoupon=!1}))).subscribe((e=>{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.enableFreeSort||setTimeout((()=>{let e=document.querySelector("#clippedCoupon"+this._coupon.offerId);e&&e.focus()}),600),this.refreshTitleEvent.next(this._coupon),this.refreshSlickCarousel.next(!0))}))}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}updateStatistics(){let e={brand:this.coupon.brand,offerType:this.coupon.offerPgm,offerId:this.coupon.offerId,offerPrice:this.coupon.offerPrice,carouselSection:this.carouselSection},t={nativeElement:this._elementRef.nativeElement};window.AB.DATALAYER.clipCoupon(e,t)}dateConversion(e){let t=/\d+/.exec(e),i=new Date(parseInt(t[0]));return i.setUTCMilliseconds(t.index),i.toLocaleDateString("en-US")}hasOfferId(e){return!!e.hasOwnProperty("offerId")||!e.hasOwnProperty("couponID")&&void 0}showBoxTopModal(){let e=!1;return window.AB.isWWW&&(localStorage.showBoxtop&&(this.showBoxtop=JSON.parse(localStorage.getItem("showBoxtop"))),window.AB.userInfo.boxTopAuth&&(this.showBoxtop=!1),"07"===this.coupon.offerSubPgm&&this.showBoxtop&&(e=!0,$(this.modalIdName)&&null!=$(this.modalIdName).model&&$(this.modalIdName).modal({show:!0}))),e}_updateAnalyticsLinkClick(e,t){t?window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement):window.AB.DATALAYER.setLinkClickEvents(e)}_updateAnalyticsCarouselName(){window.AB.DATALAYER&&this.carouselSection&&window.AB.DATALAYER.setCarouselName(`coupons|${this.carouselSection}`)}setProductDetails(e){let t={};if("offer-detail"===e){if("pdp"===this.filterSource){let i={id:$("product-detail").attr("data-product-id")};t={type:e,coupon:this.coupon,product:i,triggeredElement:"coupon-carousel-pdp"}}else t={type:e,coupon:this.coupon,product:{},triggeredElement:"coupon-carousel"};this._updateAnalyticsLinkClick("offer-drawer-j4u-productcards",this.coupon.brand),window.digitalData.coupon={carouselSection:"offer-drawer"}}this._appConfigService.rightDrawerSource.next(t)}static{this.ɵfac=function(t){return new(t||e)($d(hP),$d(PD),$d(ov),$d(mP),$d(Vl),$d(TD),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-card"]],inputs:{filterSource:"filterSource",carouselSection:"carouselSection",couponsCarouselItem:"couponsCarouselItem",logoProps:"logoProps",coupon:"coupon"},outputs:{refreshTitleEvent:"refreshTitleEvent",refreshSlickCarousel:"refreshSlickCarousel"},decls:31,vars:33,consts:[["title",""],["description",""],["noContinuity",""],["role","region"],[1,"coupon-card__card-body"],[1,"coupon-card__card-body__card-title","coupon-carousel-title",3,"id"],[4,"ngIf"],["tabindex","0",1,"coupon-card__card-body__card-title__price"],[1,"row"],[1,"col-8"],["tabindex","0",1,"cpn-title","mb-0",3,"id"],["tabindex","0",1,"cpn-details",3,"id"],[1,"coupon-card-offer-details-container"],["role","link",1,"coupon-card-offer-details","offer-details",3,"click","keyup.enter"],[1,"col-4"],[3,"media","srcset"],["loading","lazy","role","presentation",1,"w-100","product-image",3,"src","alt"],[1,"cpn-flex-area"],["tabindex","0",1,"expiration"],["aria-label","For U logo","alt","For U logo",1,"coupon-card__card-body__card-title__icon","mr-2",3,"src"],[3,"iconImage","logoProps"],["type","button","class","btn btn-md btn-primary",3,"id","click",4,"ngIf"],["type","button",1,"btn","btn-md","btn-primary",3,"click","id"],[1,"clipped"],[1,"clipped__checkmark","svg-checkmark"],[1,"clipped__label"],[1,"sr-only"],[3,"startChallengeEvent","showLoadingCoupon","couponData","behavioralOfferAttrs","isCouponCarosel"],["type","button","class","btn btn-md btn-primary",3,"id","ngStyle","click",4,"ngIf"],[3,"isClipped","continuity","programType","challengeCompletedLabelColor","fontSize"],["type","button",1,"btn","btn-md","btn-primary",3,"click","id","ngStyle"],[4,"ngIf","ngIfElse"],[3,"isClipped","continuity","programType","challengeCompletedLabelColor"],["href","javascript:void(0);","role","button",1,"coupon-list-shop-deal",3,"click"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4)(2,"div",5),ph(3,g0,2,1,"div",6)(4,b0,2,2,"div",6),kf(5,"div",7),am(6),xf()(),kf(7,"div",8)(8,"div",9)(9,"h5",10,0),am(11),xf(),kf(12,"div",11,1),am(14),xf(),kf(15,"div",12)(16,"a",13),jf("click",(function(){return Wa(e),Ha(t.setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(t.setProductDetails("offer-detail"))})),am(17,"Offer Details"),xf()()(),kf(18,"div",14)(19,"picture"),Tf(20,"source",15)(21,"source",15)(22,"img",16),xf()()(),kf(23,"div",17),ph(24,S0,3,2,"ng-container",6)(25,T0,4,3,"ng-container",6)(26,P0,6,2,"ng-container",6),kf(27,"p",18),am(28),Tf(29,"br"),am(30),xf()()()()}2&e&&(df("coupon-card coupon-card-",t.coupon.offerId," card mr-auto ml-auto ml-md-0"),Sh("aria-label","Coupon - ",t.coupon.refineOfferPrice," - ",t.coupon.refineBrand,""),Vd(2),Zf("id","coupon-price-",t.coupon.offerId,""),Vd(),zh("ngIf",!t.enableJ4ULogoContainer),Vd(),zh("ngIf",t.enableJ4ULogoContainer),Vd(2),cm(" ",t.coupon.refineOfferPrice," "),Vd(3),Zf("id","coupon-title-",t.coupon.offerId,""),Vd(2),lm(t.coupon.brand),Vd(),Zf("id","coupon-description-",t.coupon.offerId,""),Vd(2),cm(" ",t.coupon.description," "),Vd(2),gh("aria-describedby","coupon-price-"+t.coupon.offerId+" coupon-title-"+t.coupon.offerId+" coupon-description-"+t.coupon.offerId),Vd(4),Zf("media","(min-width: ",t.md,")"),Jf("srcset",t.getImageUrl("desktop")),Vd(),Zf("media","(min-width: ",t.sm,")"),Jf("srcset",t.getImageUrl("tablet")),Vd(),Jf("src",t.getImageUrl("mobile"),id),Jf("alt",t.coupon.brand),gh("aria-label",t.coupon.brand),Vd(2),zh("ngIf",!t.offerCompleted&&t.isBonusPathV2Active),Vd(),zh("ngIf",!t.offerCompleted&&!t.isBonusPathV2Active),Vd(),zh("ngIf",t.offerCompleted),Vd(),gh("aria-label","Expires "+t.coupon.refineEndDate),Vd(),lm(t.coupon.usageTypeTxt),Vd(2),cm("Expires ",t.coupon.refineEndDate,""))},dependencies:[cy,gy,l0,f0],encapsulation:2})}}return e})(),D0=(e,t)=>({color:e,fontSize:t});function O0(e,t){if(1&e){let e=Mf();kf(0,"button",2),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.clipCoupon(i.data,t))})),am(1),xf()}if(2&e){let e=Yf(3);Zf("id","couponAddBtn",e.data.offerId,""),gh("aria-describedby","coupon-price-"+e.data.offerId+" coupon-title-"+e.data.offerId+" coupon-description-"+e.data.offerId)("aria-label",e.clipCouponBtnLabel),V
1d(),cm(" ",null!=e.data&&e.data.deleted?e.behavioralOfferAttrs&&null!=e.behavioralOfferAttrs&&e.behavioralOfferAttrs.addToMyListBtnText?null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.addToMyListBtnText:"Add to List":"Clip Coupon"," ")}}function B0(e,t){if(1&e&&(kf(0,"div")(1,"div",3),Tf(2,"span",4),kf(3,"span",5)(4,"span",6),am(5,"Coupon has already been "),xf(),am(6,"Clipped"),xf()()()),2&e){let e=Yf(3);Vd(),gh("aria-describedby","coupon-price-"+e.data.offerId+" coupon-title-"+e.data.offerId+" coupon-description-"+e.data.offerId)}}function M0(e,t){if(1&e){let e=Mf();kf(0,"button",2),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.clipCoupon(i.data,t))})),am(1),xf()}if(2&e){let e=Yf(3);Zf("id","couponAddBtn",e.data.offerId,""),gh("aria-describedby","coupon-price-"+e.data.offerId+" coupon-title-"+e.data.offerId+" coupon-description-"+e.data.offerId)("aria-label",e.clipCouponBtnLabel),Vd(),cm(" ",null!=e.data&&e.data.deleted?e.behavioralOfferAttrs&&null!=e.behavioralOfferAttrs&&e.behavioralOfferAttrs.addToMyListBtnText?null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.addToMyListBtnText:"Add to List":"Clip Coupon"," ")}}function R0(e,t){if(1&e&&(Ef(0),ph(1,O0,2,5,"button",1)(2,B0,7,1,"div",0)(3,M0,2,5,"button",1),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf","U"===e.data.status),Vd(),zh("ngIf","C"===e.data.status&&!(null!=e.data&&e.data.deleted)),Vd(),zh("ngIf","C"===e.data.status&&(null==e.data?null:e.data.deleted))}}function L0(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",2),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.clipCoupon(i.data,t))})),am(2),xf(),Df()}if(2&e){let e=Yf(3);Vd(),Zf("id","couponAddBtn",e.data.offerId,""),gh("aria-describedby","coupon-price-"+e.data.offerId+" coupon-title-"+e.data.offerId+" coupon-description-"+e.data.offerId)("aria-label",e.addToMyListBtnLabel),Vd(),lm(null!=e.data&&e.data.deleted?e.behavioralOfferAttrs&&null!=e.behavioralOfferAttrs&&e.behavioralOfferAttrs.addToMyListBtnText?null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.addToMyListBtnText:"Add to List":e.startChallengeLabel)}}function F0(e,t){if(1&e){let e=Mf();kf(0,"span",16)(1,"a",17),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.startShoppingLink))})),am(2),xf()()}if(2&e){let e=Yf(6);Vd(),Jf("href",e.behavioralOfferAttrs.startShoppingLink,id),Vd(),lm(e.behavioralOfferAttrs.startShoppingText)}}function N0(e,t){if(1&e&&(Ef(0),kf(1,"div",7)(2,"div",8)(3,"span",9),am(4),xf(),kf(5,"span",10),am(6),xf(),kf(7,"span",11),am(8,"/Â "),xf(),kf(9,"span",12),am(10),xf()(),kf(11,"div",13),Tf(12,"div",14),xf(),ph(13,F0,3,2,"span",15),xf(),Df()),2&e){let e=Yf(5);Vd(4),cm("",e.offerDataDisplay(null==e.data?null:e.data.continuity).prefix,":Â "),Vd(2),cm("",e.offerDataDisplay(null==e.data?null:e.data.continuity).progressVal,"Â "),Vd(4),cm("",e.offerDataDisplay(null==e.data?null:e.data.continuity).targetVal,"Â "),Vd(2),function(e){Zh(rf,Gh,e,!1)}(e.getStyle(e.data)),gh("aria-valuenow",null==e.data?null:e.data.continuity.progressValue)("aria-valuemax",null==e.data?null:e.data.continuity.targetValue),Vd(),zh("ngIf",e.isFreshpassContinuityCoupon(e.data))}}function U0(e,t){if(1&e){let e=Mf();kf(0,"a",17),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.grClipLink))})),am(1),xf()}if(2&e){let e=Yf(6);Jf("href",e.behavioralOfferAttrs.grClipLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipButtonText)}}function V0(e,t){if(1&e){let e=Mf();kf(0,"a",17),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ucaEmailOptInLink))})),am(1),xf()}if(2&e){let e=Yf(6);Jf("href",e.behavioralOfferAttrs.ucaEmailOptInLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInButtonText)}}function q0(e,t){if(1&e){let e=Mf();kf(0,"a",17),jf("click",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(6);return Ha(t.navigateTo(t.behavioralOfferAttrs.ecomFulfillmentLink))})),am(1),xf()}if(2&e){let e=Yf(6);
1Jf("href",e.behavioralOfferAttrs.ecomFulfillmentLink,id),Vd(),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentButtonText)}}function $0(e,t){if(1&e&&(Ef(0),kf(1,"div",18)(2,"span",19),am(3),xf(),kf(4,"span",20)(5,"span",16),ph(6,U0,2,2,"a",21)(7,V0,2,2,"a",21)(8,q0,2,2,"a",21),xf()()(),Df()),2&e){let e=Yf(5);Vd(3),lm(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.inProgressStatusText),Vd(3),zh("ngIf",(null==e.data?null:e.data.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.grClipTextOMS.trim().toLowerCase())),Vd(),zh("ngIf",(null==e.data?null:e.data.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ucaEmailOptInTextOMS.trim().toLowerCase())),Vd(),zh("ngIf",(null==e.data?null:e.data.qualificationBehavior.trim().toLowerCase())===(null==e.behavioralOfferAttrs?null:e.behavioralOfferAttrs.ecomFulfillmentTextOMS.trim().toLowerCase()))}}function j0(e,t){if(1&e&&(Ef(0),ph(1,N0,14,8,"ng-container",0)(2,$0,9,4,"ng-container",0),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.isContinuityCoupon),Vd(),zh("ngIf",e.isBehaviorCoupon)}}function z0(e,t){if(1&e){let e=Mf();kf(0,"div",29)(1,"a",17),jf("click",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.myListLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.myListLink))})),am(2),xf()()}if(2&e){let e=Yf(5);
1Vd(),Jf("href",e.behavioralOfferAttrs.myListLink,id),Vd(),lm(e.behavioralOfferAttrs.viewInMyListText)}}function W0(e,t){if(1&e){let e=Mf();kf(0,"div",29)(1,"a",17),jf("click",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))}))("keydown.enter",(function(){Wa(e);let t=Yf(5);return Ha(t.navigateTo(t.behavioralOfferAttrs.freshPassOfferLink))})),am(2),xf()()}if(2&e){let e=Yf(5);Vd(),Jf("href",e.behavioralOfferAttrs.freshPassOfferLink,id),Vd(),lm(e.behavioralOfferAttrs.freshPassOfferText)}}function H0(e,t){if(1&e&&(Ef(0),kf(1,"div",22)(2,"span"),So(),kf(3,"svg",23)(4,"g",24)(5,"g",25),Tf(6,"polygon",26),xf()()()(),Co(),kf(7,"span",27),am(8),xf()(),ph(9,z0,3,2,"div",28)(10,W0,3,2,"div",28),Df()),2&e){let e=Yf(4);Vd(2),gh("aria-describedby",e.challengeCompletedLabel),Vd(3),gh("fill",e.challengeCompletedLabelColor),Vd(2),zh("ngStyle",Bm(6,D0,e.challengeCompletedLabelColor,e.fontSize)),Vd(),lm(e.challengeCompletedLabel),Vd(),zh("ngIf",!e.isFreshpassContinuityCoupon(e.data)),Vd(),zh("ngIf",e.isFreshpassContinuityCoupon(e.data))}}function Y0(e,t){if(1&e&&(Ef(0),ph(1,j0,3,2,"ng-container",0)(2,H0,11,9,"ng-container",0),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.isBonusPathCompleted),Vd(),zh("ngIf",e.isBonusPathCompleted)}}function G0(e,t){if(1&e&&(Ef(0),ph(1,L0,3,5,"ng-container",0)(2,Y0,3,2,"ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isCouponClipped),Vd(),zh("ngIf",e.isCouponClipped)}}function K0(e,t){if(1&e&&(Ef(0),ph(1,R0,4,3,"ng-container",0)(2,G0,3,2,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf",!e.isBehaviourOrContinuityCoupon(e.data)),Vd(),zh("ngIf",e.isBehaviourOrContinuityCoupon(e.data))}}var Q0=[{unit:"ITEM",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"ITEMS",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"AMOUNT",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"DOLLARS",usePrefix:"Purchased",valuePrefix:"$",valuePostFix:""},{unit:"QUANTITY_PRICE",usePrefix:"Purchased",valuePrefix:"",valuePostFix:""},{unit:"POUND",usePrefix:"Purchased",valuePostFix:"Lbs",valuePrefix:""},{unit:"PER POUND",usePrefix:"Purchased",valuePostFix:"Lbs",valuePrefix:""},{unit:"WEIGHT_VOLUME",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""},{unit:"WEIGHT/VOLUME",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""},{unit:"QUANTITY",usePrefix:"Quantity",valuePrefix:"",valuePostFix:""}],J0=(()=>{class e{constructor(){this.cardType="",this.continuityOfferType="continuity",this.freshPassContinuityOffer="IA FRESHPASS",this.behavioralOfferAttrs={startChallengeButtonName:"Activate",challengeCompletedStatusText:"Bonus Path Completed",inProgressStatusText:"In Progress",grClipTextOMS:"GR Clip",ucaEmailOptInTextOMS:"UCA Email Opt In",ecomFulfillmentTextOMS:"ECOM Fulfillment",grClipButtonText:"Go to Grocery Rewards",ucaEmailOptInButtonText:"Go to Account Settings",ecomFulfillmentButtonText:"Go to My Cart",ucaEmailOptInLink:"/customer-account/communication-preference.html",ecomFulfillmentLink:"/",grClipLink:"/foru/rewards.html",addToMyListBtnText:"Add to List",viewInMyListText:"View in My List",myListLink:"/mylist.html",startShoppingText:"Start Shopping",startShoppingLink:"/",freshPassOfferText:"Redeem FreshPass offer",freshPassOfferLink:"/freshpass/manage/subscribe"},this.isBehaviorCoupon=!1,this.isContinuityCoupon=!1,this.isCouponClipped=!1,this.isBonusPathCompleted=!1,this.showLoadingCoupon=!1,this.showBoxtop=!1,this.clipCouponBtnLabel="",this.addToMyListBtnLabel="",this.challengeCompletedLabelColor="#757575",this.fontSize="12px",this.emitClippedCoupon=new _l,this.startChallengeLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.SCC,this.challengeCompletedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CC}ngOnInit(){!0===window?.SWY?.CONFIGSERVICE?.featureToggleConfig?.enableB4UPlusLaunch&&(this.behavioralOfferAttrs.freshPassOfferText="Claim forU+ plan",this.behavioralOfferAttrs.freshPassOfferLink="/foruplus"),this.data.offerPrice=this.data.offerPrice?this.data.offerPrice:"",this.clipCouponBtnLabel=this.data?.deleted?this.behavioralOfferAttrs&&this.behavioralOfferAttrs?.addToMyListBtnText?this.behavioralOfferAttrs?.addToMyListBtnText:`${this.data.offerPrice} Add to List`:`${this.data.offerPrice} Clip Coupon`,this.addToMyListBtnLabel=this.data?.deleted?this.behavioralOfferAttrs&&this.behavioralOfferAttrs?.addToMyListBtnText?this.behavioralOfferAttrs?.addToMyListBtnText:`${this.data.offerPrice} Add to List`:`${this.data.offerPrice} ${this.startChallengeLabel}`}ngOnChanges(e){"coupon"===this.cardType&&this.checkOfferStatus()}isBehaviourOrContinuityCoupon(e){return e?.continuity||e?.offerProtoType?.toLowerCase()===this.continuityOfferType||e?.offerProgramType?.toLowerCase()===this.continuityOfferType||e.qualificationBehavior&&""!==e.qualificationBehavior}isFreshpassContinuityCoupon(e){let t=!1;return e.continuity&&e.programSubType&&e.programSubType.trim().toLowerCase()===this.freshPassContinuityOffer.trim().toLocaleLowerCase()&&(t=!0),t}checkOfferStatus(){this.data.status&&"C"===this.data.status&&this.data.deleted?this.isCouponClipped=!1:this.data.status&&"C"===this.data.status&&!this.data.deleted||!this.data.status&&!this.data.deleted&&!this.isBehaviourOrContinuityCoupon(this.data)?(this.isCouponClipped=!0,this.data.continuity?(this.isBonusPathCompleted=this.data.continuity.progressValue===this.data.continuity.targetValue,this.isContinuityCoupon=!0,this.isBehaviorCoupon=!1):this.data.offerProtoType?.toLowerCase()===this.continuityOfferType||this.data.offerProgramType?.toLowerCase()===this.continuityOfferType?(this.isBonusPathCompleted=!0,this.isContinuityCoupon=!1,this.isBehaviorCoupon=!1):this.data.qualificationBehavior&&""!==this.data.qualificationBehavior&&(this.isBonusPathCompleted=""!==this.data.bonusPathStatus&&"inprogress"!==this.data.bonusPathStatus.toLowerCase(),this.isContinuityCoupon=!1,this.isBehaviorCoupon=!0)):("U"===this.data.status&&!this.data.deleted||"U"===this.data.status&&this.data.deleted)&&(this.isCouponClipped=!1)}navigateTo(e){this.showLoadingCoupon=!0,window.location.pathname=e}offerDataDisplay(e){let t={};if(e?.units){let i=Q0.findIndex((t=>t.unit.toLowerCase()===e.units.toLowerCase()));if(i>=0){let n=Q0[i];t={prefix:n.usePrefix,progressVal:n.valuePrefix?`${n.valuePrefix}${e.progressValue}`:n.valuePostFix?`${e.progressValue}${n.valuePostFix}`:e.progressValue,targetVal:n.valuePrefix?`${n.valuePrefix}${e.targetValue}`:n.valuePostFix?`${e.targetValue}${n.valuePostFix}`:e.targetValue}}}else t={prefix:"Transactions",progressVal:e.progressValue,targetVal:e.targetValue};return t}clipCoupon(e,t){event&&event.isTrusted&&(e.$event=t,this.emitClippedCoupon.emit(e))}getStyle(e){return`width: ${100*e?.continuity.progressValue/e?.continuity.targetValue}%; height: inherit`}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["loyalty-card-action-buttons"]],inputs:{cardType:"cardType",data:"data"},outputs:{emitClippedCoupon:"emitClippedCoupon"},features:[ga],decls:1,vars:1,consts:[[4,"ngIf"],["type","button","class","btn btn-md btn-primary w-100 p-0 couponBtn-size",3,"id","click",4,"ngIf"],["type","button",1,"btn","btn-md","btn-primary","w-100","p-0","couponBtn-size",3,"click","id"],[1,"clipped"],[1,"clipped__checkmark","svg-checkmark"],[1,"clipped__label"],[1,"sr-only"],[1,"d-flex","flex-column"],["role","progressbar",1,"progress-offer-status"],[1,"progress-msg"],[1,"pgs-lwrlmt"],[1,"limit-separator"],[1,"pgs-uprlmt"],[1,"progress",2,"height","6px"],["role","progressbar","aria-valuemin","0",1,"progress-bar"],["class","behaviour-link body-text-xs ",4,"ngIf"],[1,"behaviour-link","body-text-xs"],["role","link",1,"links__action","links__action__inline","underline",3,"click","keydown.enter","href"],[1,"progress-behaviour-status","d-flex","flex-column"],[1,"body-text-xs"],[1,"behaviour-link-container"],["class","links__action links__action__inline underline","role","link",3,"href","click","keydown.enter",4,"ngIf"],["role","contentinfo",1,"challenge-info"],["width","16px","height","16px","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray"],["id","GreenCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236"],[1,"status",3,"ngStyle"],["class","behaviour-link body-text-xs ml-2",4,"ngIf"],[1,"behaviour-link","body-text-xs","ml-2"]],template:function(e,t){1&e&&ph(0,K0,3,2,"ng-container",0),2&e&&zh("ngIf","coupon"===t.cardType)},dependencies:[cy,gy]})}}return e})(),Z0=["couponStatus"],X0=e=>({"in-store-price-visible":e});function e2(e,t){1&e&&(Ef(0),Tf(1,"span",22),Df())}function t2(e,t){if(1&e&&Tf(0,"img",24),2&e){let e=Yf(4);Sh("aria-label","",null==e.logoProps[null==e.cardProps?null:e.cardProps.iconImage]?
1null:e.logoProps[null==e.cardProps?null:e.cardProps.iconImage].altText," ",null==e.cardProps?null:e.cardProps.cardHeader,""),Jf("src",null==e.logoProps[null==e.cardProps?null:e.cardProps.iconImage]?null:e.logoProps[null==e.cardProps?null:e.cardProps.iconImage].logo,id),Jf("alt",null==e.logoProps[null==e.cardProps?null:e.cardProps.iconImage]?null:e.logoProps[null==e.cardProps?null:e.cardProps.iconImage].altText)}}function i2(e,t){if(1&e&&ph(0,t2,1,5,"img",23),2&e){let e=Yf(3);zh("ngIf",e.logoProps&&e.logoProps[null==e.cardProps?null:e.cardProps.iconImage])}}function n2(e,t){if(1&e&&(kf(0,"div"),ph(1,e2,2,0,"ng-container",21)(2,i2,1,1,"ng-template",null,1,Wm),xf()),2&e){let e=sm(3),t=Yf(2);Vd(),zh("ngIf",!t.isForULogoRebrandingDisabled&&(null==t.cardProps?null:t.cardProps.iconImage)===t.forULogoIconImage)("ngIfElse",e)}}function r2(e,t){if(1&e&&(kf(0,"div"),ph(1,n2,4,2,"div",6),xf()),2&e){let e=Yf();Vd(),zh("ngIf",(null==e.cardProps?null:e.cardProps.iconImage)&&""!==(null==e.cardProps?null:e.cardProps.iconImage))}}function s2(e,t){if(1&e&&(kf(0,"div",25),am(1),xf()),2&e){let e=Yf();Zf("id","coupon-price-",null==e._cardData?null:e._cardData.offerId,""),zh("ngClass",Om(4,X0,(null==e._cardData?null:e._cardData.regularPrice)&&""!==(null==e._cardData?null:e._cardData.regularPrice))),Vd(),cm("In-store: $",null==e._cardData?null:e._cardData.regularPrice,"")}}var a2=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l){this._http=e,this.sanitized=t,this.j4uV1Service=i,this.commonService=n,this._elementRef=r,this._productUtilService=s,this._carouselService=a,this.datePipe=o,this.aemService=l,this.cardProps={},this.cardType="",this.couponDisplayFormat="",this.logoProps={},this.crsMType="",this.couponToFocusOn=new _l,this.openRightFlyoutEvent=new _l,this.refreshTitleEvent=ne
1w _l,this.refreshSlickCarousel=new _l,this.clipCouponEvent=new _l,this.openSpaOfferDetailsPage=new _l,this.href="",this.showBoxtop=!1,this.modalAttrName="modal",this.modalIdName="boxtop-modal-cc",this.showLoadingCoupon=!1,this.offerCompleted=!1,this.isLastOrFirstCardOfPreviousOrNextSet=!1,this.couponImage="couponImage",this.isFirstCardOfNextSet=!1,this.enableOfferDetailsSpa=!0,this.isForULogoRebrandingDisabled=!1,this.forULogoIconImage="LastBeforeDefaultIconImage",this.configObj={programType:"",appName:""},this.sm="575px",this.md="768px",this.imagePath=window.AB.dMTProductCard}ngOnInit(){window.location.href.includes("local")&&(this.configObj.bannerDomain="https://www-qa1.safeway.com"),this.isForULogoRebrandingDisabled=this.aemService.getFeatureFlagByNameDisable("disableForULogoRebranding");let e=window?.AB?.userInfo?.siteType&&"B"===window?.AB?.userInfo?.siteType;this.enableOfferDetailsSpa=!e,this.isLoyaltyCardCarouselRedesignDisabled||this.subscribeForAdaFocusEvent(),this.commonService.shopCouponRefreshSource.subscribe((e=>{this.cardData.offerId==e?.id&&"coupon"===this.cardType&&(this.cardData.status=e.status,this.cardData.deleted=e.deleted,this.cardData=h(h({},this.cardData),e),this.transformIntoLoyaltyCardProps())})),"pdp"===this.filterSource&&(this.clipDigitalCouponListener=e=>{this.clipCoupon(e.detail.offer)},window.addEventListener("ClipDigitalCoupon",this.clipDigitalCouponListener)),this.couponDetailPath=window.AB.isWWW?this.commonService.getCouponDetailPathWww():this.commonService.getCouponDetailPathShop(),"carousel"===this.couponDisplayFormat&&"FreshPass"===this.configObj?.appName&&"FRESHPASS LTO"===this.configObj?.programType?.toUpperCase().trim()&&this.updateOfferDetailsLink()}ngOnChanges(e){this.transformIntoLoyaltyCardProps(),"grid"===this.couponDisplayFormat&&"weeklyAdPzn"!==this.configObj.appName&&this.updateOfferDetailsLink(),e&&e.cardType&&e.cardType.currentValue!==e.cardType.previousValue&&this.transformIntoLoyaltyCardProps()}ngAfterViewInit(){"grid"===this.couponDisplayFormat&&"weeklyAdPzn"!==this.configObj.appName&&!this.enableOfferDetailsSpa&&document.getElementById(`cardOfferDetails_${this._cardData.offerId}`).setAttribute("href",`/foru/offer-details.${this._cardData.offerId}.${this._cardData.offerTs}.${this._cardData.offerPgm}.html`)}getOfferDetailsHref(){let e=this.configObj?.appName?.toLowerCase(),t="b4uspa"===e||"ocgpspa"===e||"weeklyaddiscoverypzn"===e;return this.enableOfferDetailsSpa&&t?`/loyalty/offer-details/${this._cardData?.offerId}/${this._cardData?.offerPgm}`:"javascript:void(0)"}updateOfferDetailsLink(){setTimeout((()=>{let e=document.getElementById(`cardOfferDetails_${this._cardData.offerId}`);"grid"===this.couponDisplayFormat&&"weeklyAdPzn"!==this.configObj.appName&&!this.enableOfferDetailsSpa&&e.setAttribute("href",`/foru/offer-details.${this._cardData.offerId}.${this._cardData.offerTs}.${this._cardData.offerPgm}.html`)}),1e3)}subscribeForAdaFocusEvent(){this.slickChangesSubscription=this._carouselService.slickChanges$.subscribe((()=>{let e=this._elementRef?.nativeElement?.closest(".slick-slide"),t='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), span[role="button"], a[role="button"], img[role="button"], a',i=e.querySelectorAll(t)[0],n=e.querySelectorAll(t),r=n[n.length-1];window.innerWidth<768?setTimeout((()=>{if(n.forEach((e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")})),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden"),e?.classList?.contains("slick-active")||!e?.nextElementSibling?.classList?.contains("slick-active")&&!e?.previousElementSibling?.classList?.contains("slick-active"))this.isLastOrFirstCardOfPreviousOrNextSet&&($(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?i:r).first().off("focus"),this.isLastOrFirstCardOfPreviousOrNextSet=!1);else{let t=this.isFirstCardOfNextSet=e?.previousElementSibling?.classList?.contains("slick-active"),n=function(i){t?$(e).closest("#carousel-coupons").slick("slickNext"):$(e).closest("#carousel-coupons").slick("slickPrev")};$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?i:r).first().on("focus",n),this.isLastOrFirstCardOfPreviousOrNextSet=!0}}),100):this.isLastOrFirstCardOfPreviousOrNextSet&&$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?i:r).first().off("focus")}))}onClickOfDetails(e,t){if("weeklyaddiscoverypzn"!==this.configObj.appName.toLowerCase()){if("offer-detail"
1===e&&this.trackCRSClick("offer-details-click"),"offer-detail"===e&&this.enableOfferDetailsSpa&&this.configObj.appName&&""!==this.configObj.appName&&"b4uspa"===this.configObj.appName.toLowerCase())return t&&t.preventDefault(),void this.openSpaOfferDetailsPage.emit(this._cardData);if("grid"!==this.couponDisplayFormat||"weeklyAdPzn"===this.configObj.appName){t&&t.preventDefault();let i={};if("offer-detail"===e){if("pdp"===this.filterSource){let t=document.getElementsByTagName("product-detail"),n=document.getElementsByClassName("product-details-wrapper"),r="";t.length?r=t[0].getAttribute("data-product-id"):n.length&&(r=n[0].getAttribute("data-bpn"));let s={id:r};i={type:e,coupon:this._cardData,product:s,triggeredElement:"coupon-carousel-pdp"}}else i={type:e,coupon:this._cardData,product:{},triggeredElement:"coupon-carousel"};this._updateAnalyticsLinkClick("offer-drawer-j4u-productcards",this._cardData.brand),window.digitalData.coupon={carouselSection:"offer-drawer"}}"weeklyAdPzn"===this.configObj.appName&&this.openRightFlyoutEvent.emit({}),i=f(h({},i),{configObj:this.configObj}),setTimeout((()=>this.commonService.rightDrawerSource.next(i)),100)}}}_updateAnalyticsLinkClick(e,t){t?window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement):window.AB.DATALAYER.setLinkClickEvents(e)}trackCRSClick(e,t){let i=window.AB&&window.AB.DATALAYER;if(!i||void 0===i.setCRSClickEvent||!i.isHomePage||!i.isHomePage())return;let n=localStorage.getItem("analyticsProductPlacement")||window.digitalData?.pageFilter?.placement,r=this._cardData||this.cardData||{},s=this.getCRSSection(),a={linkName:e,mTyp:this.crsMType||this.getCRSMType(),element:this._elementRef.nativeElement,placement:n,component:i.getCRSComponent({element:this._elementRef.nativeElement,section:s,detail:this.getCRSComponentDetail(r),placement:n})};"coupon-clip-click"===e&&(a.batchCouponsClipped=[this.getCRSBatchCoupon(r,t,s)]),i.setCRSClickEvent(a)}getCRSMType(){let e=this.configObj?.appName?.toLowerCase()||"",t=this.couponsCarouselItem?.designType||"";return e.indexOf("deals-carousel")>-1||"dealsCarousel"===t?"deals-carousel":"product-carousel"}getCRSSection(){return this.carouselSection||this.couponsCarouselItem?.title||this.couponsCarouselItem?.carouselTitle||this._cardData?.carouselSection||this.cardData?.carouselSection||"no-val"}getCRSComponentDetail(e){return e?.adobeMetrics?.metricA||e?.impressionAdditionalDetail||this.couponsCarouselItem?.impressionAdditionalDetail||"no-val"}getCRSBatchCoupon(e,t,i){let n=t?.items?.[0]||{};return{type:e?.offerPgm||e?.offerType||e?.offerProgramType||"no-val",name:e?.brand||e?.name||e?.description||"no-val",id:String(e?.offerId||e?.couponID||n?.itemId||"no-val"),clipMthd:"singleclip",carouselSec:i,clipCnt:"1",clipID:n?.clipI
1d||n?.clipID||t?.clipID||"no-val",clipTime:(new Date).toISOString(),divisionName:window.AB?.userInfo?.divisionName||window.AB?.userInfo?.division||"no-val",msgData:e?.msgData||e?.messageData||e?.analyticsTag||"no-val",savings:String(e?.savings||e?.savingsValue||"0")}}_updateAnalyticsCarouselName(){window.AB.DATALAYER&&this.carouselSection&&window.AB.DATALAYER.setCarouselName("coupons|"+this.carouselSection)}setCookie(e,t){document.cookie=`${e}=${t}; max-age=600; path=/; domain=${window.AB.userInfo.banner}.com`}clipCoupon(e){if(this._isRegistered())if(window.SWY.ENFORCEMENT.isTokenActive())this.showBoxTopModal(e),this.j4uClipCoupon(e),"carousel"===this.couponDisplayFormat&&this._updateAnalyticsCarouselName();else if(window.SWY.ENFORCEMENT.checkAuthorizedCookie())this._http.get(window.AB.userInfoPath).subscribe((t=>{window.AB.userInfo.updateTokenRefreshProperty(),this.showBoxTopModal(e),this.j4uClipCoupon(e),"carousel"===this.couponDisplayFormat&&this._updateAnalyticsCarouselName()}),(t=>{let i="Coupon Clip - Soft Token is not expired, but AEM servlet returns "+t.status+"status. Redirects to 500 error message";window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping",i),setTimeout((function(){window.AB.COMMON.redirectErrorPage()}),500)}));else{if(!window.SWY.ENFORCEMENT.isTokenActive()&&"b4uSPA"===this.configObj.appName)return void this.clipCouponEvent.emit(e);window.AB.DATALAYER.setError(e.offerId.toString(),"coupon clipping","Coupon Clip - Session is expired, reloading the page"),setTimeout((function(){window.location.reload()}),500)}else{if("weeklyAdPzn"===this.configObj.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj);this.setCookie("ACI_S_ECommRedirectURL",encodeURIComponent(window.location.href));let t=e+window.AB.signInLinkPath,i=window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.trackWeeklyAdIcmpid&&window.AB.DATALAYER.trackWeeklyAdIcmpid("clip-coupon",t)||"";return void window.location.assign(t+`${i}`)}if("b4uSPA"===this.configObj.appName)return void this.clipCouponEvent.emit(e);if(!this.showBoxTopModal(e)){window.AB.COMMON.showSignInModal_OTP(window.location.href);let t=document.getElementById("createAccountModalj4u");t&&t.setAttribute("data-value",`couponAddBtn${e.offerId}`)}}}showBoxTopModal(e){let t=!1;return window.AB.isWWW&&(localStorage.showBoxtop&&(this.showBoxtop=JSON.parse(localStorage.getItem("showBoxtop"))),window.AB.userInfo.boxTopAuth&&(this.showBoxtop=!1),"07"===e.offerSubPgm&&this.showBoxtop&&(t=!0)),t}j4uClipCoupon(e){let t;if(this.showLoadingCoupon=!0,e.$event&&e.$event.target&&e.$event.target.textContent.trim()){let i=e.$event.target.textContent.trim();t="Add to List"===i||"Activate"===i}let i=window.AB.userInfo.j4u.storeId,n={nativeElement:this._elementRef.nativeElement};this.j4uV1Service.clipCoupon(e,i,null,this.isP13nCoupon,n).pipe(tn((()=>{this.showLoadingCoupon=!1}))).subscribe((t=>{t&&t.items&&t.items[0]&&1===t.items[0].status&&("grid"===this.couponDisplayFormat&&this.couponToFocusOn.emit({cardIndex:this.cardIndex,offerPrice:e?.offerPrice}),"carousel"===this.couponDisplayFormat&&(this.refreshTitleEvent.next(this._cardData),this.refreshSlickCarousel.next(this.cardIndex)),this.trackCRSClick("coupon-clip-click",t),"pdp"===this.filterSource&&window.dispatchEvent(new CustomEvent("DigitalCouponClipped",{detail:{offerId:t.items[0].itemId}})))})),this.couponStatus&&(this.couponStatus.nativeElement.textContent=`${e.offerPrice} coupon ${t?"activated":"clipped"}`,setTimeout((()=>{this.couponStatus&&(this.couponStatus.nativeElement.textContent="")}),300))}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}getImageUrl(e,t){let i=this.imagePath||"//images.albertsons-media.com/is/image/ABS/${product.id}?$ecom-product-card-${viewport}-jpg$&defaultImage=Not_Available";return i?i.replace("${product.id}",t.imageId).replace("${viewport}",e):""}transformIntoLoyaltyCardProps(){let e={};e.brand=this.cardData.brand?this.cardData.brand:this.cardData.name?this.cardData.name:"",e.brand=this.cardData.brand+".",e.refineDescription=this.cardData.description,e.refineEndDate=this.dateConversion(this.cardData.endDate),e.offerId=this.cardData.offerId?this.cardData.offerId:this.cardData.couponID,e.usageTypeTxt=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[this.cardData.usageType],e.offerPgmLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponTypes[this.cardData.offerPgm],e.status=this.cardData.deleted?"U":this.cardData.status,e.offerType=this.cardData.offerType?this.cardData.offerType:this.cardData.offerPgm,this.cardProps.cardHeader=this.getCardHeader(),this.cardProps.cardTitle=e.brand,this.cardProps.cardDescription=e.refineDescription,this.cardProps.cardLinkText="Offer Details",this.cardProps.cardLinkAriaDescribedByText=`coupon-price-${this.cardData.offerId} coupon-title-${this.cardData.offerId} coupon-description-${this.cardData.offerId}`,this.cardProps.cardImage=this.sanitized.bypassSecurityTrustHtml(`<picture>\n <source media="(min-width: ${this.md})" srcset="${this.getImageUrl("desktop",this.cardData)}">\n <source media="(min-width: ${this.sm})" srcset="${this.getImageUrl("tablet",this.cardData)}">\n <img loading="lazy" class="w-100 img-responsive" role="presentation" src="${this.getImageUrl("mobile",this.cardData)}" attr.aria-label="${this.cardData.brand}" alt="${this.cardData.brand}"/>\n </picture>`);let t=this.datePipe.transform(e.refineEndDate,"MMMM d, y");this.cardProps.cardExpirySection=`<span class="text-truncate expiration align-self-start pl-0">${e.usageTypeTxt}</span>\n <span class="text-nowrap expiration align-self-start pl-0" aria-hidden="true" aria-labelledby="expireDateADA">\n Expires ${e.refineEndDate}</span> <span id="expireDateADA" class="sr-only"> Expires ${t} </span>`,this.cardProps.iconImage=this.getIconImage(),this._cardData=h(h({},e),this.cardData)}
1dateConversion(e){let t=/\d+/.exec(e),i=new Date(parseInt(t[0]));return i.setUTCMilliseconds(t.index),i.toLocaleDateString("en-US")}getCardHeader(){let e="";return this.cardData?.forUDescription?this.cardData.forUDescription:(this.cardData&&this.cardData.offerPrice&&""!==this.cardData.offerPrice&&(e=this.cardData.offerPrice),this.cardData&&this.cardData.priceTitle&&(e=this.cardData.priceTitle+" "+e),e)}getIconImage(){let e="LastBeforeDefaultIconImage",t=["REWARDS_FLAT","REWARDS_ACCUMULATION"],i=["freshpass credit","freshpass perks","freshpass deals"],n=this.cardData&&this.cardData.hierarchies&&this.cardData.hierarchies.events,r=!1;for(let e in n){if(-1===i.map((e=>e.toLowerCase())).indexOf(n[e].toLowerCase())){r=!1;break}r=!0}if(r&&(e="FreshPassIconImage"),(this.cardData.offerProgramType&&t.includes(this.cardData.offerProgramType)||this.cardData.offerProtoType&&t.includes(this.cardData.offerProtoType))&&(e="RewardsIconImage"),"FreshPass"===this.configObj?.appName){let t=["FRESHPASS","FRESHPASS LTO"],i=this.cardData?.programType??"";e=t.includes(i)?"FreshPassIconImage":"LastBeforeDefaultIconImage"}return e}ngOnDestroy(){this.slickChangesSubscription&&this.slickChangesSubscription.unsubscribe(),this.clipDigitalCouponListener&&window.removeEventListener("ClipDigitalCoupon",this.clipDigitalCouponListener)}static{this.ɵfac=function(t){return new(t||e)($d(ov),$d(mw),$d(Yw),$d(Bw),$d(Vl),$d(Dw),$d(Gw),$d(Ty),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["loyalty-card-al-v1"]],viewQuery:function(e,t){if(1&e&&tm(Z0,5),2&e){let e;im(e=nm())&&(t.couponStatus=e.first)}},inputs:{cardType:"cardType",couponDisplayFormat:"couponDisplayFormat",cardData:"cardData",cardIndex:"cardIndex",logoProps:"logoProps",filterSource:"filterSource",carouselSection:"carouselSection",couponsCarouselItem:"couponsCarouselItem",crsMType:"crsMType",isP13nCoupon:"isP13nCoupon",isLoyaltyCardCarouselRedesignDisabled:"isLoyaltyCardCarouselRedesignDisabled",configObj:"configObj"},outputs:{couponToFocusOn:"couponToFocusOn",openRightFlyoutEvent:"openRightFlyoutEvent",refreshTitleEvent:"refreshTitleEvent",refreshSlickCarousel:"refreshSlickCarousel",clipCouponEvent:"clipCouponEvent",openSpaOfferDetailsPage:"openSpaOfferDetailsPage"},features:[xm([Ty]),ga],decls:24,vars:19,consts:[["couponStatus",""],["oldOfferCardForulogo",""],["role","region",1,"coupon-card","card","mr-auto","ml-auto","ml-md-0",3,"ngClass"],[1,"coupon-card__card-body"],["aria-live","polite",1,"sr-only"],[1,"coupon-card__card-body__card-title"],[4,"ngIf"],[1,"coupon-card__card-body__card-title__price"],["class","row cpn-details font-weight-bold ml-4 pl-1 pb-1 text-truncate",3,"id","ngClass",4,"ngIf"],[1,"row"],[1,"col-8"],[1,"cpn-title","mb-0",3,"ngClass"],[1,"cpn-details"],[1,"coupon-card-offer-details-container"],["role","link",1,"coupon-card-offer-details","offer-details",3,"click","keyup.enter","id","href"],["role","img",1,"col-4",3,"innerHTML"],[1,"cpn-flex-area","d-flex","w-100",3,"ngClass"],[1,"w-50"],[3,"emitClippedCoupon","cardType","data"],[1,"w-50","coupon-expiry"],["role","contentinfo",1,"d-flex","flex-column",2,"right","16px","position","absolute",3,"innerHTML"],[4,"ngIf","ngIfElse"],["role","img","aria-label","For U Logo",1,"icon","pds-svg-foru-vertical-theme-tm"],["class","svg-icon just-for-you-16px icon-position",3,"src","alt",4,"ngIf"],[1,"svg-icon","just-for-you-16px","icon-position",3,"src","alt"],[1,"row","cpn-details","font-weight-bold","ml-4","pl-1","pb-1","text-truncate",3,"id","ngClass"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"div",3),Tf(2,"div",4,0),kf(4,"div",5),ph(5,r2,2,1,"div",6),kf(6,"div",7),am(7),xf()(),ph(8,s2,2,6,"div",8),kf(9,"div",9)(10,"div",10)(11,"h3",11),am(12),xf(),kf(13,"div",12),am(14),xf(),kf(15,"div",13)(16,"a",14),jf("click",(function(i){return Wa(e),Ha(t.onClickOfDetails("offer-detail",i))}))("keyup.enter",(function(i){return Wa(e),Ha(t.onClickOfDetails("offer-detail",i))})),am(17),xf()()(),Tf(18,"div",15),xf(),kf(19,"div",16)(20,"div",17)(21,"loyalty-card-action-buttons",18),jf("emitClippedCoupon",(function(i){return Wa(e),Ha(t.clipCoupon(i))})),xf()(),kf(22,"div",19),Tf(23,"div",20),xf()()()()}2&e&&(zh("ngClass","grid"===t.couponDisplayFormat?"mw-100":""),gh("aria-label",null==t.cardProps?null:t.cardProps.cardAriaLabel),V
1d(5),zh("ngIf","coupon"===t.cardType),Vd(2),cm(" ",null==t.cardProps?null:t.cardProps.cardHeader," "),Vd(),zh("ngIf",(null==t._cardData?null:t._cardData.regularPrice)&&"grid"===t.couponDisplayFormat),Vd(3),zh("ngClass","grid"===t.couponDisplayFormat?"d-block text-truncate":""),Vd(),lm(null==t.cardProps?null:t.cardProps.cardTitle),Vd(2),cm(" ",null==t.cardProps?null:t.cardProps.cardDescription," "),Vd(2),Zf("id","cardOfferDetails_",null==t._cardData?null:t._cardData.offerId,""),zh("href",t.getOfferDetailsHref(),id),gh("aria-label",(null==t.cardProps?null:t.cardProps.cardHeader)+" offer details"),Vd(),lm(null==t.cardProps?null:t.cardProps.cardLinkText),Vd(),zh("innerHTML",null==t.cardProps?null:t.cardProps.cardImage,ed),gh("aria-label",(null==t.cardProps?null:t.cardProps.cardTitle)||t.couponImage),Vd(),zh("ngClass","grid"===t.couponDisplayFormat?"flex-nowrap":""),Vd(2),zh("cardType",t.cardType)("data",t._cardData),Vd(2),zh("innerHTML",null==t.cardProps?null:t.cardProps.cardExpirySection,ed))},dependencies:[sy,cy,J0],styles:[".coupon-card.card[_ngcontent-%COMP%]{border-radius:8px}.coupon-card__card-body[_ngcontent-%COMP%] span.pds-svg-foru-vertical-theme-tm[_ngcontent-%COMP%]{margin:0 5px 0 0;width:24px;height:24px}@media screen and (max-width: 1280px){[_nghost-%COMP%]:not(.carousel-coupon-card) .coupon-card.card[_ngcontent-%COMP%]{min-height:232px;height:100%}}@media screen and (width: 1024px){[_nghost-%COMP%] .coupon-expiry .d-flex{margin-left:5px!important;right:inherit!important;font-size:11px}[_nghost-%COMP%] loyalty-card-action-buttons button.couponBtn-size{min-height:32px!important;font-size:14px}}"]})}}return e})(),o2=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[a2],imports:[Ly]})}}return e})(),l2=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._appConfigService=t,this._j4uService=i,this.j4uV1Service=n,this.commonService=r,this.AB=window.AB,this.coupons=[],this.offersData=new Tt({}),this.offersDataSource=this.offersData.asObservable(),this.enableNgLibraryLoyaltyCard=!0,this.enableNgLibraryLoyaltyCard=!(window&&window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.disableNgLibraryForLoyaltyCard)}getData(e){switch(e.carouselFilter){case"qualifyingoffers":return(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getData();case"j4uGallery":return e.carouselOfferLimit=e.carouselOfferLimit?Number(e.carouselOfferLimit):12,e.offerCarouselApiBased?(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getApiData(e.carouselOfferLimit):(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getData(e.carouselOfferLimit)}return fi(undefined)}getQualifyingOffers(e,t){let i=[],n=e.find((function(e){return(null==e.offerId?e.couponID:e.offerId)===t}));if(void 0!==n){n=n.category;for(let r in e){let s=e[r];s.category===n&&(null===s.offerId?s.couponID:s.offerId)!==t&&("B"===s.purchaseInd?i.unshift(s):i.push(s))}}return i.splice(0,12)}setAriaLabelForCouponCarousel(e,t){let i=e.querySelector(".slick-next"),n=e.querySelector(".slick-prev"),r="Next "+t,s="Previous "+t;null!=i&&(i.setAttribute("aria-label",r),n.setAttribute("aria-label",s))}setOffersData(e){this.offersData.next(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(PD),lr(Yw),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),c2=e=>({"header-margin-with-ar":e});function d2(e,t){if(1&e){let e=Mf();kf(0,"a",16),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackCouponsViewAll(t))})),kf(1,"span",17),am(2),kf(3,"span",18),am(4),xf()()()}if(2&e){let e=Yf(3);Jf("title",e.couponsCarousel.carouselLinkLabel),Jf("href",e.couponsCarousel.carouselLinkPath,id),Vd(2),cm("",e.couponsCarousel.carouselLinkLabel," "),Vd(2),lm(e.couponsCarousel.carouselTitle)}}function u2(e,t){if(1&e){let e=Mf();kf(0,"a",19),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackCouponsViewAll(t))})),kf(1,"span",20),am(2),kf(3,"span",18),am(4),xf()()()}if(2&e){let e=Yf(3);Jf("href",e.couponsCarousel.carouselLinkPath,id),Jf("title",e.couponsCarousel.carouselLinkLabel),V
1d(2),cm("",e.couponsCarousel.carouselLinkLabel," "),Vd(2),lm(e.couponsCarousel.carouselTitle)}}function p2(e,t){if(1&e&&(kf(0,"div",13),ph(1,d2,5,4,"a",14)(2,u2,5,4,"a",15),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled)}}function h2(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23)(3,"div",24),Tf(4,"div",25),xf()()()())}function f2(e,t){if(1&e&&Tf(0,"marketing-card",26),2&e){zh("marketingTile",Yf(2).marketingTile)}}function m2(e,t){if(1&e){let e=Mf();kf(0,"coupon-card",29),jf("refreshTitleEvent",(function(t){return Wa(e),Ha(Yf(3).refreshTitle(t))}))("refreshSlickCarousel",(function(t){return Wa(e),Ha(Yf(3).refreshSlickCarousel(t))})),xf()}if(2&e){let e=Yf().$implicit,t=Yf(2);zh("coupon",e)("filterSource",t.couponsCarousel.carouselFilter)("carouselSection",t.couponsCarousel.carouselTitle)("couponsCarouselItem",t.couponsCarousel)("logoProps",t.logoProps)}}function g2(e,t){if(1&e){let e=Mf();kf(0,"loyalty-card-al-v1",30),jf("refreshTitleEvent",(function(t){return Wa(e),Ha(Yf(3).refreshTitle(t))}))("refreshSlickCarousel",(function(t){return Wa(e),Ha(Yf(3).refreshSlickCarousel(t))})),xf()}if(2&e){let e=Yf(),t=e.$implicit,i=e.index,n=Yf(2);zh("cardType","coupon")("couponDisplayFormat","carousel")("cardData",t)("cardIndex",i)("filterSource",n.couponsCarousel.carouselFilter)("carouselSection",n.couponsCarousel.carouselTitle)("couponsCarouselItem",n.couponsCarousel)("logoProps",n.logoProps)}}function b2(e,t){if(1&e&&(Ef(0),ph(1,m2,1,5,"coupon-card",27)(2,g2,1,8,"loyalty-card-al-v1",28),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",(e.offerId||e.couponID)&&!i.enableNgLibraryLoyaltyCard),Vd(),zh("ngIf",(e.offerId||e.couponID)&&i.enableNgLibraryLoyaltyCard)}}function y2(e,t){if(1&e&&(kf(0,"div",21),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",e.errorMessage," ")}}function v2(e,t){if(1&e&&(kf(0,"div",3)(1,"div",4)(2,"div",5)(3,"h2",6),am(4),xf()(),ph(5,p2,3,2,"div",7),xf(),ph(6,h2,5,0,"div",8),Ef(7),kf(8,"div",9),ph(9,f2,1,1,"marketing-card",10)(10,b2,3,2,"ng-container",11),xf(),Df(),ph(11,y2,2,1,"ng-template",null,0,Wm),Tf(13,"span",12),xf()),2&e){let e=Yf();Vd(),zh("ngClass",Om(7,c2,e.isArEnable)),Vd(3),lm(e.couponsCarousel.carouselTitle),Vd(),zh("ngIf",e.couponsCarousel.carouselLinkPath),Vd(),zh("ngIf",e.showLoading),Vd(3),zh("ngIf",e.marketingTile),Vd(),zh("ngForOf",e.coupons)("ngForTrackBy",e.trackFn)}}function w2(e,t){1&e&&Tf(0,"modal",31)}var _2=(()=>{class e{constructor(e,t,i,n,r,s){this.elementRef=e,this._carouselService=t,this._appConfigService=i,this._j4uService=n,this.j4uV1Service=r,this._featureFlagService=s,this._childComponentsReady=new Tt(!1),this.coupons=[],this.error=!1,this.showLoading=!0,this.showTitle=!1,this.couponsLoaded=!1,this.showBoxtop=!0,this.triggeredComponent=!1,this.isArEnable=!1,this.subscription=new Ye,this.enableFreeSort=!0,this.enableJ4ULogoContainer=!0,this.enableNgLibraryLoyaltyCard=!0,this.marketingTile=null,this.marketingCardSlideObserver=null,this.enableNgLibraryLoyaltyCard=!(window&&window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.disableNgLibraryForLoyaltyCard)}ngOnInit(){window.AB.arFlagLoaded?this.isArEnable=window.AB.arFlag.display:this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display}))),this.wrapper=this.elementRef.nativeElement.parentNode.parentNode,this._featureFlagService.enableMarketingCardInDealsCarousel()&&(this.marketingTile=Sz(this.wrapper)),this.couponsCarousel={carouselSource:this.wrapper.getAttribute("data-carousel-source"),carouselFilter:this.wrapper.getAttribute("data-carousel-filter"),carouselOfferLimit:this.wrapper.getAttribute("data-carousel-offer-limit"),carouselTitle:this.wrapper.getAttribute("data-carousel-title"),carouselLinkLabel:this.wrapper.getAttribute("data-carousel-link"),carouselLinkPath:this.wrapper.getAttribute("data-carousel-linkPath"),offerCarouselApiBased:"true"===this.wrapper.getAttribute("data-carousel-getlimited-coupons"),upc:$(".product-details-wrapper").attr("data-upc"),errorMessage:this.wrapper.getAttribute("data-carousel-error")||"No coupons available for this product",includePageName:this.wrapper.getAttribute("data-page-title"),odpOfferId:$("offer-detail").attr("data-offerid"),logoSVGCouponCarouseImageEnable:!!this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image-enable")&&"true"==this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image-enable"),logoSVGCouponCarouseImage:this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image")},this._appConfigService.isLSCompatible()&&localStorage.showBoxtop&&(this.showBoxtop=JSON.parse(localStorage.getItem("showBoxtop"))),window.AB.userInfo.boxTopAuth&&(this.showBoxtop=!1),"j4uGallery"===this.couponsCarousel.carouselFilter?window.AB.COMMON.authorize()?this._appConfigService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&this._init()})):this._init():(this._init(),this._appConfigService.shopCouponRefresh.subscribe((e=>{e&&(this.couponsCarousel&&(null==this.couponsCarousel.upc||""==this.couponsCarousel.upc)&&(this.couponsCarousel.upc=$(".product-details-wrapper").attr("data-upc")),(null==this.coupons||0==this.coupons.length)&&this._init())}))),(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getLogoList().subscribe((e=>this.logoProps=e))}_init(){"pdp"===this.couponsCarousel.carouselFilter?this.getCouponsFromProductsByUpc():this.getCouponsFromEcomGallery()}trackCouponsViewAll(e){window.AB&&window.AB.DATALAYER&&(window.AB.DATALAYER.isHomePage()&&window.AB.DATALAYER.analyticsCTATracking("cta:home|link|view-all"),e?.target&&(window.AB.DATALAYER.trackP13nViewAll(e?.target),window.AB.DATALAYER.trackAEMZone("link:view-all",e?.target,this.couponsCarousel?.carouselTitle)))}getCouponsFromProductsByUpc(){this._carouselService.offersData.subscribe((e=>{if(Object.keys(e).length>0){let t=[];e&&e.offers&&(Object.keys(e.offers).map((i=>{if(i){let n=e.offers[i];n.offerPgmLabel=this._appConfigService.getCouponType(i.offerPgm),t.push(n)}})),this.coupons=[...t],this.couponsCarousel.carouselTitle=this._createCarouselTitle(this.coupons),this.coupons=this.coupons.filter((e=>e.isClippable)),this.showLoading=!1,this.coupons.length>0&&this._childComponentsReady.next(!0))}}))}refreshSlickCarousel(e){this.enableFreeSort&&e&&"j4uGallery"===this.couponsCarousel.carouselFilter&&this._carouselService.getData(this.couponsCarousel).subscribe((e=>{if(null!=e&&e.length>0){let t=this.coupons.findIndex((e=>e.offerId===this.clippedCoupon.offerId)),i=this.elementRef.nativeElement,n=this.coupons.map((e=>e.offerId));e.forEach((e=>{n.indexOf(e.offerId)<0&&this.coupons.push(e)})),this.coupons.splice(t,1),this._childComponentsReady.next(!0),t>=0&&setTimeout((()=>{$(i)&&typeof $(i).find<"u"&&$(i).find("#carousel-coupons").slick("slickGoTo",t-1)}))}}))}trackFn(e,t){return e}getCouponsFromEcomGallery(){null!=this.couponsCarousel.carouselFilter&&this._carouselService.getData(this.couponsCarousel).subscribe((e=>{if(null!=e&&e.length>0){switch(this.couponsCarousel.carouselFilter){case"pdp":this.couponsCarousel.carouselTitle=this._createCarouselTitle(e),this.coupons=e,this.coupons=this.coupons.filter((e=>e.isClippable));break;case"qualifyingoffers":this.coupons=this._carouselService.getQualifyingOffers(e,this.couponsCarousel.odpOfferId);break;case"aisle":this.coupons=e,this.coupons=this.coupons.filter((e=>e.isClippable));break;case"j4uGallery":this.coupons=e}this.coupons.length>0&&this._childComponentsReady.next(!0)}this.showLoading=!1}),(e=>{this.coupons=[],this.showLoading=!1}))}ngAfterViewInit(){this._childComponentsReady.subscribe((e=>{!0===e&&0!==this.coupons.length&&(this.enableNgLibraryLoyaltyCard?this.loyaltyCouponCardChildComponents.length>0?(this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)):this.loyaltyCouponCardChildComponents.changes.subscribe((()=>{this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)})):this.couponCardChildComponents.length>0?(this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)):this.couponCardChildComponents.changes.subscribe((()=>{this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)}
1)),window.AB.DATALAYER&&(window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"load"),window.AB.DATALAYER.initSlickArrowTracking(this.wrapper)))}))}initSlick(){let e,t=this.elementRef.nativeElement,i=1,n=2,r=1,s=2,a=3,o=1,l=2,c=3,d=4,u=1,p=1,h=1,f=[{breakpoint:320,settings:{slidesToShow:i,slidesToScroll:i,dots:!1,arrows:!0}},{breakpoint:695,settings:{slidesToShow:n,slidesToScroll:n,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:r,slidesToScroll:r,dots:!1,arrows:!0}},{breakpoint:920,settings:{slidesToShow:s,slidesToScroll:s,dots:!1,arrows:!0}},{breakpoint:1280,settings:{slidesToShow:a,slidesToScroll:a,dots:!1,arrows:!0}}],m=[{breakpoint:320,settings:{slidesToShow:o,slidesToScroll:o,dots:!1,arrows:!0}},{breakpoint:660,settings:{slidesToShow:l,slidesToScroll:l,dots:!1,arrows:!0}},{breakpoint:970,settings:{slidesToShow:c,slidesToScroll:c,dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:d,slidesToScroll:d,dots:!1,arrows:!0}}],g=[{breakpoint:660,settings:{slidesToShow:u,slidesToScroll:u,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:p,slidesToScroll:p,dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:h,slidesToScroll:h,dots:!1,arrows:!0}},{breakpoint:1920,settings:{slidesToShow:h,slidesToScroll:h,dots:!1,arrows:!0}}],b=$("meta[name=template]")?$("meta[name=template]").attr("content"):"";$(t).find("#carousel-coupons").hasClass("slick-initialized")&&($(t).find("#carousel-coupons").slick("unslick"),$(t).find("#carousel-coupons").removeClass("slick-initialized")),$(t).find("#carousel-coupons").not(".slick-initialized").slick({lazyLoad:"ondemand",tail:!0,dots:!1,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,nextArrow:'<button type="button" aria-label="Go to the next slide" class="slick-next coupons-carousel-module__next-btn"></button>',prevArrow:'<button type="button" aria-label="Go to the previous slide" class="slick-prev coupons-carousel-module__prev-btn"></button>',responsive:"unified-dynamic-l2-page"===b?f:["unified-productdetails-page","nextgen-pdp","product-detail-page"].indexOf(b)>-1?g:m}).on("beforeChange",(function(i,n,r,s){if(0!==s?$("#carousel-coupons .slick-prev").removeClass("mask"):$("#carousel-coupons .slick-prev").addClass("mask"),r<s){let i=Number($(".slick-active",$(t)).last().attr("data-slick-index"))+1,n=Ez(t,i);n&&setTimeout((function(){n.focus()}),300),e="next"}else{let i=Number($(".slick-active",$(t)).first().attr("data-slick-index"))-1,n=Ez(t,i);n&&setTimeout((function(){n.focus()}),300),e="prev"}})).on("afterChange",(()=>{setTimeout((()=>{switch(e){case"next":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(t,this.coupons,"forward");break;case"prev":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(t,this.coupons,"back")}}),0)})),Dz(t),this.marketingCardSlideObserver?.disconnect(),this.marketingCardSlideObserver=Bz(t),$("#carousel-coupons .slick-prev").addClass("mask")}_createCarouselTitle(e){let t=e.filter((e=>e.isClippable)).length,i=e.filter((e=>"C"===e.status)).length;return t>=1?t+" Coupon(s) Available: "+i+" of "+t+" Clipped":"Coupons Carousel"}refreshTitle(e){this.clippedCoupon=e,this.triggeredComponent=!0,"pdp"==this.couponsCarousel.carouselFilter&&(this.couponsCarousel.carouselTitle=this._createCarouselTitle(this.coupons))}ngOnDestroy(){this.marketingCardSlideObserver?.disconnect(),this.subscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(l2),$d(hP),$d(PD),$d(Yw),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-carousel"]],viewQuery:function(e,t){if(1&e&&(tm(E0,5),tm(a2,5)),2&e){let e;im(e=nm())&&(t.couponCardChildComponents=e),im(e=nm())&&(t.loyaltyCouponCardChildComponents=e)}},decls:2,vars:2,consts:[["errorTemplate",""],["id","coupons-carousel","class","slick-coupon-carousel carousel-container coupons-carousel slick-coupon-carousel-v2",4,"ngIf"],["data-modal-type","boxtop","data-modal-parent","coupon-carousel",4,"ngIf"],["id","coupons-carousel",1,"slick-coupon-carousel","carousel-container","coupons-carousel","slick-coupon-carousel-v2"],[1,"carousel-header-wrapper",3,"ngClass"],[1,"carousel-header-text-wrapper"],["tabindex","0",1,"carousel-header-text","m0"],["class","carousel-headers-link-wrapper",4,"ngIf"],["class","carousel-content-loading",4,"ngIf"],["id","carousel-coupons",1,"coupons"],["class","carousel-coupon-card carousel-coupon-card--marketing",3,"marketingTile",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["id","couponCarouselSr","aria-live","polite",1,"sr-only"],[1,"carousel-headers-link-wrapper"],["class","carousel-header-link",3,"title","href","click",4,"ngIf"],["class","dst-view-all-offers",3,"href","title","click",4,"ngIf"],[1,"carousel-header-link",3,"click","title","href"],["id","couponCarouselHeaderLink",1,"carousel-header-link-text"],[1,"sr-only"],[1,"dst-view-all-offers",3,"click","href","title"],["id","couponCarouselHeaderLink",1,"dst-carousel-header-link-text"],[1,"carousel-content-loading"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"carousel-coupon-card","carousel-coupon-card--marketing",3,"marketingTile"],["class","carousel-coupon-card",3,"coupon","filterSource","carouselSection","couponsCarouselItem","logoProps","refreshTitleEvent","refreshSlickCarousel",4,"ngIf"],["class","carousel-coupon-card",3,"cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","logoProps","refreshTitleEvent","refreshSlickCarousel",4,"ngIf"],[1,"carousel-coupon-card",3,"refreshTitleEvent","refreshSlickCarousel","coupon","filterSource","carouselSection","couponsCarouselItem","logoProps"],[1,"carousel-coupon-card",3,"refreshTitleEvent","refreshSlickCarousel","cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","logoProps"],["data-modal-type","boxtop","data-modal-parent","coupon-carousel"]],template:function(e,t){1&e&&ph(0,v2,14,9,"div",1)(1,w2,1,0,"modal",2),2&e&&(zh("ngIf",t.coupons.length>0||t.marketingTile),Vd(),zh("ngIf",1==t.showBoxtop))},dependencies:[sy,oy,cy,yE,Hz,a2,E0],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),S2=(()=>{class e{constructor(e,t,i,n){this._http=e,this.appConfigService=t,this._j4uService=i,this.j4uV1Service=n,this.coupons=new Array,this.defaultNoResultsMsg="No coupons available.",this.AB=window.AB,this.HTTP_OPTIONS={headers:new jy(window.AB.j4uHttpOptions)},this.enableNgLibraryLoyaltyCard=!0,this.enableNgLibraryLoyaltyCard=!(window&&window.SWY&&window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.disableNgLibraryForLoyaltyCard)}getData(e,t,i,n=!1){let r=fi([]);switch(t){case"instant-allocation":r=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getData(e,!0),this.couponSource=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).isDataCached?"local storage":"direct call api";break;case"couponsdeals":r=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getData(e,!1,n),this.couponSource=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).isDataCached?"local storage":"direct call api";break;case"hiddenevents":if(window.AB.COMMON.authorize())if(null!=window.AB.COMMON.getURLParameterByName("eventId")&&""!=window.AB.COMMON.getURLParameterByName("eventId")){let t=decodeURIComponent(window.AB.COMMON.getURLParameterByName("eventId")),i=window.AB.userInfo.j4u.storeId;r=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getRemoteData(window.AB.hiddenEventsPath+"eventId="+t+"&storeId="+i+"&_deletedAttribute=true",this.HTTP_OPTIONS,e,!1,!0)}else r=fi([]);break;case"freshpassevents":i&&i.length>0&&(r=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).getData(e,!1).pipe(bi((e=>e.filter((e=>!!(e.events&&e.events.length>0)&&e.events.some((e=>i.includes(e.toLowerCase())))))))),this.couponSource=(this.enableNgLibraryLoyaltyCard?this.j4uV1Service:this._j4uService).isDataCached?"local storage":"direct call api");break;
1case"custom":break;default:r=fi([])}return r}doMapLink(e,t){e?.forEach((e=>{let i=t.find((t=>t.id==e.id));i?Object.assign(e,i):e.price=0}))}getNoResultsMsg(){let e;switch(window.AB.couponGridPage){case"shelf-page":case"promo":case"rewardcard":case"bogo":case"historylastorder":case"historylist":e=window.AB.errorText||this.defaultNoResultsMsg;break;case"q":e='<div class=\'no-result\'><div class=container\'><dl><dd>Check for typos.</dd><dd>Be more general (e.g. "carrots" instead of "bags of carrots")</dd><dd>Try looking within the aisles shown below</dd></dl></div></div>';break;default:e="<span>No items are available.</span>"}return e}areAllCouponsUnavailable(e){let t=!0;return!!Array.isArray(e)&&(e.forEach((e=>{e&&(t=!1)})),t)}getInfiniteScrollType(){return null!=window.AB.infiniteScroll&&""!=window.AB.infiniteScroll?"client"==window.AB.infiniteScroll?"client":"server":"none"}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(PD),lr(Yw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),C2=(()=>{class e{constructor(){this.onLoadFirstPage$=new Tt(1),this.pageNumber=1,this.numberOfItems=6,this.pageByScroll$=Li(window,"scroll").pipe(bi((()=>window.scrollTo(0,0))),qi((function(e){let t=document.querySelector("loading-spinner");return!!("number"==typeof e&&t&&t instanceof HTMLElement)&&e>=t.offsetTop-window.innerHeight})),Qi(),zi(200),bi((()=>(this.pageNumber++,this.pageNumber)))),this.pageToLoad$=Vi(this.onLoadFirstPage$,this.pageByScroll$).pipe(Qi()),this.backToTopScroll$=Li(window,"scroll").pipe(zi(500),bi((()=>window.scrollY)))}getNumberOfItems(){return this.numberOfItems}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),I2=(()=>{class e{constructor(){this.defaultNumber=0,this.currentNumber=0,this.mobileDefaultNumber=15,this.tabletDefaultNumber=20,this.desktopDefaultNumber=30,this.mobileInitialNumber=15,this.tabletInitialNumber=20,this.desktopInitialNumber=30,this.defaultNumberUBC=0,this.currentNumberUBC=0}loadCoupons(e,t){let i=[];return this.currentNumber=t?this.defaultNumber+this.currentNumber:0,e.slice(0,this.currentNumber+this.defaultNumber).forEach((e=>{i.push(e)})),i}loadRewards(e,t,i){let n=[];return this.currentNumber=i?t:0,e.slice(0,this.currentNumber+this.defaultNumber).forEach((e=>{n.push(e)})),n}loadCouponsUDC(e,t){let i=[];return this.currentNumberUBC=t?this.defaultNumberUBC+this.currentNumberUBC:0,e.slice(0,this.currentNumberUBC+this.defaultNumberUBC).forEach((e=>{i.push(e)})),i}setPaginationNumbers(e,t,i){this.mobileDefaultNumber=Number(e),this.tabletDefaultNumber=Number(t),this.desktopDefaultNumber=Number(i),window.innerWidth<768?this.defaultNumber=this.mobileDefaultNumber:window.innerWidth>=768&&window.innerWidth<=992?this.defaultNumber=this.tabletDefaultNumber:window.innerWidth>992&&(this.defaultNumber=this.desktopDefaultNumber)}setPaginationNumbersUBC(e,t,i){window.innerWidth<768?this.defaultNumberUBC=isNaN(Number(e))?this.mobileInitialNumber:Number(e):window.innerWidth>=768&&window.innerWidth<=992?this.defaultNumberUBC=isNaN(Number(t))?this.tabletInitialNumber:Number(t):window.innerWidth>992&&(this.defaultNumberUBC=isNaN(Number(i))?this.desktopInitialNumber:Number(i))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),A2=(()=>{class e{constructor(e){this.http=e,this.AB=window.AB,this.banner=this.AB.userInfo.banner,this.HTTP_OPTIONS={headers:new jy(this.AB.j4uHttpOptions)}}getLaunchpadData(){let e=`${window.SWY.CONFIGSERVICE.bannerDomainMap["www-"+this.banner]}/content/dam/data/b4u-content/launchpadcontent.json`;return this.http.get(e).pipe(bi((e=>e)))}getLifetimeSavingsData(){let e=`${window.SWY.CONFIGSERVICE.bannerDomainMap["www-"+this.banner]}${window.AB.savingsAPIPath}`;return this.http.get(e,this.HTTP_OPTIONS).pipe(bi((e=>e),$i(this.handleError)))}getRewardsPointsBalance(){let e=`${window.SWY.CONFIGSERVICE.bannerDomainMap["www-"+this.banner]}${window.AB.ocrpRewardScorecard}`,t={headers:new jy(window.AB.xAPIOcrpRewardsHttpOptionsV3)},i={hhid:window.AB.userInfo.houseId,programType:["BASEPOINTS"]},n=0;
1return this.http.post(e,i,t).pipe(bi((e=>(e&&e.scorecards&&e.scorecards.length&&e.scorecards.forEach((e=>{e&&"BASEPOINTS"===e.programType&&(n=e.balance)})),n)),$i(this.handleError)))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error){return console.error(`status: ${e.status}, ${e.statusText}`),mi(e.error.code&&e.error.message?e.error.code:e.status)}return mi(e.error)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();var k2=(()=>{class e{constructor(e,t,i){this._http=e,this._userInfoService=t,this.absAemService=i,this.enableNgAllDealsMediumBanners=!0,this.bannerIndexMap=new Map,this.callbackQueue=new kt,this.bannerQueueArray=[],this.deviceSize="lg",this.bannerElementsHtmlMap=new Map,this.deviceRowCoupons={sm:1,md:2,lg:3},this.callbackQueue.pipe(ji((e=>fi(null).pipe(Ki(1200),hn((()=>{e()})))))).subscribe(),console.warn("Preparing the service");let n=document.getElementById("gamBanners");if(n){let e=n.getAttribute("data-aem-config");if(e){e=this.decodeBase64UTF8(e);let t=(new DOMParser).parseFromString(e,"text/html"),i=t.querySelector(".abs-carousel-proxy"),n=t.querySelector(".nextgen-banner-unit_MediumBanner");if(n&&this.bannerElementsHtmlMap.set(".nextgen-banner-unit_MediumBanner",n?.parentElement),i){if(this.absAemService.getFeatureFlagByNameDisable("allDealsGAMBannersDisabled")){let e=i.querySelectorAll(".google-adManager");if(e&&e.length>0)for(let t=0;t<e.length;t++)e[t]?.closest(".banner-unit-proxy")?.remove()}this.bannerElementsHtmlMap.set(".abs-carousel",i),i.remove()}t.querySelectorAll("[data-bannerposition]").forEach((e=>{e&&(e.setAttribute("data-spapage","true"),this.bannerElementsHtmlMap.set(e.getAttribute("data-bannerposition"),e?.parentElement?.parentElement))}))}}else window?.location?.href?.includes("foru/coupons-deals")&&document?.querySelectorAll('[data-bannerposition="midb1"], [data-bannerposition="midb2"], [data-bannerposition="midb3"]')?.forEach((e=>{let t=e?.parentElement?.parentElement;t&&(t.querySelector("[data-lazy-function]").innerHTML="",this.bannerElementsHtmlMap.set(e.getAttribute("data-bannerposition"),t.cloneNode(!0)),t.remove())}))}decodeBase64UTF8(e){try{return decodeURIComponent(escape(atob(e)))}catch{try{return new TextDecoder("utf-8").decode(Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))}catch{return atob(e)}}}addToQueue(e){-1==this.bannerQueueArray.indexOf(e.bannerposition)&&(this.bannerQueueArray.push(e.bannerposition),this.callbackQueue.next(e.executeBanner.bind(e)))}shouldDisplayBanner(e){return this.bannerIndexMap.has(e)}getBannerElementsHtmlMap(){return this.bannerElementsHtmlMap}getBannerIndexMap(){return this.bannerIndexMap}prepareBannerIndexMap(e,t){this.bannerIndexMap.clear();let i=window.innerWidth;this.deviceSize=i<768?"sm":i<992?"md":"lg",console.warn("test-prepareBannerIndexMap: "+this.deviceSize);let n=this.deviceRowCoupons[this.deviceSize];for(let i=0,r=1;i<t.length;i++,r++){let s=(r-1)%n;if(0!==i&&t[i].isGroupSplit&&0!==s&&(r+=n-s),r%(3*n)!=0)continue;let a=e.shift();if(!a)break;this.bannerIndexMap.set(i,a)}return e}trackSlotLoaded(e,t,i){let n=window;setTimeout((()=>{n.googletag?.pubads&&n.googletag?.pubads()?.getSlots&&n.googletag?.pubads()?.getSlots()?.forEach((n=>{n?.getSlotElementId()?.includes(e)&&!n?.getResponseInformation()&&(t.classList.add("collapse"),i?.nativeElement?.parentElement?.classList?.add("d-none"))})),(!n.googletag||!i?.nativeElement?.innerHTML)&&i?.nativeElement?.parentElement?.classList?.add("d-none")}),8e3)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(_w),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),x2=(()=>{class e{constructor(e,t,i){this._element=e,this._zone=t,this.platformId=i,this.seoPreRendering=!0,this.backwardsCompatible=!0,this.removeListenersAfterLoad=!0,this.lazyLoad=new _l,this._options={rootMargin:"50px"},this.checkForIntersection=e=>{e.forEach((e=>{this.isIntersecting(e)&&(this.load(),this._intersectionObserver&&this._element.nativeElement&&this._intersectionObserver.unobserve(this._element.nativeElement))}))},this.onScroll=()=>{this.isVisible()&&this._zone.run((()=>this.load()))}}ngOnInit(){(Uy(this.platformId)&&!0===this.seoPreRendering||Ny(this.platformId)&&!1===this.backwardsCompatible&&!this.hasCompatibleBrowser())&&this.load()}ngAfterViewInit(){Ny(this.platformId)&&(this.hasCompatibleBrowser()?(this.registerIntersectionObserver(),this._intersectionObserver&&this._element.nativeElement&&this._intersectionObserver.observe(this._element.nativeElement)):!0===this.backwardsCompatible&&this.addScrollListeners())}hasCompatibleBrowser(){let e="IntersectionObserver"in window,t=window.navigator.userAgent.match(/Edge\/(\d*)\./i),i=!!t&&t.length>1,n=i&&!!t&&parseInt(t[1],10)>15;return e&&(!i||n)}ngOnDestroy(){this.removeListeners()}registerIntersectionObserver(){this._intersectionObserver||(this._intersectionObserver=new IntersectionObserver((e=>this.checkForIntersection(e)),this._options))}isIntersecting(e){return e&&e.time?e.isIntersecting&&e.target===this._element.nativeElement:this.isVisible()}load(){this.removeListenersAfterLoad&&this.removeListeners(),this.lazyLoad.emit()}addScrollListeners(){this.isVisible()?this.load():this._zone.runOutsideAngular((()=>{this._scrollSubscription=Li(window,"scroll").pipe(zi(50)).subscribe(this.onScroll)}))}removeListeners(){this._scrollSubscription&&this._scrollSubscription.unsubscribe(),this._intersectionObserver&&this._intersectionObserver.disconnect()}getScrollPosition(){return(window.scrollY||window.pageYOffset)+(document.documentElement.clientHeight||document.body.clientHeight)}isVisible(){let e=this.getScrollPosition();return this._element.nativeElement.getBoundingClientRect().top+(window.scrollY||window.pageYOffset)<=e}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Tl),$d(rc))}}static{this.ɵdir=ts({type:e,selectors:[["","lazyLoad",""]],inputs:{seoPreRendering:"seoPreRendering",backwardsCompatible:"backwardsCompatible",removeListenersAfterLoad:"removeListenersAfterLoad"},outputs:{lazyLoad:"lazyLoad"}})}}return e})(),T2=["bannerUnitRef"];function P2(e,t){1&e&&(Ef(0),Tf(1,"div",3,1),Df())}function E2(e,t){if(1&e){let e=Mf();kf(0,"div",4,1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().placeBannerUnit(
1))})),xf()}}var D2=(()=>{class e{constructor(e,t,i,n){this.renderer=e,this._bannerUnitService=t,this._userInfoService=i,this.absAemService=n,this.bannerElement=null,this.banner=this._userInfoService.getBanner(),this._window=window,this.lazyLoad=!1,this.timeoutId=null}ngOnChanges(e){if(e.indextoInjectMidBanner&&e.indextoInjectMidBanner.currentValue||e.bannerPositionName&&e.bannerPositionName.currentValue){if(this.bannerposition=this._bannerUnitService.getBannerIndexMap().has(this.indextoInjectMidBanner)?this._bannerUnitService.getBannerIndexMap().get(this.indextoInjectMidBanner):this.bannerPositionName,this._bannerUnitService.getBannerElementsHtmlMap().has(this.bannerposition)){let e=this._bannerUnitService.getBannerElementsHtmlMap().get(this.bannerposition);this.bannerElement=this.updateAdUnitPath(e.cloneNode(!0)),this.bannerGAMid=this.bannerElement.querySelector("gam-section").getAttribute("data-gamid")}else{let e=document.querySelector(`[data-bannerposition="${this.bannerposition}"]`);this.bannerGAMid=e?.getAttribute("data-gamid"),this.bannerElement=e?.parentElement?.parentElement,this.bannerElement&&(this.bannerElement.querySelector("[data-lazy-function]").innerHTML="",this._bannerUnitService.getBannerElementsHtmlMap().set(this.bannerposition,this.updateAdUnitPath(this.bannerElement.cloneNode(!0))),this.bannerElement.remove())}this.bannerElement?.querySelector(".ab-lazy-function")?.getAttribute("data-lazy-function")?this.lazyLoad=!0:this.placeBannerUnit()}}updateAdUnitPath(e){if(this.adUnitPathSuffix&&this.adUnitPathSuffix.length>0&&window.AB?.userInfo?.banner){let t=e.querySelector("gam-section");t.setAttribute("data-adunitpath",window.AB.userInfo.banner+this.adUnitPathSuffix);let i=window.googletag?.pubads()?.getSlots()?.find((e=>e?.getSlotElementId()==="gamcontainer_"+t.getAttribute("data-gamid")));i&&window.googletag?.destroySlots([i])}return e}ngAfterViewInit(){this.checkAdBlockerAndInitGAM()}checkAdBlockerAndInitGAM(){let e=this;null==window.checkAdBlocker&&window.addEventListener("adBlockerLoadChecked",(function(t){!e.lazyLoad&&!e.checkSlotLoaded(e.bannerGAMid)&&e.placeBannerUnit()}))}checkSlotLoaded(e){return!!(e&&window.googletag&&window.googletag?.pubads&&window.googletag?.pubads()?.getSlots)&&window.googletag?.pubads()?.getSlots()?.filter((t=>t?.getSlotElementId()?.includes(e)))?.length>0}placeBannerUnit(){setTimeout((()=>{this.bannerElement&&this.bannerUnitRef&&window.googletag&&0!=window.googletag?._loaded_?(this.bannerUnitRef?.nativeElement?.parentElement?.classList?.remove("d-none"),this.renderer.appendChild(this.bannerUnitRef.nativeElement,this.bannerElement),this.categoryName&&this.bannerElement.querySelector("gam-section")?.setAttribute("data-categoryName",this.categoryName),this.isInGridBanner()?this._bannerUnitService.addToQueue(this):this.executeBanner()):this.bannerUnitRef?.nativeElement?.parentElement?.classList?.add("d-none")}),0)}isInGridBanner(){let e=window?.location?.pathname,t=-1!=["midb1","midb2","midb3"].indexOf(this.bannerposition),i=e?.includes("/loyalty/coupons-deals")||e?.includes("/foru/coupons-deals");return t&&i}executeBanner(){this.bannerElement.querySelector("gam-section")?.getAttribute("data-spapage");if(this.checkSlotLoaded(this.bannerGAMid)){if(this.bannerGAMid){let e=new CustomEvent("reloadGAM_"+this.bannerGAMid,{detail:{bannerGAMId:this.bannerGAMid}});document.dispatchEvent(e)}}else{this.bannerElement.querySelectorAll("script")?.forEach((e=>{let t=document.createElement("script");t.text=e.textContent,e.parentNode.replaceChild(t,e)}));let e=this.bannerElement.querySelector(".ab-lazy-function")?.getAttribute("data-lazy-function");e&&window.lazyFunctions&&window.lazyFunctions[e]&&window.lazyFunctions[e]()}this._bannerUnitService.trackSlotLoaded(this.bannerGAMid,this.bannerElement,this.bannerUnitRef)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(k2),$d(_w),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["banner-unit-v1"]],viewQuery:function(e,t){if(1&e&&tm(T2,5,Vl),2&e){let e;im(e=nm())&&(t.bannerUnitRef=e.first)}},inputs:{indextoInjectMidBanner:"indextoInjectMidBanner",bannerPositionName:"bannerPositionName",bannerPosition:"bannerPosition",categoryName:"categoryName",adUnitPathSuffix:"adUnitPathSuffix"},features:[ga],decls:3,vars:2,consts:[["lazyTemplate",""],["bannerUnitRef",""],[4,"ngIf","ngIfElse"],[1,"dynamic-content"],[1,"dynamic-content","lazy",3,"lazyLoad"]],template:function(e,t){if(1&e&&ph(0,P2,3,0,"ng-container",2)(1,E2,2,0,"ng-template",null,0,Wm),2&e){let e=sm(2);zh("ngIf",!1===t.lazyLoad)("ngIfElse",e)}},dependencies:[cy,x2],encapsulation:2})}}return e})(),O2=["bannerUnitCarouselRef"],B2=(()=>{class e{constructor(e,t,i){this.renderer=e,this._bannerUnitService=t,this._userInfoService=i,this.bannerUnitCarouselElement=null,this._window=window}ngOnChanges(e){e.carouselSelector&&e.carouselSelector.currentValue&&(this._bannerUnitService.getBannerElementsHtmlMap()?.has(this.carouselSelector)?this.bannerUnitCarouselElement=this._bannerUnitService.getBannerElementsHtmlMap().get(this.carouselSelector).cloneNode(!0):(this.bannerUnitCarouselElement=document.querySelector(this.carouselSelector),this.bannerUnitCarouselElement&&this._bannerUnitService.getBannerElementsHtmlMap()?.set(this.carouselSelector,this.bannerUnitCarouselElement.cloneNode(!0))),this.placeCarousel())}ngAfterViewInit(){this.checkAdBlockerAndInitGAM()}checkAdBlockerAndInitGAM(){let e=this;null==window.checkAdBlocker&&window.addEventListener("adBlockerLoadChecked",(function(t){e.placeCarousel()}))}placeCarousel(){let e=this;setTimeout((()=>
1{if(e.bannerUnitCarouselElement&&e.bannerUnitCarouselRef&&0!=window.googletag?._loaded_){e.renderer.appendChild(e.bannerUnitCarouselRef.nativeElement,e.bannerUnitCarouselElement);let t=e.bannerUnitCarouselElement.querySelector("abs-carousel-wc"),i=t?.getAttribute("data-lazy-function");i&&window.lazyFunctions[i](t)}}),0)}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(k2),$d(_w))}}static{this.ɵcmp=Qr({type:e,selectors:[["banner-unit-carousel-v1"]],viewQuery:function(e,t){if(1&e&&tm(O2,5,Vl),2&e){let e;im(e=nm())&&(t.bannerUnitCarouselRef=e.first)}},inputs:{carouselSelector:"carouselSelector"},features:[ga],decls:2,vars:0,consts:[["bannerUnitCarouselRef",""],[1,"dynamic-content"]],template:function(e,t){1&e&&Tf(0,"div",1,0)},encapsulation:2})}}return e})(),M2=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[D2,B2],imports:[Ly]})}}return e})(),R2={"golden-gate":["safeway","vons","carrsqc","jewelosco","randalls","tomthumb","acmemarket","shopmarketstreet"],baker:["pavilions"],presidio:["andronicos","shaws","haggen","starmarket","shopamigos"],sutro:["albertsons","kingsfoodmarkets","shopunitedsupermarkets","shopalbertsonsmarket"]},L2={};Object.keys(R2).forEach((e=>{R2[e].forEach((t=>L2[t]=e))}));var F2=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),N2=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,F2]})}}return e})(),U2=(e,t,i)=>({color:e,"background-color":t,"font-size.px":i}),V2=e=>({"in-store-price-visible":e}),q2=e=>({"grid-coupon-clip-button":!0,clipped:e}),$2=e=>({btn:!0,"grid-coupon-btn":!0,"btn-default":!0,"loading-coupon-item":e});function j2(e,t){if(1&e&&(kf(0,"span",30),am(1),xf()),2&e){let e=Yf(3);zh("ngStyle",Mm(2,U2,e.UDCDealsCouponTXColor,e.UDCDealsCouponBGColor,e.UDCDealsCouponFontSize)),Vd(),lm(e.UDClabelheading)}}function z2(e,t){if(1&e&&(Ef(0),ph(1,j2,2,6,"span",29),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.UDClabelheading)}}function W2(e,t){if(1&e&&(Ef(0),Tf(1,"img",31),kf(2,"span",32),am(3),xf(),Df()),2&e){let e=Yf(2);Vd(2),Zf("id","coupon-price-",e.coupon.offerId,""),Vd(),lm(e.coupon.newOfferPrice)}}function H2(e,t){if(1&e&&(Ef(0),Tf(1,"img",33),kf(2,"span",32),am(3),xf(),Df()),2&e){let e=Yf(2);Vd(2),Zf("id","coupon-price-",e.coupon.offerId,""),Vd(),lm(e.coupon.newOfferPrice)}}function Y2(e,t){if(1&e&&(Ef(0),Tf(1,"img",34),kf(2,"span",32),am(3),xf(),Df()),2&e){let e=Yf(2);Vd(2),Zf("id","coupon-price-",e.coupon.offerId,""),Vd(),lm(e.coupon.newOfferPrice)}}function G2(e,t){if(1&e&&(Ef(0),Tf(1,"img",33),kf(2,"span",32),am(3),xf(),Df()),2&e){let e=Yf(2);Vd(2),Zf("id","coupon-price-",e.coupon.offerId,""),Vd(),lm(e.coupon.newOfferPrice)}}function K2(e,t){if(1&e&&(kf(0,"span",26),ph(1,z2,2,1,"ng-container",27)(2,W2,4,3,"ng-container",27)(3,H2,4,3,"ng-container",27)(4,Y2,4,3,"ng-container",27)(5,G2,4,3,"ng-container",28),xf()),2&e){zh("ngSwitch",Yf().iconImage),Vd(),zh("ngSwitchCase","UDCDealIconImage"),Vd(),zh("ngSwitchCase","FreshPassIconImage"),Vd(),zh("ngSwitchCase","LastBeforeDefaultIconImage"),Vd(),zh("ngSwitchCase","RewardsIconImage")}}function Q2(e,t){if(1&e&&(kf(0,"span",35),Tf(1,"j4u-logo-container",36),kf(2,"span",32),am(3),xf()()),2&e){let e=Yf();Vd(),zh("iconImage",e.iconImage)("logoProps",e.logoProps),Vd(),Zf("id","coupon-price-",e.coupon.offerId,""),Vd(),lm(e.coupon.newOfferPrice)}}function J2(e,t){if(1&e&&(kf(0,"span",35)(1,"span",37),am(2),xf()()),2&e){let e=Yf();Vd(),Zf("id","coupon-price-",e.coupon.offerId,""),zh("ngClass",Om(4,V2,e.coupon.regularPrice&&""!=e.coupon.regularPrice)),Vd(),cm("In-store: $",e.coupon.regularPrice,"")}}function Z2(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"continuity-offer-challenge",41),jf("startChallengeEvent",(function(){Wa(e);let t=Yf(3);return Ha(t.clipCoupon(t.couponIndex))})),xf(),Df()}if(2&e){let e=Yf(3);Vd(),zh("showLoadingCoupon",e.showLoadingCoupon)("isClipped",e.continuityOfferService.isClippedStatus(e.coupon))("continuity",e.coupon.continuity)("programType",(null==e.coupon?null:e.coupon.offerProgramType)||(null==e.coupon?null:e.coupon.offerProtoType))}}function X2(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",42),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))})),am(2),xf(),Df()}if(2&e){let e=Yf(4);Vd(),Zf("id","couponAddBtn",e.coupon.couponID,""),zh("ngClass",Om(6,$2,e.showLoadingCoupon))("disabled",e.showLoadingCoupon),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(e.clipCouponUDCLabel)}}function e3(e,t){if(1&e){let e=Mf();kf(0,"button",42),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","couponAddBtn",e.coupon.couponID,""),zh("ngClass",Om(6,$2,e.showLoadingCoupon))("disabled",e.showLoadingCoupon),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(e.coupon.deleted&&e.isBonusPathV2Active?e.addToList:e.clipCouponLabel)}}function t3(e,t){if(1&e&&ph(0,X2,3,8,"ng-container",40)(1,e3,2,8,"ng-template",null,1,Wm),2&e){let e=sm(2);zh("ngIf",Yf(3).UDCDealsEnable)("ngIfElse",e)}}function i3(e,t){if(1&e&&(Ef(0),ph(1,Z2,2,4,"ng-container",40)(2,t3,3,2,"ng-template",null,0,Wm),Df()),2&e){let e=sm(3),t=Yf(2);Vd(),zh("ngIf",t.continuityOfferService.isContinuity(t.coupon))("ngIfElse",e)}}function n3(e,t){if(1&e&&(Ef(0),Tf(1,"continuity-offer-challenge",43),Df()),2&e){let e=Yf(3);Vd(),zh("isClipped",e.continuityOfferService.isClippedStatus(e.coupon))("continuity",e.coupon.continuity)("programType",(null==e.coupon?null:e.coupon.offerProgramType)||(null==e.coupon?null:e.coupon.offerProtoType))("challengeCompletedLabelColor",e.color)}}function r3(e,t){if(1&e&&(kf(0,"span",44),So(),kf(1,"svg",45)(2,"g",46)(3,"g",47),Tf(4,"polygon",48),xf()()(),am(5),xf()),2&e){let e=Yf(3);gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(5),cm("",e.clippedLabel," ")}}function s3(e,t){if(1&e&&(Ef(0),ph(1,n3,2,4,"ng-container",40)(2,r3,6,2,"ng-template",null,2,Wm),Df()),2&e){let e=sm(3),t=Yf(2);Vd(),zh("ngIf",t.continuityOfferService.isContinuity(t.coupon))("ngIfElse",e)}}function a3(e,t){if(1&e&&(Ef(0),kf(1,"div",38)(2,"div",39),ph(3,i3,4,2,"ng-container",25)(4,s3,4,2,"ng-container",25),xf()(),Df()),2&e){let e=Yf();Vd(2),Zf("id","clippedCouponGrid",e.coupon.couponID,""),zh("ngClass",Om(5,q2,"C"==e.coupon.status)),Vd(),zh("ngIf","U"==e.coupon.status),Vd(),zh("ngIf","C"==e.coupon.status)}}function o3(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"continuity-offer-challenge",50),jf("startChallengeEvent",(function(){Wa(e);let t=Yf(2);return Ha(t.clipCoupon(t.couponIndex))})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("showLoadingCoupon",e.showLoadingCoupon)("couponData",e.coupon)("behavioralOfferAttrs",e.behavioralOfferAttrs)}}function l3(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",42),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))})),am(2),xf(),Df()}if(2&e){let e=Yf(4);Vd(),Zf("id","couponAddBtn",e.coupon.couponID,""),zh("ngClass",Om(6,$2,e.showLoadingCoupon))("disabled",e.showLoadingCoupon),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(e.clipCouponUDCLabel)}}function c3(e,t){if(1&e){let e=Mf();kf(0,"button",42),jf("click",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))}))("keydown.enter",(function(){Wa(e);let t=Yf(4);return Ha(t.clipCoupon(t.couponIndex))})),am(1),xf()}if(2&e){let e=Yf(4);Zf("id","couponAddBtn",e.coupon.couponID,""),zh("ngClass",Om(6,$2,e.showLoadingCoupon))("disabled",e.showLoadingCoupon),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(),lm(e.coupon.deleted&&e.isBonusPathV2Active?e.addToList:e.clipCouponLabel)}}function d3(e,t){if(1&e&&(Ef(0),ph(1,l3,3,8,"ng-container",40)(2,c3,2,8,"ng-template",null,1,Wm),Df()),2&e){let e=sm(3),t=Yf(3);Vd(),zh("ngIf",t.UDCDealsEnable)("ngIfElse",e)}}function u3(e,t){if(1&e&&(Ef(0),kf(1,"span",44),So(),kf(2,"svg",45)(3,"g",46)(4,"g",47),Tf(5,"polygon",48),xf()()(),am(6),xf(),Df()),2&e){let e=Yf(3);Vd(),gh("aria-describedby","coupon-price-"+e.coupon.offerId+" coupon-title-"+e.coupon.offerId+" coupon-description-"+e.coupon.offerId),Vd(5),cm("",e.clippedLabel," ")}}function p3(e,t){if(1&e&&(kf(0,"div",38)(1,"div",39),ph(2,d3,4,2,"ng-container",25)(3,u3,7,2,"ng-container",25),xf()()),2&e){let e=Yf(2);Vd(),Zf("id","clippedCouponGrid",e.coupon.couponID,""),zh("ngClass",Om(5,q2,"C"==e.coupon.status)),Vd(),zh("ngIf","U"==e.coupon.status),Vd(),zh("ngIf","C"==e.coupon.status)}}function h3(e,t){if(1&e&&(Ef(0),ph(1,o3,2,3,"ng-container",25)(2,p3,4,7,"div",49),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.continuityOfferService.isBehaviourOrContinuityCoupon(e.coupon)),Vd(),zh("ngIf",!e.continuityOfferService.isBehaviourOrContinuityCoupon(e.coupon))}}var f3=(()=>{class e{constructor(e,t,i,n,r,s,a){this._couponFilterService=e,this._j4uService=t,this.http=i,this.appConfigService=n,this.elementRef=r,this._modalService=s,this.continuityOfferService=a,this.removeCoupon=new _l,this.twoLines=!1,this.showBoxtop=!1,this.verifyBoxtopsAccount=!1,this.modalAttrName="modal",this.modalIdName="#boxtop-modal-cg",this.isWWW=!0,this.showLoadingCoupon=!1,this.enableJ4ULogoContainer=!0,this.addToList="Add to My List",this.sm="575px",this.md="768px",this.imagePath=window.AB.dMTProductCard,this.iconImage="",this.color="#757575",this.isBonusPathV2Active=!0,this.UDCDealsEnable=!1,this.UDCDealsCouponFontSize="",this.UDCDealsCouponBGColor="",this.UDCDealsCouponTXColor="",this.UDClabelheading="",this.isSplashScreenCoupon=!1,this.freshPassEnable=!1,this.freshPassCouponEventListener=[],this.logoSVGCouponItemImageEnable=!1,this.logoSVGCouponItemImage="",this.couponToFocusOn=new _l,this.couponGridPage=window.AB.couponGridPage,this.elementRef=r,-1==window.location.href.indexOf("shop")?this.couponDetailPath="/foru/offer-details":this.couponDetailPath="/offer-details"}ngOnInit(){this.isWWW=window.AB.isWWW,this.showBoxtop=!0,this._modalService.showBoxtop.subscribe((e=>{this.showBoxtop=e})),this.clipCouponLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLC,this.clippedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLD,this.clipCouponUDCLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLCUDC,this.startChallengeLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.SCC,this.challengeCompletedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CC,this._j4uService.couponUpdated.subscribe((e=>{this._coupon.offerId==e.id&&(this._coupon.status=e.status,this._coupon.deleted=e.deleted,this.coupon=this._coupon)}));
1let e={iconImage:"",logoSVGCouponItemImageEnable:this.logoSVGCouponItemImageEnable,logoSVGCouponItemImage:this.logoSVGCouponItemImage,freshPassEnable:this.freshPassEnable,freshPassCouponEventListener:this.freshPassCouponEventListener,events:this._coupon?.events,UDCDealsEnable:this.UDCDealsEnable};this._j4uService.findIconToDisplay(e),this.iconImage=e.iconImage,this._j4uService.isRewardCoupon(this.coupon)&&(this.iconImage="RewardsIconImage")}ngAfterViewInit(){window.AB.LAZYLOAD.init()}set coupon(e){e.updBtnText=typeof e.updBtnText>"u"?"Added":e.updBtnText,e.updBtnMode=typeof e.updBtnMode>"u"||e.updBtnMode,e.usageTypeTxt=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[e.usageType],e.couponID=typeof e.couponID>"u"?e.offerId:e.couponID,e.brand=typeof e.brand>"u"?e.name:e.brand,e.image=e.image?e.image:window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+e.imageId,typeof e.priceTitle<"u"?e.newOfferPrice=e.priceTitle+" "+e.offerPrice:e.newOfferPrice=e.offerPrice;let t=e.brand.substr(0,40);t=t.substr(0,Math.min(t.length,t.lastIndexOf(" ")));let i=e.description.substr(0,60);if(i=i.substr(0,Math.min(i.length,i.lastIndexOf(" "))),e.refineBrand=e.brand.length>40?t+"...":e.brand+"",e.refineDescription=e.description.length>60?i+"...":"."==e.description.trim().slice(-1)?e.description:e.description+".",this._coupon=e,this._coupon.endDate=this.dateConversion(this._coupon.endDate),!this._filter){if(e.category&&""!==e.category&&this._couponFilterService.addCouponCategory(e.category),e.events&&e.events.length>0)for(let t in e.events)this._couponFilterService.addCouponEvent(e.events[t]);e.offerType&&""!=e.offerType&&this._couponFilterService.addCouponOfferType(e.offerType)}}get coupon(){return this._coupon}dateConversion(e){var t=e;if(t.indexOf("(")>=0){var i=/\((.*)\)/;return(n=new Date(parseInt(t.match(i)[1]))).toLocaleDateString("en-US")}if(-1!==t.indexOf("/"))return t;var n,r=(i=/\d+/).exec(t);return(n=new Date(parseInt(r[0]))).setUTCMilliseconds(r.index),n.toLocaleDateString("en-US")}getStoreID(){if(window.AB&&window.AB.userInfo&&window.AB.userInfo.j4u){let e=window.AB.userInfo.j4u.storeId;if(!isNaN(e))return e}let e="ECommTokens",t=document.cookie.split(";").map((e=>e.trim())).filter((t=>t.substring(0,12)===`${e}=`)).map((e=>decodeURIComponent(e.substring(12))))[0]||null;return t=JSON.parse(t).branchId,!isNaN(t)&&t}updateAnalyticsDataLayer(e){this.analyticsData.nativeElement=this.elementRef.nativeElement,window&&window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.clipCoupon(e,this.analyticsData)}clipCoupon(e){this._isRegistered()?window.SWY.ENFORCEMENT.isTokenActive()?(this.showBoxTopModal(),this.j4uClipCoupon(e)):window.SWY.ENFORCEMENT.checkAuthorizedCookie()?this.http.get(window.AB.userInfoPath).subscribe((t=>
1{window.AB.userInfo.updateTokenRefreshProperty(),this.showBoxTopModal(),this.j4uClipCoupon(e)}),(e=>{let t="Coupon Clip - Soft Token is not expired, but AEM servlet returns "+e.status+" status. Redirects to 500 error message";window.AB.DATALAYER.setError(this.coupon.offerId.toString(),"coupon clipping",t),setTimeout((function(){window.AB.COMMON.redirectErrorPage()}),500)})):(window.AB.DATALAYER.setError(this.coupon.offerId.toString(),"coupon clipping","Coupon Clip - Session is expired, reloading the page"),setTimeout((function(){window.location.reload()}),500)):this.showBoxTopModal()||(localStorage.setItem("referralUrl",window.location.href),window.AB.COMMON.showSignInModal_OTP(window.location.href),$("#createAccountModalj4u").attr("data-value","couponAddBtn"+this.coupon.offerId))}j4uClipCoupon(e){this.showLoadingCoupon=!0,this.analyticsData.nativeElement=this.elementRef.nativeElement,this._j4uService.clipCoupon(this._coupon,this.getStoreID().toString(),this.analyticsData).pipe(tn((()=>{this.showLoadingCoupon=!1}))).subscribe((t=>{t&&t.items&&t.items[0]&&1===t.items[0].status&&this.couponToFocusOn.emit(e)}))}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}showBoxTopModal(){let e=!1;return localStorage.showBoxtop&&(this.showBoxtop=JSON.parse(localStorage.getItem("showBoxtop"))),window.AB.userInfo.boxTopAuth&&(this.showBoxtop=!1),"07"==this.coupon.offerSubPgm&&this.showBoxtop&&(window.AB.ARIA.prevFocusedElement=this.coupon.offerId,e=!0,$(this.modalIdName).modal({show:!0})),e}getImageUrl(e){let t=this.imagePath;return t?t.replace("${product.id}",this.coupon.imageId).replace("${viewport}",e):""}static{this.ɵfac=function(t){return new(t||e)($d(sP),$d(PD),$d(ov),$d(hP),$d(Vl),$d(mP),$d(TD))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-item"]],inputs:{_filter:[0,"filter","_filter"],carouselSection:"carouselSection",UDCDealsEnable:"UDCDealsEnable",UDCDealsCouponFontSize:"UDCDealsCouponFontSize",UDCDealsCouponBGColor:"UDCDealsCouponBGColor",UDCDealsCouponTXColor:"UDCDealsCouponTXColor",UDClabelheading:"UDClabelheading",isSplashScreenCoupon:"isSplashScreenCoupon",freshPassEnable:"freshPassEnable",freshPassCouponEventListener:"freshPassCouponEventListener",logoSVGCouponItemImageEnable:"logoSVGCouponItemImageEnable",logoSVGCouponItemImage:"logoSVGCouponItemImage",behavioralOfferAttrs:"behavioralOfferAttrs",couponIndex:"couponIndex",analyticsData:"analyticsData",coupon:[0,"data","coupon"],logoProps:"logoProps"},outputs:{removeCoupon:"removeCoupon",couponToFocusOn:"couponToFocusOn"},decls:35,vars:33,consts:[["noContinuity_U",""],["CLC",""],["noContinuity_C",""],["role","group",1,"grid-coupon-container"],[1,"grid-coupon-wrapper"],[1,"grid-coupon-heading"],[1,"grid-coupon-heading-text-wrapper"],["class","grid-coupon-heading-text",3,"ngSwitch",4,"ngIf"],["class","grid-coupon-heading-text",4,"ngIf"],[1,"grid-coupon-item-description"],[1,"grid-coupon-text"],[1,"grid-coupon-description-text"],[1,"grid-coupon-description-text-title",3,"id"],[1,"grid-coupon-description-text-details-wrapper"],[1,"grid-coupon-description-text-details"],[3,"id"],[1,"grid-coupon-details-link",3,"href"],[1,"grid-coupon-description-image-wrapper"],[1,"grid-coupon-description-image"],[3,"media","srcset"],["loading","lazy","role","presentation",1,"ab-lazy",3,"alt","src"],[1,"grid-coupon-details"],[1,"grid-coupon-exp-date"],["tabindex","0",1,"grid-coupon-details-expiration"],["tabindex","0",1,"grid-coupon-details-expiration-date"],[4,"ngIf"],[1,"grid-coupon-heading-text",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","roundedbox-text",3,"ngStyle",4,"ngIf"],[1,"roundedbox-text",3,"ngStyle"],["src","/etc/designs/wcax-commons/images/icons/freshpass-logo.svg","alt","Just 4 U Freshpass logo","aria-label","Just 4 U Freshpass logo",1,"svg-icon","just-for-you-16px","icon-position"],["tabindex","-1",1,"grid-coupon-heading-offer-price",3,"id"],["src","/etc/designs/wcax-commons/images/icons/for-u-logo.png","alt","For U logo","aria-label","For U logo",1,"svg-icon","just-for-you-16px","icon-position"],["src","/etc/designs/wcax-commons/images/icons/Icon_rewards_generic.svg","alt","Rewards logo","aria-label","Rewards logo",1,"svg-icon","just-for-you-16px","icon-position"],[1,"grid-coupon-heading-text"],[3,"iconImage","logoProps"],[1,"grid-coupon-heading-offer-price","in-store-price",3,"id","ngClass"],[1,"grid-coupon-clip-button-wrapper"],[3,"id","ngClass"],[4,"ngIf","ngIfElse"],[3,"startChallengeEvent","showLoadingCoupon","isClipped","continuity","programType"],["role","button",3,"click","keydown.enter","ngClass","id","disabled"],[3,"isClipped","continuity","programType","challengeCompletedLabelColor"],[1,"coupon-clipped-container"],["width","18px","height","18px","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray","fill","#757575"],["id","GreenCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236"],["class","grid-coupon-clip-button-wrapper",4,"ngIf"],[3,"startChallengeEvent","showLoadingCoupon","couponData","behavioralOfferAttrs"]],template:function(e,t){1&e&&(kf(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),ph(4,K2,6,5,"span",7)(5,Q2,4,5,"span",8)(6,J2,3,6,"span",8),xf()(),kf(7,"div",9)(8,"div",10)(9,"div",11)(10,"span",12),am(11),xf()(),kf(12,"div",13)(13,"div")(14,"div",14)(15,"div",15),am(16),xf(),kf(17,"span")(18,"a",16)(19,"span"),am(20,"Offer Details"),xf()()()()()()(),kf(21,"div",17)(22,"span",18)(23,"picture"),Tf(24,"source",19)(25,"source",19)(26,"img",20),xf()()()(),kf(27,"div",21)(28,"div",22)(29,"span",23),am(30),xf(),kf(31,"span",24),am(32),xf(
1)(),ph(33,a3,5,7,"ng-container",25)(34,h3,3,2,"ng-container",25),xf()()()),2&e&&(Sh("aria-labelledby","Coupon - ",t.coupon.newOfferPrice," - ",t.coupon.refineBrand,""),Vd(4),zh("ngIf",!t.enableJ4ULogoContainer),Vd(),zh("ngIf",t.enableJ4ULogoContainer),Vd(),zh("ngIf",t.isWWW||t.isSplashScreenCoupon),Vd(4),Zf("id","coupon-title-",t.coupon.offerId,""),Vd(),cm(" ",t.coupon.refineBrand," "),Vd(4),Zf("id","coupon-description-",t.coupon.offerId,""),Vd(),cm(" ",t.coupon.refineDescription," "),Vd(2),em("href","",t.couponDetailPath,".",t.coupon.couponID,".",t.coupon.offerTs,".",t.coupon.offerPgm,".html",id),gh("aria-describedby","coupon-price-"+t.coupon.offerId+" coupon-title-"+t.coupon.offerId+" coupon-description-"+t.coupon.offerId),Vd(6),Zf("media","(min-width: ",t.md,")"),Jf("srcset",t.getImageUrl("desktop")),Vd(),Zf("media","(min-width: ",t.sm,")"),Jf("srcset",t.getImageUrl("tablet")),Vd(),Jf("src",t.getImageUrl("mobile"),id),zh("alt",t.coupon.refineBrand),Vd(3),gh("aria-label",t.coupon.usageTypeTxt),Vd(),lm(t.coupon.usageTypeTxt),Vd(),_h("aria-label","Expires ",t.dateConversion(t.coupon.endDate),""),Vd(),cm("Expires ",t.dateConversion(t.coupon.endDate),""),Vd(),zh("ngIf",!t.isBonusPathV2Active),Vd(),zh("ngIf",t.isBonusPathV2Active))},dependencies:[sy,cy,gy,hy,fy,my,l0,f0],encapsulation:2})}}return e})();function m3(e,t){if(1&e&&(kf(0,"a",3),Tf(1,"img",4),xf()),2&e){let e=Yf(3);Jf("href",e.modUnitImagePath,id),Zf("target","",e.modUnitOpenNewPage,"}"),Vd(),Xf("src","",e.modUnitImage,"?$",e.modUnitImagePreset,"$&defaultImage=Not_Available",id),Jf("alt",e.modUnitImageAltText)}}function g3(e,t){if(1&e&&(kf(0,"div",13),Tf(1,"h2",14),xf()),2&e){let e=Yf(4);Vd(),zh("innerHTML",e.modUnitHeaderText,ed)}}function b3(e,t){if(1&e&&Tf(0,"div",15),2&e){zh("innerHTML",Yf(4).modUnitSubText,ed)}}function y3(e,t){if(1&e&&(kf(0,"div",16)(1,"a",17),am(2),xf()()),2&e){let e=Yf(4);Vd(),Jf("href",e.modUnitImagePath,id),Jf("target",e.modUnitOpenNewPage),Vd(),cm(" ",e.modUnitImageCTA," ")}}function v3(e,t){if(1&e&&(kf(0,"div",5)(1,"div",6)(2,"div",7)(3,"div",8),Tf(4,"div",9),ph(5,g3,2,1,"div",10)(6,b3,1,1,"div",11),xf()(),ph(7,y3,3,3,"div",12),xf()()),2&e){let e=Yf(3);Vd(5),zh("ngIf",e.modUnitHeaderText),Vd(),zh("ngIf","headerwithsubtext"==e.modUnitTextPlateRequired),Vd(),zh("ngIf",e.modUnitImageCTA&&e.modUnitImagePath)}}function w3(e,t){if(1&e&&(Ef(0),kf(1,"div"),ph(2,m3,2,7,"a",1)(3,v3,8,3,"div",2),xf(),Df()),2&e){let e=Yf(2);Vd(),df("",e.modUnitImageRatio," mod-unit"),Vd(),zh("ngIf",e.modUnitImage),Vd(),zh("ngIf","none"!=e.modUnitTextPlateRequired)}}function _3(e,t){if(1&e&&(kf(0,"a",3)(1,"picture"),Tf(2,"source",23)(3,"img",4),xf()()),2&e){let e=Yf(3);Jf("href",e.instantAllocationImageCTA,id),Jf("target",e.instantAllocationOpenNewPage),Vd(2),Zf("media","(max-width: ",e.tablet,")"),Xf("srcset","",e.instantAllocationMobileImage,"?$",e.modUnitImagePreset,"$&defaultImage=Not_Available"),Vd(),Xf("src","",e.instantAllocationDesktopImage,"?$",e.modUnitImagePreset,"$&defaultImage=Not_Available",id),Jf("alt",e.instantAllocationAltText)}}function S3(e,t){if(1&e&&(Ef(0),kf(1,"div"),ph(2,_3,4,11,"a",1),Tf(3,"div",18)(4,"h2",19),kf(5,"div",20)(6,"div",21),Tf(7,"coupon-item",22),xf()()(),Df()),2&e){let e=Yf(2);Vd(),df("",e.modUnitImageRatio," instant-allocation-mod-unit"),Vd(),zh("ngIf",e.instantAllocationDesktopImage),Vd(),zh("innerHTML",e.instantAllocationWelcomeText,ed),Vd(),zh("innerHTML",e.instantAllocationWelcomeTextMobile,ed),Vd(3),zh("data",e.coupon)}}function C3(e,t){if(1&e&&(Ef(0),ph(1,w3,4,5,"ng-container",0)(2,S3,8,7,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf",!e.instantAlloc&&e.bannerVisible),Vd(),zh("ngIf",e.instantAlloc&&e.offerBannerVisible)}}var I3=(()=>{class e{constructor(e,t,i,n){this.elementRef=e,this.appConfigService=i,this._j4uService=n,this.modUnitImage="",this.modUnitImageRatio="",this.modUnitImagePath="",this.modUnitImageCTA="",this.modUnitTextPlateRequired="",this.modUnitHeaderText="",this.modUnitSubText="",this.modUnitImagePreset="",this.modUnitImageAltText="",this.instantAllocationDesktopImage="",this.instantAllocationMobileImage="",this.instantAllocationAltText="",this.instantAllocationImageCTA="",this.instantAllocationWelcomeText="",this.instantAllocationWelcomeTextMobile="",this.isCDPage=!1,this.instantOfferAvailable=!1,this.instantAlloc=!1,this.tablet="768px",this.bannerVisible=!0,this.offerBannerVisible=!0,window.modUnitCompRef={zone:t,component:this},this.modUnitImage=this.elementRef.nativeElement.getAttribute("data-image")?this.elementRef.nativeElement.getAttribute("data-image"):"",this.modUnitEnableGAM=this.elementRef.nativeElement.getAttribute("data-enable-gam")?this.elementRef.nativeElement.getAttribute("data-enable-gam"):"",this.modUnitImageRatio=this.elementRef.nativeElement.getAttribute("data-image-ratio")?this.elementRef.nativeElement.getAttribute("data-image-ratio"):"",this.modUnitImagePath=this.elementRef.nativeElement.getAttribute("data-image-path")?this.elementRef.nativeElement.getAttribute("data-image-path"):"",this.modUnitImageCTA=this.elementRef.nativeElement.getAttribute("data-CTA-label")?this.elementRef.nativeElement.getAttribute("data-CTA-label"):"",this.modUnitTextPlateRequired=this.elementRef.nativeElement.getAttribute("data-text-plate-required")?this.elementRef.nativeElement.getAttribute("data-text-plate-required"):"",this.modUnitHeaderText=this.elementRef.nativeElement.getAttribute("data-header-text")?this.elementRef.nativeElement.getAttribute("data-header-text"):"",this.modUnitSubText=this.elementRef.nativeElement.getAttribute("data-sub-text")?this.elementRef.nativeElement.getAttribute("data-sub-text"):"",this.modUnitImagePreset=this.elementRef.nativeElement.getAttribute("data-image-preset")?this.elementRef.nativeElement.getAttribute("data-image-preset"):"",this.modUnitImageAltText=this.elementRef.nativeElement.getAttribute("data-image-alt-text")?this.elementRef.nativeElement.getAttribute("data-image-alt-text"):"",this.modUnitOpenNewPage=this.elementRef.nativeElement.getAttribute("data-open-new-page")?this.elementRef.nativeElement.getAttribute("data-open-new-page"):"",this.instantAllocationDesktopImage=this.elementRef.nativeElement.getAttribute("data-instant-allocation-desktop-image")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-desktop-image"):"",this.instantAllocationMobileImage=this.elementRef.nativeElement.getAttribute("data-instant-allocation-mobile-image")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-mobile-image"):"",this.instantAllocationAltText=this.elementRef.nativeElement.getAttribute("data-instant-allocation-alt-text")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-alt-text"):"",this.instantAllocationImageCTA=this.elementRef.nativeElement.getAttribute("data-instant-allocation-CTA")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-CTA"):"",this.instantAllocationOpenNewPage=this.elementRef.nativeElement.getAttribute("data-instant-allocation-open-new-page")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-open-new-page"):"",this.instantAllocationWelcomeText=this.elementRef.nativeElement.getAttribute("data-instant-allocation-welcome-text")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-welcome-text"):"",this.instantAllocationWelcomeTextMobile=this.elementRef.nativeElement.getAttribute("data-instant-allocation-welcome-text-mobile")?this.elementRef.nativeElement.getAttribute("data-instant-allocation-welcome-text-mobile"):"",this.bannerVisible=!this.elementRef.nativeElement.getAttribute("data-banner-visible")||"true"==this.elementRef.nativeElement.getAttribute("data-banner-visible"),this.offerBannerVisible=!this.elementRef.nativeElement.getAttribute("data-offer-banner-visible")||"true"==this.elementRef.nativeElement.getAttribute("data-offer-banner-visible")}ngOnInit(){window.AB.COMMON.authorize()&&this._j4uService.listenCompanionGalleryOfferPOST$.subscribe((e=>{e&&e.length>0&&"U"==e[0]?.status&&(this.coupon=e[0])}))}loadModUnit(){this.instantOfferAvailable&&(this.instantAlloc=!0,JSON.parse(localStorage.getItem("instant_allocation"))||($("#instant-allocation-modal").modal({show:!0}),localStorage.setItem("instant_allocation","true"),window.AB.DATALAYER&&window.AB.DATALAYER.setModalViewEvents("welcome-modal|view")))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Tl),$d(hP),$d(PD))}}static{this.ɵcmp=Qr({type:e,selectors:[["dynamic-mod-unit"]],decls:1,vars:1,consts:[[4,"ngIf"],["tabindex","0","role","link",3,"href","target",4,"ngIf"],["class","text-plate-container align-center",4,"ngIf"],["tabindex","0","role","link",3,"href","target"],[1,"img-content","ab-lazy",3,"src","alt"],[1,"text-plate-container","align-center"],[1,"text-plate"],[1,"text-plate-content"],[1,"main-content"],[1,"eyebrow"],["class","headline",4,"ngIf"],["class","sub-copy rte",3,"innerHTML",4,"ngIf"],["class","cta",4,"ngIf"],[1,"headline"],[3,"innerHTML"],[1,"sub-copy","rte",3,"innerHTML"],[1,"cta"],["tabindex","0","role","link",1,"btn","btn-default","border-black",3,"href","target"],[1,"welcome-text",3,"innerHTML"],[1,"welcome-text-mobile",3,"innerHTML"],[1,"text-plate-container","instant-allocation","align-center"],[1,"coupon-grid-container"],[1,"col-lg-12","col-md-8","col-sm-12","col-xs-12","coupon-grid-offer",3,"data"],[3,"media","srcset"]],template:function(e,t){1&e&&ph(0,C3,3,2,"ng-container",0),2&e&&zh("ngIf",t.modUnitImage&&(t.bannerVisible||t.offerBannerVisible))},dependencies:[cy,f3],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),A3=function(e){return e.Success="Success",e.Error="Error",e.Warning="Warning",e.Info="Info",e}(A3||{});function k3(){return window}
1var x3=(()=>{class e{constructor(e){this._http=e}checkEnrolledStatus(e){let t={headers:new jy(k3().AB.ucaHttpOptionsLoyaltyPartners)},i=k3().AB.loyaltyPartnerPath.replace("{uuid}",e);return this._http.get(i,t).pipe(bi((e=>e)),$i(this.handleError))}enrollUser(){let e=k3().AB.userInfo.UUID,t={headers:new jy(k3().AB.ucaHttpOptionsLoyaltyPartners)},i={loyaltyPartners:[{name:"PetRxCard",planNumber:e}]},n=k3().AB.loyaltyPartnerPath.replace("{uuid}",e);return this._http.post(n,i,t).pipe(bi((e=>e)),$i(this.handleError))}removeEnrolledUser(){let e=k3().AB.userInfo.UUID,t={headers:new jy(k3().AB.ucaHttpOptionsLoyaltyPartners)},i={loyaltyPartners:[{name:"PetRxCard",planNumber:e,status:"InActive"}]},n=k3().AB.loyaltyPartnerPath.replace("{uuid}",e);return this._http.post(n,i,t).pipe(bi((e=>e)),$i(this.handleError))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error){return console.error(`status: ${e.status}, ${e.statusText}`),mi(e.error.code&&e.error.message?e.error.code:e.status)}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),T3=(e,t,i)=>({"popup--toaster--ppms":e,"popup--toaster":t,"qsc-popup":i}),P3=e=>({top:e});function E3(e,t){1&e&&(Ef(0),Tf(1,"span",8),Df())}function D3(e,t){1&e&&(Ef(0),Tf(1,"span",9),Df())}function O3(e,t){1&e&&(Ef(0),Tf(1,"span",10),Df())}function B3(e,t){1&e&&(Ef(0),Tf(1,"span",11),Df())}function M3(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",12),jf("click",(function(){return Wa(e),Ha(Yf().interactiveElementEvent())}))("keyup.Enter",(function(){return Wa(e),Ha(Yf().interactiveElementEvent())})),am(2),xf(),Df()}if(2&e){let e=Yf();Vd(2),lm(e.data.interactiveElement)}}var R3=(()=>{class e{constructor(e,t){this.elementRef=e,this._appConfigService=t,this.isOpen=!1,this.closeToaster=new _l,this.toasterTypeEnum=A3}ngOnInit(){setTimeout((function(){$("#toasterMessagev2").focus()}),200)}onMouseUp(e){this.isOpen&&!this.elementRef.nativeElement.contains(e.target)&&this.closeToasterEvent()}closeToasterEvent(){this.closeToaster.emit({})}interactiveElementEvent(){this.closeToasterEvent(),this._appConfigService._toasterInteractiveElement.next(!0)}rollBackFocusClose(){$("#toasterTextBtn").focus()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(hP))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-toaster"]],hostBindings:function(e,t){1&e&&jf("click",(function(e){return t.onMouseUp(e)}),0,ld)},inputs:{data:"data",options:"options",isOpen:"isOpen"},outputs:{closeToaster:"closeToaster"},decls:14,vars:17,consts:[["role","alert",1,"popup","popup-dark",3,"ngClass","ngStyle"],[1,"popup__content",3,"ngClass"],[1,"popup__content__icon"],[4,"ngIf"],["id","toasterDescription",1,"sr-only"],["role","alert","id","toasterMessagev2","aria-live","polite",1,"popup__content__text","body-text-xs"],["id","toasterCloseBtnv2","aria-label","Close button","aria-describedby","toasterDescription",1,"close-toaster-btn","popup__close-btn",3,"click","keydown"],[1,"svg-icon","svg-close-white"],[1,"svg-icon","svg-success-filled"],[1,"svg-icon","svg-warning-filled"],[1,"svg-icon","svg-error-filled"],[1,"svg-icon","svg-info-filled"],[1,"popup__content__text__interactive-btn",3,"click","keyup.Enter"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2),ph(3,E3,2,0,"ng-container",3)(4,D3,2,0,"ng-container",3)(5,O3,2,0,"ng-container",3)(6,B3,2,0,"ng-container",3),xf(),kf(7,"span",4),am(8),xf(),kf(9,"div",5),am(10),ph(11,M3,3,1,"ng-container",3),xf(),kf(12,"button",6),jf("click",(function(){return t.closeToasterEvent()}))("keydown",(function(){return t.closeToasterEvent()})),Tf(13,"span",7),xf()()()),2&e&&(zh("ngClass",Mm(11,T3,"ppms"==(null==t.data?null:t.data.calledBy),"ppms"!=(null==t.data?null:t.data.calledBy),null==t.data?null:t.data.isQscAddAll))("ngStyle",Om(15,P3,"quantity-stepper-v3"===(null==t.data?null:t.data.calledBy)||null!=t.data&&t.data.isQscAddAll?null==t.options?null:t.options.top:"")),Vd(),zh("ngClass",null!=t.data&&t.data.isQscAddAll?"qsc-popup__content":""),Vd(2),zh("ngIf",(null==t.data?null:t.data.type)==t.toasterTypeEnum.Success),Vd(),zh("ngIf",(null==t.data?null:t.data.type)==t.toasterTypeEnum.Warning),Vd(),zh("ngIf",(null==t.data?null:t.data.type)==t.toasterTypeEnum.Error),Vd(),zh("ngIf",(null==t.data?null:t.data.type)==t.toasterTypeEnum.Info),Vd(2),dm(" ",null==t.data?null:t.data.message,", ",t.data.interactiveElement," "),Vd(2),cm(" ",null==t.data?null:t.data.message," "),Vd(),zh("ngIf",null==t.data?null:t.data.interactiveElement))},dependencies:[sy,cy,gy],encapsulation:2})}}return e})(),L3=(()=>{class e{constructor(e,t,i){this.componentFactoryResolver=e,this.appRef=t,this.injector=i}show(e,t={top:"8vh"},i=()=>{}
1){let n=this.componentFactoryResolver.resolveComponentFactory(R3).create(this.injector),r=e.autoCloseTime||0;n.instance.data=e,n.instance.options=t;let s=$(e.prevIdToFocus);setTimeout((()=>{n.instance.isOpen=!0,(e.isSnsCheckbox||e.isQscAddAll)&&setTimeout((()=>$(".close-toaster-btn").focus()),0)})),r&&setTimeout((()=>{n.instance.isOpen=!1,this.appRef.detachView(n.hostView),i(),e.isSnsCheckbox&&setTimeout((()=>s.focus()),0),n.destroy()}),r),n.instance.closeToaster.subscribe((t=>{this.appRef.detachView(n.hostView),i(),e.isSnsCheckbox&&setTimeout((()=>s.focus()),0),n.destroy()})),this.appRef.attachView(n.hostView);let a=n.hostView.rootNodes[0];document.body.appendChild(a)}static{this.ɵfac=function(t){return new(t||e)(lr(lp),lr(sg),lr(fl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),F3=(()=>{class e{constructor(e,t,i){this._http=e,this._appConfigService=t,this._commonService=i,this.AB=window.AB}getOfferDetailData(e,t){let i=this.AB.userInfo.branchId,n=`${this.AB.offerDetailxAPIPath}?offerId=${e}&storeId=${i}&offerPgm=${t}&includeUpc=y`,r=this.AB.ecomOfferDetailxAPIHttpOptions,{"X-SWY-APPLICATION-TYPE":s}=r,a=g(r,["X-SWY-APPLICATION-TYPE"]);if(this.AB.allowWiremockService){let e=this._appConfigService.getParams("mode"),t=window.SWY?.CONFIGSERVICE?.wcaxXapiConfig?.["wcax.xapi.apim.key"];"playback"===e?(n=`${this.AB.wiremockPlaybackBaseUrl}${n}`,a["Ocp-Apim-Subscription-Key"]=t):"record"===e&&(n=`${this.AB.wiremockRecorderBaseUrl}${n}`,a["Ocp-Apim-Subscription-Key"]=t)}let o={headers:new jy(a)};return this._http.get(n,o).pipe(bi((e=>(this._appConfigService.upcs.next(e.upcList),this._commonService.upcs.next(e.upcList),e))),$i((()=>(this._appConfigService.upcs.next([]),this._commonService.upcs.next([]),fi({})))))}getOfferDisclaimerTemplate(e){return this._http.get(e,{responseType:"text"})}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function N3(){return window}var U3=(()=>{class e{constructor(e){this._http=e}getCustomerType(e){let t=N3().AB.COMMON.ucaAPIPathWithCustomerId(N3().AB.getprofileAddressPath),i=N3().AB.ucaHttpOptionsGetProfileV2,n=new Ky;return n=n.append("fl","HOUSEHOLD"),n=n.append("hhSubs","true"),this._http.get(t,{headers:i,params:n}).pipe(bi((t=>this.processUCAProfile(t,e))),$i(this.handleError))}processUCAProfile(e,t){let i={firstName:"",lastName:"",email:"",optin:!1,subscriptionValue:"",effectiveTimePeriods:{},profileErrorMsg:"",phones:[]};if(e){let n=e.householdAccount&&e.householdAccount.householdProgramSubscriptions&&e.householdAccount.householdProgramSubscriptions.filter((e=>"ACTIVE"===e.status&&e.name===t));n&&1===n.length&&(i.subscriptionValue=n[0].value||"",i.effectiveTimePeriods=n[0].effectiveTimePeriods||{},i.optin="ACTIVE"===n[0].status&&n[0].name===t),e.profile&&e.profile.personalInfo&&e.profile.personalInfo.name&&(i.firstName=e.profile.personalInfo.name.firstName||"",i.lastName=e.profile.personalInfo.name.lastName||""),i.email=e.profile&&e.profile.emails&&e.profile.emails.length&&e.profile.emails[0].text?e.profile.emails[0].text:"",i.profileErrorMsg=e.errors&&e.errors.length&&e.errors[0].message||"",i.phones=e.profile.phones}return i}saveOptinWithEarnGamePlay(e){let t=window.AB.gamePlayHttpOptions,i=window.AB.ocgp.endpoint;t["client-name"]="webui";let n=e,r={headers:t};return this._http.post(i,n,r).pipe(bi((e=>e)),$i(this.handleGameplayError))}getEsffOverrideFlag(e){let t=window.AB.esff.endpoint,i=window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO")||"",n="";if(""!==i)try{n=JSON.parse(i).uuid}catch(e){console.warn(e,"getEsffOverrideFlag")}let r={headers:new jy({"content-type":"application/json",accept:"application/json","ocp-apim-subscription-key":window.AB.esff.apimKey})},s={appCode:"ocgp",version:"1.0",attributes:{env:window.SWY.CONFIGSERVICE.env,uuid:n,client:"web"}};return this._http.post(t,s,r).pipe(bi((e=>e)),$i(this.handleError))}handleGameplayError(e){if(!(e.error instanceof ErrorEvent)&&e.error){let t="Apologies, our site is currently experiencing technical difficulties, please try again later.";switch(e.status){case 401:t=e.error.message?e.error.message:"Invalid authorization";break;case 403:t=e.error.message?e.error.message:t;break;case 400:t=e.error.errors&&e.error.errors.length?e.error.errors:e.error.serviceErrors&&e.error.serviceErrors.length?e.error.serviceErrors:t;break;case 503:case 500:t=e.error.serviceErrors&&e.error.serviceErrors.length?e.error.serviceErrors[0].message:t;break;default:t="Apologies, our site is currently experiencing technical difficulties, please try again later."}return mi(t)}}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error)return mi("Apologies, our site is currently experiencing technical difficulties, please try again later.")}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),V3=(y(C()),y(C()),y(C()),(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[U3],imports:[Ly,uC,s$.forRoot(),LK.forRoot()]})}}return e})()),q3=(()=>{class e{constructor(e,t,i,n){this._http=e,this._sortService=t,this._appConfigService=i,this._featureFlagService=n,this.AB=window.AB,this.isWeeklyAdPznActive=!1,this.imagePath=this.AB.dMTProductCard,this.selectedFiltersListSource=new Tt([]),this.selectedFiltersList=this.selectedFiltersListSource.asObservable(),this.initialOffersSource=new Tt([]),this.offersSource=new Tt([]),this.categoriesSource=new Tt([]),this.getInitialOffersData=this.initialOffersSource.asObservable(),this.getOffersData=this.offersSource.asObservable(),this.getCategories=this.categoriesSource.asObservable(),this.sortByValue=new Tt("
1categoryId"),this.getSortByValue=this.sortByValue.asObservable(),this.showPicturesForPrint=new Tt(!0),this.getShowPicturesValForPrint=this.showPicturesForPrint.asObservable(),this.isWeeklyAdPznActive=this._featureFlagService.isWeeklyAdPznEnable()}getData(){this.currentTimeInMilliseconds=Date.now();let e=this.AB.j4uHttpOptions11;return this.isWeeklyAdPznActive&&(delete e["X-SWY_VERSION"],e["X-Swy_version"]="4.0"),e={headers:new jy(e)},this._http.get(this.AB.myListPath+"?storeId="+this.AB.userInfo.j4u.storeId+"&_ws_as_ff=y&"+this.currentTimeInMilliseconds,e)}getOffers(e){let t="B"===this.AB.userInfo.siteType?this.AB.htmlOfferDetailPathB2b:this._appConfigService.getCouponDetailPathWww(),i=e.shoppingLists[0].items;return i&&(i=i.map((e=>{let i;if("GR"===e.itemType?(i="/rewards/point-reward-details?myList=true",e.detailPath=i+"&rewardId="+e.referenceId+"&rewardOfferType="+e.itemType):(i=t,e.detailPath=i+"."+e.referenceId,e.offerTs?e.detailPath+="."+e.offerTs:e.detailPath+="."+Date.now(),e.detailPath+="."+e.itemType,e.detailPath+=".html"),"FF"===e.itemType){let t=e.description.replace(/(<([^>]+)>)/gi,"").split("%3F");e.description=t[0]}return e.longTitle=e.summary?e.title+" "+e.summary:e.title,e.savings="WS"==e.itemType?e.wssalePrice:e.savingsValue,e.imageUrl="WS"==e.itemType?e.image:this.getImageUrl(e.image),"CMS"===e.offerProtoType&&(e.imageUrl=this.getImageUrl(e.image)),e}))),i}getImageUrl(e){let t=this.imagePath||"//images.albertsons-media.com/is/image/ABS/${product.id}?$ecom-product-card-${viewport}-jpg$&defaultImage=Not_Available";return t?t.replace("${product.id}",e).replace("${viewport}","mobile"):""}getFilters(e){return e.shoppingLists[0].hierarchies.categories}sortFilters(e){let t=(e=e.sort(((e,t)=>e.name<t.name?-1:e.name>t.name?1:0))).filter((e=>"Special Offers"===e.name)),i=e.filter((e=>"Special Offers"!==e.name));return t.length>0&&(e=[...t,...i]),e}setSelectedFiltersList(e){this.selectedFiltersListSource.next(e)}filteringOffers(e,t){return t.length>0&&(e=e.filter((e=>t.includes(Number(e.categoryId))))),e}setInitialOffersData(e){this.initialOffersSource.next(e)}setOffersData(e){this.offersSource.next(e)}setCategories(e){this.categoriesSource.next(e)}setSortByValue(e){this.sortByValue.next(e)}setShowPicturesValForPrint(e){this.showPicturesForPrint.next(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(fF),lr(hP),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function $3(){return window}var j3=(()=>{class e{constructor(e){this._http=e}getPetList(){let e={headers:new jy($3().AB.petProfile)},t=$3().AB.getAllPetProfilesPath;return this._http.get(t,e).pipe(bi((e=>e)),$i(this.handleError))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error){return console.error(`status: ${e.status}, ${e.statusText}`),mi(e.error.code&&e.error.message?e.error.code:e.status)}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function z3(){return window}var W3=(()=>{class e{constructor(e){this._http=e}getPetRxData(){let e=`${window.location.origin}/content/experience-fragments/xf/speciality-programs/petrx-profile/master.caas.json`;return window.location.origin.includes("www-local-origin")&&(e=`${window.location.origin}/content/experience-fragments/xf/speciality-programs/petrx-profile/master.model.json`),this._http.get(e).pipe(bi((e=>e)),$i(this.handleError))}getPetDataByPetId(e){let t=z3().AB.findPetProfilePath.replace("{petId}",parseInt(e)),i={headers:new jy(z3().AB.petProfile)};return this._http.get(t,i).pipe(bi((e=>e)),$i(this.handleError))}addPetProfile(e,t){let i={headers:new jy(z3().AB.petProfile)},n=z3().AB.postPutDeletePetProfilePath;return t?this._http.post(n,e,i).pipe(bi((e=>e)),$i(this.handleError)):this._http.put(n,e,i).pipe(bi((e=>e)),$i(this.handleError))}deletePetProfile(e){let t={headers:new jy(z3().AB.petProfile),body:e},i=z3().AB.postPutDeletePetProfilePath;return this._http.delete(i,t).pipe(bi((e=>e)),$i(this.handleError))}handleError(e){if(!(e.error instanceof ErrorEvent)&&e.error){return console.error(`status: ${e.status}, ${e.statusText}`),mi(e.error.code&&e.error.message?e.error.code:e.status)}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),H3="deals-module-mkt-card";function Y3(e){return e.split("?")[0]}function G3(...e){for(let t of e)if("string"==typeof t&&t.trim())return t.trim();return null}function K3(e=window?.innerWidth??1024){return e<768?"mobile":e<1024?"tablet":"desktop"}function Q3(e,t){return`${Y3(e)}?$${H3}-${t}$`}function J3(e){if(!e)return null;let t=e.webCtaProps?h({},e.webCtaProps):void 0,i=t;return t&&Object.prototype.hasOwnProperty.call(i,"newTab")&&!t.openNewTab&&(t.openNewTab=i.newTab),t&&!t.openNewTab&&(t.openNewTab="false"),f(h({},e),{webCtaProps:t})}
1function Z3(e,t="desktop"){return e?.iconBackgroundImage?function(e,t){return`${Y3(e)}?$${H3}-icon-${t}$`}(e.iconBackgroundImage,t):""}function X3(e){return"true"===e?"_blank":"_self"}function e4(e){return G3(e?.backgroundImgAltText,e?.marketingTileTitle,e?.marketingTileSubtitle,e?.webCtaProps?.ctaText)}var t4=".carousel-coupon-card--marketing, .pds-marketing-card",i4="pds-marketing-card";function n4(e){let t=e;t?.querySelectorAll&&Array.from(t.querySelectorAll(".slick-slide")).forEach((e=>{let t=!!e.querySelector(t4),i=e.classList.contains(i4);t&&!i?e.classList.add(i4):!t&&i&&e.classList.remove(i4)}))}var r4=["nextRedesignButton"],s4=["prevRedesignButton"],a4=e=>({"header-margin-with-ar":e}),o4=e=>({"pds-icon-btn-outlined--primary__icon__disabled":e}),l4=e=>({"pds-marketing-card--left d-flex justify-content-center align-items-stretch w-100":e});function c4(e,t){if(1&e){let e=Mf();kf(0,"div",17)(1,"a",18),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackCouponsViewAll(t))})),kf(2,"span",19),am(3),kf(4,"span",20),am(5),xf()()()()}if(2&e){let e=Yf(3);Vd(),Jf("href",e.couponsCarousel.carouselLinkPath,id),Jf("title",e.couponsCarousel.carouselLinkLabel),Vd(2),cm("",e.couponsCarousel.carouselLinkLabel," "),Vd(2),lm(e.couponsCarousel.carouselTitle)}}function d4(e,t){if(1&e&&(kf(0,"div",13)(1,"div",14)(2,"h2",15),am(3),xf()(),ph(4,c4,6,4,"div",16),xf()),2&e){let e=Yf(2);zh("ngClass",Om(3,a4,e.isArEnable)),Vd(3),lm(e.couponsCarousel.carouselTitle),Vd(),zh("ngIf",e.couponsCarousel.carouselLinkPath)}}function u4(e,t){if(1&e&&(kf(0,"a",30),am(1),kf(2,"span",20),am(3),xf()()),2&e){let e=Yf(3);Jf("href",e.couponsCarousel.carouselLinkPath,id),Jf("title",e.couponsCarousel.carouselLinkLabel),Vd(),cm(" ",e.couponsCarousel.carouselLinkLabel," "),Vd(2),lm(e.couponsCarousel.carouselTitle)}}function p4(e,t){if(1&e){let e=Mf();kf(0,"div",21)(1,"div",22)(2,"span",23),am(3),xf()(),kf(4,"div",24),ph(5,u4,4,4,"a",25),kf(6,"button",26,1),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Previous set of items shown"))}))("click",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Previous set of items shown"))})),Tf(8,"span",27),xf(),kf(9,"button",28,2),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Next set of items shown"))}))("click",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Next set of items shown"))})),Tf(11,"span",29),xf()()()}if(2&e){let e=Yf(2);Vd(2),zh("ngClass","pdp-spa"===e.couponsCarousel.calledBy?"heading-xs":"carousel-nav__header-title"),Vd(),lm(e.couponsCarousel.carouselTitle),Vd(2),zh("ngIf",e.couponsCarousel.carouselLinkPath),Vd(),zh("ngClass",e.showRedesignButtons?"d-flex align-items-center justify-content-center":"d-none")("disabled",e.isPrevButtonDisabled),Vd(2),zh("ngClass",Om(9,o4,e.isPrevButtonDisabled)),Vd(),zh("ngClass",e.showRedesignButtons?"d-flex align-items-center justify-content-center":"d-none")("disabled",e.isNextButtonDisabled),Vd(2),zh("ngClass",Om(11,o4,e.isNextButtonDisabled))}}function h4(e,t){1&e&&(kf(0,"div",31)(1,"div",32)(2,"div",33)(3,"div",34),Tf(4,"div",35),xf()()()())}function f4(e,t){if(1&e&&Tf(0,"a",42),2&e){let e=Yf(3);zh("target",e.marketingCardLinkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.marketingCardTapZoneAriaLabel)}}function m4(e,t){if(1&e&&(kf(0,"div",49),am(1),xf()),2&e){let e=Yf(4);Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.eyebrow," ")}}function g4(e,t){if(1&e&&(kf(0,"div",50)(1,"a",51),am(2),xf()()),2&e){let e=Yf(4);Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),zh("target",e.marketingCardLinkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.marketingCardCtaAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText," ")}}function b4(e,t){if(1&e&&(kf(0,"div",43)(1,"div",44),ph(2,m4,2,3,"div",45),kf(3,"div",46),am(4),xf(),kf(5,"div",47),am(6),xf()(),ph(7,g4,3,6,"div",48),xf()),2&e){let e=Yf(3);Vd(2),zh("ngIf",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.eyebrow),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileTitle," "),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileSubtitle," "),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText))}}
1function y4(e,t){if(1&e&&Tf(0,"img",57),2&e){let e=Yf(4);zh("src",e.marketingCardIconSrc,id)("alt",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.iconImageAltText)}}function v4(e,t){if(1&e&&(kf(0,"a",58),am(1),xf()),2&e){let e=Yf(4);Hh("--cta-color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor)("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),zh("target",e.marketingCardLinkTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink,id)("aria-label",e.marketingCardCtaAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText," ")}}function w4(e,t){if(1&e&&(kf(0,"div",52),ph(1,y4,1,2,"img",53),kf(2,"div",54),am(3),xf(),kf(4,"div",55),am(5),xf(),ph(6,v4,2,8,"a",56),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf","icon"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.badgeSetupType)&&e.marketingCardIconSrc),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileTitle," "),Vd(),Hh("color",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.fontColor),Vd(),cm(" ",null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.marketingTileSubtitle," "),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaText))}}function _4(e,t){if(1&e&&(kf(0,"div",61),am(1),xf()),2&e){let e=Yf(4);gh("aria-label",e.marketingCardDisclaimerAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerText," ")}}function S4(e,t){if(1&e&&(kf(0,"a",62),am(1),xf()),2&e){let e=Yf(4);zh("target",e.marketingCardDisclaimerTarget),gh("href",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink,id)("aria-label",e.marketingCardDisclaimerAriaLabel),Vd(),cm(" ",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerText," ")}}function C4(e,t){if(1&e&&(Ef(0),ph(1,_4,2,2,"div",59)(2,S4,2,4,"a",60),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!(null!=e.normalizedMarketingTile&&null!=e.normalizedMarketingTile.webCtaProps&&e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink)),Vd(),zh("ngIf",null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.disclaimerCtaLink)}}function I4(e,t){if(1&e&&(kf(0,"div",36),ph(1,f4,1,3,"a",37),kf(2,"div",38),ph(3,b4,8,8,"div",39)(4,w4,7,8,"div",40)(5,C4,3,2,"ng-container",41),xf()()),2&e){let e=Yf(2);zh("ngClass",Om(6,l4,e.isMarketingCardLeftAligned)),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.ctaLink)),Vd(),zh("ngStyle",e.marketingCardBackgroundStyles),Vd(),zh("ngIf","imageOnly"!==(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.displayType)&&e.isMarketingCardLeftAligned),Vd(),zh("ngIf","imageOnly"!==(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.displayType)&&!e.isMarketingCardLeftAligned),Vd(),zh("ngIf","true"===(null==e.normalizedMarketingTile?null:e.normalizedMarketingTile.webCtaMarketing)&&"true"===(null==e.normalizedMarketingTile||null==e.normalizedMarketingTile.webCtaProps?null:e.normalizedMarketingTile.webCtaProps.showDisclaimer))}}function A4(e,t){if(1&e){let e=Mf();kf(0,"loyalty-card-al-v1",64),jf("refreshTitleEvent",(function(t){return Wa(e),Ha(Yf(3).refreshTitle(t))}))("refreshSlickCarousel",(function(t){return Wa(e),Ha(Yf(3).refreshSlickCarousel(t))})),xf()}if(2&e){let e=Yf(),t=e.$implicit,i=e.index,n=Yf(2);zh("cardType","coupon")("couponDisplayFormat","carousel")("cardData",t)("cardIndex",i)("filterS
1ource",n.couponsCarousel.carouselFilter)("carouselSection",n.couponsCarousel.carouselTitle)("couponsCarouselItem",n.couponsCarousel)("logoProps",n.logoProps)("isP13nCoupon",n.isP13nCoupon)("isLoyaltyCardCarouselRedesignDisabled",n.isLoyaltyCardCarouselRedesignDisabled)}}function k4(e,t){if(1&e&&(Ef(0),ph(1,A4,1,10,"loyalty-card-al-v1",63),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",e.offerId||e.couponID)}}function x4(e,t){if(1&e&&(kf(0,"div",31),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",e.errorMessage," ")}}function T4(e,t){if(1&e&&(kf(0,"span",65),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",e.adaAnnouncement," ")}}function P4(e,t){if(1&e&&(kf(0,"div",4),ph(1,d4,5,5,"div",5)(2,p4,12,13,"div",6)(3,h4,5,0,"div",7),Ef(4),kf(5,"div",8),ph(6,I4,6,8,"div",9)(7,k4,2,1,"ng-container",10),xf(),Df(),ph(8,x4,2,1,"ng-template",null,0,Wm),Tf(10,"span",11),ph(11,T4,2,1,"span",12),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.isLoyaltyCardCarouselRedesignDisabled),Vd(),zh("ngIf",!e.isLoyaltyCardCarouselRedesignDisabled),Vd(),zh("ngIf",e.showLoading),Vd(3),zh("ngIf",e.shouldRenderMarketingCard),Vd(),zh("ngForOf",e.coupons)("ngForTrackBy",e.trackFn),Vd(4),zh("ngIf",e.isAdaAnnouncementEnabled)}}var E4=(()=>{class e{constructor(e,t,i,n,r,s,a){this.elementRef=e,this._carouselService=t,this._commonService=i,this._utilService=n,this._j4uV1Service=r,this._userInfoService=s,this._aemService=a,this._childComponentsReady=new Tt(!1),this.coupons=[],this.error=!1,this.showLoading=!0,this.showTitle=!1,this.couponsLoaded=!1,this.showBoxtop=!0,this.triggeredComponent=!1,this.isArEnable=!1,this.isLoyaltyCardCarouselRedesignDisabled=!0,this.subscription=new Ye,this.marketingCardSlideObserver=null,this.enableFreeSort=!0,this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1,this.showRedesignButtons=!0,this.isNextButtonDisabled=!1,this.isPrevButtonDisabled=!1,this.marketingTile=null,this.normalizedMarketingTile=null,this.viewportDeviceType=K3();let{branchId:o,preferenceMode:l,j4u:c,zipcode:d,clubCard:u}=window.AB.userInfo,p=f(h({},window.AB.userInfo),{shopStoreId:o,shopZipcode:d,preference:l,clubCardNumber:u,j4uStoreId:c.storeId,j4uZipcode:c.zipcode});this._userInfoService.setUserSession(p)}ngOnInit(){window.AB.arFlagLoaded?this.isArEnable=window.AB.arFlag.display:this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display}))),this.isLoyaltyCardCarouselRedesignDisabled=this._aemService.getFeatureFlagByNameDisable("isLoyaltyCardCarouselRedesignDisabled"),this.wrapper=this.elementRef.nativeElement.parentNode.parentNode,this.couponsCarousel={offers:this.wrapper.getAttribute("data-offers"),calledBy:this.wrapper.getAttribute("data-calledby"),carouselSource:this.wrapper.getAttribute("data-carousel-source"),carouselFilter:this.wrapper.getAttribute("data-carousel-filter"),carouselOfferLimit:this.wrapper.getAttribute("data-carousel-offer-limit"),carouselTitle:this.wrapper.getAttribute("data-carousel-title"),carouselLinkLabel:this.wrapper.getAttribute("data-carousel-link"),carouselLinkPath:this.wrapper.getAttribute("data-carousel-linkPath"),offerCarouselApiBased:"true"===this.wrapper.getAttribute("data-carousel-getlimited-coupons"),upc:$(".product-details-wrapper").attr("data-upc"),errorMessage:this.wrapper.getAttribute("data-carousel-error")||"No coupons available for this product",includePageName:this.wrapper.getAttribute("data-page-title"),odpOfferId:$("offer-detail").attr("data-offerid"),logoSVGCouponCarouseImageEnable:!!this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image-enable")&&"true"==this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image-enable"),logoSVGCouponCarouseImage:this.wrapper.getAttribute("data-coupon-logo-svg-carouse-image"),modelConfigurationId:this.wrapper.getAttribute("data-model-configuration-id")},this._aemService.getFeatureFlagByNameDisable("enableMarketingCardInDealsCarousel")&&(this.viewportDeviceType=K3(),this.marketingTile=function(e){if(!e||"true"!==e.getAttribute("data-mt-includeMarketingTile"))return null;let t=e.getAttribute("data-mt-marketingTileJson");if(!t)return null;try{return J3(JSON.parse(t))}catch(e){return console.error("Unable to parse marketing tile JSON",e),null}}(this.wrapper),this.normalizedMarketingTile=J3(this.marketingTile)),this._utilService.isLSCompatible()&&localStorage.showBoxtop&&(this.showBoxtop=JSON.parse(localStorage.getItem("showBoxtop"))),"p13n"===this.couponsCarousel.carouselFilter&&(this.isP13nCoupon=!0,localStorage.removeItem("p13nCoupons")),window.AB.userInfo.boxTopAuth&&(this.showBoxtop=!1),"j4uGallery"===this.couponsCarousel.carouselFilter?window.AB.COMMON.authorize()?this._commonService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&this._init()})):this._init():(this._init(),this._commonService.shopCouponRefreshSource.subscribe((e=>{e&&"object"==typeof e&&"id"in e&&"deleted"in e&&"status"in e&&(this.couponsCarousel&&(null==this.couponsCarousel.upc||""==this.couponsCarousel.upc)&&(this.couponsCarousel.upc=$(".product-details-wrapper").attr("data-upc")),(null==this.coupons||0==this.coupons.length)&&this._init())}))),this._j4uV1Service.getLogoList().subscribe((e=>this.logoProps=e))}onMarketingCardResize(e){this.viewportDeviceType=K3(e)}get shouldRenderMarketingCard(){return function(e){return!(!e||!e.backgroundImg&&!e.backgroundColor)}(this.normalizedMarketingTile)}
1get marketingCardBackgroundStyles(){return function(e,t="desktop"){if(!e)return{};switch(e.displayType){case"imageOnly":return e.backgroundImg?{"background-image":`url(${Q3(e.backgroundImg,t)})`}:{};case"colorTextPlate":case"transparentTextPlate":return e.backgroundImg?{"background-image":`url(${Q3(e.backgroundImg,t)})`}:e.backgroundColor?{"background-color":e.backgroundColor}:{};default:return{}}}(this.normalizedMarketingTile,this.viewportDeviceType)}get isMarketingCardLeftAligned(){return"left"===this.normalizedMarketingTile?.alignment}get marketingCardLinkTarget(){return X3(this.normalizedMarketingTile?.webCtaProps?.openNewTab)}get marketingCardDisclaimerTarget(){return X3(this.normalizedMarketingTile?.webCtaProps?.disclaimerExternalBrowser)}get marketingCardTapZoneAriaLabel(){return e4(this.normalizedMarketingTile)}get marketingCardCtaAriaLabel(){return function(e){return G3(e?.webCtaProps?.ctaAltText,e?.webCtaProps?.ctaText,e?.marketingTileTitle,e4(e))}(this.normalizedMarketingTile)}get marketingCardDisclaimerAriaLabel(){return function(e){return G3(e?.webCtaProps?.disclaimerAltText,e?.webCtaProps?.disclaimerText,e?.marketingTileTitle)}(this.normalizedMarketingTile)}get marketingCardIconSrc(){return Z3(this.normalizedMarketingTile,this.viewportDeviceType)}_init(){"pdp"===this.couponsCarousel.carouselFilter?this.getCouponsFromProductsByUpc():this.getCouponsFromDataSource()}getCouponsFromProductsByUpc(){"pdp-spa"===this.couponsCarousel.calledBy?this.couponsCarousel.offers?(this.updateCoupons(JSON.parse(this.couponsCarousel.offers)),this.isLoyaltyCardCarouselRedesignDisabled="true"!==this.wrapper.getAttribute("data-pdp-redesign")):window.addEventListener("GetCouponsData",(e=>{this.updateCoupons(e.detail.offers),this.isLoyaltyCardCarouselRedesignDisabled=!e.detail?.flags?.isPdpRedesignEnabled})):this._carouselService.offersData.subscribe((e=>{this.updateCoupons(e)}))}updateCoupons(e){if(Object.keys(e).length>0){let t=[];e&&e.offers&&(Object.keys(e.offers).map((i=>{if(i){let n=e.offers[i];n.offerPgmLabel=this._commonService.getCouponType(i.offerPgm),t.push(n)}})),this.coupons=[...t],this.couponsCarousel.carouselTitle=this._createCarouselTitle(this.coupons),this.coupons=this.coupons.filter((e=>e.isClippable)),this.showLoading=!1,this.coupons.length>0&&this._childComponentsReady.next(!0))}}refreshSlickCarousel(e){if(this.enableFreeSort&&e>=0){if("j4uGallery"!==this.couponsCarousel.carouselFilter&&"p13n"!==this.couponsCarousel.carouselFilter)return;this._carouselService.getData(this.couponsCarousel).subscribe((t=>{this.updateCoupon(t,e)}))}}updateCoupon(e,t){if(null!=e&&e.length>0){let i=this.elementRef.nativeElement;this.coupons=e,this._childComponentsReady.next(!0),setTimeout((()=>{$(i).find("#carousel-coupons").slick("slickGoTo",t)}))}}trackFn(e,t){return e}getCouponsFromDataSource(){null!=this.couponsCarousel.carouselFilter&&this._carouselService.getData(this.couponsCarousel).subscribe((e=>v(this,null,(function*(){if(null!=e&&(e.length>0||Object.keys(e).length)){switch(this.couponsCarousel.carouselFilter){case"pdp":this.couponsCarousel.carouselTitle=this._createCarouselTitle(e),this.coupons=e,this.coupons=this.coupons.filter((e=>e.isClippable));break;case"qualifyingoffers":this.coupons=this._carouselService.getQualifyingOffers(e,this.couponsCarousel.odpOfferId);break;case"aisle":this._aemService.getDisableEcomGalleryApi()?this.coupons=e.offers.map((e=>f(h({},e),{offerPgmLabel:this._commonService.getCouponType(e.offerPgm)}))):this.coupons=e,this.coupons=this.coupons.filter((e=>e.isClippable));break;case"p13n":let t=yield this._commonService.updateViewAllExperimentRoute();this.setP13nDynamicUiFields(t),this.coupons=e;break;case"j4uGallery":this.coupons=e}this.coupons.length>0&&this._childComponentsReady.next(!0)}this.showLoading=!1}))),(e=>{this.coupons=[],this.showLoading=!1}))}setAdaAnnouncement(e){clearTimeout(this.announcementTimeout),this.isAdaAnnouncementEnabled=!0,setTimeout((()=>{this.adaAnnouncement=e}),100),this.announcementTimeout=setTimeout((()=>{this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1}),500)}handleShowingRedesignNavButtons(){this.showRedesignButtons=window.innerWidth>=768&&this.coupons.length>1,this.isNextButtonDisabled=this.nextRedesignButtonRef.nativeElement.classList.contains("slick-disabled"),this.isPrevButtonDisabled=this.prevRedesignButtonRef.nativeElement.classList.contains("slick-disabled")}ngAfterViewInit(){this._childComponentsReady.subscribe((e=>{!0===e&&0!==this.coupons.length&&(this.couponCardChildComponents.length>0?(this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)):this.couponCardChildComponents.changes.subscribe((()=>{this.initSlick(),this._carouselService.setAriaLabelForCouponCarousel(this.elementRef.nativeElement,this.couponsCarousel.carouselTitle)}
1)),window.AB.DATALAYER&&(window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"load"),window.AB.DATALAYER.initSlickArrowTracking(this.wrapper)))}))}initSlick(){let e,t=this.elementRef.nativeElement,i=1,n=2,r=1,s=2,a=3,o=1,l=2,c=2,d=3,u=4,p=2,h=1,f=1,m=[{breakpoint:320,settings:{slidesToShow:i,slidesToScroll:i,dots:!1,arrows:!0}},{breakpoint:695,settings:{slidesToShow:n,slidesToScroll:n,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:r,slidesToScroll:r,dots:!1,arrows:!0}},{breakpoint:920,settings:{slidesToShow:s,slidesToScroll:s,dots:!1,arrows:!0}},{breakpoint:1280,settings:{slidesToShow:a,slidesToScroll:a,dots:!1,arrows:!0}}],g=[{breakpoint:320,settings:{slidesToShow:o,slidesToScroll:o,dots:!1,arrows:!0}},{breakpoint:660,settings:{slidesToShow:l,slidesToScroll:l,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:c,slidesToScroll:c,dots:!1,arrows:!0}},{breakpoint:970,settings:{slidesToShow:d,slidesToScroll:d,dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:u,slidesToScroll:u,dots:!1,arrows:!0}}],b=[{breakpoint:660,settings:{slidesToShow:p,slidesToScroll:p,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:h,slidesToScroll:h,dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:f,slidesToScroll:f,dots:!1,arrows:!0}},{breakpoint:1920,settings:{slidesToShow:f,slidesToScroll:f,dots:!1,arrows:!0}}],y=$("meta[name=template]")?$("meta[name=template]").attr("content"):"";$(t).find("#carousel-coupons").hasClass("slick-initialized")&&($(t).find("#carousel-coupons").slick("unslick"),$(t).find("#carousel-coupons").removeClass("slick-initialized")),$(t).find("#carousel-coupons").not(".slick-initialized").on("init",((e,t)=>{this.isLoyaltyCardCarouselRedesignDisabled||(this.handleShowingRedesignNavButtons(),this._carouselService.slickChanges.next({}))})).slick({lazyLoad:"ondemand",tail:!0,dots:!1,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,nextArrow:this.isLoyaltyCardCarouselRedesignDisabled?'<button aria-label="Go to the next slide" class="slick-next coupons-carousel-module__next-btn"></button>':this.nextRedesignButtonRef.nativeElement,prevArrow:this.isLoyaltyCardCarouselRedesignDisabled?'<button aria-label="Go to the previous slide" class="slick-prev coupons-carousel-module__prev-btn"></button>':this.prevRedesignButtonRef.nativeElement,responsive:"unified-dynamic-l2-page"===y?m:["unified-productdetails-page","nextgen-pdp","product-detail-page"].indexOf(y)>-1||"pdp-spa"===this.couponsCarousel.calledBy?b:g}).on("beforeChange",(function(i,n,r,s){if(0!==s?$("#carousel-coupons .slick-prev").removeClass("mask"):$("#carousel-coupons .slick-prev").addClass("mask"),this.isCarouselRedesignDisabled)if(r<s){let i=Number($(".slick-active",$(t)).last().attr("data-slick-index"))+1,n=$('.slick-list .slick-slide[data-slick-index="'+i+'"] .coupon-carousel-title',$(t));n&&setTimeout((function(){n.eq(0).html(n.eq(0).html()).focus()}),300),e="next"}else{let i=Number($(".slick-active",$(t)).first().attr("data-slick-index"))-1,n=$('.slick-list .slick-slide[data-slick-index="'+i+'"] .coupon-carousel-title',$(t));n&&setTimeout((function(){n.eq(0).html(n.eq(0).html()).focus()}),300),e="prev"}else e=r<s?"next":"prev"})).on("afterChange",(()=>{this.isLoyaltyCardCarouselRedesignDisabled||(this.handleShowingRedesignNavButtons(),this._carouselService.slickChanges.next({})),setTimeout((()=>{switch(e){case"next":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"forward");break;case"prev":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"back")}}),0)})),$("#carousel-coupons .slick-prev").addClass("mask"),this.marketingCardSlideObserver?.disconnect(),this.marketingCardSlideObserver=function(e){if(!e||(n4(e),typeof MutationObserver>"u"))return null;let t=new MutationObserver((()=>{n4(e)}));return t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class"]}),t}(t)}_createCarouselTitle(e){let t=e.filter((e=>e.isClippable)).length,i=e.filter((e=>"C"===e.status)).length;return t>=1?t+" Coupon(s) Available: "+i+" of "+t+" Clipped":"Coupons Carousel"}refreshTitle(e){this.triggeredComponent=!0,"pdp"==this.couponsCarousel.carouselFilter&&(this.couponsCarousel.carouselTitle=this._createCarouselTitle(this.coupons))}trackCouponsViewAll(e){window.AB&&window.AB.DATALAYER&&(window.AB.DATALAYER.isHomePage()&&window.AB.DATALAYER.analyticsCTATracking("cta:home|link|view-all"),e?.target&&(window.AB.DATALAYER.trackP13nViewAll(e?.target),window.AB.DATALAYER.trackAEMZone("link:view-all",e?.target,this.couponsCarousel?.carouselTitle)))}setP13nDynamicUiFields(e){let t=JSON.parse(localStorage.getItem("p13nCoupons"));this.setP13nDynamicUiField(t?.carouselTitle,"carouselTitle"),this.setP13nDynamicUiField(t?.webCtaText,"carouselLinkLabel"),e?this.setP13nDynamicUiField(e,"carouselLinkPath"):this.setP13nDynamicUiField(t?.webCtaLink,"carouselLinkPath")}setP13nDynamicUiField(e,t){e&&this.couponsCarousel.hasOwnProperty(t)&&(this.couponsCarousel[t]=e)}ngOnDestroy(){this.subscription.unsubscribe(),this.marketingCardSlideObserver?.disconnect()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Gw),$d(Bw),$d(Sw),$d(Yw),$d(_w),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["loyalty-card-carousel-al-v1"]],viewQuery:function(e,t){if(1&e&&(tm(r4,5,Vl),tm(s4,5,Vl),tm(a2,5)),2&e){let e;im(e=nm())&&(t.nextRedesignButtonRef=e.first),im(e=nm())&&(t.prevRedesignButtonRef=e.first),im(e=nm())&&(t.couponCardChildComponents=e)}},hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onMarketingCardResize(e.target.innerWidth)}),0,od)},decls:1,vars:1,consts:[["errorTemplate",""],["prevRedesignButton",""],["nextRedesignButton",""],["id","coupons-carousel","class","slick-coupon-carousel carousel-container coupons-carousel slick-coupon-carousel-v2",4,"ngIf"],["id","coupons-carousel",1,"slick-coupon-carousel","carousel-container","coupons-carousel","slick-coupon-carousel-v2"],["class","carousel-header-wrapper",3,"ngClass",4,"ngIf"],["class","carousel-nav d-flex align-items-start py-2",4,"ngIf"],["class","carousel-content-loading",4,"ngIf"],["id","carousel-coupons",1,"coupons"],["class","pds-marketing-card full-height position-relative",3,"ngClass",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["id","couponCarouselSr","aria-live","polite",1,"sr-only"],["role","status","aria-atomic","true","aria-live","assertive","class","sr-only",4,"ngIf"],[1,"carousel-header-wrapper",3,"ngClass"],[1,"carousel-header-text-wrapper"],["tabindex","0",1,"carousel-header-text","m0"],["class","carousel-headers-link-wrapper",4,"ngIf"],[1,"carousel-headers-link-wrapper"],[1,"carousel-header-link",3,"click","href","title"],["id","couponCarouselHeaderLink",1,"carousel-header-link-text"],[1,"sr-only"],[1,"carousel-nav","d-flex","align-items-start","py-2"],[1,"d-flex","flex-column","justify-content-center","align-self-stretch","flex-grow-1"],["role","heading",3,"ngClass"],[1,"d-flex","carousel-nav__controls-wrapper","align-items-center"],["class","link-sm links__action",3,"href","title",4,"ngIf"],["aria-label","View previous items",1,"carousel-nav__btn-prev","slick-redesign-prev","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-outlined--primary",3,"keyup.enter","click","ngClass","disabled"],[1,"pds-svg-chevron-left-small","pds-icon-btn-outlined--primary__icon",3,"ngClass"],["aria-label","View next items",1,"slick-redesign-next","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-outlined--primary",3,"keyup.enter","click","ngClass","disabled"],[1,"pds-svg-chevron-right-small","pds-icon-btn-outlined--primary__icon",3,"ngClass"],[1,"link-sm","links__action",3,"href","title"],[1,"carousel-content-loading"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"pds-marketing-card","full-height","position-relative",3,"ngClass"],["class","w-100 h-100 position-absolute pc__tap-zone coupon-carousel-title",3,"target",4,"ngIf"],[1,"pds-marketing-card__background","full-height",3,"ngStyle"],["class","pds-marketing-card__text-plate d-flex flex-column justify-content-end align-items-start w-100",4,"ngIf"],["class","pds-marketing-card__text-plate",4,"ngIf"],[4,"ngIf"],[1,"w-100","h-100","position-absolute","pc__tap-zone","coupon-carousel-title",3,"target"],[1,"pds-marketing-card__text-plate","d-flex","flex-column","justify-content-end","align-items-start","w-100"],[1,"pds-marketing-card__text","d-flex","flex-column","align-items-start"],["class","pds-marketing-card__eyebrow eyebrow-m text-start",3,"color",4,"ngIf"],[1,"pds-marketing-card__heading-left","heading-xxs","text-start"],[1,"pds-marketing-card__desc-left","text-s","text-start","mt-0"],["class","pds-marketing-card__pds-link d-flex align-items-start",4,"ngIf"],[1,"pds-marketing-card__eyebrow","eyebrow-m","text-start"],[1,"pds-marketing-card__pds-link","d-flex","align-items-start"],[1,"pds-marketing-card__action-link","link-s","align-self-start",3,"target"],[1,"pds-marketing-card__text-plate"],["class","pds-marketing-card__image",3,"src","alt",4,"ngIf"],[1,"pds-marketing-card__heading","poppins"],[1,"pds-marketing-card__desc","nunito-sans"],["class","pds-marketing-card__button pds-btn pds-btn-size__small pds-btn-outlined--neutral d-flex align-items-center justify-content-center","role","button",3,"--cta-color","color","target",4,"ngIf"],[1,"pds-marketing-card__image",3,"src","alt"],["role","button",1,"pds-marketing-card__button","pds-btn","pds-btn-size__small","pds-btn-outlined--neutral","d-flex","align-items-center","justify-content-center",3,"target"],["class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent","tabindex","0",4,"ngIf"],["class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent pds-tag-interactive","role","button",3,"target",4,"ngIf"],["tabindex","0",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent"],["role","button",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent","pds-tag-interactive",3,"target"],["class","carousel-coupon-card",3,"cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","logoProps","isP13nCoupon","isLoyaltyCardCarouselRedesignDisabled","refreshTitleEvent","refreshSlickCarousel",4,"ngIf"],[1,"carousel-coupon-card",3,"refreshTitleEvent","refreshSlickCarousel","cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","logoProps","isP13nCoupon","isLoyaltyCardCarouselRedesignDisabled"],["role","status","aria-atomic","true","aria-live","assertive",1,"sr-only"]],template:function(e,t){1&e&&ph(0,P4,12,7,"div",3),2&e&&zh("ngIf",t.coupons.length>0)},dependencies:[sy,oy,cy,gy,a2],styles:[".pds-marketing-card[_ngcontent-%COMP%]{height:232px;max-height:232px;min-height:232px;padding-left:0;width:100%}.pds-marketing-card__background[_ngcontent-%COMP%], .pds-marketing-card--left[_ngcontent-%COMP%] .pds-marketing-card__background[_ngcontent-%COMP%]{align-items:center;background-position:center;background-repeat:no-repeat;background-size:cover;display:flex;flex-direction:column;height:232px;justify-content:center;max-height:232px;min-height:232px;position:relative;width:100%}.pds-marketing-card--left[_ngcontent-%COMP%] .pds-marketing-card__text-plate[_ngcontent-%COMP%]{height:192px}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]{z-index:1}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]:focus{outline-offset:-3px}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:hover{border:1px solid var(--cta-color, #1f1e1e)!important;text-decoration:none!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:focus{outline:2px solid var(--cta-color, #535250)!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag[_ngcontent-%COMP%]{z-index:5}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%]:hover{text-decoration:underline!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__action-link[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__action-link[_ngcontent-%COMP%]:hover{text-decoration-style:solid}"]})}}return e})(),D4=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,o2]})}}return e})(),O4=(()=>{class e{static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[l2,S2,dP,PD,gP,I2,x3,q3,j3,W3,lJ,TD,A2,Ev(Ov())],imports:[V3,uw,uC,Yz,pC,iW.forRoot(),_Z.forRoot(),S1,o2,M2,i_,D4,N2]})}}return e})(),B4="primary",M4=Symbol("RouteTitle"),R4=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function L4(e){return new R4(e)}
1function F4(e,t,i){let n=i.path.split("/");if(n.length>e.length||"full"===i.pathMatch&&(t.hasChildren()||n.length<e.length))return null;let r={};for(let t=0;t<n.length;t++){let i=n[t],s=e[t];if(":"===i[0])r[i.substring(1)]=s;else if(i!==s.path)return null}return{consumed:e.slice(0,n.length),posParams:r}}function N4(e,t){let i,n=e?U4(e):void 0,r=t?U4(t):void 0;if(!n||!r||n.length!=r.length)return!1;for(let r=0;r<n.length;r++)if(i=n[r],!V4(e[i],t[i]))return!1;return!0}function U4(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e)]}function V4(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;let i=[...e].sort(),n=[...t].sort();return i.every(((e,t)=>n[t]===e))}return e===t}function q4(e){return e.length>0?e[e.length-1]:null}function $4(e){return function(e){return!!e&&(e instanceof gt||je(e.lift)&&je(e.subscribe))}(e)?e:Zm(e)?hi(Promise.resolve(e)):fi(e)}var j4={exact:function e(t,i,n){if(!Z4(t.segments,i.segments)||!G4(t.segments,i.segments,n)||t.numberOfChildren!==i.numberOfChildren)return!1;for(let r in i.children)if(!t.children[r]||!e(t.children[r],i.children[r],n))return!1;return!0},subset:H4},z4={exact:function(e,t){return N4(e,t)},subset:function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every((i=>V4(e[i],t[i])))},ignored:()=>!0};function W4(e,t,i){return j4[i.paths](e.root,t.root,i.matrixParams)&&z4[i.queryParams](e.queryParams,t.queryParams)&&!("exact"===i.fragment&&e.fragment!==t.fragment)}function H4(e,t,i){return Y4(e,t,t.segments,i)}function Y4(e,t,i,n){if(e.segments.length>i.length){let r=e.segments.slice(0,i.length);return!(!Z4(r,i)||t.hasChildren()||!G4(r,i,n))}if(e.segments.length===i.length){if(!Z4(e.segments,i)||!G4(e.segments,i,n))return!1;for(let i in t.children)if(!e.children[i]||!H4(e.children[i],t.children[i],n))return!1;return!0}{let r=i.slice(0,e.segments.length),s=i.slice(e.segments.length);return!!(Z4(e.segments,r)&&G4(e.segments,r,n)&&e.children[B4])&&Y4(e.children[B4],t,s,n)}}function G4(e,t,i){return t.every(((t,n)=>z4[i](e[n].parameters,t.parameters)))}var K4=class{constructor(e=new Q4([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap??=L4(this.queryParams),this._queryParamMap}toString(){return t5.serialize(this)}},Q4=class{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Object.values(t).forEach((e=>e.parent=this))}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return i5(this)}},J4=class{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=L4(this.parameters),this._parameterMap}toString(){return c5(this)}};function Z4(e,t){return e.length===t.length&&e.every(((e,i)=>e.path===t[i].path))}var X4=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>new e5,providedIn:"root"})}}return e})(),e5=class{parse(e){let t=new m5(e);return new K4(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${n5(e.root,!0)}`,i=function(e){let t=Object.entries(e).map((([e,t])=>Array.isArray(t)?t.map((t=>`${s5(e)}=${s5(t)}`)).join("&"):`${s5(e)}=${s5(t)}`)).filter((e=>e));return t.length?`?${t.join("&")}`:""}(e.queryParams),n="string"==typeof e.fragment?`#${function(e){return encodeURI(e)}(e.fragment)}`:"";return`${t}${i}${n}`}},t5=new e5;function i5(e){return e.segments.map((e=>c5(e))).join("/")}function n5(e,t){if(!e.hasChildren())return i5(e);if(t){let t=e.children[B4]?n5(e.children[B4],!1):"",i=[];return Object.entries(e.children).forEach((([e,t])=>{e!==B4&&i.push(`${e}:${n5(t,!1)}`)})),i.length>0?`${t}(${i.join("//")})`:t}{let t=function(e,t){let i=[];return Object.entries(e.children).forEach((([e,n])=>{e===B4&&(i=i.concat(t(n,e)))})),Object.entries(e.children).forEach((([e,n])=>{e!==B4&&(i=i.concat(t(n,e)))})),i}(e,((t,i)=>i===B4?[n5(e.children[B4],!1)]:[`${i}:${n5(t,!1)}`]));return 1===Object.keys(e.children).length&&null!=e.children[B4]?`${i5(e)}/${t[0]}`:`${i5(e)}/(${t.join("//")})`}}function r5(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function s5(e){return r5(e).replace(/%3B/gi,";")}function a5(e){return r5(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function o5(e){return decodeURIComponent(e)}function l5(e){return o5(e.replace(/\+/g,"%20"))}function c5(e){return`${a5(e.path)}${function(e){return Object.entries(e).map((([e,t])=>`;${a5(e)}=${a5(t)}`)).join("")}(e.parameters)}`}var d5=/^[^\/()?;#]+/;function u5(e){let t=e.match(d5);return t?t[0]:""}var p5=/^[^\/()?;=#]+/;var h5=/^[^=?&#]+/;var f5=/^[^&#]+/;var m5=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Q4([],{}):new Q4([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}
1parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[B4]=new Q4(e,t)),i}parseSegment(){let e=u5(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new mn(4009,!1);return this.capture(e),new J4(o5(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=function(e){let t=e.match(p5);return t?t[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let e=u5(this.remaining);e&&(i=e,this.capture(i))}e[o5(t)]=o5(i)}parseQueryParam(e){let t=function(e){let t=e.match(h5);return t?t[0]:""}(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let e=function(e){let t=e.match(f5);return t?t[0]:""}(this.remaining);e&&(i=e,this.capture(i))}let n=l5(t),r=l5(i);if(e.hasOwnProperty(n)){let t=e[n];Array.isArray(t)||(t=[t],e[n]=t),t.push(r)}else e[n]=r}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i,n=u5(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new mn(4010,!1);n.indexOf(":")>-1?(i=n.slice(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i=B4);let s=this.parseChildren();t[i]=1===Object.keys(s).length?s[B4]:new Q4([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new mn(4011,!1)}};function g5(e){return e.segments.length>0?new Q4([],{[B4]:e}):e}function b5(e){let t={};for(let[i,n]of Object.entries(e.children)){let e=b5(n);if(i===B4&&0===e.segments.length&&e.hasChildren())for(let[i,n]of Object.entries(e.children))t[i]=n;else(e.segments.length>0||e.hasChildren())&&(t[i]=e)}return function(e){if(1===e.numberOfChildren&&e.children[B4]){let t=e.children[B4];return new Q4(e.segments.concat(t.segments),t.children)}return e}(new Q4(e.segments,t))}function y5(e){return e instanceof K4}function v5(e){let t;let i=function i(n){let r={};for(let e of n.children){let t=i(e);r[e.outlet]=t}let s=new Q4(n.url,r);return n===e&&(t=s),s}(e.root),n=g5(i);return t??n}function w5(e,t,i,n){let r=e;for(;r.parent;)r=r.parent;if(0===t.length)return C5(r,r,r,i,n);let s=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new A5(!0,0,e);let t=0,i=!1,n=e.reduce(((e,n,r)=>{if("object"==typeof n&&null!=n){if(n.outlets){let t={};return Object.entries(n.outlets).forEach((([e,i])=>{t[e]="string"==typeof i?i.split("/"):i})),[...e,{outlets:t}]}if(n.segmentPath)return[...e,n.segmentPath]}return"string"!=typeof n?[...e,n]:0===r?(n.split("/").forEach(((n,r)=>{0==r&&"."===n||(0==r&&""===n?i=!0:".."===n?t++:""!=n&&e.push(n))})),e):[...e,n]}),[]);return new A5(i,t,n)}(t);if(s.toRoot())return C5(r,r,new Q4([],{}),i,n);let a=function(e,t,i){if(e.isAbsolute)return new k5(t,!0,0);if(!i)return new k5(t,!1,NaN);if(null===i.parent)return new k5(i,!0,0);let n=_5(e.commands[0])?0:1,r=i.segments.length-1+n;return function(e,t,i){let n=e,r=t,s=i;for(;s>r;){if(s-=r,n=n.parent,!n)throw new mn(4005,!1);r=n.segments.length}return new k5(n,!1,r-s)}(i,r,e.numberOfDoubleDots)}(s,r,e),o=a.processChildren?T5(a.segmentGroup,a.index,s.commands):x5(a.segmentGroup,a.index,s.commands);return C5(r,a.segmentGroup,o,i,n)}function _5(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function S5(e){return"object"==typeof e&&null!=e&&e.outlets}function C5(e,t,i,n,r){let s,a={};n&&Object.entries(n).forEach((([e,t])=>{a[e]=Array.isArray(t)?t.map((e=>`${e}`)):`${t}`})),s=e===t?i:I5(e,t,i);let o=g5(b5(s));return new K4(o,a,r)}function I5(e,t,i){let n={};
1return Object.entries(e.children).forEach((([e,r])=>{n[e]=r===t?i:I5(r,t,i)})),new Q4(e.segments,n)}var A5=class{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&_5(i[0]))throw new mn(4003,!1);let n=i.find(S5);if(n&&n!==q4(i))throw new mn(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}};var k5=class{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}};function x5(e,t,i){if(e??=new Q4([],{}),0===e.segments.length&&e.hasChildren())return T5(e,t,i);let n=function(e,t,i){let n=0,r=t,s={match:!1,pathIndex:0,commandIndex:0};for(;r<e.segments.length;){if(n>=i.length)return s;let t=e.segments[r],a=i[n];if(S5(a))break;let o=`${a}`,l=n<i.length-1?i[n+1]:null;if(r>0&&void 0===o)break;if(o&&l&&"object"==typeof l&&void 0===l.outlets){if(!O5(o,l,t))return s;n+=2}else{if(!O5(o,{},t))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(e,t,i),r=i.slice(n.commandIndex);if(n.match&&n.pathIndex<e.segments.length){let t=new Q4(e.segments.slice(0,n.pathIndex),{});return t.children[B4]=new Q4(e.segments.slice(n.pathIndex),e.children),T5(t,0,r)}return n.match&&0===r.length?new Q4(e.segments,{}):n.match&&!e.hasChildren()?P5(e,t,i):n.match?T5(e,0,r):P5(e,t,i)}function T5(e,t,i){if(0===i.length)return new Q4(e.segments,{});{let n=function(e){return S5(e[0])?e[0].outlets:{[B4]:e}}(i),r={};if(Object.keys(n).some((e=>e!==B4))&&e.children[B4]&&1===e.numberOfChildren&&0===e.children[B4].segments.length){let n=T5(e.children[B4],t,i);return new Q4(e.segments,n.children)}return Object.entries(n).forEach((([i,n])=>{"string"==typeof n&&(n=[n]),null!==n&&(r[i]=x5(e.children[i],t,n))})),Object.entries(e.children).forEach((([e,t])=>{void 0===n[e]&&(r[e]=t)})),new Q4(e.segments,r)}}function P5(e,t,i){let n=e.segments.slice(0,t),r=0;for(;r<i.length;){let s=i[r];if(S5(s)){let e=E5(s.outlets);return new Q4(n,e)}if(0===r&&_5(i[0])){let s=e.segments[t];n.push(new J4(s.path,D5(i[0]))),r++;continue}let a=S5(s)?s.outlets[B4]:`${s}`,o=r<i.length-1?i[r+1]:null;a&&o&&_5(o)?(n.push(new J4(a,D5(o))),r+=2):(n.push(new J4(a,{})),r++)}return new Q4(n,{})}function E5(e){let t={};return Object.entries(e).forEach((([e,i])=>{"string"==typeof i&&(i=[i]),null!==i&&(t[e]=P5(new Q4([],{}),0,i))})),t}function D5(e){let t={};return Object.entries(e).forEach((([e,i])=>t[e]=`${i}`)),t}function O5(e,t,i){return e==i.path&&N4(t,i.parameters)}var B5="imperative",M5=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(M5||{}),R5=class{constructor(e,t){this.id=e,this.url=t}},L5=class extends R5{constructor(e,t,i="imperative",n=null){super(e,t),this.type=M5.NavigationStart,this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},F5=class extends R5{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=M5.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},N5=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(N5||{}),U5=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(U5||{}),V5=class extends R5{constructor(e,t,i,n){super(e,t),this.reason=i,this.code=n,this.type=M5.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},q5=class extends R5{constructor(e,t,i,n){super(e,t),this.reason=i,this.code=n,this.type=M5.NavigationSkipped}},$5=class extends R5{constructor(e,t,i,n){super(e,t),this.error=i,this.target=n,this.type=M5.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},j5=class extends R5{constructor(e,t,i,n){super(e,t),this.urlAfterRedirects=i,this.state=n,this.type=M5.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},z5=class extends R5{constructor(e,t,i,n){super(e,t),this.urlAfterRedirects=i,this.state=n,this.type=M5.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},W5=class extends R5{constructor(e,t,i,n,r){super(e,t),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=r,this.type=M5.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},H5=class extends R5{constructor(e,t,i,n){super(e,t),this.urlAfterRedirects=i,this.state=n,this.type=M5.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Y5=class extends R5{constructor(e,t,i,n){super(e,t),this.urlAfterRedirects=i,this.state=n,this.type=M5.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},G5=class{constructor(e){this.route=e,this.type=M5.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},K5=class{constructor(e){this.route=e,this.type=M5.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Q5=class{constructor(e){this.snapshot=e,this.type=M5.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},J5=class{constructor(e){this.snapshot=e,this.type=M5.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Z5=class{constructor(e){this.snapshot=e,this.type=M5.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},X5=class{constructor(e){this.snapshot=e,this.type=M5.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},e6=class{},t6=class{constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function i6(e){return e.outlet||B4}function n6(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var r6=class{get injector(){return n6(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new s6(this.rootInjector),this.attachRef=null}},s6=(()=>{class e{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,t){let i=this.getOrCreateContext(e);i.outlet=t,this.contexts.set(e,i)}onChildOutletDestroyed(e){let t=this.getContext(e);t&&(t.outlet=null,t.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new r6(this.rootInjector),this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}static{this.ɵfac=function(t){return new(t||e)(lr(Cs))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),a6=class{constructor(e){this._root=e}get root(){return this._root.value}
1parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=o6(e,this._root);return t?t.children.map((e=>e.value)):[]}firstChild(e){let t=o6(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=l6(e,this._root);return t.length<2?[]:t[t.length-2].children.map((e=>e.value)).filter((t=>t!==e))}pathFromRoot(e){return l6(e,this._root).map((e=>e.value))}};function o6(e,t){if(e===t.value)return t;for(let i of t.children){let t=o6(e,i);if(t)return t}return null}function l6(e,t){if(e===t.value)return[t];for(let i of t.children){let n=l6(e,i);if(n.length)return n.unshift(t),n}return[]}var c6=class{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function d6(e){let t={};return e&&e.children.forEach((e=>t[e.value.outlet]=e)),t}var u6=class extends a6{constructor(e,t){super(e),this.snapshot=t,b6(this,e)}toString(){return this.snapshot.toString()}};function p6(e){let t=function(e){let t={},i={},n={},r="",s=new m6([],t,n,r,i,B4,e,null,{});return new g6("",new c6(s,[]))}(e),i=new Tt([new J4("",{})]),n=new Tt({}),r=new Tt({}),s=new Tt({}),a=new Tt(""),o=new h6(i,n,s,a,r,B4,e,t.root);return o.snapshot=t.root,new u6(new c6(o,[]),t)}var h6=class{constructor(e,t,i,n,r,s,a,o){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=i,this.fragmentSubject=n,this.dataSubject=r,this.outlet=s,this.component=a,this._futureSnapshot=o,this.title=this.dataSubject?.pipe(bi((e=>e[M4])))??fi(void 0),this.url=e,this.params=t,this.queryParams=i,this.fragment=n,this.data=r}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(bi((e=>L4(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(bi((e=>L4(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function f6(e,t,i="emptyOnly"){let n,{routeConfig:r}=e;return n=null===t||"always"!==i&&""!==r?.path&&(t.component||t.routeConfig?.loadComponent)?{params:h({},e.params),data:h({},e.data),resolve:h(h({},e.data),e._resolvedData??{})}:{params:h(h({},t.params),e.params),data:h(h({},t.data),e.data),resolve:h(h(h(h({},e.data),t.data),r?.data),e._resolvedData)},r&&_6(r)&&(n.resolve[M4]=r.title),n}var m6=class{get title(){return this.data?.[M4]}constructor(e,t,i,n,r,s,a,o,l){this.url=e,this.params=t,this.queryParams=i,this.fragment=n,this.data=r,this.outlet=s,this.component=a,this.routeConfig=o,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=L4(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=L4(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map((e=>e.toString())).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}},g6=class extends a6{constructor(e,t){super(t),this.url=e,b6(this,t)}toString(){return y6(this._root)}};function b6(e,t){t.value._routerState=e,t.children.forEach((t=>b6(e,t)))}function y6(e){let t=e.children.length>0?` { ${e.children.map(y6).join(", ")} } `:"";return`${e.value}${t}`}function v6(e){if(e.snapshot){let t=e.snapshot,i=e._futureSnapshot;e.snapshot=i,N4(t.queryParams,i.queryParams)||e.queryParamsSubject.next(i.queryParams),t.fragment!==i.fragment&&e.fragmentSubject.next(i.fragment),N4(t.params,i.params)||e.paramsSubject.next(i.params),function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(!N4(e[i],t[i]))return!1;return!0}(t.url,i.url)||e.urlSubject.next(i.url),N4(t.data,i.data)||e.dataSubject.next(i.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function w6(e,t){let i=N4(e.params,t.params)&&function(e,t){return Z4
1(e,t)&&e.every(((e,i)=>N4(e.parameters,t[i].parameters)))}(e.url,t.url),n=!e.parent!=!t.parent;return i&&!n&&(!e.parent||w6(e.parent,t.parent))}function _6(e){return"string"==typeof e.title||null===e.title}var S6=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=B4,this.activateEvents=new _l,this.deactivateEvents=new _l,this.attachEvents=new _l,this.detachEvents=new _l,this.parentContexts=cr(s6),this.location=cr(yp),this.changeDetector=cr(kg),this.inputBinder=cr(I6,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){let{firstChange:t,previousValue:i}=e.name;if(t)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new mn(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new mn(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new mn(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,t){if(this.isActivated)throw new mn(4013,!1);this._activatedRoute=e;let i=this.location,n=e.snapshot.component,r=this.parentContexts.getOrCreateContext(this.name).children,s=new C6(e,r,i.injector);this.activated=i.createComponent(n,{index:i.length,injector:s,environmentInjector:t}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵdir=ts({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[ga]})}}return e})(),C6=class e{__ngOutletInjector(t){return new e(this.route,this.childContexts,t)}constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===h6?this.route:e===s6?this.childContexts:this.parent.get(e,t)}},I6=new Fn("");function A6(e,t,i){if(i&&e.shouldReuseRoute(t.value,i.value.snapshot)){let n=i.value;n._futureSnapshot=t.value;let r=function(e,t,i){return t.children.map((t=>{for(let n of i.children)if(e.shouldReuseRoute(t.value,n.value.snapshot))return A6(e,t,n);return A6(e,t)}))}(e,t,i);return new c6(n,r)}{if(e.shouldAttach(t.value)){let i=e.retrieve(t.value);if(null!==i){let n=i.route;return n.value._futureSnapshot=t.value,n.children=t.children.map((t=>A6(e,t))),n}}let i=function(e){return new h6(new Tt(e.url),new Tt(e.params),new Tt(e.queryParams),new Tt(e.fragment),new Tt(e.data),e.outlet,e.component,e)}(t.value),n=t.children.map((t=>A6(e,t)));return new c6(i,n)}}var k6=class{constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},x6="ngNavigationCancelingError";function T6(e,t){let{redirectTo:i,navigationBehaviorOptions:n}=y5(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=P6(!1,N5.Redirect);return r.url=i,r.navigationBehaviorOptions=n,r}function P6(e,t){let i=new Error(`NavigationCancelingError: ${e||""}`);return i[x6]=!0,i.cancellationCode=t,i}function E6(e){return!!e&&e[x6]}var D6=class{constructor(e,t,i,n,r){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=n,this.inputBindingEnabled=r}
1activate(e){let t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),v6(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){let n=d6(t);e.children.forEach((e=>{let t=e.value.outlet;this.deactivateRoutes(e,n[t],i),delete n[t]})),Object.values(n).forEach((e=>{this.deactivateRouteAndItsChildren(e,i)}))}deactivateRoutes(e,t,i){let n=e.value,r=t?t.value:null;if(n===r)if(n.component){let r=i.getContext(n.outlet);r&&this.deactivateChildRoutes(e,t,r.children)}else this.deactivateChildRoutes(e,t,i);else r&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let i=t.getContext(e.value.outlet),n=i&&e.value.component?i.children:t,r=d6(e);for(let e of Object.values(r))this.deactivateRouteAndItsChildren(e,n);if(i&&i.outlet){let t=i.outlet.detach(),n=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:t,route:e,contexts:n})}}deactivateRouteAndOutlet(e,t){let i=t.getContext(e.value.outlet),n=i&&e.value.component?i.children:t,r=d6(e);for(let e of Object.values(r))this.deactivateRouteAndItsChildren(e,n);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(e,t,i){let n=d6(t);e.children.forEach((e=>{this.activateRoutes(e,n[e.value.outlet],i),this.forwardEvent(new X5(e.value.snapshot))})),e.children.length&&this.forwardEvent(new J5(e.value.snapshot))}activateRoutes(e,t,i){let n=e.value,r=t?t.value:null;if(v6(n),n===r)if(n.component){let r=i.getOrCreateContext(n.outlet);this.activateChildRoutes(e,t,r.children)}else this.activateChildRoutes(e,t,i);else if(n.component){let t=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){let i=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),t.children.onOutletReAttached(i.contexts),t.attachRef=i.componentRef,t.route=i.route.value,t.outlet&&t.outlet.attach(i.componentRef,i.route.value),v6(i.route.value),this.activateChildRoutes(e,null,t.children)}else t.attachRef=null,t.route=n,t.outlet&&t.outlet.activateWith(n,t.injector),this.activateChildRoutes(e,null,t.children)}else this.activateChildRoutes(e,null,i)}},O6=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},B6=class{constructor(e,t){this.component=e,this.route=t}};function M6(e,t,i){let n=e._root;return L6(n,t?t._root:null,i,[n.value])}function R6(e,t){let i=Symbol(),n=t.get(e,i);return n===i?"function"!=typeof e||function(e){return null!==En(e)}(e)?t.get(e):e:n}function L6(e,t,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=d6(t);return e.children.forEach((e=>{(function(e,t,i,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=e.value,a=t?t.value:null,o=i?i.getContext(e.value.outlet):null;if(a&&s.routeConfig===a.routeConfig){let l=function(e,t,i){if("function"==typeof i)return i(e,t);switch(i){case"pathParamsChange":return!Z4(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Z4(e.url,t.url)||!N4(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!w6(e,t)||!N4(e.queryParams,t.queryParams);default:return!w6(e,t)}}(a,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new O6(n)):(s.data=a.data,s._resolvedData=a._resolvedData),s.component?L6(e,t,o?o.children:null,n,r):L6(e,t,i,n,r),l&&o&&o.outlet&&o.outlet.isActivated&&r.canDeactivateChecks.push(new B6(o.outlet.component,a))}else a&&F6(t,o,r),r.canActivateChecks.push(new O6(n)),s.component?L6(e,null,o?o.children:null,n,r):L6(e,null,i,n,r)})(e,s[e.value.outlet],i,n.concat([e.value]),r),delete s[e.value.outlet]})),Object.entries(s).forEach((([e,t])=>F6(t,i.getContext(e),r))),r}function F6(e,t,i){let n=d6(e),r=e.value;Object.entries(n).forEach((([e,n])=>{r.component?F6(n,t?t.children.getContext(e):null,i):F6(n,t,i)}
1)),r.component&&t&&t.outlet&&t.outlet.isActivated?i.canDeactivateChecks.push(new B6(t.outlet.component,r)):i.canDeactivateChecks.push(new B6(null,r))}function N6(e){return"function"==typeof e}function U6(e){return e instanceof gi||"EmptyError"===e?.name}var V6=Symbol("INITIAL_VALUE");function q6(){return dn((e=>ki(e.map((e=>e.pipe(Hi(1),cn(V6))))).pipe(bi((e=>{for(let t of e)if(!0!==t){if(t===V6)return V6;if(!1===t||$6(t))return t}return!0})),qi((e=>e!==V6)),Hi(1))))}function $6(e){return y5(e)||e instanceof k6}function j6(e,t){return Ti((i=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:a}}=i;return 0===a.length&&0===s.length?fi(f(h({},i),{guardsResult:!0})):function(e,t,i,n){return hi(e).pipe(Ti((e=>function(e,t,i,n,r){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||0===s.length)return fi(!0);let a=s.map((s=>{let a=n6(t)??r,o=R6(s,a);return $4(function(e){return e&&N6(e.canDeactivate)}(o)?o.canDeactivate(e,t,i,n):Ps(a,(()=>o(e,t,i,n)))).pipe(nn())}));return fi(a).pipe(q6())}(e.component,e.route,i,t,n))),nn((e=>!0!==e),!0))}(a,n,r,e).pipe(Ti((i=>i&&function(e){return"boolean"==typeof e}(i)?function(e,t,i,n){return hi(t).pipe(ji((t=>Ei(function(e,t){return null!==e&&t&&t(new Q5(e)),fi(!0)}(t.route.parent,n),function(e,t){return null!==e&&t&&t(new Z5(e)),fi(!0)}(t.route,n),function(e,t,i){let n=t[t.length-1],r=t.slice(0,t.length-1).reverse().map((e=>function(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e))).filter((e=>null!==e)).map((t=>Di((()=>fi(t.guards.map((r=>{let s=n6(t.node)??i,a=R6(r,s);return $4(function(e){return e&&N6(e.canActivateChild)}(a)?a.canActivateChild(n,e):Ps(s,(()=>a(n,e)))).pipe(nn())}))).pipe(q6())))));return fi(r).pipe(q6())}(e,t.path,i),function(e,t,i){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||0===n.length)return fi(!0);let r=n.map((n=>Di((()=>{let r=n6(t)??i,s=R6(n,r);return $4(function(e){return e&&N6(e.canActivate)}(s)?s.canActivate(t,e):Ps(r,(()=>s(t,e)))).pipe(nn())}))));return fi(r).pipe(q6())}(e,t.route,i)))),nn((e=>!0!==e),!0))}(n,s,e,t):fi(i))),bi((e=>f(h({},i),{guardsResult:e}))))}))}function z6(e,t,i,n){let r=t.canLoad;return void 0===r||0===r.length?fi(!0):fi(r.map((n=>{let r=R6(n,e);return $4(function(e){return e&&N6(e.canLoad)}(r)?r.canLoad(t,i):Ps(e,(()=>r(t,i))))}))).pipe(q6(),W6(n))}function W6(e){return function(...e){return mt(e)}(hn((e=>{if("boolean"!=typeof e)throw T6(0,e)})),bi((e=>!0===e)))}function H6(e,t,i,n){let r=t.canMatch;return r&&0!==r.length?fi(r.map((n=>{let r=R6(n,e);return $4(function(e){return e&&N6(e.canMatch)}(r)?r.canMatch(t,i):Ps(e,(()=>r(t,i))))}))).pipe(q6(),W6()):fi(!0)}var Y6=class{constructor(e){this.segmentGroup=e||null}},G6=class extends Error{constructor(e){super(),this.urlTree=e}};function K6(e){return mi(new Y6(e))}var Q6=class{constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let i=[],n=t.root;for(;;){if(i=i.concat(n.segments),0===n.numberOfChildren)return fi(i);if(n.numberOfChildren>1||!n.children[B4])return e.redirectTo,mi(new mn(4e3,!1));n=n.children[B4]}}applyRedirectCommands(e,t,i,n,r){if("string"!=typeof t){let e=t,{queryParams:i,fragment:s,routeConfig:a,url:o,outlet:l,params:c,data:d,title:u}=n,p=Ps(r,(()=>e({params:c,data:d,queryParams:i,fragment:s,routeConfig:a,url:o,outlet:l,title:u})));if(p instanceof K4)throw new G6(p);t=p}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i);if("/"===t[0])throw new G6(s);return s}applyRedirectCreateUrlTree(e,t,i,n){let r=this.createSegmentGroup(e,t.root,i,n);return new K4(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let i={};return Object.entries(e).forEach((([e,n])=>{if("string"==typeof n&&":"===n[0]){let r=n.substring(1);i[e]=t[r]}else i[e]=n})),i}createSegmentGroup(e,t,i,n){let r=this.createSegments(e,t.segments,i,n),s={};return Object.entries(t.children).forEach((([t,r])=>{s[t]=this.createSegmentGroup(e,r,i,n)})),new Q4(r,s)}createSegments(e,t,i,n){return t.map((t=>":"===t.path[0]?this.findPosParam(e,t,n):this.findOrReturn(t,i)))}findPosParam(e,t,i){let n=i[t.path.substring(1)];if(!n)throw new mn(4001,!1);return n}findOrReturn(e,t){let i=0;for(let n of t){if(n.path===e.path)return t.splice(i),n;i++}return e}},J6={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Z6(e,t,i,n,r){let s=X6(e,t,i);return s.matched?(n=function(e,t){return e.providers&&!e._injector&&(e._injector=ih(e.providers,t,`Route: ${e.path}`)),e._injector??t}(t,n),H6(n,t,i).pipe(bi((e=>!0===e?s:h({},J6))))):fi(s)}function X6(e,t,i){if("**"===t.path)return function(e){return{matched:!0,parameters:e.length>0?q4(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(i);if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||i.length>0)?h({},J6):{matched:!0,consumedSegments:[],remainingSegments:i,parameters:{},positionalParamSegments:{}};let n=(t.matcher||F4)(i,e,t);if(!n)return h({},J6);let r={};Object.entries(n.posParams??{}
1).forEach((([e,t])=>{r[e]=t.path}));let s=n.consumed.length>0?h(h({},r),n.consumed[n.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:n.consumed,remainingSegments:i.slice(n.consumed.length),parameters:s,positionalParamSegments:n.posParams??{}}}function e7(e,t,i,n){return i.length>0&&function(e,t,i){return i.some((i=>n7(e,t,i)&&i6(i)!==B4))}(e,i,n)?{segmentGroup:new Q4(t,i7(n,new Q4(i,e.children))),slicedSegments:[]}:0===i.length&&function(e,t,i){return i.some((i=>n7(e,t,i)))}(e,i,n)?{segmentGroup:new Q4(e.segments,t7(e,i,n,e.children)),slicedSegments:i}:{segmentGroup:new Q4(e.segments,e.children),slicedSegments:i}}function t7(e,t,i,n){let r={};for(let s of i)if(n7(e,t,s)&&!n[i6(s)]){let e=new Q4([],{});r[i6(s)]=e}return h(h({},n),r)}function i7(e,t){let i={};i[B4]=t;for(let t of e)if(""===t.path&&i6(t)!==B4){let e=new Q4([],{});i[i6(t)]=e}return i}function n7(e,t,i){return(!(e.hasChildren()||t.length>0)||"full"!==i.pathMatch)&&""===i.path}var r7=class{};var s7=class{constructor(e,t,i,n,r,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=i,this.config=n,this.urlTree=r,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Q6(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new mn(4002,`'${e.segmentGroup}'`)}recognize(){let e=e7(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(bi((({children:e,rootSnapshot:t})=>{let i=new c6(t,e),n=new g6("",i),r=function(e,t,i=null,n=null){return w5(v5(e),t,i,n)}(t,[],this.urlTree.queryParams,this.urlTree.fragment);return r.queryParams=this.urlTree.queryParams,n.url=this.urlSerializer.serialize(r),{state:n,tree:r}})))}match(e){let t=new m6([],Object.freeze({}),Object.freeze(h({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),B4,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,B4,t).pipe(bi((e=>({children:e,rootSnapshot:t}))),$i((e=>{if(e instanceof G6)return this.urlTree=e.urlTree,this.match(e.urlTree.root);throw e instanceof Y6?this.noMatchError(e):e})))}processSegmentGroup(e,t,i,n,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(e,t,i,r):this.processSegment(e,t,i,i.segments,n,!0,r).pipe(bi((e=>e instanceof c6?[e]:[])))}processChildren(e,t,i,n){let r=[];for(let e of Object.keys(i.children))"primary"===e?r.unshift(e):r.push(e);return hi(r).pipe(ji((r=>{let s=i.children[r],a=function(e,t){let i=e.filter((e=>i6(e)===t));return i.push(...e.filter((e=>i6(e)!==t))),i}(t,r);return this.processSegmentGroup(e,a,s,r,n)})),an(((e,t)=>(e.push(...t),e))),Wi(null),function(e,t){let i=arguments.length>=2;return n=>n.pipe(e?qi(((t,i)=>e(t,i,n))):ft,rn(1),i?Wi(t):Xi((()=>new gi)))}(),Ti((e=>{if(null===e)return K6(i);let t=o7(e);return function(e){e.sort(((e,t)=>e.value.outlet===B4?-1:t.value.outlet===B4?1:e.value.outlet.localeCompare(t.value.outlet)))}(t),fi(t)})))}processSegment(e,t,i,n,r,s,a){return hi(t).pipe(ji((o=>this.processSegmentAgainstRoute(o._injector??e,t,o,i,n,r,s,a).pipe($i((e=>{if(e instanceof Y6)return fi(null);throw e}))))),nn((e=>!!e)),$i((e=>{if(U6(e))return function(e,t,i){return 0===t.length&&!e.children[i]}(i,n,r)?fi(new r7):K6(i);throw e})))}processSegmentAgainstRoute(e,t,i,n,r,s,a,o){return i6(i)===s||s!==B4&&n7(n,r,i)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,n,i,r,s,o):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,n,t,i,r,s,o):K6(n):K6(n)}expandSegmentAgainstRouteUsingRedirect(e,t,i,n,r,s,a){let{matched:o,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:u}=X6(t,n,r);if(!o)return K6(t);"string"==typeof n.redirectTo&&"/"===n.redirectTo[0]&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));let p=new m6(r,l,Object.freeze(h({},this.urlTree.queryParams)),this.urlTree.fragment,l7(n),i6(n),n.component??n._loadedComponent??null,n,c7(n)),f=f6(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let m=this.applyRedirects.applyRedirectCommands(c,n.redirectTo,d,p,e);return this.applyRedirects.lineralizeSegments(n,m).pipe(Ti((n=>this.processSegment(e,i,t,n.concat(u),s,!1,a))))}matchSegmentAgainstRoute(e,t,i,n,r,s){let a=Z6(t,i,n,e,this.urlSerializer);return"**"===i.path&&(t.children={}),a.pipe(dn((a=>a.matched?(e=i._injector??e,this.getChildConfig(e,i,n).pipe(dn((({routes:n})=>{let o=i._loadedInjector??e,{parameters:l,consumedSegments:c,remainingSegments:d}=a,u=new m6(c,l,Object.freeze(h({},this.urlTree.queryParams)),this.urlTree.fragment,l7(i),i6(i),i.component??i._loadedComponent??null,i,c7(i)),p=f6(u,s,this.paramsInheritanceStrategy);u.params=Object.freeze(p.params),u.data=Object.freeze(p.data);let{segmentGroup:f,slicedSegments:m}=e7(t,c,d,n);if(0===m.length&&f.hasChildren())return this.processChildren(o,n,f,u).pipe(bi((e=>new c6(u,e))));if(0===n.length&&0===m.length)return fi(new c6(u,[]));let g=i6(i)===r;return this.processSegment(o,n,f,m,g?B4:r,!0,u).pipe(bi((e=>new c6(u,e instanceof c6?[e]:[]))))})))):K6(t))))}getChildConfig(e,t,i){return t.children?fi({routes:t.children,injector:e}):t.loadChildren?void 0!==t._loadedRoutes?fi({routes:t._loadedRoutes,injector:t._loadedInjector}):z6(e,t,i,this.urlSerializer).pipe(Ti((i=>i?this.configLoader.loadChildren(e,t).pipe(hn((e=>{t._loadedRoutes=e.routes,t._loadedInjector=e.injector}))):mi(P6(!1,N5.GuardRejected))))):fi({routes:[],injector:e})}};function a7(e){let t=e.value.routeConfig;return t&&""===t.path}function o7(e){let t=[],i=new Set;for(let n of e){if(!a7(n)){t.push(n);continue}let e=t.find((e=>n.value.routeConfig===e.value.routeConfig));void 0!==e?(e.children.push(...n.children),i.add(e)):t.push(n)}for(let e of i){let i=o7(e.children);t.push(new c6(e.value,i))}return t.filter((e=>!i.has(e)))}function l7(e){return e.data||{}}function c7(e){return e.resolve||{}}function d7(e,t,i,n,r,s){return Ti((a=>function(e,t,i,n,r,s,a="emptyOnly"){return new s7(e,t,i,n,r,a,s).recognize()}(e,t,i,n,a.extractedUrl,r,s).pipe(bi((({state:e,tree:t})=>f(h({},a),{targetSnapshot:e,urlAfterRedirects:t}))))))}function u7(e,t){return Ti((i=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=i;
1if(!r.length)return fi(i);let s=new Set(r.map((e=>e.route))),a=new Set;for(let e of s)if(!a.has(e))for(let t of p7(e))a.add(t);let o=0;return hi(a).pipe(ji((i=>s.has(i)?function(e,t,i,n){let r=e.routeConfig,s=e._resolve;return void 0!==r?.title&&!_6(r)&&(s[M4]=r.title),function(e,t,i,n){let r=U4(e);if(0===r.length)return fi({});let s={};return hi(r).pipe(Ti((r=>function(e,t,i,n){let r=n6(t)??n,s=R6(e,r),a=s.resolve?s.resolve(t,i):Ps(r,(()=>s(t,i)));return $4(a)}(e[r],t,i,n).pipe(nn(),hn((e=>{if(e instanceof k6)throw T6(new e5,e);s[r]=e}))))),rn(1),Yi(s),$i((e=>U6(e)?Vt:mi(e))))}(s,e,t,n).pipe(bi((t=>(e._resolvedData=t,e.data=f6(e,e.parent,i).resolve,null))))}(i,n,e,t):(i.data=f6(i,i.parent,e).resolve,fi(void 0)))),hn((()=>o++)),rn(1),Ti((e=>o===a.size?fi(i):Vt)))}))}function p7(e){let t=e.children.map((e=>p7(e))).flat();return[e,...t]}function h7(e){return dn((t=>{let i=e(t);return i?hi(i).pipe(bi((()=>t))):fi(t)}))}var f7=(()=>{class e{buildTitle(e){let t,i=e.root;for(;void 0!==i;)t=this.getResolvedTitleForRoute(i)??t,i=i.children.find((e=>e.outlet===B4));return t}getResolvedTitleForRoute(e){return e.data[M4]}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(m7),providedIn:"root"})}}return e})(),m7=(()=>{class e extends f7{constructor(e){super(),this.title=e}updateTitle(e){let t=this.buildTitle(e);void 0!==t&&this.title.setTitle(t)}static{this.ɵfac=function(t){return new(t||e)(lr(fw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),g7=new Fn("",{providedIn:"root",factory:()=>({})}),b7=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["ng-component"]],standalone:!0,features:[Pm],decls:1,vars:0,template:function(e,t){1&e&&Tf(0,"router-outlet")},dependencies:[S6],encapsulation:2})}}return e})();function y7(e){let t=e.children&&e.children.map(y7),i=t?f(h({},e),{children:t}):h({},e);return!i.component&&!i.loadComponent&&(t||i.loadChildren)&&i.outlet&&i.outlet!==B4&&(i.component=b7),i}var v7=new Fn(""),w7=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=cr(cg)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return fi(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let t=$4(e.loadComponent()).pipe(bi(_7),hn((t=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=t})),tn((()=>{this.componentLoaders.delete(e)}))),i=new Ct(t,(()=>new kt)).pipe(St());return this.componentLoaders.set(e,i),i}loadChildren(e,t){if(this.childrenLoaders.get(t))return this.childrenLoaders.get(t);if(t._loadedRoutes)return fi({routes:t._loadedRoutes,injector:t._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(t);let i=function(e,t,i,n){return $4(e.loadChildren()).pipe(bi(_7),Ti((e=>e instanceof Zp||Array.isArray(e)?fi(e):hi(t.compileModuleAsync(e)))),bi((t=>{n&&n(e);let r,s,a=!1;return Array.isArray(t)?(s=t,a=!0):(r=t.create(i).injector,s=r.get(v7,[],{optional:!0,self:!0}).flat()),{routes:s.map(y7),injector:r}})))}(t,this.compiler,e,this.onLoadEndListener).pipe(tn((()=>{this.childrenLoaders.delete(t)}))),n=new Ct(i,(()=>new kt)).pipe(St());return this.childrenLoaders.set(t,n),n}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function _7(e){return function(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}var S7=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(C7),providedIn:"root"})}}return e})(),C7=(()=>{class e{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),I7=new Fn(""),A7=new Fn(""),k7=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new kt,this.transitionAbortSubject=ne
1w kt,this.configLoader=cr(w7),this.environmentInjector=cr(Cs),this.urlSerializer=cr(X4),this.rootContexts=cr(s6),this.location=cr(sb),this.inputBindingEnabled=null!==cr(I6,{optional:!0}),this.titleStrategy=cr(f7),this.options=cr(g7,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=cr(S7),this.createViewTransition=cr(I7,{optional:!0}),this.navigationErrorHandler=cr(A7,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>fi(void 0),this.rootComponentType=null;this.configLoader.onLoadEndListener=e=>this.events.next(new K5(e)),this.configLoader.onLoadStartListener=e=>this.events.next(new G5(e))}complete(){this.transitions?.complete()}handleNavigationRequest(e){let t=++this.navigationId;this.transitions?.next(f(h(h({},this.transitions.value),e),{id:t}))}setupNavigations(e,t,i){return this.transitions=new Tt({id:0,currentUrlTree:t,currentRawUrl:t,extractedUrl:this.urlHandlingStrategy.extract(t),urlAfterRedirects:this.urlHandlingStrategy.extract(t),rawUrl:t,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:B5,restoredState:null,currentSnapshot:i.snapshot,targetSnapshot:null,currentRouterState:i,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(qi((e=>0!==e.id)),bi((e=>f(h({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl)}))),dn((t=>{let i=!1,n=!1;return fi(t).pipe(dn((i=>{if(this.navigationId>t.id)return this.cancelNavigationTransition(t,"",N5.SupersededByNewNavigation),Vt;this.currentTransition=t,this.currentNavigation={id:i.id,initialUrl:i.rawUrl,extractedUrl:i.extractedUrl,targetBrowserUrl:"string"==typeof i.extras.browserUrl?this.urlSerializer.parse(i.extras.browserUrl):i.extras.browserUrl,trigger:i.source,extras:i.extras,previousNavigation:this.lastSuccessfulNavigation?f(h({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let n=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),r=i.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!n&&"reload"!==r){let e="";return this.events.next(new q5(i.id,this.urlSerializer.serialize(i.rawUrl),e,U5.IgnoredSameUrlNavigation)),i.resolve(!1),Vt}if(this.urlHandlingStrategy.shouldProcessUrl(i.rawUrl))return fi(i).pipe(dn((e=>{let t=this.transitions?.getValue();return this.events.next(new L5(e.id,this.urlSerializer.serialize(e.extractedUrl),e.source,e.restoredState)),t!==this.transitions?.getValue()?Vt:Promise.resolve(e)})),d7(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),hn((e=>{t.targetSnapshot=e.targetSnapshot,t.urlAfterRedirects=e.urlAfterRedirects,this.currentNavigation=f(h({},this.currentNavigation),{finalUrl:e.urlAfterRedirects});let i=new j5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects),e.targetSnapshot);this.events.next(i)})));if(n&&this.urlHandlingStrategy.shouldProcessUrl(i.currentRawUrl)){let{id:e,extractedUrl:n,source:r,restoredState:s,extras:a}=i,o=new L5(e,this.urlSerializer.serialize(n),r,s);this.events.next(o);let l=p6(this.rootComponentType).snapshot;return this.currentTransition=t=f(h({},i),{targetSnapshot:l,urlAfterRedirects:n,extras:f(h({},a),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=n,fi(t)}{let e="";return this.events.next(new q5(i.id,this.urlSerializer.serialize(i.extractedUrl),e,U5.IgnoredByUrlHandlingStrategy)),i.resolve(!1),Vt}})),hn((e=>{let t=new z5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects),e.targetSnapshot);this.events.next(t)})),bi((e=>(this.currentTransition=t=f(h({},e),{guards:M6(e.targetSnapshot,e.currentSnapshot,this.rootContexts)}),t))),j6(this.environmentInjector,(e=>this.events.next(e))),hn((e=>{if(t.guardsResult=e.guardsResult,e.guardsResult&&"boolean"!=typeof e.guardsResult)throw T6(this.urlSerializer,e.guardsResult);let i=new W5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);this.events.next(i)})),qi((e=>!!e.guardsResult||(this.cancelNavigationTransition(e,"",N5.GuardRejected),!1))),h7((e=>{if(e.guards.canActivateChecks.length)return fi(e).pipe(hn((e=>{let t=new H5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects),e.targetSnapshot);this.events.next(t)})),dn((e=>{let t=!1;return fi(e).pipe(u7(this.paramsInheritanceStrategy,this.environmentInjector),hn({next:()=>t=!0,complete:()=>
1{t||this.cancelNavigationTransition(e,"",N5.NoDataFromResolver)}}))})),hn((e=>{let t=new Y5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects),e.targetSnapshot);this.events.next(t)})))})),h7((e=>{let t=e=>{let i=[];e.routeConfig?.loadComponent&&!e.routeConfig._loadedComponent&&i.push(this.configLoader.loadComponent(e.routeConfig).pipe(hn((t=>{e.component=t})),bi((()=>{}))));for(let n of e.children)i.push(...t(n));return i};return ki(t(e.targetSnapshot.root)).pipe(Wi(null),Hi(1))})),h7((()=>this.afterPreactivation())),dn((()=>{let{currentSnapshot:e,targetSnapshot:i}=t,n=this.createViewTransition?.(this.environmentInjector,e.root,i.root);return n?hi(n).pipe(bi((()=>t))):fi(t)})),bi((i=>{let n=function(e,t,i){let n=A6(e,t._root,i?i._root:void 0);return new u6(n,t)}(e.routeReuseStrategy,i.targetSnapshot,i.currentRouterState);return this.currentTransition=t=f(h({},i),{targetRouterState:n}),this.currentNavigation.targetRouterState=n,t})),hn((()=>{this.events.next(new e6)})),((e,t,i,n)=>bi((r=>(new D6(t,r.targetRouterState,r.currentRouterState,i,n).activate(e),r))))(this.rootContexts,e.routeReuseStrategy,(e=>this.events.next(e)),this.inputBindingEnabled),Hi(1),hn({next:e=>{i=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new F5(e.id,this.urlSerializer.serialize(e.extractedUrl),this.urlSerializer.serialize(e.urlAfterRedirects))),this.titleStrategy?.updateTitle(e.targetRouterState.snapshot),e.resolve(!0)},complete:()=>{i=!0}}),un(this.transitionAbortSubject.pipe(hn((e=>{throw e})))),tn((()=>{!i&&!n&&this.cancelNavigationTransition(t,"",N5.SupersededByNewNavigation),this.currentTransition?.id===t.id&&(this.currentNavigation=null,this.currentTransition=null)})),$i((i=>{if(n=!0,E6(i))this.events.next(new V5(t.id,this.urlSerializer.serialize(t.extractedUrl),i.message,i.cancellationCode)),function(e){return E6(e)&&y5(e.url)}(i)?this.events.next(new t6(i.url,i.navigationBehaviorOptions)):t.resolve(!1);else{let n=new $5(t.id,this.urlSerializer.serialize(t.extractedUrl),i,t.targetSnapshot??void 0);try{let r=Ps(this.environmentInjector,(()=>this.navigationErrorHandler?.(n)));if(r instanceof k6){let{message:e,cancellationCode:i}=T6(this.urlSerializer,r);this.events.next(new V5(t.id,this.urlSerializer.serialize(t.extractedUrl),e,i)),this.events.next(new t6(r.redirectTo,r.navigationBehaviorOptions))}else{this.events.next(n);let r=e.errorHandler(i);t.resolve(!!r)}}catch(e){this.options.resolveNavigationPromiseOnError?t.resolve(!1):t.reject(e)}}return Vt})))})))}cancelNavigationTransition(e,t,i){let n=new V5(e.id,this.urlSerializer.serialize(e.extractedUrl),t,i);this.events.next(n),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),t=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==t?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function x7(e){return e!==B5}var T7=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(E7),providedIn:"root"})}}return e})(),P7=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},E7=(()=>{class e extends P7{static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),D7=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:()=>cr(O7),providedIn:"root"})}}return e})(),O7=(()=>{class e extends D7{constructor(){super(...arguments),this.location=cr(sb),this.urlSerializer=cr(X4),this.options=cr(g7,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=cr(S7),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new K4,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=p6(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return"computed"!==this.canceledNavigationResolution?this.currentPageId:this.restoredState()?.ɵrouterPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe((t=>{"popstate"===t.type&&e(t.url,t.state)}))}handleRouterEvent(e,t){if(e instanceof L5)this.stateMemento=this.createStateMemento();else if(e instanceof q5)this.rawUrlTree=t.initialUrl;else if(e instanceof j5){if("eager"===this.urlUpdateStrategy&&!t.extras.skipLocationChange){let e=this.urlHandlingStrategy.merge(t.finalUrl,t.initialUrl);this.setBrowserUrl(t.targetBrowserUrl??e,t)}}else e instanceof e6?(this.currentUrlTree=t.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(t.finalUrl,t.initialUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&!t.extras.skipLocationChange&&this.setBrowserUrl(t.targetBrowserUrl??this.rawUrlTree,t)):e instanceof V5&&(e.code===N5.GuardRejected||e.code===N5.NoDataFromRe
1solver)?this.restoreHistory(t):e instanceof $5?this.restoreHistory(t,!0):e instanceof F5&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,t){let i=e instanceof K4?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(i)||t.extras.replaceUrl){let e=this.browserPageId,n=h(h({},t.extras.state),this.generateNgRouterState(t.id,e));this.location.replaceState(i,"",n)}else{let e=h(h({},t.extras.state),this.generateNgRouterState(t.id,this.browserPageId+1));this.location.go(i,"",e)}}restoreHistory(e,t=!1){if("computed"===this.canceledNavigationResolution){let t=this.browserPageId,i=this.currentPageId-t;0!==i?this.location.historyGo(i):this.currentUrlTree===e.finalUrl&&0===i&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(t&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,t){return"computed"===this.canceledNavigationResolution?{navigationId:e,"ɵrouterPageId":t}:{navigationId:e}}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),B7=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(B7||{});function M7(e){throw e}var R7={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},L7={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},F7=(()=>{class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=cr(Ym),this.stateManager=cr(D7),this.options=cr(g7,{optional:!0})||{},this.pendingTasks=cr(wl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=cr(k7),this.urlSerializer=cr(X4),this.location=cr(sb),this.urlHandlingStrategy=cr(S7),this._events=new kt,this.errorHandler=this.options.errorHandler||M7,this.navigated=!1,this.routeReuseStrategy=cr(T7),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=cr(v7,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!cr(I6,{optional:!0}),this.eventsSubscription=new Ye,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe((e=>{try{let t=this.navigationTransitions.currentTransition,i=this.navigationTransitions.currentNavigation;if(null!==t&&null!==i)if(this.stateManager.handleRouterEvent(e,i),e instanceof V5&&e.code!==N5.Redirect&&e.code!==N5.SupersededByNewNavigation)this.navigated=!0;else if(e instanceof F5)this.navigated=!0;else if(e instanceof t6){let i=e.navigationBehaviorOptions,n=this.urlHandlingStrategy.merge(e.url,t.currentRawUrl),r=h({browserUrl:t.extras.browserUrl,info:t.extras.info,skipLocationChange:t.extras.skipLocationChange,replaceUrl:t.extras.replaceUrl||"eager"===this.urlUpdateStrategy||x7(t.source)},i);this.scheduleNavigation(n,B5,null,r,{resolve:t.resolve,reject:t.reject,promise:t.promise})}(function(e){return!(e instanceof e6||e instanceof t6)})(e)&&this._events.next(e)}catch(e){this.navigationTransitions.transitionAbortSubject.next(e)}}));this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),B5,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener(((e,t)=>{setTimeout((()=>{this.navigateToSyncWithBrowser(e,"popstate",t)}),0)}))}navigateToSyncWithBrowser(e,t,i){let n={replaceUrl:!0},r=i?.navigationId?i:null;if(i){let e=h({},i);delete e.navigationId,delete e.ɵrouterPageId,0!==Object.keys(e).length&&(n.state=e)}let s=this.parseUrl(e);this.scheduleNavigation(s,t,r,n)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(y7),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,t={}){let i,{relativeTo:n,queryParams:r,fragment:s,queryParamsHandling:a,preserveFragment:o}=t,l=o?this.currentUrlTree.fragment:s,c=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":c=h(h({},this.currentUrlTree.queryParams),r);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=r||null}null!==c&&(c=this.removeEmptyProps(c));try{i=v5(n?n.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof e[0]||"/"!==e[0][0])&&(e=[]),i=this.currentUrlTree.root}return w5(i,e,c,l??null)}navigateByUrl(e,t={skipLocationChange:!1}){let i=y5(e)?e:this.parseUrl(e),n=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(n,B5,null,t)}navigate(e,t={skipLocationChange:!1}){return function(e){for(let t=0;t<e.length;t++)if(null==e[t])throw new mn(4008,!1)}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,t){let i;if(i=!0===t?h({},R7):!1===t?h({},L7):t,y5(e))return W4(this.currentUrlTree,e,i);let n=this.parseUrl(e);return W4(this.currentUrlTree,n,i)}removeEmptyProps(e){return Object.entries(e).reduce(((e,[t,i])=>(null!=i&&(e[t]=i),e)),{})}scheduleNavigation(e,t,i,n,r){if(this.disposed)return Promise.resolve(!1);let s,a,o;r?(s=r.resolve,a=r.reject,o=r.promise):o=new Promise(((e,t)=>{s=e,a=t}));let l=this.pendingTasks.add();return function(e,t){e.events.pipe(qi((e=>e instanceof F5||e instanceof V5||e instanceof $5||e instanceof q5)),bi((e=>e instanceof F5||e instanceof q5?B7.COMPLETE:e instanceof V5&&(e.code===N5.Redirect||e.code===N5.SupersededByNewNavigation)?B7.REDIRECTING:B7.FAILED)),qi((e=>e!==B7.REDIRECTING)),Hi(1)).subscribe((()=>{t()}))}(this,(()=>{queueMicrotask((()=>this.pendingTasks.remove(l)))})),this.navigationTransitions.handleNavigationRequest({source:t,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:n,resolve:s,reject:a,promise:o,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),o.catch((e=>Promise.reject(e)))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function N7(e,t){if(1&e&&(kf(0,"div",4),Tf(1,"img",5),xf()),2&e){let e=t.$implicit;Vd(),zh("src",e.icon,id)("alt",e.description)}}var U7=(()=>{class e{constructor(){this.payment_methods=[{name:"visa",icon:"/erums/cart/dist/assets/images/pm_visa_icon.svg",description:"Visa"},{name:"mastercard",icon:"/erums/cart/dist/assets/images/pm_mastercard_icon.svg",description:"mastercard"},{name:"amex",icon:"/erums/cart/dist/assets/images/pm_amex_icon.svg",description:"American Express"},{name:"discover",icon:"/erums/cart/dist/assets/images/pm_discover_icon.svg",description:"Discover"},{name:"ebt",icon:"/erums/cart/dist/assets/images/pm_ebt_icon.svg",description:"Electronic Benefits Transfer (EBT)"},{name:"paypal",icon:"/erums/cart/dist/assets/images/pm_paypal_icon.svg",description:"PayPal"},{name:"&more",icon:"/erums/cart/dist/assets/images/pm_&more_icon.svg",description:"More"},{name:"fsa",icon:"/erums/cart/dist/assets/images/pm_fsa_icon.svg",description:"Flexible Spending Account"},{name:"hsa",icon:"/erums/cart/dist/assets/images/pm_hsa_icon.svg",description:"Health Savings Account"},{name:"hra",icon:"/erums/cart/dist/assets/images/pm_hra_icon.svg",description:"Health Reimbursement Arrangement"}]}ngOnInit(){}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["app-accepted-payments-card"]],decls:7,vars:1,consts:[[1,"accepted-payments-heading"],[1,"pm-icons-row"],["class","pm-icons-container",4,"ngFor","ngForOf"],[1,"accepted-payments-note"],[1,"pm-icons-container"],[1,"pm-icons",3,"src","alt"]],template:function(e,t){1&e&&(kf(0,"div")(1,"span",0),am(2,"Accepted payments"),xf(),kf(3,"div",1),ph(4,N7,2,2,"div",2),xf(
1),kf(5,"span",3),am(6,"Available payment methods vary by transaction"),xf()()),2&e&&(Vd(4),zh("ngForOf",t.payment_methods))},dependencies:[oy],styles:[".accepted-payments-heading[_ngcontent-%COMP%]{font-family:Poppins;font-weight:500;font-size:16px;line-height:20.8px;color:#2a2928}.pm-icons-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.pm-icons-container[_ngcontent-%COMP%]{padding:4px 1.5px}.pm-icons[_ngcontent-%COMP%]{width:24px;height:24px}.accepted-payments-note[_ngcontent-%COMP%]{font-family:Nunito Sans,sans-serif;font-weight:400;font-size:12px;line-height:17.4px;color:#6e6e6d}"]})}}return e})(),V7=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),q7={checkoutErumsUrl:"/erums/checkout",cartUrl:"/erums/cart",cartDNFURL:"/erums/cart/dnf",dev1:{currentEnv:"dev1",baseURL:"https://www-dev1.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!1,enableMultiSub:!1,enableUndoRemoveItem:!1,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},checkoutApiConfig:{url:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/erums/checkoutservice/api/v1/checkout",xapiUrl:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"f3ba69f8529240fe968d63ea58e1ee9f"},dnfApiConfig:{basePath:"/abs/qapub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01"},substitutionApiConfig:{url:"/abs/qapub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/qapub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01",paritySubsBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"3de9c228a6c54067a4d1206635490f46"},occoApiConfig:{url:"/abs/qapub/eapi/v1/collections",customCakeUrlprefix:"/abs/qapub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"425389586fbc4a6084fa0fc99f2df22a",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!0,giftingEnabledBanners:["safeway","albertsons"]},dev2:{currentEnv:"qa1",baseURL:"https://www-dev2.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!1,enableMultiSub:!1,enableUndoRemoveItem:!1,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},checkoutApiConfig:{url:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/erums/checkoutservice/api/v1/checkout",xapiUrl:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"f3ba69f8529240fe968d63ea58e1ee9f"},dnfApiConfig:{basePath:"/abs/qapub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01"},substitutionApiConfig:{url:"/abs/qapub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/qapub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01",paritySub
1sBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"3de9c228a6c54067a4d1206635490f46"},occoApiConfig:{url:"/abs/qapub/eapi/v1/collections",customCakeUrlprefix:"/abs/qapub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"425389586fbc4a6084fa0fc99f2df22a",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!0,giftingEnabledBanners:["safeway","albertsons"]},dev3:{currentEnv:"qa1",baseURL:"https://www-dev3.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!1,enableMultiSub:!1,enableUndoRemoveItem:!1,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v1/cart/",editCartAPI:"/abs/qapub/erums/orderservice/api/v2/orders/",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},checkoutApiConfig:{url:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/erums/checkoutservice/api/v1/checkout",xapiUrl:"https://dev1.apim.azwestus.stratus.albertsons.com/abs/devpub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"f3ba69f8529240fe968d63ea58e1ee9f",apimSubscriptionKeyValueXapi:null},dnfApiConfig:{basePath:"/abs/qapub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01"},substitutionApiConfig:{url:"/abs/qapub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/qapub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01",paritySubsBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"3de9c228a6c54067a4d1206635490f46"},occoApiConfig:{url:"/abs/qapub/eapi/v1/collections",customCakeUrlprefix:"/abs/qapub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"425389586fbc4a6084fa0fc99f2df22a",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!0,giftingEnabledBanners:["safeway","albertsons"]},qa1:{currentEnv:"qa1",baseURL:"https://www-qa1.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/qapub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"267402756dc5413ab6ec8bc403100042"},cartAPIDetails:{cartAPI:"/abs/qapub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"3e4673736413478c8153f99172d30318"}},checkoutApiConfig:{url:"/abs/qapub/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/qapub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"3e4673736413478c8153f99172d30318",apimSubscriptionKeyValueXapi:"3de9c228a6c54067a4d1206635490f46"},dnfApiConfig:{basePath:"/abs/qapub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01"},substitutionApiConfig:{url:"/abs/qapub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/qapub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"8ca6295a55f54368844b5982edc1cc01",paritySub
1sBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"493fe3f7844743df9ab27e7567c1ad4c"},occoApiConfig:{url:"/abs/qapub/eapi/v1/collections",customCakeUrlprefix:"/abs/qapub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"425389586fbc4a6084fa0fc99f2df22a",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingEnabledBanners:["safeway","albertsons"]},qa2:{currentEnv:"qa2",baseURL:"https://www-qa2.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/acceptancepub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"64e226bfbc1148d3b3f076a33d654595"},cartAPIDetails:{cartAPI:"/abs/acceptancepub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"26dfa6ab7afe4a88805ce9f5351b78b4"}},checkoutApiConfig:{url:"https://acceptance.apim.azwestus.stratus.albertsons.com/abs/acceptancepub/xapi/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/acceptancepub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"26dfa6ab7afe4a88805ce9f5351b78b4",apimSubscriptionKeyValueXapi:"d753175fa35346eebe07c811dec160cb"},dnfApiConfig:{basePath:"/abs/acceptancepub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"35570fd5f27f4d69948bafbb4dd4f878"},substitutionApiConfig:{url:"/abs/acceptancepub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/acceptancepub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"35570fd5f27f4d69948bafbb4dd4f878",paritySubsBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/acceptancepub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"3a263a69aa984aa8ad5de53cca713221"},occoApiConfig:{url:"/abs/acceptancepub/eapi/v1/collections",customCakeUrlprefix:"/abs/acceptancepub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"cd5019b1594648089d066545f8fc77fd",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingEnabledBanners:["safeway","albertsons"]},qa3:{currentEnv:"qa3",baseURL:"https://www-qa3.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABSStage/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/perfpub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"46d30fd9331a4faa9dd20dce1d4db0f3"},cartAPIDetails:{cartAPI:"/abs/perfpub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b029945667514b5a887e4764fa1f6df9"}},checkoutApiConfig:{url:"/abs/perfpub/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/perfpub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"b029945667514b5a887e4764fa1f6df9",apimSubscriptionKeyValueXapi:"4b205cdb19e04dfbac1f17a8df4dcd1a"},dnfApiConfig:{basePath:"/abs/perfpub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"6eb4decfcd01473aa5ee0a690cc39006"},substitutionApiConfig:{url:"/abs/perfpub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/perfpub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"6eb4decfcd01473aa5ee0a690cc39006",paritySub
1sBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/perfpub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"264af10b2f75481f9ec25a2f063bd5b4"},occoApiConfig:{url:"/abs/perfpub/eapi/v1/collections",customCakeUrlprefix:"/abs/perfpub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"0bcaf0d2e017493e8d99b89ce0bb5307",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingEnabledBanners:[]},stage:{currentEnv:"stage",baseURL:"https://www-stage.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABS/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/stagepub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"b47044a7120d4a25aba1738170f979aa"},cartAPIDetails:{cartAPI:"/abs/stgpub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"b67277d0d0d04e0da852c5e79b19b025"}},checkoutApiConfig:{url:"/abs/stgpub/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/stgpub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"b67277d0d0d04e0da852c5e79b19b025",apimSubscriptionKeyValueXapi:"e60423e93d254a44b7c13576c3c1a2ce"},dnfApiConfig:{basePath:"/abs/stgpub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"f8bee8d7e7d14a11ac8197d3088cbe3b"},substitutionApiConfig:{url:"/abs/stgpub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/stgpub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"f8bee8d7e7d14a11ac8197d3088cbe3b",paritySubsBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/stgpub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"c75c6d07b4224d71b55b6bc257444724"},occoApiConfig:{url:"/abs/stgpub/eapi/v1/collections",customCakeUrlprefix:"/abs/stgpub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"34d2a32e770a4e31aedf8c0a4a86d1f9",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingNewFlag:!1,giftingEnabledBanners:[]},betaprod:{currentEnv:"betaprod",baseURL:"https://www-beta.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABS/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/pub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"379d5b830a494af18fb37cb379afb675"},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"}},checkoutApiConfig:{url:"/abs/pub/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/pub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"095d5468d6eb4df0a2a522a2e55ac745",apimSubscriptionKeyValueXapi:"0550188475574504983fa3949e886cd7"},dnfApiConfig:{basePath:"/abs/pub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"7bad9afbb87043b28519c4443106db06"},substitutionApiConfig:{url:"/abs/pub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/pub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"7bad9afbb87043b28519c4443106db06",paritySub
1sBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/qapub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"3de9c228a6c54067a4d1206635490f46"},occoApiConfig:{url:"/abs/pub/eapi/v1/collections",customCakeUrlprefix:"/abs/pub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"93384240d75e4466b779f25966bb5f84",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingNewFlag:!1,giftingEnabledBanners:[]},prod:{currentEnv:"prod",baseURL:"https://www.{banner}.com",vineLogoUrl:"https://images.albertsons-media.com/is/image/ABS/wineshop-logo",dnfFlag:!0,enableMultiSub:!0,enableUndoRemoveItem:!0,webMessagesURL:"/content/dam/data/mobile/edfeeds/appwebmessages.json",snsConfig:{url:"/abs/pub/osar/snsorderorch/api/sns/",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"379d5b830a494af18fb37cb379afb675"},cartAPIDetails:{cartAPI:"/abs/pub/erums/cartservice/api/v2/cart",subscriptionKey:{key:"Ocp-Apim-Subscription-Key",value:"ce4dc2965ed34e6288cdad05f2ef2ed2"}},checkoutApiConfig:{url:"/abs/pub/erums/checkoutservice/api/v1/checkout",xapiUrl:"/abs/pub/xapi/erums/checkoutservice/api/v1/checkout",apimTraceHeader:"Ocp-Apim-Trace",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimTraceHeaderValue:"true",apimSubscriptionKeyValue:"095d5468d6eb4df0a2a522a2e55ac745",apimSubscriptionKeyValueXapi:"0550188475574504983fa3949e886cd7"},dnfApiConfig:{basePath:"/abs/pub/xapi/dnfservice",contentZoneEndpoint:"/content/web/getZone",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"7bad9afbb87043b28519c4443106db06"},substitutionApiConfig:{url:"/abs/pub/xapi/pdreco/substitution",multipleBpnUrl:"/abs/pub/xapi/pdreco/multi-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"7bad9afbb87043b28519c4443106db06",paritySubsBanners:["tomthumb","albertsons","vons","safeway","randalls","pavilions","jewelosco","carrsqc","acmemarkets","shaws","starmarket","haggen","andronicos","kingsfoodmarkets","balduccis"]},autoClipSubstitutionApiConfig:{url:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/single-substitution",multipleBpnUrl:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/multi-substitution",searchAutoClipSub:"/abs/pub/xapi/erums/substitutionservice/api/v1/subsxapi/search-substitution",apimSubscriptionKeyHeader:"Ocp-Apim-Subscription-Key",apimSubscriptionKeyValue:"0e9416f34249491ebed42fad1cad9681"},occoApiConfig:{url:"/abs/pub/eapi/v1/collections",customCakeUrlprefix:"/abs/pub/eapi/p",apimSubscriptionKeyHeader:"ocp-apim-subscription-key",apimSubscriptionKeyValue:"93384240d75e4466b779f25966bb5f84",clientAppHeader:"clientApp",clientAppValue:"web-portal",requestedByHeader:"requestedBy",requestedByValue:"CnC"},cartCategoryList:"1P,3P_MARKETPLACE,1P_Wine",isBetterTaxesEnabled:!1,giftingEnabledBanners:[]}},$7=function(e){return e.acmemarkets="Acme_RGB-1",e.albertsons="Albertsons_RGB-1",e.andronicos="Andronicos_RGB",e.balduccis="Balduccis_RGB",e.carrsqc="Carrs_RGB-1",e.haggen="Haggen_RGB",e.jewelosco="JewelOsco_Vert_Oval_RGB",e.kingsfoodmarkets="Kingsfoodmarkets_RGB",e.pavilions="Pavilions_RGB-1",e.randalls="Randalls_RGB-1",e.safeway="Safeway_RGB-1",e.shaws="Shaws_RGB-1",e.starmarket="StarMarket_RGB-1",e.tomthumb="TomThumb_RGB-1",e.vons="V
1ons_RGB-1",e.shopamigos="Amigos_RGB",e.shopmarketstreet="MarketStreet_RGB",e.shopunitedsupermarkets="unitedsupermarkets",e.shopalbertsonsmarket="AlbMarket_Horiz_RGB",e.acmemarkets_b2b="acmemarkets_logo_b2b",e.albertsons_b2b="albertsons_logo_b2b",e.andronicos_b2b="",e.balduccis_b2b="",e.carrsqc_b2b="",e.haggen_b2b="",e.jewelosco_b2b="B2B_Logo-JWL-1",e.kingsfoodmarkets_b2b="",e.pavilions_b2b="pavilions_logo_b2b",e.randalls_b2b="randalls_logo_b2b",e.safeway_b2b="safeway_logo_b2b",e.shaws_b2b="B2B_Logo-SHW-1",e.starmarket_b2b="B2B_Logo-STR-1",e.tomthumb_b2b="tomthumb_logo_b2b",e.vons_b2b="B2B_Logo-VNS-1",e.shopamigos_b2b="Amigos_RGB",e.shopmarketstreet_b2b="MarketStreet_RGB",e.shopunitedsupermarkets_b2b="unitedsupermarkets",e.shopalbertsonsmarket_b2b="AlbMarket_Horiz_RGB",e}($7||{}),j7=function(e){return e.acmemarkets="acme-logo-svg",e.albertsons="albertsons-logo-svg",e.andronicos="andronicos-logo-svg",e.balduccis="balduccis-logo-svg",e.carrsqc="carrs-logo-svg",e.haggen="haggen-logo-svg",e.jewelosco="jewelosco-logo-svg",e.kingsfoodmarkets="kings-logo-svg",e.pavilions="pavilions-logo-svg",e.randalls="randalls-logo-svg",e.safeway="safeway-logo-svg",e.shaws="shaws-logo-svg",e.starmarket="starmarket-logo-svg",e.tomthumb="tomthumb-logo-svg",e.vons="vons-logo-svg",e.shopamigos="amigos_logo_only_new",e.shopmarketstreet="marketstreet_logo_only_new",e.shopunitedsupermarkets="unitedmarkets_logo_only_new",e.shopalbertsonsmarket="albertsonsmarkets_logo_only_new",e}(j7||{}),z7={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},W7=(e,t=!1)=>e.split(" ").map((e=>(t||(e=e.endsWith(",")?e.slice(0,-1):e),z7.hasOwnProperty(e.toLowerCase())?z7[e.toLowerCase()]:e))).join(" "),H7=(e,t)=>{setTimeout((()=>{$(e.element)?.attr("aria-label",t),$(e.element)?.trigger("focus")}),100),setTimeout((()=>{$(e.element)?.removeAttr("aria-label")}),750)},Y7=e=>"b"===window.analyticsSwy?.testFlags?.abACIP141528||q7[e].isBetterTaxesEnabled;var G7={tomthumb:{banner:"Tom Thumb",savings:"Member price savings",j4u:"Tom Thumb for U savings"},albertsons:{banner:"Albertsons",savings:"Sale price savings",j4u:"for U savings"},vons:{banner:"Vons",savings:"Member price savings",j4u:"Vons for U savings"},safeway:{banner:"Safeway",savings:"Member price savings",j4u:"Safeway for U savings"},randalls:{banner:"Randalls",savings:"Member price savings",j4u:"Randalls for U savings"},pavilions:{banner:"Pavilions",savings:"Member price savings",j4u:"Pavilions for U savings"},jewelosco:{banner:"Jewel-Osco",savings:"Sale price savings",j4u:"for U savings"},carrsqc:{banner:"Carrs",savings:"Member price savings",j4u:"Carrs for U savings"},acmemarkets:{banner:"Acme",savings:"Sale price savings",j4u:"Acme for U savings"},shaws:{banner:"Shaws",savings:"Sale price savings",j4u:"Shaws for U savings"},starmarket:{banner:"Star Market",savings:"Sale price savings",j4u:"for U savings"},haggen:{banner:"Haggen",savings:"Sale price savings",j4u:"Haggen for U savings"},andronicos:{banner:"Andronicos",savings:"Sale price savings",j4u:"for U savings"},balduccis:{banner:"Balduccis",savings:"Market price savings",j4u:"for U savings"},kingsfoodmarkets:{banner:"Kingsfoodmarkets",savings:"Member price savings",j4u:"Kings for U savings"},shopamigos:{banner:"Amigos",savings:"Member price savings",j4u:"Amigos for U savings"},shopmarketstreet:{banner:"Market Street",savings:"Member price savings",j4u:"Market Street for U savings"},shopunitedsupermarkets:{banner:"United Supermarkets",savings:"Member price savings",j4u:"United for U savings"},shopalbertsonsmarket:{banner:"Albertsons Market",savings:"Member price savings",j4u:"Albertsons for U savings"}},K7=(()=>{class e{constructor(){this.snackBarEventEmitter$=new Et(1),this.genericEventEmitor=this.snackBarEventEmitter$.asObservable(),this.$snackBar=new Et(1),this.snackBar=this.$snackBar.asObservable(),this.$closeSnackbar=new Et(1),this.closeSnackBar=this.$closeSnackbar.asObservable()}setSnackBar(e){this.$snackBar.next(e)}closeSnackBarInfo(){this.$closeSnackbar.next(!0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Q7=(()=>{class e{static{this.SUTRO_BANNERS=["kingsfoodmarkets","albertsons","shopalbertsonsmarket","shopunitedsupermarkets"]}static{this.PRESIDIO_BANNERS=["andronicos","starmarket","haggen","shaws","shopamigos"]}static{this.FORT_POINT_BANNERS=["balduccis"]}static{this.BAKER_BANNERS=["pavilions"]}static{this.REDWOOD_BANNERS=["shopmarketstreet"]}buildHeaders(){let e=this.httpOptions;return e.headers=e.headers.set("Ocp-Apim-Subscription-Key",this.config[this.env].searchAPIDetails.subscriptionKey.value),e}buildHeadersWithToken(e,t,i){let n=h({},this.httpOptions);return n.headers=n.headers.set("Ocp-Apim-Subscription-Key",i[t].cartAPIDetails.subscriptionKey.value),n.headers=n.headers.set("authorization","Bearer "+e),n.headers=n.headers.set("slotsRequired","true"),n.headers=n.headers.set("x-swy-client-id","web-portal"),n.headers=n.headers.set("Content-Type","application/json"),n}buildSubstitutionHeaders(e,t,i){let n=this.httpOptions;return i[t].substitutionApiConfig.apimSubscriptionKeyValue&&(n.headers=n.headers.set(i[t].substitutionApiConfig.apimSubscriptionKeyHeader,i[t].substitutionApiConfig.apimSubscriptionKeyValue)),n}buildAutoClipSubstitutionHeaders(e,t,i){let n=this.httpOptions;return n.headers=n.headers.set("Ocp-Apim-Subscription-Key",i[t].autoClipSubstitutionApiConfig.apimSubscriptionKeyValue),n.headers=n.headers.set("authorization","Bearer "+e),n.headers=n.headers.set("platform","web"),n}buildSnsHeaders(e,t,i,n){let r=h({},this.httpOptions);return null!==this.config[this.env].snsConfig.apimSubscriptionKeyValue&&(r.headers=r.headers.set(this.config[this.env].snsConfig.apimSubscriptionKeyHeader,this.config[this.env].snsConfig.apimSubscriptionKeyValue)),null!=e&&(r.headers=r.headers.set("Authorization","Bearer "+e)),r.headers=r.headers.set("Content-Type","application/vnd.safeway.v1+json"),r.headers=r.headers.set("Accept","application/vnd.safeway.v1+json"),r.headers=r.headers.set("x-swy-client-name",n),r.headers=r.headers.set("x-swy-correlation-id","1"),r.headers=r.headers.set("cookie",""),r.headers=r.headers.set("x-swy-banner",n),r}constructor(e,t,i,n){this.http=e,this._aemService=t,this.snackBarService=i,this._userInfoService=n,this.config=q7,this.accessToken="",this.CART_URL=q7.cartUrl,this.CHEKCOUT_ERUMS_URL=q7.checkoutErumsUrl,this.CART_DNF_URL=q7.cartDNFURL,this._substituteItem=new kt,this.substituteItem$=this._substituteItem.asObservable(),this._couponDetail
1s=new kt,this.couponDetails$=this._couponDetails.asObservable(),this._multiSubstitution=new kt,this.multiSubstitution$=this._multiSubstitution.asObservable(),this._hideStepper=new kt,this.hideStepper$=this._hideStepper.asObservable(),this.giftEnabled=new kt,this.$giftEnabled=this.giftEnabled.asObservable(),this.giftResponse=new Et(1),this.$giftResponse=this.giftResponse.asObservable(),this.$focusInfo=new Tt(void 0),this.focusInfo=this.$focusInfo.asObservable(),this.updateCartData=new Et(1),this.$updateCartData=this.updateCartData.asObservable(),this.isDnfEligible=!1,this.httpOptions={headers:new jy({"Content-Type":"application/json","Cache-Control":"no-cache"})},window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?(this.env="qa1",this.config[this.env].cartAPIDetails.cartAPI="https://www-"+this.env+".safeway.com"+this.config[this.env].cartAPIDetails.cartAPI):window.location.origin.indexOf("qa1")>0?this.env="qa1":window.location.origin.indexOf("qa2")>0?this.env="qa2":window.location.origin.indexOf("beta")>0?this.env="betaprod":this.env="prod"}getAccessToken(){return this._aemService.getSWY_SHOP_TOKEN()?this._aemService.getSWY_SHOP_TOKEN():this.accessToken}getDnfEligibility(){return this.isDnfEligible}setDnfEligibility(e){this.isDnfEligible=e}getSnsFrequency(e,t,i){let n=this.config[this.env].snsConfig.url+e+"/allsubscriptions?banner="+i;return this.http.get(n,this.buildSnsHeaders(t,this.env,this.config,i)).pipe(bi((e=>e)))}getCartByCustId(e,t,i,n,r,s,a){let o="B"===this._userInfoService?.getSiteType()?.toUpperCase(),l=this.config[this.env].cartAPIDetails.cartAPI+"/customer/"+e+"?type=mini&storeId="+i+"&zipCode="+s+(o?"&cartCategoryList=1P_B2B":"&cartCategoryList="+this.config[this.env].cartCategoryList)+"&expressChk=true";Y7(this.env)&&(l+="&tax=true");return this.http.post(l,{},this.buildHeadersWithToken(n,this.env,this.config)).pipe(bi((e=>(this.updateCartData.next({carts:e,allowCartRefresh:!1}),e))))}generateCommonParams(e,t){let i=(new Ky).set("serviceType",e.serviceType).set("storeId",e.primaryStoreId?e.primaryStoreId:e.storeId).set("zipCode",e.zipCode).set("expressChk","true").set("cartCategoryList","1P_B2B"===e.cartCategory?"1P_B2B":this.config[this.env].cartCategoryList);return e.seller&&(i=i.set("sellerId",e.seller.sellerId)),t&&!e.seller&&(i=i.set("cartId",e.cartId)),Y7(this.env)&&(i=i.set("tax","true")),i}updateCartItem(e,t,i,n,r,s,a){let o=this.config[this.env].cartAPIDetails.cartAPI,l=this.generateCommonParams(n);return this.http.post(`${o}/items`,i,{headers:this.buildHeadersWithToken(r,this.env,this.config).headers,params:l}).pipe(bi((e=>(this.updateCartData.next({carts:e,allowCartRefresh:!0}),this.snackBarService.snackBarEventEmitter$.next({type:"close-snack-bar"}),e))))}removeCartItem(e,t,i,n,r,s){let a={headers:this.buildHeadersWithToken(i,this.env,this.config).headers,body:r},o=this.config[this.env].cartAPIDetails.cartAPI,l=this.generateCommonParams(e,e.cartId);return this.http.delete(`${o}/items`,f(h({},a),{params:l})).pipe(bi((e=>(this.updateCartData.next({carts:e,allowCartRefresh:!0,itemRemoved:!0}),e))))}removeOrder(e,t,i){let n=this.config[this.env].cartAPIDetails.cartAPI,r=(new Ky).set("expressChk","true");return"1P_B2B"===e.cartCategory&&(r=r.set("cartCategoryList","1P_B2B"===e.cartCategory?"cartCategoryList=1P_B2B":"cartCategoryList="+this.config[this.env].cartCategoryList)),e.seller&&(r=r.set("sellerId",e.seller.sellerId)),this.http.delete(`${n}/${e.cartId}`,{headers:this.buildHeadersWithToken(t,this.env,this.config).headers,params:r}).pipe(bi((e=>(this.updateCartData.next({carts:e,allowCartRefresh:!0}),this.snackBarService.snackBarEventEmitter$.next({type:"close-snack-bar"}),e))))}removeMultipleCartItems(e,t,i,n,r){let s={headers:this.buildHeadersWithToken(t,this.env,this.config).headers,body:i},a=this.config[this.env].cartAPIDetails.cartAPI,o=this.generateCommonParams(e,e.cartId);return this.http.request("delete",`${a}/items`,f(h({},s),{params:o})).pipe(bi((e=>(this.updateCartData.next({carts:e,allowCartRefresh:!0}),this.snackBarService.snackBarEventEmitter$.next({type:"close-snack-bar"}),e))))}updateBagPreference(e,t,i,n){let r={preferenceList:[{cartCategory:t,storeId:i}],bagToggleEnabled:n},s=this.config[this.env].cartAPIDetails.cartAPI+"/preferences?tax=true";return this.http.put(s+"&expressChk=true",r,this.buildHeadersWithToken(e,this.env,this.config)).pipe(bi((e=>e)))}getItemsWithBpns(e,t,i,n,r,s){if(r){let r={headers:this.buildAutoClipSubstitutionHeaders(i,this.env,this.config).headers},a=window.AB.userInfo.houseId,o={bpns:t.join(),storeId:e,hhid:a,placement:"cart",banner:n,channel:s,bruid:"uid=28284fa02e744aa9:v=2023.28.0:ts=1701735179276:hc=1",pageurl:"www.safeway.com",includeOffer:!0};return this.http.post(this.config[this.env].autoClipSubstitutionApiConfig.multipleBpnUrl,o,r).pipe(bi((e=>e)))}{let n,r={headers:this.buildSubstitutionHeaders(i,this.env,this.config).headers},s=this.config[this.env].substitutionApiConfig.multipleBpnUrl;return n=window.AB.userInfo.houseId?window.AB.userInfo.houseId:"350021886020",this.http.get(s+"?bpns="+t.join()+"&storeId="+e+"&hhid="+n+"&includeOffer=false&availabilityCheck=true",r).pipe(bi((e=>e)))}}routeToCart(e){location.href=this.CART_URL+(e?"?cartId="+e?.cartId:"")}routeToCheckout(e,t,i,n,r,s){if(window.AB&&window.AB.DATALAYER&&(r?window.AB.DATALAYER.setTopNavPreviousPage("express-checkout-minicart"):window.AB.DATALAYER.setTopNavPreviousPage("checkout-minicart")),s?.errorCode||s?.action||!t||!i||n?.seller||"1P_WINE"===n?.cartCategory){let e=window.uiRuntimeFlags?.hasOwnProperty("client")?window.uiRuntimeFlags.client:"",t=s?.errorCode&&"placeOrder"===s?.action?`&errorCode=${s.errorCode}&action=${s.action}`:"";
1location.href=this.CHEKCOUT_ERUMS_URL+"?"+(e&&"mobileApp"===e?"&client=mobileApp":"")+(n?.cartId?"cartId="+n?.cartId+(n?.seller?"&sellerId="+n?.seller?.sellerId:""):"")+t}else location.href=this.CART_DNF_URL}getPrimaryColor(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{color:"#004488"}:e.PRESIDIO_BANNERS.includes(i)?{color:"#1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{color:"#A83111"}:e.BAKER_BANNERS.includes(i)?{color:"#484440"}:{color:"#8C0E12"}}getBackgroundPrimaryColor(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#484440"}:e.REDWOOD_BANNERS.includes(i)?{"background-color":"#007bff"}:{"background-color":"#8C0E12"}}getPrimaryBorderStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{border:"solid 1px #484440"}:e.REDWOOD_BANNERS.includes(i)?{border:"solid 1px #007bff"}:{border:"solid 1px #8C0E12"}}getConfirmButtonStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#004488",color:"#fff",border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#1F520E",color:"#fff",border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#A83111",color:"#fff",border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#484440",color:"#fff",border:"solid 1px #484440"}:{"background-color":"#8C0E12",color:"#fff",border:"solid 1px #8C0E12"}}getDynamicStyle(t){let i=t?.toLowerCase();return e.SUTRO_BANNERS.includes(i)?{"background-color":"#fff",color:"#004488",border:"solid 1px #004488"}:e.PRESIDIO_BANNERS.includes(i)?{"background-color":"#fff",color:"#1F520E",border:"solid 1px #1F520E"}:e.FORT_POINT_BANNERS.includes(i)?{"background-color":"#fff",color:"#A83111",border:"solid 1px #A83111"}:e.BAKER_BANNERS.includes(i)?{"background-color":"#fff",color:"#484440",border:"solid 1px #484440"}:{"background-color":"#fff",color:"#8C0E12",border:"solid 1px #8C0E12"}}getCurrentEnvironment(){return this.env}getWebMessages(e){let t=this.config[this.env].webMessagesURL;return window.location.origin.indexOf("localhost")>-1&&(t="https://www-qa1.safeway.com/"+t.replace(/^\//,"")),this.http.get(t)}getUsStates(e,t){let i=localStorage.getItem("usStatesObj")?JSON.parse(localStorage.getItem("usStatesObj")):null;return i?.[e]?fi(i[e]):this.http.get("/erums/cart/us/states").pipe(bi((t=>(localStorage.setItem("usStatesObj",JSON.stringify(t)),t[e]))))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(K7),lr(_w))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),J7=(()=>{class e{constructor(e){this.http=e,this.config=q7,this.httpOptions={headers:new jy},this.cartLoadData=new Tt({}),this.$cartLoadData=this.cartLoadData.asObservable(),window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0?(this.env="qa2",this.config[this.env].dnfApiConfig.basePath="https://www-"+this.env+".safeway.com"+this.config[this.env].dnfApiConfig.basePath):window.location.origin.indexOf("beta")>0?this.env="betaprod":this.env="prod",this.httpOptions.headers=this.httpOptions.headers.set(this.config[this.env].dnfApiConfig.apimSubscriptionKeyHeader,this.config[this.env].dnfApiConfig.apimSubscriptionKeyValue),this.httpOptions.headers=this.httpOptions.headers.set("platform","CnC-Web")}getContent(e,t,i,n,r,s){let a={zone:r||"zone1",screenName:s||"dnf",banner:n,storeId:e,channel:"delivery"===t.toLowerCase()?"delivery":"pickup",cartItems:window.AB?.COMMON?.authorize()?this.getProductBPNFromCartObj(!0):[]};if(this.httpOptions.headers=this.httpOptions.headers.set("x-access-token",i),window.AB&&window.AB.COMMON&&window.AB.COMMON.isB2BSite&&window.AB.COMMON.isB2BSite()&&(this.httpOptions.headers=this.httpOptions.headers.set("pgm","1P_B2B")),window.AB?.COMMON?.isLSCompatible&&"function"==typeof window.AB.COMMON.isLSCompatible&&window.AB.COMMON.isLSCompatible()){let e=localStorage.getItem("timezone");e&&(a.deliveryTimeZone=e)}let o=this.config[this.env].dnfApiConfig.basePath+this.config[this.env].dnfApiConfig.contentZoneEndpoint;return this.http.post(o,a,this.httpOptions)}getEnvironment(){return this.env}getProductBPNFromCartObj(e){let t=[];if(window.AB?.COMMON?.isLSCompatible()){if(e){let e=JSON.parse(localStorage.getItem("oosBPNs")),i=e?.data;e?.expirationTimeStamp<(new Date).getTime()&&(localStorage.removeItem("oosBPNs"),i=[]),i&&i.length>0&&t.push(...i)}let i=localStorage.getItem("abCart");return i&&(i=JSON.parse(i),i&&i.cartItems?.length>0&&"ABS"===i.cartSource&&"1P"===i.cartCategory&&i.cartItems.forEac
1h((e=>{e.itemId&&t.push({bpn:e.itemId.toString()})}))),t}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Z7=(()=>{class e{constructor(){this.$destroyed=new kt,this.removeLocalStorage=e=>{Array.isArray(e)&&e.forEach((e=>localStorage.removeItem(e)))},this.setLocalStorage=e=>{Array.isArray(e)&&e.forEach((e=>{let{key:t,value:i}=e;localStorage.setItem(t,i)}))},this.removeLSAsync=e=>v(this,null,(function*(){return Array.isArray(e)?yield e.forEach((e=>{localStorage.removeItem(e)})):"string"==typeof e?yield localStorage.removeItem(e):yield null}))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),X7=(()=>{class e{constructor(e,t){this.http=e,this.localStorageService=t}routeToReSignIn(){this.deleteCookie("SWY_SHARED_SESSION_INFO","SWY_SYND_USER_INFO"),location.href="/bin/safeway/sso?goto="+encodeURIComponent(window.location.href)}getCookie(e){let t=(e=this.validateBizCookie(e))+"=",i=decodeURIComponent(document.cookie).split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return""}deleteCookie(...e){e.forEach((e=>{e=this.validateBizCookie(e),document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"}))}validateBizCookie(e){return e.startsWith("B_")?e:this.isBizDomain?`B_${e}`:e}validateSession(){if(window.location.href.indexOf("localhost")<0){if(""===this.getCookie("SWY_SHARED_SESSION_INFO"))return this.routeToReSignIn(),!1;{let e=JSON.parse(this.getCookie("SWY_SHARED_SESSION_INFO"));if(!e||"G"===e.info.COMMON.userType)return this.routeToReSignIn(),!1}}return!0}getUserClaims(){let e=window.AB?.userInfo;return e?.customerId&&e?.zipcode?{aln:e?.clubCard,hid:e?.houseId,zip:e?.zipcode,gid:e?.customerId}:this.userClaims}setUserClaims(e){this.userClaims=e}logUncalledSignifySignal(e){this.http.post("/erums/checkout/ui/logger",e).subscribe()}removeAEMDependencyCookiesAndStorage(){this.localStorageService.removeLocalStorage(["cartId","abCart","abSlot","ccActiveSlot","ccActiveSlotFlag","abRewards","abOrderCount","abNgSubscriptions"]),["cartId","abCart","ECommCartPrice","ECommCartQty","signifyd_sessionId"].forEach((e=>{this.getCookie(e)&&this.deleteCookie(e)}))}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Z7))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),e8=(()=>{class e{transform(e){let t=e;if("kingsfoodmarkets"===e?.toLowerCase())t="kings";return t}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"formatBanner",type:e,pure:!0,standalone:!0})}}return e})(),t8=(()=>{class e{transform(e,t){return"Club Card Savings"==e&&t?.savings?t.savings:"Just for U Savings"==e&&t?.j4u?t.j4u:"freshpass"==e.toLowerCase()?"FreshPass savings":e}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"loyaltyPgrm",type:e,pure:!0,standalone:!0})}}return e})(),i8=(()=>{class e{transform(e){return e.replace(/\s/g,"")}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"trimWhitespace",type:e,pure:!0,standalone:!0})}}return e})(),n8=(()=>{class e{buildPlaceOrderHeader(e){let t=h({},this.httpOptions);return null!==this.config[this.env].checkoutApiConfig.apimTraceHeaderValue&&(t.headers=t.headers.set(this.config[this.env].checkoutApiConfig.apimTraceHeader,this.config[this.env].checkoutApiConfig.apimTraceHeaderValue)),null!==this.config[this.env].checkoutApiConfig.apimSubscriptionKeyValue&&(t.headers=t.headers.set(this.config[this.env].checkoutApiConfig.apimSubscriptionKeyHeader,this.config[this.env].checkoutApiConfig.apimSubscriptionKeyValueXapi)),null!=e&&(t.headers=t.headers.set("Authorization","Bearer "+e)),t.headers=t.headers.set("x-swy-client-id","web-portal"),t.headers=t.headers.set("x-fds-Id",this.generateFdsId()),t}logUncalledSignifySignal(e,t){let i={isExpressCheckout:!0,name:"DTSId",dtsId:e,orderId:t,gid:this.authService?.getUserClaims()?.gid||""};this.authService.logUncalledSignifySignal(i)}constructor(e,t){this.authService=e,this.http=t,this.config=q7,this.httpOptions={headers:new jy({"Content-Type":"application/json","Cache-Control":"no-cache"})},window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?(this.env="qa1",this.config[this.env].checkoutApiConfig.xapiUrl="https://www-"+this.env+".safeway.com"+this.config[this.env].checkoutApiConfig.xapiUrl):window.location.origin.indexOf("qa1")>0?this.env="qa1":window.location.origin.indexOf("qa2")>0?this.env="qa2":window.location.origin.indexOf("beta")>0?this.env="betaprod":this.env="prod"}generateFdsId(){return this.authService.getCookie("signifyd_sessionId")||this.create_sessionid()}create_sessionid(){let e=(new Date).getTime(),t="xxxHxxxx-xxxx-Pxxx-yxxx-yyxy-xxxxxxx_xxxx".replace(/[xy]/g,(function(t){let i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}));return this.logUncalledSignifySignal(t),t}placeOrder(e,t,i){let n=this.config[this.env].checkoutApiConfig.xapiUrl.replace(/\{banner\}/g,i);return e?.userClaims&&this.authService.setUserClaims(e.userClaims),this.http.post(n+"/express/placeorder",e,this.buildPlaceOrderHeader(t))}static{this.ɵfac=function(t){return new(t||e)(lr(X7),lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e}
1)(),r8=["minicartContainer"],s8=["miniCartPanel"],a8=["substitutionPanel"],o8=["multiSubstitutionPanel"],l8=["giftPanel"];function c8(e,t){if(1&e){let e=Mf();kf(0,"button",8),jf("click",(function(){return Wa(e),Ha(Yf().closeMiniCart())}))("keyup.enter",(function(){return Wa(e),Ha(Yf().closeMiniCart())})),xf()}}function d8(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",20)(2,"button",21),jf("click",(function(){return Wa(e),Ha(Yf(3).routeToCart())})),am(3,"View order"),xf()(),kf(4,"div",22)(5,"button",23),jf("click",(function(){return Wa(e),Ha(Yf(3).routeToCheckout())})),am(6,"Checkout"),xf()(),Df()}if(2&e){let e=Yf(3);Vd(2),zh("ngStyle",e.disableViewOrderButton?null:e.getDynamicStyle)("disabled",e.disableViewOrderButton),Vd(3),zh("disabled",e.disableCheckoutButton),gh("aria-disabled",e.disableCheckoutButton)}}function u8(e,t){if(1&e){let e=Mf();kf(0,"div",20)(1,"button",24),jf("click",(function(){return Wa(e),Ha(Yf(3).routeToCheckout())})),am(2,"Review order"),xf()(),kf(3,"div",22)(4,"button",23),jf("click",(function(){return Wa(e),Ha(Yf(3).placeOrder())})),am(5),xf()(),kf(6,"div",25)(7,"span",26),am(8,"Estimated taxes and fees included"),xf(),kf(9,"span",27),am(10,"Est. taxes and fees included"),xf()()}if(2&e){let e=Yf(3);Vd(),zh("ngStyle",e.disableViewOrderButton?null:e.getDynamicStyle)("disabled",e.disableViewOrderButton),Vd(3),zh("disabled",e.disableCheckoutButton),gh("aria-disabled",e.disableCheckoutButton),Vd(),lm(e.expressCheckoutPlaceOrderCTA)}}function p8(e,t){if(1&e&&(kf(0,"p",33),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(4);Vd(),cm("",jm(2,1,null==e.carts[0]?null:e.carts[0].summary.minCartThresholdValue,"USD")," minimum")}}function h8(e,t){if(1&e&&(kf(0,"p",34),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(4);Vd(),cm("",jm(2,1,null==e.carts[0]?null:e.carts[0].summary.minCartThresholdValue,"USD")," minimum")}}function f8(e,t){1&e&&(kf(0,"p",35),am(1,"Not available in your ZIP"),xf())}function m8(e,t){if(1&e&&(kf(0,"div",28)(1,"div",29),ph(2,p8,3,4,"p",30)(3,h8,3,4,"p",31)(4,f8,2,0,"p",32),xf()()),2&e){let e=Yf(3);Vd(2),zh("ngIf",null==e.carts[0]?null:e.carts[0].isAvailable),Vd(),zh("ngIf",null==e.carts[0]?null:e.carts[0].isAvailable),Vd(),zh("ngIf",(null==e.carts?null:e.carts.length)&&!(null!=e.carts[0]&&e.carts[0].isAvailable))}}function g8(e,t){if(1&e&&(Ef(0),kf(1,"div",17),ph(2,d8,7,4,"ng-container",18)(3,u8,11,5,"ng-template",null,5,Wm),xf(),ph(5,m8,5,3,"div",19),Df()),2&e){let e=sm(4),t=Yf(2);Vd(2),zh("ngIf",!t.isExpressCheckoutEligible)("ngIfElse",e),Vd(3),zh("ngIf",!(null!=t.cartConfig&&t.cartConfig.isCheckoutEnabled))}}function b8(e,t){if(1&e){let e=Mf();kf(0,"div",36)(1,"mini-cart-v2",37),jf("cartConfigEmitter",(function(t){return Wa(e),Ha(Yf(2).updateCartConfig(t))})),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);gh("aria-label","1P_WINE"===e.cartCategory?"Vine & Cellar":(null==e.seller?null:e.seller.sellerName)||e.banner),Vd(),zh("cartIndex",i)("cart",e)("isSingleCart",n.isSingleCart)("token",n.token)("banner",n.banner)("storeId",n.storeId)("type",n.type)("customerId",n.customerId)("isAutoClipEnabled",e.isAutoClipEnabled)("bannerName","1P_WINE"===e.cartCategory?"Vine & Cellar":(null==e.seller?null:e.seller.sellerName)||e.banner)("webMessages",n.webMessages)("isExpressCheckoutEligible",n.isExpressCheckoutEligible)}}function y8(e,t){1&e&&(kf(0,"div",38),Tf(1,"app-accepted-payments-card"),xf())}function v8(e,t){1&e&&(Ef(0),Tf(1,"mini-cart-v2"),Df())}function w8(e,t){if(1&e&&(kf(0,"div",9)(1,"div",10)(2,"span",11),am(3,"Cart"),xf(),kf(4,"h1",12),am(5,"Cart"),xf(),ph(6,g8,6,3,"ng-container",13),xf(),kf(7,"div",14),ph(8,b8,2,13,"div",15)(9,y8,2,0,"div",16)(10,v8,2,0,"ng-container",13),xf()()),2&e){let e=Yf();gh("aria-hidden",e.showLoader),Vd(6),zh("ngIf",(null==e.carts?null:e.carts.length)<2),Vd(),Yh("scroll-block",e.enableCloseButton),Vd(),zh("ngForOf",e.carts)("ngForTrackBy",e.cartTrackBy),Vd(),zh("ngIf",!e.cartEmpty),Vd(),zh("ngIf",e.cartEmpty)}}function _8(e,t){if(1&e){let e=Mf();kf(0,"substitution-dst",39),jf("backEventTrigger",(function(){return Wa(e),Ha(Yf().onSubstitutionBackClick())}))("itemSelected",(function(t){return Wa(e),Ha(Yf().substitutionSelectedItem(t))}))("substitutionServiceError",(function(t){return Wa(e),Ha(Yf().failureCallback(t))})),xf()}if(2&e){let e=Yf();zh("substitutionItemData",e.substitutionInfo.substitutionProducts)("itemId",e.substitutionInfo.productId)("product",e.substitutionInfo.product)("cartId",e.substitutionInfo.cartId)("isAutoClipEnabled",e.substitutionInfo.isAutoClipEnabled)("orderId",e.substitutionInfo.orderId)("storeId",e.storeId)("serviceType",e.serviceType)("zipCode",e.zipCode)("token",e.token)("banner",e.banner)("quantity",e.substitutionInfo.quantity)("sourceItem",e.substitutionInfo.sourceItem)("isBetterTaxEnabled",e.isBetterTaxEnabled)("isExpressCheckoutEnabled",e.isExpressCheckoutEligible)("substitutePreference",e.substitutionInfo.substitutePreference)("editOrderFlag",e.substitutionInfo.editOrderFlag)("subConfirmFlag",!1)("isMiniCartFlag",!0)("enableMiniCartBackButton",!0)("enableCloseButton",!1)("enableBackHeader",!0)("cartCategory",e.substitutionInfo.cartCategory)("newSubViewFlag",e.newSubsViewFlag)}}function S8(e,t){if(1&e){let e=Mf();kf(0,"multi-substitution-dst",40),jf("backEventTrigger",(function(){return Wa(e),Ha(Yf().onSubstitutionBackClick())}))("itemSelected",(function(t){return Wa(e),Ha(Yf().substitutionSelectedItem(t))}))("substitutionServiceError",(function(t){return Wa(e),Ha(Yf().failureCallback(t))})),xf()}if(2&e){let e=Yf();zh("storeId",e.storeId)("token",e.token)("banner",e.banner)("isMiniCartFlag",!0)("isAutoClipEnabled",e.multiSubstitutionInfo.isAutoClipEnabled)("editOrderFlag",!1)("subConfirmFlag",!1)("substitutionItemData",e.multiSubstitutionInfo.data)("enableBackHeader",!0)("enableCloseButton",!1)("cartId",e.multiSubstitutionInfo.cartId)("serviceType",e.serviceType)("zipCode",e.zipCode)("cartItems",e.multiSubstitutionInfo.cartItems)("isBetterTaxEnabled",e.isBetterTaxEnabled)("isExpressCheckoutEnabled",e.isExpressCheckoutEligible)("enableMiniCartBackButton",!0)("cartCategory",e.multiSubstitutionInfo.cartCategory)("newSubViewFlag",e.newSubsViewFlag)}}function C8(e,t){if(1&e){let e=Mf();kf(0,"gifting-component",41),jf("closeGift",(function(){return Wa(e),Ha(Yf().closeGift())}))("updateGiftMessage",(function(t){return Wa(e),Ha(Yf().updateGiftMessage(t))})),xf()}if(2&e){let e=Yf();zh("appName","minicart")("token",e.token)("giftingNewFlag",e.giftingNewFlag)("cart",e.giftCart)}}function I8(e,t){1&e&&Tf(0,"div",42)}var A8=(()=>{class e{constructor(e,t,i,n,r,s,a,o){this.miniCartService=e,this.substitutionService=t,this.cartV2Service=i,this.cartService=n,this.router=r,this.authService=s,this.snackBarService=a,this.checkoutService=o,this.miniCartEvent=ne
1w _l,this.cartUpdateEvent=new _l,this.closeMiniCartEvent=new _l,this.config=q7,this.carts=[],this.isSingleCart=!1,this.currentView="minicart",this.showLoader=!0,this.focusInfo=void 0,this.isExpressCheckoutEligible=!1,this.expressCheckoutPlaceOrderCTA="Place order",this.substitutionInfo={editOrderFlag:"",cartId:"",productId:"",quantity:"",orderId:"",substitutePreference:"",product:{},substitutionProducts:[],substituteItems:[],cartCategory:"",sourceItem:{},isAutoClipEnabled:""},this.multiSubstitutionInfo={cartId:"",cartItems:[],data:[],cartCategory:"",isAutoClipEnabled:""},this.analyticsIsAutoClipEnabled=!1,this.userInfo=window.AB.userInfo,console.log("Mini cart userInfo ---\x3e ",this.userInfo);let l=this.miniCartService.getCurrentEnvironment();this.newSubsViewFlag=q7[l]?.substitutionApiConfig?.paritySubsBanners?.includes(this.banner?.toLowerCase()),this.isBetterTaxEnabled=Y7(l),this.authService.isBizDomain="B"===this.userInfo?.siteType,this.updateCartSubscription=this.miniCartService.$updateCartData.subscribe((e=>{this.cartUpdateEvent.emit(e?.carts);let t=this.cartV2Service.transformMulticartResponse(e?.carts);this.cartService._set(t),this.multiCartSummary=e?.carts?.multiCartSummary,e?.allowCartRefresh&&this.carts?.length!==e?.carts?.carts?.length&&this.refreshCart(e.carts),e?.allowCartRefresh&&e?.itemRemoved&&this.checkExpressCheckoutEligibility(e.carts?.carts),this.isExpressCheckoutEligible&&window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setImpression&&window.AB.DATALAYER.setImpression("exp-mini-chk")})),window.addEventListener("smartSubstitutionCloseTriggered",(()=>{this.displayView("minicart")}))}ngOnInit(){this.validateURL();let e=this.miniCartService.getCurrentEnvironment();this.newSubsViewFlag=this.config[e]?.substitutionApiConfig?.paritySubsBanners?.includes(this.banner?.toLowerCase()),this.giftingNewFlag=this.config[e]?.giftingEnabledBanners?.includes(this.banner?.toLowerCase()),this.singleSubSubscription=this.miniCartService.substituteItem$.subscribe((e=>{let t="#mc-sub-"+e.cartId+"-"+e.product.itemId;this.focusInfo={focusId:t,cartId:e.cartId,cartLength:this.carts?.length,expandToggle:!0},e.product&&e.product.substituteItems&&(e.product.substituteItems[0].Subflag=!0),this.onSubstituteProduct(e.product,e.cartId,e.cartCategory,e.cart,e.cart?.isAutoClipEnabled)})),this.multiSubSubscription=this.miniCartService.multiSubstitution$.subscribe((e=>{let t=`#${e.cartId}-sub-all-item`;this.focusInfo={focusId:t,cartId:e.cartId,cartLength:this.carts?.length},this.onMultiSubstituteItems(e,e.cartId,e.cartCategory,e.isAutoClipEnabled)})),this.couponSubSubscription=this.miniCartService.couponDetails$.subscribe((e=>{this.miniCartEvent.emit({cartEvent:"couponDetails",details:{drawerType:"offer-detail",coupon:e.coupon,product:e.cartItem,programType:e.programType}})})),this.giftSubscription=this.miniCartService.$giftEnabled.subscribe((e=>{"openGift"===e.event&&(this.giftCart=e.data,this.displayView("gift"))})),this.getCartsByCustomerID(),this.getWebMessages(),this.displayView("minicart"),this.userInfo=window.AB.userInfo,console.log("Mini cart userInfo ---\x3e ",this.userInfo),this.authService.isBizDomain="B"===this.userInfo?.siteType}getWebMessages(){return v(this,null,(function*(){this.miniCartService.getWebMessages(this.banner).subscribe((e=>{this.webMessages=e,this.webMessages["FirstTimeCustomerPromoMessage-Delivery"]?.forEach((e=>{e?.banners?.includes(this.banner)&&(this.webMessages.messages["FirstTimeCustomerPromoMessage-Delivery"]||(this.webMessages.messages["FirstTimeCustomerPromoMessage-Delivery"]={}),this.webMessages.messages["FirstTimeCustomerPromoMessage-Delivery"][this.banner]=h({},e))})),this.webMessages["FirstTimeCustomerPromoMessage-Dug"]?.forEach((e=>{e?.banners?.includes(this.banner)&&(this.webMessages?.messages["FirstTimeCustomerPromoMessage-Dug"]||(this.webMessages.messages["FirstTimeCustomerPromoMessage-Dug"]={}),this.webMessages.messages["FirstTimeCustomerPromoMessage-Dug"][this.banner]=h({},e))}))}))}))}get isNavigationEngineDisabled(){return window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled}closeGift(){this.displayView("minicart","gifting_back_btn")}updateGiftMessage(e){let t;
1this.carts.forEach((i=>{t=i?.gift?.isGift?"Successfully saved changes":"Added gift message to your order",i?.cartId===e?.updatedCartId&&(i.gift=e.data)}));let i={message:t,type:"gift-cart-success",show:!0,closeOption:!0,from:"removeItem",timer:0,closeOnClick:!1,theme:"black",topVH:"1vh",rightVH:"3vh",bottomVH:"6vh",actionType:"gift-message-update",isAlwaysVisible:!1};"remove"===e.action?i.message="Removed gift option":"error"===e.action?(i.type="gift-cart-error",i.message="We couldn't save your gift details. Please try again."):"remove-error"===e.action?(i.type="gift-cart-error",i.message="We couldn't remove your gift details. Please try again."):"update-error"===e.action&&(i.type="gift-cart-error",i.message="We couldn't save the changes to your gift details. Please try again."),this.snackBarService.setSnackBar(i),this.displayView("minicart","gifting_message_update")}showGiftDisabledToast(e){e.carts.forEach((e=>{if(!e.isGiftEnabled&&e.isGiftRemoved){let e={message:"Your gift option was removed. Gifting is not supported in this location.",type:"gift-cart-error",show:!0,closeOption:!0,from:"showGiftDisabledToast",timer:0,closeOnClick:!1,bottomVH:"6vh",theme:"black",topVH:"8vh",rightVH:"0vh",isAlwaysVisible:!0};this.snackBarService.setSnackBar(e)}}))}validateURL(){document.querySelector('.mktp-header__page-info[data-isMKPpage="true"]')&&window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled&&(this.enableCloseButton=!0)}displayView(e,t){switch(this.currentView=e,this.removeCurrentView(),this.currentView){case"minicart":this.minicartContainer.createEmbeddedView(this.miniCartPanel);let e=document.getElementsByClassName("mini-cart-v2-close-button")[0];e&&"none"===e.style.display&&e.style.removeProperty("display"),t?("gifting_back_btn"===t||"gifting_message_update"===t)&&setTimeout((()=>{let e=document.querySelector(".gifting-container-cart");e&&e.focus()}),"gifting_message_update"===t?4e3:800):setTimeout((()=>{this.setDefaultFocus()}),800);break;case"substitution":this.setDefaultFocus(),this.minicartContainer.createEmbeddedView(this.substitutionPanel),this.updateFocusInfoDetails();break;case"multiSubstitution":this.setDefaultFocus(),this.minicartContainer.createEmbeddedView(this.multiSubstitutionPanel),this.updateFocusInfoDetails();break;case"gift":this.setDefaultFocus(),this.minicartContainer.createEmbeddedView(this.giftPanel),this.updateFocusInfoDetails()}}setDefaultFocus(){let e=document.querySelector(".right-drawer__close.mini-cart-v2-close-button");e&&e.focus()}updateFocusInfoDetails(){this.focusInfo&&(this.miniCartService.$focusInfo.next(h({},this.focusInfo)),this.focusInfo=void 0)}removeCurrentView(){this.minicartContainer.length>0&&this.minicartContainer.remove()}substitutionSelectedItem(e){e?.response?.carts?.length&&this.refreshCart(e?.response),this.displayView("minicart")}onSubstitutionBackClick(){this.displayView("minicart")}getChannel(){return window.AB.COMMON&&window.AB.COMMON.getUserChannel?window.AB.COMMON.getUserChannel():""}onSubstituteProduct(e,t,i,n,r){e&&(this.substitutionInfo.productId=e.id?e.id:e.itemId,this.substitutionInfo.cartCategory=i,this.substitutionInfo.quantity=e.qty,this.substitutionInfo.substitutePreference=e.substitutionPreferenceV2,this.substitutionInfo.substituteItems=e.substituteItems?.length?e.substituteItems:[],this.substitutionInfo.sourceItem=e,this.substitutionInfo.isAutoClipEnabled=r,this.substitutionInfo.product=h({},e)),this.substitutionInfo.cartId=t,this.analyticsIsAutoClipEnabled=n.isAutoClipEnabled;let s=window.AB.userInfo.houseId,a=this.getChannel(),o=e&&e.substituteItems&&e.substituteItems.length>0?e.substituteItems[0]:null,l="";o&&(l=o.id?o.id+"":o.itemId+""),this.substitutionService.getSubstitutionProducts(this.substitutionInfo.productId,l,this.storeId,s,!1,!0,a,!0,n.isAutoClipEnabled,this.token).subscribe({next:t=>{let i=[];0!==t.productsInfoCount?(i=t.productsinfo?t.productsinfo:t.productsInfo[0].substituteList,this.substitutionInfo.substituteItems?.length>0?(this.substitutionInfo.substituteItems[0].offers=[],this.substitutionInfo.substituteItems[0]?.savings?.forEach((e=>{e.ecomDescription=e?.displayOfferTxt,this.substitutionInfo.substituteItems[0].offers.push(e)})),this.substitutionInfo.substituteItems&&this.substitutionInfo.substituteItems[0].itemId!=parseInt(i[0]?.id)&&(this.substitutionInfo.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+this.substitutionInfo.substituteItems[0].itemId,this.substitutionInfo.substituteItems[0].id=this.substitutionInfo.substituteItems[0].itemId,this.substitutionInfo.substituteItems[0].Subflag=!0,i.map(((e,t)=>{this.substitutionInfo.substituteItems[0].itemId===parseInt(e.id)&&i.splice(t,1)})),i.unshift(this.substitutionInfo.substituteItems[0]))):this.substitutionInfo.substitutionProducts=[...i]):(i=[],this.substitutionInfo.substituteItems?.length>0&&(this.substitutionInfo.substituteItems[0].offers=[],this.substitutionInfo.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+this.substitutionInfo.substituteItems[0].itemId,this.substitutionInfo.substituteItems[0].id=this.substitutionInfo.substituteItems[0].itemId,this.substitutionInfo.substituteItems[0].Subflag=!0,this.substitutionInfo.substituteItems[0]?.savings?.forEach((e=>{e.ecomDescription=e?.displayOfferTxt,this.substitutionInfo.substituteItems[0].offers.push(e)})),i.push(this.substitutionInfo.substituteItems[0]))),this.substitutionInfo.substituteItems[0]&&(i[0].Subflag=!0),this.substitutionInfo.substitutionProducts=i,this.displayView("substitution"),window.AB&&window.AB.DATALAYER&&(window.AB.DATALAYER.setCarouselName("shop|mini_cart"),window.AB.DATALAYER.setSubstitutionModalView(this.substitutionInfo.substitutionProducts,this.substitutionInfo.substitutePreference,e,this.analyticsIsAutoClipEnabled))},error:t=>{this.substitutionInfo.substitutionProducts=[],this.displayView("substitution"),window.AB&&window.AB.DATALAYER&&(window.AB.DATALAYER.setCarouselName("shop|mini_cart"),window.AB.DATALAYER.setSubstitutionModalView(null,this.substitutionInfo.substitutePreference,e))}})}onMultiSubstituteItems(e,t,i,n){e&&(this.multiSubstitutionInfo=e,this.multiSubstitutionInfo.cartCategory=i,this.multiSubstitutionInfo.isAutoClipEnabled=n,this.displayView("multiSubstitution"))}getCartsByCustomerID(){this.snackBarService.closeSnackBarInfo(),this.customerId&&this.miniCartService.getCartByCustId(this.customerId,this.type,this.storeId,this.token,this.banner,this.zipCode,this.isExpressCheckoutEligible).subscribe((e=>{window.analyticsNumberOfCarts=e.carts?.length;let t=new Event("analyticsCartRespReady");window.analyticsCartInfoLoaded="responseReady",window.dispatchEvent(t),this.refreshCart(e),this.showGiftDisabledToast(e),this.multiCartSummary=e.multiCartSummary,$("#substitution-dst").show()}),(e=>{this.cartEmpty=!0,this.showLoader=!1,this.failureCallback(e)}))}refreshCart(e){let t=e.carts.filter((e=>"1P_B2B"===e.cartCategory));t.length>0?this.carts=t:this.carts=e.carts,0===this.carts.length?this.cartEmpty=!0:this.cartEmpty=!1,this.validateSingleCart(this.carts),this.cartEmpty&&this.cartConfig?.cartInfo&&(this.cartConfig.cartInfo=void 0),this.checkExpressCheckoutEligibility(this.carts),this.showLoader=!1}checkExpressCheckoutEligibility(e){1===e?.length&&e[0]?.slotInfo&&e[0]?.customerPreferences?.payments?.length&&!e[0]?.snsSubExists?this.isExpressCheckoutEligible=!0:this.isExpressCheckoutEligible=!1}validateSingleCart(e){1===e.length?this.isSingleCart=!0:this.isSingleCart=!1}updateCartConfig(e){setTimeout((()=>{this.cartConfig=h({},e)}),0)}closeMiniCart(){this.closeMiniCartEvent.emit(!0)}routeToCheckout(e){window.AB&&window.AB.DATALAYER&&(this.isExpressCheckoutEligible?window.AB.DATALAYER.setTopNavPreviousPage("express-checkout-minicart"):window.AB.DATALAYER.setTopNavPreviousPage("checkout-minicart")),this.miniCartService.getDnfEligibility()?location.href="/erums/cart/dnf":this.miniCartService.routeToCheckout(this.storeId,this.cartConfig.dnfTargetFlag,this.cartConfig.dnfFlag,this.cartConfig.cartInfo,this.isExpressCheckoutEligible,e)}routeToCart(){this.miniCartService.routeToCart(this.cartConfig?.cartInfo)}placeOrder(){if(this.miniCartService.getDnfEligibility())window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.set
1LinkClickEvents("mini-cart|exp-place-order"),location.href="/erums/cart/dnf?isexpress=true";else{let e=this.isSingleCart?this.carts[0]?.cartId:"";this.expressCheckoutPlaceOrderCTA="Processing",this.checkoutService.placeOrder({cartId:e?.toString(),storeId:this.storeId?.toString()},this.token,this.banner).subscribe({next:e=>{if(e?.errorCode?.includes("ORD-PMT"))this.redirectToCheckout(e);else if(this.authService.removeAEMDependencyCookiesAndStorage(),localStorage.removeItem("wheelchairAccessible"),e.order&&e.order.orderId){window.AB&&window.AB.DATALAYER&&localStorage.setItem("analyticsExpressCTAValue",`cta:${window.AB.DATALAYER.pathSections?.join(":")}|button|mini-cart-place-order`);let t="/erums/order/confirmation/"+e.order.orderId+"?a=b"+(0==window.uiRunTimeFlags?.showHeader?"&client=mobileApp":"");location.href=t}},error:e=>{(401!=e.status||403!=e.status)&&this.redirectToCheckout(e.error)},complete:()=>{this.expressCheckoutPlaceOrderCTA="Place order now"}})}}redirectToCheckout(e){localStorage.setItem(e.errorCode,JSON.stringify(e)),this.routeToCheckout({errorCode:e.errorCode,action:"placeOrder"})}failureCallback(e){(401===e.status||403===e.status)&&this.authService.routeToReSignIn()}get primaryColor(){return this.miniCartService.getPrimaryColor(this.banner)}get backgroundPrimaryColor(){return this.miniCartService.getBackgroundPrimaryColor(this.banner)}get getConfirmButtonStyle(){return this.miniCartService.getConfirmButtonStyle(this.banner)}get getDynamicStyle(){return this.miniCartService.getDynamicStyle(this.banner)}get disableCheckoutButton(){return!this.cartConfig?.isCheckoutEnabled||null==this.cartConfig?.dnfTargetFlag||!this.carts[0]?.isAvailable}get disableViewOrderButton(){return null==this.cartConfig?.dnfTargetFlag||!this.carts[0]?.isAvailable}cartTrackBy(e,t){return t.cartId}ngOnDestroy(){this.updateCartSubscription&&(delete window.analyticsCartInfoLoaded,delete window.analyticsCartnumber,delete window.analyticsNumberOfCarts,this.updateCartSubscription.unsubscribe()),this.singleSubSubscription&&this.singleSubSubscription.unsubscribe(),this.multiSubSubscription&&this.multiSubSubscription.unsubscribe(),this.couponSubSubscription&&this.couponSubSubscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Q7),$d(fC),$d(Mw),$d(Rw),$d(F7),$d(X7),$d(K7),$d(n8))}}static{this.ɵcmp=Qr({type:e,selectors:[["mini-cart-container"]],viewQuery:function(e,t){if(1&e&&(tm(r8,7,yp),tm(s8,7,Yu),tm(a8,7,Yu),tm(o8,7,Yu),tm(l8,7,Yu)),2&e){let e;im(e=nm())&&(t.minicartContainer=e.first),im(e=nm())&&(t.miniCartPanel=e.first),im(e=nm())&&(t.substitutionPanel=e.first),im(e=nm())&&(t.multiSubstitutionPanel=e.first),im(e=nm())&&(t.giftPanel=e.first)}},inputs:{customerId:"customerId",storeId:"storeId",token:"token",banner:"banner",type:"type",serviceType:"serviceType",zipCode:"zipCode",enableCloseButton:"enableCloseButton"},outputs:{miniCartEvent:"miniCartEvent",cartUpdateEvent:"cartUpdateEvent",closeMiniCartEvent:"closeMiniCartEvent"},decls:13,vars:2,consts:[["minicartContainer",""],["miniCartPanel",""],["substitutionPanel",""],["multiSubstitutionPanel",""],["giftPanel",""],["expressCheckoutCTA",""],["tabindex","0","aria-label","close Shopping cart","class","svg-close cart-dst-close-cart float-right","data-qa","mktp-crt-cls",3,"click","keyup.enter",4,"ngIf"],["class","cart-dst-loader","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],["tabindex","0","aria-label","close Shopping cart","data-qa","mktp-crt-cls",1,"svg-close","cart-dst-close-cart","float-right",3,"click","keyup.enter"],["id","mini-cart-dst",1,"marketplace-cart","cart
1-dst-container"],[1,"marketplace-cart__header"],["aria-hidden","true","id","blank-content","role","text","tabindex","-1","aria-label","Cart section",1,"sr-only"],["id","mini-cart-title","tabindex","-1","data-qa","mktp-crt-ttl",1,"marketplace-cart__title"],[4,"ngIf"],[1,"cart-dst-scroll-store"],["class","marketplace-cart__store","role","region",4,"ngFor","ngForOf","ngForTrackBy"],["class","accepted-payments-div",4,"ngIf"],[1,"row","mx-0","mt-3"],[4,"ngIf","ngIfElse"],["class","d-flex bd-highlight",4,"ngIf"],[1,"col-6","pl-0"],["aria-label","View Order",1,"btn","btn-lg","btn-secondary","cart-dst-header-button",3,"click","ngStyle","disabled"],[1,"col-6","pr-0"],[1,"btn","btn-lg","pds-btn-filled--primary","cart-dst-header-button",3,"click","disabled"],["aria-label","Review Order",1,"btn","btn-lg","btn-secondary","cart-dst-header-button",3,"click","ngStyle","disabled"],[1,"cart-dst-express-cta-info","d-flex","mx-auto","mt-3"],[1,"sr-only"],["aria-hidden","true"],[1,"d-flex","bd-highlight"],[1,"ml-auto","p-2","bd-highlight"],["class","d-block d-sm-none cart-dst-minimum-label text-right",4,"ngIf"],["class","d-none d-sm-block cart-dst-minimum-label pad-right",4,"ngIf"],["class","cart-dst-unavailable-msg",4,"ngIf"],[1,"d-block","d-sm-none","cart-dst-minimum-label","text-right"],[1,"d-none","d-sm-block","cart-dst-minimum-label","pad-right"],[1,"cart-dst-unavailable-msg"],["role","region",1,"marketplace-cart__store"],[3,"cartConfigEmitter","cartIndex","cart","isSingleCart","token","banner","storeId","type","customerId","isAutoClipEnabled","bannerName","webMessages","isExpressCheckoutEligible"],[1,"accepted-payments-div"],[3,"backEventTrigger","itemSelected","substitutionServiceError","substitutionItemData","itemId","product","cartId","isAutoClipEnabled","orderId","storeId","serviceType","zipCode","token","banner","quantity","sourceItem","isBetterTaxEnabled","isExpressCheckoutEnabled","substitutePreference","editOrderFlag","subConfirmFlag","isMiniCartFlag","enableMiniCartBackButton","enableCloseButton","enableBackHeader","cartCategory","newSubViewFlag"],[3,"backEventTrigger","itemSelected","substitutionServiceError","storeId","token","banner","isMiniCartFlag","isAutoClipEnabled","editOrderFlag","subConfirmFlag","substitutionItemData","enableBackHeader","enableCloseButton","cartId","serviceType","zipCode","cartItems","isBetterTaxEnabled","isExpressCheckoutEnabled","enableMiniCartBackButton","cartCategory","newSubViewFlag"],[3,"closeGift","updateGiftMessage","appName","token","giftingNewFlag","cart"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"cart-dst-loader"]],template:function(e,t){1&e&&(ph(0,c8,1,0,"button",6),Of(1,null,0),ph(3,w8,11,8,"ng-template",null,1,Wm)(5,_8,1,24,"ng-template",null,2,Wm)(7,S8,1,19,"ng-template",null,3,Wm)(9,C8,1,4,"ng-template",null,4,Wm),Tf(11,"app-mini-cart-snack-bar"),ph(12,I8,1,0,"div",7)),2&e&&(zh("ngIf",t.enableCloseButton),Vd(12),zh("ngIf",t.showLoader))},styles:["[_nghost-%COMP%]{position:relative}global-header[_ngcontent-%COMP%] #mini-cart-dst.cart-dst-container[_ngcontent-%COMP%]{padding-bottom:0!important}global-header[_ngcontent-%COMP%] .cart-dst-scroll-store.scroll-block[_ngcontent-%COMP%]{padding-bottom:80px;background:#faf9f8}@media only screen and (max-width: 1024px){global-header[_ngcontent-%COMP%] .sidebar-right-drawer[_ngcontent-%COMP%]{height:calc(100% - 54px)!important}global-header[_ngcontent-%COMP%] #mini-cart-dst.cart-dst-container[_ngcontent-%COMP%]{padding-bottom:0!important}global-header[_ngcontent-%COMP%] .cart-dst-scroll-store.scroll-block[_ngcontent-%COMP%]{padding-bottom:80px;background:#faf9f8}.marketplace-cart__header[_ngcontent-%COMP%]{z-index:999999;position:sticky;top:0}}#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%]{height:100%;position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word}#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-scroll-store[_ngcontent-%COMP%]{margin-bottom:8px}#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-header-button[_ngcontent-%COMP%]{max-width:204px;min-width:100%;width:auto!important;border-radius:100px!important}
1#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-minimum-label[_ngcontent-%COMP%], #mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-unavailable-msg[_ngcontent-%COMP%]{color:#535250;font-weight:600;font-size:14px;line-height:21px}#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-express-cta-info[_ngcontent-%COMP%]{font-size:12px;font-weight:700}#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .pad-right[_ngcontent-%COMP%]{padding-right:40px}.cart-dst-close-cart[_ngcontent-%COMP%]{position:absolute;width:16px;height:16px;right:30px;top:30px;z-index:9999999;cursor:pointer;display:none}.cart-dst-loader[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:100%;height:100%;background-color:#eceaea;background-image:url(/erums/cart/dist/assets/images/busy.gif);background-size:50px;background-repeat:no-repeat;background-position:center;z-index:10000000;opacity:.4;filter:alpha(opacity=40)}.accepted-payments-div[_ngcontent-%COMP%]{padding:16px}@media only screen and (max-width: 400px){#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%] .cart-dst-header-button[_ngcontent-%COMP%]{font-size:12px}}@media only screen and (max-width: 768px){#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%]{margin:auto}}@media only screen and (max-width: 1023px){.cart-dst-close-cart[_ngcontent-%COMP%]{display:inline-block!important}}@media only screen and (max-width: 991px){#mini-cart-dst.cart-dst-container[_ngcontent-%COMP%]{max-width:100%;padding-bottom:80px;overflow-y:auto}.cart-dst-scroll-store.scroll-block[_ngcontent-%COMP%]{height:100%;overflow-y:auto}}@media only screen and (min-width: 992px){.cart-dst-scroll-store[_ngcontent-%COMP%]{height:100%;overflow-y:auto}}.sidebar-right-drawer[_ngcontent-%COMP%] .right-drawer__close.mini-cart-v2-close-button[_ngcontent-%COMP%]{z-index:9999999}.sidebar-right-drawer[_ngcontent-%COMP%]::-webkit-scrollbar{all:unset!important}"]})}}return e})(),k8=(()=>{class e extends Ty{transform(e,...t){return e&&(t.length>0&&"FLASH"===t[0]?.toUpperCase()||new Date(e).getMinutes()?super.transform(e,"h:mm a"):super.transform(e,"h a"))}static{this.ɵfac=(()=>{let t;return function(i){return(t||(t=cl(e)))(i||e)}})()}static{this.ɵpipe=is({name:"formatSlotTime",type:e,pure:!0,standalone:!0})}}return e})(),x8=e=>({"express-container":e}),T8=(e,t)=>({"mx-3":e,"full-cart":t}),P8=e=>({show:e}),E8=(e,t)=>({"savings-text":e,"del-margin":t}),D8=e=>({"pds-btn-filled--primary":e}),O8=e=>({"full-cart":e});function B8(e,t){if(1&e&&(Ef(0),kf(1,"span",32),am(2),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",(null==e.slotInfo?null:e.slotInfo.displayDateTxt)+", "+e.displayTimeTxt," ")}}function M8(e,t){if(1&e&&(kf(0,"div")(1,"div",32)(2,"span",12),am(3,"Flash pickup at"),xf(),Tf(4,"img",33),am(5),xf(),kf(6,"div",32)(7,"span",32),am(8),qm(9,"formatSlotTime"),xf()()()),2&e){let e=Yf(2);Vd(5),cm(" ",(null==e.slotInfo?null:e.slotInfo.displayDateTxt)+", "+e.displayTimeTxt," "),Vd(3),cm("Check out by ",$m(9,2,null==e.slotInfo?null:e.slotInfo.displayCheckoutByTimeTS),"")}}function R8(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",21)(2,"div",22)(3,"a",23),jf("keyup.enter",(function(){return Wa(e),Ha(Yf().cartNavigation())}))("click",(function(){return Wa(e),Ha(Yf().cartNavigation())})),Tf(4,"img",24),xf()(),kf(5,"div",25)(6,"div",26)(7,"span",27),Ef(8),kf(9,"span",28),am(10),xf(),Df(),kf(11,"span",29),am(12),xf()()(),kf(13,"p",30)(14,"span",31),ph(15,B8,3,1,"ng-container",4)(16,M8,10,4,"div",4),xf()()()(),Df()}if(2&e){let e=Yf();Vd(3),gh("aria-label",(null==e.meta?null:e.meta.banner)+" graphic logo"),Vd(),zh("src",null==e.meta?null:e.meta.bannerImageURL,id
1),Vd(6),lm("FLASH"===(null==e.slotInfo?null:e.slotInfo.type)?"Flash pickup":"Pickup"),Vd(2),lm(" at "+e.fulfillmentAddress),Vd(3),zh("ngIf","FLASH"!==(null==e.slotInfo?null:e.slotInfo.type)),Vd(),zh("ngIf","FLASH"===(null==e.slotInfo?null:e.slotInfo.type))}}function L8(e,t){if(1&e&&(kf(0,"div",8)(1,"div",34)(2,"span",35),am(3,"Estimated total"),xf()(),kf(4,"div",36)(5,"span",37),am(6),qm(7,"currency"),xf(),kf(8,"button",38),qm(9,"currency"),Tf(10,"span",39)(11,"span",40),xf()()()),2&e){let e=Yf();Vd(6),lm(jm(7,3,null==e.summary?null:e.summary.finalTransactionTotal,"USD")),Vd(2),gh("aria-label","Cart summary Estimated total "+jm(9,6,null==e.summary?null:e.summary.finalTransactionTotal,"USD"))("aria-expanded",!0)}}function F8(e,t){if(1&e&&(kf(0,"div",43)(1,"div",44)(2,"span",45),am(3,"Est. savings "),xf(),kf(4,"span",12),am(5,"Estimated savings"),xf()(),kf(6,"div",46)(7,"span",47),am(8),qm(9,"currency"),xf()()()),2&e){let e=Yf(2);Vd(2),gh("data-target","#"+(null==e.meta?null:e.meta.id)+"-savingsPod"),Vd(6),cm("-",jm(9,2,e.summary.totalCardSavings,"USD"),"")}}function N8(e,t){if(1&e&&(Ef(0),kf(1,"div",50),Tf(2,"span",51),kf(3,"span",52),qm(4,"lowercase"),qm(5,"trimWhitespace"),am(6),qm(7,"loyaltyPgrm"),xf()(),kf(8,"div",53)(9,"span",54),qm(10,"lowercase"),qm(11,"trimWhitespace"),am(12),qm(13,"currency"),xf()(),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(3),Jf("id",$m(5,6,$m(4,4,null==e?null:e.savingsCategoryName))),Vd(3),lm(jm(7,8,null==e?null:e.savingsCategoryName,i.bannerConfiguration)),Vd(3),Jf("id",$m(11,13,$m(10,11,(null==e?null:e.savingsCategoryName)+"value"))),Vd(3),cm("-",jm(13,15,null==e?null:e.savingsAmount,"USD"),"")}}function U8(e,t){if(1&e&&(kf(0,"div",48),ph(1,N8,14,18,"ng-container",49),xf()),2&e){let e=Yf(2);zh("id",(null==e.meta?null:e.meta.id)+"-savingsPod"),Vd(),zh("ngForOf",null==e.summary?null:e.summary.cardSavings)}}function V8(e,t){if(1&e&&(kf(0,"span",57),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(3);Vd(),lm($m(2,1,null==e.summary||null==e.summary.fuelSurcharge?null:e.summary.fuelSurcharge.actualFee))}}function q8(e,t){if(1&e&&(Ef(0),kf(1,"s",58)(2,"span",59),am(3),qm(4,"currency"),xf()(),kf(5,"span",60),am(6),qm(7,"currency"),xf(),Df()),2&e){let e=Yf(3);Vd(3),cm(" ",jm(4,2,null==e.summary||null==e.summary.fuelSurcharge?null:e.summary.fuelSurcharge.actualFee,"USD"),""),Vd(3),cm(" ",jm(7,5,null==e.summary||null==e.summary.fuelSurcharge?null:e.summary.fuelSurcharge.currentFee,"USD"),"")}}function $8(e,t){if(1&e&&(kf(0,"div",48)(1,"div",44)(2,"span",55),am(3," Fuel surcharge"),xf()(),kf(4,"div",46),ph(5,V8,3,3,"span",56)(6,q8,8,8,"ng-container",4),xf()()),2&e){let e=Yf(2);zh("id",(null==e.meta?null:e.meta.id)+"-fuelSurchargePod"),Vd(5),zh("ngIf",!(null!=e.summary&&null!=e.summary.fuelSurcharge&&e.summary.fuelSurcharge.feeWaived)),Vd(),zh("ngIf",null==e.summary||null==e.summary.fuelSurcharge?null:e.summary.fuelSurcharge.feeWaived)}}function j8(e,t){if(1&e&&(kf(0,"del",69),qm(1,"lowercase"),qm(2,"trimWhitespace"),kf(3,"span",12),am(4,"Price before savings"),xf(),am(5),qm(6,"currency"),xf()),2&e){let e=Yf().$implicit;Jf("id",$m(2,5,$m(1,3,(null==e?null:e.key)+"value-del"))),zh("ngClass",Bm(10,E8,(null==e?null:e.previous)>-1,(null==e?null:e.previous)&&(null==e?null:e.value))),Vd(5),cm(" ",jm(6,7,null==e?null:e.previous,"USD")," ")}}function z8(e,t){if(1&e&&(Ef(0),kf(1,"div",65),Tf(2,"span",51),kf(3,"span",66),qm(4,"lowercase"),qm(5,"trimWhitespace"),am(6),xf()(),kf(7,"div",53),ph(8,j8,7,13,"del",67),kf(9,"span",68),qm(10,"lowercase"),qm(11,"trimWhitespace"),am(12),qm(13,"currency"),xf()(),Df()),2&e){let e=t.$implicit;Vd(3),Jf("id",$m(5,8,$m(4,6,null==e?null:e.key))),Vd(3),lm(e.key),Vd(2),zh("ngIf",(null==e?null:e.previous)&&(null==e?null:e.previous)!==(null==e?null:e.value)),Vd(),Jf("id",$m(11,12,$m(10,10,(null==e?null:e.key)+"value"))),zh("ngClass",(null!=e&&e.key.includes("Delivery")||null!=e&&e.key.includes("Flash")||null!=e&&null!=e.key&&e.key.includes("Minimum"))&&(null==e?null:e.previous)!==(null==e?null:e.value)?"savings-color":""),Vd(3),lm(jm(13,14,e.value,"USD"))}}function W8(e,t){if(1&e&&(Ef(0),kf(1,"div",61)(2,"div",44)(3,"span",62),am(4,"Est. taxes and fees "),xf(),kf(5,"span",12),am(6,"Estimated taxes and fees"),xf()(),kf(7,"div",46)(8,"span",63),am(9),qm(10,"currency"),xf()()(),kf(11,"div",64),ph(12,z8,14,17,"ng-container",49),xf(),Df()),2&e){let e=Yf(2);Vd(3),gh("data-target","#"+e.meta.id+"savingsPod"),Vd(6),lm(jm(10,3,null==e.summary?null:e.summary.tax.total,"USD")),Vd(3),zh("ngForOf",null==e.summary?null:e.summary.tax.details)}}function H8(e,t){if(1&e&&(Ef(0),ph(1,F8,10,5,"div",41)(2,U8,2,2,"div",42)(3,$8,7,3,"div",42)(4,W8,13,6,"ng-container",4),Df()),2&e){let e=Yf();Vd(),zh("ngIf",null==e.summary?null:e.summary.totalCardSavings),Vd(),zh("ngIf","1P_WINE"!==(null==e.expressCheckoutOrderInfo||null==e.expressCheckoutOrderInfo.cartCategory?null:e.expressCheckoutOrderInfo.cartCategory.toUpperCase())),Vd(),zh("ngIf",(null==e.summary||null==e.summary.fuelSurcharge?null:e.summary.fuelSurcharge.actualFee)>0&&!(null!=e.summary&&e.summary.tax)),Vd(),zh("ngIf",null==e.summary?null:e.summary.tax)}}function Y8(e,t){1&e&&(Ef(0),kf(1,"span",70),am(2,"Estimated total"),xf(
1),Df())}function G8(e,t){1&e&&(kf(0,"span",71),am(1,"Est. subtotal"),xf(),kf(2,"span",12),am(3,"Estimated subtotal"),xf())}function K8(e,t){if(1&e&&(kf(0,"s",58)(1,"span",72)(2,"span",12),am(3," Original price before savings is "),xf(),am(4),qm(5,"currency"),xf()()),2&e){let e=Yf();Vd(4),cm(" ",jm(5,1,null==e.summary?null:e.summary.totalBasePrice,"USD"),"")}}function Q8(e,t){1&e&&(kf(0,"span"),am(1,"Youâve opted to bring your own bags. Thank you for helping us reduce waste. "),kf(2,"span",90),am(3,"ð¿"),xf()())}function J8(e,t){if(1&e&&(kf(0,"span",93),am(1,"Save "),kf(2,"b"),am(3),qm(4,"currency"),xf(),am(5," by bringing your own bags."),xf()),2&e){let e=Yf(4);Vd(3),cm("",jm(4,1,null==e.cartData.bagFeePreference?null:e.cartData.bagFeePreference.perBagFee,"USD"),"/bag")}}function Z8(e,t){if(1&e&&(kf(0,"span",91),am(1),qm(2,"currency"),xf(),ph(3,J8,6,4,"span",92)),2&e){Yf();let e=sm(13),t=Yf(2);Vd(),cm("Save ",jm(2,3,null==t.cartData.bagFeePreference?null:t.cartData.bagFeePreference.perBagFee,"USD")," per bag by bringing your own bags."),Vd(2),zh("ngIf",null==t.cartData.bagFeePreference?null:t.cartData.bagFeePreference.perBagFee)("ngIfElse",e)}}function X8(e,t){1&e&&(kf(0,"span"),am(1,"Reduce waste by bringing your own bags."),xf())}function e9(e,t){if(1&e){let e=Mf();kf(0,"div",82)(1,"div",83)(2,"h2",84),am(3,"Bring your own bags?"),xf(),kf(4,"div",85)(5,"input",86),jf("keydown.enter",(function(){return Wa(e),Ha(Yf(2).toggleBagPreferences())}))("click",(function(){return Wa(e),Ha(Yf(2).toggleBagPreferences())})),xf(),Tf(6,"label",87)(7,"div",88),xf()(),kf(8,"div",89),ph(9,Q8,4,0,"span",17)(10,Z8,4,6,"ng-template",null,1,Wm)(12,X8,2,0,"ng-template",null,2,Wm),xf()()}if(2&e){let e=sm(11),t=Yf(2);Vd(5),zh("checked",null==t.cartData||null==t.cartData.bagFeePreference?null:t.cartData.bagFeePreference.toggleEnabled),Vd(2),zh("ngClass",Om(4,D8,null==t.cartData||null==t.cartData.bagFeePreference?null:t.cartData.bagFeePreference.toggleEnabled)),Vd(2),zh("ngIf",null==t.cartData.bagFeePreference?null:t.cartData.bagFeePreference.toggleEnabled)("ngIfElse",e)}}function t9(e,t){1&e&&(kf(0,"p",101),am(1,"Not available in your ZIP"),xf())}function i9(e,t){if(1&e&&(kf(0,"p",104),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(4);Vd(),cm(" ",jm(2,1,e.summary.minCartThresholdValue,"USD")," minimum ")}}function n9(e,t){if(1&e&&(kf(0,"p",105)(1,"b"),am(2),qm(3,"currency"),xf(),am(4," fee will apply on orders under "),kf(5,"b"),am(6,"$30"),xf()()),2&e){let e=Yf(4);Vd(2),lm(jm(3,1,e.summary.serviceFee,"USD"))}}function r9(e,t){if(1&e&&(Ef(0),ph(1,i9,3,4,"p",102)(2,n9,7,4,"p",103),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.checkoutEnabled)&&(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isAvailable)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)),Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.checkoutEnabled)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&e.summary.qualifyingDollarValueWYSIWYG>0&&(null==e.summary?null:e.summary.serviceFee))}}function s9(e,t){if(1&e&&(kf(0,"p",105)(1,"b"),am(2),qm(3,"currency"),qm(4,"currency"),qm(5,"currency"),xf()()),2&e){let e=Yf(4);Vd(2),um("Add ",jm(3,3,e.summary.qualifyingDollarValue,"USD")," to avoid ",jm(4,6,e.summary.serviceFee,"USD")," fee on orders under ",jm(5,9,e.summary.minCartThresholdValue,"USD"),"")}}function a9(e,t){if(1&e&&(kf(0,"p",107)(1,"b"),am(2),qm(3,"currency"),xf()()),2&e){let e=Yf(4);Vd(2),cm("Youâre saving ",jm(3,1,e.summary.savingsOnServiceFee,"USD")," off the minimum order fee!")}}function o9(e,t){if(1&e&&(Ef(0),ph(1,s9,6,12,"p",103)(2,a9,4,4,"p",106),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.checkoutEnabled)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&0===(null==e.summary?null:e.summary.savingsOnServiceFee)&&(null==e.summary?null:e.summary.qualifyingDollarValue)>0&&(null==e.summary?null:e.summary.serviceFee)),Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.checkoutEnabled)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&(null==e.summary?null:e.summary.savingsOnServiceFee)>0)}}function l9(e,t){if(1&e){let e=Mf();kf(0,"span",111),am(1),qm(2,"number"),kf(3,"a",112),jf("click",(function(){return Wa(e),Ha(Yf(4).cartSellerNavigation())}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).cartSellerNavigation())})),am(4," Add items "),xf()()}if(2&e){let e=Yf(4);Vd(),cm(" Add $",jm(2,1,null==e.summary?null:e.summary.qualifyingShippingDollarValue,".2-2")," to get FREE shipping! ")}}function c9(e,t){1&e&&(kf(0,"span",113),am(1," You qualify for FREE shipping! "),xf())}function d9(e,t){if(1&e&&(kf(0,"p",108),ph(1,l9,5,4,"span",109)(2,c9,2,0,"span",110),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",(null==e.summary?null:e.summary.qualifyingShippingDollarValue)>0),Vd(),zh("ngIf",0===(null==e.summary?null:e.summary.qualifyingShippingDollarValue))}}function u9(e,t){if(1&e){let e=Mf();kf(0,"div",94)(1,"div",95)(2,"button",96),jf("click",(function(){return Wa(e),Ha(Yf(2).placeOrder())})),am(3),xf(),kf(4,"button",97),jf("click",(function(){return Wa(e),Ha(Yf(2).goToCheckout())})),am(5," Checkout "),xf()(),kf(6,"div",98),ph(7,t9,2,0,"p",99)(8,r9,3,2,"ng-container",4)(9,o9,3,2,"ng-container",4)(10,d9,3,2,"p",100),xf()()}if(2&e){let e=Yf(2);Vd(),zh("ngClass",Om(14,O8,!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.isMiniCart))),Vd(),_h("aria-label","",null==e.meta?null:e.meta.banner," Place Order"),zh("ngStyle",e.getConfirmButtonStyle)("disabled",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.checkoutEnabled)||(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isLoading)),Vd(),cm(" ",null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.buttonLabel," "),Vd(),_h("aria-label","",null==e.meta?null:e.meta.banner," Checkout"),zh("ngStyle",e.getDynamicStyle)("disabled",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.checkoutEnabled)||(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isLoading)),Vd(3),zh("ngIf",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.isAvailable)),Vd(),zh("ngIf",!e.isExpressCheckoutEligible),Vd(),zh("ngIf",e.isExpressCheckoutEligible),Vd(),zh("ngIf",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.isSingleCart)&&"3P_MARKETPLACE"===(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&(null==e.summary?null:e.summary.qualifiedFreeShippingMsg))}}function p9(e,t){if(1&e&&(kf(0,"p",105)(1,"b"),am(2),qm(3,"currency"),qm(4,"currency"),qm(5,"currency"),xf()()),2&e){let e=Yf(4);Vd(2),um("Add ",jm(3,3,e.summary.qualifyingDollarValue,"USD")," to avoid ",jm(4,6,e.summary.serviceFee,"USD")," fee on orders under ",jm(5,9,e.summary.minCartThresholdValue,"USD"),"")}}function h9(e,t){if(1&e&&(kf(0,"p",107)(1,"b"),am(2),qm(3,"currency"),xf()()),2&e){let e=Yf(4);
1Vd(2),cm("Youâre saving ",jm(3,1,e.summary.savingsOnServiceFee,"USD")," off the minimum order fee!")}}function f9(e,t){if(1&e&&(Ef(0),ph(1,p9,6,12,"p",103)(2,h9,4,4,"p",106),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.checkoutEnabled)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&0===(null==e.summary?null:e.summary.savingsOnServiceFee)&&(null==e.summary?null:e.summary.qualifyingDollarValue)>0&&(null==e.summary?null:e.summary.serviceFee)),Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.checkoutEnabled)&&"1P_WINE"!==(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.cartCategory)&&(null==e.summary?null:e.summary.savingsOnServiceFee)>0)}}function m9(e,t){if(1&e&&(kf(0,"div",114),ph(1,f9,3,2,"ng-container",4),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.isExpressCheckoutEligible)}}function g9(e,t){if(1&e&&(Ef(0),kf(1,"div",73)(2,"div",74)(3,"span",75),am(4,"Payment"),xf(),kf(5,"span")(6,"span",76),am(7),qm(8,"titlecase"),xf(),kf(9,"span",77),am(10),qm(11,"titlecase"),xf()()(),kf(12,"div",78),am(13," A hold will be placed on your debit/credit card for this estimated total and will reduce the amount available to spend from your account. Your bank may take up to 5 business days after delivery/ pickup to release the hold and display your final charge. "),xf(),ph(14,e9,14,6,"div",79)(15,u9,11,16,"div",80)(16,m9,2,1,"div",81),xf(),Df()),2&e){let e=Yf();Vd(7),dm("",$m(8,7,null==e.payment[0]?null:e.payment[0].cardType)," card ending ",null==e.payment[0]?null:e.payment[0].maskedNumber,""),Vd(3),dm("",$m(11,9,null==e.payment[0]?null:e.payment[0].cardType)," â¢â¢â¢â¢ ",null==e.payment[0]?null:e.payment[0].maskedNumber,""),Vd(4),zh("ngIf",e.cartData&&(null==e.cartData?null:e.cartData.isCustBagPreference)),Vd(),zh("ngIf",!(null!=e.expressCheckoutOrderInfo&&e.expressCheckoutOrderInfo.isMiniCart)),Vd(),zh("ngIf",null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isMiniCart)}}var b9=(()=>{class e{constructor(e,t){this.miniCartService=e,this.miniCartContainerComponent=t,this.actionEmitter=new _l}goToCheckout(){this.actionEmitter.emit({type:"checkout"})}placeOrder(){this.actionEmitter.emit({type:"placeOrder"})}openTooltip(e){this.actionEmitter.emit({type:"tooltip",info:e})}get getConfirmButtonStyle(){return this.miniCartService.getConfirmButtonStyle(this.meta?.banner)}get getDynamicStyle(){return this.miniCartService.getDynamicStyle(this.meta?.banner)}cartSellerNavigation(){this.actionEmitter.emit({type:"cartSellerNavigation"})}toggleBagPreferences(){this.miniCartService.updateBagPreference(this.token,this.cartData.cartCategory,this.storeId,!(this.cartData?.bagFeePreference&&this.cartData.bagFeePreference.toggleEnabled)).subscribe({next:e=>{this.miniCartContainerComponent.multiCartSummary=e.multiCartSummary,this.miniCartContainerComponent.refreshCart(e),this.cartData=e.carts[0],this.summary=this.cartData?.summary},error:e=>{}})}cartNavigation(){window.location.href=window.location.origin}get fulfillmentAddress(){return this.storeInfo?.address?this.storeInfo?.address:this.cartData?.zipCode}get displayTimeTxt(){return this.slotInfo.displayTimeTxt.replace(/^0+/,"")}static{this.ɵfac=function(t){return new(t||e)($d(Q7),$d(A8))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-mini-cart-express"]],inputs:{summary:"summary",payment:"payment",meta:"meta",slotInfo:"slotInfo",storeInfo:"storeInfo",expressCheckoutOrderInfo:"expressCheckoutOrderInfo",bannerConfiguration:"bannerConfiguration",cartData:"cartData",token:"token",storeId:"storeId",isExpressCheckoutEligible:"isExpressCheckoutEligible",isBetterTaxes:"isBetterTaxes"},outputs:{actionEmitter:"actionEmitter"},standalone:!0,features:[xm([A8]),Pm],decls:33,vars:39,consts:[["cartTotalLabel",""],["default",""],["reduceWaste",""],[3,"ngClass"],[4,"ngIf"],[1,"order-summary","pt-3",3,"ngClass"],["class","row mx-0",4,"ngIf"],["id","summarySection",3,"ngClass"],[1,"row","mx-0"],[1,"col-8","pl-0"],[1,"fw-600","fs-14"],["id","totalItemQuantityValue","aria-hidden","true"],[1,"sr-only"],[1,"col-4","pr-0","text-right"],["id","totalBasePriceValue",1,"fw-600","fs-14"],["id","finalEstimatedTotalPod",1,"estimated-total","d-flex","pt-2","pb-2","mx-0"],[1,"fs-16","fw-600"],[4,"ngIf","ngIfElse"],[1,"fs-16","fw-600","ml-auto"],["class","pr-2",4,"ngIf"],["aria-hidden","true","id","finalEstimatedTotalValue",1,"d-inline-block"],[1,"cart-dst-store-header__label","store-header__wrapper"],["data-qa","swy-img",1,"store-header__img","float-left","mw-100"],["role","link","tabindex","0",1,"cart-dst-banner-nav",3,"keyup.enter","click"],["aria-hidden","true",1,"banner-logo",3,"src"],[1,"w-100","ml-2","mr-1"],[1,"store-header__details__title","cart-dst-store-header__details__title"],[1,"address-wrapper"],["id","pickupId",1,"type"],[1,"cart-dst-fulfillment-address","fullfillnent-address"],["data-qa","swy-dtls-dt",1,"store-header__details__date","cart-dst-fullfillment-slot"],[1,"cart-dst-fullfillment-slot"],["id","fulfillmentSlotInfo",1,"slot"],["aria-hidden","true","src","/erums/cart/dist/assets/images/flash-icon-new.svg","alt",""],[1,"col-8","p-0"],[1,"fs-18","fw-600"],[1,"col-4","p-0","text-right"],["id","estimatedTotal",1,"fs-18","fw-600"],["data-toggle","collapse","href","#summarySection","role","button","aria-controls","summarySection",1,"cart-dst-order-summary--accordion","mb-3"],["aria-hidden","true",1,"svg-caret-collapse"],["aria-hidden","true",1,"svg-caret-expand"],["class","row w-100 mx-0 px-0 pt-2",4,"ngIf"],["class","row w-100 mb-1 mx-0 p-0",3,"id",4,"ngIf"],[1,"row","w-100","mx-0","px-0","pt-2"],[1,"col-7","pl-0","pr-1"],["id","estimatedSavings-wysiwyg","aria-label","Estimated Savings","aria-hidden","true","tabindex","-1","data-toggle","",1,"fw-600","fs-14","d-block"],[1,"col-5","pr-0","text-right"],["id","estimatedSavings-wysiwygvalue",1,"savings-fees","fs-14","fw-600","pr-0"],[1,"row","w-100","mb-1","mx-0","p-0",3,"id"],[4,"ngFor","ngForOf"],[1,"col-8","pt-1","px-0"],[1,"border-line"],[1,"savings-label","savings-ib",3,"id"],[1,"col-4","pt-1","pr-0","text-right"],[1,"savings-fees",3,"id"],["id","estimatedFuelSurchargeId","tabindex","-1",1,"f
1w-600","fs-14","d-block"],["id","estimatedFuelSurchargeActualFee-noFeeWaived",4,"ngIf"],["id","estimatedFuelSurchargeActualFee-noFeeWaived"],[1,"pr-2"],["id","fuelSurchargeActualFee-feeWaived"],["id","fuelSurchargeCurrentFee-feeWaived",1,"d-inline-block"],["id","estimatedTaxes",1,"row","mx-0"],["id","estimatedTaxesId","aria-label","Estimated taxes and fees","aria-hidden","true","tabindex","-1","data-toggle","",1,"fw-600","fs-14","d-block"],["id","taxTotalValue",1,"fs-14","fw-600","pr-0"],["id","taxesPod",1,"row","w-100","mb-1","mx-0","p-0"],[1,"pt-1","px-0","col-8"],[1,"savings-label",3,"id"],["class","ml-auto",3,"id","ngClass",4,"ngIf"],[1,"tax-fee",3,"id","ngClass"],[1,"ml-auto",3,"id","ngClass"],["id","finalEstimatedTotalPodId-miniCart"],["id","finalEstimatedTotalPodId-fullCart","aria-hidden","true"],["id","totalBasePrice-wysiwyg"],["id","paymentPod",1,"row","mx-0","checkout-section"],[1,"col-12","px-0","payment-section","mb-3"],["id","paymentId",1,"fs-16","fw-600"],[1,"sr-only","sr-only-width"],["id","paymentCard","aria-hidden","true",1,"fs-16"],["id","paymentHoldMessage",1,"col-12","px-0","mb-4"],["class","bag-fee-wrapper","id","bring-bag-order-wrapper",4,"ngIf"],["class","col-12 px-0",4,"ngIf"],["class","col-12 px-0 pb-3",4,"ngIf"],["id","bring-bag-order-wrapper",1,"bag-fee-wrapper"],[1,"main-wrapper"],[1,"heading-bag"],["id","bring-toggle-button-wrapper",1,"toggle-btn"],["type","checkbox","id","bring-toggle-button","aria-label","Bring your own bags",3,"keydown.enter","click","checked"],["for","bring-toggle-button",1,"toggle-button-switch"],[1,"toggle-button-text",3,"ngClass"],[1,"sub-text"],["aria-hidden","true"],[1,"sr-only","saveAmount"],["aria-hidden","true","class","saveAmount",4,"ngIf","ngIfElse"],["aria-hidden","true",1,"saveAmount"],[1,"col-12","px-0"],[1,"actions-block","mt-3","mx-auto","text-center",3,"ngClass"],["id","placeOrderBtn-fullCart",1,"btn","btn-style","mb-3",3,"click","ngStyle","disabled"],["id","gotoCheckout-fullCart",1,"btn","btn-style","mb-3",3,"click","ngStyle","disabled"],[1,"mt-3"],["class","text-center warning-label",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center","warning-label"],["class","text-center","id","minCartThresholdValue",4,"ngIf"],["class","text-center","id","qualifyingDollarValueOrServiceFee",4,"ngIf"],["id","minCartThresholdValue",1,"text-center"],["id","qualifyingDollarValueOrServiceFee",1,"text-center"],["class","text-center savings-color","id","qualifyingDollarValueOrServiceFee",4,"ngIf"],["id","qualifyingDollarValueOrServiceFee",1,"text-center","savings-color"],[1,"text-center"],["id","qualifyingShippingDollarValue",4,"ngIf"],["id","qualifiedFreeShippingMsg",4,"ngIf"],["id","qualifyingShippingDollarValue"],["role","link","tabindex","0",1,"underline","add-items",3,"click","keyup.enter"],["id","qualifiedFreeShippingMsg"],[1,"col-12","px-0","pb-3"]],template:function(e,t){if(1&e&&(kf(0,"div",3),ph(1,R8,17,6,"ng-container",4),kf(2,"div",5),ph(3,L8,12,9,"div",6),kf(4,"div",7)(5,"div",8)(6,"div",9)(7,"span",10)(8,"span",11),am(9),qm(10,"formatBanner"),qm(11,"titlecase"),xf(),kf(12,"span",12),am(13),xf()()(),kf(14,"div",13)(15,"span",14),am(16),qm(17,"currency"),xf()()(),ph(18,H8,5,4,"ng-container",4),kf(19,"div",15)(20,"span",16),ph(21,Y8,3,0,"ng-container",17)(22,G8,4,0,"ng-template",null,0,Wm),xf(),kf(24,"span",18),ph(25,K8,6,4,"s",19),kf(26,"span",12),am(27),qm(28,"currency"),xf(),kf(29,"span",20),am(30),qm(31,"currency"),xf()()(),ph(32,g9,17,11,"ng-container",4),xf()()()),2&e){let e=sm(23);zh("ngClass",Om(32,x8,null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart)),Vd(),zh("ngIf",(null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart)&&t.slotInfo&&!t.isBetterTaxes),Vd(),zh("ngClass",Bm(34,T8,(null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart)&&!t.isBetterTaxes,!(null!=t.expressCheckoutOrderInfo&&t.expressCheckoutOrderInfo.isMiniCart))),Vd(),zh("ngIf",null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart),Vd(),zh("ngClass",Om(37,P8,null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart)),Vd(5),um("",$m(11,21,$m(10,19,null==t.meta?null:t.meta.banner))," ",(null==t.summary?null:t.summary.totalItemQuantity)>1?"items":"item"," (",null==t.summary?null:t.summary.totalItemQuantity,")"),V
1d(4),um("",null==t.meta?null:t.meta.banner," ",null==t.summary?null:t.summary.totalItemQuantity," ",(null==t.summary?null:t.summary.totalItemQuantity)>1?"items":"item"," in cart"),Vd(3),cm(" ",jm(17,23,null==t.summary?null:t.summary.totalBasePrice,"USD")," "),Vd(2),zh("ngIf",t.summary),Vd(3),zh("ngIf",null==t.expressCheckoutOrderInfo?null:t.expressCheckoutOrderInfo.isMiniCart)("ngIfElse",e),Vd(4),zh("ngIf",(null==t.summary?null:t.summary.totalBasePrice)>(null==t.summary?null:t.summary.finalTransactionTotal)),Vd(2),cm(" Your price after savings is ",jm(28,26,null==t.summary?null:t.summary.finalTransactionTotal,"USD"),""),Vd(3),cm(" ",jm(31,29,null==t.summary?null:t.summary.finalTransactionTotal,"USD"),""),Vd(2),zh("ngIf",t.isExpressCheckoutEligible&&(null==t.payment?null:t.payment.length))}},dependencies:[By,Iy,e8,t8,Oy,k8,sy,gy,cy,oy,i8,Sy],styles:['.express-container[_ngcontent-%COMP%]{background:#fff;border-bottom:1px solid #DDD9D5}.order-summary[_ngcontent-%COMP%] .fw-600[_ngcontent-%COMP%]{font-weight:600!important}.order-summary[_ngcontent-%COMP%] .fw-400[_ngcontent-%COMP%]{font-weight:400!important}.order-summary[_ngcontent-%COMP%] .fs-14[_ngcontent-%COMP%]{font-size:14px}.order-summary[_ngcontent-%COMP%] .fs-16[_ngcontent-%COMP%]{font-size:16px}@media screen and (min-width: 1px) and (max-width: 992px){.order-summary.full-cart[_ngcontent-%COMP%]{padding-left:16px;padding-right:16px}}@media screen and (min-width: 576px) and (max-width: 992px){.order-summary[_ngcontent-%COMP%] .actions-block.full-cart[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:16px;justify-content:center}}.savings-label[_ngcontent-%COMP%]{color:var(--common-neutral-n-700-coffe-grey, #535250);font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:400;line-height:21px}.savings-ib[_ngcontent-%COMP%]{display:inline-block;width:auto}.savings-fees[_ngcontent-%COMP%]{color:var(--common-success-s-600-green-dark, #0C7D50);text-align:right;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:400;line-height:21px}.tax-fee[_ngcontent-%COMP%]{text-align:right;font-size:14px;font-weight:400;line-height:21px}.store-details[_ngcontent-%COMP%]{height:8em;border-bottom:1px solid var(--common-neutral-n-400-coffe-regular, #DDD9D5)}.estimated-total[_ngcontent-%COMP%]{border-top:1px solid var(--common-neutral-n-400-coffe-regular, #DDD9D5)}.border-line[_ngcontent-%COMP%]{border-left:1px solid var(--common-neutral-n-400-coffe-regular, #DDD9D5);height:20px;width:1px;padding-right:.5em}.cart-dst-order-summary--accordion[_ngcontent-%COMP%]{background-color:transparent;border:0;height:-moz-fit-content;height:fit-content}.cart-dst-order-summary--accordion[aria-expanded=false][_ngcontent-%COMP%] .svg-caret-collapse[_ngcontent-%COMP%], .cart-dst-order-summary--accordion[aria-expanded=true][_ngcontent-%COMP%] .svg-caret-expand[_ngcontent-%COMP%]{display:none}.checkout-section[_ngcontent-%COMP%]{border-top:.5px solid #ccc;padding-top:10px}.checkout-section[_ngcontent-%COMP%] .payment-section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.checkout-section[_ngcontent-%COMP%] .btn-style[_ngcontent-%COMP%]{font-size:14px;font-weight:600;line-height:21px;padding:8px 16px;
1min-width:200px;width:100%;max-width:265px;border-radius:100px}.sr-only-width[_ngcontent-%COMP%]{width:90px;height:24px}.toggle-btn[_ngcontent-%COMP%]{position:relative}.toggle-btn[_ngcontent-%COMP%] .toggle-button-switch[_ngcontent-%COMP%]{position:absolute;top:2px;left:2px;width:26px;height:26px;background-color:#fff;border-radius:100%;cursor:pointer;z-index:100;transition:left .3s}.toggle-btn[_ngcontent-%COMP%] .toggle-button-text[_ngcontent-%COMP%]{overflow:hidden;border-radius:25px;transition:background-color .3s;width:53px;height:31px}.toggle-btn[_ngcontent-%COMP%] .toggle-button-text[_ngcontent-%COMP%]:not(.pds-btn-filled--primary){background:#7d7b78}.toggle-btn[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{position:absolute;top:0;left:2px;width:45px;height:26px;border:none;opacity:0;z-index:999;cursor:pointer}.toggle-btn[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked ~ .toggle-button-switch[_ngcontent-%COMP%]{left:26px!important}.toggle-btn[_ngcontent-%COMP%] .toggle-button-text[_ngcontent-%COMP%]{left:26px}.sub-text[_ngcontent-%COMP%]{padding-top:.2em;color:var(--Common-Neutral-N700-CoffeGrey, #535250);font-feature-settings:"calt" off,"liga" off;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:400;line-height:21px}@media screen and (max-width: 787px){.sub-text[_ngcontent-%COMP%]{max-width:70%}}.saveAmount[_ngcontent-%COMP%]{color:var(--Common-Neutral-N700-CoffeGrey, #535250);font-feature-settings:"calt" off,"liga" off;font-family:Nunito Sans;font-size:14px;font-style:normal;font-weight:700;line-height:21px}.heading-bag[_ngcontent-%COMP%]{color:var(--Common-Neutral-N800-BrownRegular, #2A2928);font-feature-settings:"liga" off,"calt" off;font-family:Nunito Sans;font-size:16px;font-style:normal;font-weight:600;line-height:20px;vertical-align:middle}.main-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}#bring-bag-order-wrapper[_ngcontent-%COMP%]{padding:8px}.bag-fee-wrapper[_ngcontent-%COMP%]{border-top:.5px solid #ccc;width:100%}.savings-color[_ngcontent-%COMP%]{color:#2c7437}.cart-dst-store-header__label.store-header__wrapper[_ngcontent-%COMP%]{gap:10px}.cart-dst-banner-nav[_ngcontent-%COMP%]{width:auto;height:auto;display:inline-block}.cart-dst-store-header__label[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px;border-bottom:1px solid #ddd9d5}.cart-dst-store-header__label[_ngcontent-%COMP%] .cart-dst-store-header__details__title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:20px;line-height:24px}.address-wrapper[_ngcontent-%COMP%]{word-wrap:break-word}.cart-dst-fulfillment-address[_ngcontent-%COMP%], .cart-dst-fullfillment-slot[_ngcontent-%COMP%]{color:#2a2928;font-size:16px;line-height:24px;font-weight:400}.fullfillnent-address[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;padding-top:1px}.store-header__price[_ngcontent-%COMP%]{font-weight:600;font-size:20px;line-height:120%}.sr-total-price[_ngcontent-%COMP%]{width:90px;height:24px}']})}}return e})(),y9=(()=>{class e{constructor(e,t,i){this.http=e,this._aemService=t,this._userInfoService=i,this.env="qa1",this.banner="safeway",this.$destroyed=new kt,this.occoData=new Et(1),this.$occoData=this.occoData.asObservable(),this.occoResponse=new Et(1),this.$occoResponse=this.occoResponse.asObservable(),this.occoError=new Et(1),this.$occoError=this.occoError.asObservable(),this.loaderFlag=new Et(1),this.$loaderFlag=this.loaderFlag.asObservable(),this.httpOptions={headers:new jy({"Content-Type":"application/json","Cache-Control":"no-cache"})},console.log("OCCO Service - Initializing environment"),this.initializeEnvironment()}ngOnDestroy(){this.$destroyed.next(!0),this.$destroyed.complete()}initializeEnvironment(){window.location.origin.indexOf("qa1")>0||window.location.origin.indexOf("qa2")>0||window.location.origin.indexOf("qa3")>0||window.location.origin.indexOf("stage")>0?this.env=window.location.host.split("-")[1].split(".")[0]:window.location.origin.indexOf("beta")>0?this.env="betaprod":window.location.origin.indexOf("localhost")>0||window.location.origin.indexOf("local-origin")>0?this.env="qa1":this.env="prod";let e=this._userInfoService.getBanner()?this._userInfoService.getBanner():"safeway";if(e)this.banner=e,console.log("OCCO Service - Banner from UserInfoService:",this.banner);else{let e=window.location.hostname,t=e.match(/^www\.(.*)\.com$/);t&&t[1]?this.banner=t[1]:(t=e.match(/^www-(.*?)\.(.*)\.com$/),t&&t[2]&&(this.banner=t[2])),console.log("OCCO Service - Banner from URL parsing:",this.banner)}if(this.config=q7[this.env].occoApiConfig,window.location.href.indexOf("localhost")>-1){let e=this.config.url,t=this.getLocalHostDomainUrl();this.config.url=t+e,console.log("OCCO Service - Localhost detected"),console.log("Original config URL:",e),console.log("Domain URL:",t),console.log("Final config URL:",this.config.url)}}getLocalHostDomainUrl(){return"https://www-"+this.env+"."+this.banner+".com"}buildHeaders(e,t,i){let n=h({},this.httpOptions);null!==this.config.apimSubscriptionKeyValue&&(n.headers=n.headers.set(this.config.apimSubscriptionKeyHeader,this.config.apimSubscriptionKeyValue)),n.headers=n.headers.set(this.config.clientAppHeader,this.config.clientAppValue);let r=t||this.generateUUID();return n.headers=n.headers.set("x-request-id",r),n.headers=n.headers.set(this.config.requestedByHeader,this.config.requestedByValue),null!=e&&(n.headers=n.headers.set("x-access-token",e)),i&&(n.headers=n.headers.set("storeId",i)),n.headers=n.headers.set("Content-Type","application/json"),n.headers=n.headers.set("x-swy-client-id","web-portal"),n}generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}
1getArtifactMetaInfoforMini(e){console.log("OCCO getArtifactMetaInfo called with artifactId:",e);let t=`${this.config.url}/${e}/artifacts/meta-info?type=custom-cake-preview-image`;return console.log("OCCO getArtifactMetaInfo - Final URL:",t),console.log("Config URL:",this.config.url),console.log("Artifact ID:",e),this.http.get(t,this.buildHeaders(this._aemService.getSWY_SHOP_TOKEN())).pipe(bi((e=>e)))}setLoaderState(e){this.loaderFlag.next(e)}clearOccoData(){this.occoData.next(null),this.occoResponse.next(null)}getCurrentOccoData(){return this.$occoData}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(_w))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),v9=["quantityStepperEl"],w9=e=>({height:e}),_9=e=>({netPromoAmount:e}),S9=e=>({"mktp-cart-product-card__content__row1__price__per-qty pr-md-1":!0,"strike-through-color":e}),C9=e=>({"d-inline-flex":e}),I9=e=>({"align-self-center":e}),A9=()=>({"padding-left.px":18});function k9(e,t){if(1&e&&(kf(0,"span",34),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.item.qty," ",e.cartText,"")}}function x9(e,t){if(1&e&&(kf(0,"span",34),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.item.selectedWeight," ",e.item.selectedWeightType,"")}}function T9(e,t){if(1&e){let e=Mf();kf(0,"button",31),jf("click",(function(t){return Wa(e),Ha(Yf().toggleQuantityStepper(t))})),ph(1,k9,2,2,"span",32)(2,x9,2,2,"span",32),kf(3,"span",33),am(4),xf()()}if(2&e){let e=Yf();Yh("cart-dst-auto-width",e.isLbVsEachEnabled&&"3"===e.item.displayType),zh("ngStyle",e.primaryColorAndBorder),Vd(),zh("ngIf",!e.isLbVsEachEnabled||e.isLbVsEachEnabled&&"3"!==e.item.displayType),Vd(),zh("ngIf",e.isLbVsEachEnabled&&"3"===e.item.displayType),Vd(2),cm(" unit of ",e.item.name,"")}}function P9(e,t){1&e&&Of(0)}function E9(e,t){if(1&e&&(kf(0,"div",38),ph(1,P9,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(7);Vd(),zh("ngTemplateOutlet",e)}}function D9(e,t){1&e&&Of(0)}function O9(e,t){if(1&e&&(kf(0,"div",40),ph(1,D9,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(5);Vd(),zh("ngTemplateOutlet",e)}}function B9(e,t){if(1&e&&(kf(0,"span",48),am(1),xf()),2&e){let e=Yf(4);Vd(),cm(" / ",e.item.displayUnitQuantityText,"")}}function M9(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function R9(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(null==e.item?null:e.item.displayUnitQuantityText)}}function L9(e,t){if(1&e&&(kf(0,"div",43)(1,"small",44),am(2),xf(),kf(3,"div",45)(4,"b"),am(5),qm(6,"currency"),ph(7,B9,2,1,"span",46)(8,M9,2,0,"span",47)(9,R9,2,1,"span",47),xf()()()),2&e){let e=Yf(3);Vd(2),lm(null==e.item?null:e.item.displayEstimateText),Vd(3),lm(jm(6,5,null==e.item?null:e.item.price,"USD")),Vd(2),zh("ngIf",null==e.item?null:e.item.displayUnitQuantityText),Vd(),zh("ngIf","ea"===(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf","ea"!==(null==e.item?null:e.item.displayUnitQuantityText))}}function F9(e,t){1&e&&(kf(0,"small"),am(1,"*"),xf())}function N9(e,t){1&e&&(kf(0,"span",55),am(1," ea"),xf())}function U9(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function V9(e,t){if(1&e&&(kf(0,"span",53),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(5);Vd(),dm(" / ",null==e.item?null:e.item.averageWeight," ",$m(2,2,null==e.item?null:e.item.selectedWeightType),"")}}function q9(e,t){if(1&e&&(kf(0,"span",53)(1,"span",33),am(2," Original price before savings is "),xf(),am(3),qm(4,"currency"),ph(5,N9,2,0,"span",54)(6,U9,2,0,"span",47)(7,V9,3,4,"span",51),xf()),2&e){let e=Yf(4);Vd(3),lm(e.item.multiCustomizations?jm(4,4,e.item.epeUnitPrice,"USD"):e.item.basePrice),Vd(2),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"===e.item.displayType)}}function $9(e,t){1&e&&(kf(0,"span",48),am(1,"ea"),xf())}function j9(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function z9(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(5);Vd(),dm(" / ",null==e.item?null:e.item.averageWeight," ",$m(2,2,null==e.item?null:e.item.selectedWeightType),"")}}function W9(e,t){if(1&e&&(kf(0,"span",56),am(1),qm(2,"currency"),ph(3,$9,2,0,"span",46)(4,j9,2,0,"span",47)(5,z9,3,4,"span",23),xf()),2&e){let e=Yf(4);Vd(),cm(" ",jm(2,4,null==e.item?null:e.item.netPromotionAmountPer,"USD")," "),Vd(2),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"===e.item.displayType)}}function H9(e,t){if(1&e&&(kf(0,"div",49)(1,"small",44),am(2),ph(3,F9,2,0,"small",23),xf(),kf(4,"div",45)(5,"span",50)(6,"span",33),am(7,"your price after savings "),xf(),am(8),qm(9,"currency"),xf()(),kf(10,"div",45),ph(11,q9,8,7,"span",51),xf(),kf(12,"div",45),ph(13,W9,6,7,"span",52),xf()()),2&e){let e=Yf(3);
1Vd(2),lm(null==e.item?null:e.item.displayEstimateText),Vd(),zh("ngIf","3"===e.item.displayType),Vd(2),zh("ngClass",Om(9,_9,e.item.qty>1)),Vd(3),lm(jm(9,6,null==e.item?null:e.item.netPromotionAmount,"USD")),Vd(3),zh("ngIf",(1===e.item.qty||e.item.qty>1)&&(!e.item.multiCustomizations&&e.item.basePrice>e.item.netPromotionAmountPer||e.item.multiCustomizations&&e.item.epeUnitPrice>e.item.netPromotionAmountPer)),Vd(2),zh("ngIf",e.item.qty>1)}}function Y9(e,t){if(1&e&&ph(0,L9,10,8,"div",41)(1,H9,14,11,"div",42),2&e){let e=Yf(2);zh("ngIf",!e.isSCPEnabled),Vd(),zh("ngIf",e.isSCPEnabled)}}function G9(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(4);Vd(),cm(" ",jm(2,1,null==e.item?null:e.item.price,"USD"),"")}}function K9(e,t){if(1&e&&(kf(0,"span",48),am(1),xf()),2&e){let e=Yf(4);Vd(),cm(" / ",null==e.item?null:e.item.displayUnitQuantityText,"")}}function Q9(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function J9(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(null==e.item?null:e.item.displayUnitQuantityText)}}function Z9(e,t){if(1&e&&(kf(0,"span",53)(1,"span",33),am(2),qm(3,"currency"),xf(),am(4),qm(5,"currency"),xf()),2&e){let e=Yf(4);Vd(2),cm(" Original price before ",jm(3,2,null==e.item?null:e.item.price,"USD")," is "),Vd(2),cm(" ",jm(5,5,null==e.item?null:e.item.basePrice,"USD")," ")}}function X9(e,t){if(1&e&&(kf(0,"div",43)(1,"small",44),am(2),xf(),kf(3,"div",45)(4,"span",57),ph(5,G9,3,4,"span",58)(6,K9,2,1,"span",46)(7,Q9,2,0,"span",47)(8,J9,2,1,"span",47),xf()(),kf(9,"div",45),ph(10,Z9,6,8,"span",51),xf()()),2&e){let e=Yf(3),t=sm(36);Vd(2),lm(null==e.item?null:e.item.displayEstimateText),Vd(2),zh("ngClass",Om(8,S9,e.item.price<e.item.basePrice&&e.item.promoEndDate&&e.item.promoEndDate>=e.todaysDate)),Vd(),zh("ngIf",e.item.promoEndDate>=e.todaysDate)("ngIfElse",t),Vd(),zh("ngIf",null==e.item?null:e.item.displayUnitQuantityText),Vd(),zh("ngIf","ea"===(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf","ea"!==(null==e.item?null:e.item.displayUnitQuantityText)),Vd(2),zh("ngIf",e.item.price<e.item.basePrice&&e.item.promoEndDate&&e.item.promoEndDate>=e.todaysDate)}}function eee(e,t){1&e&&(kf(0,"small"),am(1,"*"),xf())}function tee(e,t){1&e&&(kf(0,"span",55),am(1," ea"),xf())}function iee(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function nee(e,t){if(1&e&&(kf(0,"span",53),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(5);Vd(),dm(" / ",null==e.item?null:e.item.averageWeight," ",$m(2,2,null==e.item?null:e.item.selectedWeightType),"")}}function ree(e,t){if(1&e&&(kf(0,"span",53)(1,"span",33),am(2," Original price before savings is "),xf(),am(3),qm(4,"currency"),ph(5,tee,2,0,"span",54)(6,iee,2,0,"span",47)(7,nee,3,4,"span",51),xf()),2&e){let e=Yf(4);Vd(3),lm(e.item.multiCustomizations?jm(4,4,e.item.epeUnitPrice,"USD"):e.item.basePrice),Vd(2),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"===e.item.displayType)}}function see(e,t){1&e&&(kf(0,"span",48),am(1,"ea"),xf())}function aee(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function oee(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(5);Vd(),dm(" / ",null==e.item?null:e.item.averageWeight," ",$m(2,2,null==e.item?null:e.item.selectedWeightType),"")}}function lee(e,t){if(1&e&&(kf(0,"span",56),am(1),qm(2,"currency"),ph(3,see,2,0,"span",46)(4,aee,2,0,"span",47)(5,oee,3,4,"span",23),xf()),2&e){let e=Yf(4);Vd(),cm(" ",jm(2,4,null==e.item?null:e.item.netPromotionAmountPer,"USD")," "),Vd(2),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"!==e.item.displayType),Vd(),zh("ngIf","3"===e.item.displayType)}}function cee(e,t){if(1&e&&(kf(0,"div",49)(1,"small",44),am(2),ph(3,eee,2,0,"small",23),xf(),kf(4,"div",45)(5,"span",59)(6,"span",33),am(7,"your price after savings "),xf(),am(8),qm(9,"currency"),xf()(),kf(10,"div",45),ph(11,ree,8,7,"span",51),xf(),kf(12,"div",45),ph(13,lee,6,7,"span",52),xf()()),2&e){let e=Yf(3);Vd(2),lm(null==e.item?null:e.item.displayEstimateText),Vd(),zh("ngIf","3"===e.item.displayType),Vd(2),zh("ngClass",Om(9,_9,e.item.qty>1)),Vd(3),lm(jm(9,6,null==e.item?null:e.item.netPromotionAmount,"USD")),Vd(3),zh("ngIf",(1===e.item.qty||e.item.qty>1)&&(!e.item.multiCustomizations&&e.item.basePrice>e.item.netPromotionAmountPer||e.item.multiCustomizations&&e.item.epeUnitPrice>e.item.netPromotionAmountPer)),Vd(2),zh("ngIf",e.item.qty>1)}}function dee(e,t){if(1&e&&ph(0,X9,11,10,"div",41)(1,cee,14,11,"div",42),2&e){let e=Yf(2);zh("ngIf",!e.isSCPEnabled),Vd(),zh("ngIf",e.isSCPEnabled)}}function uee(e,t){if(1&e&&(Ef(0),kf(1,"span",35),ph(2,E9,2,1,"div",36)(3,O9,2,1,"div",37)(4,Y9,2,2,"ng-template",null,4,Wm)(6,dee,2,2,"ng-template",null,5,Wm),xf(),Df()),2&e){let e=Yf();Vd(),zh("ngSwitch",e.item.promoType),Vd(),zh("ngSwitchCase",e.item.promoType)}}function pee(e,t){1&e&&Of(0)}function hee(e,t){if(1&e&&(kf(0,"div",40),ph(1,pee,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(11);Vd(),zh("ngTemplateOutlet",e)}}function fee(e,t){1&e&&Of(0)}function mee(e,t){if(1&e&&(kf(0,"div",40),ph(1,fee,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(11);Vd(),zh("ngTemplateOutlet",e)}}function gee(e,t){1&e&&Of(0)}function bee(e,t){if(1&e&&(kf(0,"div",40),ph(1,gee,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(9);Vd(),zh("ngTemplateOutlet",e)}}function yee(e,t){1&e&&Of(0)}function vee(e,t){if(1&e&&(kf(0,"div",40),ph(1,yee,1,0,"ng-container",39),xf()),2&e){Yf();let e=sm(7);Vd(),zh("ngTemplateOutlet",e)}}function wee(e,t){if(1&e&&(kf(0,"span",48),am(1),xf()),2&e){let e=Yf(3);Vd(),cm(" / ",e.item.displayUnitQuantityText,"")}}function _ee(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function See(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(3);Vd(),lm(null==e.item?null:e.item.displayUnitQuantityText)}}function Cee(e,t){if(1&e&&(kf(0,"small",44),am(1),xf(),kf(2,"b"),am(3),qm(4,"currency"),ph(5,wee,2,1,"span",46)(6,_ee,2,0,"span",47)(7,See,2,1,"span",47),xf()),2&e){let e=Yf(2);
1Vd(),lm(null==e.item?null:e.item.displayEstimateText),Vd(2),lm(jm(4,5,e.item.price,"USD")),Vd(2),zh("ngIf",null==e.item?null:e.item.displayUnitQuantityText),Vd(),zh("ngIf","ea"===(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf","ea"!==(null==e.item?null:e.item.displayUnitQuantityText))}}function Iee(e,t){if(1&e&&(kf(0,"div",63),am(1),xf()),2&e){let e=Yf(3);Vd(),cm(" ",null==e.bannerConfiguration?null:e.bannerConfiguration.promoDescription," ")}}function Aee(e,t){if(1&e&&(kf(0,"span",48),am(1),xf()),2&e){let e=Yf(4);Vd(),cm(" / ",e.item.displayUnitQuantityText,"")}}function kee(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function xee(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(null==e.item?null:e.item.displayUnitQuantityText)}}function Tee(e,t){if(1&e&&(Ef(0),kf(1,"span",64)(2,"span",33),am(3),xf(),am(4),qm(5,"currency"),ph(6,Aee,2,1,"span",46)(7,kee,2,0,"span",47)(8,xee,2,1,"span",47),xf(),Df()),2&e){let e=Yf(3);Vd(3),cm(" ",null==e.bannerConfiguration?null:e.bannerConfiguration.promoDescription," applied is "),Vd(),lm(jm(5,5,e.item.basePrice,"USD")),Vd(2),zh("ngIf",null==e.item?null:e.item.displayUnitQuantityText),Vd(),zh("ngIf","ea"===(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf","ea"!==(null==e.item?null:e.item.displayUnitQuantityText))}}function Pee(e,t){if(1&e&&(kf(0,"span",48),am(1),xf()),2&e){let e=Yf(4);Vd(),cm(" / ",e.item.displayUnitQuantityText,"")}}function Eee(e,t){1&e&&(kf(0,"span",33),am(1,"each"),xf())}function Dee(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(null==e.item?null:e.item.displayUnitQuantityText)}}function Oee(e,t){if(1&e&&(kf(0,"span",53)(1,"span",33),am(2),xf(),am(3),qm(4,"currency"),xf()),2&e){let e=Yf(4);Vd(2),cm(" Original price before ",null==e.bannerConfiguration?null:e.bannerConfiguration.promoDescription," is "),Vd(),lm(e.item.multiCustomizations?jm(4,2,e.item.epeUnitPrice,"USD"):e.item.basePrice)}}function Bee(e,t){if(1&e&&(Ef(0),kf(1,"span",64)(2,"span",33),am(3),xf(),am(4),qm(5,"currency"),ph(6,Pee,2,1,"span",46)(7,Eee,2,0,"span",47)(8,Dee,2,1,"span",47),xf(),ph(9,Oee,5,5,"span",51),Df()),2&e){let e=Yf(3);Vd(3),cm(" ",null==e.bannerConfiguration?null:e.bannerConfiguration.promoDescription," applied is "),Vd(),lm(jm(5,6,e.item.price,"USD")),Vd(2),zh("ngIf",null==e.item?null:e.item.displayUnitQuantityText),Vd(),zh("ngIf","ea"===(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf","ea"!==(null==e.item?null:e.item.displayUnitQuantityText)),Vd(),zh("ngIf",e.item.price<e.item.basePrice)}}function Mee(e,t){if(1&e&&(ph(0,Iee,2,1,"div",62),kf(1,"div")(2,"small",44),am(3),xf(),ph(4,Tee,9,8,"ng-container",23)(5,Bee,10,9,"ng-container",23),xf()),2&e){let e=Yf(2);zh("ngIf",e.item.promoEndDate&&e.item.promoEndDate>=e.todaysDate&&e.item.price<e.item.basePrice),Vd(3),lm(null==e.item?null:e.item.displayEstimateText),Vd(),zh("ngIf",e.item.promoEndDate&&e.item.promoEndDate<e.todaysDate),Vd(),zh("ngIf",e.item.promoEndDate&&e.item.promoEndDate>=e.todaysDate)}}function Ree(e,t){if(1&e&&(kf(0,"div",63),am(1),xf(),kf(2,"span",65)(3,"span",33),am(4),xf(),am(5),qm(6,"currency"),xf(),kf(7,"small",66),am(8),kf(9,"span",33),am(10,"to be applied"),xf()()),2&e){let e=Yf(2);Vd(),lm(e.promoTypes.BOGO),Vd(3),cm("",e.promoTypes.BOGO," applied is"),Vd(),lm(jm(6,4,e.item.price,"USD")),Vd(3),cm("",e.item.promoText," ")}}function Lee(e,t){if(1&e&&(Ef(0),kf(1,"span",60),ph(2,hee,2,1,"div",61)(3,mee,2,1,"div",61)(4,bee,2,1,"div",61)(5,vee,2,1,"div",37)(6,Cee,8,8,"ng-template",null,4,Wm)(8,Mee,6,4,"ng-template",null,5,Wm)(10,Ree,11,7,"ng-template",null,6,Wm),xf(),Df()),2&e){let e=Yf();Vd(),zh("ngSwitch",e.item.promoType),Vd(),zh("ngSwitchCase","B"),Vd(),zh("ngSwitchCase","M"),Vd(),zh("ngSwitchCase","P")}}function Fee(e,t){1&e&&Of(0)}function Nee(e,t){if(1&e){let e=Mf();kf(0,"a",74),jf("click",(function(t){Wa(e);let i=Yf().$implicit;return Ha(Yf(3).openOfferDetails(i,t))})),am(1," Details"),xf()}}function Uee(e,t){1&e&&(kf(0,"div",75)(1,"span",76),Tf(2,"img",77),am(3," Offer Complete"),xf()())}function Vee(e,t){if(1&e&&(kf(0,"div",69)(1,"span",70),ph(2,Fee,1,0,"ng-container",39),xf(),kf(3,"span",71),am(4),ph(5,Nee,2,0,"a",72),xf(),ph(6,Uee,4,0,"div",73),xf()),2&e){let e=t.$implicit;Yf(3);let i=sm(34);Vd(2),zh("ngTemplateOutlet",i),Vd(2),cm(" ",null==e?null:e.displayOfferTxt," "),Vd(),zh("ngIf",e.display),Vd(),zh("ngIf",e.display)}}function qee(e,t){1&e&&(kf(0,"div",84),am(1,"Clipped"),xf())}function $ee(e,t){if(1&e){let e=Mf();kf(0,"a",74),jf("click",(function(t){Wa(e);let i=Yf().$implicit;return Ha(Yf(3).openOfferDetails(i,t))})),am(1," Details"),xf()}}function jee(e,t){if(1&e&&(kf(0,"div",75)(1,"span",85),am(2),xf()()),2&e){let e=Yf().$implicit;Vd(2),cm(" Add ",e.minPurchaseQty," Total for Offer")}}function zee(e,t){if(1&e&&(kf(0,"div",75)(1,"span",85),am(2),xf()()),2&e){let e=Yf().$implicit;Vd(2),cm(" ",e.promoText," ")}}function Wee(e,t){if(1&e&&(Ef(0),kf(1,"div",78)(2,"div",79),Tf(3,"img",80,7),ph(5,qee,2,0,"div",81),xf(),kf(6,"div",82)(7,"div",83)(8,"span",71),am(9),ph(10,$ee,2,0,"a",72),xf()(),ph(11,jee,3,1,"div",73)(12,zee,3,1,"div",73),xf()(),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngClass",Om(7,C9,!(null!=e&&e.minPurchaseQty))),Vd(4),zh("ngIf",!(null!=e&&e.promoText)),Vd(),zh("ngClass",Om(9,I9,!(null!=e&&e.minPurchaseQty))),Vd(3),cm(" ",null==e?null:e.displayOfferTxt," "),Vd(),zh("ngIf",i.isOfferDetailsBtnDisplayed(e)),Vd(),zh("ngIf",null==e?null:e.minPurchaseQty),Vd(),zh("ngIf",null==e?null:e.promoText)}}function Hee(e,t){if(1&e&&(Ef(0),ph(1,Vee,7,4,"div",67)(2,Wee,13,11,"ng-container",68),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.savings),Vd(),zh("ngForOf",e.clipped)}}function Yee(e,t){1&e&&Of(0)}function Gee(e,t){if(1&e){let e=Mf();kf(0,"div",69)(1,"div")(2,"span",70),ph(3,Yee,1,0,"ng-container",39),kf(4,"a",86),jf("click",(function(t){let i=Wa(e).$implicit;return Ha(Yf(3).openOfferDetails(i,t))})),am(5),xf()()(),kf(6,"div",87)(7,"span",88),am(8),qm(9,"date"),xf()()()}if(2&e){let e=t.$implicit;Yf(3);let i=sm(34);Vd(3),zh("ngTemplateOutlet",i),Vd(2),cm("Clipped: ",e.offerPrice,""),Vd(),zh("ngStyle",Dm(7,A9)),Vd(2),cm("exp: ",jm(9,4,e.endDate,"M/d"),"")}}function Kee(e,t){if(1&e&&(Ef(0),ph(1,Gee,10,8,"div",67),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.coupons)}}function Qee(e,t){if(1&e&&(Ef(0),ph(1,Hee,3,2,"ng-container",23)(2,Kee,2,1,"ng-container",23),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.isWYSIWYGEnabled),Vd(),zh("ngIf",!e.isWYSIWYGEnabled)}}function Jee(e,t){if(1&e){let e=Mf();kf(0,"div",92),jf("keyup.enter",(function(){Wa(e);let t=Yf(2);return Ha(t.productWarningNavigation(t.item,"prop65"))}))("click",(function(){Wa(e);let t=Yf(2);return Ha(t.productWarningNavigation(t.item,"prop65"))})),am(1," Prop 65 Warning "),xf()}}function Zee(e,t){1&e&&(kf(0,"div",93),am(1," Age Restricted Item "),xf())}function Xee(e,t){if(1&e&&(Ef(0),kf(1,"div",89),ph(2,Jee,2,0,"div",90)(3,Zee,2,0,"div",91),xf(),Df()),2&e){let e=Yf();
1Vd(2),zh("ngIf",e.item.prop65WarningText),Vd(),zh("ngIf",e.item.isAgeRestrictedItem)}}function ete(e,t){if(1&e&&(kf(0,"a",94),am(1," Edit "),xf()),2&e){let e=Yf();_h("aria-label","Customize ",e.item.name,""),zh("href",e.getCustomizableProductLink,id)("ngStyle",e.primaryColor)}}function tte(e,t){1&e&&Tf(0,"div",100)}function ite(e,t){if(1&e&&(kf(0,"label",101)(1,"span",102),Tf(2,"img",103),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(2);Vd(4),cm("Scheduled: Every ",1===e.item.snsSub.snsFrequency.count?"week":e.item.snsSub.snsFrequency.count+" weeks","")}}function nte(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"date"),xf()),2&e){let e=Yf(3);Vd(),cm("Your next pickup: ",jm(2,1,e.item.nextFulfillmentDate,"MMM d"),"")}}function rte(e,t){if(1&e&&(kf(0,"span"),am(1),qm(2,"date"),xf()),2&e){let e=Yf(3);Vd(),cm("Your next delivery: ",jm(2,1,e.item.nextFulfillmentDate,"MMM d"),"")}}function ste(e,t){if(1&e&&(kf(0,"label",104)(1,"span",102),Tf(2,"img",103),xf(),ph(3,nte,3,4,"span",23)(4,rte,3,4,"span",23),xf()),2&e){let e=Yf(2);Vd(3),zh("ngIf","DUG"===e.item.snsData.fulfillment.fulfillmentType),Vd(),zh("ngIf","DUG"!==e.item.snsData.fulfillment.fulfillmentType)}}function ate(e,t){if(1&e&&(kf(0,"div"),ph(1,tte,1,0,"div",95),kf(2,"div",96)(3,"div",97),ph(4,ite,5,1,"label",98)(5,ste,5,2,"label",99),xf()()()),2&e){let e=Yf();Vd(),zh("ngIf",e.item.snsSub&&e.item.snsSub.isSnsSub||e.item.isActiveSubscription),Vd(3),zh("ngIf",e.item.snsSub&&e.item.snsSub.isSnsSub&&!e.item.isActiveSubscription),Vd(),zh("ngIf",e.item.isActiveSubscription)}}function ote(e,t){if(1&e){let e=Mf();kf(0,"div",105)(1,"app-substitution-card",106),jf("SubstitutionDrawerEvent",(function(){return Wa(e),Ha(Yf().substituteProduct())})),xf()()}if(2&e){let e=Yf();Vd(),zh("paritySubsFlag",e.newSubsViewFlag)("item",e.item)}}function lte(e,t){1&e&&Tf(0,"div",107)}function cte(e,t){if(1&e&&(Ef(0),am(1),Df()),2&e){let e=Yf(3);Vd(),dm(" ",e.item.selectedWeight," ",e.item.selectedWeightType," ")}}function dte(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"span",114),ph(2,cte,2,2,"ng-container",58),xf(),kf(3,"button",115),jf("click",(function(t){return Wa(e),Ha(Yf(2).incrementItemQty(t))})),Tf(4,"span",116),xf(),Df()}if(2&e){let e=Yf(2),t=sm(32);Vd(),Jf("id","cartQty"+e.index+"- click to specify a quantity"),gh("aria-describedby","itemname"+e.item.itemId),Vd(),zh("ngIf",!e.isQtyUpdated)("ngIfElse",t),Vd(),_h("aria-label","Increase ",e.item.name,""),Jf("id",e.prefix+"incBtn"+e.index),zh("disabled",e.item.selectedWeight===e.priceList[e.priceList.length-1]),Vd(),zh("ngStyle",e.getBackgroundPrimaryColor)}}function ute(e,t){1&e&&Of(0)}function pte(e,t){if(1&e&&(kf(0,"span",120),ph(1,ute,1,0,"ng-container",39),xf()),2&e){Yf(3);let e=sm(32);Vd(),zh("ngTemplateOutlet",e)}}function hte(e,t){if(1&e){let e=Mf();kf(0,"input",121),jf("blur",(function(t){return Wa(e),Ha(Yf(3).doInputQtyUpdate(t))}))("keyup.enter",(function(t){return Wa(e),Ha(Yf(3).doInputQtyUpdate(t))}))("input",(function(t){return Wa(e),Ha(Yf(3).filterMaxLength(t))})),xf()}if(2&e){let e=Yf(3);Jf("id",e.prefix+"-qtyInput"+e.index),zh("ngStyle",e.primaryColor)("value",e.item.qty),gh("aria-describedby","itemname"+e.item.itemId)}}function fte(e,t){if(1&e){let e=Mf();Ef(0),ph(1,pte,2,1,"span",117)(2,hte,1,4,"input",118),kf(3,"button",119),jf("focusout",(function(t){Wa(e);let i=Yf(2);return Ha(i.onFocusOutEvent(t,i.item.itemId))}))("click",(function(t){return Wa(e),Ha(Yf(2).incrementItemQty(t))})),Tf(4,"span",116),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("ngIf",e.isQtyUpdated),Vd(),zh("ngIf",!e.isQtyUpdated),Vd(),_h("aria-label","Increase ",e.item.name,""),Jf("id",e.prefix+"incBtn"+e.index),zh("disabled",e.item.qty===e.item.maxPurchaseQty),Vd(),zh("ngStyle",e.getBackgroundPrimaryColor)}}function mte(e,t){if(1&e){let e=Mf();kf(0,"div",108,8)(2,"div",109)(3,"div",110)(4,"div",111)(5,"button",112),jf("focusout",(function(t){Wa(e);let i=Yf();return Ha(i.onFocusOutEvent(t,i.item.itemId))}))("click",(function(t){return Wa(e),Ha(Yf().decrementItemQty(t))})),Tf(6,"span",113),xf(),Tf(7,"span",33),ph(8,dte,5,9,"ng-container",23)(9,fte,5,7,"ng-container",23),xf()()()()}if(2&e){let e=Yf();Jf("id","normalqty"+e.item.itemId),Vd(4),Yh("product-btn__qty-step--loading",e.isUpdating),Jf("id","stepper-"+e.item.itemId),zh("ngStyle",e.getPrimaryBorderStyle),gh("aria-label",e.stepperLabel),Vd(),_h("aria-label","Decrease ",e.item.name,""),Jf("id",e.prefix+"decBtn"+e.index),Vd(),zh("ngStyle",e.getBackgroun
1dPrimaryColor),Vd(2),zh("ngIf",e.isLbVsEachEnabled&&"3"===e.item.displayType),Vd(),zh("ngIf",!e.isLbVsEachEnabled||e.isLbVsEachEnabled&&"3"!==e.item.displayType)}}function gte(e,t){1&e&&(So(),kf(0,"svg",122),Tf(1,"path",123),xf())}function bte(e,t){1&e&&(So(),kf(0,"svg",124,7),Tf(2,"path",125),xf())}function yte(e,t){if(1&e&&(am(0),qm(1,"currency")),2&e){lm(jm(1,1,Yf().item.basePrice,"USD"))}}var vte=(()=>{class e{constructor(e,t,i){this.miniCartService=e,this.snackBarService=t,this.occoService=i,this.isWYSIWYGEnabled=!1,this.updateItem=new _l,this.increaseQty=new _l,this.decreaseQty=new _l,this.removeItem=new _l,this.setFocusElement=new _l,this.updateSubstitution=new _l,this.screenWidth=window.innerWidth,this.stepperLabel="Quantity Stepper",this.showQtyInput=!1,this.stat=!1,this.saveSatusItem=void 0,this.todaysDate=Date.now(),this.isPreferencesChanged=!1,this.isPreferencesOpen=!0,this.isFullStepper=!1,this.promoTypes={BOGO:"Buy 1 Get 1 Free",B2G1:"Buy Two Get 1 Free"},this.cartText="",this.savings=[],this.clipped=[],this.showSubstitutionFlag=!1,this.priceList=[],this.isQtyUpdated=!1,this.debounceId=null,this.enableFlexiDiscounts=!1,console.log("Mini cart item component loaded"),this.stepperToggleSubscription=this.miniCartService.hide
1Stepper$.subscribe((e=>{e?.isClose&&e?.item?.itemId!==this.item?.itemId&&(this.isFullStepper=!1)}))}ngOnInit(){let e=this.miniCartService.getCurrentEnvironment();this.newSubsViewFlag=q7[e]?.substitutionApiConfig?.paritySubsBanners?.includes(this.banner?.toLowerCase()),this.prefix="mc",this.showQtyInput=!1,this.item.incrementPriceList&&this.item.incrementPriceList.forEach((e=>{this.priceList.push(e.weight)})),this.item.qty===this.item.maxPurchaseQty?this.cartText="max":this.cartText="",console.log("Past choice flag in item component: getCustomCakeImageUrl"),this.getCustomCakeImageUrl()}getCustomCakeImageUrl(){if(console.log("Fetching custom cake image for item:",this.item,"getCustomCakeImageUrl called"),!this.item?.isCustomCake||!this.item?.artifactCollectionId)return this.derivedImageUrl=this.item.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available","";let e=this.miniCartService.getCurrentEnvironment(),t=q7[e]?.occoApiConfig;return this.occoService.getArtifactMetaInfoforMini(this.item.artifactCollectionId).subscribe({next:i=>{if(i&&i.previewPublicUrl){let n;n=window.location.href.indexOf("localhost")>-1?`https://www-${e}.${this.banner}.com`:window.location.origin,this.derivedImageUrl=`${n}${t.customCakeUrlprefix}${i.previewPublicUrl}`}},error:e=>{console.error("Error fetching custom cake image:",e),this.derivedImageUrl=this.item.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available"}}),this.derivedImageUrl=this.item.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",""}isOfferDetailsBtnDisplayed(e){let t=e.hasOwnProperty("isClippable")&&!e.isClippable&&!["M","B"].includes(e?.promoType);return e.omsOfferId&&(!e.hasOwnProperty("isClippable")||(!!t||e.isClippable))||e.displayDetails}ngOnChanges(e){this.backendStatus||void 0===this.backendStatus?this.backendStatus&&(this.actualPreference=void 0,this.saveSatusItem,this.stat=!1,this.saveSatusItem=void 0):(this.item.qty=this.originalQty,this.item.substitutionPreference=this.actualPreference,this.stat=!1),e.isUpdating&&!1===e.isUpdating.currentValue&&(this.isQtyUpdated=!0,setTimeout((()=>{this.isQtyUpdated=!1,this.stepperLabel="Quantity Stepper"}),300)),this.savings=this.item.savings?this.item.savings.filter((e=>!0===e.display&&e.displayOfferTxt)):[],this.item.snsSavings&&this.item.snsSavings.ecomAppliedText&&this.savings.push({displayOfferTxt:this.item.snsSavings.ecomAppliedText}),this.clipped=this.item.clipped?this.item.clipped.filter((e=>e.displayOfferTxt)):[],this.checkCMSOffers(),this.getCustomCakeImageUrl()}checkCMSOffers(){if(["B","M"].includes(this.item.promoType)&&0==this.item.savings?.filter((e=>!0===e.display&&this.item.linkPluNumber===e.linkPluNumber)).length){let e={};e.displayOfferTxt=this.item.promoDescription,e.promoText=this.item.promoText,e.promoType=this.item.promoType,0==this.clipped.filter((e=>!0===e.display&&this.item.linkPluNumber===e.linkPluNumber)).length&&this.clipped.push(e)}}toggleQtyInput(e){e.stopPropagation(),this.persistOriginalValue(),this.showQtyInput=!this.showQtyInput,this.showQtyInput&&(setTimeout((()=>{$(`#${this.banner}-qtyInput`+this.index).parent().find(".specify-quantity-more").trigger("focus")}),10),setTimeout((()=>{$(`#${this.banner}-qtyInput`+this.index).trigger("focus"),$(`#${this.banner}-qtyInput`+this.index).trigger("select")}),150))}doInputQtyUpdate(e){this.showQtyInput=!1;let t=e.target.value;if(Number(e.target.value)<=this.item.maxPurchaseQty){Number(e.target.value)===this.item.maxPurchaseQty?this.cartText="max":this.cartText="";let i={element:"#"+this.prefix+"-qtyInput"+this.index,itemIndex:this.index};setTimeout((()=>{null!=t&&""!==t&&parseInt(t,10)!==this.item.qty&&(this.item.qty>t?(this.item.qty=parseInt(t,10),0===this.item.qty||null===this.item.qty?this.deleteItem():(this.processingStatus(),this.setFocusElement.emit(i),this.emitDecreaseQty())):(this.item.qty=parseInt(t,10),this.processingStatus(),this.setFocusElement.emit(i),this.emitIncreaseQty()))}),0)}else if(this.item.qty!==this.item.maxPurchaseQty){let e={element:"#"+this.prefix+"-qtyInput"+this.index,itemIndex:this.index};setTimeout((()=>{this.processingStatus(),this.setFocusElement.emit(e),this.item.qty=this.item.maxPurchaseQty,this.emitIncreaseQty(),this.cartText="max"}),0)}}filterMaxLength(e){e.target.value=e.target.value.replace(/\./g,""),e.target.value.length>=e.target.maxLength&&(e.target.value=e.target.value.slice(0,e.target.maxLength))}deleteItem(){this.processingStatus(),this.removeItem.emit(this.item)}persistOriginalValue(){this.stat||(this.originalQty=this.item.qty,this.actualPreference=this.item.substitutionPreference,this.stat=!0)}decrementItemQty(e){if(e.stopPropagation(),!this.isUpdating)if(this.persistOriginalValue(),this.item.qty>0?this.item.qty=this.item.qty-1:this.item.qty=0,this.cartText="",0===this.item.qty||null===this.item.qty)this.deleteItem();else{let e={element:"#"+this.prefix+"decBtn"+this.index,itemIndex:this.index};clearTimeout(this.debounceId),this.debounceId=setTimeout((()=>{this.processingStatus("#"+this.prefix+"decBtn"+this.index),this.setFocusElement.emit(e),this.emitDecreaseQty()}),300)}}incrementItemQty(e){if(e.stopPropagation(),this.isUpdating)return;this.persistOriginalValue(),this.item.qty<this.item.maxPurchaseQty?this.item.qty=this.item.qty+1:this.item.qty=this.item.maxPurchaseQty,this.item.qty===this.item.maxPurchaseQty?this.cartText="max":this.cartText="";let t={element:"#"+this.prefix+"incBtn"+this.index,itemIndex:this.index};clearTimeout(this.debounceId),this.debounceId=setTimeout((()=>{this.processingStatus("#"+this.prefix+"incBtn"+this.index),this.setFocusElement.emit(t),this.emitIncreaseQty()}),300)}processingStatus(e){this.stepperLabel="Processing",$(e||"#stepper-"+this.item.itemId)?.trigger("focus")}emitIncreaseQty(){this.increaseQty.emit({cartItem:this.item,deltaQty:this.item.qty-this.originalQty,cart:this.individualCart})}emitDecreaseQty(){this.decreaseQty.emit({cartItem:this.item,deltaQty:this.item.qty-this.originalQty,cart:this.individualCart})}analyticsSimilarItemsTracking(){}substituteProduct(){this.triggerSnackbarCloseEvent(),this.miniCartService._substituteItem.next({product:this.item,cartId:this.cartId,cartCategory:this.cartCategory,cart:this.individualCart})}openOfferDetails(e,t){let i;this.triggerSnackbarCloseEvent(),i="1P"===this.cartCategory?"abs":"3P_MARKETPLACE"===this.cartCategory?"mkp":this.cartCategory,this.miniCartService._couponDetail
1s.next({coupon:e,cartItem:h({},this.item),programType:i}),this.analyticsOfferDetailsClick(e)}toggleQuantityStepper(e){this.isFullStepper=!0,this.hideQuantityStepper(),setTimeout((()=>{$("#"+this.prefix+"decBtn"+this.index)?.trigger("focus")}),0),e.stopPropagation()}hideQuantityStepper(){this.miniCartService._hideStepper.next({isClose:!0,item:this.item})}productWarningNavigation(e,t){let i="";"prop65"===t&&(i="#prop65-container"),"1P_WINE"===this.cartCategory?window.location.href="/shop/vineandcellar/product-details."+e.itemId+".html"+i:window.location.href="/shop/product-details."+e.itemId+".html"+i}get primaryColor(){return this.miniCartService.getPrimaryColor(this.banner)}get getBackgroundPrimaryColor(){return this.miniCartService.getBackgroundPrimaryColor(this.banner)}get getPrimaryBorderStyle(){return this.miniCartService.getPrimaryBorderStyle(this.banner)}get primaryColorAndBorder(){return h(h({},this.primaryColor),this.getPrimaryBorderStyle)}handleOutsideClick(e){"Enter"!==e?.key&&this.quantityStepper&&!this.quantityStepper.nativeElement.contains(e.target)&&(this.isFullStepper=!1)}onFocusOutEvent(e,t){setTimeout((()=>{document.activeElement.id!="mc-qtyInput"+t&&this.screenWidth<786&&this.quantityStepper&&!this.quantityStepper.nativeElement.contains(e.target)&&(this.isFullStepper=!1)}))}ngOnDestroy(){this.stepperToggleSubscription&&this.stepperToggleSubscription.unsubscribe()}analyticsOfferDetailsClick(e){window.AB&&window.AB.DATALAYER&&e&&e.displayOfferTxt&&window.AB.DATALAYER.setLinkClickOfferDrawer("M"===e.promoType||"B"===e.promoType?"offer-drawer-bogo-minicart":"offer-drawer-j4u-minicart",e.displayOfferTxt)}triggerSnackbarCloseEvent(){this.snackBarService.snackBarEventEmitter$.next({type:"close-snack-bar"})}get isSNSEligible(){return this.individualCart.isSNSCNCEnabled&&"1P"===this.individualCart.cartCategory||this.individualCart.isSNSB2BEnabled&&"1P_B2B"===this.individualCart.cartCategory}get productLink(){return"1P_WINE"===this.cartCategory?"/shop/vineandcellar/product-details."+this.item.itemId+".html":"3P_MARKETPLACE"===this.cartCategory?"/shop/marketplace/product-details."+this.item.itemId+".html":"/shop/product-details."+this.item.itemId+".html"}get getCustomizableProductLink(){let e,t="/shop/product-details."+this.item.itemId+".html";return this.item?.isCustomCake?e="1p_CC":this.item?.isCustomizable&&(e="1p_deli"),e?`${t}?src=mini-cart&entryId=${this.item.entryId}&pgm=${e}&action=edit`:t}static{this.ɵfac=function(t){return new(t||e)($d(Q7),$d(K7),$d(y9))}}static{this.ɵcmp=Qr({type:e,selectors:[["mini-cart-item"]],viewQuery:function(e,t){if(1&e&&tm(v9,5),2&e){let e;im(e=nm())&&(t.quantityStepper=e.first)}},hostBindings:function(e,t){1&e&&jf("click",(function(e){return t.handleOutsideClick(e)}),0,ld)("touchstart",(function(e){return t.handleOutsideClick(e)}),!1,ld)("keyup",(function(e){return t.handleOutsideClick(e)}),!1,ld)},inputs:{item:"item",cartId:"cartId",isUpdating:"isUpdating",index:"index",bannerConfiguration:"bannerConfiguration",coupons:"coupons",backendStatus:"backendStatus",banner:"banner",cartCategory:"cartCategory",isMFC:"isMFC",isWYSIWYGEnabled:"isWYSIWYGEnabled",isSubstitutions2Enabled:"isSubstitutions2Enabled",isSCPEnabled:"isSCPEnabled",isLbVsEachEnabled:"isLbVsEachEnabled",individualCart:"individualCart"},outputs:{updateItem:"updateItem",increaseQty:"increaseQty",decreaseQty:"decreaseQty",removeItem:"removeItem",setFocusElement:"setFocusElement",updateSubstitution:"updateSubstitution"},features:[ga],decls:37,vars:28,consts:[["quantityStepper",""],["priceUpdateSuccess",""],["checkImage",""],["getBasePrice",""],["defaultPrice",""],["markDownId",""],["promoTypeBOGOID",""],["clippedImg",""],["quantityStepperEl",""],[1,"mktp-cart-product-card","cart-dst-product-card","cart-dst-no-x-axis-padding"],["tabindex","-1","aria-hidden","true",1,"mktp-cart-product-card__img","cart-dst-product-image-wrapper"],["tabindex","-1","aria-hidden","true","role","link",1,"cart-dst-image-wrapper",3,"id","href"],[1,"cart-product-image"],["media","(max-width: 414px)",3,"srcset"],["media","(max-width: 768px)",3,"srcset"],["data-qa","swy-prd1-img","onerror","this.style.display = 'none'","role","img","aria-hidden","true","tabindex","-1",1,"cart-dst-product-image",3,"src","ngStyle","alt"],["tabindex","-1","aria-label","",1,"mktp-cart-product-card__content","cart-dst-content",3,"id"],["tabindex","-1",1,"mktp-cart-product-card__content__row1"],[1,"mktp-cart-product-card__content__row1__title","cart-dst-title"],["data-qa","swy-prd1-ttl",1,"mktp-cart-product-card__content__row1__title","cart-dst-product-name",3,"href","id"],[1,"mktp-cart-product-card__content__row1__qty-circle","cart-dst-qty-circle"],["class","mktp-cart-product-card__content__row1__qty-circle__text cart-dst-quantity-circle","data-qa","swy-prd1-qty",3,"ngStyle","cart-dst-auto-width","click",4,"ngIf","ngIfElse"],[1,"mktp-cart-product-card__content__row1__price","cart
1-dst-price"],[4,"ngIf"],[3,"cartItem"],[1,"mktp-cart-product-card__content__row4"],[1,"d-flex","justify-content-start"],["role","link","class","mktp-cart-product-card__content__row4__btn cart-dst-action-item label-border",3,"href","ngStyle",4,"ngIf"],["role","link","data-qa","swy-prd1-rmv",1,"mktp-cart-product-card__content__row4__btn","cart-dst-action-item",3,"click","ngStyle"],["class","sub-past-choice-cointainer",4,"ngIf"],["class","cart-dst-quantity-overlay","tabindex","-1",4,"ngIf"],["data-qa","swy-prd1-qty",1,"mktp-cart-product-card__content__row1__qty-circle__text","cart-dst-quantity-circle",3,"click","ngStyle"],["class","cart-dst-quantity-text",4,"ngIf"],[1,"sr-only"],[1,"cart-dst-quantity-text"],[1,"product-details-container",3,"ngSwitch"],["class","product-prices-wrapper mb-3",4,"ngSwitchCase"],["class","product-prices-wrapper",4,"ngSwitchDefault"],[1,"product-prices-wrapper","mb-3"],[4,"ngTemplateOutlet"],[1,"product-prices-wrapper"],["tabindex","0",4,"ngIf"],["tabindex","-1",4,"ngIf"],["tabindex","0"],[1,"d-block"],["aria-hidden","false"],["aria-hidden","true",4,"ngIf"],["class","sr-only",4,"ngIf"],["aria-hidden","true"],["tabindex","-1"],[1,"mktp-cart-product-card__content__row1__price__per-qty","d-block",3,"ngClass"],["class","mktp-cart-product-card__content__row1__price__per-each-striked",4,"ngIf"],["class","d-block mktp-cart-product-card__content__row1__price__per-each",4,"ngIf"],[1,"mktp-cart-product-card__content__row1__price__per-each-striked"],["class","mktp-cart-product-card__content__row1__price__per-each-striked","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mktp-cart-product-card__content__row1__price__per-each-striked"],[1,"d-block","mktp-cart-product-card__content__row1__price__per-each"],[3,"ngClass"],[4,"ngIf","ngIfElse"],[1,"d-block",3,"ngClass"],["tabindex","0",1,"product-details-container",3,"ngSwitch"],["class","product-prices-wrapper",4,"ngSwitchCase"],["class","product-offer-title strike-through-color",4,"ngIf"],[1,"product-offer-title","strike-through-color"],[1,"mktp-cart-product-card__content__row1__price__per-qty","pr-1"],[1,"mktp-cart-product-card__content__row1__price__per-qty","mr-2"],[1,"text-muted","promo-text"],["class","mktp-cart-product-card__content__row2",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"mktp-cart-product-card__content__row2"],[1,"mktp-cart-product-card__content__row2__green-check"],[1,"cart-dst-clipped-coupon"],["class","cart-dst-text-underline","href","javascript:void(0);","role","button","aria-label","Offer Details",3,"click",4,"ngIf"],["class","cart-dst-offer-exp",4,"ngIf"],["href","javascript:void(0);","role","button","aria-label","Offer Details",1,"cart-dst-text-underline",3,"click"],[1,"cart-dst-offer-exp"],[1,"cart-dst-clipped-offer-complete"],["src","/erums/cart/dist/assets/images/birthday-party-hat.png",1,"cart-dst-birthday-party-icon"],[1,"mb-0","whitepsace-nowrap",3,"ngClass"],[1,"d-inline-block","text-center","cart-dst-cipped-tag"],["alt","","src","/erums/cart/dist/assets/images/deals-unselected.png",1,"cart-dst-clipped-icon-tag"],["class","cart-dst-clipped-icon-tag-text",4,"ngIf"],[1,"d-inline-block",3,"ngClass"],["id","cart-dst-clipped-text"],[1,"cart-dst-clipped-icon-tag-text"],[1,"cart-dst-clipped-offer-complete","cart-dst-clipped-coupon-under-text"],["role","button","href","javascript:void(0);",1,"color-primary-default","cart-dst-text-underline",3,"click"],[1,"cart-dst-offer-exp","text-muted",3,"ngStyle"],[1,""],[1,"mktp-cart-product-card__content__row3"],["tabindex","0","role","link","class","mktp-cart-product-card__content__row3__tag cart-dst-warning-label","data-qa","swy-prd1-tg1",3,"keyup.enter","click",4,"ngIf"],["tabindex","0","role","link","class","mktp-cart-product-card__content__row3__tag cart-dst-warning-label","data-qa","swy-prd1-tg2",4,"ngIf"],["tabindex","0","role","link","data-qa","swy-prd1-tg1",1,"mktp-cart-product-card__content__row3__tag","cart-dst-warning-label",3,"keyup.enter","click"],["tabindex","0","role","link","data-qa","swy-prd1-tg2",1,"mktp-cart-product-card__content__row3__tag","cart-dst-warning-label"],["role","link",1,"mktp-cart-product-card__content__row4__btn","cart-dst-action-item","label-border",3,"href","ngStyle"],["class","sns-border",4,"ngIf"],[1,"col-12","mb-3"],[1,"container-sns"],["class","d-inline schedule-content",4,"ngIf"],["class","d-inline",4,"ngIf"],[1,"sns-border"],[1,"d-inline","schedule-content"],[1,"pr3"],["src","/erums/cart/dist/assets/images/sns.png","alt",""],[1,"d-inline"],[1,"sub-past-choice-cointainer"],[3,"SubstitutionDrawerEvent","paritySub
1sFlag","item"],["tabindex","-1",1,"cart-dst-quantity-overlay"],[1,"quantity-stepper-v3","cart-dst-qty-wrapper",3,"id"],[1,"quantity-stepper-container"],[1,"product-btn","product-btn--without-ar"],["tabindex","-1","role","group",1,"btn","product-btn__qty-step","cart-dst-qty-stepper",3,"id","ngStyle"],["data-qa","prdctdcrmntr","role","button","tabindex","0",1,"product-btn__qty-step__decrease",3,"focusout","click","id"],["aria-hidden","true",1,"svg-qty-stepper-decrease","product-btn__qty-step__decrease--icon",3,"ngStyle"],["data-qa","prd-qty-stppr-qtymsg","role","button","tabindex","0",1,"product-btn__qty-step__amt","h-100",3,"id"],["data-qa","prdctincrmntr","role","button","tabindex","0",1,"product-btn__qty-step__increase",3,"click","id","disabled"],["aria-hidden","true",1,"svg-qty-stepper-increase","product-btn__qty-step__increase--icon",3,"ngStyle"],["class","product-btn__qty-step__amt",4,"ngIf"],["type","number","aria-label","item quantity","inputmode","numeric","pattern","[0-9]*","maxlength","2","class","form-control text-center product-btn__qty-step__amt cart-dst-item-qty h-100","max","item.maxPurchaseQty","min","0","required","",3,"id","ngStyle","value","blur","keyup.enter","input",4,"ngIf"],["data-qa","prdctincrmntr","role","button","tabindex","0",1,"product-btn__qty-step__increase",3,"focusout","click","id","disabled"],[1,"product-btn__qty-step__amt"],["type","number","aria-label","item quantity","inputmode","numeric","pattern","[0-9]*","maxlength","2","max","item.maxPurchaseQty","min","0","required","",1,"form-control","text-center","product-btn__qty-step__amt","cart-dst-item-qty","h-100",3,"blur","keyup.enter","input","id","ngStyle","value"],["width","18","height","15","viewBox","0 0 18 15","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M17.4685 0.414376C17.792 0.673133 17.8444 1.1451 17.5857 1.46855L7.58566 13.9685C7.45593 14.1307 7.26478 14.2318 7.05774 14.2478C6.85069 14.2638 6.64629 14.1932 6.49321 14.0529L0.493211 8.55289C0.187872 8.273 0.167245 7.79857 0.447139 7.49323C0.727033 7.18789 1.20146 7.16727 1.5068 7.44716L6.91547 12.4051L16.4144 0.531506C16.6731 0.20806 17.1451 0.155619 17.4685 0.414376Z","fill","#8C0E12"],["xmlns","http://www.w3.org/2000/svg","width","13","height","11","viewBox","0 0 13 11","fill","none","data-qa","swy-prd1-offr-ckmrk"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.3201 0.615902C12.5322 0.792684 12.5609 1.10797 12.3841 1.3201L4.88411 10.3201C4.79418 10.428 4.66299 10.4931 4.52266 10.4995C4.38232 10.5059 4.24578 10.4529 4.14645 10.3536L0.146448 6.35361C-0.0488147 6.15835 -0.0488163 5.84176 0.146445 5.6465C0.341706 5.45124 0.658288 5.45124 0.853552 5.6465L4.4664 9.25931L11.6159 0.67992C11.7927 0.467782 12.108 0.43912 12.3201 0.615902Z","fill","#1A875B"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",9)(1,"div",10)(2,"a",11)(3,"picture",12),Tf(4,"source",13)(5,"source",14)(6,"img",15),xf()()(),kf(7,"div",16)(8,"div",17)(9,"div",18)(10,"a",19),am(11),xf()(),kf(12,"div",20),ph(13,T9,5,6,"button",21),xf(),kf(14,"div",22),ph(15,uee,8,2,"ng-container",23)(16,Lee,12,4,"ng-container",23),xf()(),ph(17,Qee,3,2,"ng-container",23)(18,Xee,4,2,"ng-container",23),Tf(19,"app-mto",24),kf(20,"div",25)(21,"div",26)(22,"div"),ph(23,ete,2,4,"a",27),kf(24,"button",28),jf("click",(function(){return Wa(e),Ha(t.deleteItem())})),am(25," Remove "),xf()()()(),ph(26,ate,6,3,"div",23),xf(),ph(27,ote,2,2,"div",29)(28,lte,1,0,"div",30),xf(),ph(29,mte,10,12,"ng-template",null,0,Wm)(31,gte,2,0,"ng-template",null,1,Wm)(33,bte,3,0,"ng-template",null,2,Wm)(35,yte,2,4,"ng-template",null,3,Wm)}if(2&e){let e=sm(30);Vd(2),Jf("id","mc-itemimage-"+t.item.itemId),zh("href",t.productLink,id),gh("aria-label",t.item.name+" graphic"),Vd(2),zh("srcset",t.derivedImageUrl||t.item.imageUrl+"?$ecom-cart-mobile-jpg$&defaultImage=Not_Available"),Vd(),zh("srcset",t.derivedImageUrl||t.item.imageUrl+"?$ecom-cart-tablet-jpg$&defaultImage=Not_Available"),Vd(),Jf("alt",t.item.name),zh("src",t.derivedImageUrl||t.item.imageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id)("ngStyle",Om(26,w9,t.derivedImageUrl?"85px":"")),Vd(),Jf("id","mc-item-"+t.item.itemId),Vd(3),Jf("id","mc-item-"+t.cartId+"-"+t.item.itemId),zh("href",t.productLink,id
1),Vd(),lm(t.item.name),Vd(2),zh("ngIf",!t.isFullStepper)("ngIfElse",e),Vd(2),zh("ngIf",t.item.price>0&&t.item.isAvailable&&t.isWYSIWYGEnabled),Vd(),zh("ngIf",t.item.price>0&&t.item.isAvailable&&!t.isWYSIWYGEnabled),Vd(),zh("ngIf",t.item.price>0&&t.item.isAvailable),Vd(),zh("ngIf",t.item.prop65WarningText||t.item.isAgeRestrictedItem),Vd(),zh("cartItem",t.item),Vd(4),zh("ngIf",(null==t.item?null:t.item.isDigitalDeliDept)||(null==t.item?null:t.item.isCustomCake)),Vd(),_h("aria-label","Remove ",t.item.name,""),zh("ngStyle",t.primaryColor),Vd(2),zh("ngIf",t.individualCart.isAutoReplenishmentEnabled&&t.isSNSEligible),Vd(),zh("ngIf",!t.individualCart.seller&&t.isSubstitutions2Enabled&&!(null!=t.item&&t.item.isCustomCake)&&!(null!=t.item&&t.item.isCateringProduct)&&"1P_WINE"!==t.individualCart.cartCategory&&!(null!=t.item&&t.item.isCustomizable&&null!=t.item&&t.item.multiCustomizations)),Vd(),zh("ngIf",t.isFullStepper)}},dependencies:[sy,oy,cy,by,gy,hy,fy,my,lk,QT,Sy,By,Ty],styles:[".cart-dst-content[_ngcontent-%COMP%]{width:75%}.cart-dst-quantity-circle[_ngcontent-%COMP%]{min-width:40px!important;width:auto!important}.cart-dst-quantity-circle[_ngcontent-%COMP%] .cart-dst-quantity-text[_ngcontent-%COMP%]{white-space:nowrap}.cart-dst-no-x-axis-padding[_ngcontent-%COMP%]{padding:20px 0;flex-wrap:wrap}.cart-dst-qty-circle[_ngcontent-%COMP%]{flex-basis:25%}.cart-dst-price[_ngcontent-%COMP%]{flex-basis:30%}.cart-dst-product-card[_ngcontent-%COMP%]{position:relative}.cart-dst-product-card[_ngcontent-%COMP%] .cart-dst-quantity-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#f0eaeab5;display:flex;flex-direction:column;align-items:center}.cart-dst-product-card[_ngcontent-%COMP%] .cart-dst-image-wrapper[_ngcontent-%COMP%]:focus{outline:none!important}.cart-dst-product-card[_ngcontent-%COMP%] .cart-dst-warning-label[_ngcontent-%COMP%]{text-decoration:underline;font-weight:600}.cart-dst-product-card[_ngcontent-%COMP%] .cart-dst-warning-label[_ngcontent-%COMP%]:hover{cursor:pointer}.cart-dst-product-card[_ngcontent-%COMP%] .cart-dst-action-item[_ngcontent-%COMP%]{text-decoration:underline}.cart-dst-item-qty[_ngcontent-%COMP%]:not(.ada-focus){outline:none!important;outline-offset:initial!important}.cart-dst-text-underline[_ngcontent-%COMP%]{text-decoration:underline;font-size:12px;line-height:1.2}.cart-dst-auto-width[_ngcontent-%COMP%]{width:auto!important}.cart-dst-qty-wrapper[_ngcontent-%COMP%]{position:absolute}.cart-dst-qty-wrapper[_ngcontent-%COMP%] .cart-dst-qty-stepper[_ngcontent-%COMP%]{z-index:99999;position:absolute;border-radius:100px!important}.cart-dst-coupon-text-color[_ngcontent-%COMP%], .cart-dst-clipped-offer-complete[_ngcontent-%COMP%], .cart-dst-clipped-coupon[_ngcontent-%COMP%], .cart-dst-clipped-coupon[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#1a875b}.cart-dst-clipped-coupon-under-text[_ngcontent-%COMP%]{color:#4b4b4b}.cart-dst-clipped-coupon[_ngcontent-%COMP%]{font-size:12px;line-height:1.2}.cart-dst-clipped-offer-complete[_ngcontent-%COMP%]{font-size:10px;font-weight:400}.cart-dst-clipped-icon-tag-text[_ngcontent-%COMP%]{font-size:10px;font-weight:600}.cart-dst-clipped-icon[_ngcontent-%COMP%]{width:16px;height:13px;margin-top:0;margin-right:3px}.cart-dst-clipped-icon-wyswyg[_ngcontent-%COMP%]{width:1em;height:.8em}.cart-dst-birthday-party-icon[_ngcontent-%COMP%]{height:14px;width:14px;margin-top:-3px}.cart-dst-clipped-icon-tag[_ngcontent-%COMP%]{width:13px;height:13px}.cart-dst-cipped-tag[_ngcontent-%COMP%]{line-height:initial;margin-right:8px;padding-top:.15em}.cart-dst-offer-exp[_ngcontent-%COMP%]{font-size:12px;margin-top:2px}.cart-dst-product-image-wrapper[_ngcontent-%COMP%]{width:65px;height:65px}@media screen and (min-width: 768px){.cart-dst-title[_ngcontent-%COMP%]{min-width:175px}.cart-dst-product-image-wrapper[_ngcontent-%COMP%]{margin-right:8px;width:84px;height:80px}}.sns-border[_ngcontent-%COMP%]{border-bottom:1px solid lightgrey;width:15em;padding-top:12px}.container-sns[_ngcontent-%COMP%]{font-size:14px;position:relative;left:-1em;top:.5em}.schedule-content[_ngcontent-%COMP%]{font-family:Nunito Sans;font-style:normal;font-weight:400;font-size:14px;line-height:20px}.sub-past-choice-cointainer[_ngcontent-%COMP%]{width:100%}.label-border[_ngcontent-%COMP%]{padding-right:.5em;border-right:.5px solid lightgrey}"]})}}return e})();function wte(e,t){if(1&e){let e=Mf();kf(0,"span",16),jf("click",(function(){return Wa(e),Ha(Yf().emitRemoveAllItems())}))("keyup.enter",(function(){return Wa(e),Ha(Yf().emitRemoveAllItems())}
1)),am(1," Remove all now "),xf()}if(2&e){zh("ngStyle",Yf().primaryColor)}}function _te(e,t){1&e&&(kf(0,"p",38),am(1,"Item not offered"),xf())}function Ste(e,t){1&e&&(kf(0,"p",38),am(1,"Out of stock"),xf())}function Cte(e,t){1&e&&(kf(0,"p",39),am(1,"Available in store only"),xf())}function Ite(e,t){1&e&&(kf(0,"p",39),am(1,"Temporarily unavailable"),xf())}function Ate(e,t){if(1&e){let e=Mf();kf(0,"a",40),jf("click",(function(){return Wa(e),Ha(Yf(3).analyticsViewSimilarItemsCart())})),am(1,"View Similar"),xf()}if(2&e){let e=Yf().$implicit,t=Yf(2);_h("aria-label","View Similar products related to ",e.name,""),Jf("href","/bin/safeway/product/similar?aisleId="+e.aisleId,id),zh("ngStyle",t.getDynamicStyle)}}function kte(e,t){if(1&e){let e=Mf();kf(0,"div",19)(1,"div",20)(2,"a",21)(3,"picture",22),Tf(4,"source",23)(5,"source",24)(6,"img",25),xf()()(),kf(7,"div",26)(8,"div",27)(9,"div",28),ph(10,_te,2,0,"p",29)(11,Ste,2,0,"p",29)(12,Cte,2,0,"p",30)(13,Ite,2,0,"p",30),xf(),kf(14,"div",31)(15,"div",32)(16,"a",33),am(17),xf()()(),kf(18,"div",34)(19,"button",35),jf("click",(function(){let t=Wa(e).$implicit,i=Yf(2);return Ha(!i.isUpdating&&i.emitRemoveItem(t,"non-pickup"))}))("keyup.enter",(function(){let t=Wa(e).$implicit,i=Yf(2);return Ha(!i.isUpdating&&i.emitRemoveItem(t,"non-pickup"))})),am(20," Remove "),xf()()(),kf(21,"div",36),ph(22,Ate,2,4,"a",37),xf()()()}if(2&e){let e=t.$implicit,i=Yf(2);Vd(2),Jf("href","shop/product-details."+e.itemId+".html",id),Vd(2),Jf("srcset",e.derivedImageUrl+"?$ecom-cart-mobile-jpg$&defaultImage=Not_Available"),Vd(),Jf("srcset",e.derivedImageUrl+"?$ecom-cart-tablet-jpg$&defaultImage=Not_Available"),Vd(),Jf("src",e.derivedImageUrl+"?$ecom-cart-desktop-jpg$&defaultImage=Not_Available",id),Jf("alt",e.name),Vd(4),zh("ngIf",!e.isOOS),Vd(),zh("ngIf",e.isOOS&&!e.isAvailableInStore&&!(null!=e&&e.isTemporarilyUnavailable)),Vd(),zh("ngIf",e.isOOS&&e.isAvailableInStore&&!(null!=e&&e.isTemporarilyUnavailable)),Vd(),zh("ngIf",null==e?null:e.isTemporarilyUnavailable),Vd(3),Jf("href","shop/product-details."+e.itemId+".html",id),Jf("id",i.id+"itemname-non-pickup-"+e.itemId),zh("ngClass",e.isCustomizable?"customizable-item":""),gh("aria-label",(e.isOOS?"Out of stock - ":"Item not offered - ")+e.name),Vd(),lm(e.name),Vd(2),_h("aria-label","Remove unavailable item ",e.name," from cart"),zh("ngStyle",i.primaryColor),Vd(3),zh("ngIf",!i.isSellerCart&&e.aisleId)}}function xte(e,t){if(1&e&&(kf(0,"div",17),ph(1,kte,23,18,"div",18),xf()),2&e){let e=Yf();zh("id",e.id+"mc-item-unavailability-accordion-body"),gh("data-parent","#"+e.id+"mc-item-unavailability-accordion-container"),Vd(),zh("ngForOf",e.unavailableItemsList)}}var Tte=(()=>{class e{constructor(e,t){this.miniCartService=e,this.occoService=t,this.showUnavailableProductsAccordion=!1,this.isUpdating=!1,this.chevronImgPath="erums/cart/dist/assets/images/grey_down_2X.png",this.accordionBtnText="Show Items",this.isSellerCart=!1,this.removeItem=new _l,this.removeAllItems=new _l}ngOnInit(){this.loadCustomCakeImages()}ngOnChanges(e){e.unavailableItemsList&&e.unavailableItemsList.currentValue&&this.loadCustomCakeImages()}loadCustomCakeImages(){this.unavailableItemsList?.forEach((e=>{let t=e.imageUrl;e.itemId,e.entryId;if(e.derivedImageUrl=t,!e?.isCustomCake||!e?.artifactCollectionId)return;let i=this.miniCartService.getCurrentEnvironment(),n=q7[i]?.occoApiConfig;this.occoService.getArtifactMetaInfoforMini(e.artifactCollectionId).subscribe({next:t=>{if(t&&t.previewPublicUrl){let r;r=window.location.href.indexOf("localhost")>-1?`https://www-${i}.${this.banner}.com`:window.location.origin,e.derivedImageUrl=`${r}${n.customCakeUrlprefix}${t.previewPublicUrl}`}},error:e=>{console.error("Error fetching custom cake image:",e)}})}))}toggleUnavailableItemsAccordion(){this.showUnavailableProductsAccordion=!this.showUnavailableProductsAccordion,this.chevronImgPath=this.showUnavailableProductsAccordion?"erums/cart/dist/assets/images/grey_up_2X.png":"erums/cart/dist/assets/images/grey_down_2X.png",this.accordionBtnText=this.showUnavailableProductsAccordion?"Hide Items":"Show Items"}emitRemoveItem(e,t){let i={cartItem:e,cartItemType:t};this.removeItem.emit(i)}emitRemoveAllItems(){this.removeAllItems.emit(!0)}analyticsViewSimilarItemsCart(){}get getDynamicStyle(){return this.miniCartService.getDynamicStyle(this.banner)}get primaryColor(){return this.miniCartService.getPrimaryColor(this.banner)}static{this.ɵfac=function(t){return new(t||e)($d(Q7),$d(y9))}}static{this.ɵcmp=Qr({type:e,selectors:[["mini-cart-item-unavailability"]],inputs:{outOfStockItemsList:"outOfStockItemsList",unavailableItemsList:"unavailableItemsList",fulfillmentType:"fulfillmentType",id:"id",banner:"banner",isSellerCart:"isSellerCart"},outputs:{removeItem:"removeItem",removeAllItems:"removeAllItems"},features:[ga],decls:18,vars:7,consts:[["id","cart-dst-unavailable-items",1,"cart-accordion-oos"],[1,"cart-accordion","cart-dst-pointer"],[1,"cart-accordion__header","cart
1-dst-unavailable-accordion","pb-1"],["aria-hidden","true","data-qa","kh-oos-icn",1,"cart-accordion__header__remove-icon","mt-0"],["xmlns","http://www.w3.org/2000/svg","aria-labelledby","oos-icon-title","width","24","height","24","viewBox","0 0 24 24","fill","none","role","img"],["id","oos-icon-title"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.9998 2.37717C6.68537 2.37717 2.37717 6.68537 2.37717 11.9998C2.37717 17.3142 6.68537 21.6224 11.9998 21.6224C17.3142 21.6224 21.6224 17.3142 21.6224 11.9998C21.6224 6.68537 17.3142 2.37717 11.9998 2.37717ZM1.36426 11.9998C1.36426 6.12595 6.12595 1.36426 11.9998 1.36426C17.8737 1.36426 22.6353 6.12595 22.6353 11.9998C22.6353 17.8737 17.8737 22.6353 11.9998 22.6353C6.12595 22.6353 1.36426 17.8737 1.36426 11.9998Z","fill","#C74E4E"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.08359 16.916C7.28138 17.1138 7.60205 17.1138 7.79983 16.916L16.9161 7.79979C17.1138 7.602 17.1138 7.28133 16.9161 7.08355C16.7183 6.88577 16.3976 6.88577 16.1998 7.08355L7.08359 16.1998C6.88581 16.3976 6.88581 16.7182 7.08359 16.916Z","fill","#C74E4E"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.916 16.916C17.1138 16.7182 17.1138 16.3976 16.916 16.1998L7.79979 7.08355C7.60201 6.88577 7.28134 6.88577 7.08356 7.08355C6.88578 7.28133 6.88578 7.602 7.08356 7.79978L16.1998 16.916C16.3976 17.1138 16.7182 17.1138 16.916 16.916Z","fill","#C74E4E"],["data-qa","kh-oos-txt",1,"cart-accordion__header__text","cart-dst-unavailable-header","mt-0"],["aria-label","Unavailable items","data-qa","kh-oos-arr","data-toggle","collapse",1,"cart-accordion__header__carret-icon","cart-dst-unavailable-accordion-toggle","mt-0",3,"click","id"],[1,"svg-caret-collapse"],[1,"svg-caret-expand"],[1,"cart-dst-unavailable--remove-link","pb-1"],["class","cart-accordion__header__link","tabindex","0","role","link","data-qa","kh-oos-lnk","aria-label","Remove all Now, unavailable items from the cart",3,"ngStyle","click","keyup.enter",4,"ngIf"],["class","cart-accordion-content collapse",3,"id",4,"ngIf"],["tabindex","0","role","link","data-qa","kh-oos-lnk","aria-label","Remove all Now, unavailable items from the cart",1,"cart-accordion__header__link",3,"click","keyup.enter","ngStyle"],[1,"cart-accordion-content","collapse",3,"id"],["class","mktp-cart-product-card",4,"ngFor","ngForOf"],[1,"mktp-cart-product-card"],[1,"mktp-cart-product-card__img","oos"],["aria-hidden","true","tabindex","-1",3,"href"],[1,"cart-product-image"],["media","(max-width: 414px)",3,"srcset"],["media","(max-width: 768px)",3,"srcset"],["data-qa","kh-prd1-oos-img","onerror","this.style.display = 'none'",3,"src","alt"],[1,"mktp-cart-product-card__content-oos","cart-dst-oos-content"],[1,"mktp-cart-product-card__content-left"],["aria-hidden","true",1,"mktp-cart-product-card__content__oos"],["class","mktp-cart-product-card__content__oos__text","data-qa","kh-prd1-oos-txt",4,"ngIf"],["class","mktp-cart-product-card__content__oos__text mto-color","data-qa","kh-prd1-oos-txt",4,"ngIf"],[1,"mktp-cart-product-card__content__row1"],[1,"mktp-cart-product-card__content__row1__title","cart-dst-item-auto-width"],["data-qa","kh-prd1-oos-ttl",1,"mktp-cart-product-card__content__row1__title",3,"href","ngClass","id"],[1,"mktp-cart-product-card__content__row4"],["data-qa","kh-prd1-oos-rmv","role","button",1,"mktp-cart-product-card__content__row4__btn","cart-dst-unavailable-item-action","pl-0",3,"click","keyup.enter","ngStyle"],[1,"mktp-cart-product-card__content-right","cart-dst-view-similar"],["role","button","class","mktp-cart-product-card__content__view-similar-btn cart-dst-view-similar-btn","data-qa","kh-prd1-oos-vw-sml",3,"href","ngStyle","click",4,"ngIf"],["data-qa","kh-prd1-oos-txt",1,"mktp-cart-product-card__content__oos__text"],["data-qa","kh-prd1-oos-txt",1,"mktp-cart-product-card__content__oos__text","mto-color"],["role","button","data-qa","kh-prd1-oos-vw-sml",1,"mktp-cart-product-card__content__view-similar-btn","cart-dst-view-similar-btn",3,"click","href","ngStyle"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),So(),kf(4,"svg",4)(5,"title",5),am(6,"Error"),xf(),Tf(7,"path",6)(8,"path",7)(9,"path",8),xf()(),Co(),kf(10,"div",9),am(11),xf(),kf(12,"button",10),jf("click",(function(){return t.toggleUnavailableItemsAccordion()})),Tf(13,"span",11)(14,"span",12),xf()(),kf(15,"div",13),ph(16,wte,2,1,"span",14),xf()(),ph(17,xte,2,3,"div",15),xf()),2&e&&(Vd(11),dm(" ",null==t.unavailableItemsList?null:t.unavailableItemsList.length," ",1===(null==t.unavailableItemsList?null:t.unavailableItemsList.length)?"item is":"items were"," unavailable and will be removed at checkout. "),
1Vd(),zh("id",t.id+"mc-item-unavailability-accordion-container"),gh("data-target","#"+t.id+"mc-item-unavailability-accordion-body")("aria-expanded",t.showUnavailableProductsAccordion),Vd(4),zh("ngIf",t.showUnavailableProductsAccordion),Vd(),zh("ngIf",null==t.unavailableItemsList?null:t.unavailableItemsList.length))},dependencies:[sy,oy,cy,gy],styles:["#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-item-auto-width[_ngcontent-%COMP%]{flex-basis:auto}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable-header[_ngcontent-%COMP%]{color:#38332e;align-self:center}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-view-similar[_ngcontent-%COMP%]{min-width:104px}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-view-similar-btn[_ngcontent-%COMP%]{font-size:12px;font-weight:600;line-height:18px;display:block;text-align:center;padding:6px}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-oos-content[_ngcontent-%COMP%]{justify-content:space-between;width:100%!important;padding:0 8px}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable--remove-link[_ngcontent-%COMP%]{display:flex;font-size:14px;line-height:21px;margin-left:52px}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable-accordion[_ngcontent-%COMP%]{align-items:flex-start;padding-top:12px}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-pointer[_ngcontent-%COMP%]{cursor:pointer}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable-item-action[_ngcontent-%COMP%]{text-decoration:underline}#cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable-accordion-toggle[aria-expanded=true][_ngcontent-%COMP%] .svg-caret-expand[_ngcontent-%COMP%], #cart-dst-unavailable-items[_ngcontent-%COMP%] .cart-dst-unavailable-accordion-toggle[aria-expanded=false][_ngcontent-%COMP%] .svg-caret-collapse[_ngcontent-%COMP%]{display:none}.customizable-item[_ngcontent-%COMP%]{opacity:50%}.mto-color[_ngcontent-%COMP%]{color:#b00000}"]})}}return e})(),Pte=(e,t,i)=>({cart:e,bannerName:t,isSingleCart:i}),Ete=e=>({"pb-0 border-bottom-0":e}),Dte=e=>({"mt-3":e});function Ote(e,t){1&e&&Of(0)}function Bte(e,t){if(1&e&&(Ef(0),ph(1,Ote,1,0,"ng-container",13),Df()),2&e){let e=Yf(2),t=sm(2);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Mm(2,Pte,e.cart,e.bannerName,e.isSingleCart))}}function Mte(e,t){if(1&e&&(Ef(0),Tf(1,"app-mini-cart-express",14),Df(
1)),2&e){let e=Yf(2);Vd(),zh("expressCheckoutOrderInfo",e.expressCheckoutOrderInfo)("isExpressCheckoutEligible",e.isExpressCheckoutEligible)("cartData",e.cart)("storeId",null==e.cart?null:e.cart.storeId)("token",e.token)("bannerConfiguration",e.bannerConfiguration)("summary",e.cart.summary)("slotInfo",e.cart.slotInfo)("storeInfo",null==e.cart?null:e.cart.storeInfo)("payment",null==e.cart.customerPreferences?null:e.cart.customerPreferences.payments)("meta",e.metaInfo)}}function Rte(e,t){1&e&&(kf(0,"div",16)(1,"div",17),Tf(2,"img",18),kf(3,"span",19),am(4," Some customizations are unavailable. Please edit your item before placing your order. "),xf()()())}function Lte(e,t){if(1&e&&(Ef(0),ph(1,Rte,5,0,"div",15),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.hasMTOUnavailableItemOptions)}}function Fte(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23),am(3," Once your cake is ready, you'll be able to choose between picking it up at the bakery or curbside with DriveUp & Go. "),xf()()())}function Nte(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23),am(3," Once your order is ready, you'll be able to choose between picking it up at the deli and bakery counter or curbside with DriveUp & Go. "),xf()()())}function Ute(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23),am(3," Once your order is ready, you'll be able to choose between picking it up at the bakery counter or curbside with DriveUp & Go. "),xf()()())}function Vte(e,t){1&e&&(kf(0,"div",21)(1,"div",22)(2,"div",23),am(3," Once your order is ready, you'll be able to choose between picking it up at the deli counter or curbside with DriveUp & Go. "),xf()()())}function qte(e,t){if(1&e&&(Ef(0),ph(1,Fte,4,0,"div",20)(2,Nte,4,0,"div",20)(3,Ute,4,0,"div",20)(4,Vte,4,0,"div",20),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.checkIfOnlyCustomCakesInCart),Vd(),zh("ngIf",e.checkIfBakeryAndDeliInCart),Vd(),zh("ngIf",e.checkIfBakeryOnlyWithCatering),Vd(),zh("ngIf",e.checkIfDeliOnlyWithCatering)}}function $te(e,t){if(1&e&&Tf(0,"img",42),2&e){let e=Yf(3);
1Jf("id",e.banner+"-home-logo"),gh("src",e.bannerImageURL,id)}}function jte(e,t){if(1&e&&Tf(0,"img",43),2&e){let e=Yf(3);Jf("id",e.banner+"-logo-only"),zh("src",null==e.metaInfo?null:e.metaInfo.bannerImageURL,id)}}function zte(e,t){if(1&e&&Tf(0,"img",44),2&e){let e=Yf(3);Jf("id",e.banner+"-wine-logo"),Jf("src",e.vineLogoUrl,id)}}function Wte(e,t){if(1&e&&Tf(0,"img",45),2&e){let e=Yf(3);_h("src","https://images.albertsons-media.com/is/image/ABS/mkp-",null==e.cart||null==e.cart.seller?null:e.cart.seller.sellerId,"-logo",id),Jf("id",e.banner+"-mp-logo")}}function Hte(e,t){if(1&e&&(kf(0,"span",49),am(1),xf()),2&e){let e=Yf(5);Vd(),cm("Flash ","DUG"===e.cart.serviceType?"pickup":"delivery","")}}function Yte(e,t){if(1&e&&(Ef(0),ph(1,Hte,2,1,"span",48),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.reserved)}}function Gte(e,t){if(1&e&&(kf(0,"span",49),am(1),xf()),2&e){let e=Yf(4);Vd(),lm("DUG"===e.cart.serviceType?"Pickup":"Delivery")}}function Kte(e,t){if(1&e&&(kf(0,"span",46),ph(1,Yte,2,1,"ng-container",5)(2,Gte,2,1,"ng-template",null,3,Wm),kf(4,"span",47),am(5),xf()()),2&e){let e=sm(3),t=Yf(3);Vd(),zh("ngIf",(null==t.cart||null==t.cart.slotInfo?null:t.cart.slotInfo.reserved)&&"FLASH"===(null==t.cart||null==t.cart.slotInfo?null:t.cart.slotInfo.type))("ngIfElse",e),Vd(4),lm(("DUG"===t.cart.serviceType?" at ":" to ")+t.fulfillmentAddress)}}function Qte(e,t){if(1&e&&(kf(0,"span",47),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(("DUG"===e.cart.serviceType?" at ":" to ")+e.fulfillmentAddress)}}function Jte(e,t){if(1&e){let e=Mf();kf(0,"span")(1,"span",50),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(3).cartNavigation())}))("click",(function(){return Wa(e),Ha(Yf(3).cartNavigation())})),am(2),xf(),ph(3,Qte,2,1,"span",51),xf()}if(2&e){let e=Yf(3);Vd(),gh("aria-label",null==e.cart.seller?null:e.cart.seller.sellerName),Vd(),cm("",(null==e.cart.seller?null:e.cart.seller.sellerName)+((null==e.cart||null==e.cart.addresses?null:e.cart.addresses.length)>0?" · Ship ":"")," "),Vd(),zh("ngIf",(null==e.cart||null==e.cart.addresses?null:e.cart.addresses.length)>0)}}function Zte(e,t){if(1&e){let e=Mf();kf(0,"span",52),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(3).cartNavigation())}))("click",(function(){return Wa(e),Ha(Yf(3).cartNavigation())})),am(1,"Vine & Cellar"),xf()}}function Xte(e,t){if(1&e&&(Ef(0),kf(1,"span",55),am(2),xf(),kf(3,"span",56),am(4),xf(),Df()),2&e){let e=Yf(4);Vd(2),cm(" ",e.homeBannerCartDateInfo+(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.displayTimeTxt?" "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt):"")+("delivery"===(null==e.cart||null==e.cart.serviceType?null:e.cart.serviceType.toLowerCase())?" to "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayEndTimeTxt):"")," "),Vd(2),cm(" ",e.homeBannerCartDateInfo+(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.displayTimeTxt?" "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt):"")+(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.reserved&&"delivery"===(null==e.cart||null==e.cart.serviceType?null:e.cart.serviceType.toLowerCase())?" - "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayEndTimeTxt):"")," ")}}function eie(e,t){1&e&&Of(0)}function tie(e,t){if(1&e&&(kf(0,"div",59)(1,"span",59),am(2),qm(3,"formatSlotTime"),xf()()),2&e){let e=Yf(6);Vd(2),cm(" Check out by ",$m(3,1,null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayCheckoutByTimeTS),"")}}function iie(e,t){if(1&e&&(Ef(0),kf(1,"span",55),am(2),xf(),kf(3,"div",56),ph(4,eie,1,0,"ng-container",57),am(5),xf(),ph(6,tie,4,3,"div",58),Df()),2&e){let e=Yf(5),t=sm(4);Vd(2),dm(" Flash ","DUG"===e.cart.serviceType?"pickup ":"delivery "," at ",e.homeBannerCartDateInfo+(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.displayTimeTxt?" "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt):"")+("delivery"===(null==e.cart||null==e.cart.serviceType?null:e.cart.serviceType.toLowerCase())?" to "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayEndTimeTxt):"")," "),Vd(2),zh("ngTemplateOutlet",t),Vd(),cm(" ",e.homeBannerCartDateInfo+(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.displayTimeTxt?" "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt):"")+("delivery"===(null==e.cart||null==e.cart.serviceType?null:e.cart.serviceType.toLowerCase())?" - "+(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayEndTimeTxt):"")," "),Vd(),zh("ngIf","dug"===(null==e.cart?null:e.cart.serviceType.toLowerCase())||"delivery"===(null==e.cart?null:e.cart.serviceType.toLowerCase()))}}function nie(e,t){1&e&&Of(0)}function rie(e,t){if(1&e&&(Ef(0),kf(1,"span",55),am(2),xf(),kf(3,"div",56),ph(4,nie,1,0,"ng-container",57),am(5),xf(),Df()),2&e){let e=Yf(5),t=sm(4);Vd(2),dm("Flash ","DUG"===e.cart.serviceType?"pickup":"delivery"," in ",e.nextAvailableFlashSlotMins,""),Vd(2),zh("ngTemplateOutlet",t),Vd(),cm(" ",e.nextAvailableFlashSlotMins," ")}}function sie(e,t){if(1&e&&(kf(0,"div"),ph(1,iie,7,5,"ng-container",4)(2,rie,6,4,"ng-container",4),xf()),2&e){let e=Yf(4);Vd(),zh("ngIf",null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.reserved),Vd(),zh("ngIf",!(null!=e.cart&&null!=e.cart.slotInfo&&e.cart.slotInfo.reserved))}}function aie(e,t){if(1&e&&(kf(0,"p",53)(1,"span",54),ph(2,Xte,5,2,"ng-container",4)(3,sie,3,2,"div",4),xf()()),2&e){let e=Yf(3);Vd(2),zh("ngIf","FLASH"!==(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.type)),Vd(),zh("ngIf","FLASH"===(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.type))}}function oie(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf(4);Vd(),cm(", ",null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt,"")}}function lie(e,t){if(1&e&&(kf(0,"p",53)(1,"span",55),am(2),xf(),kf(3,"span",60),am(4),xf(),ph(5,oie,2,1,"span",4),xf()),2&e){let e=Yf(3);Vd(2),lm(e.getDateTxt),Vd(2),lm(null==e.cart.slotInfo?null:e.cart.slotInfo.displayDateTxt),Vd(),zh("ngIf",null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayTimeTxt)}}function cie(e,t){if(1&e&&(kf(0,"p",53)(1,"span",55),am(2),xf(),kf(3,"span",60),am(4),qm(5,"date"),xf()()),2&e){let e=Yf(3);Vd(2),lm(e.deliveryDateMessage),Vd(2),cm("Get by ",jm(5,2,null==e.cart.slotInfo?null:e.cart.slotInfo.displayMinArriveByTS,"EEE, MMM d"),"")}}function die(e,t){if(1&e&&(kf(0,"span",61),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(3);Vd(),lm(jm(2,1,null==e.cart||null==e.cart.summary?null:e.cart.summary.transactionTotal,"USD"))}}function uie(e,t){1&e&&(Ef(0),kf(1,"div",62)(2,"div",22)(3,"div",63),am(4," You have limited-time items in your cart. "),xf(),kf(5,"div",64),am(6," Available times depend on your preorder items. Also, pick up is free with no minimum order fees. "),xf()()(),Df())}function pie(e,t){if(1&e&&(kf(0,"div")(1,"div",65),am(2),xf()()),2&e){let e=Yf(3);Vd(),zh("ngClass",Om(2,Dte,!e.hasPreOrderItem)),Vd(),cm(" ",e.promoBannerMsg,"")}}function hie(e,t){1&e&&(kf(0,"div",66)(1,"p",67),Tf(2,"span",68),am(3," This store is not available in your current ZIP code. "),xf()())}function fie(e,t){if(1&e&&(kf(0,"div",69)(1,"p",70),Tf(2,"span",71),am(3),xf()()),2&e){let e=Yf(3);Vd(3),cm(" ",e.dugAlcDiscMsg," ")}}function mie(e,t){if(1&e){let e=Mf();kf(0,"div",66)(1,"p",72),Tf(2,"span",73),am(3),qm(4,"number"),kf(5,"a",74),jf("click",(function(){return Wa(e),Ha(Yf(4).cartNavigation())})),am(6,"Add items"),xf()()()}if(2&e){let e=Yf(4);Vd(3),cm(" Add $",jm(4,1,e.cart.summary.qualifyingDollarValue,".2-2")," to reach order minimum. ")}}function gie(e,t){if(1&e){let e=Mf();kf(0,"div",66)(1,"p",72),Tf(2,"span",73),am(3),qm(4,"number"),kf(5,"a",74),jf("click",(function(){return Wa(e),Ha(Yf(4).cartNavigation())})),am(6,"Add items"),xf()()()}if(2&e){let e=Yf(4);Vd(3),cm(" Add $",jm(4,1,e.cart.summary.qualifyingDollarValueWYSIWYG,".2-2")," to reach order minimum. ")}}function bie(e,t){if(1&e&&(Ef(0),ph(1,mie,7,4,"div",40)(2,gie,7,4,"div",40),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.cart&&!(null!=e.cart&&e.cart.isWYSIWYGEnabled)&&(null==e.cart.summary?null:e.cart.summary.qualifyingDollarValue)>0),Vd(),zh("ngIf",(null==e.cart?null:e.cart.isWYSIWYGEnabled)&&(null==e.cart||null==e.cart.summary?null:e.cart.summary.qualifyingDollarValueWYSIWYG)>0)}}function yie(e,t){if(1&e&&(Ef(0),Tf(1,"app-mini-cart-express",75),Df()),2&e){let e=Yf(3);Vd(),zh("expressCheckoutOrderInfo",e.expressCheckoutOrderInfo)("isExpressCheckoutEligible",e.isExpressCheckoutEligible)("cartData",e.cart)("storeId",null==e.cart?null:e.cart.storeId)("token",e.token)("bannerConfiguration",e.bannerConfiguration)("summary",e.cart.summary)("meta",e.metaInfo)("isBetterTaxes",!0)}}function vie(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"div",25)(2,"div",26)(3,"a",27),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).cartNavigation())}))("click",(function(){return Wa(e),Ha(Yf(2).cartNavigation())}
1)),ph(4,$te,1,2,"img",28)(5,jte,1,2,"img",29)(6,zte,1,2,"img",30)(7,Wte,1,3,"img",31),xf()(),kf(8,"div",32)(9,"div",33),ph(10,Kte,6,3,"span",34)(11,Jte,4,3,"span",4)(12,Zte,2,0,"span",35),xf(),ph(13,aie,4,2,"p",36)(14,lie,6,3,"p",36)(15,cie,6,5,"p",36),xf(),kf(16,"div",37)(17,"span",38),am(18),qm(19,"currency"),xf(),ph(20,die,3,4,"span",39),xf()(),ph(21,uie,7,0,"ng-container",4)(22,pie,3,4,"div",4)(23,hie,4,0,"div",40)(24,fie,4,1,"div",41)(25,bie,3,2,"ng-container",4)(26,yie,2,9,"ng-container",4),xf()}if(2&e){let e=Yf(2);zh("ngClass",Om(26,Ete,(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isMiniCart)&&(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isBetterTaxEnabled)&&(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isBetterTaxEligible))),Vd(3),gh("aria-label",e.bannerName+" graphic logo"),Vd(),zh("ngIf",!e.shouldDisplayFulfillmentInfo&&e.bannerImageURL&&!(null!=e.cart&&e.cart.seller||"1P_WINE"===e.cart.cartCategory)),Vd(),zh("ngIf",e.shouldDisplayFulfillmentInfo&&!(null!=e.cart&&e.cart.seller||"1P_WINE"===e.cart.cartCategory)),Vd(),zh("ngIf",!(null!=e.cart&&e.cart.seller)&&"1P_WINE"===e.cart.cartCategory),Vd(),zh("ngIf",e.cart.seller),Vd(2),Yh("justify-content-end",!e.shouldDisplayFulfillmentInfo&&!e.cart.seller&&"1P_WINE"!==e.cart.cartCategory),Vd(),zh("ngIf",e.shouldDisplayFulfillmentInfo&&"1P_WINE"!==e.cart.cartCategory&&!e.cart.seller),Vd(),zh("ngIf",e.cart.seller),Vd(),zh("ngIf",!(null!=e.cart&&e.cart.seller)&&"1P_WINE"===e.cart.cartCategory),Vd(),zh("ngIf",e.shouldDisplayFulfillmentInfo),Vd(),zh("ngIf",(null==e.cart?null:e.cart.seller)&&(null==e.cart?null:e.cart.isAvailable)&&(null==e.cart||null==e.cart.slotInfo?null:e.cart.slotInfo.displayDateTxt)),Vd(),zh("ngIf","1P_WINE"===e.cart.cartCategory&&e.cart.slotInfo),Vd(3),dm("",e.bannerName," total cart value is ",jm(19,23,null==e.cart||null==e.cart.summary?null:e.cart.summary.transactionTotal,"USD"),""),Vd(2),zh("ngIf",null==e.cart?null:e.cart.isAvailable),Vd(),zh("ngIf",e.hasPreOrderItem),Vd(),zh("ngIf",e.promoBannerMsg&&e.isNewUser&&"1P"===e.cart.cartCategory),Vd(),zh("ngIf",!e.cart||!e.cart.isAvailable),Vd(),zh("ngIf","1P"===(null==e.cart?null:e.cart.cartCategory)&&"DUG"===(null==e.cart?null:e.cart.serviceType)&&(null==e.cart?null:e.cart.alcDisclamer)),Vd(),zh("ngIf",(null==e.cart?null:e.cart.isAvailable)&&(null==e.cart||null==e.cart.seller?null:e.cart.seller.sellerId)),Vd(),zh("ngIf",(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isMiniCart)&&(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isBetterTaxEnabled)&&(null==e.expressCheckoutOrderInfo?null:e.expressCheckoutOrderInfo.isBetterTaxEligible))}}function wie(e,t){if(1&e){let e=Mf();kf(0,"div",76)(1,"div",77),jf("click",(function(t){return Wa(e),Ha(Yf(2).updateMultipleSubstitution(t))})),Tf(2,"img",78),kf(3,"span",79),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf(2).updateMultipleSubstitution(t))})),am(4," Set substitutions for all items "),xf()()()}if(2&e){let e=Yf(2);Vd(3),Zf("id","",null==e.cart?null:e.cart.cartId,"-sub-all-item")}}function _ie(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"mini-cart-item-unavailability",80),jf("removeItem",(function(t){return Wa(e),Ha(Yf(2).removeUnDeliverablesFromCart(t))}))("removeAllItems",(function(t){return Wa(e),Ha(Yf(2).removeAllItems(t))})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("banner",e.banner)("outOfStockItemsList",e.outOfStockItemsList)("unavailableItemsList",e.unavailableItemsList)("fulfillmentType",e.fulfillmentType)("isSellerCart",null==e.cart?null:e.cart.seller)("id","mc-"+(null==e.cart?null:e.cart.cartId)+"-")}}function Sie(e,t){if(1&e&&(kf(0,"picture"),Tf(1,"img",92),xf()),2&e){let e=Yf().$implicit;Vd(),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.id,"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available",id),Zf("alt","",e.name," graphic")}}function Cie(e,t){if(1&e&&(Ef(0),ph(1,Sie,2,4,"picture",4),Df()),2&e){let e=t.index;Vd(),zh("ngIf",e<4)}}function Iie(e,t){if(1&e&&(kf(0,"span",93),am(1),xf()),2&e){let e=Yf(5);Vd(),cm("+",(null==e.availableItemsId?null:e.availableItemsId.length)-4,"")}}function Aie(e,t){if(1&e&&(kf(0,"div",90),ph(1,Cie,2,1,"ng-container",85)(2,Iie,2,1,"span",91),xf()),2&e){let e=Yf(4);Vd(),zh("ngForOf",e.availableItemsId),Vd(),zh("ngIf",(null==e.availableItemsId?null:e.availableItemsId.length)>4)}}function kie(e,t){if(1&e&&(kf(0,"div",94),am(1),kf(2,"button",95),Tf(3,"span",96
1)(4,"span",97),xf()()),2&e){let e=Yf(4);zh("ngStyle",e.primaryColor),Vd(),cm(" ",(e.isViewToggleExpanded?"Hide ":"View ")+(null==e.availableItemsId?null:e.availableItemsId.length)+" "+((null==e.availableItemsId?null:e.availableItemsId.length)>1?"items":"item")," ")}}function xie(e,t){if(1&e){let e=Mf();kf(0,"a",86),jf("click",(function(){return Wa(e),Ha(Yf(3).toggleProducts())})),kf(1,"div",87),ph(2,Aie,3,2,"div",88)(3,kie,5,2,"div",89),xf()()}if(2&e){let e=Yf(3);Zf("id","cart-accordion-",e.cart.cartId,""),zh("href","#accordion-products-"+e.cart.cartId,id),gh("data-target","#accordion-products-"+e.cart.cartId)("aria-label",(e.isViewToggleExpanded?"Hide ":"View ")+(null==e.availableItemsId?null:e.availableItemsId.length)+" "+((null==e.availableItemsId?null:e.availableItemsId.length)>1?"items":"item"))("aria-expanded",e.isViewToggleExpanded)("aria-controls","#accordion-products-"+e.cart.cartId),Vd(2),zh("ngIf",e.cart),Vd(),zh("ngIf",e.cart.isAvailable)}}function Tie(e,t){1&e&&(kf(0,"div",98)(1,"div",99)(2,"div",100),Tf(3,"img",101),xf(),kf(4,"div",102)(5,"p",103),am(6,"Time slots are limited for orders that include age-restricted items. Someone aged 21 or over must present a valid ID to accept this order."),xf()()()())}function Pie(e,t){if(1&e){let e=Mf();kf(0,"section",107)(1,"mini-cart-item",108),jf("updateSubstitution",(function(t){return Wa(e),Ha(Yf(4).substitutionUpdate(t))})),mm("isUpdatingChange",(function(t){Wa(e);let i=Yf(4);return fm(i.isUpdating,t)||(i.isUpdating=t),Ha(t)}))("backendStatusChange",(function(t){Wa(e);let i=Yf(4);return fm(i.backendStatus,t)||(i.backendStatus=t),Ha(t)})),jf("updateItem",(function(t){return Wa(e),Ha(Yf(4).updateItem(t))}))("increaseQty",(function(t){return Wa(e),Ha(Yf(4).increaseItemQty(t))}))("decreaseQty",(function(t){return Wa(e),Ha(Yf(4).decreaseItemQty(t))}))("removeItem",(function(t){return Wa(e),Ha(Yf(4).removeItem(t))}))("setFocusElement",(function(t){return Wa(e),Ha(Yf(4).setFocusElement(t))})),xf()()}if(2&e){let e=t.$implicit,i=Yf(4);Vd(),zh("isSubstitutions2Enabled",null==i.cart?null:i.cart.isSubstitutions2Enabled)("banner",i.banner)("cartId",null==i.cart?null:i.cart.cartId)("item",e)("index",e.entryId?e.itemId+"-"+e.entryId:""+e.itemId),hm("isUpdating",i.isUpdating),zh("isLbVsEachEnabled",null==i.cart?null:i.cart.isLbVsEachEnabled)("bannerConfiguration",i.bannerConfiguration),hm("backendStatus",i.backendStatus),zh("individualCart",i.cart)("isMFC",null==i.cart?null:i.cart.isMFC)("isSCPEnabled",null==i.cart?null:i.cart.isSCPEnabled)("isWYSIWYGEnabled",null==i.cart?null:i.cart.isWYSIWYGEnabled)("cartCategory",null==i.cart?null:i.cart.cartCategory)}}function Eie(e,t){if(1&e&&(kf(0,"article")(1,"div",104)(2,"p",105),am(3),xf()(),ph(4,Pie,2,14,"section",106),xf()),2&e){let e=t.$implicit,i=Yf(3);Vd(3),lm(e.department),Vd(),zh("ngForOf",e.items)("ngForTrackBy",i.trackItems)}}function Die(e,t){if(1&e&&(kf(0,"div",81),ph(1,xie,4,9,"a",82),kf(2,"div",83),ph(3,Tie,7,0,"div",84)(4,Eie,5,3,"article",85),xf()()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isSingleCart&&(null==e.availableItemsId?null:e.availableItemsId.length)),Vd(),Yh("show",e.isSingleCart),Zf("id","accordion-products-",e.cart.cartId,""),gh("data-parent","#cart-accordion-"+e.cart.cartId),Vd(),zh("ngIf","1P"===e.cart.cartCategory&&e.cart.hasAlcohol&&e.cart.itemRetailSect.length>0&&e.showAlcoholRestriction),Vd(),zh("ngForOf",e.itemsByDepartment)}}function Oie(e,t){if(1&e&&(kf(0,"picture"),Tf(1,"img",92),xf()),2&e){let e=Yf().$implicit;Vd(),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.id,"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available",id),Zf("alt","",e.name," graphic")}}function Bie(e,t){if(1&e&&(Ef(0),ph(1,Oie,2,4,"picture",4),Df()),2&e){let e=t.index;Vd(),zh("ngIf",e<4)}}function Mie(e,t){if(1&e&&(kf(0,"span",93),am(1),xf()),2&e){let e=Yf(4);Vd(),cm("+",(null==e.unavailableItemsId?null:e.unavailableItemsId.length)-4,"")}}function Rie(e,t){if(1&e&&(kf(0,"div",90),ph(1,Bie,2,1,"ng-container",85)(2,Mie,2,1,"span",91),xf()),2&e){let e=Yf(3);Vd(),zh("ngForOf",e.unavailableItemsId),Vd(),zh("ngIf",(null==e.unavailableItemsId?null:e.unavailableItemsId.length)>4)}}function Lie(e,t){if(1&e&&(kf(0,"div",81)(1,"a",109)(2,"div",87),ph(3,Rie,3,2,"div",88),xf()()()),2&e){let e=Yf(2);Vd(),_h("aria-label","",null==e.unavailableItemsId?null:e.unavailableItemsId.length," unavailable graphics"),Zf("id","cart-accordion-",e.cart.cartId,""),Vd(2),zh("ngIf",e.cart)}}function Fie(e,t){if(1&e){let e=Mf();kf(0,"div",110)(1,"a",111),jf("click",(function(){return Wa(e),Ha(Yf(2).removeOrder())})),am(2,"Remove order"),xf()()}if(2&e){let e=Yf(2);Vd(),_h("aria-label","",e.bannerName," Remove order"),zh("ngStyle",e.primaryColor)}}function Nie(e,t){if(1&e){let e=Mf();kf(0,"div",118)(1,"a",119),jf("click",(function(){return Wa(e),Ha(Yf(3).removeOrder())})),am(2,"Remove order"),xf()()}if(2&e){let e=Yf(3);Vd(),_h("aria-label","",e.bannerName," Remove order"),zh("ngStyle",e.primaryColor)}}function Uie(e,t){if(1&e){let e=Mf();kf(0,"div")(1,"a",119),jf("click",(function(){return Wa(e),Ha(Yf(3).routeToCart())})),am(2,"View order"),xf()()}if(2&e){let e=Yf(3);Vd(),_h("aria-label","",e.bannerName," View order"),zh("ngStyle",e.primaryColor)}}function Vie(e,t){if(1&e&&(kf(0,"p",120),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(3);Vd(),cm("",jm(2,1,e.cart.summary.minCartThresholdValue,"USD")," minimum")}}function qie(e,t){1&e&&(kf(0,"p",121),am(1,"Not available in your ZIP"),xf())}function $ie(e,t){if(1&e){let e=Mf();kf(0,"div",112)(1,"div",113),ph(2,Nie,3,3,"div",114)(3,Uie,3,3,"div",4),kf(4,"div")(5,"button",115),jf("click",(function(){return Wa(e),Ha(Yf(2).routeToCheckout())}
1)),am(6,"Checkout "),xf(),ph(7,Vie,3,4,"p",116)(8,qie,2,0,"p",117),xf()()()}if(2&e){let e=Yf(2);Vd(2),zh("ngIf",(e.cart.seller||"1P_WINE"===e.cart.cartCategory)&&!e.cart.isAvailable),Vd(),zh("ngIf",e.cart.isAvailable),Vd(2),_h("aria-label","",e.bannerName," Checkout"),_h("aria-describedby","",e.bannerName,"-store-footer"),zh("disabled",e.disableCheckoutButton)("ngStyle",e.disableCheckoutButton?null:e.getConfirmButtonStyle),gh("aria-disabled",e.disableCheckoutButton),Vd(2),zh("ngIf",!e.checkoutEnabled&&(null==e.cart?null:e.cart.isAvailable)),Vd(),zh("ngIf",!e.cart.isAvailable)}}function jie(e,t){1&e&&(Ef(0),kf(1,"div",123)(2,"div",124),Tf(3,"img",125),xf(),kf(4,"p",126),am(5,"Make this order a gift"),xf()(),kf(6,"div",127)(7,"div",128),am(8,"NEW"),xf(),Tf(9,"img",129),xf(),Df())}function zie(e,t){if(1&e&&(Ef(0),kf(1,"div",130),Tf(2,"img",131),kf(3,"p",132),am(4,"This order is a gift for "),Tf(5,"br"),kf(6,"span",133),am(7),xf()()(),kf(8,"div",127)(9,"div",128),am(10,"NEW"),xf(),Tf(11,"img",134),xf(),Df()),2&e){let e=Yf(3);Vd(7),lm(null==e.cart||null==e.cart.gift||null==e.cart.gift.giftDetails?null:e.cart.gift.giftDetails.to)}}function Wie(e,t){if(1&e){let e=Mf();kf(0,"div",122),jf("click",(function(){return Wa(e),Ha(Yf(2).openGiftDrawer())}))("keyup.enter",(function(){return Wa(e),Ha(Yf(2).openGiftDrawer())}))("keydown.space",(function(){return Wa(e),Ha(Yf(2).openGiftDrawer())})),ph(1,jie,10,0,"ng-container",4)(2,zie,12,1,"ng-container",4),xf()}if(2&e){let e=Yf(2);gh("aria-label",null!=e.cart&&null!=e.cart.gift&&e.cart.gift.isGift?"This order is a gift for "+(null==e.cart||null==e.cart.gift||null==e.cart.gift.giftDetails?null:e.cart.gift.giftDetails.to)+", New feature, update gift details":"Make this order a gift, New feature, add gift details"),Vd(),zh("ngIf",!(null!=e.cart&&null!=e.cart.gift&&e.cart.gift.isGift)),Vd(),zh("ngIf",null==e.cart||null==e.cart.gift?null:e.cart.gift.isGift)}}function Hie(e,t){if(1&e&&(kf(0,"div",137),am(1),qm(2,"number"),xf()),2&e){let e=Yf(3);Zf("id","",e.bannerName,"-store-footer"),Vd(),um(" Add $",jm(2,5,e.cart.summary.qualifyingDollarValue,".2-2")," to avoid $",e.cart.summary.serviceFee," fee on orders under $",e.cart.summary.minCartThresholdValue," ")}}function Yie(e,t){if(1&e&&(kf(0,"div",137),am(1),qm(2,"number"),xf()),2&e){let e=Yf(3);Zf("id","",e.bannerName,"-store-footer"),Vd(),um(" Add $",jm(2,5,e.cart.summary.qualifyingDollarValueWYSIWYG,".2-2")," to avoid $",e.cart.summary.serviceFee," fee on orders under $",e.cart.summary.minCartThresholdValue," ")}}function Gie(e,t){if(1&e&&(kf(0,"div",138),am(1),qm(2,"currency"),xf()),2&e){let e=Yf(3);Zf("id","",e.bannerName,"-store-footer"),Vd(),cm(" Youâre saving ",jm(2,3,e.cart.summary.savingsOnServiceFee,"USD")," off the minimum order fee! ")}}function Kie(e,t){if(1&e&&(Ef(0),ph(1,Hie,3,8,"div",135)(2,Yie,3,8,"div",135)(3,Gie,3,6,"div",136),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.cart&&!(null!=e.cart&&e.cart.isWYSIWYGEnabled)&&(null==e.cart.summary?null:e.cart.summary.qualifyingDollarValue)>0&&!(null!=e.cart&&null!=e.cart.summary&&e.cart.summary.savingsOnServiceFee)),Vd(),zh("ngIf",(null==e.cart?null:e.cart.isWYSIWYGEnabled)&&(null==e.cart||null==e.cart.summary?null:e.cart.summary.qualifyingDollarValueWYSIWYG)>0&&!(null!=e.cart&&null!=e.cart.summary&&e.cart.summary.savingsOnServiceFee)),Vd(),zh("ngIf",(null!=e.cart&&e.cart.isWYSIWYGEnabled?null==e.cart||null==e.cart.summary?null:e.cart.summary.qualifyingDollarValueWYSIWYG:null==e.cart.summary?null:e.cart.summary.qualifyingDollarValue)>0&&(null==e.cart||null==e.cart.summary?null:e.cart.summary.savingsOnServiceFee)>0)}}function Qie(e,t){if(1&e&&(Ef(0),kf(1,"div",139),Tf(2,"img",140),kf(3,"span"),am(4,"No shipping fees on orders over $149. "),kf(5,"a",141),am(6,"Shop Vine & Cellar"),xf()()(),Df()),2&e){let e=Yf(2);Vd(5),zh("ngStyle",e.primaryColor)}}function Jie(e,t){1&e&&Of(0)}function Zie(e,t){if(1&e&&(Ef(0),ph(1,Jie,1,0,"ng-container",13),Df()),2&e){let e=Yf(2),t=sm(2);Vd(),zh("ngTemplateOutlet",t)("ngTemplateOutletContext",Mm(2,Pte,e.cart,e.bannerName,e.isSingleCart))}}function Xie(e,t){1&e&&Tf(0,"div",142)}function ene(e,t){if(1&e&&(Ef(0),ph(1,Bte,2,6,"ng-container",4)(2,Mte,2,11,"ng-container",5)(3,Lte,2,1,"ng-container",4)(4,qte,5,4,"ng-container",4)(5,vie,27,28,"ng-template",null,2,Wm)(7,wie,5,2,"div",6)(8,_ie,2,6,"ng-container",4),kf(9,"div",7),ph(10,Die,5,8,"div",8)(11,Lie,4,5,"div",8)(12,Fie,3,3,"div",9)(13,$ie,9,11,"div",10),xf(),ph(14,Wie,3,3,"div",11)(15,Kie,4,3,"ng-container",4)(16,Qie,7,1,"ng-container",4)(17,Zie,2,6,"ng-container",4)(18,Xie,1,0,"div",12),Df()),2&e){let e=sm(6),t=Yf();Vd(),zh("ngIf",t.isSingleCart&&t.isFreeShippingEligible),Vd(),zh("ngIf",t.isExpressCheckoutEligible)("ngIfElse",e),Vd(),zh("ngIf",(null==t.cart?null:t.cart.hasMTOCustomBakery)||(null==t.cart?null:t.cart.hasCateringProduct)),Vd(),zh("ngIf","DUG"===(null==t.cart?null:t.cart.serviceType)),Vd(3),zh("ngIf",t.isSubstitutions2Enabled&&t.isEnableMultiSub&&(null==t.cart?null:t.cart.isAvailable)&&(null==t.availableItemsId?null:t.availableItemsId.length)&&!(t.cart.seller||"1P_WINE"===t.cart.cartCategory)),Vd(),zh("ngIf",t.showItemUnavailability&&((null==t.outOfStockItemsList?null:t.outOfStockItemsList.length)||(null==t.unavailableItemsList?null:t.unavailableItemsList.length))),Vd(2),zh("ngIf",null==t.availableItemsId?null:t.availableItemsId.length),Vd(),zh("ngIf",(null==t.unavailableItemsId?null:t.unavailableItemsId.length)>0),Vd(),zh("ngIf",(t.cart.seller||"1P_WINE"===t.cart.cartCategory)&&!t.cart.isAvailable&&t.isSingleCart),
1Vd(),zh("ngIf",!t.isSingleCart),Vd(),zh("ngIf",null==t.cart?null:t.cart.isGiftEnabled),Vd(),zh("ngIf",!t.isExpressCheckoutEligible&&"3P_MARKETPLACE"!==(null==t.cart?null:t.cart.cartCategory)&&"1P_WINE"!==(null==t.cart?null:t.cart.cartCategory)),Vd(),zh("ngIf","1P_WINE"===(null==t.cart?null:t.cart.cartCategory)),Vd(),zh("ngIf",!t.isSingleCart&&t.isFreeShippingEligible),Vd(),zh("ngIf",t.loaderFlag)}}function tne(e,t){if(1&e){let e=Mf();kf(0,"div",144),am(1),qm(2,"number"),kf(3,"a",145),jf("click",(function(){return Wa(e),Ha(Yf(2).cartNavigation())}))("keyup.enter",(function(){return Wa(e),Ha(Yf(2).cartNavigation())})),am(4," Add items "),xf()()}if(2&e){let e=Yf(),t=e.cart,i=e.bannerName,n=e.isSingleCart;Zf("id","",i,"-store-footer"),zh("ngClass",n?"free-shipping-msg-header":"store-footer"),Vd(),cm(" Add $",jm(2,4,t.summary.qualifyingShippingDollarValue,".2-2")," to get FREE shipping! ")}}function ine(e,t){if(1&e&&(kf(0,"div",144),am(1," You qualify for FREE shipping! "),xf()),2&e){let e=Yf(),t=e.bannerName,i=e.isSingleCart;Zf("id","",t,"-store-footer"),zh("ngClass",i?"free-shipping-msg-header":"store-footer")}}function nne(e,t){if(1&e&&ph(0,tne,5,7,"div",143)(1,ine,2,3,"div",143),2&e){let e=t.cart;zh("ngIf",(null==e.summary?null:e.summary.qualifyingShippingDollarValue)>0),Vd(),zh("ngIf",0===(null==e.summary?null:e.summary.qualifyingShippingDollarValue))}}function rne(e,t){1&e&&Tf(0,"img",146)}var sne=(()=>{class e{constructor(e,t,i,n,r,s,a){this.miniCartService=e,this.dnfService=t,this.authService=i,this.datePipe=n,this.snackBarService=r,this.userInfoService=s,this.aemService=a,this.cartConfigEmitter=new _l,this.$destroyed=new kt,this.userCoupons={},this.updatePayload={},this.snsData={},this.dnfTargetFlag=!1,this.dnfProductInfoFlag=!1,this.dnfFlag=!1,this.availableItemsId=[],this.unavailableItemsId=[],this.isViewToggleExpanded=!1,this.enableUndoRemoveItem=!1,this.isNewUser=!1,this.expressCheckoutOrderInfo={isMiniCart:!0,isBetterTaxEligible:!1},this.cartSuccessCallback=e=>{switch(this.isUpdating=!1,this.cart=e,this.showAlcoholRestriction=this.isAlcholRestricted(e),this.cart.summary=e.summary,this.updateFlags(e),this.emitCartConfig(),this.updateMTOUnavailableItemOptionsFlag(),this.showItemUnavailability=!!e.isItemAvailablityEnabled&&e.isItemAvailablityEnabled,e.serviceType.toLowerCase()){case"dug":this.fulfillmentType="Pickup";break;case"delivery":this.fulfillmentType="Delivery"}return this.showItemUnavailability&&(this.outOfStockItemsList=this.unavailableItemsList=[]),this.availableItemsId=[],this.unavailableItemsId=[],this.mapItemsByDepartment(),this.validateFulfillmentInfo(),this.isCartLoaded=!0,this.filterSnsProducts(),this.backendStatus=!0,!this.cart?.slotInfo?.reserved&&"FLASH"===this.cart?.slotInfo?.type&&this.timeLeftForNextAvailableFlashSlot(this.cart?.slotInfo?.displayTimeTxt,this.cart?.slotInfo?.displayDateTxt),Promise.resolve(!0)};let o=this.miniCartService.getCurrentEnvironment();this.dnfFlag=q7[o].dnfFlag,this.isEnableMultiSub=q7[o].enableMultiSub,this.enableUndoRemoveItem=q7[o].enableUndoRemoveItem,this.vineLogoUrl=q7[o].vineLogoUrl,this.isBetterTaxEnabled=Y7(o),this.expressCheckoutOrderInfo=f(h({},this.expressCheckoutOrderInfo),{isBetterTaxEnabled:this.isBetterTaxEnabled}),window.addEventListener("smartSubstitutionTriggered",(()=>{this.updateMultipleSubstitution("")})),this.subscribeToGenericEvents()}get fulfillmentAddress(){let e=this.cart?.addresses?.[0],t=e?.address1+(e?.address2?", "+e?.address2:"");return e?"delivery"===this.cart?.serviceType?.toLowerCase()?`${t}`:`${e.streetAddress1}`:this.cart?.zipCode}getPromoBannerMsg(){return"Delivery"===this.cart?.serviceType?this.webMessages?.messages?.["FirstTimeCustomerPromoMessage-Delivery"]?.[this.banner]?.message:"DUG"===this.cart?.serviceType?this.webMessages?.messages?.["FirstTimeCustomerPromoMessage-Dug"]?.[this.banner]?.message:void 0}get isFreeShippingEligible(){return"3P_MARKETPLACE"===this.cart?.cartCategory&&this.cart?.summary?.qualifiedFreeShippingMsg}ngOnInit(){let e=this.miniCartService.getCurrentEnvironment();
1this.newSubsViewFlag=q7[e]?.substitutionApiConfig?.paritySubsBanners?.includes(this.banner?.toLowerCase()),this.dnfFlag&&this.cart&&!this.cart?.seller&&"1P_WINE"!==this.cart?.cartCategory&&"B"!==this.userInfoService?.getSiteType()?.toUpperCase()?this.validateNavigateToDnf():this.dnfTargetFlag=!1,this.subscribeToFocusInfo(),0==Number(localStorage.getItem("abOrderCount"))&&(this.isNewUser=!0),this._updateAnalyticsCart(this.cart||{},null,this.cart&&this.cart.isWYSIWYGEnabled),this._updateAnalyticsCartMFC(this.cart),this._updateAnalyticsCartSavings(this.cart),this._updateAnalyticsPromoBannerImpressions(),"responseReady"===window.analyticsCartInfoLoaded?this._updateAnalyticsCartLoadEvent():"listenerSet"!==window.analyticsCartInfoLoaded&&(window.addEventListener("analyticsCartRespReady",this._updateAnalyticsCartLoadEvent),window.analyticsCartInfoLoaded="listenerSet"),!this.cart?.slotInfo?.reserved&&"FLASH"===this.cart?.slotInfo?.type&&this.timeLeftForNextAvailableFlashSlot(this.cart?.slotInfo?.displayTimeTxt,this.cart?.slotInfo?.displayDateTxt)}get deliveryDateMessage(){return"1P_WINE"===this.cart.cartCategory?W7("Get by "+this.datePipe.transform(this.cart?.slotInfo?.displayMinArriveByTS,"EEEE, MMM d")):""}updateMTOUnavailableItemOptionsFlag(){this.hasMTOUnavailableItemOptions=!(!this.cart?.hasMTOCustomBakery||!this.cart?.cartItemsList?.some((e=>e?.isCustomCake&&e?.options?.some((e=>!e.isAvailable)))))}isAlcholRestricted(e){return e?.slotInfo?.isAlcoholRestriction}ngOnChanges(e){if(!this.cart)return;this.showAlcoholRestriction=this.isAlcholRestricted(this.cart),this.bannerConfiguration=G7[this.banner],this.bannerImageURL="https://images.albertsons-media.com/is/image/ABS/"+((e,t)=>{let i=`${e?.toLowerCase()}`+("B"===t?"_b2b":"");return $7[i]||$7.safeway})(this.cart.banner,window.AB.userInfo.siteType);let t="https://images.albertsons-media.com/is/image/ABS/"+(e=>j7[e?.toLowerCase()]||j7.safeway)(this.cart.banner);this.metaInfo=f(h({},this.metaInfo),{bannerImageURL:t,banner:this.banner,id:this.cart?.cartId}),this.showItemUnavailability=!!this.cart.isItemAvailablityEnabled&&this.cart.isItemAvailablityEnabled,this.showItemUnavailability&&(this.outOfStockItemsList=this.unavailableItemsList=[]),this.updateFlags(this.cart),this.emitCartConfig(),this.validateFulfillmentInfo(),this.availableItemsId=[],this.unavailableItemsId=[],this.mapItemsByDepartment(),this.isSNSEligible&&this.getAllSnsSubscriptions(),this.isCartLoaded=!0,this.cart?.alcDisclamer&&"dug"===this.cart?.serviceType?.toLowerCase()&&this.getDugAlcMessage(this.cart),this.promoBannerMsg=this.getPromoBannerMsg()}get isSNSEligible(){return this.cart.isSNSCNCEnabled&&"1P"===this.cart.cartCategory||this.cart.isSNSB2BEnabled&&"1P_B2B"===this.cart.cartCategory}getAllSnsSubscriptions(){let e=JSON.parse(localStorage.getItem("abNgSubscriptions"));e?(this.snsData=e,this.snsData.itemsSubscribed=this.snsData?.itemsSubscribed?this.snsData?.itemsSubscribed:this.snsData?.subscribedItems,this.filterSnsProducts()):this.miniCartService.getSnsFrequency(window.AB.userInfo.UUID?window.AB.userInfo.UUID:"5fe1f9d0-e378-4494-8134-17f86d1a8c16",this.token,this.banner).subscribe({next:e=>{this.snsData=e,this.filterSnsProducts()},error:e=>{}})}filterSnsProducts(){let e={},t=0;Array.isArray(this.snsData?.itemsSubscribed)?this.snsData.itemsSubscribed.forEach((t=>{e[t.productBpn]=t})):this.snsData?.subscribedItems&&(e=h({},this.snsData?.subscribedItems)),t=Object.keys(e).length,this.cart?.cartItemsList?.forEach((i=>{t&&e.hasOwnProperty(i.itemId.toString())&&(i.isActiveSubscription=e[i.itemId].isActiveSubscription,i.nextFulfillmentDate=e[i.itemId].isActiveSubscription?e[i.itemId].nextFulfillmentDate:"",i.isFirstTimeSnsSub=!1,i.snsData=this.snsData)}))}get hasPreOrderItem(){return this.cart?.cartItemsList?.some((e=>e?.isPreOrderItem))}mapItemsByDepartment(){this.itemsByDepartment=Object.entries(this.cart.cartItemsList.reduce(((e,t)=>{if(this.cart.isAvailable&&t.isFound)if(this.showItemUnavailability){let i=t.isAvailable&&!t?.isTemporarilyUnavailable;t.isOOS;i?(e[t.departmentName]=[...e[t.departmentName]||[],t],this.availableItemsId.push({name:t.name,id:t.
1itemId})):this.unavailableItemsList.push(t)}else e[t.departmentName]=[...e[t.departmentName]||[],t];else this.cart.isAvailable||this.unavailableItemsId.push({name:t.name,id:t.itemId});return e}),{})).map((e=>({department:e[0],items:e[1]})))}validateNavigateToDnf(){return v(this,null,(function*(){let e,t,i=this;this.aemService.getDnfEligilityDisabledCheck()?(e="zone2",t="dnf"):(e="zone1",t="dnf-eligibility"),i.dnfService.getContent(this.storeId,this.cart.serviceType,this.token,this.banner,e,t).subscribe({next:e=>{e.items?.some((e=>{if(e.productInfo?.length>1)return i.dnfProductInfoFlag=!0,!0}));let t="flash"!=JSON.parse(localStorage.getItem("abSlot"))?.type?.toLowerCase();i.dnfTargetFlag=!(!i.dnfProductInfoFlag||!t),this.miniCartService.setDnfEligibility(i.dnfTargetFlag),localStorage.setItem("dnfTargetFlag",i.dnfTargetFlag?"true":"false"),i.emitCartConfig()},error:e=>{i.dnfTargetFlag=!1,i.emitCartConfig(),i.failureCallback(e,!0)}})}))}decreaseItemQty({cartItem:e,cart:t}){0===e.qty||null===e.qty?this.removeItem(e):(this.isUpdating=!0,this.updatePayload={cartItemsList:[{itemId:e.itemId,comments:e.comments}]},t.cartCategory&&"1P_WINE"===t.cartCategory?(this.updatePayload.cartCategory="1P_WINE",this.updatePayload.preferenceList=[{cartCategory:"1P_WINE",storeId:t.storeId}]):t.cartCategory&&"1P_B2B"===t.cartCategory&&(this.updatePayload.cartCategory="1P_B2B",this.updatePayload.preferenceList=[{cartCategory:"1P_B2B",storeId:t.storeId}]),t.isLbVsEachEnabled&&"3"===e.displayType?e.selectedWeight>e.incrementWeight?this.updatePayload.cartItemsList[0].selectedWeight=e.selectedWeight-Number(e.incrementWeight):this.updatePayload.cartItemsList[0].selectedWeight=e.minWeight:this.updatePayload.cartItemsList[0].qty=e.qty,e?.isCustomizable&&(this.updatePayload.cartItemsList[0].options=e?.options?.map((e=>h(h(h({},e.upcId&&{upcId:e.upcId}),e.name&&{name:e.name}),e.qty&&{qty:e.qty}))),this.updatePayload.cartItemsList[0].entryId=e?.entryId),this.miniCartService.updateCartItem(this.cart.cartId,e.itemId,this.updatePayload,t,this.token,this.banner,this.isExpressCheckoutEligible).subscribe((i=>{if(i.carts.length>0){this.cartEmpty=!1;let n=t.isLbVsEachEnabled&&"3"===e.displayType;this.readQuantityUpdate(n?e.selectedWeight:e.qty,n),i.carts.forEach((t=>{if(t._id===this.cart._id&&(this.getDugAlcMessage(t),this.cartSuccessCallback(t),this.updateItemsByDepartment(e.departmentName,t),window.AB&&window.AB.DATALAYER)){let i=t.seller?t.seller.sellerId:"1P_WINE"===t.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsCart(t,e,t.isWYSIWYGEnabled),this._updateAnalyticsProductInfo(e,i,!1),window.AB.DATALAYER.decreaseItemQuantity()}}))}else this.cartEmpty=!0}),(e=>{this.isUpdating=!1,this.backendStatus=!1,this.failureCallback(e)})))}increaseItemQty({cartItem:e,cart:t}){this.isUpdating=!0,this.updatePayload={cartItemsList:[{itemId:e.itemId,comments:e.comments}]},t.cartCategory&&"1P_WINE"===t.cartCategory?(this.updatePayload.cartCategory="1P_WINE",this.updatePayload.preferenceList=[{cartCategory:"1P_WINE",storeId:t.storeId}]):t.cartCategory&&"1P_B2B"===t.cartCategory&&(this.updatePayload.cartCategory="1P_B2B",this.updatePayload.preferenceList=[{cartCategory:"1P_B2B",storeId:t.storeId}]),t.isLbVsEachEnabled&&"3"===e.displayType?this.updatePayload.cartItemsList[0].selectedWeight=e.selectedWeight+Number(e.incrementWeight):this.updatePayload.cartItemsList[0].qty=e.qty,e?.isCustomizable&&(this.updatePayload.cartItemsList[0].options=e?.options?.map((e=>h(h(h({},e.upcId&&{upcId:e.upcId}),e.name&&{name:e.name}),e.qty&&{qty:e.qty}))),this.updatePayload.cartItemsList[0].entryId=e?.entryId),this.miniCartService.updateCartItem(this.cart.cartId,e.itemId,this.updatePayload,t,this.token,this.banner,this.isExpressCheckoutEligible).subscribe((i=>{if(i.carts.length>0){this.cartEmpty=!1;let n=t.isLbVsEachEnabled&&"3"===e.displayType;this.readQuantityUpdate(n?e.selectedWeight:e.qty,n),i.carts.forEach((t=>{if(t._id===this.cart._id&&(this.getDugAlcMessage(t),this.cartSuccessCallback(t),this.updateItemsByDepartment(e.departmentName,t),window.AB&&window.AB.DATALAYER)){let i=t.seller?t.seller.sellerId:"1P_WINE"===t.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsCart(t,e,t.isWYSIWYGEnabled),this._updateAnalyticsProductInfo(e,i,!1),window.AB.DATALAYER.increaseItemQuantity()}}))}else this.cartEmpty=!0}),(e=>{this.isUpdating=!1,this.backendStatus=!1,this.failureCallback(e)}))}removeItem(e){this.isUpdating=!0,this.readMessage("Processing",!0),this.enableUndoRemoveItem&&(this.lastRemovedItem=h({},e),(0===this.lastRemovedItem.qty||null===this.lastRemovedItem.qty)&&(this.lastRemovedItem.qty=1)),this.updateItemFocus(e.itemId),this.updatePayload={cartItemsList:[{itemId:e.itemId,entryId:e.entryId||void 0}]},this.cart.cartCategory&&"1P_WINE"===this.cart.cartCategory?(this.updatePayload.cartCategory="1P_WINE",this.updatePayload.preferenceList=[{cartCategory:"1P_WINE",storeId:this.cart.storeId}]):this.cart.cartCategory&&"1P_B2B"===this.cart.cartCategory&&(this.updatePayload.cartCategory="1P_B2B",this.updatePayload.preferenceList=[{cartCategory:"1P_B2B",
1storeId:this.cart.storeId}]),this.miniCartService.removeCartItem(this.cart,e.itemId,this.token,this.banner,this.updatePayload,this.isExpressCheckoutEligible).subscribe((t=>{this.enableUndoRemoveItem||this.readItemDeletedMsg();let i=!0;if(t.carts.length>0){if(this.cartEmpty=!1,t.carts.forEach((e=>{e._id===this.cart._id&&(this.cartSuccessCallback(e),i=!1)})),window.AB&&window.AB.DATALAYER){let t=this.cart.seller?this.cart.seller.sellerId:"1P_WINE"===this.cart.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsCart(this.cart,e,this.cart.isWYSIWYGEnabled),this._updateAnalyticsProductInfo(e,t,!1),window.AB.DATALAYER.removeItemFromCart()}}else if(this.cartEmpty=!0,window.AB&&window.AB.DATALAYER){let t=this.cart.seller?this.cart.seller.sellerId:"1P_WINE"===this.cart.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsCart({},e,!1),this._updateAnalyticsProductInfo(e,t,!1),window.AB.DATALAYER.removeItemFromCart(),window.analyticsCartEmpty=!0}if(this.enableUndoRemoveItem){let t={message:`Removed: ${e.name}`,type:"success",show:!0,closeOption:!0,from:"removeItem",timer:0,closeOnClick:!1,theme:"black",topVH:"10vh",rightVH:"18vh",bottomVH:"6vh",actionType:"undo-remove-item",hideAction:i,isAlwaysVisible:!0};this.snackBarService.setSnackBar(t)}}),(e=>{this.failureCallback(e)}),(()=>{this.isUpdating=!1}))}openGiftDrawer(){this.miniCartService.giftEnabled.next({event:"openGift",data:this.cart})}updateItemFocus(e){let t=this.findItemFocus(e);this.focus=t?.itemId?{element:"#mc-item-"+this.cart.cartId+"-"+t?.itemId,itemIndex:t?.itemId,action:{type:"remove-item",info:t?.name}}:{element:"#mini-cart-title",itemIndex:1}}findItemFocus(e){for(let t=0;t<this.cart.cartItemsList.length;t++)if(this.cart.cartItemsList[t].itemId===e)return 1===this.cart.cartItemsList.length?null:t===this.cart.cartItemsList.length-1?this.cart.cartItemsList[t-1]:this.cart.cartItemsList[t+1]}updateFlags(e){this.isSubstitutions2Enabled=e.isSubstitutions2Enabled,this.isNomEnabled=e.isOrderMinimumWaiverEnabled;let{summary:t,isWYSIWYGEnabled:i}=e;this.wysiwyg=i||!1,this.checkoutEnabled=this.reviewQualifyingDollarValue(t)}updateItemsByDepartment(e,t){this.itemsByDepartment.forEach((i=>{i.department.toLowerCase()===e.toLowerCase()&&i.items.forEach((e=>{let i=t.cartItemsList?.find((t=>t.itemId===e.itemId&&(!t.entryId||t.entryId===e.entryId)));i&&(e.netPromotionAmount=i.netPromotionAmount,e.netPromotionAmountPer=i.netPromotionAmountPer,e.basePrice=i.basePrice,e.qty=i.qty,e.selectedWeight=i.selectedWeight,e.selectedWeightAvailable=i.selectedWeightAvailable,e.selectedWeightType=i.selectedWeightType,e.sellByWeight=i.sellByWeight,e.savings=i.savings,e.clipped=i.clipped),this.isUpdating=!1,this.cart.summary=t.summary,this.cart.isAvailable=t.isAvailable;let{summary:n}=t;this.checkoutEnabled=this.reviewQualifyingDollarValue(n),this.filterSnsProducts(),this.emitCartConfig()}))}))}emitCartConfig(){this.cartConfigEmitter.emit({isCheckoutEnabled:this.checkoutEnabled,dnfFlag:this.dnfFlag,dnfTargetFlag:!this.cart?.seller&&"1P_WINE"!==this.cart?.cartCategory&&"1P_B2B"!==this.cart?.cartCategory&&this.dnfTargetFlag,isSeller:!!this.cart?.seller,cartInfo:this.cart,isAvailable:this.cart.isAvailable}),this.updateExpressCheckoutInfo()}updateExpressCheckoutInfo(){this.expressCheckoutOrderInfo=f(h({},this.expressCheckoutOrderInfo),{checkoutEnabled:this.checkoutEnabled,isWYSIWYGEnabled:this.wysiwyg,isAvailable:this.cart.isAvailable,isSingleCart:this.isSingleCart,cartCategory:this.cart.cartCategory,isExpressCheckoutEligible:this.isExpressCheckoutEligible,isBetterTaxEligible:"1P"===this.cart?.cartCategory&&this.cart?.summary?.tax&&!this.cart?.customerPreferences?.payments?.length})}updateItem(e,t){let i=e;if(0===e.qty||null===e.qty)this.removeItem(e);else{this.isUpdating=!0;let n={cartItemsList:[{itemId:e.itemId,comments:e.comments}]};this.cart.cartCategory&&"1P_WINE"===this.cart.cartCategory?(n.cartCategory="1P_WINE",n.preferenceList=[{cartCategory:"1P_WINE",storeId:this.cart.storeId}]):this.cart.cartCategory&&"1P_B2B"===this.cart.cartCategory&&(n.cartCategory="1P_B2B",n.preferenceList=[{cartCategory:"1P_B2B",
1storeId:this.cart.storeId}]),this.cart.isLbVsEachEnabled&&"3"===e.displayType?n.cartItemsList[0].selectedWeight=e.selectedWeight:n.cartItemsList[0].qty=e.qty,t&&(this.lastRemovedItem?.isCustomizable&&(n.cartItemsList[0].options=this.lastRemovedItem?.options.map((e=>h(h(h({},e.upcId&&{upcId:e.upcId}),e.name&&{name:e.name}),e.qty&&{qty:e.qty})))),this.lastRemovedItem?.comments&&(n.cartItemsList[0].comments=this.lastRemovedItem.comments),this.lastRemovedItem?.substituteItems?.length&&(delete n.cartItemsList[0].substitutionPreference,n.cartItemsList[0].substitutionPreferenceV2=this.lastRemovedItem.substitutionPreferenceV2,n.cartItemsList[0].substituteItems=[{itemId:this.lastRemovedItem.substituteItems[0]?.itemId?.toString(),algoType:this.lastRemovedItem.substituteItems[0]?.algoType?.toString()}])),this.miniCartService.updateCartItem(this.cart.cartId,e.itemId,n,this.cart,this.token,this.banner,this.isExpressCheckoutEligible).subscribe((n=>{this.isUpdating=!1,t?n.carts.forEach((i=>{i._id===this.cart._id&&(this.cartSuccessCallback(i),this.sendUndoAnalytics(i,e,t),this.readMessage("Item added successfully",!1,!0))})):this.cart.cartItemsList.forEach(((e,t)=>{e.itemId===i.itemId&&n.cartItemsList.forEach((e=>{e.itemId===i.itemId&&(this.cart.cartItemsList[t].comments=e.comments,this.cart.cartItemsList[t].substitutionPreference=e.substitutionPreference)}))}))}),(e=>{this.isUpdating=!1,this.backendStatus=!1,this.failureCallback(e)}))}}removeAllItems(e){if(e){let e=[...this.outOfStockItemsList,...this.unavailableItemsList].map((e=>({itemId:e.itemId}))),t=[...this.outOfStockItemsList,...this.unavailableItemsList],i={cartItemsList:e};this.cart.cartCategory&&"1P_WINE"===this.cart.cartCategory?(i.cartCategory="1P_WINE",i.preferenceList=[{cartCategory:"1P_WINE",storeId:this.cart.storeId}]):this.cart.cartCategory&&"1P_B2B"===this.cart.cartCategory&&(i.cartCategory="1P_B2B",i.preferenceList=[{cartCategory:"1P_B2B",storeId:this.cart.storeId}]),this.miniCartService.removeMultipleCartItems(this.cart,this.token,i,this.banner,this.isExpressCheckoutEligible).subscribe({next:e=>{this.outOfStockItemsList=[],this.unavailableItemsList=[],this.readItemDeletedMsg(!0),e.carts.forEach((e=>{e._id===this.cart._id&&(this.cartSuccessCallback(e),this.analyticsRemoveAllItems(t))}))},error:e=>{this.failureCallback(e)}})}}sendUndoAnalytics(e,t,i){if(window.AB&&window.AB.DATALAYER&&!0===i&&t){this._updateAnalyticsCart(e,t,e.isWYSIWYGEnabled),this._updateAnalyticsProductInfo(t,!1,!0);let i=t.qty||t.quantity;if(i>0)for(let e=0;e<i;e++)0===e?window.AB.DATALAYER.addItemToCart():window.AB.DATALAYER.increaseItemQuantity()}}removeUnDeliverablesFromCart(e){let{cartItem:t}=e;this.isUpdating=!0,this.updatePayload={cartItemsList:[{itemId:t.itemId,entryId:t.entryId||void 0}]},this.cart.cartCategory&&"1P_WINE"===this.cart.cartCategory?(this.updatePayload.cartCategory="1P_WINE",this.updatePayload.preferenceList=[{cartCategory:"1P_WINE",storeId:this.cart.storeId}]):this.cart.cartCategory&&"1P_B2B"===this.cart.cartCategory&&(this.updatePayload.cartCategory="1P_B2B",this.updatePayload.preferenceList=[{cartCategory:"1P_B2B",storeId:this.cart.storeId}]),this.miniCartService.removeCartItem(this.cart,t.itemId,this.token,this.banner,this.updatePayload,this.isExpressCheckoutEligible).subscribe((e=>{this.isUpdating=!1,e.carts.forEach((e=>{e._id===this.cart._id&&this.cartSuccessCallback(e)}))}),(e=>{this.failureCallback(e)}),(()=>{this.isUpdating=!1}))}removeOrder(){this.miniCartService.removeOrder(this.cart,this.token,this.isExpressCheckoutEligible).subscribe((()=>{console.log("")}))}analyticsRemoveAllItems(e){if(window.AB.DATALAYER){let t=e.length-1,i=[];e.forEach(((e,n)=>{let r={id:e&&e.itemId,name:e&&e.name,units:"0",listPrice:e.price?e.price.toString():"",carouselSection:"",basePrice:e.basePrice?e.basePrice.toString():"",pricingType:e&&e.promoType,couponFlag:"0",couponClipped:"0",couponID:"",aisleId:e&&e.aisleId,upc:e&&e.upc};setTimeout((()=>{i.push(e.id),window.AB.DATALAYER.setCarouselName("shop|mini_cart"),window.AB.DATALAYER.removeItemFromCart(r),window.AB.DATALAYER.removeFromCart(e),n===t&&window.AB.DATALAYER.set
1LinkClickRemoveAll("remove_all_minicart",i.join(","))}),500)}))}}_updateAnalyticsCart(e,t,i){window.AB.DATALAYER&&(window.AB.DATALAYER.updateCartType("mini_cart"),window.AB.DATALAYER.updateCart(e,t,i))}_updateAnalyticsCartSavings(e){if(window.AB.DATALAYER&&e&&!e?.seller){let t={cartItemsList:e.cartItemsList||[],summary:e.summary,isWYSIWYGEnabled:e.isWYSIWYGEnabled},i=0,n=0;t.cartItemsList.length>0&&t.cartItemsList.forEach((e=>{i+=e.totalCoupons,n+=e.totalClippedCoupons})),window.AB.DATALAYER.updateCartSavings(i,n,t)}}_updateAnalyticsCartMFC(e){if(window.AB.DATALAYER&&e&&!e?.seller){let t=void 0!==e.isMFC&&null!=e.isMFC?e.isMFC.toString():"";window.AB.DATALAYER.updateCartIsMFC(t);let i=void 0!==e.mfcUnavailableProductsCount&&null!=e.mfcUnavailableProductsCount?e.mfcUnavailableProductsCount.toString():"";window.AB.DATALAYER.updateCartMFCUnavailableCount(i)}}_updateAnalyticsPromoBannerImpressions(){window.AB.DATALAYER&&window.AB.DATALAYER.setMiniCartBannerImpressions(this.cart,this.isNewUser)}_updateAnalyticsCartLoadEvent(){window.AB.DATALAYER&&!window.analyticsCartEmpty?window.AB.DATALAYER.updateMiniCartEvent():window.analyticsCartEmpty&&delete window.analyticsCartEmpty,window.removeEventListener("analyticsCartRespReady",this._updateAnalyticsCartLoadEvent)}_updateAnalyticsProductInfo(e,t,i=!1){if(window.AB.DATALAYER){let n={id:e.itemId||e.id,name:e.name,units:e.quantity?e.quantity:e.qty?e.qty:"",unitType:e.unitQuantity,lbs:"0",each:"0",pricePerUnit:e.pricePer?e.pricePer:e.pricePerUnit?e.pricePerUnit:e.unitPrice?e.unitPrice:"",listPrice:e.price?e.price.toString():"",carouselSection:"",basePrice:e.basePrice?e.basePrice.toString():"",pricingType:e.promoType,couponFlag:"0",couponClipped:"0",couponID:"",aisleId:e.aisleId,upc:e.upc,isMTO:e.isMtoProduct,departmentName:e.departmentName,sellerId:t||"",isUndoClick:i,isProductTrackingDisabled:!!e.isProductTrackingDisabled};"EACH"==e.unitQuantity&&(n.each=e.quantity?e.quantity.toString():e.qty?e.qty.toString():"");let r=[];if(r.length>0){let e=r.filter((e=>"C"===e.status)).length,t=r.length,i=r.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString();n.couponFlag=t.toString(),n.couponClipped=e.toString(),n.couponID=i}window.AB.DATALAYER.productInfo(n),window.AB.DATALAYER.setCarouselName("shop|mini_cart")}}substitutionUpdate(e){}updateMultipleSubstitution(e){let t;if(e&&"function"==typeof e.stopPropagation&&e.stopPropagation(),t="delivery"===this.cart.serviceType.toLowerCase()?"delivery":"pickup",this.newSubsViewFlag?this.itemIds=this.cart?.cartItemsList?.map((e=>e.itemId)):this.itemIds=this.cart.cartItemsList.filter((e=>"Do Not Substitute"!==e.substitutionPreferenceV2))?.map((e=>e.itemId)),this.itemIds?.length>0){this.multiSubstitutionResponse=[],this.loaderFlag=!0;let e=5,i=[];for(let n=0;n<this.itemIds.length;n+=e){let r=this.itemIds.slice(n,n+e);i.push(this.miniCartService.getItemsWithBpns(this.storeId,r,this.token,this.banner,this.cart.isAutoClipEnabled,t))}Oi([...i]).pipe(bi((e=>e.reduce(((e,t)=>[...e,t]),[])))).subscribe({next:e=>{if(e&&e.length>0){let t={bpnCount:0,genBpnCount:0,persBpnCount:0,priceCount:0,productsErrorCount:0,productsInfoCount:0,productsInfo:[]};e?.forEach((e=>{e&&(t.bpnCount+=e.bpnCount,t.genBpnCount+=e.genBpnCount,t.persBpnCount+=e.persBpnCount,t.priceCount+=e.priceCount,t.productsErrorCount+=e.productsErrorCount,e.productsInfo?.length&&t.productsInfo.push(...e.productsInfo),t.productsInfoCount+=e.productsInfoCount)})),0!==t.productsInfoCount?(this.multiSubstitutionResponse=t.productsInfo,this.cart.cartItemsList.forEach((e=>{if(e.substituteItems&&e.substituteItems.length>0){e.substituteItems[0].offers=[],e.substituteItems[0]?.savings?.forEach((t=>{t.ecomDescription=t?.displayOfferTxt,e.substituteItems[0].offers.push(t)}));let t=this.multiSubstitutionResponse.findIndex((t=>t.bpn===+e.itemId));e.substituteItems&&t>-1&&e.substituteItems[0].itemId!=parseInt(this.multiSubstitutionResponse[t]?.substituteList[0].id)?(e.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.substituteItems[0].itemId,e.substituteItems[0].id=e.substituteItems[0].itemId,this.multiSubstitutionResponse[t]?.substituteList.map(((i,n)=>{e.substituteItems[0].itemId===parseInt(i.id)&&this.multiSubstitutionResponse[t]?.substituteList.splice(n,1)})),this.multiSubstitutionResponse[t]?.substituteList.unshift(e.substituteItems[0])):-1===t&&this.populateSubstituteItem(e)}else this.cart.cartItemsList.forEach((e=>{this.populateSubstituteItem(e)}))}))):this.mapExistingSubs()}this.miniCartService._multiSubstitution.next(this.buildDefaultSubstituationData()),this.loaderFlag=!1},error:e=>{this.loaderFlag=!1,this.failureCallback(e)}})}else this.mapExistingSubs(),this.miniCartService._multiSubstitution.next(this.buildDefaultSubstituationData());document.body.setAttribute("data-substitutionDrawerOpened","true")}buildDefaultSubstituationData(){let e=[];return this.cart.cartItemsList?.forEach((t=>{if(t.isAvailable){let i=this.multiSubstitutionResponse.find((e=>e.bpn===t.itemId&&(!e.entryId||e.entryId===t.entryId)));i?.substituteList?.forEach((e=>{e.thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.id,t?.substituteItems&&(e.Subflag=!0)})),e.push({id:t.itemId,name:t.name,quantity:t.qty,basePrice:t.basePrice,price:t.price,displayUnitQuantityText:t.displayUnitQuantityText,substituteItems:i?.substituteList||[],substitutionPreferenceV2:t.substitutionPreferenceV2,isAutoClipEnabled:this.isAutoClipEnabled,multiCustomizations:t.multiCustomizations,entryId:t.entryId,isCustomizable:t.isCustomizable,totalBasePrice:t.totalBasePrice,totalPrice:t.totalPrice})}})),{cartItems:e,data:[],token:this.token,storeId:this.storeId,cartId:this.cart.cartId,isMultiSub:!0,cartCategory:this.cart.cartCategory,isAutoClipEnabled:this.cart.isAutoClipEnabled,entryId:this.cart.entryId}}mapExistingSubs(){this.multiSubstitutionResponse=[],this.cart.cartItemsList.forEach((e=>{this.populateSubstituteItem(e)}))}populateSubstituteItem(e){if(e.substituteItems&&e.substituteItems.length>0){e.substituteItems[0].offers=[],e.substituteItems[0].thumnailUrl="https://images.albertsons-media.com/is/image/ABS/"+e.substituteItems[0].itemId,e.substituteItems[0].id=e.substituteItems[0].itemId,e.substituteItems[0]?.savings?.forEach((t=>{t.ecomDescription=t?.displayOfferTxt,e.substituteItems[0].offers.push(t)}));let t={bpn:+e.itemId,substituteList:[e.substituteItems[0]],entryId:e.entryId};this.multiSubstitutionResponse.push(t)}}readMessage(e,t,i){if(!i){let t=document.createElement("div"),i="speak-"+Date.now();t.setAttribute("id",i),t.setAttribute("role","alert"),t.setAttribute("aria-live","assertive"),t.classList.add("sr-only");let n=document.getElementById("accordion-products-"+this.cart.cartId)||document.body;n?.appendChild(t),window.setTimeout((function(){t.innerHTML=e}),0),window.setTimeout((function(){document.getElementById(i)&&n?.removeChild(document.getElementById(i))}),3e3)}!t&&this.updateFocusToActiveElement(i)}
1readQuantityUpdate(e,t=!1){let i="Quantity Updated to "+e+(t?" LB":"");this.readMessage(i)}readItemDeletedMsg(e){let t=e?"Unavailable Items removed successfully":"Item removed successfully";this.readMessage(t,!1,!0)}updateFocusToActiveElement(e){if(this.focus?.itemIndex){let t=h({},this.focus);this.focus={element:"",itemIndex:void 0},e&&"remove-item"===t.action?.type?H7(t,"Item removed successfully. Current item is "+t.action?.info):e&&"add-item"===t.action?.type?H7(t,"Item added successfully. Current item is "+t.action?.info):setTimeout((()=>{$(t?.element)?.trigger("focus")}),100)}}reviewQualifyingDollarValue(e){return(this.wysiwyg?e?.qualifyingDollarValueWYSIWYG:e?.qualifyingDollarValue)<=0||!!(["1P","1P_B2B"].indexOf(this.cart.cartCategory)>-1&&(this.isNomEnabled||this.cart.isSnapUser)&&e?.finalTransactionTotal)}toggleProducts(){this.isViewToggleExpanded=!this.isViewToggleExpanded}setFocusElement(e){this.focus=e}trackItems(e){return e?this.cart?.cartId+"-"+e.itemId:void 0}routeToCheckout(){this.miniCartService.routeToCheckout(this.storeId,this.dnfTargetFlag,this.dnfFlag,this.cart,this.isExpressCheckoutEligible)}routeToCart(){this.miniCartService.routeToCart(this.cart)}get primaryColor(){return this.miniCartService.getPrimaryColor(this.banner)}get getConfirmButtonStyle(){return this.miniCartService.getConfirmButtonStyle(this.banner)}get disableCheckoutButton(){return!this.checkoutEnabled||!this.cart?.isAvailable}get getDateTxt(){return W7(this.cart.slotInfo?.displayDateTxt)}failureCallback(e,t){!t&&(401===e.status||403===e.status)&&this.authService.routeToReSignIn()}cartNavigation(){this.cart?.seller?window.location.href="/marketplace/landing/"+this.cart?.seller?.sellerName?.toLowerCase().replace(/[`~!@#$%^&*()_|+\-=?;:'"" ",.<>\{\}\[\]\\\/]/gi,"")+".html":"1P_WINE"===this.cart?.cartCategory?window.location.href="/vineandcellar/landing.html":window.location.href=window.location.origin}subscribeToGenericEvents(){this.enableUndoRemoveItem&&this.snackBarService.snackBarEventEmitter$.pipe(un(this.$destroyed)).subscribe((e=>{"undo-remove-item"===e.type&&this.lastRemovedItem?(this.updateItem(this.lastRemovedItem,!0),$("#blank-content")?.trigger("focus"),this.focus={element:"#mc-item-"+this.cart.cartId+"-"+this.lastRemovedItem?.itemId,itemIndex:this.lastRemovedItem?.itemId,action:{type:"add-item",info:this.lastRemovedItem?.name}},this.closeSnackBar()):"close-snack-bar"===e.type&&this.lastRemovedItem?this.closeSnackBar():"cancel-undo-remove-action"===e.type&&(this.lastRemovedItem=void 0,this.updateFocusToActiveElement())}))}closeSnackBar(){this.lastRemovedItem=void 0,this.snackBarService.closeSnackBarInfo()}subscribeToFocusInfo(){this.miniCartService.focusInfo.pipe(un(this.$destroyed)).subscribe((e=>{e&&this.setFocusBack(e)}))}setFocusBack(e){e?.focusId&&this.cart?.cartId===e.cartId&&setTimeout((()=>{!this.isSingleCart&&e.expandToggle&&$(`#cart-accordion-${this.cart?.cartId}`)?.trigger("click"),$(e.focusId)?.trigger("focus"),this.miniCartService.$focusInfo.next(void 0)}),250)}getDugAlcMessage(e){this.cart.alcDisclamer=e?.alcDisclamer,this.dugAlcDiscMsg=this.webMessages?.messages["Dug-Alcohol-LegalAsk"]?.message,this.dugAlcDiscMsg=this.dugAlcDiscMsg?.replace(/\$%@/g,"$"+e?.alcDisclaimerAmt),this.miniCartService.getUsStates(e?.storeStateCd,this.banner).subscribe((e=>{this.dugAlcDiscMsg=this.dugAlcDiscMsg?.replace(/%@/g,e||"")}))}validateFulfillmentInfo(){if(this.shouldDisplayFulfillmentInfo&&!this.isExpressCheckoutEligible){if(this.cart.slotInfo.reserved)this.homeBannerCartDateInfo=this.cart.slotInfo.displayDateTxt+",";else switch(this.cart.slotInfo?.displayDateTxt?.toLowerCase()){case"today":this.homeBannerCartDateInfo="As soon as : ";break;case"tomorrow":this.homeBannerCartDateInfo="As soon as : "+this.cart.slotInfo.displayDateTxt;break;default:this.homeBannerCartDateInfo=this.cart.slotInfo.displayDateTxt+","}this.cart.slotInfo.displayTimeTxt=this.cart.slotInfo.displayTimeTxt.replace(/^0+/,""),this.cart?.slotInfo?.displayEndTimeTxt&&(this.cart.slotInfo.displayEndTimeTxt=this.cart.slotInfo.displayEndTimeTxt.replace(/^0+/,""))}}timeLeftForNextAvailableFlashSlot(e,t){let i=this.cart?.timeZoneId,n=new Date(function(e){let t=new Date,i={timeZone:e,
1year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1},n=new Intl.DateTimeFormat("en-US",i).formatToParts(t),r={};for(let e of n)"literal"!==e.type&&(r[e.type]=e.value);return new Date(`${r.year}-${r.month}-${r.day}T${r.hour}:${r.minute}`)}(i)),[r,s]=e.split(" "),[a,o]=r.split(":").map(Number);"PM"===s.toUpperCase()&&a<12&&(a+=12),"AM"===s.toUpperCase()&&12===a&&(a=0);let l=new Date(n);"Tomorrow"===t&&l.setDate(l.getDate()+1),l.setHours(a,o);let c=Math.round((l.getTime()-n.getTime())/6e4);this.nextAvailableFlashSlotMins=c>1?c+" mins":c+" min"}get shouldDisplayFulfillmentInfo(){return"1P"===this.cart.cartCategory&&this.cart?.isAvailable&&this.cart?.slotInfo}get checkIfOnlyCustomCakesInCart(){return this.cart?.hasMTOCustomBakery&&!this.cart?.hasCateringProduct&&1===this.cart?.counterPickup?.length&&this.cart?.counterPickup?.includes("BAKERY")}get checkIfBakeryAndDeliInCart(){return this.cart?.hasCateringProduct&&2===this.cart?.counterPickup?.length&&this.cart?.counterPickup?.includes("BAKERY")&&this.cart?.counterPickup?.includes("DELI")}get checkIfBakeryOnlyWithCatering(){return this.cart?.hasCateringProduct&&1===this.cart?.counterPickup?.length&&this.cart?.counterPickup?.includes("BAKERY")}get checkIfDeliOnlyWithCatering(){return!this.cart?.hasMTOCustomBakery&&this.cart?.hasCateringProduct&&1===this.cart?.counterPickup?.length&&this.cart?.counterPickup?.includes("DELI")}ngOnDestroy(){this.$destroyed.next(!0),this.$destroyed.complete()}static{this.ɵfac=function(t){return new(t||e)($d(Q7),$d(J7),$d(X7),$d(Ty),$d(K7),$d(_w),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["mini-cart-v2"]],inputs:{cartIndex:"cartIndex",cart:"cart",customerId:"customerId",storeId:"storeId",token:"token",banner:"banner",type:"type",isSingleCart:"isSingleCart",bannerName:"bannerName",webMessages:"webMessages",isExpressCheckoutEligible:"isExpressCheckoutEligible",isAutoClipEnabled:"isAutoClipEnabled"},outputs:{cartConfigEmitter:"cartConfigEmitter"},features:[xm([Ty]),ga],decls:5,vars:1,consts:[["freeShippingMsgRef",""],["flashLogo",""],["defaultStoreHeader",""],["defaultFulfillmentInfo",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["class","col-12 px-0 py-2",4,"ngIf"],[1,"store-content"],["class","cart-accordion-products",4,"ngIf"],["class","pt-2 store-content__buttons",4,"ngIf"],["class","store-content__buttons",4,"ngIf"],["role","button","class","gifting-container-cart col-12 row p-0","tabindex","0",3,"click","keyup.enter","keydown.space",4,"ngIf"],["class","sub-loader ada-hide-mobile-focus","role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"expressCheckoutOrderInfo","isExpressCheckoutEligible","cartData","storeId","token","bannerConfiguration","summary","slotInfo","storeInfo","payment","meta"],["class","lto-banner lto-banner-custom-cake lto-banner-warning-cake mt-2 mb-1 mx-auto",4,"ngIf"],[1,"lto-banner","lto-banner-custom-cake","lto-banner-warning-cake","mt-2","mb-1","mx-auto"],[1,"lto-banner-content","lto-banner-desc"],["src","erums/cart/dist/assets/images/new_warning_icon.svg","alt","alert",1,"alert-icon","mr-2"],["role","alert",1,"warning-message"],["class","lto-banner lto-banner-custom-cake mt-2 mb-1 mx-auto","role","alert",4,"ngIf"],["role","alert",1,"lto-banner","lto-banner-custom-cake","mt-2","mb-1","mx-auto"],[1,"lto-banner-content"],[1,"lto-banner-desc"],[1,"store-header",3,"ngClass"],[1,"cart-dst-store-header__label","store-header__wrapper"],["data-qa","swy-img",1,"store-header__img","float-left","mw-100"],["role","link","tabindex","0",1,"cart-dst-banner-nav",3,"keyup.enter","click"],["aria-hidden","true","class","cart-dst-home-logo",3,"id",4,"ngIf"],["class","banner-logo","aria-hidden","true",3,"id","src",4,"ngIf"],["aria-hidden","true","class","cart-dst-wine-logo",3,"id","src",4,"ngIf"],["aria-hidden","true","class","cart-dst-mp-logo",3,"id",4,"ngIf"],[1,"store-header__details","w-100","ml-2","mr-1"],[1,"store-header__details__title","cart-dst-store-header__details__title"],["class","address-wrapper",4,"ngIf"],["class","details-title","data-qa","swy-ttl","role","link","tabindex","0","attr.aria-label","Vine & Cellar",3,"keyup.enter","click",4,"ngIf"],["class","store-header__details__date cart-dst-fullfillment-slot","data-qa","swy-dtls-dt",4,"ngIf"],[1,"store-header__price"],[1,"sr-only","sr-total-price"],["class","details-price","data-qa","swy-prc","aria-hidden","true",4,"ngIf"],["class","store-header__alert",4,"ngIf"],["class","cart-dst-alert-header d-flex",4,"ngIf"],["aria-hidden","true",1,"cart-dst-home-logo",3,"id"],["aria-hidden","true",1,"banner-logo",3,"id","src"],["aria-hidden","true",1,"cart-dst-wine-logo",3,"id","src"],["aria-hidden","true",1,"cart-dst-mp-logo",3,"id"],[1,"address-wrapper"],[1,"cart-dst-fulfillment-address","fullfillnent-address"],["id","pickupId","class","type",4,"ngIf"],["id","pickupId",1,"type"],["data-qa","swy-ttl","role","link","tabindex","0",1,"details-title",3,"keyup.enter","click"],["class","cart-dst-fulfillment-address fullfillnent-address",4,"ngIf"],["data-qa","swy-ttl","role","link","tabindex","0","attr.aria-label","Vine & Cellar",1,"details-title",3,"keyup.enter","click"],["data-qa","swy-dtls-dt",1,"store-header__details__date","cart-dst-fullfillment-slot"],[1,"cart-dst-fullfillment-slot"],[1,"sr-only"],["aria-hidden","true","id","fulfillmentSlotInfo",1,"slot"],[4,"ngTemplateOutlet"],["id","fulfillmentSlotInfo","class","slot",4,"ngIf"],["id","fulfillmentSlotInfo",1,"slot"],["aria-hidden","true"],["data-qa","swy-prc","aria-hidden","true",1,"details-price"],[1,"lto-banner"],["id","lto-banner-title",1,"lto-banner-title"],["id","lto-banner-desc",1,"lto-banner-desc"],[1,"align-items-center","cart
1-dst-promo-banner",3,"ngClass"],[1,"store-header__alert"],["data-qa","99mrt-wrn"],["data-qa","99mrt-wrn-icn",1,"svg-warning-outline"],[1,"cart-dst-alert-header","d-flex"],["data-qa","99mrt-wrn",1,"cart-dst-add-items-wrapper","d-flex","justify-content-start","flex-grow-1"],["role","img","tabindex","-1","data-qa","99mrt-wrn-icn","aria-label","warning",1,"svg-warning-outline","cart-dst-alert-image"],["data-qa","99mrt-wrn",1,"cart-dst-add-items-wrapper"],["role","img","tabindex","-1","data-qa","99mrt-wrn-icn","aria-label","warning",1,"svg-warning-outline"],["data-qa","99mrt-wrn-lnk",1,"link-sm","cart-dst-add-items",3,"click"],[3,"expressCheckoutOrderInfo","isExpressCheckoutEligible","cartData","storeId","token","bannerConfiguration","summary","meta","isBetterTaxes"],[1,"col-12","px-0","py-2"],[1,"cart-dst-items-header",3,"click"],["alt","Substitute all items","aria-hidden","true","src","/erums/cart/dist/assets/images/icons-web-substitution.svg","role","img","tabindex","-1",1,"sub-icon","Icons-Web-substitution"],["role","button","tabindex","0",1,"cart-dst-label-text",3,"keyup.enter","id"],[3,"removeItem","removeAllItems","banner","outOfStockItemsList","unavailableItemsList","fulfillmentType","isSellerCart","id"],[1,"cart-accordion-products"],["tabindex","0","class","cart-accordion cart-dst-products-toggle","data-toggle","collapse",3,"id","href","click",4,"ngIf"],[1,"cart-accordion-content","collapse",3,"id"],["class","mb-3 alcohol-container",4,"ngIf"],[4,"ngFor","ngForOf"],["tabindex","0","data-toggle","collapse",1,"cart-accordion","cart-dst-products-toggle",3,"click","id","href"],[1,"cart-accordion__header","cart-dst-collapsed-products"],["aria-hidden","true","tabindex","-1","class","store-content__items cart-dst-collapsed-products__items",4,"ngIf"],["aria-hidden","true","tabindex","-1","class","cart-accordion__header__view-items cart-dst-collapsed-products__toggle","data-qa","swy-vw-itms",3,"ngStyle",4,"ngIf"],["aria-hidden","true","tabindex","-1",1,"store-content__items","cart-dst-collapsed-products__items"],["class","item-remaining cart-dst-item-remaining","data-qa","swy-itm-rmng",4,"ngIf"],["loading","lazy","role","img","data-qa","swy-itm1","tabindex","-1",1,"item-small-img",3,"src","alt"],["data-qa","swy-itm-rmng",1,"item-remaining","cart-dst-item-remaining"],["aria-hidden","true","tabindex","-1","data-qa","swy-vw-itms",1,"cart-accordion__header__view-items","cart-dst-collapsed-products__toggle",3,"ngStyle"],["aria-hidden","true","tabindex","-1","data-qa","swy-vw-itms-arr",1,"cart-accordion__header__carret-icon"],[1,"svg-caret-collapse"],[1,"svg-caret-expand"],[1,"mb-3","alcohol-container"],[1,"col-12","row"],[1,"col-1","d-inline","pl-1"],["src","/erums/cart/dist/assets/images/Info.svg","alt",""],[1,"col-11","pl-3","alcohol-message"],[1,"mb-2","alcohol-font"],["role","heading","aria-level","2",1,"cart-dst-department-header","my-2"],["tabindex","-1",1,"cart-dst-department-header-text"],["tabindex","-1",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1"],[3,"updateSubstitution","isUpdatingChange","backendStatusChange","updateItem","increaseQty","decreaseQty","removeItem","setFocusElement","isSubstitutions2Enabled","banner","cartId","item","index","isUpdating","isLbVsEachEnabled","bannerConfiguration","backendStatus","individualCart","isMFC","isSCPEnabled","isWYSIWYGEnabled","cartCategory"],["tabindex","-1",1,"cart-accordion","d-block",3,"id"],[1,"pt-2","store-content__buttons"],["href","javascript:void(0);","role","link","data-qa","swy-vw-ord",1,"view-order",3,"click","ngStyle"],[1,"store-content__buttons"],[1,"d-flex","justify-content-end"],["class","mr-auto",4,"ngIf"],["aria-label","Checkout","id","checkoutBtn","data-qa","swy-ckout",1,"btn","btn-md","btn-primary",3,"click","disabled","ngStyle"],["class","pt-2 cart-dst-minimum-label",4,"ngIf"],["class","pt-2 cart-dst-unavailable-msg",4,"ngIf"],[1,"mr-auto"],["href","javascript:void(0);
1","role","link","data-qa","swy-vw-ord",1,"view-order","cart-dst-order-action",3,"click","ngStyle"],[1,"pt-2","cart-dst-minimum-label"],[1,"pt-2","cart-dst-unavailable-msg"],["role","button","tabindex","0",1,"gifting-container-cart","col-12","row","p-0",3,"click","keyup.enter","keydown.space"],["aria-hidden","true",1,"col-8","p-0","d-flex","align-items-center"],[1,"gift-image-wrapper"],["src","/erums/cart/dist/assets/images/gift.svg","alt","gift icon",1,"gift-image-cart"],["id","make-gift-container",1,"gift-label-cart","pl-2"],["aria-hidden","true",1,"col-4","p-0","gift-link-cart"],[1,"gift-new-label"],["src","/erums/cart/dist/assets/images/gift-right.svg","alt"," gift icon"],["aria-hidden","true",1,"col-8","p-0"],["src","/erums/cart/dist/assets/images/gift.svg","alt","",1,"gift-image-cart","d-inline"],["id","is-gift-container",1,"d-inline","gift-label-cart","pl-2"],[1,"gift-reciever"],["src","/erums/cart/dist/assets/images/gift-right.svg","alt",""],["class","store-footer","data-qa","swy-ftr",3,"id",4,"ngIf"],["class","store-footer waived-service-fee","data-qa","swy-ftr",3,"id",4,"ngIf"],["data-qa","swy-ftr",1,"store-footer",3,"id"],["data-qa","swy-ftr",1,"store-footer","waived-service-fee",3,"id"],[1,"store-footer","order-span-vine-cellar"],["src","/erums/cart/dist/assets/images/icons-web-package.svg","alt","Package icon"],["href","/vineandcellar/landing.html",1,"color-primary-default",3,"ngStyle"],["role","alert","aria-label","Loading, please wait","aria-busy","true","aria-live","assertive",1,"sub-loader","ada-hide-mobile-focus"],["data-qa","swy-ftr",3,"ngClass","id",4,"ngIf"],["data-qa","swy-ftr",3,"ngClass","id"],["role","link","tabindex","0",1,"add-free-shipping-items",3,"click","keyup.enter"],["aria-hidden","true","src","/erums/cart/dist/assets/images/flash-icon-new.svg","alt",""]],template:function(e,t){1&e&&ph(0,ene,19,16,"ng-container",4)(1,nne,2,2,"ng-template",null,0,Wm)(3,rne,1,0,"ng-template",null,1,Wm),2&e&&zh("ngIf",t.cart)},dependencies:[sy,oy,cy,by,gy,b9,vte,Tte,Oy,By,Ty,k8],styles:['.lto-banner[_ngcontent-%COMP%]{border-top:4px solid rgba(114,164,197,.2509803922);background:#ebf3f9!important;padding:4px 4px 8px 16px;margin-left:-20px;margin-right:-20px}.lto-banner-title[_ngcontent-%COMP%]{background:#ebf3f9!important;font-weight:700;font-size:14px}.lto-banner-desc[_ngcontent-%COMP%]{background:#ebf3f9!important;font-size:14px}.lto-banner-custom-cake[_ngcontent-%COMP%]{width:90%;padding:8px 8px 8px 12px;margin-left:0;border-top:none;border-radius:10px}.lto-banner-warning-cake[_ngcontent-%COMP%]{background:#fdf3d9!important}.lto-banner-warning-cake[_ngcontent-%COMP%] .lto-banner-desc[_ngcontent-%COMP%]{background:#fdf3d9!important;font-size:14px}.lto-banner-warning-cakeimg[_ngcontent-%COMP%]{position:unset}.lto-banner-warning-cake[_ngcontent-%COMP%] .lto-banner-desc[_ngcontent-%COMP%]{display:flex;align-items:flex-start}.lto-banner-warning-cake[_ngcontent-%COMP%] .warning-message[_ngcontent-%COMP%]{display:block}.address-wrapper[_ngcontent-%COMP%]{word-wrap:break-word}.store-header__details[_ngcontent-%COMP%]{overflow:hidden}.fullfillnent-address[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;padding-top:1px}.store-header__price[_ngcontent-%COMP%]{font-weight:600;font-size:20px;line-height:120%}.cart-dst-store-header__label.store-header__wrapper[_ngcontent-%COMP%]{gap:10px}.cart-dst-store-header__label[_ngcontent-%COMP%]{display:flex;align-items:center}.cart-dst-store-header__label[_ngcontent-%COMP%] .cart-dst-store-header__details__title[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:20px;line-height:24px}.cart-dst-fulfillment-address[_ngcontent-%COMP%], .cart-dst-fullfillment-slot[_ngcontent-%COMP%]{color:#2a2928;font-size:16px;line-height:24px;font-weight:400}.cart-dst-department-header[_ngcontent-%COMP%]{background-color:#faf9f8!important;border-radius:8px;padding:6px 0}.cart-dst-department-header[_ngcontent-%COMP%] .cart-dst-department-header-text[_ngcontent-%COMP%]{font-weight:600;font-size:14px;line-height:21px;color:#2a2928;padding:2px 8px}.cart-dst-banner-nav[_ngcontent-%COMP%]{width:auto;height:auto;display:inline-block}
1.cart-dst-item-remaining[_ngcontent-%COMP%]{color:#2a2928}.cart-dst-items-header[_ngcontent-%COMP%] .cart-dst-label-text[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:22px;margin:5px 0;display:inline-block}.cart-dst-minimum-label[_ngcontent-%COMP%]{color:#535250;font-weight:600;font-size:14px;line-height:21px;text-align:center}.cart-dst-unavailable-msg[_ngcontent-%COMP%]{color:#535250;font-weight:600;font-size:14px;line-height:21px}.cart-dst-items-header[_ngcontent-%COMP%]{text-align:right;padding:0 20px}.cart-dst-mp-logo[_ngcontent-%COMP%]{height:50px;width:50px;cursor:pointer}.cart-b2b-logo[_ngcontent-%COMP%]{height:2em;width:10em;cursor:pointer}.cart-dst-home-logo[_ngcontent-%COMP%]{height:50px;width:150px;cursor:pointer}.cart-dst-wine-logo[_ngcontent-%COMP%]{height:50px;border-radius:100px;cursor:pointer}.cart-dst-collapsed-products[_ngcontent-%COMP%]{flex-direction:column}.cart-dst-collapsed-products[_ngcontent-%COMP%] .cart-dst-collapsed-products__items[_ngcontent-%COMP%]{order:1}.cart-dst-collapsed-products__toggle[_ngcontent-%COMP%]{order:0;margin-bottom:16px;font-weight:600}@media screen and (max-width: 767px){.cart-dst-store-buttons-wrapper[_ngcontent-%COMP%]{align-items:center}}.cart-dst-products-toggle[_ngcontent-%COMP%]{cursor:pointer;display:block;margin:5px 0}.cart-dst-view-order[_ngcontent-%COMP%]{text-decoration:underline}.cart-dst-promo-banner[_ngcontent-%COMP%]{background-color:#fbe7e4!important;min-width:100%;text-align:center;font-weight:600;padding:8px;font-size:14px;margin-left:-20px;margin-right:-20px}.cart-dst-alert-header[_ngcontent-%COMP%]{font-size:14px;font-weight:300;border:1px solid #f7d171;background:#faf9f8;border-radius:8px;margin-top:10px;line-height:1.5;padding:10px}.sr-total-price[_ngcontent-%COMP%]{width:90px;height:24px}.order-span-vine-cellar[_ngcontent-%COMP%]{font-size:14px;text-align:center;padding-top:7px;padding-right:2em;padding-left:2em}.order-span-vine-cellar[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{padding-bottom:3px;margin-right:7.5px}.order-span-vine-cellar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.cart-dst-alert-image[_ngcontent-%COMP%]{width:100px;height:20px;margin-right:8px;padding-top:28px}@media screen and (max-width: 767px){.cart-dst-alert-image[_ngcontent-%COMP%]{width:50px}}@media screen and (max-width: 420px){.cart-dst-alert-image[_ngcontent-%COMP%]{width:100px}}@media screen and (max-width: 600px){.cart-dst-alert-image[_ngcontent-%COMP%]{width:75px;padding-top:25px}}@media screen and (max-width: 420px){.cart-dst-add-items[_ngcontent-%COMP%]{display:block;margin:0 16px 8px}.cart-dst-add-items-wrapper[_ngcontent-%COMP%]{height:auto!important}}.add-free-shipping-items[_ngcontent-%COMP%]{font-weight:600;font-size:14px;line-height:21px;color:#38332e;text-decoration:underline;background-color:transparent;cursor:pointer}.free-shipping-msg-header[_ngcontent-%COMP%]{text-align:center;padding:8px 0;border-bottom:1px solid #ddd9d5;font-size:14px}.alcohol-font[_ngcontent-%COMP%]{color:var(--Common-Neutral-N800-BrownRegular, #2A2928);font-feature-settings:"calt" off,"liga" off;font-family:Nunito Sans;font-size:12px;font-style:normal;font-weight:400;line-height:18px}.alcohol-container[_ngcontent-%COMP%]{border-radius:8px;border:1px solid var(--Common-Alert-A500-Yellow, #F7D171);background:var(--Common-Neutral-N200-CoffeLight, #FAF9F8);display:flex;padding:12px 16px;flex-direction:column;align-items:flex-start;gap:10px;align-self:stretch}.bag-fee-wrapper-bottom[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:.5px solid #ccc;border-top:.5px solid #ccc}.bag-fee-wrapper[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:.5px solid #ccc}.gift-label-cart[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-poppins, Poppins);font-size:var(--pds-global-font-size-heading-XS, 16px);font-style:normal;font-weight:500;line-height:130%;display:inline-block}.gift-reciever[_ngcontent-%COMP%]{color:var(--pds-theme-color-foreground-neutral_high, #1F1E1E);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");font-size:var(--pds-global-font-size-text-M, 14px);font-style:normal;font-weight:600;line-height:145%;padding-left:2.2em}.gift-image-cart[_ngcontent-%COMP%]{width:20.43px;
1height:23.999px}.gift-new-label[_ngcontent-%COMP%]{display:flex;width:46px;height:22px;padding:var(--pds-global-space-100, 4px) var(--pds-global-space-200, 8px);justify-content:center;align-items:center;gap:var(--pds-global-space-100, 4px);border-radius:var(--pds-global-border_radius-100, 4px);background:var(--pds-global-color-general-green-50, #1E8B5F)!important;color:#fff;font-weight:400;font-size:var(--pds-global-font-size-text-S, 12px);font-family:var(--pds-global-font-family-nunito_sans, "Nunito Sans");line-height:14.4px}.gift-link-cart[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.gifting-container-cart[_ngcontent-%COMP%]{display:flex;height:4em;padding-left:32px!important;align-items:center;border-top:var(--pds-global-border_width-100, 1px) solid var(--pds-theme-color-outline-neutral_low, #E5E4E3);border-right:var(--pds-global-border_width-0, 0px) solid var(--pds-theme-color-outline-neutral_low, #E5E4E3);border-bottom:var(--pds-global-border_width-100, 1px) solid var(--pds-theme-color-outline-neutral_low, #E5E4E3);border-left:var(--pds-global-border_width-0, 0px) solid var(--pds-theme-color-outline-neutral_low, #E5E4E3);background:var(--pds-theme-color-background-baseline, #FFF);cursor:pointer}.waived-service-fee[_ngcontent-%COMP%]{color:#2c7437}.gift-image-wrapper[_ngcontent-%COMP%]{padding:16px 0;height:55px}#shopamigos-logo-only[_ngcontent-%COMP%], #shopmarketstreet-logo-only[_ngcontent-%COMP%], #shopunitedsupermarkets-logo-only[_ngcontent-%COMP%], #shopalbertsonsmarket-logo-only[_ngcontent-%COMP%]{height:40px}']})}}return e})(),ane=(()=>{class e{constructor(e){this.hostElement=e,this.timeoutDelay=50,this.preventAutoFocus=!1,this.adaFlag=!1,this.ClearAda=!0,this.KEYCODE_TAB=9,this.returnFocus=function(){}}ngOnInit(){this.setMobileFocusLoop(this.hostElement.nativeElement.parentElement),this.preventAutoFocus||setTimeout((()=>{$(this.hostElement.nativeElement).find('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])').first()[0].focus()}),this.timeoutDelay)}ngOnDestroy(){this.removeMobileFocusLoop(),this.returnFocus()}onKeyDown(e){if("Tab"===e.key||e.keyCode===this.KEYCODE_TAB){let t=this.hostElement.nativeElement,i=$(t).find('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),n=i.first()[0],r=i.last()[0];e.shiftKey?document.activeElement===n&&(r.focus(),e.preventDefault()):document.activeElement===r&&(n.focus(),e.preventDefault())}}keyUp(e){!this.adaFlag&&e.keyCode===this.KEYCODE_TAB&&($("p, a, b, s, span, div, td, img, input, select, button, h1,h2, h3").addClass("ada-focus"),this.adaFlag=!0)}onClick(e){this.adaFlag||this.ClearAda?($("p, a, b, s, span, div, td, img, input, select, button, h1,h2, h3").removeClass("ada-focus"),this.adaFlag=this.ClearAda=!1):$(e.target).hasClass("ada-focus")&&($("p, a, b, s, span, div, td, img, input, select, button, h1,h2, h3").removeClass("ada-focus"),this.adaFlag=!1)}setMobileFocusLoop(e){let{body:t}=document,i=e;do{let e=i.parentElement.children;for(let t=0;t<e.length;t++){let n=e[t];n!==i&&n.setAttribute&&"SCRIPT"!==n.nodeName&&"STYLE"!==n.nodeName&&(n.setAttribute("data-old-aria-hidden",n.getAttribute("aria-hidden")||"null"),n.setAttribute("aria-hidden","true"))}i=i.parentElement}while(i!==t)}removeMobileFocusLoop(){let e=document.querySelectorAll("[data-old-aria-hidden]");for(let t=0;t<e.length;t++){let i=e[t],n=i.getAttribute("data-old-aria-hidden");"null"===n?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",n),i.removeAttribute("data-old-aria-hidden")}}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵdir=ts({type:e,selectors:[["","mcTrapFocusDirective",""]],hostBindings:function(e,t){1&e&&jf("keydown",(function(e){return t.onKeyDown(e)}))("keyup",(function(e){return t.keyUp(e)}))("click",(function(e){return t.onClick(e)}),!1,od)},inputs:{returnFocus:"returnFocus",timeoutDelay:"timeoutDelay",preventAutoFocus:"preventAutoFocus"}})}}return e})(),one=(()=>{class e{constructor(e){this.host=e}ngAfterViewInit(){this.host.nativeElement.focus()}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵdir=ts({type:e,selectors:[["","mcAutofocus",""]]})}}return e})(),lne=(()=>{class e{constructor(e){this.sanitizer=e}transform(e,t){switch(t){case"html":return this.sanitizer.bypassSecurityTrustHtml(e);case"style":return this.sanitizer.bypassSecurityTrustStyle(e);case"script":return this.sanitizer.bypassSecurityTrustScript(e);case"url":return this.sanitizer.bypassSecurityTrustUrl(e);default:throw new Error(`Invalid safe type specified: ${t}`)}}static{this.ɵfac=function(t){return new(t||e)($d(mw,16))}}static{this.ɵpipe=is({name:"safe",type:e,pure:!0})}}return e})(),cne=["closeButton"],dne=(e,t,i)=>({show:e,black:t,default:i}),une=e=>[e];function pne(e,t){1&e&&(Ef(0),Tf(1,"img",7),Df())}function hne(e,t){1&e&&(Ef(0),Tf(1,"img",8),Df())}function fne(e,t){if(1&e){let e=Mf();kf(0,"button",6,0),jf("click",(function(){return Wa(e),Ha(Yf(2).close(!0))})),ph(2,pne,2,0,"ng-container",1)(3,hne,2,0,"ng-container",1),xf()}if(2&e){let e=Yf(2);gh("aria-label",e.snackbarLabel),Vd(2),zh("ngIf","black"===(null==e.snackBarData?null:e.snackBarData.theme)),Vd(),zh("ngIf","white"===(null==e.snackBarData?null:e.snackBarData.theme))}}function mne(e,t){1&e&&(Ef(0),Tf(1,"img",9),Df())}function gne(e,t){1&e&&(Ef(0),Tf(1,"img",10),Df())}function bne(e,t){if(1&e&&(Ef(0),Tf(1,"img",11),Df()),2&e){let e=Yf(2);Vd(),Zf("src","/erums/cart/dist/assets/images/","black"===(null==e.snackBarData?null:e.snackBarData.theme)?"error-rounded":"error",".svg",id)}}function yne(e,t){1&e&&(Ef(0),Tf(1,"img",12),Df())}function vne(e,t){1&e&&(Ef(0),Tf(1,"img",13),Df())}function wne(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"a",15),jf("click",(function(t){Wa(e);let i=Yf(2);return Ha(i.triggerAction(null==i.snackBarData?null:i.snackBarData.actionType,t))})),am(2,"Undo"),xf()()}}function _ne(e,t){if(1&e&&(Ef(0),kf(1,"div",2),ph(2,fne,4,3,"button",3),kf(3,"span"),ph(4,mne,2,0,"ng-container",1)(5,gne,2,0,"ng-container",1)(6,bne,2,2,"ng-container",1)(7,yne,2,0,"ng-container",1)(8,vne,2,0,"ng-container",1),Tf(9,"p",4),qm(10,"s
1afe"),ph(11,wne,3,0,"div",5),xf()(),Df()),2&e){let e=Yf();Vd(),zh("preventAutoFocus",!0)("ngClass",Mm(15,dne,e.showSnackBar,"black"===(null==e.snackBarData?null:e.snackBarData.theme),"white"===(null==e.snackBarData?null:e.snackBarData.theme)))("ngStyle",e.snackbarStyles),Vd(),zh("ngIf",null==e.snackBarData?null:e.snackBarData.closeOption),Vd(2),zh("ngIf","warning"===(null==e.snackBarData?null:e.snackBarData.type)),Vd(),zh("ngIf","success"===(null==e.snackBarData?null:e.snackBarData.type)),Vd(),zh("ngIf","error"===(null==e.snackBarData?null:e.snackBarData.type)),Vd(),zh("ngIf","gift-cart-success"===(null==e.snackBarData?null:e.snackBarData.type)),Vd(),zh("ngIf","gift-cart-error"===(null==e.snackBarData?null:e.snackBarData.type)),Vd(),zh("ngClass",Om(19,une,e.showSnackBar?"d-block":"d-none"))("innerHtml",jm(10,12,e.snackBarBody,"html"),ed),Vd(2),zh("ngIf","undo-remove-item"===(null==e.snackBarData?null:e.snackBarData.actionType)&&!(null!=e.snackBarData&&e.snackBarData.hideAction))}}var Sne=(()=>{class e{set closeButton(e){e&&e.nativeElement?.focus()}constructor(e){this.snackBarService=e,this.snackBarBody="",this.$destroyed=new kt,this.$removeClickEL=new kt,this.snackbarStyles={},this.close=(e=!1)=>{this.showSnackBar=!1,this.$removeClickEL.next(!0),e&&"undo-remove-item"===this.snackBarData.actionType&&(this.trackAnalytics("undo-close"),this.triggerAction("cancel-undo-remove-action"))},this.closeSnackBarOnEvent=e=>{!document.getElementById("mc-snackbar")?.contains(e.target)&&!0===this.showSnackBar&&this.close()}}ngOnInit(){this.snackBarService.snackBar.pipe(un(this.$destroyed)).subscribe((e=>{if(e.closeOnClick&&1==e.closeOnClick){let e=Li(document,"click"),t=Li(document,"keyup");Li(document,"touchend").pipe(bi((e=>e)),un(this.$removeClickEL)).subscribe((e=>{this.closeSnackBarOnEvent(e)})),e.pipe(bi((e=>e)),un(this.$removeClickEL)).subscribe((e=>{this.closeSnackBarOnEvent(e)})),t.pipe(bi((e=>e)),un(this.$removeClickEL)).subscribe((e=>{this.closeSnackBarOnEvent(e)}))}this.snackBarData=e,this.snackBarBody=e&&e.message?e.message:"",this.showSnackBar=!!e.show&&e.show,e.actionType,this.snackbarStyles=window.innerWidth<767?{bottom:e.bottomVH}:{top:e.topVH,right:e.rightVH,left:"auto"},this.snackBarData.isAlwaysVisible||setInterval((()=>{this.close()}),8e3)})),this.snackBarService.closeSnackBar.pipe(un(this.$destroyed)).subscribe((e=>{e&&this.close()}))}closeSnackBar(){!0===this.showSnackBar&&this.close()}triggerAction(e,t){t?.stopPropagation(),this.snackBarService.snackBarEventEmitter$.next({type:e}),"undo-remove-item"===e&&this.trackAnalytics("undo")}trackAnalytics(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setLinkClickEvents("mini-cart:"+e)}get snackbarLabel(){return this.snackBarBody?`${this.snackBarBody} , Close`:"Close"}ngOnDestroy(){this.$destroyed.next(!0),this.$destroyed.complete(),this.$removeClickEL.next(!0),this.$removeClickEL.complete()}static{this.ɵfac=function(t){return new(t||e)($d(K7))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-mini-cart-snack-bar"]],viewQuery:function(e,t){if(1&e&&tm(cne,5),2&e){let e;im(e=nm())&&(t.closeButton=e.first)}},decls:1,vars:1,consts:[["closeButton",""],[4,"ngIf"],["mcTrapFocusDirective","","id","mc-snackbar",3,"preventAutoFocus","ngClass","ngStyle"],["id","close-button-top","mcAutofocus","","type","button","class","close",3,"click",4,"ngIf"],["id","snackbar-info","role","alert","aria-live","assertive",1,"message","text-left","content-spacing","fs-16","mb-1","font-weight-bold",3,"ngClass","innerHtml"],["class","text-left content-spacing",4,"ngIf"],["id","close-button-top","mcAutofocus","","type","button",1,"close",3,"click"],["src","/erums/cart/dist/assets/images/close_white_icon.svg","alt","","tabindex","-1"],["src","/erums/cart/dist/assets/images/close_cross.svg","alt","","tabindex","-1",2,"height","15px","margin-top","4px","margin-right","4px"],["role","img","attr.aria-label","Warning","aria-hidden","true","src","/erums/cart/dist/assets/images/warning.svg",1,"tooltip-link","pb-1","float-left","mt-2"],["role","img","attr.aria-label","success","aria-hidden","true","src","/erums/cart/dist/assets/images/success-circle.svg",1,"tooltip-link","pb-1","float-left","mt-2","ml-1"],["role","img","attr.aria-label","error","aria-hidden","true",1,"tooltip-link","pb-1","float-left","mt-1","ml-1",3,"src"],["role","img","attr.aria-label","success","aria-hidden","true","src","/erums/cart/dist/assets/images/success-circle-transparent-tick.svg",1,"tooltip-link","pb-1","float-left","ml-1"],["role","img","attr.aria-label","error","aria-hidden","true","src","/erums/cart/dist/assets/images/error-minus-sign.svg",1,"tooltip-link","pb-1","float-left","mt-1","ml-1"],[1,"text-left","content-spacing"],["id","snackbar-action-undo","role","link","tabindex","0","href","javascript:void(0);",1,"action-type",3,"click"]],template:function(e,t){1&e&&ph(0,_ne,12,21,"ng-container",1),2&e&&zh("ngIf",t.showSnackBar)}
1,dependencies:[sy,cy,gy,ane,one,lne],styles:["#mc-snackbar[_ngcontent-%COMP%]{visibility:hidden;opacity:0;width:500px;height:auto;margin-top:-10px;text-align:center;border-radius:8px;box-shadow:0 4px 9px #00000080;padding:10px;position:fixed;z-index:9999;transition:visibility .5s,opacity .5s,top .5s;-webkit-transition:visibility .5s,opacity .5s,top .5s}#mc-snackbar[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{display:flex}#mc-snackbar[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{opacity:1!important;z-index:9999;position:absolute;right:10px;float:none;top:10px}#mc-snackbar[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{width:265px;text-overflow:ellipsis;overflow:hidden}#mc-snackbar[_ngcontent-%COMP%] .action-type[_ngcontent-%COMP%]{cursor:pointer;font-size:14px;line-height:21px;text-decoration:underline}#mc-snackbar[_ngcontent-%COMP%] .content-spacing[_ngcontent-%COMP%]{margin-left:36px!important}#mc-snackbar.black[_ngcontent-%COMP%]{background-color:#4b4b4b;color:#fff;width:350px}#mc-snackbar.black[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{font-size:14px;font-weight:400!important;line-height:21px;padding:0!important}#mc-snackbar.black[_ngcontent-%COMP%] .action-type[_ngcontent-%COMP%]{color:#fff}#mc-snackbar.default[_ngcontent-%COMP%]{background-color:#fff;color:#4b4b4b;top:0vh}@media (max-width: 400px){#mc-snackbar[_ngcontent-%COMP%]{width:250px}#mc-snackbar[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{width:180px}}@media (min-width: 768px) and (max-width: 992px){#mc-snackbar[_ngcontent-%COMP%]{width:440px}}@media (max-width: 767px){#mc-snackbar[_ngcontent-%COMP%]{width:304px;height:auto;left:50%;transform:translate(-50%)}}#mc-snackbar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus, #mc-snackbar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{outline:2px solid #fff!important}#mc-snackbar.show[_ngcontent-%COMP%]{visibility:visible;opacity:1;z-index:9999}"]})}}return e})(),Cne=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[Q7,J7,X7,y9,{provide:"environment",useValue:q7}],imports:[uC,Ly,JT,i_,V7]})}}return e})();Em(A8,[oy,cy,gy,XA,jk,OT,U7,sne,Sne],[By]);var Ine=(()=>{class e{constructor(e,t,i,n){this._commonService=e,this._appConfigService=t,this._cartService=i,this._cartV2Service=n,this.customerId="",this.storeId="",this.banner="",this.token="",this.zipCode="",this.serviceType="",this.editOrderFlag=!1}ngOnInit(){this.editOrderFlag=window.AB.COMMON.checkPendingOrder(),this.editOrderFlag?this.storeId=window.AB.COMMON.getCookie("OrderStoreId"):this.storeId=window.AB.userInfo.branchId,this.zipCode=window.AB.userInfo.zipcode,this.serviceType=window.AB.userInfo.preferenceMode.toLowerCase(),this.banner=window.AB.userInfo.banner,this.token=window.AB.userInfo.SWY_SHOP_TOKEN,this.customerId=window.AB.userInfo.customerId}getChannel(){return window.AB.COMMON&&window.AB.COMMON.getUserChannel?window.AB.COMMON.getUserChannel():""}onMiniCartEvent(e){if(console.warn("onMiniCartEvent"),console.warn(e),e&&e.details&&"couponDetails"==e.cartEvent){let t={},i=!1;e.details.product&&(i="M"===e.details.product.promoType||"B"===e.details.product.promoType),i?t={configObj:{programType:e.details.programType},type:"bogo-detail",product:e.details.product,triggeredElement:"mini-cart"}:(e.details.coupon.offerId||(e.details.coupon.offerId=e.details.coupon.omsOfferId),e.details.coupon.offerPgm||(e.details.coupon.offerPgm=e.details.coupon.offerProgram),t={configObj:{programType:e.details.programType},type:"offer-detail",coupon:e.details.coupon,product:e.details.product,triggeredElement:"mini-cart"}),this._commonService.rightDrawerSource.next(t)}}onCartUpdateEvent(e){console.warn("onCartUpdateEvent"),console.warn(e);let t=this._cartV2Service.transformMulticartResponse(e);this._cartService._set(t),this._cartService._loadCartPrice()}onCloseEvent(e){!0===e&&(window.rightDrawerComp.closeDrawer(),document.getElementById("abCart")?.focus())}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(hP),$d(Rw),$d(Mw))}}static{this.ɵcmp=Qr({type:e,selectors:[["mini-cart-wrapper"]],decls:2,vars:7,consts:[[1,"mini-cart-wrapper"],[3,"miniCartEvent","closeMiniCartEvent","cartUpdateEvent","enableCloseButton","customerId","storeId","token","banner","zipCode","serviceType"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"mini-cart-container",1),jf("miniCartEvent",(function(e){return t.onMiniCartEvent(e)}))("closeMiniCartEvent",(function(e){return t.onCloseEvent(e)}
1))("cartUpdateEvent",(function(e){return t.onCartUpdateEvent(e)})),xf()()),2&e&&(Vd(),zh("enableCloseButton",!1)("customerId",t.customerId)("storeId",t.storeId)("token",t.token)("banner",t.banner)("zipCode",t.zipCode)("serviceType",t.serviceType))},dependencies:[A8],encapsulation:2})}}return e})(),Ane=(()=>{class e{constructor(e){this._http=e,this.departmentSource=new Tt([]),this.currentDepartment=this.departmentSource.asObservable(),this.brandSource=new Tt([]),this.currentBrand=this.brandSource.asObservable(),this.filterAisleParamSource=new Tt(""),this.currentFilterAisle=this.filterAisleParamSource.asObservable(),this.filterBrandParamSource=new Tt(""),this.currentFilterBrand=this.filterBrandParamSource.asObservable(),this._departments=[],this._brands=[],this._dealsCurrentFilter=new Tt(null),this.dealsCurrentFilter$=this._dealsCurrentFilter.asObservable(),this.objDeals={isDeals:"",apiKey:""}}addDepartment(e){let t=encodeURIComponent(e);if(0==this.isExist(this._departments,t).length){var i={query:t,text:e};this._departments.push(i),this.departmentSource.next(this._departments)}}addBrand(e){var t=encodeURIComponent(e);if(0==this.isExist(this._brands,t).length){var i={query:t,text:e};this._brands.push(i),this.brandSource.next(this._brands)}}isExist(e,t){return e.filter((function(e){return e.query.toLowerCase().indexOf(t.toLowerCase())>-1}))}addFilterAisleParam(e){this.filterAisleParamSource.next(e)}addFilterBrandParam(e){this.filterBrandParamSource.next(e)}getDealsDepartments(){if("c-bogo"==this.objDeals.isDeals||"c-club-card"==this.objDeals.isDeals){let e={headers:new jy({"ocp-apim-subscription-key":window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey})},t=window.SWY.CONFIGSERVICE.catalogConfig["apim.api.catalog.path"]+window.SWY.CONFIGSERVICE.catalogConfig["apim.api.catalog.departments.endpoint"]+"?key="+this.objDeals.apiKey+"&storeId="+window.AB.userInfo.branchId;return this._http.get(t,e)}{let e=window.AB.dealsFilter+"?key="+window.AB.productGridPage+"&storeId="+window.AB.userInfo.branchId;return this._http.get(e)}}setCurrentFilterDeals(e){e&&(e=e.replace(/& |,/g,"").replace(/ /g,"-"),this._dealsCurrentFilter.next(e))}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),kne=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._appConfigService=t,this._productFilterService=i,this._featureFlagService=n,this._commonService=r,this.config=Iw,this.currentEnv="",this.httpOptions={headers:new jy({"ocp-apim-subscription-key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})},this.currentEnv=this._commonService.getCurrentEnviorment()}getCatalogXapiProductPrice(e){let t=`${window.AB.catalogXapiProductsBpnEndpoint}?store-id=${window.AB.userInfo.branchId}&includeOffer=true&bpn=${e}`;return this._http.get(t,this.httpOptions)}getCatalogXapiProductPriceByUPC(e,t,i,n,r,s,a,o,l){let c,d=`${window.AB.catalogXapiProductsUpcEndpoint}?upc=${e}&banner=${window.AB.userInfo.banner}&includeOffer=true`;if(t&&(d=`${d}&guest=${t}`),i){d=`${d}&hhid=${window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:""}`}return n&&(d=this._appConfigService.generateCBAUrl(d)),s&&(d=`${d}&seller-id=${s}`),r&&(d=`${d}&sellerId=${r}`),a?(c=window.AB.userInfo.wfcStoreId,d=`${d}&channel=shipping&pgm=wineshop`):window.AB.userInfo.branchId&&(c=window.AB.userInfo.branchId),o&&l&&(d=`${d}&${o}=${l}`),c?(d=`${d}&store-id=${c}`,this._http.get(this._appConfigService.generateFinalApiUrl(d),this.httpOptions)):fi({})}getCatalogXapiProductPriceByBpn(e,t,i,n,r,s,a,o,l,c){let d,u=`${window.AB.catalogXapiProductsBpnEndpoint}?bpn=${e}&banner=${window.AB.userInfo.banner}&includeOffer=true`;return t&&(u=`${u}&guest=${t}`),i&&window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId&&(u=`${u}&hhid=${window.AB.userInfo.houseId}
1`),n&&!a&&(u=this._appConfigService.generateCBAUrl(u)),s&&(u=`${u}&seller-id=${s}`),r&&(u=`${u}&sellerId=${r}`),a?(d=window.AB.userInfo.wfcStoreId,u=`${u}&channel=shipping&pgm=wineshop`):window.AB.userInfo.branchId&&(d=window.AB.userInfo.branchId),"1P_B2B"===o?.programType&&(u=`${u}&pgm=${o.programType}`),l&&c&&(u=`${u}&${l}=${c}`),d?(u=`${u}&store-id=${d}`,this._http.get(this._appConfigService.generateFinalApiUrl(u),this.httpOptions)):fi({})}getCatalogData(e,t){let i="",n="",r=window.AB.userInfo||{},{banner:s="",branchId:a="",houseId:o=""}=r;switch(e.apiType){case"c-bogo":case"c-club-card":return this._productFilterService.dealsCurrentFilter$.pipe(bi((e=>e)),qi((e=>!!e)),Ti((t=>{let r=fi({ack:!0,response:{docs:[]}});if("no-filters"!==t){let s="c-bogo"===e.apiType?"bogo":"clubcard";n=e.apiUrl+"?departmentName="+t+"&key="+s+"&storeId="+window.AB.userInfo.branchId,i=this._appConfigService.generateCBAUrl(n),r=this._http.get(i,this.httpOptions).pipe($i((()=>fi({ack:!0,response:{docs:[]}}))))}return r})));case"c-virtual-shelf-general":case"c-virtual-shelf-promo":let r=e.value[e.apiType].virtualShelfId;return n=e.apiUrl+"?storeId="+window.AB.userInfo.branchId+"&virtualShelfId="+r+`&banner=${s}&page=0&pageSize=999`,e.badgePreference&&e.badgeList&&(n=`${n}&${e.badgePreference}=${e.badgeList}`),i=this._appConfigService.generateCBAUrl(n),this._http.get(i,this.httpOptions);case"c-products-by-upc":case"c-products-by-upc-drawer":let l=window.AB.userInfo.branchId;return this._appConfigService.$upcs.pipe(Hi(1),Ti((t=>{if(t.length>0){let i=window.AB.COMMON.getUserChannel(),n=window.AB.userInfo.banner,r={ids:t,storeId:l,banner:n},s=i?f(h({},r),{channel:i}):r;return e.badgePreference&&e.badgeList&&(s[e.badgePreference]=e.badgeList),this._http.post(e.apiUrl,s,this.httpOptions).pipe($i((()=>fi({ack:!0,response:{docs:[]}}))))}return fi({ack:!0,response:{docs:[]}})})));case"c-recently-viewed":let c=this.config[this.currentEnv]?.productsApiDetails,d=this.config[this.currentEnv].catalogConfig["apim.api.catalog.path"],u=`/catalog-deals/recentlyViewed?storeId=${a}&hid=${o}&banner=${s}&channel=${window.AB.COMMON.getUserChannel()}&request-id=${Math.floor(1e13*Math.random())}&pageSize=32&viewAll=true${t?`&afterKey=${t}`:"&refresh=true"}`;i=d+u;let p=window.AB.userInfo.SWY_SHOP_TOKEN,m={headers:new jy({"ocp-apim-subscription-key":c?.subscriptionKey?.value,Authorization:"Bearer "+p})};return this._http.get(i,m).pipe(bi((e=>{let t=e.response;return{products:t?.docs??[],ack:!1,offers:t?.offersData||{},sortable:t?.sortable,facets:t?.facets,nextPageToken:t?.pagination?.afterKey||""}})),$i((()=>fi({products:[],ack:!1}))))}}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(Ane),lr(uP),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),xne=(()=>{class e{constructor(e,t,i){this._http=e,this._appConfigService=t,this._featureFlagService=i,this._orderDateMap={1:"",3:"",6:"",9:"",13:""},this.disableBiaLpExcludeCart=this._featureFlagService.disableBiaLpExcludeCart(),this.selectedFacets=[],this.facets={},this._facets=new kt,this.facets$=this._facets.asObservable(),this._selectedFacets=new Tt([]),this.selectedFacets$=this._selectedFacets.asObservable(),this._sortRules=new Tt({}),this.sortRules$=this._sortRules.asObservable(),this._showAddAllItems=new kt,this.showAddAllItems$=this._showAddAllItems.asObservable(),this._resetRadioFacet=new Tt({}),this.resetRadioFacet$=this._resetRadioFacet.asObservable(),this._selectedDept=new Tt({}),this.selectedDept$=this._selectedDept.asObservable(),this._currentSort=new kt,this.currentSort$=this._currentSort.asObservable(),this._errorOnRequest=new Tt(!1),this.errorOnRequest$=this._errorOnRequest.asObservable(),this._facetsApiResponse=new Tt({facets:{dept:[],max_maxdt:"",max_strdt:"",max_onldt:"",purchaseType:[]}}),this._startDateByPurchaseType={all:"max_maxdt",store:"max_strdt",online:"max_onldt"},this.facetsApiResponse$=this._facetsApiResponse.asObservable(),this.pageSize=8,this.getBiaFacets=(e,t)=>{let i=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],n=window.AB.userInfo.SWY_SHOP_TOKEN,r=window.AB.userInfo.houseId,s={headers:new jy({"ocp-apim-subscription-key":i,Authorization:`Bearer ${n}`,accept:"application/json"})};return window.AB.COMMON.isB2BSite()&&(s.headers=s.headers.set("pgm","1P_B2B")),e=`${e}${r}`,e+="?version=v2",this._http.get(e,s).pipe(hn((e=>this._facetsApiResponse.next(e))),$i((()=>(this._errorOnRequest.next(!0),fi({facets:{dept:[],max_maxdt:"",max_strdt:"",max_onldt:"",purchaseType:["STORE","ONLINE"]}})))))},this.getBiaProducts=e=>{let t=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],i=window.AB.userInfo.SWY_SHOP_TOKEN,n={headers:new jy({"ocp-apim-subscription-key":t,Authorization:`Bearer ${i}`,accept:"application/json"})};window.AB.COMMON.isB2BSite()&&(n.headers=n.headers.set("pgm","1P_B2B"));let r=e.apiUrl,s=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:"",o=e.value;r=`${r}/${a}?storeId=${s}`;let l=o.sortRule;return l&&l.field&&(r+=`&sortBy=${l.field}`),void 0!==o.pageNumber&&""!==o.pageNumber&&(r+=`&pageNo=${o.pageNumber}`),r+=`&pageSize=${o.pageSize}`,o.category.length>0&&(r+=`&dept=${o.category}`),o.purchaseType?(r+=`&purchaseType=${o.purchaseType}`,"lastOrder"==window.AB.COMMON.getURLParameterByName("orderPeriod")?""!==window.AB.COMMON.getURLParameterByName("orderDate")?r+=`&startDate=${window.AB.COMMON.getURLParameterByName("orderDate")}`:"store"==o.purchaseType.toLowerCase()?r+=`&startDate=${this._facetsApiResponse.value.facets[this._startDateByPurchaseType.store]}`:"online"==o.purchaseType.toLowerCase()&&(r+=`&startDate=${this._facetsApiResponse.value.facets[this._startDateByPurchaseType.online]}`):o.orderDate&&(r+=`&startDate=${o.orderDate}`)):"lastOrder"==window.AB.COMMON.getURLParameterByName("orderPeriod")?""!==window.AB.COMMON.getURLParameterByName("orderDate")?r+=`&startDate=${window.AB.COMMON.getURLParameterByName("orderDate")}`:r+=`&startDate=${this._facetsApiResponse.value.facets[this._startDateByPurchaseType.all]}`:o.orderDate&&(r+=`&startDate=${o.orderDate}`),r+="&availabilityCheck=false",l||(r+="&version=v2"),r+=`&banner=${window.AB.userInfo.banner}`,void 0!==o.includeOffer&&(r+=`&includeOffer=${o.includeOffer}`),this.disableBiaLpExcludeCart?r+="&excludeCartItems=false":r+="&excludeCartItems=true",this._errorOnRequest.next(!1),this._http.get(r,n).pipe($i((()=>(this._errorOnRequest.next(!0),fi({purchases:null,purchasesCount:0})))))},this.getInstantCartProducts=e=>{let t=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],i=window.AB.userInfo.SWY_SHOP_TOKEN,n={headers:new jy({"ocp-apim-subscription-key":t,Authorization:`Bearer ${i}`,accept:"application/json"})};window.AB.COMMON.isB2BSite()&&(n.headers=n.headers.set("pgm","1P_B2B"));let r=e.apiUrl,s=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:"",o=e.value;r=`${r}/${a}?availabilityCheck=true&storeId=${s}`;let l=o.sortRule;l&&l.field&&(r+=`&sortBy=${l.field}`),r+=`&pageNo=${o.pageNumber}&pageSize=50`;let c=o?.excludeCartItems;return r+=null==c?"&excludeCartItems=true":`&excludeCartItems=${c}`,r+="&placement=webquickadd",r=this._appConfigService.generateCBAUrl(r),this._http.get(r,n).pipe($i((()=>fi({purchases:null,purchasesCount:0}))))},this.facetOnClick=e=>{this._selectedFacets.next(e),this._facets.next(e)},this.setSelectedFacets=e=>{this.selectedFacets=e},this.getOrderDates=()=>this._orderDateMap,this.setSortRules=()=>{this._sortRules.next({triggerSortSubscribe:!1,sortRules:[{field:"FREQUENCY",label:"Frequently Purchased",selected:!0,rule:null,sort_at:"server",key:"FREQUENCY"},{field:"PURCHASE_DATE",label:"Purchase Date",selected:!1,rule:null,sort_at:"server",key:"PURCHASE_DATE"}]})},this.closeInMobile=()=>{$(".main-wrapper.www-wrapper").show(),$("buy-it-again-facets").appendTo(".buy-it-again-facets.section"),$(".facets-master-wrapper").addClass("show-filter"),setTimeout((()=>{$("#filterMV").focus()}),100)},this.showTheModal=()=>{$(".main-wrapper.www-wrapper").hide(),$("buy-it-again-facets").appendTo("body"),$(".facets-master-wrapper").removeClass("show-filter"),setTimeout((()=>{$("#filterTitle").focus()}),100)},this._setOrderDates=()=>{let e=new Date;this._orderDateMap[1]=(new Date).setMonth(e.getMonth()-1),this._orderDateMap[3]=(new Date).setMonth(e.getMonth()-3),this._orderDateMap[6]=(new Date).setMonth(e.getMonth()-6),this._orderDateMap[9]=(new Date).setMonth(e.getMonth()-9),this._orderDateMap[13]=(new Date).setMonth(e.getMonth()-13)},this._setOrderDates()}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}_showSignInModal(){window.AB.COMMON.showSignInModal_OTP(window.location.href)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Tne=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._appConfigService=t,this._productFilterService=i,this._productCatalogService=n,this._buyItAgainService=r,this.defaultNoResultsMsg="No products available.",this.objGridData={drivenType:"",apiUrl:"",apiType:"",sorts:"",defaultSort:"",value:{},products:[],widgetId:"",badgePreference:"",badgeList:""}}getData(){return this.hasDynamicData()?this.getDynamicData():this.hasStaticData()?this.get
1StaticData():void 0}getDynamicData(){let e=fi([]);switch(this.objGridData.drivenType){case"catalog":e=this._productCatalogService.getCatalogData(this.objGridData);break;case"purchase":e=this.getPurchaseData(this.objGridData);break;case"relevancy":e=this.getRelevancyData();break;default:e=this.getDotNetData()}return e}getRelevancyData(){let e,t,i,n,r,s=fi({}),a="",o="https://www.safeway.com/abs/pub/xapi";switch(!0){case"similar-products"===this.objGridData.apiType:e=window.AB.COMMON.getURLParameterByName("bpn"),i=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=`${o}/pdreco/similarproducts?bpn=${e}&storeId=${i}`,r={headers:new jy({"Ocp-Apim-Subscription-Key":"7bad9afbb87043b28519c4443106db06",accept:"application/json"})};break;case"substitution"===this.objGridData.apiType:e=window.AB.COMMON.getURLParameterByName("bpn"),t=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId&&window.AB.COMMON.getURLParameterByName("hhid")?window.AB.COMMON.getURLParameterByName("hhid"):"",i=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=`${o}/pdreco/substitution?bpn=${e}&storeId=${i}&hhid=${t}`,r={headers:new jy({"Ocp-Apim-Subscription-Key":"7bad9afbb87043b28519c4443106db06",accept:"application/json"})};break;case!!this.objGridData.widgetId&&!!this.objGridData.apiType:let s=window.AB.COMMON.getURLParameterByName("query"),l=window.AB.COMMON.getURLParameterByName("item_ids");a="https://pathways.dxpapi.com/api/v2/widgets/"+this.objGridData.apiType+"/"+this.objGridData.widgetId+"?_br_uid_2=uid%3D2582397584083%3Av%3D12.0%3Ats%3D1587279462499%3Ahc%3D358&account_id=6175&url=www.bloomique.com&domain_key=albertsons&request_id=1597706996821&fields=name%2CaisleId%2Cpid%2Cupc%2Cprice%2CbasePrice%2CpricePer%2Cquantity%2CquantityOrder%2CunitOfMeasure%2CpromoDescription%2CsalesRank%2CdepartmentName%2CpromoType%2CpromoTitle%2CpromoText%2CofferText%2CpromoEndDate%2CrestrictedValue&rows=30&start=0&query="+s+"&item_ids="+l,n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":"e914eec9448c4d5eb672debf5011cf8f",Authorization:"Bearer "+n,accept:"application/json"})};break;default:e=window.AB.COMMON.getURLParameterByName("bpn"),a="https://www.safeway.com/api/v1/core/Search_Results?account_id=6175&auth_key=eyxny75nafpl1ra4&domain_key=albertsons&request_id=8913801407865&_br_uid_2=uid%253D4195525208755%253Av%253D12.0%253Ats%253D1602201845750%253Ahc%253D90&url=https://www.safeway.com&ref_url=https://www.safeway.com&request_type=mlt&fl=name,aisleId,pid,upc,price,basePrice,pricePer,quantity,quantityOrder,unitOfMeasure,promoDescription,salesRank,departmentName,promoType,promoTitle,promoText,offerText,promoEndDate,restrictedValue,unitQuantity,displayEstimateText,displayUnitQuantityText&rows=12&start=0&sort=&view_id=1502&pid="+e+"&facet=false",n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":"e914eec9448c4d5eb672debf5011cf8f",Authorization:"Bearer "+n,accept:"application/json"})}}return s=this._http.get(a,r).pipe($i((()=>fi({purchases:null,purchasesCount:0})))),s}getPurchaseData(e){let t=fi({}),i=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":i,Authorization:"Bearer "+n,accept:"application/json"})},s=e.apiUrl,a=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"";if("buy-it-again"===e.apiType)t=this._buyItAgainService.getBiaProducts(this.objGridData);else{s=`${s}/${window.AB&&window.AB.userInfo&&window.AB.userInfo.customerId?window.AB.userInfo.customerId:""}?storeId=${a}`,s=this._appConfigService.generateCBAUrl(s),t=this._http.get(s,r).pipe($i((()=>fi({purchases:null,purchasesCount:0}))))}return t}getDotNetData(){let e=window.AB.gridDataURL;switch(this.objGridData.drivenType){case"erumslastorder":let t=window.SWY.CONFIGSERVICE.erumsConfig["orders.service.endpoint"]+"/orders/latest";return this._http.get(t,{headers:new jy(window.AB.lastOrderErumsHttpOptions)}).pipe($i((()=>fi({ack:!0,products:[]}))));case"search":return e=this._replaceSearchValue(e)+"&storeId="+window.AB.userInfo.branchId,this._http.get(e);case"bogo":case"rewardcard":return this._productFilterService.dealsCurrentFilter$.pipe(bi((e=>e)),qi((e=>!!e)),Ti((i=>{let n=fi({ack:!0,products:[]});return"no-filters"!==i&&(t=e+"&value="+i+"&storeId="+window.AB.userInfo.branchId,n=this._http.get(t).pipe($i((()=>fi({ack:!0,products:[]}))))),n})));case"promo":case"recipe":case"dynamicpromo":return e+="&storeId="+window.AB.userInfo.branchId,this._http.get(e);case"historylist":let i=Math.floor(1e6*Math.random());return e+="&rand="+i+"&storeId="+window.AB.userInfo.branchId,this._http.get(e).pipe($i((()=>fi({ack:!0,products:[]}))));default:return this._http.get(e)}}getAllBrands(){let e=this._replaceSearchValue(window.AB.gridDataURLNoParam);return this._http.get(e)}getStaticData(){return fi({products:this.objGridData.products})}getUpdatedData(e){null!=e&&(e=e.slice(0,-2));let t=window.AB.aemAislePath+"?aisleId="+e+"&storeId="+window.AB.userInfo.branchId;return $((function(){window.AB.DATALAYER.productInfo({aisleId:e})})),this._http.get(t)}doMapLink(e,t){e?.forEach((e=>{let i=t.find((t=>t.id===e.id));i?Object.assign(e,i):e.price=0}))}hasDynamicData(){return"static"!==this.objGridData.drivenType&&!(!window.AB.gridDataURL&&!this.objGridData.apiUrl&&"relevancy"!==this.objGridData.drivenType)}hasBrandUrl(){return window.AB.gridDataURLNoParam&&window.AB.gridDataURLNoParam.length}hasStaticData(){return this.objGridData.products.length>0}getNoResultsMsg(e){let t;switch(e){case"shelf-page":case"promo":case"rewardcard":case"bogo":case"catalog":case"erumslastorder":case"historylastorder":case"historylist":t=window.AB.errorText||this.defaultNoResultsMsg;break;case"search":t='<div class=\'no-result\'><div class=container\'><dl>\n <dd>Check for typos.</dd><dd>Be more general (e.g. "carrots" instead of "bags of carrots")</dd>\n <dd>Try looking within the aisles shown below</dd>\n </dl></div></div>';break;default:t="<span>No items are available.</span>"}return t}extractBrand(){let e=new gt((e=>{e.next({ack:!0}),e.complete()}
1));return this.hasBrandUrl()&&(e=this.getAllBrands()),e}areAllProductsUnavailable(e){let t=!0;return!!Array.isArray(e)&&(e.forEach((e=>{0!==e.price&&(t=!1)})),t)}_replaceSearchValue(e){let t=window.AB.COMMON.getURLParameterByName("q");null==t?t="":(t=decodeURIComponent(t),t=encodeURIComponent(t)),e=e.replace(/\(searchTerm\)/g,t);let i=window.AB.COMMON.getURLParameterByName("brand");return null==i?i="":(i=decodeURIComponent(i),i=encodeURIComponent(i)),e=e.replace(/\(searchBrand\)/g,i)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP),lr(Ane),lr(kne),lr(xne))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Pne=(()=>{class e{constructor(e){this.http=e,this.msgProdCoupV2Details=new Tt(!1),this.msgProdCoupV2Details$=this.msgProdCoupV2Details.asObservable()}getOffersClipped(e){let t=0;return e.forEach((e=>{("C"===e.status&&!1===e.deleted||!1===e.isClippable)&&t++})),t}getCouponsCompletedCounter(e){let t=0;return e.forEach((e=>{(!1===e.isClippable&&!0===e.offerComplete||"C"===e.status&&!1===e.deleted&&!0===e.offerComplete)&&t++})),t}_checkLocalStorage(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch{return!1}}isCouponExpired(e){let t=new Date,i=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),s=new Date(`${n}/${i}/${r}`),a=parseInt(e.endDate),o=new Date(a),l=o.getDate(),c=o.getMonth()+1,d=o.getFullYear();return new Date(`${c}/${l}/${d}`)<s}changeMessage(e){this.msgProdCoupV2Details.next(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Ene=(()=>{class e{constructor(e){this.http=e,this.selectedForFilteringSource=new Tt([]),this.currentFiltering=this.selectedForFilteringSource.asObservable(),this.filterResultSource=new Tt([]),this.filterResult=this.filterResultSource.asObservable(),this.loadingSpinnerSource=new Tt([]),this.loadingSpinner=this.loadingSpinnerSource.asObservable()}setNewProducts(e){return e.productsinfo}filterMultipleProducts(e,t,i){return t.filter((e=>i.includes(e.aisleId.split("1_")[1])))}setInitialProducts(e,t){return 0==t.length?t=e:t}addFilters(e){this.selectedForFilteringSource.next(e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Dne=e=>({"no-results":!0,"search-no-results":e}),One=e=>({"bia-sort":e});function Bne(e,t){if(1&e&&(kf(0,"div",6),Tf(1,"div",7)(2,"div",7),xf()),2&e){let e=Yf(2);zh("ngClass",Om(3,Dne,e.searchNoResults)),Vd(),zh("innerHTML",e.noResults,ed),Vd(),zh("innerHTML",e.aisleHTML,ed)}}function Mne(e,t){if(1&e&&(kf(0,"div",4),ph(1,Bne,3,5,"div",5),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.showGrid)}}function Rne(e,t){if(1&e){let e=Mf();kf(0,"sort-by",13),jf("activeSortRuleEmitter",(function(t){return Wa(e),Ha(Yf(2).activeSortRuleEmitter(t))})),xf()}if(2&e){let e=Yf(2);zh("sortRules",e.sortRules)("activeSortRule",e.activeSortRule)("ngClass",Om(3,One,e.biaSort))}}function Lne(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"button",15),jf("click",(function(){return Wa(e),Ha(Yf(2).loadMoreProducts("grid_button"))})),am(2,"Load more"),xf()()}}function Fne(e,t){1&e&&(kf(0,"div",16)(1,"div",17)(2,"div",18)(3,"div",19),Tf(4,"div",20),xf()()()())}function Nne(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"button",15),jf("click",(function(){return Wa(e),Ha(Yf(2).loadMoreProductsServerSide("grid_button"))})),am(2,"Load more"),xf()()}}function Une(e,t){if(1&e&&(kf(0,"div",8),ph(1,Rne,1,5,"sort-by",9),kf(2,"div",10),am(3),xf(),ph(4,Lne,3,0,"div",11)(5,Fne,5,0,"div",12)(6,Nne,3,0,"div",11),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.products.length>0&&e.hasSort&&e.loadSort()),Vd(2),lm(e.afbEvent),Vd(),zh("ngIf","loadmore"==e.component.pagination.load_type&&e.products.length<e.productsSecondary.length),Vd(),zh("ngIf",e.isServerGridLoading),Vd(),zh("ngIf",e.hasServerSideLoadMore&&!e.isServerGridLoading)}}function Vne(e,t){if(1&e){let e=Mf();kf(0,"div",21),jf("click",(function(){return Wa(e),Ha(Yf().backToTopOnClick())})),Tf(1,"div",22),xf()}}function qne(e,t){1&e&&Tf(0,"loading-spinner")}var $ne=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l,c,d,u,p){this._productGridService=e,this._sortService=t,this._productFilterService=i,this._http=n,this._dataScrollService=s,this._loaderService=a,this._buyItAgainService=o,this.appConfigService=l,this.aisleFilterLevelThreeService=c,this.elementRef=d,this._productC
1ouponService=u,this._featureFlagService=p,this.pTime=new Date,this.notAvailableDisp=["historylastorder","historylist","purchase"],this.infiniteScrollPage=1,this._isServerLoadMoreTriggered=!1,this.products=[],this.initialProducts=[],this.productsSecondary=[],this.ack=!0,this.showGrouping="mask",this.filterAisleParam="",this.filterBrandParam="",this.isFilter=!1,this.noResults="",this.displayNoResults=!1,this.aisleHTML="",this.groupByField=window.AB.headerType||"departmentName",this.currentGroupBy="",this.groupByHeadingField="",this.isGroupInit=!1,this.isAisleSort=!1,this.allowNotAvailable=!1,this.areAllProductsUnavailable=!1,this.unAttendDeliveryFlag=!1,this.afbEvent="",this.showBackToTopButton=!1,this.totalProducts=0,this.searchNoResults=!1,this.productColumnClass="col-12 col-sm-6 col-lg-4",this.productColumnClassV2="col-6 col-sm-6 col-md-3 col-lg-3 col-xl-3",this.component={},this.objGridData={drivenType:"",apiUrl:"",apiType:"",sorts:"",defaultSort:"",value:{},products:[],widgetId:""},this.triggerBy="",this.biaSort=!1,this.showAddAllItemsBtn=!1,this.arProductsArray=[],this.hasServerSideLoadMore=!1,this.isServerGridLoading=!1,this.isArEnable=!1,this.subscription=new Ye,this.enableDSTV2Theme=!1,this.enableBiaOosUi=!1,this.programType="abs",this.checkAnyProductHasArEnabled=e=>!(!e||!this.isArEnable)&&e.some((e=>e.isArProduct)),this.isThemeBuilderEnabled=!(!window.SWY.CONFIGSERVICE||!window.SWY.CONFIGSERVICE.isThemeBuilderEnabled),window.productGenericGridCompRef={zone:r,component:this};let h=this.elementRef.nativeElement,f=h&&h.attributes;this.productGridPage=f["data-driven"]?f["data-driven"].value:window.AB.productGridPage;let m=f["data-default-sorts"]?f["data-default-sorts"].value:window.AB.defaultSort;this.objGridData={drivenType:this.productGridPage,apiUrl:f["data-api-url"]&&f["data-api-url"].value,apiType:f["data-api-type"]&&f["data-api-type"].value,sorts:f["data-sorts"]&&f["data-sorts"].value,defaultSort:m,value:{},products:[],widgetId:f["data-widget-id"]&&f["data-widget-id"].value,badgePreference:f["data-badge-preferrence"]?f["data-badge-preferrence"].value:"",badgeList:f["data-badge-list"]?f["data-badge-list"]?.value:""},localStorage.setItem("productGenericGridData",JSON.stringify(this.objGridData)),this.component={pagination:{load_type:this.elementRef.nativeElement.getAttribute("data-load-type")?this.elementRef.nativeElement.getAttribute("data-load-type"):"loadmore",load_items:this._getLoadMoreItems(),infinite_type:this.elementRef.nativeElement.getAttribute("data-infinite-scroll-type")?this.elementRef.nativeElement.getAttribute("data-infinite-scroll-type"):"client",paginate_at:"buy-it-again"===this.objGridData.apiType?"server":"client",page:1}},this.triggerBy=this.productGridPage,("purchase"===this.productGridPage||"catalog"===this.productGridPage||"static"===this.productGridPage)&&(this.triggerBy=this.objGridData.apiType),this.calcTime("START"),this.showGrid=!0,this.enableDSTV2Theme=this._featureFlagService.hasPageV2Theme()}ngOnInit(){this.isThemeBuilderEnabled&&$("body").addClass("body-dst-enabled"),this.subscriptionFrmProdCoupV2=this._productCouponService.msgProdCoupV2Details$.subscribe((e=>this.msgFrmProdCoupV2=e));try{let e=this.dataValue;void 0===this.dataValue&&(e=this.elementRef.nativeElement.getAttribute("data-value")),e=e.replace(/'/g,'"'),this.objGridData.value=JSON.parse(e)}catch{}if("purchase"===("c-products-by-upc-drawer"===this.objGridData.apiType&&(this.objGridData.apiUrl=window.AB.catalogXapiProductsUpcEndpoint),"static"===this.productGridPage&&(this.objGridData.products=this.staticProducts),this.hasSort=this._sortService.hasSort(),this.sortRules=this._sortService.getSorts(),this.products=[],this.calcTime("INIT"),this.objGridData.drivenType))if("buy-it-again"===this.objGridData.apiType){this.biaSort=!0;let e={sortRule:(this._sortService.rules?this._sortService.getSortByName(this.objGridData.defaultSort):null)||this._sortService.getSortByName("FREQUENCY"),category:[],purchaseType:"",orderDate:"",pageNumber:0,pageSize:this._getLoadMoreItems()};this.objGridData.value=e,this.setBiaParams(),this._buyItAgainService.facets$.subscribe((e=>{this.objGridData.value.category=e.aisleIds.join(","),this.objGridData.value.purchaseType=e.purchaseType,this.objGridData.value.orderDate=e.orderDate,this.objGridData.value.pageNumber=0,this.products=[],this._init()})),this._buyItAgainService.showAddAllItems$.subscribe((e=>{this.showAddAllItemsBtn=e}))}this.noResults=this._productGridService.getNoResultsMsg(this.productGridPage),this.allowNotAvailable=-1!==this.notAvailableDisp.indexOf(this.productGridPage),this.productC
1olumnClass="c-products-by-upc"===this.objGridData.apiType||"offer"===this.productGridPage?"col-12 col-sm-6 col-md-4 col-lg-3":this.productColumnClass,this.productColumnClassV2="c-products-by-upc"===this.objGridData.apiType||"offer"===this.productGridPage||"c-products-by-upc-drawer"===this.objGridData.apiType||"s-bogo"===this.objGridData.apiType?"col-6 col-sm-6 col-md-3 col-lg-2 col-xl-2":this.productColumnClassV2,this.calcTime("INIT"),"rewardcard"!==this.productGridPage&&"c-club-card"!==this.objGridData.apiType&&"bogo"!==this.productGridPage&&"c-bogo"!==this.objGridData.apiType&&null!=window.AB.COMMON.getURLParameterByName("aisle")&&""!==window.AB.COMMON.getURLParameterByName("aisle")&&(this.filterAisleParam=window.AB.COMMON.getURLParameterByName("aisle"),this.filterAisleParam=decodeURIComponent(this.filterAisleParam),this.isFilter=!0,this._productFilterService.addFilterAisleParam(this.filterAisleParam)),null!=window.AB.COMMON.getURLParameterByName("brand")&&""!==window.AB.COMMON.getURLParameterByName("brand")&&(this.filterBrandParam=window.AB.COMMON.getURLParameterByName("brand"),this.filterBrandParam=decodeURIComponent(this.filterBrandParam),this._productFilterService.addFilterBrandParam(this.filterBrandParam)),this.calcTime("REQUESTED DATA"),this._productGridService.objGridData=this.objGridData,localStorage.setItem("productGenericGridData",JSON.stringify(this.objGridData)),"erumslastorder"===this.productGridPage||"historylist"===this.productGridPage||"purchase"===this.productGridPage?this.appConfigService.userInfoRefresh.subscribe((e=>{"initFunc"===e&&this._getResults()})):(this._getResults(),"c-products-by-upc"===this.objGridData.apiType&&this.appConfigService.shopCouponRefresh.subscribe((e=>{e&&this._init()}))),this.resolveProgramType()}resolveProgramType(){this.programType=window.AB&&window.AB.COMMON&&window.AB.COMMON.isB2BSite()?"1P_B2B":this.programType}_getResults(){window.AB.arFlagLoaded?(this.isArEnable=window.AB.arFlag.display,console.warn("== PRODUCT GENERIC GRID DECIDED isArEnable property in the component"),this._init()):this.appConfigService.canTriggerProductsCall()?this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display,console.warn("== PRODUCT GENERIC GRID RECEIVED EVENT AND NOW IS READY TO MAKE PRODUCTS CALL"),this._init()}))):this._init()}_init(){this._productGridService.getData().subscribe((e=>{if(e.hasOwnProperty("purchaseInfo")&&e.purchaseInfo.includes("No Content Found")&&(this.hasServerSideLoadMore=!1),this._isServerLoadMoreTriggered?this.isServerGridLoading=!1:(this.showGrid=!1,this.subscriptionFrmProdCoupV2||$("#loadingConMedium").show()),this._productCouponService.changeMessage(!1),"catalog"===this.productGridPage||"relevancy"===this.productGridPage?"similar-products"==this.objGridData.apiType||"substitution"==this.objGridData.apiType?e.products=e.productsinfo:e.products=e.response.docs:e.purchases?e.products=e.purchases:e.products=e.products?e.products:e.orderItems?e.orderItems:e.productsinfo,this.ack=!!e.ack&&e.ack,window.AB.searchRank=0,0==this.ack&&null!=e.products){let t=gt.create((t=>{t.next(e),t.complete()}));this.calcTime("RECEIVED DATA"),t.subscribe((e=>{if("purchase"===this.objGridData.drivenType)if("buy-it-again"===this.objGridData.apiType)this.activeSortRule=this.objGridData.value.sortRule;else this.activeSortRule=this._sortService.getDefaultSort();else this.activeSortRule=this._sortService.getDefaultSort();this._sendProductsToAddAllComponent(e);for(let t of e.products)this._productFilterService.addDepartment(t.departmentName);if(!0===this.isFilter&&(e.products=e.products.filter((e=>this._doFilter(e)))),this.allowNotAvailable||(e.products=e.products.filter((e=>e.price>0&&null!=e.price))),this.component.pagination.page=1,this._pagination(e),this.checkAvailability(this.products),this.arProductsArray=this.chunkArray([...this.products]),this.calcTime("PROCESSED DATA"),this.searchResult(this.totalProducts),this._dataScrollService.backToTopScroll$.subscribe((e=>this.showBackToTopButton=e>window.innerHeight)),("c-bogo"===this.objGridData.apiType||"bogo"===this.productGridPage)&&null!=$(".bogo--paragraph")&&($(".bogo--paragraph").removeClass("mask"),$(".bogo--error").addClass("mask")),typeof e.brands<"u"&&null!=e.brands)for(let t of e.brands)this._productFilterService.addBrand(t);else"search"===this.productGridPage&&this._productGridService.extractBrand().subscribe((e=>{if(typeof e.brands<"u"&&null!=e.brands)for(let t of e.brands)this._productFilterService.addBrand(t)}))}),(e=>{this._processNoData()}))}else this._isServerLoadMoreTriggered||this._processNoData();this._isServerLoadMoreTriggered=!1,setTimeout((()=>{this.showGrid=!0,$("#loadingConMedium").hide()}),10),this.calcTime("END"),this.aisleFilterLevelThreeService.selectedForFilteringSource.pipe(function(e){return qi(((t,i)=>e<=i))}(1),zi(650)).subscribe((e=>{let t=null;this.showGrid=!1,this.showLoader(),t=0===e.length?window.AB.aisleLevel3Id:e.join(",")}),(e=>{this._processAisleNoData()}))}),(e=>{this._processNoData()}))}_pagination(e){if("loadmore"===this.component.pagination.load_type){if("client"===this.component.pagination.paginate_at){let t=null!=e.products&&""!==e.products;"relevancy"!==this.productGridPage?this.productsSecondary=t?this.doSort(e.products):[]:this.productsSecondary=t?e.products:[],this.loadMoreProducts()}else if("server"===this.component.pagination.paginate_at&&null!=e.products&&""!==e.products&&(this.products.push(...e.products),this.hasServerSideLoadMore=this.products.length>=this._getLoadMoreItems(),this._serverNewItemToFocus&&this.products[this._serverNewItemToFocus]&&this.products[this._serverNewItemToFocus].id)){let e=".product-title#pg"+this.products[this._serverNewItemToFocus].id;$(e).ready((()=>$(e).focus()))}}else"infinitescroll"===this.component.pagination.load_type&&"client"===this.component.pagination.infinite_type||"infinitescroll"===this.component.pagination.load_type&&"server"===this.component.pagination.infinite_type?this.infiniteScroll(e):(this.products=null!=e.products&&""!==e.products?e.products:[],this.totalProducts=this.products.length,"search"!==this.productGridPage&&"relevancy"!==this.productGridPage&&this.doSort())}ngAfterViewInit(){this.calcTime("VIEW Init")}checkAvailability(e){this.areAllProductsUnavailable=this._productGridService.areAllProductsUnavailable(e)}calcTime(e){let t=new Date;this.pTime.getHours(),this.pTime.getMinutes(),this.pTime.getSeconds(),this.pTime.getMilliseconds(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()}getCart(){let e=window.AB.miniCartPath;return""!==window.AB.COMMON.getCookie("OrderNumber")&&(e+="?id="+window.AB.COMMON.getCookie("OrderNumber")),this._http.get(e)}_doFilter(e){let t=!0;return t=window.AB.COMMON.getURLParameterByName("aisle")&&e.departmentName===this.filterAisleParam,t}hasGroupHeading(){this.hasSort&&this.isAisleSort&&!this.isGroupInit&&(this.isGroupInit=!0,this.products.forEac
1h((e=>{e[this.groupByField]!==this.currentGroupBy&&(this.currentGroupBy=e[this.groupByField],e.isGroupSplit=!0)})))}doSort(e){if(this.currentGroupBy="",this.products.forEach((e=>{e.hasOwnProperty("isGroupSplit")&&delete e.isGroupSplit})),this.isGroupInit=!1,e)return this._sortService.sort(this.activeSortRule,e);"loadmore"===this.component.pagination.load_type?this.component.pagination.paginate_at&&"client"!==this.component.pagination.paginate_at?this.component.pagination.paginate_at&&"server"===this.component.pagination.paginate_at&&(this.products=[],this._init()):(this.productsSecondary=this._sortService.sort(this.activeSortRule,this.productsSecondary),this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.component.pagination.load_items*this.component.pagination.page)):"infinitescroll"===this.component.pagination.load_type&&"client"===this.component.pagination.infinite_type?(this.productsSecondary=this._sortService.sort(this.activeSortRule,this.productsSecondary),this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.infiniteScrollItems*this.infiniteScrollPage)):(this.products=this._sortProductsByDepartmentName(this.products),this.products=this._sortService.sort(this.activeSortRule,this.products)),this.isAisleSort=this.activeSortRule&&this.activeSortRule.field===this._sortService.getSortByName("aisles").field,this.hasGroupHeading()}_sortProductsByDepartmentName(e){let t=e;if("Aisles"===this.activeSortRule.label){let i=(e,t)=>e.departmentName<t.departmentName?-1:1;t=e&&e.sort(i)}return t}activeSortRuleEmitter(e){if("purchase"===(this.activeSortRule=e,this.objGridData.drivenType))if("buy-it-again"===this.objGridData.apiType)this.objGridData.value.sortRule=this.activeSortRule;this.doSort()}searchResult(e){let t=document.querySelector("#searchNrResults");if("search"===this.productGridPage&&t){let i=window.AB.COMMON.getURLParameterByName("q");e>0?t.innerHTML=e+" results for <b>"+i+"</b>":(t.innerText=null!=i?'No results for "'+i+'"':"No results found.",this.searchNoResults=!0,document.querySelector(".asidediv.col-md-9").classList.remove("col-md-9"),document.querySelector(".asidediv").classList.add("col-md-12")),window.AB.DATALAYER.updateSearch(i,e)}}infiniteScroll(e){if(this.productsSecondary=null!=e.products&&""!==e.products?this.doSort(e.products):[],this.infiniteScrollItems=this._dataScrollService.getNumberOfItems(),this.totalProducts=this.productsSecondary.length,this.hideLoader(),this.allowNotAvailable||(this.productsSecondary=this.productsSecondary.filter((e=>e.price>0&&null!=e.price))),this.productsSecondary.length<=this.infiniteScrollItems)return this.products=this.productsSecondary,void this.doSort();this.$infiniteScroll=this._dataScrollService.pageToLoad$.pipe(pn((()=>this.products.length<this.productsSecondary.length))).subscribe((e=>{this.products=this._sortProductsByDepartmentName(this.products),this.products=this.productsSecondary.slice(0,this.infiniteScrollItems*e),this.infiniteScrollPage=e,this.showLoader(),this.isAisleSort=this.activeSortRule&&this.activeSortRule.field===this._sortService.getSortByName("aisles").field,this.isGroupInit=!1,this.hasGroupHeading(),this.products.length===this.productsSecondary.length&&this.hideLoader()}))}checkRestrictedItems(){this.unAttendDeliveryFlag=!0}showLoader(){this._loaderService.show()}hideLoader(){this._loaderService.hide()}backToTopOnClick(){$("html, body").animate({scrollTop:0},"slow"),this.showBackToTopButton=!1;let e=$(".title-bg h2.simple-page-title-text").get(0);void 0!==e&&e.focus()}_processNoData(){this.products=[],this.displayNoResults=!0,$("#loadingConMedium").hide(),("c-bogo"===this.objGridData.apiType||"bogo"===this.productGridPage)&&"mobile"!==window.AB.COMMON.getBreakpoint()&&(this.noResults=this._productGridService.getNoResultsMsg(this.productGridPage),0!==$(".bogo--error").length?($(".bogo--error").html(this.noResults).removeClass("mask"),$(".bogo--paragraph").addClass("mask")):$(".bogo--paragraph").after('<div class="bogo--error">'+this.noResults+"</div>"),this.noResults=""),"search"===this.productGridPage&&(this.searchResult(0),this._http.get(window.AB.aisleHTMLTitlePath,{responseType:"text"}).subscribe((e=>{this.aisleHTML=e,this._http.get(window.AB.aisleHTMLPath,{responseType:"text"}).subscribe((e=>{this.aisleHTML+=e}))}))),"loadmore"===this.component.pagination.load_type&&"server"===this.component.pagination.paginate_at&&(this.hasServerSideLoadMore=!1),this.hasServerSideLoadMore&&(this.isServerGridLoading=!1,this.hasServerSideLoadMore=!1)}_processAisleNoData(){this.hideLoader(),this.products=[],this.showGrid=!0,this.noResults=this._productGridService.getNoResultsMsg(this.productGridPage),this.hasServerSideLoadMore&&(this.isServerGridLoading=!1,this.hasServerSideLoadMore=!1)}loadMoreProducts(e){let t;"grid_button"===e&&(t=this.products.length,this.component.pagination.page++),this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.component.pagination.load_items*this.component.pagination.page);let i=[...this.products];if(this.arProductsArray=this.chunkArray(i||[]),this.isAisleSort=this.activeSortRule&&this.activeSortRule.field===this._sortService.getSortByName("aisles").field,this.isGroupInit=!1,this.hasGroupHeading(),t&&this.products[t].id){let e=".product-title#pg"+this.products[t].id;$(e).ready((()=>$(e).focus()))}}loadMoreProductsServerSide(e){if("purchase"===(this._isServerLoadMoreTriggered=!0,this.isServerGridLoading=!0,"grid_button"===e&&(this._serverNewItemToFocus=this.products.length),this.objGridData.drivenType))if("buy-it-again"===this.objGridData.apiType)this.objGridData.value.pageNumber=this.objGridData.value.pageNumber+1,this._init();else this._isServerLoadMoreTriggered=!1;else this._isServerLoadMoreTriggered=!1}_getLoadMoreItems(){return window.innerWidth<=768?this.elementRef.nativeElement.getAttribute("data-load-more-mobile-items")?this.elementRef.nativeElement.getAttribute("data-load-more-mobile-items"):15:window.innerWidth>768&&window.innerWidth<=992?this.elementRef.nativeElement.getAttribute("data-load-more-tablet-items")?this.elementRef.nativeElement.getAttribute("data-load-more-tablet-items"):20:this.elementRef.nativeElement.getAttribute("data-load-more-desktop-items")?this.elementRef.nativeElement.getAttribute("data-load-more-desktop-items"):30}setBiaParams(){let e=window.AB.COMMON.getURLParameterByName("aisleId"),t=window.AB.COMMON.getURLParameterByName("purchaseType"),i=window.AB.COMMON.getURLParameterByName("orderDate"),n=window.AB.COMMON.getURLParameterByName("sort");if(this.objGridData.value.category=e||"",this.objGridData.value.purchaseType=t||"",n&&(this.objGridData.value.sortRule=this._sortService.getDefaultSortForConfigurableSort(n)),i){let e=this._buyItAgainService.getOrderDates();this.objGridData.value.orderDate=this.formatOrderDate(e[i])}}formatOrderDate(e){let t=new Date(e),i=(new Date).setMonth(t.getMonth()+1),n=new Date(i).getFullYear().toString(),r=new Date(i).getMonth().toString(),s=new Date(i).getDate().toString();return r=2===r.length?r:`0${r}`,s=2===s.length?s:`0${s}`,`${n}-${r}-${s}`}isItemAvailable(e){return this.enableBiaOosUi?this.appConfigService.isItemAvailable_v3(e):this.appConfigService.isItemAvailable_v2(e)}chunkArray(e){let t=window.location.href.includes("foru/offer-details")?6:4,i=window.innerWidth<768?2:t;for(var n=[];e.length;)n.push(e.splice(0,i));return n}ngOnDestroy(){this.subscription.unsubscribe()}_sendProductsToAddAllComponent(e){let t=e.products;"c-virtual-shelf-general"===this.objGridData.apiType&&(t.length>50||0===t.length||$(".load-more").length>0?$(".dynamic-angular-content-injector").hide():($(".dynamic-angular-content-injector").show(),t=t.filter((e=>"1"===e.inventoryAvailable)),this.appConfigService._products.next(t)))}static{this.ɵfac=function(t){return new(t||e)($d(Tne),$d(fF),$d(Ane),$d(ov),$d(Tl),$d(C2),$d(FE),$d(xne),$d(hP),$d(Ene),$d(Vl),$d(Pne),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-generic-grid"]],inputs:{dataValue:"dataValue",staticProducts:"staticProducts"},features:[xm([fF,Tne,C2,FE,Pne])],decls:4,vars:4,consts:[["class","product-level-1 container-fluid p0","
1style","color: #5A5A5A; font-size: 20px;","data-qa","prd-gnrc-grd",4,"ngIf"],["class","product-level-4",4,"ngIf"],["tabindex","0","role","button","aria-label","Back to Top","class","back-to-top",3,"click",4,"ngIf"],[4,"ngIf"],["data-qa","prd-gnrc-grd",1,"product-level-1","container-fluid","p0",2,"color","#5A5A5A","font-size","20px"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"innerHTML"],[1,"product-level-4"],[3,"sortRules","activeSortRule","ngClass","activeSortRuleEmitter",4,"ngIf"],["aria-live","polite","aria-atomic","true",1,"visuallyhidden"],["class","row justify-content-center",4,"ngIf"],["id","searchGridLoading","class","loading-div-medium",4,"ngIf"],[3,"activeSortRuleEmitter","sortRules","activeSortRule","ngClass"],[1,"row","justify-content-center"],["role","button",1,"btn","btn-secondary","bloom-load-button","btn-xl","mt-3",3,"click"],["id","searchGridLoading",1,"loading-div-medium"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],["tabindex","0","role","button","aria-label","Back to Top",1,"back-to-top",3,"click"],["id","backToTopArrow",1,"back-to-top-background"]],template:function(e,t){1&e&&ph(0,Mne,2,1,"div",0)(1,Une,7,5,"div",1)(2,Vne,2,0,"div",2)(3,qne,1,0,"loading-spinner",3),2&e&&(zh("ngIf",t.displayNoResults&&(0==t.products.length||!t.allowNotAvailable&&t.areAllProductsUnavailable)),Vd(),zh("ngIf",t.showGrid&&t.products.length>0&&(t.allowNotAvailable||!t.areAllProductsUnavailable)),Vd(),zh("ngIf",t.showBackToTopButton),Vd(),zh("ngIf","infinitescroll"==t.component.pagination.load_type))},dependencies:[sy,cy,VE,LE],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),jne=class{constructor(e){Object.assign(this,e)}},zne=class{constructor(e){this._isUserAuthorized=window.AB.COMMON.authorize(),this._grsFlagGroups=["a","b","control"],this._next=new kt,this.next$=this._next.asObservable(),this.url="",this.view_id=encodeURIComponent(window.AB.userInfo.branchId),this.wfcStoreId=encodeURIComponent(window.AB.userInfo.wfcStoreId),this.br_uid_2=encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),this.zipcode=encodeURIComponent(window.AB.userInfo.zipcode),this.account_id="",this.auth_key="",this.domain_key="",this.key="",this.params=new Ky,this.headers=new jy,this.query=null,this.page=0,this.start=0,this.rows=30,this.sort="",this.hostName=window.location.origin,this.randomNumber=Math.floor(1e12+9e12*Math.random()).toString(),this.request_type="search",this.search_type="keyword",this.category_id="keyword",this.abs_carousel_wc="abs-carousel-wc",this.selected_facet="selected-facet",this.fl="name,aisleId,pid,upc,price,basePrice,pricePer,quantity,quantityOrder,unitOfMeasure,promoDescription,salesRank,departmentName,shelfName_id,promoType,promoTitle,promoText,offerText,promoEndDate,restrictedValue,unitQuantity,displayEstimateText,displayUnitQuantityText",this.pid="",this.user_id=window.AB.userInfo.customerId,this.uuid=window.AB.userInfo.UUID?window.AB.userInfo.UUID:window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO")?JSON.parse(window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO"))?.uuid:null,this.userIdFromParam=window.AB.COMMON.getURLParameterByName("user_id"),this.fq="",this.isMostPopularL2=!1,this.searchApi="",this.featured="",this.pastPurchase="",this.elevateSessionId=encodeURIComponent(window.AB.COMMON.getCookie("_elevaate_session_id")),this.clubCard=window.AB.userInfo.clubCard?encodeURIComponent(window.AB.userInfo.clubCard):"",this.timezone="America/Los_Angeles",this.debugKeyParam=window.AB.COMMON.getURLParameterByName("debugkey"),this.debugKey="",this.widget_id="",this.availabilityCheck=!0,this.pgmList=[],this.isSearchRequest=!0,this.isWineStoreFlagEnabled=!1,this.isMkpStoreFlagEnabled=!1,this.isGuidedSearch=!1,this.isDynamicTilesSearch=!1,this.showMkpCaurosal=!1,this.isPathwaySearch=!1,this.isWineShop=!1,this.ADV_MEMORY_TOKEN="",this.isB2B=window.AB&&window.AB.userInfo&&"B"===window.AB.userInfo.siteType,this.isCuratedSearch=!1,this.isSpotlightBannerEnabled=!1,this.nonFqUrlParams={sort:!0,page:!0,loc:!0,q:!0,ref:!0,mboxdisable:!0,tab:!0},this._handleBannerParameter=()=>{let e=window.AB?.userInfo?.banner;e&&(this.params=this.params.has("banner")?this.params.set("banner",e):this.params.append("banner",e))},this.isCategoryCustomPageType="category"===document.getElementsByClassName("main-wrapper www-wrapper nextgen-main-wrapper")[0]?.getAttribute("data-custom-page-type"),Object.assign(this,e),this.generateURL()}nextPage(){this.page++,this.start=this.page*this.rows,this.generateURL(),this._next.next(this)}newSort(e){this.sort=e||"",this.page=0,this.start=0,this.generateURL()}generateNewFq(){this.page=0,this.start=0,this.query=window.AB.COMMON.getURLParameterByName("q")?window.AB.COMMON.getURLParameterByName("q"):"",this.generateURL()}generateNewFqFromUrl(){let e=[],t=new URLSearchParams(window.location.search);for(var i of t.keys())if(!0!==this.nonFqUrlParams[i.toLocaleLowerCase()]){let n=t.get(i);if(null!=n){let t=n.split("~"),r="";if(t.includes("SAS")&&(e.push("arProduct=true"),t=t.filter((e=>"SAS"!==e))),"price"===i)r=t.join("]OR["),r=i+":["+r+"]";else if("availability"===i){let e=this.getInventoryParameterName();if(!0==("true"===n))r=this.isPathwaySearch||this.isWineShop&&this.isCategoryCustomPageType?e+':("1"OR"2")':e+':"1"OR"2"'}else t.length>0&&(r=t.join('"OR"'),r=this.isPathwaySearch||this.isWineShop&&this.isCategoryCustomPageType?i+':("'+r+'")':i+':"'+r+'"');r&&!r.includes("BIA")&&e.push(r)}}return e}constructCategoryIdValues(){let e="";return["departmentName","singleDepartmentName","aisleName","shelfName_id"].forEach((t=>{let i=window.AB.COMMON.getURLParameterByName(t);i&&(i=i.includes("|")?i.slice(0,i.indexOf("|")):i,e+=""===e?i:` > ${i}`)})),e}getInventoryParameterName(){let e="inventoryAvailable",t=this.channel?this.channel:this.getChannel();return e=(()=>{switch(!0){case"wineshop"==$(".main-wrapper.www-wrapper.nextgen-main-wrapper")?.attr("data-program")||"shipping"===t:return"shippingInventory";case"pickup"===t:return"pickupInventory";case"delivery"===t:return"deliveryInventory";case"instore"===t:return"instoreInventory";default:return"inventoryAvailable"}})(),e}generateNewQuery(){this.page=0,this.start=0,"pathway-search"!==this.searchApi&&(this.query=window.AB.COMMON.getURLParameterByName("q")?window.AB.COMMON.getURLParameterByName("q"):"")}generateURL(e){this.pgmList=this.isCuratedSearch?this.pgmList:[];let t=null!=e&&""!==e?e:this.hostName;if(("bloomreach"==this.searchApi||null==this.searchApi||""==this.searchApi)&&(this.params=this.params.set("account_id",this.account_id).set("auth_key",this.auth_key).set("domain_key",this.domain_key).set("request_id",this._getUTCTimeStampRandom()).set("_br_uid_2",this.br_uid_2).set("url",t).set("ref_url",t).set("request_type",this.request_type).set("fl",this.fl).set("rows",String(this.rows)).set("start",String(this.start)).set("q",this.query).set("sort",this.sort).set("search_type",this.search_type).set("view_id",this.view_id)),"xapi"==this.searchApi){let e=this.getPageName();this.params=this.params.set("request-id",this._getUTCTimeStampRandom()).set("url",t).set("pageurl",t).set("pagename",e).set("rows",String(this.rows)).set("start",String(this.start)).set("search-type",this.search_type).set("storeid",this.view_id).set("featured",this.featured).set("q",this.query).set("sort",this.sort).set("userid",this.clubCard).set("dvid",(this.dvid?this.dvid:"web-4.1")+this.request_type),"aisles"==this.request_type&&"category"==this.search_type&&(this.params=this.params.set("category-id",this.category_id).set("dvid","web-4.1"+this.request_type).set("featuredsessionid",this.elevateSessionId).set("screenwidth",$(window).width()).set("search-uid",this.br_uid_2))}"program-keyword"==this.searchApi?this.mapProgramSearchParams():"pathway-search"==this.searchApi?this.params=this.params.set("request-id",this._getUTCTimeStampRandom()).set("url",t).set("search-uid",this.br_uid_2).set("q",this.query).set("rows",String(this.rows)).set("start",String(this.start)).set("channel",this.getChannel()).set("storeid",this.view_id).set("sort",this.sort).set("widget-id",this.widget_id).set("dvid","web-4.1"+this.request_type):"pathway-search"===this.searchApi?(this.params.keys().forEac
1h((e=>{this.params=this.params.delete(e)})),this.params=this.params.set("request-id",this._getUTCTimeStampRandom()).set("url",t).set("search-uid",this.br_uid_2).set("q",this.query).set("rows",String(this.rows)).set("start",String(this.start)).set("channel",this.getChannel()).set("storeid",this.view_id).set("sort",this.sort).set("widget-id",this.widget_id).set("availabilityCheck",String(this.availabilityCheck)).set("dvid","web-4.1"+this.searchApi)):"pathway-category"===this.searchApi&&(this.params.keys().forEach((e=>{this.params=this.params.delete(e)})),this.params=this.params.set("url",t).set("rows",String(this.rows)).set("start",String(this.start)).set("storeid",this.view_id).set("search-uid",this.br_uid_2).set("cat_id",this.category_id).set("sort",this.sort).set("channel",this.getChannel()).set("widget-id",this.widget_id).set("availabilityCheck",String(this.availabilityCheck)).set("dvid","web-4.1"+this.searchApi)),this.isCuratedSearch&&(this.params=this.params.set("visitorId",window.AB.COMMON.getCookie("absVisitorId")).set("uuid",this.uuid)),"true"==this.pastPurchase&&"xapi"==this.searchApi&&"aisles"!=this.request_type&&"category"!=this.search_type&&(this.userIdFromParam||this.clubCard)&&(this.params=this.params.set("pp",this.pastPurchase)),this.params=this.params.set("visitorId",window.AB.COMMON.getCookie("absVisitorId")),!this.pgmList.includes("intg-search")&&this.isMkpStoreFlagEnabled&&(this.pgmList.push("intg-search"),this.dataMerchBannerEnable&&this.pgmList.push("merch-banner")),"aisles"===this.request_type&&($("search-grid")[0]&&"true"===$("search-grid")[0].dataset.searchBuyItAgainProducts&&this._isUserAuthorized?this.params=this.params.set("pp","all"):this.params=this.params.set("pp","none")),"search"===this.request_type&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_2375&&this._grsFlagGroups.includes(window.analyticsSwy.testFlags.EOT_2375.toLowerCase())&&(this.params=this.params.set("targetsponsoredgridposition",`EOT_2375_${window.analyticsSwy.testFlags.EOT_2375.toLowerCase()}`)),this.badgePreference&&this.badgeList&&(this.params=this.params.set(this.badgePreference,this.badgeList)),this.pid&&(this.params=this.params.set("pid",this.pid)),"search"!==this.request_type&&("true"===this.isDebugKeyEnabled&&this.userIdFromParam&&this.debugKey&&this.debugKeyParam===this.debugKey?this.params=this.params.set("user_id",this.userIdFromParam):this.clubCard&&(this.params=this.params.set("user_id",this.clubCard))),this._isUserAuthorized&&(this.params=this.params.set("uuid",this.uuid)),this.params=this.params.delete("fq"),this.params=this.params.delete("nextPageToken");let i=this.getChannel();""!==i&&(this.params=this.params.set("channel",i)),window.AB.COMMON.checkPendingOrder()&&(this.params=this.params.set("isEditOrderMode",!0));let n=this._getMultipleFQ(),r=this.constructCategoryIdValues();this.params=r?this.params.set("category-name",r):this.params.delete("category-name");let s=n.join(",");$(this.abs_carousel_wc).attr(this.selected_facet,s),n.forEach((e=>{e.includes("arProduct")||(this.params=this.params.append("fq",e))}));let a=n.some((e=>e.includes("arProduct")));this.params=a?this.params.set("arProduct","true"):this.params.delete("arProduct"),this.fq.includes("departmentName:")&&this.isMostPopularL2&&(this.params=this.params.set("fq",this.fq)),this.key.length>0&&(this.headers=this.headers.set("Ocp-Apim-Subscription-Key",this.key)),this.isB2B&&!this.pgmList.includes("1P_B2B")&&this.pgmList.push("1P_B2B"),this.pgmList.length>0?this.params=this.params.set("pgm",this.pgmList.join()):this.params=this.params.delete("pgm"),this.params=this.params.set("includeOffer",!0),this._handleBannerParameter()}getPageName(){return window.location.href.includes("/shop/deals/")?"deals":this.request_type}getChannel(){let e=window.AB.COMMON.getUserChannel();if(window.AB.COMMON.checkPendingOrder()){let t="B"===window.AB?.userInfo?.siteType?"B_OrderPreference":"OrderPreference",i=window.AB.COMMON.getCookie(t);i&&(i=i.toUpperCase(),e="DUG"===i?"pickup":i.toLowerCase())}return e}_getMultipleFQ(){return this.generateNewFqFromUrl()}mapProgramSearchParams(e){let t=this.getPageName(),i=null!=e&&""!==e?e:this.hostName;
1this.params.keys().forEach((e=>{this.params=this.params.delete(e)})),this.params=this.params.set("request-id",this._getUTCTimeStampRandom()).set("url",i).set("pageurl",i).set("pagename",t).set("rows",String(this.rows)).set("start",String(this.start)).set("search-type","keyword").set("storeid",this.view_id).set("featured",this.featured).set("q",this.query).set("sort",this.sort).set("timezone",this.timezone).set("dvid","web-4.1"+this.request_type).set("channel",this.getChannel()),null!=this.category_id&&(this.params=this.params.set("category-id",this.category_id)),this._isUserAuthorized&&(this.params=this.params.set("pp","true")),this.isGuidedSearch&&(this.pgmList.push("guided-search"),this.conversationId&&(this.params=this.params.set("conversationId",this.conversationId))),this.isDynamicTilesSearch&&this.pgmList.push("dynamic-tiles"),this.isSearchRequest&&(this.isMkpStoreFlagEnabled&&this.pgmList.push("intg-search"),this.isWineStoreFlagEnabled&&(this.pgmList.push("wineshop"),this.params=this.params.set("wineshopstoreid",""==this.wfcStoreId?encodeURIComponent(window.AB.userInfo.wfcStoreId):this.wfcStoreId).set("zipcode",this.zipcode)),this.isSpotlightBannerEnabled&&this.pgmList.push("spotlight"),this.dataMerchBannerEnable&&this.pgmList.push("merch-banner"))}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}},Wne=(()=>{class e{constructor(e,t,i,n,r){this._buyItAgainService=e,this._appConfigService=t,this._featureFlagService=i,this.metaTag=n,this._http=r,this._facetsSource=new kt,this._productsSource=new Tt({}),this._productsData=new Tt([]),this._biaFacetExists=!1,this._currentLeftNavFacets={},this._responseFacetDataSource=new Tt({}),this._isUserAuthorized=window.AB.COMMON.authorize(),this.enableMemoryTokenInAisle=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.enableMemoryTokenInAisle,this.enableMemoryTokenInSearch=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.enableMemoryTokenInSearch,this._grsFlagGroups=["a","b","control"],this._summarySource=new kt,this.currentFacets$=this._facetsSource.asObservable(),this.currentSummary$=this._summarySource.asObservable(),this.productsSource$=this._productsSource.asObservable(),this.productsData$=this._productsData.asObservable(),this.filterFacets=new kt,this.filterFacets$=this.filterFacets.asObservable(),this.facets=new Tt({}),this.facets$=this.facets.asObservable(),this.sort=new kt,this._onProductsRetrieved=new kt,this.onProductsRetrieved$=this._onProductsRetrieved.asObservable(),this.sort$=this.sort.asObservable(),this.pageNumber=1,this.focusHolder="",this.responseFacetData={},this.responseFacetData$=this._responseFacetDataSource.asObservable(),this.searchApiUrl="",this.sponsoredProducts="",this.pastPurchase="",this.debugKey="",this._dataCustomSearchParam=new kt,this.dataCustomSearchParam$=this._dataCustomSearchParam.asObservable(),this._dataSearchType=new kt,this.dataSearchType$=this._dataSearchType.asObservable(),this.cdObs=new kt,this.cdObs$=this.cdObs.asObservable(),this._marketplaceCarousalAvailable=new Tt(!1),this.marketplaceCarousalAvailable$=this._marketplaceCarousalAvailable.asObservable(),this.dataSource=new Tt(""),this.sharedSellerName=this.dataSource.asObservable(),this.isAnalyticsMktPage=!1,this.isWineStoreFlagEnabled=!1,this.wineStoreChannel="shipping",this.wineStorePgm="wineshop",this.wineshopInventory="shippingInventory",this.wineStoreFacet="true",this._ADV_memoryToken="",this.infiniteScrollPage$=Li(window,"scroll").pipe(bi((()=>$(window).scrollTop())),qi((e=>{if($("#searchGridLoading").length>0)return e>=$("#searchGridLoading").offset().top-$(window).innerHeight()})),bi((()=>this.bloomreach.page+1==this.pageNumber?this.pageNumber:null))),this.backToTopScroll$=Li(window,"scroll").pipe(zi(10),bi((()=>window.scrollY||document.documentElement.scrollTop))),this._setBIAConfigForGetSearchResults=()=>{if(this._biaFacetExists=!1,"aisles"===this.bloomreach.request_type){let e=new URL(window.location.href);if($("search-grid")[0]&&"true"===$("search-grid")[0].dataset.searchBuyItAgainProducts&&e.searchParams.has("offerType")){let t=e.searchParams.get("offerType");
1if(this._biaFacetExists=t.includes("BIA"),this._biaFacetExists)if(window.AB.COMMON.authorize()){let t="";e.searchParams.has("sort")&&(t=e.searchParams.get("sort"));let i=this.bloomreach.params.getAll("fq");this.bloomreach.params=this.bloomreach.params.set("featured","false").set("pp","only").set("sort",t||"FREQUENCY").delete("fq"),i&&this._handleAvailabilityFqParamReset(i)}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}}},this._setPromoTypeConfig=()=>{if(this.hasPromoTypeParam()){let e=this._appConfigService.getInventoryParameterName(),t=this.customSearchParamObj?.dataCustomSearchParam;t=t.replace("fq=","");let i=e+':"1"';this.bloomreach.params=this.bloomreach.params.append("fq",t).append("fq",i)}},this._setBIAConfigForGetSortingResults=()=>{if(this._biaFacetExists=!1,$("search-grid")[0]&&"true"===$("search-grid")[0].dataset.searchBuyItAgainProducts&&"aisles"===this.bloomreach.request_type){let e=new URL(window.location.href);if(e.searchParams.has("offerType")){let t=e.searchParams.get("offerType");if(this._biaFacetExists=t.includes("BIA"),this._biaFacetExists&&window.AB.COMMON.authorize()){let e=this.bloomreach.params.getAll("fq");this.bloomreach.params=this.bloomreach.params.set("featured","false").set("pp","only").delete("fq"),e&&this._handleAvailabilityFqParamReset(e)}}}},this._setBIAConfigForGetFilteringResults=e=>{if(this._biaFacetExists=!1,$("search-grid")[0]&&"true"===$("search-grid")[0].dataset.searchBuyItAgainProducts&&"aisles"===this.bloomreach.request_type){let t=this._checkBIAFilterForAvailability();switch(!0){case"buy-it-again"===e.type&&e.selected||"availability"===e.type&&t:let i=new URL(window.location.href),n="";i.searchParams.has("sort")&&(n=i.searchParams.get("sort"));let r=this.bloomreach.params.getAll("fq");this.bloomreach.params=this.bloomreach.params.set("featured","false").set("pp","only").set("sort",n||"FREQUENCY").delete("fq"),r&&this._handleAvailabilityFqParamReset(r);break;case this._isUserAuthorized&&!t:this.bloomreach.params=this.bloomreach.params.set("pp","all")}}},this._checkBIAFilterForAvailability=()=>
1{if(this._currentLeftNavFacets&&this._currentLeftNavFacets.offerType&&this._currentLeftNavFacets.offerType.options){let e=this._currentLeftNavFacets.offerType.options.find((e=>"buy-it-again"===e.type));return!!e&&e.selected}return!1},this._setupFacetOptions=(e,t,i)=>{let n=[...t],r=[...i];return n.filter((t=>!r.find((i=>"offerType"===e?t.name===i.syntax:t.name===i.name))))},this._handleAvailabilityFqParamReset=e=>{let t=this._appConfigService.getInventoryParameterName();switch(!0){case e.includes(t+':"1"'):this.bloomreach.params=this.bloomreach.params.set("fq",t+':"1"');break;case e.includes(t+':"1"OR"2"'):this.bloomreach.params=this.bloomreach.params.set("fq",t+':"1"OR"2"')}},this.dataProgram=$(".main-wrapper.www-wrapper.nextgen-main-wrapper")?.attr("data-program"),this.dataCustomPageType=document.getElementsByClassName("main-wrapper www-wrapper nextgen-main-wrapper")[0]?.getAttribute("data-custom-page-type"),this.isCategoryCustomPageType="category"===this.dataCustomPageType,this.isNextPageTokenEnabled=this._featureFlagService.enableNextPageToken(),this.facets$.subscribe((e=>{(e?Object.keys(e):[]).length&&(this._currentLeftNavFacets=e)})),this.dataCustomSearchParam$.subscribe((e=>{e&&(this.customSearchParamObj=e)})),this.dataSearchType$.subscribe((e=>{e&&(this.dataSearchTypeObj=e,this.isPathwaysSearchType=this.dataSearchTypeObj&&this.dataSearchTypeObj.dataSearchType&&("pathway-search"===this.dataSearchTypeObj.dataSearchType||"pathway-category"===this.dataSearchTypeObj.dataSearchType))}));let s=window.AB.storeFlagsData;typeof s>"u"||null===s||0===Object.keys(s).length?document.addEventListener("storeFlagsLoadComplete",(()=>{this.updateWineStoreFeatureFlag()})):this.updateWineStoreFeatureFlag()}setVisitorAndSessionId(e=!1){this.bloomreach.params=this.bloomreach.params.set("visitorId",window.AB.COMMON.getCookie("absVisitorId")),e&&(window.AB.COMMON.setUpdateVisitorIdForGrs(),window.AB.COMMON.setSessionIdForGrs())}setVariantOwnBP(){let e=window.analyticsSwy?.testFlags?.ACIP218103?.toLowerCase()||localStorage.getItem("abACIP218103")?.toLowerCase();e&&(this.bloomreach.params=this.bloomreach.params.set("variant",`ACIP218103_${e}`))}setBloomreach(e,t,i,n,r,s,a,o){"bloomreach"===t.searchApi||""===t.searchApi||null===t.searchApi?t.apimHost&&t.apimHost.length>0?this.searchApiUrl="https://"+t.apimHost+t.apimCoreEndpoint:this.searchApiUrl=t.apimHost+t.apimCoreEndpoint:t.searchApi&&t.searchApi.includes("xapi")&&("aisle"===t.searchPage?this.searchApiUrl=t.apimAislesProductsAPIPath:this.searchApiUrl=t.apimSearchProductsAPIPath),this.sponsoredProducts="false"==t.showSponsoredProducts?"false":"true",this.pastPurchase=t.showPastPurchaseProducts,this.isDebugKeyEnabled=t.brPastPurchaseDebugKeyFlag,this.debugKey=t.brPastPurchaseDebugKey;let l="";l=this.searchKeyword?this.searchKeyword:window.AB.COMMON.getURLParameterByName("q")?window.AB.COMMON.getURLParameterByName("q"):"","pathway-search"===t.searchApi&&"wineshop"!=this._getGridAttributeValue("data-seller-type")&&(l=t.searchOptions["pathway-search"]?.query?t.searchOptions["pathway-search"]?.query:l);let c="";t.searchOptions&&t.searchOptions["pathway-category"]&&t.searchOptions["pathway-category"].catId?c=t.searchOptions["pathway-category"].catId:r&&(c=r),s&&(this.aisleCategoryName=s),this.bloomreach=new zne({query:l,searchApi:t.searchApi,rows:e>0?e:"",start:i||0,sort:n||this._getDefaultSort(),account_id:t.accountId&&t.accountId.length>0?t.accountId:"",auth_key:t.authKey&&t.authKey.length>0?t.authKey:"",domain_key:t.domainKey&&t.domainKey.length>0?t.domainKey:"",featured:this.sponsoredProducts,pastPurchase:this.pastPurchase,url:this.searchApiUrl,key:t.apimSubscriptionKey&&t.apimSubscriptionKey.length>0?this._appConfigService.getFinalSubscriptionKey(t.apimSubscriptionKey):"",request_type:t.searchApi&&t.searchApi.includes("xapi")&&"aisle"===t.searchPage?"aisles":"search",search_type:t.searchApi&&t.searchApi.includes("xapi")&&"aisle"===t.searchPage?"category":"keyword",category_id:c,isDebugKeyEnabled:this.isDebugKeyEnabled,debugKey:this.debugKey,widget_id:"pathway-search"===t.searchApi?t.searchOptions&&t.searchOptions["pathway-search"]?.widgetId:t.searchOptions&&t.searchOptions["pathway-category"]?.widgetId,availabilityCheck:!0,storeid:window.AB.userInfo.branchId,search_uid:window.AB.COMMON.getURLParameterByName("search-uid"),channel:window.AB.COMMON.getURLParameterByName("channel"),dvid:t.dvid,isPathwaySearch:"pathway-search"===this._getGridAttributeValue("data-search-type"),isWineShop:"wineshop"==this._getGridAttributeValue("data-seller-type"),isCuratedSearch:t.isCuratedSearch,pgmList:t.pgmList,badgePreference:t.badgePreference,badgeList:t.badgeList})}setBloomreachData(e,t,i){let n=window.SWY.CONFIGSERVICE.searchConfig,r=null!=i&&""!==i;this.bloomreach=new zne({url:n.apimHost&&n.apimHost.length>
10&&!1===r?"https://"+n.apimHost+n.apimCoreEndpoint:n.apimHost+n.apimCoreEndpoint,account_id:n.accountId&&n.accountId.length>0?n.accountId:"",auth_key:n.authKey&&n.authKey.length>0?n.authKey:"",domain_key:n.domainKey&&n.domainKey.length>0?n.domainKey:"",key:n.apimSubscriptionKey&&n.apimSubscriptionKey.length>0?n.apimSubscriptionKey:""}),e&&(Object.assign(this.bloomreach,e),this.bloomreach.generateURL(i)),e.facet&&(this.bloomreach.params=this.bloomreach.params.set("facet",e.facet)),t&&t.length>0&&t.forEach((e=>this.bloomreach.params=this.bloomreach.params.delete(e))),this.setVisitorAndSessionId(),this.setVariantOwnBP()}getRowsFromEndpoint(e){let t="",i=0,n=e?e.indexOf("?"):-1;return n>-1&&(t=e.substr(n+1),t.split("&").forEach((function(e){if(e&&e.indexOf("rows")>-1){let t=e.split("=");t&&t.length>1&&t[1]&&(i=Number(t[1]))}}))),i}getProductResults(e){let t=null!=e&&""!==e?"https://"+e:"";return this._http.get(this._appConfigService.generateFinalApiUrl(t+this.bloomreach.url),{headers:this.bloomreach.headers,params:this.bloomreach.params}).pipe(bi((e=>({products:this._prepareProducts(e.response.docs),productsCounter:e.response.numFound}))))}getSearchResults(e){window.SWY.CONFIGSERVICE.searchConfig;if(window.AB.isLSEnabled&&null!=localStorage.getItem("BR-search-results")){return fi(JSON.parse(localStorage.getItem("BR-search-results"))).pipe(Ki(0),bi((e=>{this.responseFacetData=e.facet_counts?e.facet_counts.facet_fields:{},this._responseFacetDataSource.next(this.responseFacetData),e.response.docs&&e.facet_counts?this._facetsSource.next(Object.assign(e.facet_counts.facet_fields,e.facet_counts.facet_ranges)):this._facetsSource.next(null),"xapi"===this.bloomreach.searchApi&&"search"===this.bloomreach.request_type&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT3079&&"a"===window.analyticsSwy.testFlags.EOT3079.toLowerCase()&&e.attribution_token&&null!==e.attribution_token&&window.AB.COMMON.updateAttributionToken(e.attribution_token),this._ADV_memoryToken=e&&e.memoryToken,this._emitSummary(e),this._startPaginationWatching(),this._updateAnalyticsDataLayer(e,!0,!0);let t={products:e.response&&e.response.docs?e.response.docs:[],productsCounter:e.response&&e.response.numFound?e.response.numFound:0,miscInfo:e&&e.response&&e.response.miscInfo?e.response.miscInfo:{},start:e&&e.response&&e.response.start?e.response.start:0};return localStorage.removeItem("BR-search-results"),t})))}{"wineshop"==this._getGridAttributeValue("data-seller-type")&&!window.AB.userInfo.wfcStoreId&&window.ErrorStateModalComp.triggerEmptyStateModal("#wsErrorModal"),this._setWineShopParams(),this._setMkpPgmParam(),this._setSponsoredSpotlightParam(),this.bloomreach.generateNewFqFromUrl(),this._setBIAConfigForGetSearchResults(),this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this.setVisitorAndSessionId(),this.setVariantOwnBP(),"xapi"===this.bloomreach.searchApi&&"search"===this.bloomreach.request_type&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_2375&&this._grsFlagGroups.includes(window.analyticsSwy.testFlags.EOT_2375.toLowerCase())&&(this.bloomreach.params=this.bloomreach.params.set("targetsponsoredgridposition",`EOT_2375_${window.analyticsSwy.testFlags.EOT_2375.toLowerCase()}`)),"search"!==this.bloomreach.request_type&&(this.bloomreach.params=this.bloomreach.params.set("screenwidth",window.innerWidth+","+window.innerHeight)),this._setPromoTypeConfig(),e&&(this.searchKeyword=e,this.bloomreach.params=this.bloomreach.params.set("q",e));let t="mkp"===this.dataProgram,i=(window.location.pathname,"mkp-cross-seller-page"===$(".main-wrapper").attr("data-custom-page-type")),n=this.dataSearchTypeObj&&this.dataSearchTypeObj.dataSearchType&&("pathway-search"===this.dataSearchTypeObj.dataSearchType||"pathway-category"===this.dataSearchTypeObj.dataSearchType);if(!this.bloomreach.isWineShop&&t){this.isAnalyticsMktPage=!0,!0!==n&&(this.bloomreach.params=this.bloomreach.params.set("sellerId",this.marketplaceSellerId).set("isMarketplaceItem","only"));new URLSearchParams(window.location.search);let e=window.location.pathname.split("/"),t=e[e.length-1].split(".");if(!window.AB.COMMON.getURLParameterByName("availability",!0)){let e=this._appConfigService.getInventoryParameterName();this.bloomreach.params=n?this.bloomreach.params.append("fq",e+':("1"OR"2")'):this.bloomreach.params.append("fq",e+':"1"OR"2"')}i||!0!==n&&(t.length>2?(this.bloomreach.params=this.bloomreach.params.set("sellerId",t[1]),this.analyticsSellerId=t[1]):window.ErrorStateModalComp.triggerEmptyStateModal("#mktpErrorModal"))}this.bloomreach.params.get("sellerId")&&(this.bloomreach.params=this.bloomreach.params.set("url",this.bloomreach.params.get("url")+"/"+this.bloomreach.params.get("sellerId")));let r=this.metaTag.getTag("name=template")?this.metaTag.getTag("name=template").content:"";0===document.querySelectorAll("search-facets").length&&"unified-dynamic-l2-editable-page"!=r&&(this.bloomreach.params=this.bloomreach.params.set("facet",!1)),i&&(this.bloomreach.params=this.bloomreach.params.delete("sellerId")),this.aisleCategoryName&&(this.bloomreach.params=this.bloomreach.params.set("category-name",this.aisleCategoryName));let s=this.bloomreach.url?this.bloomreach.url:"",a=this.bloomreach.params,o={headers:this.bloomreach.headers,params:a},l=this._setURLRequestToPathway();return l&&(s=l),this._http.get(this._appConfigService.generateFinalApiUrl(s),o).pipe(bi((e=>{this.onProductsRetrieved(e),this.isPathwaysAPICall()?this.responseFacetData=this.remapPathwayFacetData(e&&e.facet?e.facet.fields:{}):this.responseFacetData=e&&e.facet_counts?e.facet_counts.facet_fields:{},this._responseFacetDataSource.next(this.responseFacetData),e&&e.response&&e.response.docs&&e.response.docs.length>0&&(e.facet_counts||e.facet)?this.setExistingAvailabilityFacets(e):this._facetsSource.next(null),this._biaFacet
1Exists&&this._buyItAgainService.setSortRules(),this._ADV_memoryToken=e&&e.memoryToken?e.memoryToken:"",this._setNextPageToken(e),this._emitSummary(e),this._startPaginationWatching(),this._updateAnalyticsDataLayer(e,!0,!0),this.widget=e&&e.metadata&&e.metadata.widget?e.metadata.widget:{};let t=e?.response?.placementBeacons||null,i=e?.response?.disableTracking||!1,n={placementBeacons:t,products:this._appConfigService.setPlacementBeaconsOnProducts(e?.response?.docs,t,i),productsCounter:e&&e.response&&e.response.numFound?e.response.numFound:0,attribution_token:e&&e.attribution_token?e.attribution_token:null,isExactMatch:e&&e.response&&e.response.isExactMatch,miscInfo:e&&e.response&&e.response.miscInfo?e.response.miscInfo:{},start:e&&e.response&&e.response.start?e.response.start:0,disableTracking:!!(e&&e.response&&e.response.disableTracking)&&e.response.disableTracking,offersData:e?.offersData??e?.response?.offersData??null};return this._productsData.next(n),n})))}}getSortingResults(e){this.bloomreach.newSort(e),this.pageNumber=1,this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this._setBIAConfigForGetSortingResults(),this.setVisitorAndSessionId(!0),this.setVariantOwnBP(),"xapi"===this.bloomreach.searchApi&&"search"===this.bloomreach.request_type&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_2375&&this._grsFlagGroups.includes(window.analyticsSwy.testFlags.EOT_2375.toLowerCase())&&(this.bloomreach.params=this.bloomreach.params.set("targetsponsoredgridposition",`EOT_2375_${window.analyticsSwy.testFlags.EOT_2375.toLowerCase()}`)),this._setPromoTypeConfig(),this.searchKeyword&&(this.bloomreach.params=this.bloomreach.params.set("q",this.searchKeyword)),this.aisleCategoryName&&(this.bloomreach.params=this.bloomreach.params.set("category-name",this.aisleCategoryName));let t=this.bloomreach.url?this.bloomreach.url:"";this._setWineShopParams(),this._setMkpPgmParam(),0===document.querySelectorAll("search-facets").length&&(this.bloomreach.params=this.bloomreach.params.set("facet",!1));let i=this._setURLRequestToPathway();return i&&(t=i),this._http.get(this._appConfigService.generateFinalApiUrl(t),{headers:this.bloomreach.headers,params:this.bloomreach.params}).pipe(bi((e=>{let t;return window.AB.isLSEnabled&&localStorage.removeItem("fqParams"),e&&(this.onProductsRetrieved(e),this.isPathwaysAPICall()?this.responseFacetData=this.remapPathwayFacetData(e&&e.facet?e.facet.fields:{}):this.responseFacetData=e&&e.facet_counts?e.facet_counts.facet_fields:{},this._responseFacetDataSource.next(this.responseFacetData),this._emitSummary(e),(e.facet_counts&&e.facet_counts.facet_fields&&e.facet_counts.facet_ranges||e.facet&&e.facet.fields&&e.facet.ranges)&&this.setExistingAvailabilityFacets(e),this.widget=e.metadata&&e.metadata.widget?e.metadata.widget:{},t=e.response,t=f(h({},e.response),{offersData:e.offersData?e.offersData:null}),this._ADV_memoryToken=e.memoryToken?e.memoryToken:"",this._setNextPageToken(e)),t})))}getFilteringResults(e){this.bloomreach.generateNewFq(),this.pageNumber=1,this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this._setBIAConfigForGetFilteringResults(e),this.setVisitorAndSessionId(!0),this.setVariantOwnBP(),"xapi"===this.bloomreach.searchApi&&"search"===this.bloomreach.request_type&&window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT_2375&&this._grsFlagGroups.includes(window.analyticsSwy.testFlags.EOT_2375.toLowerCase())&&(this.bloomreach.params=this.bloomreach.params.set("targetsponsoredgridposition",`EOT_2375_${window.analyticsSwy.testFlags.EOT_2375.toLowerCase()}`)),this._setPromoTypeConfig(),this.searchKeyword&&(this.bloomreach.params=this.bloomreach.params.set("q",this.searchKeyword)),this.aisleCategoryName&&(this.bloomreach.params=this.bloomreach.params.set("category-name",this.aisleCategoryName));let t=this.bloomreach.url?this.bloomreach.url:"";this._setWineShopParams(),this._setMkpPgmParam();let i=this._setURLRequestToPathway();return i&&(t=i),this._http.get(this._appConfigService.generateFinalApiUrl(t),{headers:this.bloomreach.headers,params:this.bloomreach.params}).pipe(bi((e=>{let t={products:[],productsCounter:0,analyticsGridData:{}};if(e){this.onProductsRetrieved(e),this.isPathwaysAPICall()?this.responseFacetData=this.remapPathwayFacetData(e&&e.facet?e.facet.fields:{}):this.responseFacetData=e&&e.facet_counts?e.facet_counts.facet_fields:{},this._responseFacetDataSource.next(this.responseFacetData),e.response&&e.response.docs&&e.response.docs.length>0&&(e.facet_counts&&e.facet_counts.facet_fields&&e.facet_counts.facet_ranges||e.facet&&e.facet.fields&&e.facet.ranges)?this.setExistingAvailabilityFacets(e):this._facetsSource.next(null),this._ADV_memoryToken=e.memoryToken?e.memoryToken:"",this._setNextPageToken(e),this._emitSummary(e),this.widget=e.metadata&&e.metadata.widget?e.metadata.widget:{};
1let i=e?.response?.placementBeacons||null,n=e?.response?.disableTracking||!1;t={placementBeacons:i,products:this._appConfigService.setPlacementBeaconsOnProducts(e?.response?.docs,i,n),productsCounter:e.response&&e.response.numFound?e.response.numFound:0,attribution_token:e.attribution_token?e.attribution_token:null,isExactMatch:e&&e.response&&e.response.isExactMatch,analyticsGridData:e.response,offersData:e.offersData?e.offersData:null,disableTracking:!!(e&&e.response&&e.response.disableTracking)&&e.response.disableTracking};e&&e.response&&e.response}return t})))}_startPaginationWatching(){this.bloomreach.next$.subscribe((e=>{this._setPromoTypeConfig(),"pathway-search"===this.dataSearchTypeObj.dataSearchType?e.url=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwaySearchProductsEndpoint:"pathway-category"===this.dataSearchTypeObj.dataSearchType&&(e.url=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwayCategoryProductsEndpoint),this._setWineShopParams(),this._setMkpPgmParam(),this.setVariantOwnBP(),0===document.querySelectorAll("search-facets").length&&(this.bloomreach.params=this.bloomreach.params.set("facet",!1)),this.aisleCategoryName&&(this.bloomreach.params=this.bloomreach.params.set("category-name",this.aisleCategoryName)),this.isNextPageTokenEnabled&&this.bloomreach.nextPageToken&&(this.bloomreach.params=this.bloomreach.params.set("nextPageToken",this.bloomreach.nextPageToken));let t=(null==this.bloomreach.category_id?this.enableMemoryTokenInSearch:this.enableMemoryTokenInAisle)?this._updateADVMemoryToken(this.bloomreach.headers,this._ADV_memoryToken):this.bloomreach.headers;this._http.get(this._appConfigService.generateFinalApiUrl(e.url),{headers:t,params:this.bloomreach.params}).subscribe((e=>{this._ADV_memoryToken=e.memoryToken?e.memoryToken:"",this._setNextPageToken(e);let t=e&&e.response?e.response:{};t.isLoadMore=!0,this.sendCategoryImpressions(t),this._productsSource.next({products:e.response.docs,offersData:e.offersData?e.offersData:null})}))}))}_setWineShopParams(){(this.isWineSearchType()||"wineshop"===this.dataProgram)&&window.AB.userInfo.wfcStoreId&&(this.bloomreach.isWineShop=!0,this.bloomreach.params=this.bloomreach.params.set("storeid",window.AB.userInfo.wfcStoreId).set("channel",this.wineStoreChannel).set("pgm",this.wineStorePgm),this.bloomreach.channel=this.wineStoreChannel),!window.AB.COMMON.getURLParameterByName("availability",!0)&&"wineshop"===this.dataProgram&&(this.isPathwaysAPICall()?this.bloomreach.params=this.bloomreach.params.append("fq",this.wineshopInventory+':("1"OR"2")'):this.bloomreach.params=this.bloomreach.params.append("fq",this.wineshopInventory+':"1"OR"2"'))}isPathwaysAPICall(){return this.isPathwaysSearchType}_setMkpPgmParam(){!this.bloomreach.isWineShop&&"mkp"===this.dataProgram&&(this.bloomreach.params=this.bloomreach.params.set("pgm","mkp"))}_setSponsoredSpotlightParam(){this.bloomreach.isSpotlightBannerEnabled="true"==this._getGridAttributeValue("data-inject-spotlight-banner")}updateWineStoreFeatureFlag(){let{flags:e}=window.AB.storeFlagsData;e.ecomStore&&e.ecomStore.storeFeatures&&e.ecomStore.storeFeatures.isWineD2CEnabled&&(this.isWineStoreFlagEnabled=e.ecomStore.storeFeatures.isWineD2CEnabled)}_emitSummary(e){if(this.bloomreach.generateNewQuery(),e){let t={counter:e&&e.response&&e.response.numFound?e.response.numFound:0,query:e&&e.autoCorrectQuery?e.autoCorrectQuery:this.bloomreach.query,misspelled:e&&e.autoCorrectQuery?this.bloomreach.query:null};this._summarySource.next(t),this.hideAislesTitle(t.counter<=0)}}_getGridAttributeValue(e){return(null==this.gridElement||null==this.gridElement)&&(this.gridElement=document.getElementById("search-grid_0")),void 0!==this.gridElement&&null!==this.gridElement?this.gridElement.getAttribute(e):""}_getDefaultSort(){let e,t;return window.AB.isLSEnabled&&(e=window.AB.gridDataSource,t=JSON.parse(localStorage.getItem("search_sort_active"))),t&&t.sort&&t.query==window.AB.COMMON.getURLParameterByName("q")?t.sort.field:e?(localStorage.removeItem("search_sort_active"),e.find((e=>"true"==e.selected||1==e.selected))?.field):""}_updateAnalyticsDataLayer(e,t,i,n,r="standard",s=!1){if(window.AB&&window.AB.DATALAYER&&window.AB.isLSEnabled){window.digitalData&&window.digitalData.pageDetails&&(window.digitalData.pageDetails.subSection2=s?"deals-search":"");let a=e&&e.response&&e.response.docs?e.response.docs:[],o=0,l=[],c=[],d=!1;if(a.length>0)for(let e=0;e<a.length;e++)if(1==a[e].pastPurchased&&o++,a[e].sellerId){let t=a[e].sellerId;l.includes(t)||l.push(t)}let u={searchType:`${this.isAnalyticsMktPage?"marketplace":this.isWineSearchType()?"wineshop":"internal"}search:${r}`,typedSearchTerm:"",autoSearchFlag:"false",typedSearchCount:"",internalSearchTerm:this.bloomreach.query,searchResults:e&&e.response&&e.response.numFound?e.response.numFound.toString():"0",pastPurchased:o,sellerId:this.analyticsSellerId,crossSellerIds:l.join("#"),dynamicFacets:e&&e.facet_counts&&e.facet_counts.dynamic_facets&&e.facet_counts.dynamic_facets.length>0};if(n&&window.AB.DATALAYER.marketplaceSellerUpdates(0,"",n),window.AB.isLSEnabled&&localStorage.getItem("autoSearchFlag")&&(u.autoSearchFlag="true",localStorage.getItem("typedSearchTerm")?(u.typedSearchTerm=localStorage.getItem("typedSearchTerm"),u.typedSearchCount=u.typedSearchTerm&&u.typedSearchTerm.length.toString(),u.searchType=(this.isAnalyticsMktPage?"marketplace":this.isWineSearchType()?"wineshop":"internal")+"search:typeahead:suggestion"):u.searchType=(this.isAnalyticsMktPage?"marketplace":this.isWineSearchType()?"wineshop":"internal")+"search:typeahead:popular"),window.AB.isLSEnabled&&(localStorage.removeItem("autoSearchFlag"),localStorage.removeItem("typedSearchTerm")),window.AB.DATALAYER.setRestrictedProductPageFlag&&(n&&n.forEac
1h((e=>{c.push(e)})),c.push(e),c.forEach((e=>{let t=e.response;((t&&t.docs?t.docs:t&&t.products?t.products:[]).some((e=>!!e.isProductTrackingDisabled))||t?.disableTracking)&&(d=!0)})),window.AB.DATALAYER.setRestrictedProductPageFlag(d)),window.AB.DATALAYER.setAttributionToken(e&&e.attribution_token?e.attribution_token:localStorage.getItem("attribution_token")),window.AB.DATALAYER.setSearch&&!0===t&&window.AB.DATALAYER.setSearch(u),n&&n.length>0&&n.forEach((e=>{let t=e.response?e.response:{};window.AB.DATALAYER.setGRSImpressions&&window.AB.DATALAYER.shouldSetGRSSearchImpression()&&window.AB.DATALAYER.setGRSImpressions("search_results_impressions",t,!0)})),!0===i){let t=e&&e.response?e.response:{};window.AB.DATALAYER.setGRSImpressions&&window.AB.DATALAYER.shouldSetGRSSearchImpression()&&window.AB.DATALAYER.setGRSImpressions("search_results_impressions",t)}}}_prepareProducts(e){return e.map((e=>(e.id=e.pid,e)))}hasPromoTypeParam(){let e=this.customSearchParamObj?.dataCustomSearchParam;return!(!e||!e.includes("fq=promoType"))}setGrsAttributionToken(e){window.analyticsSwy&&window.analyticsSwy.testFlags&&window.analyticsSwy.testFlags.EOT3079&&"a"===window.analyticsSwy.testFlags.EOT3079.toLowerCase()&&window.AB.COMMON.updateAttributionToken(e)}sendCategoryImpressions(e){window.AB.DATALAYER&&null!=window.AB.DATALAYER.setGRSImpressions&&window.AB.DATALAYER.setGRSImpressions("category_impressions",e)}sendPidsToDataLayer(e){let t={event:"productImpressions",productList:{searchProductList:e.filter((e=>!window.AB.DATALAYER.isAlcoholAdTrackingDisabled(e))).map((e=>e.pid)).toString()},page:window.digitalData.pageDetails,pageFilter:window.digitalData.pageFilter,user:window.digitalData.user};window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.EVENTS&&window.AB.DATALAYER.pushEvent(window.AB.DATALAYER.EVENTS.PAGE_LOADED,t)}_setURLRequestToPathway(){let e="";return this.dataSearchTypeObj&&this.dataSearchTypeObj.dataSearchType&&"pathway-search"===this.dataSearchTypeObj.dataSearchType?e=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwaySearchProductsEndpoint:this.dataSearchTypeObj&&this.dataSearchTypeObj.dataSearchType&&"pathway-category"===this.dataSearchTypeObj.dataSearchType&&(e=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwayCategoryProductsEndpoint),e}sendData(e){this.dataSource.next(e)}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}remapPathwayFacetData(e){return Array.isArray(e)?e.reduce(((e,t)=>(e[t.key]=t.value,e)),{}):null}setExistingAvailabilityFacets(e){let t=Object.assign(e&&e.facet_counts?e.facet_counts.facet_fields:this.remapPathwayFacetData(e.facet.fields),e&&e.facet_counts?e.facet_counts.facet_ranges:this.remapPathwayFacetData(e.facet.ranges));if(this._currentLeftNavFacets.availability&&this._currentLeftNavFacets.availability.options){let e=t.availability,i=this._currentLeftNavFacets.availability.options;t.availability=[...e?this._setupFacetOptions("availability",e,i):[],...i]}this._facetsSource.next(t)}isWineSearchType(){return this.isWineStoreFlagEnabled&&"wineshop"==this._getGridAttributeValue("data-seller-type")}_updateADVMemoryToken(e,t){return""!=t&&(e=e.set("ADV_MEMORY_TOKEN",t)),e}setAllFacetData(e){this.responseFacetData=e,this._responseFacetDataSource.next(e)}canPassLOC(e){return-1!=e.toLowerCase().indexOf("aisles")&&-1==e.toLowerCase().indexOf("vineandcellar")&&-1==e.toLowerCase().indexOf("marketplace")}isB2bUser(){return window.AB&&window.AB.userInfo&&"B"===window.AB.userInfo.siteType}updateAriaLabelCount(e){let t=$(".dynamic-page-title__container h1").attr("aria-label");t&&(t=t.slice(0,t.indexOf("(")-1),t+=" ("+e+")",$(".dynamic-page-title__container h1").attr("aria-label",t))}hideAislesTitle(e){let t=document.getElementsByClassName("dynamic-page-title");if(t.length){let i=t[0];e?i.classList.add("d-none"):i.classList.remove("d-none")}}onProductsRetrieved(e){this._onProductsRetrieved.next(e)}_setNextPageToken(e){this.isNextPageTokenEnabled&&(this.bloomreach.nextPageToken=e&&e.response&&e.response.miscInfo&&e.response.miscInfo.nextPageToken?e.response.miscInfo.nextPageToken:"")}getSearchKeyword(){return window.AB.COMMON.getURLParameterByName("q")?window.AB.COMMON.getURLParameterByName("q"):"*"}static{this.ɵfac=function(t){return new(t||e)(lr(xne),lr(hP),lr(uP),lr(pw),lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Hne=(()=>{class e{constructor(e,t,i,n,r,s){this._SearchResultsService=e,this._sortService=t,this._buyItAgainService=i,this._appConfigService=n,this.metaTag=r,this._featureFlagService=s,this._defaultSortRules=window.AB.gridDataSource?window.AB.gridDataSource:this._sortService.getSorts(),this._customFilterTypes=["buy-it-again","availability","schedule-and-save"],this._urlParam
1s={q:window.AB.COMMON.getURLParameterByName("q",!1),departmentName:"",brand:"",nutrition:"",nutritionContent:"",diet:"",dietaryRestriction:"",price:"",shelfName_id:""},this.facets={},this._facets=new kt,this.facets$=this._facets.asObservable(),this.allFacets={},this._allFacets=new kt,this.allFacets$=this._allFacets.asObservable(),this.showFilterSelected=!1,this._showFilterSelected=new kt,this.showFilterSelected$=this._showFilterSelected.asObservable(),this.facetsSelected=null,this.showMFT=!1,this._showMFT=new kt,this.showMFT$=this._showMFT.asObservable(),this._onShowFacetsModal=new kt,this.onShowFacetsModal$=this._onShowFacetsModal.asObservable(),this._disableFacetMobileHeader=new kt,this.disableFacetMobileHeader$=this._disableFacetMobileHeader.asObservable(),this.facetAriaAnounce="",this.selectedFilter="",this.isAisleClicked=!1,this.isAisleMore=!1,this.showAllDepartments=!1,this._showAllDepartments=new kt,this.showAllDepartments$=this._showAllDepartments.asObservable(),this.pagePaths={},this.currentDepartment={},this.currentAisle={},this.currentShelf={},this.hasDeals="",this.optionSelected="",this.lastShelfName="",this.lastAisleName="",this.userChannelChoice=window.AB.COMMON.getUserChannel(),this._analyticsBIAFilter=!1,this.isMarketplacePage=!1,this.subscription=new Ye,this.l3PageTemplatesArr=["unified-dynamic-l3-aisle-page","nextgen-l3-aisle-page","mkp-nextgen-l3-aisle-page","nextgen-wine-l3-page","nextgen-b2b-l3-aisle-page"],this.l4PageTemplatesArr=["unified-dynamic-l4-shelf-page","nextgen-l4-shelf-page","mkp-nextgen-l4-shelf-page","nextgen-wine-l4-page","nextgen-b2b-l4-shelf-page"],this._dynamicFacets=new kt,this.dynamicFacet$=this._dynamicFacets.asObservable(),this.isThemeBuilderEnabled=!(!window.SWY.CONFIGSERVICE||!window.SWY.CONFIGSERVICE.isThemeBuilderEnabled),this.subscription.add(this._SearchResultsService.onProductsRetrieved$.subscribe((e=>{let t,i=e?.facet_counts?.dynamic_facets||e?.facet?.dynamic_facets;i&&(t=i.map((e=>({"facet-id":e.facetId,"facet-title":e.displayText,"facet-select-type":"dietaryRestriction"==e.facetId?"radio":"checkbox","facet-single-select":"dietaryRestriction"==e.facetId})))),this._dynamicFacets.next(t)})))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}getCurrentFacets(){this._SearchResultsService.currentFacets$.subscribe((e=>{e=e||{};let t=document.getElementsByTagName("search-grid"),i=!(!t[0]||"true"!==t[0]?.dataset.searchBuyItAgainProducts);i&&!e.hasOwnProperty("offerType")&&(e.offerType=[]),"instore"!==this.userChannelChoice&&!e.hasOwnProperty("availability")&&!this._SearchResultsService.hasPromoTypeParam()&&(e.availability=[]),("aisle"!==this.component?.type||this.aislesId)&&(this._urlParams.q=window.AB.COMMON.getURLParameterByName("q",!1)),Object.keys(e).length>0&&Object.keys(this.facets).forEach((e=>{this.facets[e].count=0,this.facets[e].options=[],this._urlParams[e]=window.AB.COMMON.getURLParameterByName(e,!1)})),this.showMFT=!1,this._showMFT.next(this.showMFT),this.showFilterSelected=!1,this._showFilterSelected.next(this.show
1FilterSelected),Object.keys(e).forEach((t=>{if(!this.facets[t])return;let n=e[t];if(i&&"offerType"===t&&!n.find((e=>"buy-it-again"===e.type))){let i=window.AB.COMMON.getURLParameterByName("offerType",!0),r={count:"",name:"Buy It Again",syntax:"BIA",selected:!(!i||!i.includes("BIA")),type:"buy-it-again"};n.push(r),e[t]=n}if("instore"!==this.userChannelChoice&&"availability"===t&&!n.find((e=>"availability"===e.type))&&!this._SearchResultsService.hasPromoTypeParam()){let i=window.AB.COMMON.getURLParameterByName("availability",!0),r=document.getElementsByClassName("main-wrapper www-wrapper nextgen-main-wrapper");this.isMarketplacePage=!(!r||"mkp"!==r[0]?.getAttribute("data-program")),this.isMarketplacePage&&!i&&(i="true");let s=r&&r[0].getAttribute("data-program");!i&&"wineshop"==s&&(i="true");let a={count:1,name:"Include Out of Stock",syntax:"true"!==i,selected:"true"!==i,type:"availability"};n.push(a),e[t]=n}e[t]=e[t].filter((e=>e.count>0||this._customFilterTypes.includes(e.type))),e[t]=this._createSyntax(t,e[t]),e[t]=this._checkURLSelected(t,e[t]),this.facets[t].options=this._getApiFacets(t,e[t]),this.facets[t].count=e[t].length,setTimeout((()=>{Object.keys(e[t]).length>0&&(this.showMFT=!0,this._showMFT.next(this.showMFT),this.showFilterSelected=!0,this._showFilterSelected.next(this.show
1FilterSelected))}),0)}));let n,r=this.facets?.offerType?.options.find((e=>"buy-it-again"===e.type&&e.selected));if(r){n=h({},this.facets),Object.keys(n).forEach((e=>"offerType"==e||"availability"==e||delete n[e]));let e=n.offerType?.options.filter((e=>"buy-it-again"===e.type&&e.selected));n.offerType.options=e,n.offerType.count=e.length,this._facets.next(n),this._SearchResultsService.facets.next(n)}else this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets);this.allFacets=this._SearchResultsService.responseFacetData,this._allFacets.next(this.allFacets),this.updateL4TitleAndH1(),"filter"===this._SearchResultsService.focusHolder&&setTimeout((()=>{this._SearchResultsService.focusHolder=""}),0),"selection-filter"===this._SearchResultsService.focusHolder&&(this.isThemeBuilderEnabled?setTimeout((()=>{document.querySelectorAll(".search-filter-selected .search-filter-selected__btn").length>0?document.querySelector(".search-filter-selected .search-filter-selected__btn:last-child").focus():document.querySelectorAll(".sort-by-text")[0]?.parentNode?.focus(),this._SearchResultsService.focusHolder=""}),0):setTimeout((()=>{document.querySelectorAll(".facet-filter-selected .ss-active").length>0?document.querySelector(".facet-filter-selected .ss-active:last-child").focus():document.querySelectorAll(".sort-by-text")[0]?.parentNode?.focus(),this._SearchResultsService.focusHolder=""}),0))}))}_getApiFacets(e,t){return t.forEach((t=>{"price"===e&&(!t.name&&0==t.start&&t.end>0?t.name="Less than $"+t.end:!t.name&&t.start>0&&"*"==t.end?t.name="Greater than $"+t.start:!t.name&&t.start>0&&t.end>0&&(t.name="$"+t.start+" to $"+t.end)),"offerType"===e&&("Y"===t.name?t.name="Deals":"N"===t.name&&(t.name="N"))})),t}_createSyntax(e,t){return t.forEach(((t,i)=>{if("price"===e)t.syntax=encodeURIComponent(t.start+" TO "+t.end);else if("offerType"===e)switch(t.name){case"Deals":t.syntax=encodeURIComponent("Y");break;case"Buy It Again":t.syntax=encodeURIComponent("BIA");break;case"Schedule & Save":t.syntax=encodeURIComponent("SAS");break;default:t.syntax=encodeURIComponent(t.name)}else"availability"===e&&"availability"===t.type?t.syntax=encodeURIComponent(!0):t.syntax=encodeURIComponent(t.name)})),t}_checkURLSelected(e,t){let i=window.AB.COMMON.getURLParameterByName(e,!0)?window.AB.COMMON.getURLParameterByName(e,!0):"";return i=i.split("~"),t.map((e=>{if(!this._customFilterTypes.includes(e.type)||"schedule-and-save"===e.type){let t=decodeURIComponent(e.syntax);e.selected=i&&t&&t.length>0&&i.includes(t)}})),t}getKeys(e){return Object.keys(e)}closeInMobile(){if(document.getElementsByClassName("main-wrapper www-wrapper")[0].style.display="block",document.querySelector(".search-filter-comp.section")){let e=document.querySelector(".search-filter-comp.section"),t=document.querySelector("search-facets");e.insertAdjacentElement("beforeend",t)}else{let e=document.querySelector(".dynamic-left-nav-filter"),t=document.querySelector("search-facets");e.insertAdjacentElement("beforeend",t)}setTimeout((()=>{document.getElementById("filterMV").focus()}),100)}showTheModal(){document.querySelector(".main-wrapper.www-wrapper").style.display="none";let e=document.querySelector("body"),t=document.querySelector("search-facets");e.insertAdjacentElement("beforeend",t),setTimeout((()=>{document.getElementById("filterTitle").focus()}),100),this._onShowFacetsModal.next(!0)}_updateAnalyticsDataLayer(e,t){window.AB.DATALAYER.updatePfmDetail(t)}clearAisleFacet(){this.allFacets.aisleName&&this.allFacets.aisleName.forEach((e=>e.selected=!1))}clearShelfFacet(){this.allFacets.shelfName_id&&this.allFacets.shelfName_id.forEach((e=>e.selected=!1))}clear(e,t,i){if("selected"!==t&&(this.showAllDepartments=!1,this._showAllDepartments.next(this.showAllDepartments)),e){if("availability"!==e||i){if("availability"!==e){let t=this.facets[e]?.label.trim();this.facets[e]?.options.forEach((e=>{e.selected=!1,"Schedule & Save"===e.name&&(t="Schedule & Save"),window.AB.DATALAYER.removeFilterSelection(`${t}: ${e.name}`)})),window.AB.DATALAYER.removeFilterType(t),this._analyticsBIAFilter||window.AB.DATALAYER.setPageFilter()}}else this.facets[e].options[0].selected=!0;this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets)}else this.facets?.offerType?.options.find((e=>"buy-it-again"===e.type&&e.selected))&&(window.history.replaceState({},null,window.location.pathname+window.AB.COMMON.removeURLParameterByName(window.location.search,"sort")),this._buyItAgainService._sortRules.next({triggerSortSubscribe:!1,sortRules:this._defaultSortRules}),this._SearchResultsService.bloomreach&&(this._SearchResultsService.bloomreach.sort=this._defaultSortRules[0]&&this._defaultSortRules.length>1?this._defaultSortRules[0].field:"")),("selected"===t||!t)&&(this.clearAisleFacet(),this.clearShelfFacet()),Object.keys(this.facets).forEac
1h((e=>{"availability"!==e||i?"availability"!==e&&this.facets[e].options.forEach((e=>e.selected=!1)):this.facets[e].options[0].selected=!0})),window.AB.DATALAYER.removeFilterType("clearAll"),window.AB.DATALAYER.removeFilterSelection("clearAll"),window.AB.DATALAYER.setPageFilter(),this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets);i&&this._customFilterTypes.includes(i.type)?this._pushNewFqParam(i,!1,e):this._pushNewFqParam()}facetOnClick(e,t,i,n){let r;if("buy-it-again"===(this.facets[t]&&this.facets[t]?.options.forEach((e=>{e.name===i?(e.selected=!e.selected,e.selected&&("Schedule & Save"===e.name?this._updateAnalyticsDataLayer("Schedule & Save",`Schedule & Save: ${i}`):this._updateAnalyticsDataLayer(this.facets[t].label,`${this.facets[t].label.trim()}: ${i}`),"N"===e.name&&(e.name="Y"),this.optionSelected=e.name),r=e):1==this.facets[t].singleSelect&&(e.selected=!1)})),n))if(window.AB.COMMON.authorize()){let e=Object.keys(this.facets);if(this._analyticsBIAFilter=!0,e&&e.forEach((e=>{"offerType"===e?this.facets[e]?.options.forEach((e=>{"buy-it-again"!==e.type&&(e.selected=!1)})):"availability"!==e&&this.clear(e,null,r)})),r&&r.selected){let e=h({},this.facets);Object.keys(e).forEach((t=>"offerType"==t||"availability"==t||delete e[t]));let t=e.offerType?.options.filter((e=>"buy-it-again"===e.type&&e.selected));e.offerType.options=t,e.offerType.count=t.length,this._facets.next(e),this._SearchResultsService.facets.next(e),window.AB.DATALAYER.addFilterSelection(`Buy it again: ${r.name}`),window.AB.DATALAYER.addFilterType("Buy it again")}else this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets),window.AB.DATALAYER.removeFilterType("Buy it again"),window.AB.DATALAYER.removeFilterSelection(`Buy it again: ${r.name}`);window.AB.DATALAYER.setPageFilter(),this._analyticsBIAFilter=!1,this._pushNewFqParam(r,!0,t)}else{e.target.checked=!1,this.facets[t]?.options.forEach((e=>{"buy-it-again"===e.type&&(e.selected=!1)})),window.AB.COMMON.showSignInModal_OTP(window.location.href)}else{this.facets&&r&&"availability"!==r.type&&this.facets?.offerType?.options.forEach((e=>{"buy-it-again"===e.type&&(e.selected=!1,window.history.replaceState({},null,window.location.pathname+window.AB.COMMON.removeURLParameterByName(window.location.search,"sort")),this._buyItAgainService._sortRules.next({}),this._SearchResultsService.bloomreach.sort=this._defaultSortRules[0]&&this._defaultSortRules.length>1?this._defaultSortRules[0].field:"")})),this._pushNewFqParam(r,!0,t),this._SearchResultsService.focusHolder="filter",this.allFacets=this._SearchResultsService.responseFacetData,this._allFacets.next(this.allFacets),this.updateL4TitleAndH1(),this.scrolltop=Math.floor(-100*Math.random()),this.selectedFilter=t;let e=this.facets[t].label.trim();if(r&&(r.selected?("Schedule & Save"===r.name&&(e="Schedule & Save"),window.AB.DATALAYER.addFilterSelection(`${e}: ${r.name}`),window.AB.DATALAYER.setDynamicFilters(e,r.name,this.facets[t])):("Schedule & Save"===r.name&&(e="Schedule & Save"),window.AB.DATALAYER.removeFilterSelection(`${e}: ${r.name}`))),this.facets[t].options&&this.facets[t].options.some((e=>e.selected))?window.AB.DATALAYER.addFilterType(e):window.AB.DATALAYER.removeFilterType(e),window.AB.DATALAYER.setPageFilter(),this.facets?.offerType?.options.find((e=>"buy-it-again"===e.type&&e.selected))&&"availability"===r?.type){let e=h({},this.facets);Object.keys(e).forEach((t=>"offerType"==t||"availability"==t||delete e[t]));let t=e.offerType?.options.filter((e=>"buy-it-again"===e.type&&e.selected));e.offerType.options=t,e.offerType.count=t.length,this._facets.next(e),this._SearchResultsService.facets.next(e)}else this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets)}}findFirstSelected(e){let t="",i=e?.filter((e=>e.selected));return 1==i.length&&(t=`${i[0].name} `),t}findOnlyOneSelected(e){return!e||e?.filter((e=>e.selected)).length<=1}getShelfName(){let e,t,i,n,r,s,a,o,l=this.metaTag.getTag("name=template")?this.metaTag.getTag("name=template").content:"";if(this.allFacets&&(t=this.allFacets.brand?this.findFirstSelected(this.allFacets.brand):"",o=this.findOnlyOneSelected(this.allFacets.nutritionContent)&&this.findOnlyOneSelected(this.allFacets.diet)&&this.findOnlyOneSelected(this.allFacets.dietaryRestriction),o&&(i=this.allFacets.nutritionContent?this.findFirstSelected(this.allFacets.nutritionContent):"",n=this.allFacets.diet?this.findFirstSelected(this.allFacets.diet):"",r=this.allFacets.dietaryRestriction?this.findFirstSelected(this.allFacets.dietaryRestriction):""),s=!i&&!n&&r||!i&&n&&!r||i&&!n&&!r?i||n||r:"",a=t+s),this.l4PageTemplatesArr.includes(l)){let t=this.lastShelfName;
1this.allFacets.shelfName&&this.allFacets.shelfName.length&&(t=this.allFacets.shelfName[0].name,this.lastShelfName=this.allFacets.shelfName[0].name),e=a+t}else if(this.l3PageTemplatesArr.includes(l)){let t=this.lastAisleName;if(this.allFacets.aisleName&&this.allFacets.aisleName.length)t=this.allFacets.aisleName[0].name,this.lastAisleName=this.allFacets.aisleName[0].name,document.getElementsByClassName("dynamic-page-title__container")[0].style.marginBottom="0px";else{let e=JSON.parse(document.getElementsByTagName("search-facets")[0].getAttribute("data-current-aisle")),i=Object.keys(e)[0];this.lastAisleName=t=e[i].name,0===document.querySelectorAll(".dynamic-left-nav-filter.section #filterMV").length&&(document.getElementsByClassName("dynamic-page-title__container")[0].style.marginBottom="50px",document.getElementsByTagName("dynamic-page-title__container")[0].style.marginTop="-40px")}e=a+t?.split("|").shift()}return e}updateL4TitleAndH1(){let e=document.querySelectorAll(".aisle-4-hide-visual"),t=this.metaTag.getTag("name=template")?this.metaTag.getTag("name=template").content:"";window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.resolvedBanner&&(window.SWY.CONFIGSERVICE.resolvedBanner.charAt(0).toUpperCase(),window.SWY.CONFIGSERVICE.resolvedBanner.substr(1).toLowerCase());if(e.length>0){let t=this.getShelfName();e[0].innerHTML=t}("nextgen-wine-l3-page"===t||"nextgen-wine-l4-page"===t)&&this.updateWineTitleAndDescription()}updateWineTitleAndDescription(){let e,t,i=this.metaTag.getTag("name=template")?this.metaTag.getTag("name=template").content:"",n=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.resolvedBanner?window.SWY.CONFIGSERVICE.resolvedBanner.charAt(0).toUpperCase()+window.SWY.CONFIGSERVICE.resolvedBanner.substr(1).toLowerCase():"";if("nextgen-wine-l3-page"===i&&(t="Wine By Mail - Order Wine - Wine Direct To Consumer | "+n,e=`Looking to order wine by mail as a direct to consumer transaction? ${n} has a wine by mail offering so that you can easily gift wine by mail order or order wine online for yourself.`),"nextgen-wine-l4-page"===i){let i=this.getShelfName();t="Wine By Mail - Order Wine - Wine Direct To Consumer | "+i+" - "+n,e=`Looking to order ${i} by mail as a direct to consumer transaction? ${n} has a wine by mail offering so that you can easily gift wine by mail order or order wine online for yourself.`}this.metaTag&&this.metaTag.updateTag({name:"description",content:e})}showMoreLess(e){this.facets[e]&&(this.facets[e].showMore=!this.facets[e].showMore,this._facets.next(this.facets),this._SearchResultsService.facets.next(this.facets),"departmentName"===e&&this.showAllDepartments&&(this.isAisleMore=!this.isAisleMore),0==this.facets[e].showMore?setTimeout((()=>{document.querySelector("#searchFilterBy"+e+" .filter-wrapper div:nth-child(7) input").focus(),this.showAllDepartments&&document.querySelector("#searchFilterBy"+e+" .aisle-items.filter-wrapper div:nth-child(7) input").focus()}),0):1==this.facets[e].showMore&&setTimeout((()=>{document.querySelector("#searchFilterBy"+e+" .facets__accordion__showMoreLess--right")?.focus(),this.showAllDepartments&&document.querySelectorAll("#searchFilterBy"+e+" .label-more a#aisleMoreButton")[0]?.focus()}),0),this.scrolltop=Math.floor(-100*Math.random()))}showMoreLessKey(e,t){let i=e;13==(typeof i.which>"u"?i.keyCode:i.which)&&this.showMoreLess(t)}_pushNewFqParam(e,t,i){e&&"buy-it-again"===e.type&&!1===e.selected&&(window.history.replaceState({},null,window.location.pathname+window.AB.COMMON.removeURLParameterByName(window.location.search,"sort")),this._buyItAgainService._sortRules.next({}));let n,r=window.AB.COMMON.getURLParameterByName("sort");n="aisle"!==this.component?.type?this._urlParams.q?"?q="+this._urlParams.q:"":"?page=1",n+=""===r||r?"&sort="+r:"&sort=";let s="",a=!1;if((this?.facets?.availability?.options?this.facets.availability.options.find((e=>!0===e.selected)):"")&&(a=!0),Object.keys(this.facets).forEach((t=>{switch(!0){case"availability"===t&&e&&"availability"===e.type&&!0===e.selected:case"availability"===t&&a:case"availability"===t&&n.includes("availability=false"):n+="&availability=false";break;case"availability"===t&&e&&"availability"===e.type&&!1===e.selected:case"availability"===t&&!a:case"availability"===t&&n.includes("availability=true"):if(n.includes("availability=false")?n.replace("availability=false","availability=true"):n+="&availability=true","aisle"!==this.component?.type){let e=this._appConfigService.getInventoryParameterName();s+="&fq="+e+':"1"OR"2"'}break;case"availability"!==t&&("aisle"!==this.component?.type||"aisle"===this.component?.type&&"departmentName"!==t):let i="",r="";this.facets[t].options.forEach((e=>{1==e.selected&&0==i.length?i=r=e.syntax:1==e.selected&&i.length>0&&(r+='"OR"'+e.syntax,i+="~"+e.syntax)})),i&&i.length>0&&("price"===t?(i.includes("~")&&(i=i.split("~").join(encodeURIComponent("~"))),r.includes('"OR"')&&(r=r.split('"OR"').join("]OR[")),s+="&fq="+t+":["+r+"]"):(i.includes("~")&&(i=i.split("~").join(encodeURIComponent("~"))),s+="&fq="+t+':"'+r+'"'),n+="&"+t+"="+i)}})),"aisle"!==this.component?.type){if(typeof this.allFacets.aisleName<"u"){let e="";this.allFacets.aisleName.forEach((t=>{1==t.selected&&0==e.length?e=t.syntax:1==t.selected&&e.length>0&&(e+="~"+t.syntax)})),e&&""!==e&&(s+='&fq=aisleName:"'+e+'"',1===this.facets.departmentName.options.length&&!this.facets.departmentName.options[0].selected&&(n+="&singleDepartmentName="+this.facets.departmentName.options[0].syntax),n+="&aisleName="+e)}
1if(typeof this.allFacets.shelfName_id<"u"){let e="";this.allFacets.shelfName_id.forEach((t=>{1==t.selected&&0==e.length?e=t.syntax:1==t.selected&&e.length>0&&(e+="~"+t.syntax)})),e&&""!==e&&(s+='&fq=shelfName_id:"'+e+'"',n+="&shelfName_id="+e)}}let o=/\./gi;if(n.match(/(?:=)(\w.*?)(?=\&|$)/g)?.forEach((e=>{if(e.indexOf(".")>0){let t=e;e=e.replace(o,"%2E"),n=n.replace(t,e)}})),"?sort="===n&&(n=""),n=n?"?"+n.substr(1):document.location.origin+window.location.pathname,this._SearchResultsService.canPassLOC(location.pathname)){let e=-1==location.pathname.indexOf("loc")?"&loc="+window.AB.userInfo.branchId:"";n+=e}window.history.pushState("","",n),"aisle"!==this.component?.type&&this._SearchResultsService.bloomreach&&(this._SearchResultsService.bloomreach.fq=s),e?t&&this._SearchResultsService.filterFacets.next({clickedFacet:e,facetID:i}):this._SearchResultsService.filterFacets.next(null)}checkHasDeals(e){this.hasDeals=e}_getGridAttributeValue(e){return(null==this.gridElement||null==this.gridElement)&&(this.gridElement=document.getElementById("search-grid_0")),void 0!==this.gridElement&&null!==this.gridElement?this.gridElement.getAttribute(e):""}static{this.ɵfac=function(t){return new(t||e)(lr(Wne),lr(fF),lr(xne),lr(hP),lr(pw),lr(uP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Yne=(()=>{class e{constructor(e,t,i,n,r){this._featureFlagService=e,this._searchResultsService=t,this._buyItAgainService=i,this._appConfigService=n,this._http=r,this._facetsSource=new kt,this.facets=new Tt({}),this.facets$=this.facets.asObservable(),this.currentFacets$=this._facetsSource.asObservable(),this.responseFacetData={},this._responseFacetDataSource=new Tt({}),this.responseFacetData$=this._responseFacetDataSource.asObservable(),this._dataCustomSearchParam=new kt,this.dataCustomSearchParam$=this._dataCustomSearchParam.asObservable(),this._dataSearchType=new kt,this.dataSearchType$=this._dataSearchType.asObservable(),this._summarySource=new kt,this.currentSummary$=this._summarySource.asObservable(),this._productsSource=new Tt([]),this._productsData=new Tt([]),this._currentLeftNavFacets={},this.searchApiUrl="",this.sponsoredProducts="",this.pastPurchase="",this.debugKey="",this.sellerCarousalPosition=1,this.wineCarousalPosition=1,this.crossSellerCarousalPosition=1,this.pageNumber=1,this._enableSection=new Tt(!0),this.enableSection$=this._enableSection.asObservable(),this._ADV_memoryToken="",this.enableMemoryTokenInAisle=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.enableMemoryTokenInAisle,this.enableMemoryTokenInSearch=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.enableMemoryTokenInSearch,this._grsFlagGroups=["a","b","control"],this.dynamicFiltersDisabled=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableDynamicFilters"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableDynamicFilters,this.disableLimitConversationIdFlag=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableLimitConversationId"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableLimitConversationId,this._setupFacetOptions=(e,t,i)=>{let n=[...t],r=[...i];return n.filter((t=>!r.find((i=>"offerType"===e?t.name===i.syntax:t.name===i.name))))},this.facets$.subscribe((e=>{(e?Object.keys(e):[]).length&&(this._currentLeftNavFacets=e)})),this.dataCustomSearchParam$.subscribe((e=>{e&&(this.customSearchParamObj=e)})),this.dataSearchType$.subscribe((e=>{e&&(this.dataSearchTypeObj=e)})),this.isNextPageTokenEnabled=this._featureFlagService.enableNextPageToken(),this.programSearchAPI=window.SWY.CONFIGSERVICE.searchConfig.apimProgramSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimProgramSearchProductsEndpoint}setBloomreach(e,t,i,n,r,s,a){this.searchApiUrl=t.apimPathwayCategoryProductsEndpoint,this.sponsoredProducts="false"==t.showSponsoredProducts?"false":"true",this.pastPurchase=t.showPastPurchaseProducts,this.isDebugKeyEnabled=t.brPastPurchaseDebugKeyFlag,this.debugKey=t.brPastPurchaseDebugKey;let o=window.AB.COMMON.getURLParameterByName("q")?window.AB.COMMON.getURLParameterByName("q"):"";this.bloomreach=new zne({query:o,searchApi:"program-keyword",rows:e>0?e:"",start:i||0,sort:n||this._getDefaultSort(),account_id:t.accountId&&t.accountId.length>0?t.accountId:"",auth_key:t.authKey&&t.authKey.length>0?t.authKey:"",domain_key:t.domainKey&&t.domainKey.length>0?t.domainKey:"",featured:this.sponsoredProducts,pastPurchase:this.pastPurchase,url:this.programSearchAPI,key:t.apimProgramSubscriptionKey&&t.apimProgramSubscriptionKey.length>0?this._appConfigService.getFinalSubscriptionKey(t.apimProgramSubscriptionKey):"",request_type:"search",search_type:"program-keyword",category_id:r,isDebugKeyEnabled:this.isDebugKeyEnabled,debugKey:this.debugKey,widget_id:t.searchOptions&&t.searchOptions["program-keyword"]?.widgetId,availabilityCheck:!0,storeid:window.AB.COMMON.getURLParameterByName("storeid"),search_uid:window.AB.COMMON.getURLParameterByName("search-uid"),channel:window.AB.COMMON.getURLParameterByName("channel"),dvid:t.dvid,crossSellerProductCount:t.crossSellerProductCount,dataMerchBannerEnable:t.dataMerchBannerEnable,showMkpCaurosal:t.showMkpCaurosal,badgePreference:t.badgePreference,badgeList:t.badgeList})}getProgramResults(e,t){t&&(this.storeFlags=t,this.mapPreloadFlagParams()),this.setGuidedSearchParam(),this.setDynamicTilesParam(),this._setSponsoredSpotlightParam(),this.isConversationIdLimited()&&!this.getCqParamFromLocalStorage()&&(this.bloomreach.conversationId="",localStorage.removeItem("conversation")),this.updateConversationId(),this.bloomreach.generateURL(),this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this.addConversationCqParam(),e&&(this.bloomreach.params=this.bloomreach.params.set("q",e));let i=new URLSearchParams(window.location.search);i.get("sellerId")&&(this.bloomreach.params=this.bloomreach.params.set("sellerId",i.get("sellerId"))),this.setVisitorAndSessionId(),this.setVariantOwnBP();let n=this.bloomreach.url?this.bloomreach.url:"",r={headers:this.bloomreach.headers,params:this.bloomreach.params};return this._http.get(this._appConfigService.generateFinalApiUrl(n),r).pipe(bi((e=>
1{let t=e.primaryProducts,i=e.pgmList,n=e.spotlightProducts,r=e.banners,s=new Map;if(this.clearConversationCq(),t){this._searchResultsService.onProductsRetrieved(t),this.emitFacetData(t),this.emitFacetAvailabilityAndOfferTypeData(t),this._searchResultsService._biaFacetExists&&this._buyItAgainService.setSortRules(),this._ADV_memoryToken=t&&t.memoryToken,this._emitSummary(t),this._startPaginationWatching(),t.response&&this._setTrackingState(t.response.disableTracking),this._searchResultsService._updateAnalyticsDataLayer(t,!0,!0,i),this.widget=t&&t.metadata&&t.metadata.widget?t.metadata.widget:{};let n=t?.response?.placementBeacons||null,a=t?.response?.disableTracking||!1,o={placementBeacons:n,products:this._appConfigService.setPlacementBeaconsOnProducts(t?.response?.docs,n,a),productsCounter:t&&t.response&&t.response.numFound?t.response.numFound:0,attribution_token:t&&t.attribution_token?t.attribution_token:null,isExactMatch:t&&t.response&&t.response.isExactMatch,offersData:e.offersData?e.offersData:null,isDisableTracking:t.response.disableTracking};this._setnextPageToken(t),s.set("primaryProducts",o),r&&s.set("bannerData",r),this._productsData.next(o)}return i&&i.forEach((e=>{if("mkp"==e.pgmName&&e?.response?.docs?.length>0){let t=e.order;this.sellerCarousalPosition=t.slice(t.length-1,t.length),s.set("mkpProgramData",e)}else if("wineshop"==e.pgmName&&e?.response?.docs?.length>0){let t=e.order;this.wineCarousalPosition=t.slice(t.length-1,t.length),s.set("wineshopProgramData",e)}else if("mkp-crossseller"==e.pgmName&&e?.response?.docs?.length>0){let t=e.order;this.crossSellerCarousalPosition=t.slice(t.length-1,t.length),s.set("crossSellerProgramData",e)}})),this.processConversationId(t),n&&s.set("spotlightBannerData",n),s})))}_setTrackingState(e=!0){let t=document.getElementById("search-grid_0");if(t){null==t.getAttribute("data-disable-tracking")&&t.setAttribute("data-disable-tracking",String(e));let i=new CustomEvent("search-tracking-enabled",{detail:{pageId:"search-results",isTrackingEnabled:!e}});document.dispatchEvent(i)}}_setSponsoredSpotlightParam(){this.bloomreach.isSpotlightBannerEnabled="true"==this._searchResultsService._getGridAttributeValue("data-inject-spotlight-banner")}setGuidedSearchParam(){let e=!this._featureFlagService.disableConversationalSearch(),t=window.analyticsSwy?.testFlags?.abACIP332315?.toLowerCase()||localStorage.getItem("abACIP332315")?.toLowerCase();this.bloomreach.isGuidedSearch=e&&"b"===t}setDynamicTilesParam(){let e=!this._featureFlagService.disableDynamicFilters(),t=window.analyticsSwy?.testFlags?.abACIP332315?.toLowerCase()||localStorage.getItem("abACIP332315")?.toLowerCase();this.bloomreach.isDynamicTilesSearch=e&&"c"===t}displayBestSellerCarousel(e){e?document.querySelector('[data-carousel-type="bpncurated"]')?.closest(".master-product-carousel.section .slick-product-carousel")?.classList.remove("d-none"):document.querySelector('[data-carousel-type="bpncurated"]')?.closest(".master-product-carousel.section .slick-product-carousel")?.classList.add("d-none")}displayMealsCarousel(e){let t=document.querySelector(".meal-carousel .slick-meal-carousel");e?(t?.classList.remove("d-none"),t?.classList.remove("mask")):t?.classList.add("d-none")}getFilteringResults(e){this.isConversationIdLimited()&&!this.getCqParamFromLocalStorage()&&(this.bloomreach.conversationId="",localStorage.removeItem("conversation")),this.bloomreach.isSearchRequest=!1,this.bloomreach.generateNewFq(),this.pageNumber=1,this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this._searchResultsService._setBIAConfigForGetFilteringResults(e),this.updateEOTParams(),this.setVisitorAndSessionId(!0),this.setVariantOwnBP(),this._setPgmAttribute(),this.addConversationCqParam(),this._searchResultsService._setPromoTypeConfig(),this.searchKeyword&&(this.bloomreach.params=this.bloomreach.params.set("q",this.searchKeyword));let t={headers:this.bloomreach.headers,params:this.bloomreach.params};return this._http.get(this._appConfigService.generateFinalApiUrl(this.bloomreach.url),t).pipe(bi((e=>
1{let t=e.primaryProducts,i=e.pgmList,n={products:[],productsCounter:0};if(this.clearConversationCq(),t){this._searchResultsService.onProductsRetrieved(t),this._setnextPageToken(t),this._ADV_memoryToken=t.memoryToken?t.memoryToken:"",this.emitFacetData(t),this.emitFacetAvailabilityAndOfferTypeData(t),this._emitSummary(t),this.widget=t.metadata&&t.metadata.widget?t.metadata.widget:{};let r=t?.response?.placementBeacons||null,s=t?.response?.disableTracking||!1;n={placementBeacons:r,products:this._appConfigService.setPlacementBeaconsOnProducts(t?.response?.docs,r,s),productsCounter:t.response&&t.response.numFound?t.response.numFound:0,attribution_token:t.attribution_token?t.attribution_token:null,isExactMatch:t&&t.response&&t.response.isExactMatch,offersData:e.offersData?e.offersData:null,disableTracking:!!(t&&t.response&&t.response.disableTracking)&&t.response.disableTracking},this._searchResultsService._updateAnalyticsDataLayer(t,!1,!0,i)}return this.isConversationIdLimited()&&this.processConversationId(t),n})))}getSortingResults(e){this.isConversationIdLimited()&&(this.bloomreach.conversationId="",localStorage.removeItem("conversation")),this.bloomreach.isSearchRequest=!1,this.bloomreach.newSort(e),this.pageNumber=1,this.bloomreach.params=this.bloomreach.params.set("request-id",this._getUTCTimeStampRandom()),this._searchResultsService._setBIAConfigForGetSortingResults(),this.updateEOTParams(),this.setVisitorAndSessionId(!0),this.setVariantOwnBP(),this._setPgmAttribute(),this.clearConversationCq(),this._searchResultsService._setPromoTypeConfig(),this.searchKeyword&&(this.bloomreach.params=this.bloomreach.params.set("q",this.searchKeyword));let t=this.bloomreach.url?this.bloomreach.url:"",i=this._searchResultsService._setURLRequestToPathway();i&&(t=i);let n={headers:this.bloomreach.headers,params:this.bloomreach.params};return this._http.get(this._appConfigService.generateFinalApiUrl(t),n).pipe(bi((e=>{let t,i=e.primaryProducts,n=e.pgmList;return window.AB.isLSEnabled&&localStorage.removeItem("fqParams"),i&&(this._searchResultsService.onProductsRetrieved(i),this._setnextPageToken(i),this._ADV_memoryToken=i.memoryToken?i.memoryToken:"",this.emitFacetData(i),this.emitFacetAvailabilityAndOfferTypeData(i),this._emitSummary(i),this._searchResultsService._updateAnalyticsDataLayer(i,!1,!0,n),this.widget=i.metadata&&i.metadata.widget?i.metadata.widget:{},t=f(h({},i.response),{offersData:e.offersData?e.offersData:null})),this.isConversationIdLimited()&&this.processConversationId(i),t})))}getSellerCarousalPosition(){return this.sellerCarousalPosition}getWineCarousalPosition(){return this.wineCarousalPosition}getCrossSellerCarousalPosition(){return this.crossSellerCarousalPosition}mapPreloadFlagParams(){let e=this.storeFlags.ecomStore;e&&(this.bloomreach.showMkpCaurosal=e.showMkpCaurosal,this.bloomreach.dataMerchBannerEnable=e.dataMerchBannerEnable,this.bloomreach.isMkpStoreFlagEnabled="true"==e.isMKPEnabled,this.bloomreach.isWineStoreFlagEnabled=e.storeFeatures&&1==e.storeFeatures.isWineD2CEnabled,this.bloomreach.wfcStoreId=e.wfcStoreId),this.bloomreach.timezone=this.storeFlags.timezone||"America/Los_Angeles"}setVisitorAndSessionId(e=!1){this.bloomreach.params=this.bloomreach.params.set("visitorId",window.AB.COMMON.getCookie("absVisitorId")),e&&(window.AB.COMMON.setUpdateVisitorIdForGrs(),window.AB.COMMON.setSessionIdForGrs())}isConversationIdLimited(){let e=!this._featureFlagService.disableConversationalSearch(),t=window.analyticsSwy?.testFlags?.abACIP332315?.toLowerCase()||localStorage.getItem("abACIP332315")?.toLowerCase();return e&&"b"===t&&!this.disableLimitConversationIdFlag}updateConversationId(){if(this.bloomreach.isGuidedSearch)if(0==this.bloomreach.generateNewFqFromUrl().length)this.bloomreach.conversationId="",localStorage.removeItem("conversation");else{let e=localStorage.getItem("conversation");if(e){let t=window.AB.COMMON.getURLParameterByName("q"),i=JSON.parse(e);t===i.query?this.bloomreach.conversationId=i.conversationId:localStorage.removeItem("conversation")}}}processConversationId(e){if(this.bloomreach.isGuidedSearch){let t=e?.conversationalResult?.conversationId,i=window.AB.COMMON.getURLParameterByName("q");
1if(t){let e={conversationId:t,query:i};localStorage.setItem("conversation",JSON.stringify(e))}else localStorage.removeItem("conversation");this.bloomreach.conversationId=t}}addConversationCqParam(){let e=this.getCqParamFromLocalStorage();e&&(this.bloomreach.params=this.bloomreach.params.set("cq",e))}getCqParamFromLocalStorage(){let e=null;if(this.bloomreach.isGuidedSearch){let t=localStorage.getItem("conversation");if(t){let i=JSON.parse(t);i?.cq&&(e=i.cq)}}return e}clearConversationCq(){let e=localStorage.getItem("conversation");if(e){let t=JSON.parse(e);t?.cq&&(delete t.cq,localStorage.setItem("conversation",JSON.stringify(t)))}}setVariantOwnBP(){let e=window.analyticsSwy?.testFlags?.ACIP218103?.toLowerCase()||localStorage.getItem("abACIP218103")?.toLowerCase();e&&(this.bloomreach.params=this.bloomreach.params.set("variant",`ACIP218103_${e}`))}updateEOTParams(){window.analyticsSwy&&window.analyticsSwy.testFlags&&"program-keyword"===this.bloomreach.searchApi&&"search"===this.bloomreach.request_type&&window.analyticsSwy.testFlags.EOT_2375&&this._grsFlagGroups.includes(window.analyticsSwy.testFlags.EOT_2375.toLowerCase())&&(this.bloomreach.params=this.bloomreach.params.set("targetsponsoredgridposition",`EOT_2375_${window.analyticsSwy.testFlags.EOT_2375.toLowerCase()}`))}emitFacetData(e){this.responseFacetData=e&&e.facet_counts&&e.facet_counts.facet_fields?e.facet_counts.facet_fields:{},this._searchResultsService.setAllFacetData(this.responseFacetData)}emitFacetAvailabilityAndOfferTypeData(e){if(e&&e.response&&e.response.docs&&e.facet_counts&&e.facet_counts.facet_fields&&e.facet_counts.facet_ranges){let t=Object.assign(e.facet_counts.facet_fields,e.facet_counts.facet_ranges);if(this._currentLeftNavFacets.availability&&this._currentLeftNavFacets.availability.options){let e=t.availability,i=this._currentLeftNavFacets.availability.options;t.availability=[...e?this._setupFacetOptions("availability",e,i):[],...i]}if(this._currentLeftNavFacets.offerType&&this._currentLeftNavFacets.offerType.options){let e=t.offerType,i=this._currentLeftNavFacets.offerType.options;t.offerType=[...e?this._setupFacetOptions("offerType",e,i):[],...i]}this._searchResultsService._facetsSource.next(t)}else this._searchResultsService._facetsSource.next(null)}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}_emitSummary(e){if(this.bloomreach.generateNewQuery(),e){let t={counter:e&&e.response&&e.response.numFound?e.response.numFound:0,query:e&&e.autoCorrectQuery?e.autoCorrectQuery:this.bloomreach.query,misspelled:e&&e.autoCorrectQuery?this.bloomreach.query:null,isProgramSearch:!0};this._searchResultsService._summarySource.next(t)}}_startPaginationWatching(){this.bloomreach.next$.subscribe((e=>{"pathway-search"===this.dataSearchTypeObj.dataSearchType?e.url=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwaySearchProductsEndpoint:"pathway-category"===this.dataSearchTypeObj.dataSearchType&&(e.url=window.SWY.CONFIGSERVICE.searchConfig.apimSearchPath+window.SWY.CONFIGSERVICE.searchConfig.apimPathwayCategoryProductsEndpoint),this.isConversationIdLimited()&&!this.getCqParamFromLocalStorage()&&(this.bloomreach.conversationId="",localStorage.removeItem("conversation")),this.bloomreach.isSearchRequest=!1;let t=(null==this.bloomreach.category_id?this.enableMemoryTokenInSearch:this.enableMemoryTokenInAisle)?this._searchResultsService._updateADVMemoryToken(this.bloomreach.headers,this._ADV_memoryToken):this.bloomreach.headers;this.bloomreach.generateURL(),this._setnextPageTokenParam(),this.setVariantOwnBP(),this.clearConversationCq();let i={headers:t,params:this.bloomreach.params};this._http.get(this._appConfigService.generateFinalApiUrl(e.url),i).subscribe((e=>{let t=[];if(e.primaryProducts&&e.primaryProducts.response&&e.primaryProducts.response.docs&&(t=e.primaryProducts.response.docs),this._setnextPageToken(e.primaryProducts),this._searchResultsService._updateAnalyticsDataLayer(e&&e.primaryProducts?e.primaryProducts:{},!1,!0,e&&e.pgmList?e.pgmList:void 0),this._ADV_memoryToken=e.primaryProducts&&e.primaryProducts.memoryToken?e.primaryProducts.memoryToken:"",this._searchResultsService._productsSource.next({products:t,offersData:e.offersData?e.offersData:null}),this.isConversationIdLimited()){let t=e.primaryProducts;this.processConversationId(t)}}))}))}_getDefaultSort(){let e,t;return window.AB.isLSEnabled&&(e=window.AB.gridDataSource,t=JSON.parse(localStorage.getItem("search_sort_active"))),t&&t.sort&&t.query==window.AB.COMMON.getURLParameterByName("q")?t.sort.field:e?(localStorage.removeItem("search_sort_active"),e.find((e=>"true"==e.selected||1==e.selected))?.field):""}_setPgmAttribute(){let e=[];this.bloomreach.isMkpStoreFlagEnabled&&e.push("intg-search"),this.bloomreach.dataMerchBannerEnable&&e.push("merch-banner"),this.bloomreach.isGuidedSearch&&e.push("guided-search"),this.bloomreach.isDynamicTilesSearch&&e.push("dynamic-tiles"),e.length>0&&(this.bloomreach.params=this.bloomreach.params.set("pgm",e.join(",")))}_setnextPageTokenParam(){this.isNextPageTokenEnabled&&this.bloomreach.nextPageToken&&
1(this.bloomreach.params=this.bloomreach.params.set("nextPageToken",this.bloomreach.nextPageToken))}_setnextPageToken(e){this.isNextPageTokenEnabled&&(this.bloomreach.nextPageToken=e.response&&e.response.miscInfo&&e.response.miscInfo.nextPageToken?e.response.miscInfo.nextPageToken:"")}static{this.ɵfac=function(t){return new(t||e)(lr(uP),lr(Wne),lr(xne),lr(hP),lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Gne=(()=>{class e{constructor(e,t){this._http=e,this.appConfigService=t,this.defaultNoResultsMsg="No products available.",this.renderedProductSource=new Tt([]),this.currentProducts=this.renderedProductSource.asObservable(),this.generalUpdates=new Tt({}),this.generalUpdatesListener=this.generalUpdates.asObservable(),this.activeSortRule=new Tt({}),this.currentSortRule=this.activeSortRule.asObservable(),this.COMMON=window.AB.COMMON,this.windowReload=new FD,this.available=window.AB.availableSorts||[]}publishProducts(e){let t=[];for(let i of e)t[i.id]=i;this.renderedProductSource.next(t)}publishUnAttendDeliveryFlag(e){this.generalUpdates.next({unAttendDeliveryFlag:e})}sortProducts(e){this.activeSortRule.next(e)}addPaginationUrl(e,t){if(window.AB.COMMON.getURLParameterByName("page",!0)){if(""!==e){let i=parseInt(window.AB.COMMON.getURLParameterByName("page",!0));window.history.pushState("","",location.href.replace("page="+i,"page="+e)),1==e&&t&&this.windowReload.locationReload()}}else window.history.pushState("","",location.pathname+"?page="+e)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Kne=(()=>{class e{constructor(e){this.http=e,this._urlParam=window.AB.COMMON.getURLParameterByName("aisle-level-4",!1),this._selectedForFilteringSource=new Tt([]),this.currentFiltering$=this._selectedForFilteringSource.asObservable(),this.filterResultSource=new Tt([]),this.filterResult=this.filterResultSource.asObservable(),this.loadingSpinnerSource=new Tt([]),this.loadingSpinner=this.loadingSpinnerSource.asObservable()}setNewProducts(e){return e.productsinfo}filterMultipleProducts(e,t,i){return t.filter((e=>i.includes(e.aisleId.split("1_")[1])))}setInitialProducts(e,t){return 0==t.length?t=e:t}addFilters(e,t=null,i=null){let n="",r="";if(window.AB.COMMON.getURLParameterByName("sort",!0)&&(n="&sort="+window.AB.COMMON.getURLParameterByName("sort",!0),window.AB.COMMON.removeURLParameterByName("sort")),window.AB.COMMON.getURLParameterByName("page",!0)&&(r="page=1",window.AB.COMMON.removeURLParameterByName("page")),this._selectedForFilteringSource.next(e),4!=i||e.length>1||0==e.length){let e="?aisle-level-4=",s="";if(t)if(t.forEach((e=>{s+=""!=s?encodeURIComponent("|")+encodeURIComponent(e):encodeURIComponent(e)})),""!=s?e+=s:e=location.pathname,4==i){let t=window.location.href;t=t.substr(0,t.lastIndexOf("/")),t+="."+window.AB.userInfo.branchId+".html",t+=e,e.indexOf("aisle-level-4")>-1?window.location.href=t+"&"+r+n:window.location.href=t+"?"+r+n}else e.indexOf("aisle-level-4")>-1?window.history.pushState("","",e+"&"+r+n):window.history.pushState("","",e+"?"+r+n);else if(4==i){let e=window.location.href;e=e.substr(0,e.lastIndexOf("/")),e+="."+window.AB.userInfo.branchId+".html",window.location.href=e}else window.history.pushState("","",location.pathname+"?"+r+n)}}checkUrlShelfs(){let e=window.AB.COMMON.getURLParameterByName("aisle-level-4",!0);return!!e&&e.split("|")}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Qne=(()=>{class e{constructor(e,t,i){this._http=e,this._searchResultsService=t,this._appConfigService=i,this.url="",this.view_id=encodeURIComponent(window.AB.userInfo.branchId),this.br_uid_2=encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),this.params=new Ky,this.headers=new jy,this.query="*",this.sort="",this.page=0,this.start=0,this.hostName=window.location.origin,this.randomNumber=Math.floor(1e12+9e12*Math.random()).toString(),this.request_type="search",this.search_type="keyword",this.category_id="keyword",this.featured="",this.rows=150,this.clubCard=window.AB.userInfo.clubCard?encodeURIComponent(window.AB.userInfo.clubCard):"",this.elevateSessionId=encodeURIComponent(window.AB.COMMON.getCookie("_elevaate_session_id")),this.isMarketPlaceItem="only",this.markePlaceCarouselData=new Tt({}),this.xs=480,this._marketplaceCarousalAvailable=new Tt(!1),this.marketplaceCarousalAvailable$=this._marketplaceCarousalAvailable.asObservable(),this._dataSearchType="keyword",this._handleBannerParameter=()=>{let e=window.AB?.userInfo?.banner;e&&(this.params=this.params.has("banner")?this.params.set("banner",e):this.params.append("banner",e))}}getMarketPlaceSellers(){this._marketplaceCarousalAvailable.next(!0),this.query=this.getSearchKeyword(),this.generateURL(),this.headers=this.headers.set("Ocp-Apim-Subscription-Key",window.SWY.CONFIGSERVICE.searchConfig?.apimSubscriptionKey);let e=window.SWY?.CONFIGSERVICE?.searchConfig?.apimSearchPath+window.AB?.marketPlaceSellerCarouselEndPoint,t={headers:this.headers,params:this.params};this._http.get(e,t).subscribe((e=>this.markePlaceCarouselData.next(e)))}getSearchKeyword(){let e=new URL(window.location.href);return e.searchParams.has("q")?e.searchParams.get("q"):"*"}initSlick(e){let t,i=$(window).width()<=this.xs;$("meta[name=template]")&&$("meta[name=template]").attr("content");$(e).find(".carousel-content-wrapper").not(".slick-initialized").slick({tail:!0,dots:i,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,arrows:!i}).on("beforeChange",(function(i,n,r,s){if(r<s){let i='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).last(
1).attr("data-slick-index"))+1)+'"]',n=$(i,$(e));n&&setTimeout((()=>n.focus()),0),t="next"}else{let i='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).first().attr("data-slick-index"))-1)+'"]',n=$(i,$(e));n&&setTimeout((()=>n.focus()),0),t="prev"}}))}setAriaLabelForProductCarousel(e,t){let i=e.querySelector(".slick-next"),n=e.querySelector(".slick-prev"),r="Next "+t,s="Previous "+t;null!=i&&(i.setAttribute("aria-label",r),n.setAttribute("aria-label",s))}generateURL(){let e=window.AB.COMMON.getUserChannel(),t=this._appConfigService.getInventoryParameterName();this.params=this.params.set("request-id",this.randomNumber).set("url",this.hostName).set("pageurl",this.hostName).set("pagename",this.request_type).set("rows",String(this.rows)).set("start",String(this.start)).set("search-type",this.search_type).set("storeid",this.view_id).set("featured",this.featured).set("search-uid",this.br_uid_2).set("q",this.query).set("sort",this.sort).set("userid",this.clubCard).set("featuredsessionid",this.elevateSessionId).set("screenwidth",$(window).width()).set("isMarketplaceItem",this.isMarketPlaceItem).set("channel",e).set("zipcode",window.AB.userInfo.zipcode).set("timezone",window.AB.storeFlagsData.flags.timezone||"America/Los_Angeles").set("fq",t+':"1"OR"2"'),this._handleBannerParameter()}setSellerImage(e){return`https://images.albertsons-media.com/is/image/ABS/mkp-${e}-logo?$mkp-seller-logo-desktop$&defaultImage=Not_Available`}setSearchType(e){this._dataSearchType=e}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Wne),lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Jne="search-results",Zne="product-details";var Xne=(()=>{class e{constructor(e,t){this._http=e,this._appConfigService=t}getVideoAdContent(e,t,i="",n="",r,s,a){if(AB&&AB.spotlightVideoEndpoint&&AB.wcaxXapiApimKey){let r=AB.COMMON.getCookie("AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg"),o=this.getVideoSpotlightEndpointUrl(AB.spotlightVideoEndpoint,e,t,i,n,s,a),l=(new jy).set("ocp-apim-subscription-key",AB.wcaxXapiApimKey);return AB.COMMON.authorize()&&(l=l.set("token",`Bearer ${AB.userInfo.SWY_SHOP_TOKEN}`)),r&&(l=l.set("x-sid",r)),this._http.get(o,{headers:l}).pipe(bi((t=>{if(t&&t.response?.docs&&t.response?.docs.length>0){let i,n=t.response;return e===Jne&&(i={product:f(h({},n.docs[0]),{isVideoProduct:!0}),video:n.content,isVideoAd:!0,placementBeacons:n.placementBeacons,pid:n.docs[0].pid,offersData:n.offersData}),e===Zne&&(i={products:n.docs,video:n.content,placementBeacons:n.placementBeacons,offersData:n.offersData}),this._appConfigService.sendSponsoredProductsOnloadEvent(n.docs,"SPA-VideoComponent",void 0,n.placementBeacons,!1),i}{let e=t&&t.response?.placementBeacons;return e?this._appConfigService.sendSponsoredProductsOnloadEvent([],"SPA-VideoComponent","SPA-VideoNotLoaded",e,!1):console.warn("No placement beacons found for video ad"),console.warn("No response found for video ad"),null}})),$i((e=>(console.error("Error fetching video ad:",e),mi((()=>new Error("Error fetching video ad")))))))}return mi((()=>new Error("Path or subscription key missing in config")))}getVideoSpotlightEndpointUrl(e,t,i,n="",r="",s,a){let o=new URLSearchParams({source:"web",origin:"web",banner:AB.userInfo.banner,view:t,position:"video"+i,storeId:AB.userInfo.branchId,channel:window.AB.COMMON.getUserChannel(),includeOffer:"true"});if(o.get("view")===Jne){let e=new URL(window.location.href).searchParams.get("q");e&&o.append("q",e)}return o.get("view")===Zne&&(o.set("position",`videoh${i}`),o.set("bpn",n),r&&o.set("taxonomyPath",r)),s&&a&&o.set(s,a),`${e}?${o.toString()}`}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),ere=function(e){return e.Success="Success",e.Error="Error",e.Warning="Warning",e.Info="Info",e}(ere||{}),tre=function(e){return e.REMOVE_ITEM="Item Removed",e.REMOVE_CTA="Remove",e.REMOVE_ACTION_MSG="Request sent to shopper to add {{quantity}} {{productName}}",e.GOTOCHAT_CTA="Go to chat",e.GOTOCHAT_MSG="Currently we are unable to remove the item.Please contact your shopper via chat to remove.",e.REMOVE_ACTION_MSG_FOR_RESTRICTED_ITEM="A request was sent to your shopper to add {{quantity}} {{productName}}.Someone 21 and over with valid ID must be present to accept this order.",e.TRY_AGAIN_CTA="Try again",e.TRY_AGAIN_MSG="Sorry, we werenât able to add this item. Please try again.",e}(tre||{}),ire=class{static formatRemoveActionMessage(e,t,i){return(i?tre.REMOVE_ACTION_MSG_FOR_RESTRICTED_ITEM:tre.REMOVE_ACTION_MSG).replace("{{quantity}}",e.toString()).replace("{{productName}}",t)}static getErrorMessageBasedOnErrorCode(e){let t={message:"Request timed out. We were unable to add the item. Please try again.",cta:tre.TRY_AGAIN_CTA},i={message:tre.TRY_AGAIN_MSG,cta:tre.TRY_AGAIN_CTA};switch(String(e?.errorCode||e?.statusCode)){case"4001":case"4003":case"4005":case"4006":case"4007":case"4008":case"4009":case"500":case"404":return i;case"4002":return{message:"Sorry, shopper completed shopping your order. We can no longer accept changes.",cta:""};case"4004":return{message:e?.errorMessage,cta:""};default:return t}}},nre=(e,t)=>
1[e,t],rre=e=>({top:e}),sre=(e,t)=>({maxWidth:e,"background-color":t});function are(e,t){1&e&&(Ef(0),Tf(1,"span",10),Df())}function ore(e,t){1&e&&(Ef(0),Tf(1,"span",11),Df())}function lre(e,t){1&e&&(Ef(0),Tf(1,"span",12),Df())}function cre(e,t){1&e&&(Ef(0),Tf(1,"span",13),Df())}function dre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",14),jf("click",(function(){return Wa(e),Ha(Yf(2).interactiveElementEvent())}))("keyup.Enter",(function(){return Wa(e),Ha(Yf(2).interactiveElementEvent())})),am(2),xf(),Df()}if(2&e){let e=Yf(2);Vd(2),lm(e.data.interactiveElement)}}function ure(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"div",4)(2,"div",5),ph(3,are,2,0,"ng-container",2)(4,ore,2,0,"ng-container",2)(5,lre,2,0,"ng-container",2)(6,cre,2,0,"ng-container",2),xf(),kf(7,"span",6),am(8),xf(),kf(9,"div",7),am(10),ph(11,dre,3,1,"ng-container",2),xf(),kf(12,"button",8),jf("click",(function(){return Wa(e),Ha(Yf().closeToasterEvent())}))("keyup.Enter",(function(){return Wa(e),Ha(Yf().closeToasterEvent())})),Tf(13,"span",9),xf()()()}if(2&e){let e=Yf();zh("ngClass",Bm(10,nre,"ppms"===(null==e.data?null:e.data.calledBy)?"popup--toaster--ppms":"popup--toaster",null==e.options?null:e.options.class))("ngStyle",Om(13,rre,"quantity-stepper-v3"===(null==e.data?null:e.data.calledBy)?null==e.options?null:e.options.top:"")),Vd(3),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Success),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Warning),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Error),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Info),Vd(2),dm(" ",null==e.data?null:e.data.message,", ",e.data.interactiveElement," "),Vd(2),cm(" ",null==e.data?null:e.data.message," "),Vd(),zh("ngIf",null==e.data?null:e.data.interactiveElement)}}function pre(e,t){1&e&&(Ef(0),Tf(1,"span",22),Df())}function hre(e,t){1&e&&(Ef(0),Tf(1,"span",23),Df())}function fre(e,t){1&e&&(Ef(0),Tf(1,"span",24),Df())}function mre(e,t){1&e&&(Ef(0),Tf(1,"span",25),Df())}function gre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",26)(2,"button",27),jf("click",(function(){return Wa(e),Ha(Yf(2).interactiveElementEvent())}))("keyup.Enter",(function(){return Wa(e),Ha(Yf(2).interactiveElementEvent())})),am(3),xf()(),Df()}if(2&e){let e=Yf(2);Vd(2),gh("aria-label",null==e.data?null:e.data.interactiveElement),Vd(),lm(null==e.data?null:e.data.interactiveElement)}}function bre(e,t){if(1&e){let e=Mf();kf(0,"div",15),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeyDown(t))})),kf(1,"div",16)(2,"div",17),ph(3,pre,2,0,"ng-container",2)(4,hre,2,0,"ng-container",2)(5,fre,2,0,"ng-container",2)(6,mre,2,0,"ng-container",2),xf(),kf(7,"span",6),am(8),xf(),kf(9,"div",18)(10,"p",19),am(11),xf()(),kf(12,"button",20),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.closeToasterEvent(null,"order-amends-ota"===(null==t.data?null:t.data.title)&&(null==t.data?null:t.data.type)===t.toasterTypeEnum.Success))}))("keyup.Enter",(function(){Wa(e);let t=Yf();return Ha(t.closeToasterEvent(null,"order-amends-ota"===(null==t.data?null:t.data.title)&&(null==t.data?null:t.data.type)===t.toasterTypeEnum.Success))})),Tf(13,"span",21),xf()(),ph(14,gre,4,2,"ng-container",2),xf()}if(2&e){let e=Yf();zh("ngClass",Bm(9,nre,"ppms"===(null==e.data?null:e.data.calledBy)?"popup--toaster--ppms":"popup--toaster",null==e.options?null:e.options.class)),Vd(3),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Success),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Warning),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Error),Vd(),zh("ngIf",(null==e.data?null:e.data.type)===e.toasterTypeEnum.Info),Vd(2),dm(" ",null==e.data?null:e.data.message,", ",e.data.interactiveElement," "),Vd(3),cm(" ",null==e.data?null:e.data.message,""),Vd(3),zh("ngIf",null==e.data?null:e.data.interactiveElement)}}function yre(e,t){if(1&e){let e=Mf();kf(0,"div",36)(1,"label",37)(2,"span",38),am(3),xf(),kf(4,"input",39),jf("click",(function(){Wa(e);let t=Yf(2);return t.trackAnalyticsEvents("opted-in","checkbox",t.isLearnMoreExpanded),Ha(t.onClickOfCheckbox())})),xf(),kf(5,"span",40),Tf(6,"span",41),xf()()()}if(2&e){let e=Yf(2);
1Vd(3),lm(null==e.data?null:e.data.checkBoxLabel),Vd(),zh("checked",e.isChecked)}}function vre(e,t){if(1&e&&(kf(0,"div",42),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",null==e.data?null:e.data.headerText," ")}}function wre(e,t){if(1&e){let e=Mf();kf(0,"div",42),am(1),kf(2,"a",43),jf("click",(function(){return Wa(e),Ha(Yf(2).onClickExpandCollapse())}))("keydown",(function(t){return Wa(e),Ha(Yf(2).onLearnMoreKeyDown(t))})),am(3,"Learn more "),Tf(4,"span",44),xf()()}if(2&e){let e=Yf(2);Vd(),cm(" ",null==e.data?null:e.data.unsubscribeText," "),Vd(),gh("aria-label",e.learnMoreAriaLabel)("aria-expanded",e.isLearnMoreExpanded)}}function _re(e,t){if(1&e){let e=Mf();kf(0,"div",45)(1,"button",46),jf("click",(function(){Wa(e);let t=Yf(2);return t.trackAnalyticsEvents("opted-out",void 0,t.isLearnMoreExpanded),Ha(t.closeToasterEvent(null==t.data?null:t.data.closeAction))})),Tf(2,"span",47),xf()()}if(2&e){let e=Yf(2);Vd(),gh("aria-label",(null==e.data?null:e.data.closeButtonAriaLabel)||"Close")}}function Sre(e,t){if(1&e){let e=Mf();kf(0,"div",45)(1,"button",46),jf("click",(function(){Wa(e);let t=Yf(2);return t.trackAnalyticsEvents("opted-in",void 0,t.isLearnMoreExpanded),Ha(t.closeToasterEvent(null==t.data?null:t.data.approveAction))})),Tf(2,"span",48),xf()()}if(2&e){let e=Yf(2);Vd(),gh("aria-label",(null==e.data?null:e.data.acceptButtonAriaLabel)||"Accept")}}function Cre(e,t){if(1&e&&(kf(0,"div",49)(1,"p",50),am(2),xf()()),2&e){let e=Yf(2);Vd(2),lm(null==e.data?null:e.data.learnMoreText)}}function Ire(e,t){if(1&e){let e=Mf();kf(0,"div",51)(1,"button",52),jf("click",(function(){Wa(e);let t=Yf(2);return t.trackAnalyticsEvents("save",void 0,t.isLearnMoreExpanded),Ha(t.closeToasterEvent(null==t.data?null:t.data.approveAction))})),am(2,"Save"),xf()()}}function Are(e,t){if(1&e&&(Ef(0),kf(1,"div",28)(2,"div",29)(3,"div",30),ph(4,yre,7,2,"div",31)(5,vre,2,1,"div",32)(6,wre,5,3,"div",32),xf(),ph(7,_re,3,1,"div",33)(8,Sre,3,1,"div",33),xf(),ph(9,Cre,3,1,"div",34)(10,Ire,3,0,"div",35),xf(),Df()),2&e){let e=Yf();Vd(),zh("ngStyle",Bm(8,sre,null==e.data?null:e.data.width,null==e.data?null:e.data.bgColor)),Vd(3),zh("ngIf",null==e.data?null:e.data.hasCheckBox),Vd(),zh("ngIf",""!==(null==e.data?null:e.data.headerText)),Vd(),zh("ngIf",""!==(null==e.data?null:e.data.unsubscribeText)),Vd(),zh("ngIf",null==e.data?null:e.data.hasCloseButton),Vd(),zh("ngIf",null==e.data?null:e.data.hasAcceptButton),Vd(),zh("ngIf",e.isLearnMoreExpanded),Vd(),zh("ngIf",(null==e.data?null:e.data.hasSaveButton)&&e.isLearnMoreExpanded)}}var kre=(()=>{class e{constructor(e,t){this.elementRef=e,this._commonService=t,this.isOpen=!1,this.isToasterALV2=!1,this.closeToaster=new _l,this.isChecked=!1,this.isLearnMoreExpanded=!1,this.toasterTypeEnum=ere}ngOnInit(){setTimeout((()=>{"order-amends-ota"===this.data.title?$("#toasterCloseBtnv2").focus():this.data.interactiveElementLink?$("#toasterIntElem").focus():$("#toasterMessagev2").focus(),this.trackAnalyticsEventsOnLoad()}),200)}onMouseUp(e){this.isOpen&&!this.elementRef.nativeElement.contains(e.target)&&"order-amends-ota"!==this.data.title&&this.closeToasterEvent()}closeToasterEvent(e=null,t=!1){this.closeToaster.emit({shouldCallCallback:t,callBackAction:e||{}}),this.isLearnMoreExpanded&&(this.isLearnMoreExpanded=!1),this.isChecked&&(this.isChecked=!1),!e&&("email_optin_success"===this.data.toastType||"text_optin_success"===this.data.toastType)&&this.trackAnalyticsEvents("confirm")}onKeyDown(e){this._commonService.handleTabFocus(e,"#toasterAlV2",document.getElementById("toasterAlV2").parentElement,"button:not([disabled])")}interactiveElementEvent(){this.data.interactiveElementLink?window.open(this.data.interactiveElementLink):"order-amends-ota"===this.data.title?("Go to chat"===this.data.interactiveElement&&this._commonService.dispatchCustomOneTimeEvent("productCardComponentUpdate","goToChat",{}),this.closeToasterEvent(this.data.interactiveElement,!0)):(this.closeToasterEvent(null,!0),this._commonService._toasterInteractiveElement.next(!0))}rollBackFocusClose(){$("#toasterTextBtn").focus()}onClickOfCheckbox(){this.isChecked=!this.isChecked,this.isLearnMoreExpanded=!this.isLearnMoreExpanded}onClickExpandCollapse(){this.isLearnMoreExpanded=!this.isLearnMoreExpanded,this.trackAnalyticsEvents("learn-more")}onLearnMoreKeyDown(e){("Enter"===e.key||" "===e.key||"Spacebar"===e.key)&&
1(e.preventDefault(),this.onClickExpandCollapse())}get learnMoreAriaLabel(){return"Learn more about weekly ads and "+(0===this.data?.toastType?.indexOf("text")?"promotional text messages":"promotional emails")}trackAnalyticsEvents(e,t,i){if(window&&window.AB&&window.AB.DATALAYER&&e){let n="weeklyad"===this.data?.calledBy?"weekly-ad":"account"===this.data?.calledBy?"account":"",r=i||this.isLearnMoreExpanded;("checkbox"===t&&!this.isChecked||"checkbox"!==t)&&("confirm"===e&&window.appEventData&&-1!=window.appEventData[window.appEventData.length-1]?.link?.linkName?.indexOf("exp-")&&(r=!0),window.AB.DATALAYER.setLinkClickEvents(`${n}|${r?"exp-":""}${"email_optin"===this.data?.toastType||"email_optin_success"===this.data.toastType?"email":"text_optin"===this.data?.toastType||"text_optin_success"===this.data.toastType?"sms":""}-${e}`,!0))}}trackAnalyticsEventsOnLoad(){if("order-amends-ota"===this.data.title&&window&&window.AB&&window.AB.DATALAYER){let e=(this.data.message||"").toLowerCase().replace(/\s+/g,"-");window.AB.DATALAYER.setUserMessageEvents(`toast|${e}`)}}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["app-toaster-al-v1"]],hostBindings:function(e,t){1&e&&jf("click",(function(e){return t.onMouseUp(e)}),0,ld)},inputs:{data:"data",options:"options",isOpen:"isOpen",isToasterALV2:"isToasterALV2"},outputs:{closeToaster:"closeToaster"},decls:3,vars:3,consts:[["class","popup popup-dark","role","alert",3,"ngClass","ngStyle",4,"ngIf"],["class","pds-toasts pds-toasts-content","role","alert","id","toasterAlV2","aria-live","polite",3,"ngClass","keydown",4,"ngIf"],[4,"ngIf"],["role","alert",1,"popup","popup-dark",3,"ngClass","ngStyle"],[1,"popup__content"],[1,"popup__content__icon"],["id","toasterDescription",1,"sr-only"],["id","toasterMessagev2",1,"popup__content__text","body-text-xs"],["id","toasterCloseBtnv2","aria-label","Close","aria-describedby","toasterDescription",1,"close-toaster-btn","popup__close-btn",3,"click","keyup.Enter"],[1,"svg-icon","svg-close-white"],[1,"svg-icon","svg-success-filled"],[1,"svg-icon","svg-warning-filled"],[1,"svg-icon","svg-error-filled"],["aria-label","information",1,"svg-icon","svg-info-filled"],["id","toasterIntElem",1,"popup__content__text__interactive-btn",3,"click","keyup.Enter"],["role","alert","id","toasterAlV2","aria-live","polite",1,"pds-toasts","pds-toasts-content",3,"keydown","ngClass"],[1,"d-flex"],[1,"mr-2"],["id","toasterMessagev2","aria-hidden","true",1,"pds-toasts__body","ml-1"],[1,"text-m--snow","m-0"],["id","toasterCloseBtnv2","aria-label","Close","aria-describedby","toasterDescription",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--inverse-neutral","d-flex","align-items-center","justify-content-center","pds-toasts__close",3,"click","keyup.Enter"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--inverse-neutral__icon"],["aria-hidden","true",1,"pds-svg-positive-icon_inverse"],["aria-hidden","true",1,"pds-svg-warning-icon_inverse"],["aria-hidden","true",1,"pds-svg-error-icon-large_inverse"],["aria-hidden","true",1,"pds-svg-info-icon_inverse"],[1,"pds-toasts__footer","pt-2","ml-auto"],["id","toasterIntElem",1,"pds-btn","pds-btn-size__small","pds-btn-outlined--inverse-neutral","pds-toasts__button","d-flex","align-items-center","justify-content-center",3,"click","keyup.Enter"],[1,"popup","mx-auto","d-flex","flex-column",3,"ngStyle"],[1,"popup__content","d-flex","w-100"],[1,"popup__content__text","w-100"],["class","checkbox w-100",4,"ngIf"],["class","body-text-xs ml-4",4,"ngIf"],["class","popup__content__buttons my-auto",4,"ngIf"],["class","popup__content w-100 py-0",4,"ngIf"],["class","mx-auto pb-2",4,"ngIf"],[1,"checkbox","w-100"],["for","checkboxMediumLabel","aria-label","Checkbox Label",1,"checkbox__group"],[1,"checkbox__label","checkbox__label--md","w-100"],["type","checkbox","id","checkboxMediumLabel",1,"checkbox__input",3,"click","checked"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],[1,"body-text-xs","ml-4"],["role","button","tabindex","0",3,"click","keydown"],["aria-hidden","true",1,"svg-caret-down"],[1,"popup__content__buttons","my-auto"],["type","button",1,"btn","bg-white","btn-circle--sm",3,"click"],["aria-hidden","true",1,"svg-icon","svg-close-primary"],["aria-hidden","true",1,"svg-icon","svg-checkmark"],[1,"popup__content","w-100","py-0"],[1,"body-text-xs"],[1,"mx-auto","pb-2"],[1,"btn","btn-sm","pds-btn-outlined--primary",3,"click"]],template:function(e,t){1&e&&ph(0,ure,14,15,"div",0)(1,bre,15,12,"div",1)(2,Are,11,11,"ng-container",2),2&e&&(zh("ngIf","weeklyad"!==(null==t.data?null:t.data.calledBy)&&!t.isToasterALV2),Vd(),zh("ngIf","weeklyad"!==(null==t.data?null:t.data.calledBy)&&t.isToasterALV2),Vd(),zh("ngIf","weeklyad"===(null==t.data?null:t.data.calledBy)&&t.isOpen))},dependencies:[sy,cy,gy],styles:[".pds-toasts-content[_ngcontent-%COMP%]{z-index:1050}"]})}}return e})(),xre=(()=>{class e{constructor(e,t,i){this.componentFactoryResolver=e,this.appRef=t,this.injector=i,this.toasterRef=null}show(e,t={top:"8vh"},i=e=>{}
1,n=!1){let r=this.componentFactoryResolver.resolveComponentFactory(kre).create(this.injector),s=e.autoCloseTime||0;r.instance.data=e,r.instance.options=t,r.instance.isToasterALV2=n,this.toasterRef={ref:r,close:(e=!1)=>{l(e)}};let a,o=e.prevIdToFocus?$(`#${e.prevIdToFocus}`):null;setTimeout((()=>{r.instance.isOpen=!0})),s&&(a=setTimeout((()=>{l(!0)}),s));let l=e=>{a&&clearTimeout(a),r.instance.isOpen=!1,this.appRef.detachView(r.hostView),e&&i&&i(),o&&o.length&&setTimeout((()=>o.focus()),0),r.destroy()};r.instance.closeToaster.subscribe((e=>{a&&clearTimeout(a),this.appRef.detachView(r.hostView),e?.shouldCallCallback&&i&&i(e?.callBackAction),o&&o.length&&setTimeout((()=>o.focus()),0),r.destroy()})),this.appRef.attachView(r.hostView);let c=r.hostView.rootNodes[0];document.body.appendChild(c)}static{this.ɵfac=function(t){return new(t||e)(lr(lp),lr(sg),lr(fl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Tre=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[xre],imports:[Ly]})}}return e})();function Pre(e,t){if(1&e&&(kf(0,"span",30),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.featurePointTitle)}}function Ere(e,t){if(1&e&&(kf(0,"span",31),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.featurePointDescription)}}function Dre(e,t){if(1&e&&(kf(0,"div",24)(1,"div",25),Tf(2,"span",26),xf(),kf(3,"div",27),ph(4,Pre,2,1,"span",28)(5,Ere,2,1,"span",29),xf()()),2&e){let e=t.$implicit;Vd(4),zh("ngIf",e.featurePointTitle),Vd(),zh("ngIf",e.featurePointDescription)}}function Ore(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",2),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeydownEvent(t,"#info-modal"))})),kf(2,"div",3)(3,"div",4)(4,"div",5)(5,"button",6),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:learn-more|close"))})),Tf(6,"span",7),xf()(),kf(7,"div",8)(8,"div",9)(9,"div",10)(10,"div",11),Tf(11,"img",12),kf(12,"span",13),Tf(13,"span",14),xf()(),kf(14,"h1",15),am(15),xf(),kf(16,"h2",16),am(17),xf()()(),kf(18,"div",17),ph(19,Dre,6,2,"div",18),xf()(),kf(20,"div",19)(21,"div",20)(22,"button",21),jf("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:learn-more|got-it"))})),am(23),xf()(),kf(24,"div",22)(25,"a",23),jf("click",(function(){return Wa(e),Ha(Yf().analyticsLinkClick("faqs"))})),am(26),xf()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",e.dataConfig.showModal?"show d-block":"d-none"),gh("aria-hidden",!e.dataConfig.showModal),Vd(10),Jf("src",null==e.dataConfig.contents?null:e.dataConfig.contents.featureLogo,id),Xf("alt","",null==e.dataConfig.contents?null:e.dataConfig.contents.snsText," ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer,""),Vd(4),dm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsText," ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer," "),Vd(2),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.featureSubHeader," "),Vd(2),zh("ngForOf",null==e.dataConfig.contents?null:e.dataConfig.contents.featurePoints),Vd(4),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.featureButtonLabel),Vd(2),Jf("href",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLink,id),gh("aria-label",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLinkText),Vd(),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLinkText," ")}}function Bre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",43)(2,"input",44),mm("ngModelChange",(function(t){Wa(e);let i=Yf(2);return fm(i.formModel.frequency,t)||(i.formModel.frequency=t),Ha(t)})),jf("change",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).clickFrequency(t.count))})),xf(),kf(3,"label",45),am(4),xf()(),Df()}if(2&e){let e=t.$implicit,i=Yf(2);Vd(2),zh("value",e.count),hm("ngModel",i.formModel.frequency),gh("id","frequencyLabel"+e.count),Vd(),gh("for","frequencyLabel"+e.count),Vd(),cm(" ","Every "+e.displayFrequency," ")}}function Mre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",32),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeydownEvent(t,"#frequency-modal"))})),kf(2,"div",3)(3,"form",null,0)(5,"div",33)(6,"div",34)(7,"div",35)(8,"h1",36),am(9),xf(
1),kf(10,"button",37),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:frequency|close"))})),Tf(11,"span",7),xf()(),kf(12,"h2",38),am(13),xf()(),kf(14,"div",39)(15,"div",40),ph(16,Bre,5,5,"ng-container",41),xf()(),kf(17,"div",19)(18,"div",20)(19,"button",42),jf("click",(function(){return Wa(e),Ha(Yf().saveFrequency())})),am(20),xf()(),kf(21,"div",22)(22,"a",23),jf("click",(function(){return Wa(e),Ha(Yf().analyticsLinkClick("faqs"))})),am(23),xf()()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",e.dataConfig.showModal?"show d-block":"d-none"),gh("aria-hidden",!e.dataConfig.showModal),Vd(8),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.frequencyHeader," "),Vd(4),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.frequencySubHeader),Vd(3),zh("ngForOf",e.dataConfig.frequencies),Vd(4),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.frequencyButtonLabel," "),Vd(2),Jf("href",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLink,id),gh("aria-label",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLinkText),Vd(),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.footerLinkText," ")}}function Rre(e,t){if(1&e&&(kf(0,"div",70),Tf(1,"div",71),kf(2,"div",72),am(3),qm(4,"date"),xf()()),2&e){let e=Yf(2);Vd(),zh("ngClass","DUG"===e.dataConfig.nextFulfillmentType?"svg-pickup":"svg-delivery"),Vd(2),dm("","dug"===e.dataConfig.nextFulfillmentType?null==e.dataConfig.contents?null:e.dataConfig.contents.footerNextFulfillmentPickup:null==e.dataConfig.contents?null:e.dataConfig.contents.footerNextFulfillmentDelivery,": ",jm(4,3,e.dataConfig.nextFulfillmentDate,"MMM. dd"),"")}}function Lre(e,t){if(1&e&&(kf(0,"option",73),am(1),xf()),2&e){let e=t.$implicit;zh("id","frequencyLabel"+e.count)("value",e.count),Vd(),lm("Every "+e.displayFrequency)}}function Fre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",46),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeydownEvent(t,"#add-recurring-order-modal"))})),kf(2,"div",3)(3,"div",47)(4,"div",34)(5,"div",35)(6,"h1",48),am(7),xf(),kf(8,"button",37),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:adding-to-recurring-order|close"))})),Tf(9,"span",7),xf()(),kf(10,"h2",49),am(11),xf()(),kf(12,"div",50)(13,"div",51)(14,"div",52),Tf(15,"img",53),xf(),kf(16,"div",54)(17,"div",55),am(18),xf(),kf(19,"div",56),am(20),xf(),ph(21,Rre,5,6,"div",57),xf()(),kf(22,"div",58)(23,"quantity-stepper-al-v1",59),jf("updateQscQtyEmitter",(function(t){return Wa(e),Ha(Yf().getUpdatedQty(t))})),xf(),kf(24,"div",60)(25,"div",61)(26,"label",62)(27,"select",63),jf("change",(function(t){return Wa(e),Ha(Yf().saveRecurringFreq(t.target.value))})),ph(28,Lre,2,3,"option",64),xf(),kf(29,"span",65),am(30,"Frequency"),xf()()()()()(),kf(31,"div",66)(32,"div",67)(33,"button",68),jf("click",(function(){Wa(e);let t=Yf();return t.saveRecurringDetails(),Ha(t.analyticsSnsModalClick("ar:subscribe-schedule-and-save-plp|subscribed"))})),am(34),xf(),kf(35,"button",69),jf("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:adding-to-recurring-order|not-now"))})),am(36),xf()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",e.dataConfig.showModal?"show d-block":"d-none"),gh("aria-hidden",!e.dataConfig.showModal),Vd(6),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.addRecurHeader," "),Vd(4),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.addRecurMessage),Vd(4),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.dataConfig.product.id,"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available",id),Jf("alt",e.dataConfig.product.name),Vd(3),lm(null==e.dataConfig?null:e.dataConfig.ecomDescription),Vd(2),cm(" ",e.dataConfig.product.name,""),Vd(),zh("ngIf",0!==(null==e.dataConfig||null==e.dataConfig.nextFulfillmentType?null:e.dataConfig.nextFulfillmentType.length)&&0!==(null==e.dataConfig||null==e.dataConfig.nextFulfillmentDate?null:e.dataConfig.nextFulfillmentDate.length)),Vd(2),Jf("id",e.dataConfig.product.id),zh("ngClass","quantity-stepper-v3 quantity-stepper-v3--responsive-width")("product",e.dataConfig.product)("calledBy","snsCheckoutFlowModal")("configObj",e.configObj)("isA
1nyProductHasAddlInfo",!0)("isQscV2",!1),Vd(5),zh("ngForOf",e.dataConfig.frequencies),Vd(6),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.addRecurButtonLabel),Vd(2),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.addRecurButtonNotNowLabel)}}function Nre(e,t){1&e&&(kf(0,"div",85),am(1," We're unable to subscribe, due to a technical error, we're unable to add this item to a Schedule & Save subscription. Please try again later. "),xf())}function Ure(e,t){1&e&&(kf(0,"div",85),am(1," We're unable to unsubscribe the item at this time. Please try again later. You may also cancel the item subscription within your Schedule & Save settings once the order is complete. "),xf())}function Vre(e,t){1&e&&(Ef(0),am(1," Due to a technical error, we're unable to add this item to a Schedule & Save subscription. Please try again later. "),Df())}function qre(e,t){1&e&&(Ef(0),am(1," We're unable to unsubscribe the item at this time. Please try again later. You may also cancel the item subscription within your Schedule & Save settings once the order is complete. "),Df())}function $re(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",74),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeydownEvent(t,"#error-modal"))})),kf(2,"div",75)(3,"div",76)(4,"div",5),ph(5,Nre,2,0,"div",77)(6,Ure,2,0,"div",77),kf(7,"button",78),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){return Wa(e),Ha(Yf().closeModal())})),Tf(8,"span",7),xf()(),kf(9,"div",79),Tf(10,"div",80),kf(11,"h1",81),am(12),xf(),kf(13,"div",82),ph(14,Vre,2,0,"ng-container",1)(15,qre,2,0,"ng-container",1),xf()(),kf(16,"div",83)(17,"div",20)(18,"button",84),jf("click",(function(){return Wa(e),Ha(Yf().closeModal())})),am(19,"Close"),xf()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",e.dataConfig.showModal?"show d-block":"d-none"),gh("aria-hidden",!e.dataConfig.showModal),Vd(4),zh("ngIf","subscribe"===e.dataConfig.errModalType),Vd(),zh("ngIf","unsubscribe"===e.dataConfig.errModalType),Vd(6),cm(" We're unable to ",e.dataConfig.errModalType," "),Vd(2),zh("ngIf","subscribe"===e.dataConfig.errModalType),Vd(),zh("ngIf","unsubscribe"===e.dataConfig.errModalType)}}function jre(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",86),jf("keydown",(function(t){return Wa(e),Ha(Yf().onKeydownEvent(t,"#success-modal"))})),kf(2,"div",3)(3,"div",87)(4,"div",34)(5,"div",35)(6,"h1",88),am(7),xf(),kf(8,"button",37),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().closeModal())}))("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:item-scheduled|close"))})),Tf(9,"span",7),xf()()(),kf(10,"div",89)(11,"h2",90),am(12),xf(),kf(13,"div",91),Tf(14,"img",53),xf(),kf(15,"div",92)(16,"span",93),Tf(17,"span",14),xf(),kf(18,"div",94),am(19),xf(),kf(20,"div",95),am(21),qm(22,"date"),xf(),kf(23,"div",96)(24,"div",97),am(25),xf()()(),kf(26,"div",98)(27,"span",97),am(28),xf(),kf(29,"a",99),jf("click",(function(){return Wa(e),Ha(Yf().analyticsLinkClick("manage"))})),am(30),xf()()(),kf(31,"div",100)(32,"div",20)(33,"button",68),jf("click",(function(){Wa(e);let t=Yf();return t.closeModal(),Ha(t.analyticsSnsModalClick("ar:item-scheduled|continue-shopping"))})),am(34),xf()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("ngClass",e.dataConfig.showModal?"show d-block":"d-none"),gh("aria-hidden",!e.dataConfig.showModal),Vd(6),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedHeader," "),Vd(5),cm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedMessage," "),Vd(2),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.dataConfig.productId,"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available",id),Jf("alt",e.dataConfig.product.name),Vd(5),lm("dug"===e.dataConfig.nextFulfillmentType?null==e.dataConfig.contents?null:e.dataConfig.contents.footerNextFulfillmentPickup:null==e.dataConfig.contents?null:e.dataConfig.contents.footerNextFulfillmentDelivery),Vd(2),dm("","dug"===e.dataConfig.nextFulfillmentType?null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedNextFulfillmentDatePickupText:null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedNextFulfillmentDateDeliveryText," ",jm(22,16,e.dataConfig.productFulfillDate,"MMM. dd"),""),Vd(4),dm("",null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedFrequencyText," ","1"===e.dataConfig.selectedFrequency?"week":e.dataConfig.selectedFrequency+" weeks"," "),Vd(3),cm("",null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedChangesText," "),Vd(),gh("aria-label",(null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedChangesText)+(null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedManageLinkText)),Vd(),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedManageLinkText),Vd(4),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.itemSchedButtonLabel)}}var zre=(()=>{class e{constructor(e,t,i,n,r){this._arService=e,this._productSnsModalService=t,this.elementRef=i,this._commonService=n,this._aemService=r,this.closeModalEvent=ne
1w _l,this.selectFrequency=new _l,this.qscQuantity=1,this.recurringFrequency="1",this.configObj={programType:"abs"}}ngOnInit(){this.formModel={frequency:this.dataConfig.selectedFrequency},this.dataConfig.contents=this._productSnsModalService.getDynamicContents()}onKeydownEvent(e,t){this._commonService.handleTabFocus(e,t,this.elementRef.nativeElement,'button:not([disabled]), [href], input, select, textarea, a, [tabindex]:not([tabindex="-1"])')}closeModal(){this.closeModalEvent.emit()}saveFrequency(){this._productSnsModalService.emitFrequency(this.formModel.frequency),this.closeModal(),this.analyticsSnsModalClick("ar:frequency|save")}getFocusableElements(e){let t=this.elementRef.nativeElement.querySelectorAll(e),i=[];return t.forEach((e=>{$(e).is(":visible")&&i.push(e)})),i}clickFrequency(e){this.formModel.frequency=e}getUpdatedQty(e){this.qscQuantity=e}saveRecurringFreq(e){this.recurringFrequency=e}saveRecurringDetails(){let e={bpn:this.dataConfig.product.id,upc:this.dataConfig.product.upc,quantity:this.qscQuantity,startDate:this.dataConfig.nextFulfillmentDate,subscriptionSource:this.dataConfig.subscriptionSource,frequency:this.recurringFrequency,productTitle:this.dataConfig.product.name,originalPrice:this.dataConfig.product.price};this._arService.buildAndPostAddSubscription(e).subscribe((t=>{if(this.closeModal(),t){this._arService.setArSubscription(t),this.dataConfig.modal="successModal",this.dataConfig.showModal=!0,this.dataConfig.productId=e.bpn,this.dataConfig.nextFulfillmentType=t.fulfillment?.fulfillmentType.toLowerCase();let i=t.itemsSubscribed.find((e=>e.productBpn===this.dataConfig.productId));this.dataConfig.productFulfillDate=i?.nextFulfillmentDate,this.dataConfig.selectedFrequency=i?.frequency?.count}else this.closeModal(),this.dataConfig.modal="errorModal",this.dataConfig.showModal=!0,this.dataConfig.errModalType="subscribe";setTimeout((()=>{this._productSnsModalService.show(this.dataConfig),window.AB?.DATALAYER&&window.AB?.DATALAYER.setSnsModalViewEvents(this.dataConfig)}),200)}),(e=>{this.closeModal(),this.dataConfig.modal="errorModal",this.dataConfig.showModal=!0,this.dataConfig.errModalType="subscribe",setTimeout((()=>{this._productSnsModalService.show(this.dataConfig)}),200)}))}analyticsLinkClick(e){window.AB?.DATALAYER&&window.AB?.DATALAYER.setSnsModalLinkClick(e,this.dataConfig)}analyticsSnsModalClick(e){window.AB?.DATALAYER&&window.AB?.DATALAYER.setSnsModalClickEvents(e,this.dataConfig,this.formModel,this.recurringFrequency)}static{this.ɵfac=function(t){return new(t||e)($d(Uw),$d(Wre),$d(Vl),$d(Bw),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-sns-modal-al"]],outputs:{closeModalEvent:"closeModalEvent",selectFrequency:"selectFrequency"},decls:5,vars:5,consts:[["frequencyForm","ngForm"],[4,"ngIf"],["id","info-modal","tabindex","-1","data-backdrop","false","aria-labelledby","modal-label-modal-sns",1,"modal","fade","sns-modal-container",3,"keydown","ngClass"],["role","document",1,"modal-dialog","sns-modal"],["role","dialog","aria-labelledby","scheduleNsaveContentTxt",1,"modal-content","sns-modal","sns-modal__content","py-4"],[1,"modal-header","sns-modal__header","sns-modal--content-frequency__header","px-4","py-3"],["data-qa","abt-abtpopupxbtn-ss","data-dismiss","modal","aria-label","Close",1,"close","sns-modal__close-btn","mb-2","mr-1",3,"keydown.enter","click"],[1,"svg-icon","svg-close-primary"],[1,"sns-modal__body","px-3"],[1,"sns-modal__body-top-container"],[1,"sns-modal__body-img-text-block","d-flex","flex-column","align-items-center"],[1,"sns-modal__body-img"],["aria-hidden","true",3,"src","alt"],[1,"sns-modal__body-icon-container"],[1,"sns-modal__body-sns-icon"],["id","scheduleNsaveContentTxt",1,"title-lg","mt-4","sns-modal__body-sns-text"],[1,"title-sm","sns-modal__ada-color","sns-modal--content-info__subheader","text-center"],[1,"sns-modal__body-bottom-container"],["class","sns-modal--content-info__info-pill d-flex mt-4 mb-4",4,"ngFor","ngForOf"],[1,"sns-modal__footer","d-flex","pt-4","align-items-center","flex-column"],[1,"sns-modal__footer-btn"],["data-qa","abt-gtitbtn-ss",1,"btn","btn-xl","btn-primary",3,"click"],[1,"sns-modal__footer-more-info","d-flex","flex-column","align-items-center"],["role","link","target","â_blankâ",1,"link-xs","sns-modal__footer-faq-link",3,"click","href"],[1,"sns-modal--content-info__info-pill","d-flex","mt-4","mb-4"],[1,"mt-1","sns-modal__body-info-pill-chkmark"],[1,"sns-modal__body-info-pill-chkmark-svg"],[1,"ml-3","sns-modal__body-info-pill-text-container","d-flex","flex-column","align-items-start"],["class","title-sm-bold",4,"ngIf"],["class","sns-modal__ada-color body-text",4,"ngIf"],[1,"title-sm-bold"],[1,"sns-modal__ada-color","body-text"],["id","frequency-modal","tabindex","-1","data-backdrop","false","aria-labelledby","modal-label-modal-sns",1,"modal","fade","sns-modal-container",3,"keydown","ngClass"],["role","dialog","aria-labelledby","frequencyHeaderTxt",1,"modal-content","sns-modal","sns-modal__content","py-4"],[1,"modal-header","sns-modal__header","sns-modal--content-frequency__header","px-4","py-3","flex-column"],[1,"align-items-center","d-flex","mb-2"],["id","frequencyHeaderTxt",1,"modal-title","w-100","text-center","title-lg"],["data-dismiss","modal","aria-label","Close",1,"p-0","m-0","close","sns-modal__close-btn",3,"keydown.enter","click"],[1,"title-sm","text-center"],[1,"sns-modal__body","
1sns-modal--content-frequency__body","px-3"],[1,"sns-modal__body-frequency-container"],[4,"ngFor","ngForOf"],["type","submit",1,"btn","btn-xl","btn-primary",3,"click"],[1,"form-check","radioButton__group","pl-0"],["type","radio","name","frequency",1,"form-check-input","radioButton__input","radioButton--input","d-block",3,"ngModelChange","change","value","ngModel"],[1,"form-check-label","radioButton__label","radioButton__label--md","body-text"],["data-backdrop","false","tabindex","-1","id","add-recurring-order-modal","aria-labelledby","modal-label-modal-sns",1,"modal","fade","sns-modal-container",3,"keydown","ngClass"],["role","dialog","aria-labelledby","addRecurringHeaderTxt",1,"modal-content","sns-modal__content","py-4"],["id","addRecurringHeaderTxt",1,"modal-title","w-100","text-center","title-lg","d-flex","flex-start"],[1,"title-sm"],[1,"sns-modal__body","px-3","pb-5"],[1,"sns-modal__info-box"],[1,"sns-modal__image-content","float-left"],[1,"sns-modal__image",3,"src","alt"],[1,"sns-modal__info-content","float-left"],[1,"price-lg","sns-modal__default"],[1,"title-xs","sns-modal__title","mb-2"],["class","sns-modal__fulfill align-items-center d-flex background-color-secondary-200",4,"ngIf"],[1,"sns-modal__freq-content","d-flex","flex-column","pt-4"],[3,"updateQscQtyEmitter","ngClass","id","product","calledBy","configObj","isAnyProductHasAddlInfo","isQscV2"],[1,"input-field","responsive-width"],["role","listbox",1,"input-field__wrapper","text-dropdown-responsive"],["for","week",1,"input-field__float-label"],["id","week","name","frequency","placeholder"," ","aria-label","Frequency",3,"change"],["name","frequency","class","dropdown__group",3,"id","value",4,"ngFor","ngForOf"],[1,"word-highlight-xs"],[1,"sns-modal__footer","d-flex","pt-4","align-items-end","flex-column"],[1,"sns-modal__button-box","align-items-center","d-flex"],["data-dismiss","modal",1,"btn","btn-xl","btn-primary",3,"click"],["data-dismiss","modal",1,"btn","btn-xl","btn-secondary","sns-modal__button","mr-3",3,"click"],[1,"sns-modal__fulfill","align-items-center","d-flex","background-color-secondary-200"],[3,"ngClass"],[1,"word-highlight-xs","ml-1"],["name","frequency",1,"dropdown__group",3,"id","value"],["id","error-modal","role","dialog","aria-labelledby","modal-label-modal-sns","aria-hidden","true","tabindex","-1","data-backdrop","false",1,"modal","fade","sns-modal-container",3,"keydown","ngClass"],["role","document",1,"modal-dialog","modal
1-dialog-centered","sns-modal--content-error"],[1,"modal-content","sns-modal--content-error__content","pt-3"],["class","sr-only","id","errorModalDescription",4,"ngIf"],["data-dismiss","modal","aria-label","Close","aria-describedby","errorModalDescription",1,"close","sns-modal__close-btn","mb-2","mr-1",3,"keydown.enter","click"],[1,"d-flex","flex-column","align-items-center","px-3","pb-4"],[1,"svg-caution","mb-3"],[1,"title-sm-bold","text-center","mb-3"],[1,"sns-modal--content-error__container","sns-modal__ada-color","text-center","d-flex","align-items-center","mt-2"],[1,"d-flex","p-4","justify-content-center"],[1,"btn","btn-xl","btn-primary",3,"click"],["id","errorModalDescription",1,"sr-only"],["id","success-modal","tabindex","-1","data-backdrop","false","aria-labelledby","modal-label-modal-sns",1,"modal","fade","sns-modal-container",3,"keydown","ngClass"],["role","dialog","aria-labelledby","itemSchedHeaderTxt",1,"modal-content","sns-modal","sns-modal__content","py-4"],["id","itemSchedHeaderTxt",1,"modal-title","w-100","text-center","title-lg"],[1,"sns-modal__body","sns-modal--content-success__body","d-flex","flex-column","align-items-center","px-2","pt-4","pb-5"],[1,"title-sm","sns-modal__ada-color","text-center","mb-3","sns-modal--content-success__sub-header"],[1,"sns-modal--content-success__image","p-2","mb-4"],[1,"sns-container","d-flex","flex-column","align-items-center","mt-2","p-3"],[1,"d-flex","align-items-center","justify-content-center","sns-modal--content-success__repeat-icon","background-color-secondary-200"],[1,"my-1","word-highlight-sm"],[1,"poppins-title-xl","mb-4"],[1,"text-center","pt-3","sns-modal--content-success__info"],[1,"body-text-sm","sns-modal__ada-color"],[1,"sns-modal__terms","sns-modal--content-success__terms","d-flex","flex-row","mt-4"],["role","link","href","/schedule-and-save/manage",1,"link-sm","sns-modal__default",3,"click"],[1,"sns-modal__footer","d-flex","pt-4","justify-content-center"]],template:function(e,t){1&e&&ph(0,Ore,27,14,"ng-container",1)(1,Mre,24,9,"ng-container",1)(2,Fre,37,20,"ng-container",1)(3,$re,20,7,"ng-container",1)(4,jre,35,19,"ng-container",1),2&e&&(zh("ngIf","infoModal"===t.dataConfig.modal),Vd(),zh("ngIf","freqModal"===t.dataConfig.modal),Vd(),zh("ngIf","addRecurringModal"===t.dataConfig.modal),Vd(),zh("ngIf","errorModal"===t.dataConfig.modal),Vd(),zh("ngIf","successModal"===t.dataConfig.modal))},encapsulation:2})}}return e})(),Wre=(()=>{class e{constructor(e,t,i){this.componentFactoryResolver=e,this.appRef=t,this.injector=i,this.frequencySelected=new Tt(null),this.errorModalSnsInfo=new Tt(null)}show(e){let t=this.componentFactoryResolver.resolveComponentFactory(zre).create(this.injector);t.instance.dataConfig=e,this.appRef.attachView(t.hostView),t.instance.closeModalEvent.subscribe((i=>{e&&e.hasOwnProperty("modal")&&"errorModal"===e.modal&&e.selectedFrequency&&this.errorModalSnsInfo.next({isChecked:"subscribe"!==e.errModalType,selectedFrequency:e.selectedFrequency}),this.appRef.detachView(t.hostView),$("product-sns-modal-al").siblings(":not(script, style, #contactUsModal)").removeAttr("aria-hidden");let n=$("#"+e.prevIdToFocus);n&&n.length&&setTimeout((()=>n.focus()),0),t.destroy()}));let i=t.hostView.rootNodes[0];document.body.appendChild(i),setTimeout((()=>$(".sns-modal__close-btn").focus()),0),$("product-sns-modal-al").siblings(":not(script, style, #contactUsModal)").attr("aria-hidden","true")}emitFrequency(e){this.frequencySelected.next(e)}getDynamicContents(){let e=document.getElementsByClassName("sns-dynamic-data-content");if(e?.length>0){let t=e[0].getAttribute("data-prop-sns");return t?JSON.parse(t):{}}return{}}static{this.ɵfac=function(t){return new(t||e)(lr(lp),lr(sg),lr(fl))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Hre=(e,t)=>({"product-btn--with-addl-info":e,"product-btn--without-ar":t}),Yre=e=>({dropup:e}),Gre=e=>({"est__dropdown--menu--display":e}),Kre=e=>({"est__dropdown--menu--item-remove--disabled":e}),Qre=e=>({"product-btn--without-ar":e}),Jre=e=>({btn:!0,"product-btn__qty-step":!0,"product-btn__qty-step--loading":e}),Zre=e=>({"qsc-dropdown-v2-extended":e}),Xre=(e,t)=>
1({"qsc-btn_qty-stepper-lb__disabled":e,"qsc-btn_qty-stepper-lb__after":t});function ese(e,t){if(1&e){let e=Mf();kf(0,"div",9),jf("click",(function(t){return Wa(e),Ha(Yf(2).displayWeights(t))})),am(1),xf()}if(2&e){let e=Yf(2);_h("data-qty-id","pc",e.product.id,"Inpt"),_h("aria-label","Sign In to Add weight ",e.product.name,""),Zf("id","signIn-weight_",e.product.id,""),Vd(),cm(" ",e.isAuthorized?e.selectedWeightText:e.SIGNIN," ")}}function tse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",12),jf("click",(function(t){return Wa(e),Ha(Yf(3).displayWeights(t))})),am(2),xf(),Df()}if(2&e){let e=Yf(3);Vd(),_h("aria-controls","qtyDropdownContentList_",e.product.id,""),_h("aria-label","select weight ",e.product.name,""),Zf("id","qtyDropdownBtn_",e.product.id,""),gh("aria-expanded",e.showWeights),Vd(),cm(" ",e.selectedWeightText," ")}}function ise(e,t){if(1&e){let e=Mf();kf(0,"button",13),jf("click",(function(t){return Wa(e),Ha(Yf(3).displayWeights(t))})),am(1),xf()}if(2&e){let e=Yf(3);_h("aria-label","select weight ",e.product.name,""),Zf("id","qtyModalBtn_",e.product.id,""),gh("aria-expanded",e.showModal),Vd(),cm(" ",e.selectedWeightText," ")}}function nse(e,t){if(1&e){let e=Mf();kf(0,"li",23),jf("click",(function(){let t=Wa(e).index;return Ha(Yf(4).selectWeight(t))}))("mouseenter",(function(){let t=Wa(e).index;return Ha(Yf(4).mouseEnter(t))}))("keypress",(function(){let t=Wa(e).index;return Ha(Yf(4).selectWeight(t))})),am(1),qm(2,"number"),xf()}if(2&e){let e=t.$implicit;Zf("id","dropdown-itm",t.index,""),Vd(),cm(" ",jm(2,3,e.weight,"1.2")," lb ")}}function rse(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"ul",15),jf("focusout",(function(t){return Wa(e),Ha(Yf(3).dropdownFocusout(t))})),ph(2,nse,3,6,"li",16),kf(3,"li",17),jf("click",(function(){return Wa(e),Ha(Yf(3).removeSelection())}))("keypress",(function(){return Wa(e),Ha(Yf(3).removeSelection())}))("mouseenter",(function(){return Wa(e),Ha(Yf(3).mouseEnterRemoveBtn())})),am(4," Remove "),xf()(),kf(5,"div")(6,"span",18)(7,"span",19)(8,"span",20),am(9,"Est. Total: Â "),xf(),am(10),qm(11,"currency"),xf(),kf(12,"span",21),am(13,"Estimated Total:"),xf(),kf(14,"span",21),am(15),qm(16,"currency"),xf()(),kf(17,"div",22),am(18,"Final cost by weight"),xf()()()}if(2&e){let e=Yf(3);zh("ngClass",Om(15,Gre,e.showWeights)),Vd(),_h("aria-labelledby","qtyDropdownBtn_",e.product.id,""),Zf("id","qtyDropdownContentList_",e.product.id,""),Vd(),zh("ngForOf",e.weightList),Vd(),zh("ngClass",Om(17,Kre,0===e.selectedWeight)),Vd(7),lm(jm(11,9,e.estimatedPrice,"USD")),Vd(5),lm(jm(16,12,e.estimatedPrice,"USD"))}}function sse(e,t){if(1&e&&(kf(0,"div",10),ph(1,tse,3,8,"ng-container",2)(2,ise,2,6,"ng-template",null,1,Wm)(4,rse,19,19,"div",11),xf()),2&e){let e=sm(3),t=Yf(2);Zf("id","select-weight_",t.product.id,""),zh("ngClass",Om(6,Yre,"carousel"===t.calledBy)),Vd(),zh("ngIf",t.screenSize>=1024||t.noWeightModal)("ngIfElse",e),Vd(3),zh("ngIf",t.showWeights)}}function ase(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",24)(5,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(2).decreaseWeight())})),Tf(6,"span",26),xf(),Tf(7,"span",21),kf(8,"span",27),jf("click",(function(t){Wa(e);let i=Yf(2);return Ha(!i.noWeightModal&&i.displayModal(t))})),am(9),xf(),kf(10,"button",28),jf("click",(function(){return Wa(e),Ha(Yf(2).increaseWeight())})),Tf(11,"span",29),xf()()()()(),Df()}if(2&e){let e=Yf(2);Vd(3),zh("ngClass",Om(17,Qre,"mkp"!==(null==e.configObj?null:e.configObj.programType))),Vd(),zh("ngClass",Om(19,Jre,e.loadingSpinner)),Vd(),Zf("id","dec_qtyInfo_",e.product.id,""),Zf("id","dec_qtyInfo_",e.product.id,""),Vd(3),Sh("aria-label","",e.selectedWeight," lb of ",e.product.name," in cart"),Zf("id","qtyInfo_",e.product.id,""),Vd(),cm(" ",e.selectedWeightText," "),Vd(),Zf("id","inc_qtyInfo_",e.product.id,""),Zf("id","inc_qtyInfo_",e.product.id,""),zh("disabled",e.checkIncreaseButtonDisability())}}function ose(e,t){if(1&e&&(kf(0,"option",57),am(1),qm(2,"number"),xf()),2&e){let e=t.$implicit,i=Yf(3);zh("value",e.weight)("selected",e.weight===i.selectedItem()),gh("aria-label",i.getAriaLabel(e.weight)),Vd(),cm("",jm(2,4,e.weight,"1.2")," Â lb")}}function lse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",30)(4,"div",31)(5,"div",32)(6,"div",33)(7,"button",34),jf("click",(function(){return Wa(e),Ha(Yf(2).closeModal())}))("keypress",(function(){return Wa(e),Ha(Yf(2).closeModal())})),Tf(8,"span",35),xf()(),kf(9,"div",36)(10,"div",37)(11,"div",38)(12,"picture"),Tf(13,"source",39)(14,"source",40)(15,"img",41),xf()(),kf(16,"div",42)(17,"p",43),am(18),xf()()(),Tf(19,"hr",44),kf(20,"div",45)(21,"p",46),am(22,"Final cost by weight"),xf(),kf(23,"div",47)(24,"div",48),am(25),qm(26,"currency"),qm(27,"lowercase"),xf(
1),kf(28,"div",49)(29,"span",50),am(30),qm(31,"currency"),xf(),kf(32,"div",51),am(33,"Est. total "),xf(),kf(34,"div",52),am(35),qm(36,"currency"),xf()()(),kf(37,"div")(38,"select",53),jf("change",(function(t){return Wa(e),Ha(Yf(2).SelectWeightModal(t))})),ph(39,ose,3,7,"option",54),xf()(),kf(40,"div",55)(41,"button",56),jf("click",(function(){return Wa(e),Ha(Yf(2).finalizeWeight())}))("keypress",(function(){return Wa(e),Ha(Yf(2).finalizeWeight())})),am(42,"Add "),xf()()()()()()()()(),Df()}if(2&e){let e=Yf(2);Vd(3),_h("aria-label","Select weight for ",e.product.name,""),Vd(10),gh("srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),gh("srcset",e.getImageUrl(e.product.id,"tablet")),Vd(),Jf("alt",e.product.name),gh("src",e.getImageUrl(e.product.id,"desktop"),id),Vd(3),lm(e.product.name),Vd(7),dm("",jm(26,12,e.product.pricePer,"USD")," / ",$m(27,15,e.product.unitQuantity),""),Vd(5),cm(" Estimated Total ",jm(31,17,e.estimatedPrice,"USD")," "),Vd(5),lm(jm(36,20,e.estimatedPrice,"USD")),Vd(4),zh("ngForOf",e.weightList)}}function cse(e,t){if(1&e&&(Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",5),ph(4,ese,2,7,"div",6)(5,sse,5,8,"div",7),xf()()(),ph(6,ase,12,21,"ng-container",8)(7,lse,43,23,"ng-container",8),Df()),2&e){let e=Yf();Vd(3),zh("ngClass",Bm(5,Hre,e.isAnyProductHasAddlInfo,!e.isAnyProductHasAddlInfo)),Vd(),zh("ngIf",!e.isAuthorized),Vd(),zh("ngIf",e.isAuthorized&&!e.isButtonenabled),Vd(),zh("ngIf",e.isButtonenabled),Vd(),zh("ngIf",e.showModal)}}function dse(e,t){if(1&e){let e=Mf();kf(0,"li",70),jf("mouseenter",(function(){let t=Wa(e).index;return Ha(Yf(3).mouseEnter(t))}))("click",(function(){let t=Wa(e).index;return Ha(Yf(3).selectWeight(t))}))("keypress",(function(){let t=Wa(e).index;return Ha(Yf(3).selectWeight(t))})),am(1),qm(2,"number"),xf()}if(2&e){let e=t.$implicit;Zf("id","dropdown-itm",t.index,""),Vd(),cm(" ",jm(2,3,e.weight,"1.2")," lb ")}}function use(e,t){if(1&e){let e=Mf();kf(0,"div",62)(1,"ul",63),jf("focusout",(function(t){return Wa(e),Ha(Yf(2).dropdownFocusout(t))})),ph(2,dse,3,6,"li",64),kf(3,"li",65),jf("click",(function(){return Wa(e),Ha(Yf(2).qscV2RemoveSelection())}))("keypress",(function(){return Wa(e),Ha(Yf(2).qscV2RemoveSelection())}))("mouseenter",(function(){return Wa(e),Ha(Yf(2).mouseEnterRemoveBtn())})),am(4," Remove "),xf()(),kf(5,"div")(6,"span",66)(7,"span",67)(8,"span",68),am(9,"Est. Total: Â "),xf(),am(10),qm(11,"currency"),xf(),kf(12,"span",21),am(13,"Estimated Total:"),xf(),kf(14,"span",21),am(15),qm(16,"currency"),xf(),kf(17,"div",69),am(18,"Final cost by weight"),xf()()()()}if(2&e){let e=Yf(2);zh("ngClass",Om(15,Gre,e.showWeights)),Vd(),_h("aria-labelledby","qtyDropdownBtn_",e.product.id,""),Zf("id","qtyDropdownContentList_",e.product.id,""),Vd(),zh("ngForOf",e.weightList),Vd(),zh("ngClass",Om(17,Kre,0===e.selectedWeight)),Vd(7),cm(" ",jm(11,9,e.estimatedPrice,"USD")," "),Vd(5),lm(jm(16,12,e.estimatedPrice,"USD"))}}function pse(e,t){if(1&e&&(kf(0,"option",57),am(1),qm(2,"number"),xf()),2&e){let e=t.$implicit,i=Yf(3);zh("value",e.weight)("selected",e.weight===i.selectedItem()),gh("aria-label",i.getAriaLabel(e.weight)),Vd(),cm("",jm(2,4,e.weight,"1.2")," Â lb")}}function hse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",30)(4,"div",31)(5,"div",32)(6,"div",33)(7,"button",34),jf("click",(function(){return Wa(e),Ha(Yf(2).closeModal())}))("keypress",(function(){return Wa(e),Ha(Yf(2).closeModal())})),Tf(8,"span",35),xf()(),kf(9,"div",36)(10,"div",37)(11,"div",38)(12,"picture"),Tf(13,"source",39)(14,"source",40)(15,"img",41),xf()(),kf(16,"div",42)(17,"p",43),am(18),xf()()(),Tf(19,"hr",44),kf(20,"div",45)(21,"p",46),am(22,"Final cost by weight"),xf(),kf(23,"div",47)(24,"div",48),am(25),qm(26,"currency"),qm(27,"lowercase"),xf(),kf(28,"div",49)(29,"span",50),am(30),qm(31,"currency"),xf(),kf(32,"div",51),am(33,"Est. total "),xf(),kf(34,"div",52),am(35),qm(36,"currency"),xf()()(),kf(37,"div")(38,"select",53),jf("change",(function(t){return Wa(e),Ha(Yf(2).SelectWeightModal(t))})),ph(39,pse,3,7,"option",54),xf()(),kf(40,"div",55)(41,"button",56),jf("click",(function(){return Wa(e),Ha(Yf(2).finalizeWeight())}))("keypress",(function(){return Wa(e),Ha(Yf(2).finalizeWeight())})),am(42,"Add "),xf()()()()()()()()(),Df()}if(2&e){let e=Yf(2);Vd(3),_h("aria-label","Select weight for ",e.product.name,""),Vd(10),gh("srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),gh("srcset",e.getImageUrl(e.product.id,"tablet")),Vd(),Jf("alt",e.product.name),gh("src",e.getImageUrl(e.product.id,"desktop"),id
1),Vd(3),lm(e.product.name),Vd(7),dm("",jm(26,12,e.product.pricePer,"USD")," / ",$m(27,15,e.product.unitQuantity),""),Vd(5),cm(" Estimated Total ",jm(31,17,e.estimatedPrice,"USD")," "),Vd(5),lm(jm(36,20,e.estimatedPrice,"USD")),Vd(4),zh("ngForOf",e.weightList)}}function fse(e,t){if(1&e){let e=Mf();kf(0,"div",58)(1,"div",4)(2,"div",59)(3,"button",60),jf("click",(function(t){return Wa(e),Ha(Yf().qscDisplayWeights(t))})),am(4),xf(),ph(5,use,19,19,"div",61),xf()()(),ph(6,hse,43,23,"ng-container",8)}if(2&e){let e=Yf();zh("ngClass",Om(15,Zre,e.isExtended)),Vd(2),Zf("id","select-weight_",e.product.id,""),Vd(),_h("aria-controls","qtyDropdownContentList_",e.product.id,""),_h("aria-label","select weight ",e.product.name,""),Zf("id","qtyDropdownBtn_",e.product.id,""),zh("ngClass",Bm(17,Xre,!e.isCheckboxChecked,e.isExtended))("disabled",!e.isCheckboxChecked),gh("aria-expanded",e.showWeights),Vd(),cm(" ",e.selectedWeightText," "),Vd(),zh("ngIf",e.showWeights),Vd(),zh("ngIf",e.showModal)}}var mse=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l,c,d,u){this._commonService=e,this._userInfoService=t,this._elementRef=i,this.toasterService=n,this.cartService=r,this._http=s,this.cartV2Service=a,this._aemService=o,this._productUtilService=l,this._utilService=c,this._productSnsModalService=d,this._quickAddBasketService=u,this.removeMiniCartEmitter=new _l,this.changeMiniCartEmitter=new _l,this.updateUnavailableCountEmitter=new _l,this.setLoadingSpinnerEmitter=new _l,this.updateCheckboxEmitter=new _l,this.updateQscQtyEmitter=new _l,this.config=Iw,this.reservedTimeIntent="",this.showWeights=!1,this.showModal=!1,this.previousSelectedWeight=!1,this.weightList=[],this.estimatedPrice=0,this.selectedWeight=0,this.currentSelectedWeight=0,this.isButtonenabled=!1,this.addItemToCartAnalytics=!1,this.increaseQuantityAnalytics=!1,this.decreaseItemAnalytics=!1,this.analyticsIsPriceDecreased=!1,this.selectedWeightText="Select Weight",this.SIGNIN="Sign in to add",this.isAuthorized=!1,this.isQuantityIncreased=!1,this.imagePath=window.AB.dMTProductCard,this.modalTriggeredElement=null,this.modal={closeBtn:"#modal-est .close",modalId:"#modal-est",lastFocusableElem:".amount__add-qty-btn .btn-primary"},this.isExtended=!1,this.loadingSpinner=!1,this.isOnProductDetail=!1,this.currentEnv="",this.toastMessagePostion="29vh",this.snsInfoChange=new kt,this.snsInfoChange$=this.snsInfoChange.asObservable(),this.subscriptions=new Ye,this.isAuthorized=this._userInfoService.isAuthorized(),this.reservedTimeIntent=this._userInfoService.getUserChannel(),this.currentEnv=this._commonService.getCurrentEnviorment(),this.enableAdRelevanceTracking=!this._aemService.getFeatureFlagByNameDisable("disableAdRelevance")}ngOnChanges(e){if(e.snsInfo&&e.snsInfo.currentValue.updateCart){let t="minicart"===this.calledBy?this.product.qty:this.product.quantity;t>0&&this.snsInfoChange.next({qty:t,snsInfo:e.snsInfo})}}ngOnInit(){if(this.isOnProductDetail="product-detail-item"===this.calledBy,this.screenSize=window.innerWidth,this.isQscV2){this.selectedWeight=this.getSelectedWeight(),this.selectedWeightText=Number(this.selectedWeight).toFixed(2)+" lb",this.initializeWeightList();let e=this._commonService.currentCartObj.subscribe((e=>{let t=e?.cartItems?.find((e=>e.itemId==this.product.id));t&&this.processChangesFromCart(t.selectedWeight)}));this.subscriptions.add(e)}else{if("minicart"==this.calledBy&&(this.product.id=this.product.itemId,this.isButtonenabled=!0,this.selectedWeight=this.product.selectedWeight?this.product.selectedWeight:0,this.weightList=this.product.incrementPriceList?this.product.incrementPriceList:[],this.selectedWeight,this.weightList[this.weightList.length-1].weight,this.selectedWeightText=Number(this.selectedWeight)+" lb"),"minicart"!==this.calledBy){let e=this._commonService.currentCartObj,t=this.cartV2Service.getCartName(this.configObj?.programType,this.sellerId);e=e.pipe(bi((e=>this.cartV2Service.fetchCartDetailsFromResponse(e,t)))),e.subscribe((e=>{this.hasCart=!!e.cartId;let t=0,i=[];try{let n={};n=e?.cartItems?.find((e=>e.itemId==this.product.id)),t=n?n.selectedWeight:0,i=n?n.incrementPriceList:[],this.entryId=n?.entryId}catch{t=0,i=[]}this.weightList=i,this.selectedWeight=t,0!=this.selectedWeight?(this.selectedWeight,this.weightList[this.weightList.length-1].weight,this.selectedWeightText=Number(this.selectedWeight)+" lb"):this.selectedWeightText="Select Weight"}))}0!=this.selectedWeight&&this.screenSize<1024&&(this.isButtonenabled=!0),this.snsInfoChange$.pipe(zi(600)).subscribe((e=>{this._cartAPICallV2(e.qty,e.snsInfo)}))}}onResize(e){this.screenSize=window.innerWidth}displayWeights(e){this.isAuthorized?"J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0)?window.storeFulfillmentModal.component.setModalDisplayData(2):this.screenSize>=1024||this.noWeightModal?(this.showModal=!1,this.showWeights?(this.showWeights=!1,0!==this.selectedWeight&&(this.selectedWeightText=Number(this.selectedWeight).toFixed(2)+" lb")):this.weightList&&this.weightList.length>0?(this.showWeights=!0,0!==this.selectedWeight&&(this.selectedWeightText=Number(this.selectedWeight).toFixed(2)+" lb"),this.setADANavigation()):(this.initializeWeightList(),this.setADANavigation())):this.displayModal(e):(window.eddlLoadComplete&&window.AB.DATALAYER.setATCFlag(!0),this._showSignInModal(this.configObj))}qscDisplayWeights(e){if("instore"==this._userInfoService.getUserChannel())return e.preventDefault(),window.rightDrawerComp.closeDrawer(),void window.storeFulfillmentModal.component.setModalDisplayData(2);this.screenSize>=1024?(this.showWeights=!0,this.isExtended=!0,this.setADANavigation()):(this.previousSelectedWeight=!0,this.selectedWeight=this.getSelectedWeight(),this.displayModal(e))}_showSignInModal(e){let t=encodeURIComponent(window.location.href);if(this._aemService.setDomainCookie("ECommRedirectURL",t,0),e&&"weeklyAd"===e?.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj);window.location.assign(e+window.AB.signInLinkPath)}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}qscV2UpdateWeight(){this._quickAddBasketService.setQuickAddBasketItemWeight(this.product.id,Number(this.selectedWeight))}processChangesFromCart(e){this.selectedWeight=e,this.selectedWeightText=this.normalizeWeightText(this.selectedWeight),this.showModal&&this.SelectWeightModal({target:{value:e}}),this.qscV2UpdateWeight()}
1showPriceChangeToast(e,t){if(e&&this._commonService.checkPendingOrder()){let e=t.cartItems?.find((e=>e.itemId===this.product.id)),i=this._commonService.getValidProductPrice(this.product),n=e?.price<e?.basePrice?e?.price:e?.basePrice;if(e&&n!==i){let e=`Great newsâyour price for this item is still $${n}, based on when you placed your order. `;this.analyticsPreviousPrice=n,n>i&&(e=`The price for ${this.product.name} has changed, but your price is still $${n} based on its price on the day your order was placed. `,this.analyticsIsPriceDecreased=!0),this.toasterService.show({title:"OK",message:e,type:ere.Info,interactiveElement:"See Policy",interactiveElementLink:"https://www.albertsonscompanies.com/policies-and-disclosures/terms-of-use/default.aspx"},{class:"popup--toaster--right"})}}}selectWeight(e){this.selectedWeight<this.weightList[e].weight&&(this.isQuantityIncreased=!0),this.showWeights=!1,this.selectedWeight=this.weightList[e].weight,this.selectedWeightText=this.isQscV2?Number(this.selectedWeight).toFixed(2)+" lb":Number(this.selectedWeight)+" lb",this.refocusSelectBtn(),this.isQscV2?this.qscV2UpdateWeight():this.updateWeight(this.selectedWeight),this.isQscV2&&(this.isExtended=!1)}removeSelection(){this._removeProductV2(),this.refocusSelectBtn()}qscV2RemoveSelection(){this.qscV2RemoveProduct(),this.showWeights=!1,this.isExtended=!1,this.qscV2RefocusSelectBtn()}qscV2RemoveProduct(){this._quickAddBasketService.setQuickAddBasketSelectedProperty(this.product.id,!1),this.updateCheckboxEmitter.emit()}mouseEnter(e){this.estimatedPrice=this.weightList[e].price,setTimeout((()=>{$("#dropdown-itm"+e).focus()}),0)}mouseEnterRemoveBtn(){this.estimatedPrice=0}mouseLeave(){this.estimatedPrice=0}refocusSelectBtn(){setTimeout((()=>{$(`.pid${this.product.id} .quantity-dropdown__btn`).focus()}),0)}qscV2RefocusSelectBtn(){setTimeout((()=>{$(this._elementRef.nativeElement).children().find("span#qtyDropdownBtn_"+this.product.id).focus()}),0)}displayModal(e){if(this.modalTriggeredElement=e.target,this.showWeights=!1,this.showModal=!0,this.setModalADA(),this.productDetailPath=this.product?.name&&this._commonService.isSeoEnabled()?this._commonService.buildSeoPdpUrl(this.product.fullName||this.product.name,this.product.id):this._commonService.getProductDetailPath(),this.productDetailPath&&(this.productDetailPath=this.productDetailPath.replace("(bpn)",this.product.id)),this.weightList.length>0)if(0==this.selectedWeight)this.estimatedPrice=this.weightList[0].price;else{let e=this.selectedWeight;this.estimatedPrice=this.weightList.find((t=>t.weight==e)).price}else this.initializeWeightList()}setModalADA(){setTimeout((()=>{let e=this;$(this.modal.modalId).modal({backdrop:"static",keyboard:!1,show:!0}),$(this.modal.modalId).on("shown.bs.modal",(function(){e.modalADA()})),$(this.modal.modalId).on("hidden.bs.modal",(function(){e.modalHideADA()}))}),0)}normalizeWeightText(e){return Number(e).toFixed(2)+" lb"}modalADA(){let e=this.modal.closeBtn,t=this.modal.modalId,i=this.modal.lastFocusableElem;$(t).removeAttr("aria-modal");let n=$(t);for(;n.length&&"BODY"!=n.prop("tagName");){let e=n.attr("aria-hidden");e||(e="none"),n.attr("data-aria-state",e),n.attr("aria-hidden","false"),n.siblings().each((function(){let e=$(this).attr("aria-hidden");e||(e="none"),$(this).attr("data-aria-state",e),$(this).attr("aria-hidden","true")})),n=n.parent()}$(i).on("keydown keypress",(function(t){$("this:focus")&&9===t.which&&(e===i?t.preventDefault():t.shiftKey||($(e).focus(),t.preventDefault()))})),$(e).on("keydown keypress",(function(e){$("this:focus")&&9===e.which&&e.shiftKey&&($(i).focus(),e.preventDefault())}));let r=this;$(t).on("keydown",(function(e){27==e.which&&$(t).is(":visible")&&r.closeModal()})),setTimeout((()=>{$(e).focus()}),400)}modalHideADA(){$("[data-aria-state]").each((function(){let e=$(this).attr("data-aria-state");$(this).removeAttr("data-aria-state"),"none"==e?$(this).removeAttr("aria-hidden"):$(this).attr("aria-hidden",e)}));let e=$("#dec_qtyInfo_"+this.product.id);e.length>0?e.focus():$("#select-weight_"+this.product.id).focus()}SelectWeightModal(e){this.currentSelectedWeight=e.target.value,this.estimatedPrice=this.weightList.find((t=>t.weight==e.target.value)).price}selectedItem(){return this.previousSelectedWeight?this.selectedWeight:this.weightList[0].weight}finalizeWeight(){this.showModal=!1,this.isButtonenabled=!0,this.previousSelectedWeight=!0,0==this.currentSelectedWeight?this.selectedWeight=this.weightList[0].weight:this.selectedWeight=this.currentSelectedWeight,this.currentSelectedWeight=0,this.selectedWeightText=this.isQscV2?Number(this.selectedWeight).toFixed(2)+" lb":Number(this.selectedWeight)+" lb",this.isQscV2?this._quickAddBasketService.setQuickAddBasketItemWeight(this.product.id,Number(this.selectedWeight)):this.updateWeight(this.selectedWeight),$("#modal
1-est").modal("hide")}decreaseWeight(){if(this.selectedWeight==this.weightList[0].weight)"minicart"!==this.calledBy?this._removeProductV2():this._removeMinicart();else{let e=this.selectedWeight,t=this.weightList.findIndex((t=>t.weight==e));this.selectedWeight=this.weightList[t-1].weight,this.selectedWeightText=Number(this.selectedWeight)+" lb",this.loadingSpinner=!0,this.updateWeight(this.selectedWeight)}}_removeMinicart(){this.removeMiniCartEmitter.emit(this.product.id)}resetToSelectWeight(){this.isButtonenabled=!1,this.showWeights=!1,this.selectedWeight=0,this.selectedWeightText="Select Weight",this.previousSelectedWeight=!1}increaseWeight(){let e=this.selectedWeight,t=this.weightList.findIndex((t=>t.weight==e));this.selectedWeight=this.weightList[t+1].weight,this.selectedWeight,this.weightList[this.weightList.length-1].weight,this.selectedWeightText=Number(this.selectedWeight)+" lb",this.loadingSpinner=!0,this.updateWeight(this.selectedWeight)}checkIncreaseButtonDisability(){return this.weightList.length>0&&this.selectedWeight==this.weightList[this.weightList.length-1].weight}_setFocusInsideQty(){"minicart"===this.calledBy&&setTimeout((()=>$(this._elementRef.nativeElement).children().find("span#qtyInfo_"+this.product.id).focus()),0)}closeModal(){let e=this;this.showModal=!1,$("#modal-est").modal("hide"),setTimeout((()=>{null!==e.modalTriggeredElement&&(e.modalTriggeredElement.focus(),e.modalTriggeredElement=null)}),100)}getImageUrl(e,t){let i=this.imagePath;return i?i.replace("${product.id}",e).replace("${viewport}",t):""}setADANavigation(){this.weightList&&this.weightList.length>0&&setTimeout((()=>{$("#dropdown-itm0").focus(),this.estimatedPrice=this.weightList[0].price;let e=this;$(".dropdown-item.est__dropdown--menu--item").on("keydown keypress",(function(t){if($("this:focus")){let i;if(40===t.which?i=$(this).next():38===t.which&&(i=$(this).prev()),i&&i.length&&i.length>0){if(i.get(0).className.includes("est__dropdown--menu--item-remove"))i.get(0).className.includes("est__dropdown--menu--item-remove")&&!i.get(0).className.includes("est__dropdown--menu--item-remove--disabled")&&(e.estimatedPrice=0);else{let t=i.get(0).id.replace("dropdown-itm","");e.estimatedPrice=e.weightList[t].price}i.get(0).className.includes("est__dropdown--menu--item-remove--disabled")||i.focus()}}})),$(".est__dropdown--menu--item-remove").on("keydown keypress",(function(e){$("this:focus")&&38===e.which&&$(this).prev().focus()}))}),500)}dropdownFocusout(e){let t=document.getElementById("select-weight_"+this.product.id);t&&(t.contains(e.relatedTarget)||(0!==this.selectedWeight&&(this.selectedWeightText=this.isQscV2?Number(this.selectedWeight).toFixed(2)+" lb":Number(this.selectedWeight)+" lb"),this.showWeights=!1,$(this._elementRef.nativeElement).children().find("span#qtyDropdownBtn_"+this.product.id).focus(),this.isQscV2&&(this.isExtended=!1)))}updateWeight(e){this._cartAPICallV2(e)}_cartAPICallV2(e,t){this.hasCart;let i=this.product.id||this.product.itemId;window.AB.DATALAYER.isProductInAnalyticsCart(i)||(this.addItemToCartAnalytics=!0),"minicart"!==this.calledBy&&this.setLoadingSpinnerEmitter.emit(!0),this.cartV2Service.addOrUpdateProductQuantity(this.product,"minicart"===this.calledBy?this.product.itemId:this.product.id,e,!1,this.sellerId,!0,this.snsInfo,this.configObj,!1,null,this.entryId).subscribe((n=>{if(n){this.isQuantityIncreased&&(this.showPriceChangeToast(this.isQuantityIncreased,n),this.isQuantityIncreased=!1),this.cartService.refreshCart(n),this.loadingSpinner=!1;let r=this.cartV2Service.getCartName(this.configObj?.programType,this.sellerId),s=this.cartV2Service.fetchCartDetailsFromResponse(n,r);if(s&&s.cartId&&("minicart"!==this.calledBy&&this.setLoadingSpinnerEmitter.emit(!1),s.cartItems&&(this._commonService.sendSponsoredProductClickEvent(this.product,"quantityDropdown","qtyChange"),this.enableAdRelevanceTracking&&this._commonService.recordRelevanceImpression(this.product,"quantityDropdown","qtyChange"),s=this.cartV2Service.handleResponseForPendingOrder(s),this.cartId=s.cartId,setTimeout((()=>{this._setFocusInsideQty()}),1e3),this._setFocusInsideQty(),this.product.quantity=e,"minicart"===this.calledBy&&(this.changeMiniCartEmitter.emit(s.summary),this.updateUnavailableCountEmitter.emit(s.mfcUnavailableProductsCount)),this.isWYSIWYGEnabled=s.isWYSIWYGEnabled,this.isOnProductDetail&&t&&t?.currentValue?.isChecked!==t?.previousValue?.isChecked&&!1===t?.currentValue?.isChecked&&this.toasterService.show({title:"OK",message:"You've unsubscribed to this item.",type:ere.Info,interactiveElement:"Undo"},{top:this.toastMessagePostion}),window.AB.DATALAYER))){let e=this.sellerId?this.sellerId:"1P_WINE"===s.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();window.AB.DATALAYER.updateCartType("minicart"===this.calledBy?"mini_cart":""),window.AB.DATALAYER.updateCart(n,this.product,n.isWYSIWYGEnabled),this.addItemToCartAnalytics||("increase"===window.AB.DATALAYER.weightSelectionActionType(i,this.product.quantity)?this.increaseQuantityAnalytics=!0:"decrease"===window.AB.DATALAYER.weightSelectionActionType(i,this.product.quantity)&&(this.decreaseItemAnalytics=!0)),this._updateAnalyticsProductInfo(this.product.quantity,e),this.addItemToCartAnalytics?(window.AB.DATALAYER.addItemToCart(),this.addItemToCartAnalytics=!1):this.increaseQuantityAnalytics?(window.AB.DATALAYER.increaseItemQuantity(),this.increaseQuantityAnalytics=!1):this.decreaseItemAnalytics&&(window.AB.DATALAYER.decreaseItemQuantity(),this.decreaseItemAnalytics=!1)}}}),(e=>{if(console.error("Error while calling Cart API: "+e.message),this.isOnProductDetail&&t&&t?.currentValue?.isChecked!==t?.previousValue?.isChecked){let e={modal:"errorMod
1al",showModal:!0,prevIdToFocus:"",errModalType:t.currentValue.isChecked?"subscribe":"unsubscribe",selectedFrequency:this.snsInfo.selectedFrequency};this._productSnsModalService.show(e)}this.loadingSpinner=!1,this.isQuantityIncreased=!1}))}_removeProductV2(){this.setLoadingSpinnerEmitter.emit(!0),this.cartV2Service.removeProduct(this.product,"minicart"===this.calledBy?this.product.itemId:this.product.id,this.sellerId,this.configObj,!1,this.entryId).subscribe((e=>{if(e){this.cartService.refreshCart(e);let t=this.cartV2Service.getCartName(this.configObj?.programType,this.sellerId),i=this.cartV2Service.fetchCartDetailsFromResponse(e,t);if(this.loadingSpinner=!1,this.setLoadingSpinnerEmitter.emit(!1),this._commonService.sendSponsoredProductClickEvent(this.product,"quantityDropdown","removeProduct"),this._commonService.checkPendingOrder()&&!this._aemService.getEditOrderOldVersion()){let e=h({},i);e.hasOwnProperty("orderSummary")&&delete e.orderSummary,i=f(h({},e),{totalAmount:i.orderSummary?i.orderSummary.totalEstimatedPrice:null,subscriptionDetails:i.orderSummary?i.orderSummary.subscriptionDetails:null,totalOfferSavings:i.orderSummary?i.orderSummary.totalSavings:null,payments:i.payments&&i.payments.length?e.payments.map((e=>{let t=e.subType;return delete e.subType,f(h({},e),{subtype:t})})):i.payments,orderSummary:h({},i.orderSummary),isWYSIWYGEnabled:i.isWYSIWYGEnabled,wysiwygOrderSummary:h({},i.wysiwygOrderSummary)})}if(i=this.cartV2Service.handleResponseForPendingOrder(i),this.isWYSIWYGEnabled=i.isWYSIWYGEnabled,window.AB.DATALAYER){let n=this.sellerId?this.sellerId:"1P_WINE"===i.cartCategory||"1P_WINE"===t?"22222222":window.AB.DATALAYER.getBannerSellerId();window.AB.DATALAYER.updateCartType("minicart"===this.calledBy?"mini_cart":""),window.AB.DATALAYER.updateCart(e,null,e.isWYSIWYGEnabled),this._updateAnalyticsProductInfo(0,n),window.AB.DATALAYER.removeItemFromCart()}console.error("Cart API is succesful with no response"),this.resetToSelectWeight(),this.loadingSpinner=!1}}),(e=>{console.error("Error while calling Cart API: "+e.message),this.loadingSpinner=!1}))}initializeWeightList(){let e=this.config[this.currentEnv]?.catalogConfig;this.httpOptions={headers:new jy({"Content-Type":"application/json","ocp-apim-subscription-key":e["apim.api.brand.index.service.key"]})};let t=e["apim.api.catalog.path"]+e["apim.api.catalog.increment.price.list.endpoint"]+`?upcIds=${this.product.upc}&storeId=${this._userInfoService.getShopStoreId()}`;this._http.get(t,this.httpOptions).pipe(sn(1)).subscribe((e=>{if(e){let t=e.priceAndPromoResponse;t&&t.length>0&&(this.showModal?(this.weightList=t[0].incrementPriceList,this.selectedWeight=this.weightList[0].weight,this.estimatedPrice=this.weightList[0].price):(this.weightList=t[0].incrementPriceList,this.weightList&&this.weightList.length>0&&(this.showWeights=!0))),this.isQscV2&&(this.showWeights=!1)}}),(e=>{this.showWeights=!1,this.loadingSpinner=!1}))}_updateAnalyticsProductInfo(e,t){if(window.AB?.DATALAYER){let i="",n=this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelectorAll('[data-carousel-behaviour="bia-crossSell"]')?.length,r=this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelectorAll('[data-carousel-behaviour="bia-spaCarousel"]')?.length;i=n?this._elementRef.nativeElement.closest("cross-sell")?.querySelector(".cross-sell__header .cross-sell__title")?.textContent:r?this._elementRef.nativeElement.closest(".bia-spa-carousel-container")?.querySelector(".bia-spa-carousel-container-header")?.textContent?.trim():this._elementRef.nativeElement.closest(".master-product-carousel")?this._elementRef.nativeElement.closest(".master-product-carousel").querySelector("[data-carousel-title]")?.getAttribute("data-carousel-title"):window.AB.DATALAYER.isDFTAPage()?this._elementRef.nativeElement.closest(".slick-product-carousel")?.previousElementSibling?.textContent?.trim()||"":this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("lazy-wrapper")?.getAttribute("data-carousel-title")||this._elementRef.nativeElement.closest(".slick-product-carou
1sel")?.querySelector(".carousel-header-text")?.textContent?.trim()||this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("targeted-wrapper")?.getAttribute("data-carousel-title");let s={id:this.product.id||this.product.itemId,adobeMetricA:this.product.adobeMetrics?.metricA,adobeMetricC:this.product.adobeMetrics?.metricC,fullName:this.product.fullName,name:this.product.name,units:window.AB.COMMON.checkPendingOrder()?this.product.quantity:this.product.qty,unitType:this.product.unitQuantity,lbs:"0",each:"0",pricePerUnit:this.product.pricePer,listPrice:this.product.price?this.product.price.toString():"",carouselSection:i,basePrice:this.product.basePrice?this.product.basePrice.toString():"",pricingType:this.product.promoType,couponFlag:"0",couponClipped:"0",couponID:"",aisleId:this.product.aisleId,upc:this.product.upc,isMTO:this.product.isMtoProduct,departmentName:this.product.departmentName,sellerId:t||this.product.sellerId,sellerName:this.product.sellerName,editOrderFlow:!!this._commonService.checkPendingOrder(),snapEligible:this.product.snapEligible,isProductTrackingDisabled:!!this.product.isProductTrackingDisabled,isP13nGrid:!!this._elementRef.nativeElement.closest("#p13nProductGrid"),quantity:this.product.quantity,previousPrice:this.analyticsPreviousPrice,isPriceDecreased:this.analyticsIsPriceDecreased,badges:this.product.badges,containsAlcohol:this.product.containsAlcohol,featured:this.product.featured};"LB"==this.product.unitQuantity?s.lbs=e:"EACH"==this.product.unitQuantity&&(s.each=this.product.quantity?this.product.quantity:this.product.qty);let a=[];if(a.length>0){let e=a.filter((e=>"C"===e.status)).length,t=a.length,i=a.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString();s.couponFlag=t.toString(),s.couponClipped=e.toString(),s.couponID=i}if("minicart"!==this.calledBy){let e,t,n=!1,r=!1;if(i){let a=$(this._elementRef.nativeElement).closest(".slick-product-carousel"),o=a.find("[data-carousel-behaviour=buy-it-again]").length,l=a.find("[data-carousel-driven=pathway-search]").length,c=a.find("[data-carousel-driven=p13n-generic]").length;s.isBIACarousalProduct=!!a.find("[data-carousel-behaviour=bia-spaCarousel]").length,e=!!o,t=!!l,n=-1!==i.search(/picks for you|picked for you|picks-for-you|picked-for-you/i),r=!!c,s.placement=window.AB.DATALAYER.setPlacementInfoCarouselItems(this._elementRef.nativeElement)}let a={isCrossSell:!1,isRecommended:this.isRecommended||n||r,isSponsored:this.product.featured,isPastPurchased:e||this.product.pastPurchased,isBrPathway:t};(this.product.adId||this.product.eventTracking)&&(a.isSponsored=!0),window.AB.DATALAYER.recommendationInfo(a)}window.AB.DATALAYER.productInfo(s),"minicart"===this.calledBy?window.AB.DATALAYER.setCarouselName("shop|mini_cart"):i?window.AB.DATALAYER.isRecipesPage()?window.AB.DATALAYER.setCarouselName(`recipes|${i}`):window.AB.DATALAYER.setCarouselName(`shop|${i}`):window.AB.DATALAYER.setCarouselName(""),window.AB.DATALAYER.isPdp()&&("minicart"===this.calledBy||i?window.AB.DATALAYER.setPageFilterMetaInfo(!1):window.AB.DATALAYER.setPageFilterMetaInfo(!0))}}getAriaLabel(e){return`Estimated Total $${this.estimatedPrice}. Weight selected is ${Math.round(100*e)/100} lb`}getSelectedWeight(){return parseFloat(this._quickAddBasketService.getQuickAddBasketItemWeight(this.product.id))}ngOnDestroy(){this.subscriptions.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w),$d(Vl),$d(xre),$d(Rw),$d(ov),$d(Mw),$d(Cw),$d(Dw),$d(Sw),$d(Wre),$d(Kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["quantity-dropdown-al-v1"]],hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}),0,od)},inputs:{product:"product",sellerId:"sellerId",calledBy:"calledBy",isAnyProductHasAddlInfo:"isAnyProductHasAddlInfo",noWeightModal:"noWeightModal",isRecommended:"isRecommended",isQscV2:"isQscV2",isCheckboxChecked:"isCheckboxChecked",snsInfo:"snsInfo",isMkpSellerTagDisabled:"isMkpSellerTagDisabled",configObj:"configObj"},outputs:{removeMiniCartEmitter:"removeMiniCartEmitter",changeMiniCartEmitter:"changeMiniCartEmitter",updateUnavailableCountEmitter:"updateUnavailableCountEmitter",setLoadingSpinnerEmitter:"setLoadingSpinnerEmitter",updateCheckboxEmitter:"updateCheckboxEmitter",updateQscQtyEmitter:"updateQscQtyEmitter"},features:[ga],decls:3,vars:2,consts:[["qscDropdown",""],["selectWeightButton",""],[4,"ngIf","ngIfElse"],[1,"quantity-stepper-v3"],[1,"quantity-stepper-container"],[1,"product-btn",3,"ngClass"],["data-qa","addbutton","role","button","tabindex","0","class","btn product-btn__add product-btn--signin",3,"id","click",4,"ngIf"],["class","dropdown est__dropdown",3,"ngClass","id",4,"ngIf"],[4,"ngIf"],["data-qa","addbutton","role","button","tabindex","0",1,"btn","product-btn__add","product-btn--signin",3,"click","id"],[1,"dropdown","est__dropdown",3,"ngClass","id"],["class","dropdown-menu est__dropdown--menu",3,"ngClass",4,"ngIf"],["aria-haspopup","true",1,"est__dropdown--button","btn","btn_qty-stepper",3,"click","id"],[1,"btn","product-btn__add","product-btn--signin",3,"click","id"],[1,"dropdown-menu","est__dropdown--menu",3,"ngClass"],["tabindex","-1","role","menu",1,"est__dropdown--menu--item--container",3,"focusout","id"],["class","dropdown-item est__dropdown--menu--item","role","menuitem","tabindex","0",3,"id","click","mouseenter","keypress",4,"ngFor","ngForOf"],["role","menuitem","tabindex","0",1,"dropdown-item","est__dropdown--menu--item-remove",3,"click","keypress","mouseenter","ngClass"],["aria-live","polite"],["aria-hidden","true",1,"dropdown-item","est__dropdown--selected--price"],[1,"quantity-dropdown__est-total--label"],[1,"sr-only"],[1,"dropdown-item","est__dropdown--selected--price--helper"],["role","menuitem","tabindex","0",1,"dropdown-item","est__dropdown--menu--item",3,"click","mouseenter","keypress","id"],["role","group","aria-describedby","123pg960161868",3,"ngClass"],["aria-label","Decrement quantity","data-qa","prdctdcrmntr","role","button","tabindex","0",1,"product-btn__qty-step__decrease",3,"click","id"],["aria-hidden","true",1,"svg-qty-stepper-decrease","product-btn__qty-step__decrease--icon"],["data-qa","prd-qty-stppr-qtymsg","role","button","tabindex","0",1,"product-btn__qty-step__amt","product-btn__qty-step__amt__amt-text",3,"click","id"],["aria-label","Increment quantity","data-qa","prdctincrmntr","role","button","tabindex","0",1,"product-btn__qty-step__increase",3,"click","id","disabled"],["aria-hidden","true",1,"svg-qty-stepper-increase","product-btn__qty-step__increase--icon"],["id","modal-est","role","dialog","tabindex","-1",1,"modal","qty-modal","fade"],[1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["aria-label","Close",1,"close",3,"click","keypress"],["aria-hidden","true",1,"svg-icon","svg-close"],[1,"modal-body"],[1,"product"],["aria-hidden","true",1,"product__image-container"],["media","(max-width: 575px)"],["media","(max-width: 768px)"],["data-qa","prd-itm-img",1,"ab-lazy",3,"alt"],[1,"product__title"],[1,"title-md","mb-4"],["aria-hidden","true",1,"gray-darker"],[1,"amount"],[1,"amount__label","body-text-sm"],[1,"row","amount__info"],[1,"amount__info__per-unit","title-sm-bold"],["tabindex","0",1,"amount__info__est"],["aria-live","polite",1,"sr-only","amount__info__est"],["aria-hidden","true",1,"amount__info__est--label","body-text-sm"],["aria-hidden","true",1,"amount__info__est--price","title-sm-bold"],[1,"amount__select",3,"change"],["class","options",3,"value","selected",4,"ngFor","ngForOf"],[1,"amount__add-qty-btn"],[1,"btn","btn-primary",3,"click","keypress"],[1,"options",3,"value","selected"],[1,"quantity-stepper-v3","qsc-dropdown-v2-default",3,"ngClass"],[1,"dropdown","est__dropdown",3,"id"],["aria-haspopup","true",1,"est__dropdown--button","btn","btn_qty-stepper-lb","qsc-btn_qty-stepper-lb",3,"click","ngClass","id","disabled"],["class","dropdown-menu est__dropdown--menu qsc-dropdown-menu",3,"ngClass",4,"ngIf"],[1,"dropdown-menu","est__dropdown--menu","qsc-dropdown-menu",3,"ngClass"],["tabindex","-1","role","menu","tabindex","-1",1,"est__dropdown--menu--item--container","qsc-dropdown-menu-item-container",3,"focusout","id"],["class","dropdown-item est__dropdown--menu--item qsc-dropdown-item","role","menuitem","tabindex","0",3,"id","mouseenter","click","keypress",4,"ngFor","ngForOf"],["role","menuitem","tabindex","0",1,"dropdown-item","est__dropdown--menu--item-remove","qsc-dropdown-item",3,"click","keypress","mouseenter","ngClass"],["aria-live","polite",1,"qsc-dropdown-selected-container"],["aria-hidden","true",1,"dropdown-item","est__dropdown--selected--price","qsc-dropdown-selected-price"],[1,"quantity-dropdown__est-total--label","qsc-dropdown-total-label"],[1,"dropdown-item","est__dropdown--selected--price--helper","qsc-dropdown-selected-price-helper"],["role","menuitem","tabindex","0",1,"dropdown-item","est__dropdown--menu--item","qsc-dropdown-item",3,"mouseenter","click","keypress","id"]],template:function(e,t){if(1&e&&ph(0,cse,8,8,"ng-container",2)(1,fse,7,20,"ng-template",null,0,Wm),2&e){let e=sm(2);zh("ngIf",!t.isQscV2)("ngIfElse",e)}},dependencies:[sy,oy,cy,WS,KS,Sy,Oy,By],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),gse=e=>({"product-btn--signin":e}),bse=e=>({"product-btn__qty-step__increase":!0,"product-btn__qty-step__increase--max-amt qsc-step__increase--max-amt":e}),yse=(e,t,i)=>({"qsc-step-default":e,"qsc-step":t,"qsc-step-disabled":i}),vse=(e,t,i,n,r,s)=>({"product-btn":!0,"product-btn--with-addl-info":e,"product-btn--without-ar":t,"full-loading":i,"remove-loading":n,"add-product-checkmark":r,"product-btn--light":s}),wse=(e,t)=>({"product-btn--signin":e,"d-flex align-items-center justify-content-center":t}),_se=e=>({btn:!0,"product-btn__qty-step":!0,"product-btn__qty-step--loading":e}),Sse=e=>({"product-btn__qty-step__decrease--min-amt":e}),Cse=e=>({"product-btn__qty-step__increase":!0,"product-btn__qty-step__increase--max-amt":e});function Ise(e,t){if(1&e){let e=Mf();kf(0,"button",9),jf("click",(function(){return Wa(e),Ha(Yf(3).qscDecrease()
1)})),Tf(1,"span",10),xf()}if(2&e){let e=Yf(3);_h("aria-label","Decrease Quantity ",e.getProductFullName(),""),Zf("id","dec_qtyInfo_",e.product.id,""),zh("disabled",e.showQtyUpdateBtn||e.updateState.input>e.product.inventoryQty)}}function Ase(e,t){if(1&e){let e=Mf();kf(0,"button",11),jf("click",(function(){return Wa(e),Ha(Yf(3).qscIncrease())})),Tf(1,"span",12),xf()}if(2&e){let e=Yf(3);_h("aria-label","Increase Quantity ",e.getProductFullName(),""),Zf("id","inc_qtyInfo_",e.product.id,""),zh("ngClass",Om(6,bse,e.qscQuantity>=e.product.inventoryQty||e.qscQuantity>=e.product.maxPurchaseQty)),gh("aria-disabled",e.product.quantity>=e.product.inventoryQty||e.product.quantity>=e.product.maxPurchaseQty?"true":"false")}}function kse(e,t){if(1&e){let e=Mf();kf(0,"div",5),jf("click",(function(){return Wa(e),Ha(Yf(2).onQscStepperClick())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(2).onQscStepperClick())})),ph(1,Ise,2,5,"button",6),kf(2,"span",7),jf("click",(function(){return Wa(e),Ha(Yf(2).onQscAmtClick())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(2).onQscAmtClick())})),am(3),xf(),ph(4,Ase,2,8,"button",8),xf()}if(2&e){let e=Yf(2);_h("data-qty-id","pc",e.product.id,"Inpt"),Zf("id","addButton_",e.product.id,""),zh("ngClass",Om(12,gse,!e.isAuthorized)),gh("aria-label",e.isAuthorized?e.ADD+" 1 unit of "+e.getProductFullName():e.SIGNIN+" 1 unit of "+e.getProductFullName()),Vd(),zh("ngIf",e.isQuantityStepperExtended),Vd(),Zf("id","qtyInfo_",e.product.id,""),gh("aria-label",e.quantityAriaLabelMessage),Vd(),cm(" ",e.qscQuantity," "),Vd(),zh("ngIf",e.isQuantityStepperExtended)}}function xse(e,t){if(1&e){let e=Mf();kf(0,"div",13)(1,"input",14),jf("keydown.enter",(function(){return Wa(e),Ha(Yf(2).qscEnterTabKeyDown())}))("keydown",(function(t){return Wa(e),Ha(Yf(2).inputKeydown(t))}))("keyup",(function(t){return Wa(e),Ha(Yf(2).inputKeyup(t))})),mm("ngModelChange",(function(t){Wa(e);let i=Yf(2);return fm(i.updateState.input,t)||(i.updateState.input=t),Ha(t)})),xf(),kf(2,"button",15),jf("click",(function(){return Wa(e),Ha(Yf(2).qscUpdateAmt())})),am(3),xf()()}if(2&e){let e=Yf(2);Vd(),Sh("aria-describedby","",e.carouselId,"pg",e.product.id,""),Zf("id","qtyInfoControl_",e.product.id,""),Jf("max",e.product.maxPurchaseQty),hm("ngModel",e.updateState.input),Vd(),Sh("aria-describedby","",e.carouselId,"pg",e.product.id,""),zh("disabled",e.showQtyUpdateBtn||e.updateState.input>e.product.inventoryQty),Vd(),cm(" ",e.updateState.button," ")}}function Tse(e,t){if(1&e&&ph(0,kse,5,14,"div",3)(1,xse,4,12,"div",4),2&e){let e=Yf();zh("ngIf",!e.updateState.show&&"editpastpurchases"!==e.calledBy&&e.product.price>0),Vd(),zh("ngIf",e.updateState.show)}}function Pse(e,t){if(1&e){let e=Mf();kf(0,"div",23),jf("click",(function(){return Wa(e),Ha(Yf(3).addToCart())})),am(1),xf()}if(2&e){let e=Yf(3);_h("data-qty-id","pc",e.product.id,"Inpt"),Zf("id","addButton_",e.product.id,""),zh("ngClass",Bm(7,wse,!e.isAuthorized,e.isLightWeightProduct)),gh("aria-label",e.isAuthorized?(e.isOnProductDetail&&e.changeLabel?e.changeLabel:e.ADD)+" 1 unit of "+e.getProductFullName():e.SIGNIN+" 1 unit of "+e.getProductFullName()),Vd(),cm(" ",e.isAuthorized?e.isOnProductDetail&&e.changeLabel?e.changeLabel:e.ADD:e.isLightWeightProduct?e.SIGNIN_LIGHT:e.SIGNIN," ")}}function Ese(e,t){if(1&e){let e=Mf();kf(0,"div",24)(1,"button",25),jf("click",(function(){return Wa(e),Ha(Yf(3).decreaseCart())})),Tf(2,"span",10),xf(),Tf(3,"span",26),kf(4,"span",27),jf("click",(function(){Wa(e);let t=Yf(3);return Ha("snsCheckoutFlowModal"!==t.calledBy&&t.showUpdate())})),am(5),xf(),kf(6,"button",11),jf("click",(function(){return Wa(e),Ha(Yf(3).beforeIncreaseCart(!1))})),Tf(7,"span",12),xf()()}if(2&e){let e=Yf(3);Sh("aria-describedby","",e.carouselId,"pg",e.product.id,""),zh("ngClass",Om(20,_se,e.loadingSpinner)),Vd(),_h("aria-label","Decrease Quantity ",e.getProductFullName(),""),Zf("id","dec_qtyInfo_",e.product.id,""),zh("ngClass",Om(22,Sse,"snsCheckoutFlowModal"===e.calledBy&&e.qscQuantity<=1))("disabled",e.showQtyUpdateBtn||e.updateState.input>e.product.inventoryQty&&"snsCheckoutFlowModal"!==e.calledBy||"snsCheckoutFlowModal"===e.calledBy&&e.qscQuantity<=1),Vd(3),Zf("id","qtyInfo_",e.product.id,""),gh("aria-label",e.quantityAriaLabelMessage),Vd(),lm(e.quantityMessage),Vd(),_h("aria-label","Increase Quantity ",e.getProductFullName(),""),Zf("id","inc_qtyInfo_",e.product.id,""),zh("ngClass",Om(24,Cse,e.product.quantity>=e.product.inventoryQty||e.product.quantity>=e.product.maxPurchaseQty&&"snsCheckoutFlowModal"!==e.calledBy||"snsCheckoutFlowModal"===e.calledBy&&e.qscQuantity>=e.product.maxPurchaseQty)),gh("aria-disabled",e.product.quantity>=e.product.inventoryQty||e.product.quantity>=e.product.maxPurchaseQty?"true":"false")}}function Dse(e,t){if(1&e){let e=Mf();kf(0,"div",13)(1,"input",28),jf("keydown.enter",(function(t){return Wa(e),Ha(Yf(3).enterTabKeyDown(t))}))("keydown",(function(t){return Wa(e),Ha(Yf(3).inputKeydown(t))}))("keyup",(function(t){return Wa(e),Ha(Yf(3).inputKeyup(t))})),mm("ngModelChange",(function(t){Wa(e);let i=Yf(3);return fm(i.updateState.input,t)||(i.updateState.input=t),Ha(t)})),xf(),kf(2,"button",29),jf("click",(function(){return Wa(e),Ha(Yf(3).updateCart())})),am(3),xf()()}if(2&e){let e=Yf(3);Vd(),Sh("aria-describedby","",e.carouselId,"pg",e.product.id,""),Zf("id","qtyInfoControl_",e.product.id,""),Jf("max",e.product.maxPurchaseQty),hm("ngModel",e.updateState.input),Vd(),Sh("aria-describedby","",e.carouselId,"pg",e.product.id,""),zh("disabled",e.showQtyUpdateBtn||e.updateState.input>e.product.inventoryQty),Vd(),cm(" ",e.updateState.button," ")}}function Ose(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",19),jf("keyup",(function(t){return Wa(e),Ha(Yf(2).qtyStepperKeyup(t))})),kf(2,"span",20),am(3),xf(),ph(4,Pse,2,10,"div",21)(5,Ese,8,26,"div",22)(6,Dse,4,12,"div",4),xf(),Df()}if(2&e){let e=Yf(2);Vd(),zh("ngClass",Fm(5,vse,!e.isMarketPlaceEnabled&&e.isAnyProductHasAddlInfo&&!e.isLightWeightProduct,!e.isAnyProductHasAddlInfo&&!e.isLightWeightProduct,"snsCheckoutFlowModal"!==e.calledBy&&(0===e.product.quantity||e.updateState.show),"editpastpurchases"===e.calledBy,e.checkMark,e.isLightWeightProduct)),Vd(2),lm(e.stepperAnnouncement),Vd(),zh("ngIf","snsCheckoutFlowModal"!==e.calledBy&&(null===e.product.quantity||0===e.product.quantity&&!e.updateState.show&&"editpastpurchases"!==e.calledBy&&e.product.price>0)),Vd(),zh("ngIf","snsCheckoutFlowModal"===e.calledBy||e.product.quantity>0&&!e.updateState.show&&"editpastpurchases"!==e.calledBy),Vd(),zh("ngIf",e.updateState.show&&"snsCheckoutFlowModal"!==e.calledBy)}}function Bse(e,t){if(1&e&&(kf(0,"div",16)(1,"div",17),ph(2,Ose,7,12,"ng-container",18),xf()()),2&e){let e=Yf(),t=sm(1);zh("ngClass",Mm(3,yse,e.isQscV2,e.isQuantityStepperExtended&&e.isQscV2,!e._isCheckboxChecked&&e.isQscV2)),Vd(2),zh("ngIf",!e.isQscV2)("ngIfElse",t)}}function Mse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",30)(2,"div",31)(3,"div",32)(4,"div",33)(5,"button",34),So(),kf(6,"svg",35),Tf(7,"path",36),xf()(),Co(),kf(8,"p",37),am(9),qm(10,"titlecase"),xf(
1),kf(11,"p",38),am(12),xf(),kf(13,"button",39),jf("click",(function(){Wa(e);let t=Yf();return t.reserveNewTime(),Ha(t.analyticsMTOClicks("reserve-new-time"))})),am(14,"Reserve new time"),xf(),kf(15,"button",40),jf("click",(function(){Wa(e);let t=Yf();return t.chooseTimeLater(),Ha(t.analyticsMTOClicks("choose-time-later"))})),am(16,"Choose time later"),xf(),kf(17,"button",41),jf("click",(function(){return Wa(e),Ha(Yf().analyticsMTOClicks("dont-add-item"))})),am(18,"Don't add item"),xf()()()()(),Df()}if(2&e){let e=Yf();Vd(),df("mto-popup p-",e.product.id," modal fade"),Vd(8),cm("",$m(10,6,e.reservedTimeIntent)," time will change"),Vd(3),dm("This item requires ",e.getMtoPopupText()," to prepare. Please select a new time for ",e.reservedTimeIntent,"")}}function Rse(e,t){if(1&e&&(Ef(0),kf(1,"div",42)(2,"div",43)(3,"div",44)(4,"div",45)(5,"div",46)(6,"button",47),So(),kf(7,"svg",48),Tf(8,"path",36),xf()(),Co(),kf(9,"div",49)(10,"p",50)(11,"span",51),So(),kf(12,"svg",52),Tf(13,"path",53),xf()(),am(14," Item can't be added to cart "),xf(),Co(),kf(15,"p",54),am(16),xf()()()()()()(),Df()),2&e){let e=Yf();Vd(),df("mto-popup-error p-",e.product.id," modal fade"),Vd(15),dm("Made to order items require ",e.getMtoPopupText()," to prepare and wonât be ready in time for ",e.reservedTimeIntent,".")}}var Lse=(()=>{class e{onQscClick(e){!this.isQscV2||!this.isQuantityStepperExtended||e.target.closest(`#addButton_${this.product.id}`)||e.target.closest("div.product-btn__update")||(this.isQuantityStepperExtended=!1,this.updateState.show&&(this.updateState.show=!1))}set isCheckboxChecked(e){this._isCheckboxChecked=e,this._isCheckboxChecked||(this.isQuantityStepperExtended=!1,this.updateState.show=!1)}constructor(e,t,i,n,r,s,a,o,l,c,d,u,p,h){this._zone=e,this._abTestService=t,this._commonService=i,this._userInfoService=n,this._elementRef=r,this.toasterService=s,this.cartService=a,this._http=o,this._utilService=l,this.cartV2Service=c,this._productUtilService=d,this._aemService=u,this._productSnsModalService=p,this._quickAddBasketService=h,this.isMarketPlaceEnabled=!1,this.isWineShopEnabled=!1,this.onQtyUpdate=new _l,this.removePastPurchasesEmitter=new _l,this.removeMiniCartEmitter=new _l,this.changeMiniCartEmitter=new _l,this.updateUnavailableCountEmitter=new _l,this.updateCheckboxEmitter=new _l,this.updateQscQtyEmitter=new _l,this.config=Iw,this.quantityChange=new kt,this.quantityChange$=this.quantityChange.asObservable(),this.snsInfoChange=new kt,this.snsInfoChange$=this.snsInfoChange.asObservable(),this.cartLSname="abCart",this.addToCartEndpoint=window.AB.addToCartPath,this.ADD="Add",this.SIGNIN="Sign in to add",this.SIGNIN_LIGHT="Sign in",this.subscriptions=new Ye,this._isPromiseServiceEnabled=!0,this._disableSubPromptFlag=!(window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.hasOwnProperty("disableSubPromptFlag"))||window.SWY.CONFIGSERVICE.featureToggleConfig.disableSubPromptFlag,this.statusAriaLive="off",this.statusAddAriaMessage="",this.statusQuantityUpdate="",this.quantityMessage="",this.quantityAriaLabelMessage="",this.quantityAdaMessage="",this.loadingSpinner=!1,this.checkMark=!1,this.isArEnable=!1,this.updateState={show:!1,input:null,button:"Update"},this._cartIdCreated=new kt,this.cartIdCreated$=this._cartIdCreated.asObservable(),this.showQtyUpdateBtn=!1,this.isAuthorized=!1,this.isV2CarouselItem=!1,this.isV2ProductItem=!1,this.isCrossSellProductItem=!1,this.isBiaAddAll="",this.disableAddAll=!1,this.reservedTimeIntent="",this.mto={popup:{show:!1,closeBtn:".mto-popup__close-btn",modalId:"#mtoModal",firstFocusableElem:".mto-popup__close-btn",lastFocusableElem:".mto-popup__dont-add-btn"},error:{show:!1,closeBtn:".mto-popup-error__close-btn",modalId:"#mtoModalError",firstFocusableElem:".mto-popup-error__close-btn",lastFocusableElem:".mto-popup-error__close-btn"}},this.toastMessagePostion="20vh",this.addAllProductsMessage="",this.currentEnv="",this.baseDomainUrl="",this.isOnProductDetail=!1,this.isQuantityStepperExtended=!1,this.isMarketPlaceR2Disabled=!0,this.isLightWeightProduct=!1,this.isQuantityIncreased=!1,this.isAuthorized=this._userInfoService.isAuthorized(),this.reservedTimeIntent=this._userInfoService.getUserChannel(),this.currentEnv=this._commonService.getCurrentEnviorment(),this.baseDomainUrl=this.config[this.currentEnv]?.baseURL?.replace("{banner}",this._userInfoService.getBanner()),this.enableAdRelevanceTracking=!this._aemService.getFeatureFlagByNameDisable("disableAdRelevance")}ngOnInit(){this.isOnProductDetail="product-detail-item"===this.calledBy,this.isLightWeightProduct="light-weight"===this.calledBy;
1let e=$(this._elementRef.nativeElement).closest("product-carousel-item-al-v1");this.isV2CarouselItem=!!e.length;let t=$(this._elementRef.nativeElement).closest("product-item-al-v1");this.isV2ProductItem=!!t.length;let i=$(this._elementRef.nativeElement).closest(".cross-sell__product");if(this.isCrossSellProductItem=!!i.length,this.isBiaAddAll="biaAddAllBtn"===this.calledBy,this.orderNumber=this._aemService.getOrderNumberCookie(),this.isQscV2){this.quantityStepperState=this._isCheckboxChecked?"default":"disabled",this.qscQuantity=JSON.parse(localStorage.getItem("quickAddBasket")).cartItemsList.find((e=>e.itemId==this.product.id)).qty;let e=this._commonService.currentCartObj.subscribe((e=>{let t=e?.cartItems?.find((e=>e.itemId==this.product.id));t&&(this.qscQuantity=t.qty,this.setLocalStorageQscQuantity(this.qscQuantity))}));this.subscriptions.add(e)}if("biaAddAllBtn"===this.calledBy&&(this.updateBiaAddAllBtnContext(),this.updateBiaAddAllSubscription=this._commonService.updateBiaAddAllBtn$.subscribe((e=>{e&&this.updateBiaAddAllBtnContext()}))),this._isRegistered()?this._commonService.checkCartId("cartId")&&(this.cartId=this._commonService.getCartId("cartId")):this._commonService.checkCartId("guestCartId")&&(this.cartId=this._commonService.getCartId("guestCartId")),this._isRegistered()?this.httpOptions={headers:new jy({"Content-Type":"application/json",Authorization:"Bearer "+this._userInfoService.getSWY_SHOP_TOKEN(),"Sort-Order":"date","ocp-apim-subscription-key":this.config[this.currentEnv].cartAPIDetails.subscriptionKey.value,"ocp-apim-trace":"true"})}:this.httpOptions={headers:new jy({"Content-Type":"application/json","Sort-Order":"date","ocp-apim-subscription-key":this.config[this.currentEnv].cartAPIDetails.subscriptionKey.value,"ocp-apim-trace":"true"})},this.isBiaAddAll||(this.productDetailPath&&(this.productDetailPath=this.productDetailPath.replace("(bpn)",void 0!==this.product.id?this.product.id:this.product.itemId)),this.product.originalQuantity=this.product.quantity),"lastorder"===this.calledBy&&(this.product.quantityOrder=this.product.previousPurchaseQty?this.product.previousPurchaseQty:this.product.quantity),"minicart"!==this.calledBy&&!this.isBiaAddAll){let e=this._commonService.currentCartObj,t=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId);e=e.pipe(bi((e=>this.cartV2Service.fetchCartDetailsFromResponse(e,t)))),e.subscribe((e=>{this.hasCart=!!e.cartId;let t=0;try{let i={};this._commonService.checkPendingOrder()?(i=e?.cartItems?.find((e=>e.itemId==this.product.id)),t=i?i.quantity:0):(i=e?.cartItems?.find((e=>e.itemId==this.product.id)),t=i?i.qty:0),this.product.maxPurchaseQty=i.maxPurchaseQty,this.entryId=i?.entryId,t=t>0?t:0}catch{t=0}this.product.quantity=t,this.quantityMessage=this._getQuantityMessage(),"snsCheckoutFlowModal"==this.calledBy&&(this.qscQuantity=1,this.quantityMessage=this.qscQuantity.toString(),this.quantityAriaLabelMessage="1 units of "+this.product.name),"lastorder"===this.calledBy&&this.product.quantityOrder>0&&this.product.quantity>0&&(this.updateState={show:!1,input:null,button:"Update"})}))}if("lastorder"===this.calledBy&&this.product.quantityOrder>0&&this.product.quantity<1){let e=this.product.hasOwnProperty("maxPurchaseQty")&&this.product.maxPurchaseQty&&this.product.quantityOrder>this.product.maxPurchaseQty?this.product.maxPurchaseQty:this.product.quantityOrder;this.product.quantityOrder=e,e>0&&(this.updateState={show:!0,input:this.product.quantityOrder,button:"Add"})}this.quantityChange$.pipe(hn((e=>this.updateLoadingMessage(e))),zi(600)).subscribe((e=>{this.isBiaAddAll?this.addAllItemsToCart(e):(this.loadingSpinner=!0,this.addCart(e))})),this.snsInfoChange$.pipe(zi(600)).subscribe((e=>{this._cartAPICallV2(e.qty,e.snsInfo)})),this._commonService.checkPendingOrder()?this.reservedTimeIntent=JSON.parse(localStorage.getItem("abSlotEditOrder"))?.serviceType:this.reservedTimeIntent=JSON.parse(localStorage.getItem("abSlot"))?.userChannel,this.addFirstTimeCartModalListeners()}ngOnChanges(e){if(this.isOnProductDetail&&this.snsInfo.isChecked?(this.contents=this._productSnsModalService.getDynamicContents(),this.changeLabel=this.contents?.snsSubscribedCTAText):this.changeLabel="Add",this.isBiaAddAll="biaAddAllBtn"===this.calledBy,this.isBiaAddAll||("minicart"===this.calledBy?this.quantityMessage=this._getQuantityMessage(this.product.qty):this.quantityMessage=this._getQuantityMessage(this.product.quantity)),e.snsInfo&&e.snsInfo.currentValue.updateCart){let t="minicart"===this.calledBy?this.product.qty:this.product.quantity;t>0&&this.snsInfoChange.next({qty:t,snsInfo:e.snsInfo})}}addCart(e){e=e>=0?e:0,this.product.maxPurchaseQty&&e>this.product.maxPurchaseQty&&(e=this.product.maxPurchaseQty),0===e&&"minicart"===this.calledBy?(this._removeMiniCart(),this.statusAriaLive="polite"):0===e?this._removeProductV2():(this.showQtyUpdateBtn=!0,this.quantityMessage=this._getQuantityMessage(e),this._cartAPICallV2(e),"increase"===this.statusQuantityUpdate?(this.isQuantityIncreased=!0,this.statusAddAriaMessage="1 item added to cart"):"decrease"===this.statusQuantityUpdate?this.statusAddAriaMessage="1 item removed from cart":"update"===this.statusQuantityUpdate?this.statusAddAriaMessage="cart updated":this.statusAddAriaMessage="")}showPriceChangeToast(e,t){if(e&&this._commonService.checkPendingOrder()){let e=t.cartItems?.find((e=>e.itemId===this.product.id)),i=this._commonService.getValidProductPrice(this.product),n=e?.price<e?.basePrice?e?.price:e?.basePrice;if(e&&n!==i){let e=`Great newsâyour price for this item is still $${n}, based on when you placed your order. `;this.analyticsPreviousPrice=n,n>i&&(e=`The price for ${this.product.name} has changed, but your price is still $${n} based on its price on the day your order was placed. `,this.analyticsIsPriceDecreased=!0),this.toasterService.show({title:"OK",message:e,type:ere.Info,interactiveElement:"See Policy",interactiveElementLink:"https://www.albertsonscompanies.com/policies-and-disclosures/terms-of-use/default.aspx"},{class:"popup--toaster--right"})}}}beforeIncreaseCart(e,t){let i;console.warn("beforeIncreaseCart()"),this.isPrebookRedirect=t||!1,this.isBiaAddAll||(i=void 0!==this.product.id?this.product.id:this.product.itemId);let n=this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0;if(this.isAuthorized){let t=()=>{if(console.warn("increaseCartIfSessionValid()"),"DELIVERY"===n||"DUG"===n){if("snsCheckoutFlowModal"!=this.calledBy&&this.increaseCart(),e&&"crosssell"!==this.calledBy)if(localStorage.getItem("abCart")){let e=this.cartService._get().cartItems.map((e=>e.itemId));this._commonService.showCrossSell(i,this.product.aisleId,e,this.crossSellType)}else this._commonService.showCrossSell(i,this.product.aisleId,[],this.crossSellType)}else"J4U"===n&&("weeklyAd"===this.configObj?.appName?this.navigateBannerDomainToOpenStoreSlctChange():(window.rightDrawerComp.closeDrawer(),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections.join(":")}|link|add-to-cart`),window.storeFulfillmentModal.component.setModalDisplayData(2)));"snsCheckoutFlowModal"!=this.calledBy?$(".delivery-content__button, .pickup-content .card-store-btn").click((()=>{this.increaseCart()})):this.qscQuantity<Number(this.product.maxPurchaseQty)&&(this.qscQuantity+=1,this.quantityAriaLabelMessage=this.qscQuantity.toString()+" units of "+this.product.name,this.quantityMessage=this.qscQuantity.toString(),setTimeout((()=>$(this._elementRef.nativeElement).children().find("span#qtyInfo_"+this.product.id).focus()),0),this.updateQscQtyEmitter.emit(this.quantityMessage))};this._commonService.isGuestUser()?t():this._commonService.validateSession(t)}else window.eddlLoadComplete&&window.AB.DATALAYER.setATCFlag(!0),this._showSignInModal(this.configObj)}increaseCart(){console.warn("increaseCart()");let e=event?event.currentTarget:null;if("J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0))"weeklyAd"===this.configObj.appName?this.navigateBannerDomainToOpenStoreSlctChange():window.storeFulfillmentModal.component.setModalDisplayData(2);else{let t=!1;"minicart"===this.calledBy?(this.product.qty=this.product.qty+1,1===this.product.qty&&(this.loadingSpinner=!0,t=!0),this.quantityMessage=this._getQuantityMessage(this.product.qty),this.quantityChange.next(this.product.qty)):this.isBiaAddAll?(console.warn("isBiaAddAll"),t=!0,this.quantityChange.next(this.addAllItemsMap())):(this.product.quantity=this.product.quantity?this.product.quantity+1:1,1===this.product.quantity&&(this.loadingSpinner=!0,t=!0),this.quantityMessage=this._getQuantityMessage(this.product.quantity),this.quantityChange.next(this.product.quantity)),this.statusAriaLive="polite",this.statusQuantityUpdate="increase",this.isBiaAddAll||(t?(this.addItemToCartAnalytics=!0,this.setAnalyticsSNSProdAction("add-item")):(this.increaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-increase"),this.setFocusBackOnButton(e)))}}decreaseCart(){if("J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0))"weeklyAd"===this.configObj.appName?this.navigateBannerDomainToOpenStoreSlctChange():window.storeFulfillmentModal.component.setModalDisplayData(2);else if(this.isAuthorized){let e=()=>{if("minicart"===this.calledBy)this.product.qty=this.product.qty-1,0===this.product.qty&&(this.loadingSpinner=!0,this._commonService.closeCrossSell(this.product.id)),this.quantityMessage=this._getQuantityMessage(this.product.qty),this.quantityChange.next(this.product.qty);else if("snsCheckoutFlowModal"===this.calledBy){if(1==this.qscQuantity)return void(this.quantityAriaLabelMessage="1 units of "+this.product.name);this.qscQuantity-=1,this.quantityAriaLabelMessage=this.qscQuantity.toString()+" units of "+this.product.name,this.quantityMessage=this.qscQuantity.toString(),setTimeout((()=>$(this._elementRef.nativeElement).children().find("span#qtyInfo_"+this.product.id).focus()),0),this.updateQscQtyEmitter.emit(this.quantityMessage)}else this.product.quantity=this.product.quantity-1,0===this.product.quantity&&(this.loadingSpinner=!0,setTimeout((()=>{$("#addButton_"+this.product.id).focus()}),150),this._commonService.closeCrossSell(this.product.id)),this.quantityMessage=this._getQuantityMessage(this.product.quantity),this.quantityChange.next(this.product.quantity);let e=event?event.currentTarget:null;this.statusAriaLive="polite",this.statusQuantityUpdate="decrease",0===this.product.quantity||0===this.product.qty?"minicart"!==this.calledBy&&window.AB.DATALAYER&&(this.removeItemFromCartAnalytics=!0,this.setAnalyticsSNSProdAction("remove-item")):(this.decreaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-decrease"),this.setFocusBackOnButton(e))};this._commonService.isGuestUser()?e():this._commonService.validateSession(e)}else this._showSignInModal()}setFocusBackOnButton(e){setTimeout((()=>{$(e).focus()}),8500)}getProductFullName(){let e="";return this.product&&(e=this.product.fullName&&this.product.fullName.length?this.product.fullName:this.product.name),e}_updateAnalyticsProductInfo(e){if(window.AB?.DATALAYER){let t=!!this._elementRef.nativeElement.closest("cross-sell"),i=this._elementRef.nativeElement.closest(".slick-product-carou
1sel")?.querySelectorAll('[data-carousel-behaviour="bia-crossSell"]')?.length,n=this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelectorAll('[data-carousel-behaviour="bia-spaCarousel"]')?.length,r="";r=this.carouselTitle?this.carouselTitle:i?this._elementRef.nativeElement.closest("cross-sell")?.querySelector(".cross-sell__header .cross-sell__title")?.textContent:n?this._elementRef.nativeElement.closest(".bia-spa-carousel-container")?.querySelector(".bia-spa-carousel-container-header")?.textContent?.trim():this._elementRef.nativeElement.closest(".master-product-carousel")?this._elementRef.nativeElement.closest(".master-product-carousel").querySelector("[data-carousel-title]")?.getAttribute("data-carousel-title"):window.AB.DATALAYER.isDFTAPage()?this._elementRef.nativeElement.closest(".slick-product-carousel")?.previousElementSibling?.textContent?.trim()||"":this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("lazy-wrapper")?.getAttribute("data-carousel-title")||this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector(".carousel-header-text")?.textContent?.trim()||this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("targeted-wrapper")?.getAttribute("data-carousel-title");let s={id:this.product.id||this.product.itemId,adobeMetricA:this.product.adobeMetrics?.metricA,adobeMetricC:this.product.adobeMetrics?.metricC,fullName:this.product.fullName,name:this.product.name,units:this._commonService.checkPendingOrder()?this.product.quantity:this.product.qty,unitType:this.product.unitQuantity,lbs:"0",each:"0",pricePerUnit:this.product.pricePer,listPrice:this.product.price?this.product.price.toString():"",carouselSection:r,basePrice:this.product.basePrice?this.product.basePrice.toString():"",pricingType:this.product.promoType,couponFlag:"0",couponClipped:"0",couponID:"",aisleId:this.product.aisleId,upc:this.product.upc,isCrossSell:t,isMTO:this.product.isMtoProduct,departmentName:this.product.departmentName,pathwaysWidget:this.pathwaysWidget,sellerId:e||this.product.sellerId,sellerName:this.product.sellerName,editOrderFlow:!!this._commonService.checkPendingOrder(),snapEligible:this.product.snapEligible,isProductTrackingDisabled:!!this.product.isProductTrackingDisabled,isP13nGrid:!!this._elementRef.nativeElement.closest("#p13nProductGrid"),quantity:this.product.quantity,previousPrice:this.analyticsPreviousPrice,isPriceDecreased:this.analyticsIsPriceDecreased,badges:this.product.badges,containsAlcohol:this.product.containsAlcohol,featured:this.product.featured};"EACH"==this.product.unitQuantity&&(s.each=this.product.quantity?this.product.quantity.toString():this.product.qty?.toString());let a=[];if(a.length>0){let e=a.filter((e=>"C"===e.status)).length,t=a.length,i=a.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString();s.couponFlag=t.toString(),s.couponClipped=e.toString(),s.couponID=i}if("minicart"!==this.calledBy){let e,i,n=!1,a=!1;if(r){let t=$(this._elementRef.nativeElement).closest(".slick-product-carousel"),o=t.find("[data-carousel-behaviour=buy-it-again]").length,l=t.find("[data-carousel-driven=pathway-search]").length,c=t.find("[data-carousel-driven=p13n-generic]").length;s.isBIACarousalProduct=!!t.find("[data-carousel-behaviour=bia-spaCarousel]").length,e=!!o,i=!!l,n=-1!==r.search(/picks for you|picked for you|picks-for-you|picked-for-you/i),a=!!c,s.placement=window.AB.DATALAYER.setPlacementInfoCarouselItems(this._elementRef.nativeElement)}let o={isCrossSell:t,isRecommended:this.isRecommended||n||a,isSponsored:this.product.featured,isPastPurchased:e||this.product.pastPurchased,isBrPathway:i};(this.product.adId||this.product.eventTracking)&&(o.isSponsored=!0),window.AB.DATALAYER.recommendationInfo(o)}window.AB.DATALAYER.productInfo(s),"minicart"===this.calledBy?window.AB.DATALAYER.setCarouselName("shop|mini_cart"):r?window.AB.DATALAYER.isRecipesPage()?window.AB.DATALAYER.setCarouselName(`recipes|${r}`):window.AB.DATALAYER.setCarouselName(`shop|${r}`):window.AB.DATALAYER.setCarouselName(""),window.AB.DATALAYER.isPdp()&&("minicart"===this.calledBy||r?window.AB.DATALAYER.setPageFilterMetaInfo(!1):window.AB.DATALAYER.setPageFilterMetaInfo(!0))}}setAnalyticsSNSProdAction(e){"1P_SNS"===this.configObj?.programType&&localStorage.setItem("analyticsSNSProdAction",e)}updateCart(){if(null===this.updateState.input&&(this.updateState.input=0),"J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0))"weeklyAd"===this.configObj?.appName?this.navigateBannerDomainToOpenStoreSlctChange():window.storeFulfillmentModal.component.setModalDisplayData(2);else{let e=()=>{this.loadingSpinner=!0;let e=!1,t=!1,i=!1,n=!1;"minicart"===this.calledBy?(this.updateState.input>this.product.qty?0===this.product.qty?e=!0:t=!0:this.updateState.input<this.product.qty&&(0===this.updateState.input?i=!0:n=!0),this.product.qty=this.updateState.input):(this.updateState.input>this.product.quantity?0===this.product.quantity?e=!0:t=!0:this.updateState.input<this.product.quantity&&(0===this.updateState.input?i=!0:n=!0),this.product.quantity=this.updateState.input),this.addCart(this.updateState.input),("minicart"!==this.calledBy||this.updateState.input>0)&&window.AB.DATALAYER&&(e?(this.addItemToCartAnalytics=!0,this.setAnalyticsSNSProdAction("add-item")):t?(this.increaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-increase")):i?(this.removeItemFromCartAnalytics=!0,this.setAnalyticsSNSProdAction("remove-item")):n&&(this.decreaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-decrease"))),this.statusAriaLive="polite",this.statusQuantityUpdate="update"};this._commonService.isGuestUser()?e():this._commonService.validateSession(e)}}showUpdate(){"J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0)?"weeklyAd"===this.configObj?.appName?this.navigateBannerDomainToOpenStoreSlctChange():window.storeFulfillmentModal.component.setModalDisplayData(2):("minicart"===this.calledBy?this.updateState.input=this.product.qty:this.updateState.input=this.product.quantity,this.updateState.show=!0,this.statusAriaLive="polite",this.setFocusInsideQtyControl())}removePastPurchases(e){this.loadingSpinner=!0,this.removePastPurchasesEmitter.emit(e),this.statusAriaLive="polite"}enterTabKeyDown(e){let t=e,i=t.which?t.which:t.keyCode;"Update"===this.updateState.button&&t.preventDefault(),"Add"===this.updateState.button&&9===i||this.updateCart(),this.statusAriaLive="polite"}
1qscEnterTabKeyDown(){this.qscUpdateAmt()}qscUpdateAmt(){let e=document.querySelector(`#qtyInfoControl_${this.product.id}`).valueAsNumber;isNaN(e)&&(e=this.qscQuantity),0==e&&(this.updateCheckboxEmitter.emit(),this._isCheckboxChecked=!1,e=1),this.product.maxPurchaseQty&&e>this.product.maxPurchaseQty&&(e=this.product.maxPurchaseQty),this.qscQuantity=e,this.setLocalStorageQscQuantity(this.qscQuantity),this.statusAriaLive="polite",this.updateState.show=!1}inputKeydown(e){let t=e,i=t.which?t.which:t.keyCode;if([8,9,13,37,38,39,40,46].includes(i)||"0123456789".includes(t.key)||t.preventDefault()," "==e.key){let e=document.querySelector(`#qtyInfoControl_${this.product.id}`);e.value=e.value.replace(/[^0-9]*/g,"")}}inputKeyup(e){this.product.maxPurchaseQty&&e.target.value>this.product.maxPurchaseQty&&(e.preventDefault(),e.target.value=this.product.maxPurchaseQty)}qtyStepperKeyup(e){let t=e;13===(t.which?t.which:t.keyCode)&&(this._isRegistered()?(this.showUpdate(),this.statusAriaLive="polite",this.setFocusInsideQtyControl()):this._showSignInModal(this.configObj))}_removeMiniCart(){""!==this.orderNumber&&0!=this.orderNumber?this.removeMiniCartEmitter.emit(this.product.id):this.removeMiniCartEmitter.emit(this.product.itemId),this.statusAriaLive="polite"}_cartAPICallV2(e,t){let i=!this.hasCart,n=JSON.parse(localStorage.getItem("cartId"));this.cartV2Service.addOrUpdateProductQuantity(this.product,"biaAddAllBtn"==this.calledBy?"":"minicart"===this.calledBy?this.product.itemId:this.product.id,e,this.isBiaAddAll,this.product.sellerId,!1,this.snsInfo,this.configObj,!1,null,this.entryId).subscribe((r=>{if(r){this.isQuantityIncreased&&(this.showPriceChangeToast(this.isQuantityIncreased,r),this.isQuantityIncreased=!1),"1P_SNS"===this.configObj?.programType?this.callSNSSuccessDispatch():this.cartService.refreshCart(r);let s=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId),a=this.cartV2Service.fetchCartDetailsFromResponse(r,s);if(a&&a.cartId&&a.cartItems){window.AB.DATALAYER&&(window.AB.DATALAYER.updateCartType("minicart"===this.calledBy?"mini_cart":""),window.AB.DATALAYER.updateCart(r,this.product,r.isWYSIWYGEnabled)),this.isWYSIWYGEnabled=a.isWYSIWYGEnabled,"biaAddAllBtn"==this.calledBy?this.products.forEach((e=>this._commonService.sendSponsoredProductClickEvent(e,"quantityStepper","addToCart"))):this._commonService.sendSponsoredProductClickEvent(this.product,"quantityStepper","addToCart"),!this.isCrossSellProductItem&&this.enableAdRelevanceTracking&&this._commonService.recordRelevanceImpression(this.product,"quantityStepper","addToCart"),this.isPrebookRedirect&&this.redirectToPrebookPage(),this.loadingSpinner=!1;let s=i,o=!i;if(this.cartId=a.cartId,s&&this._cartIdCreated.next(this.cartId),a=this.cartV2Service.handleResponseForPendingOrder(a),this.isBiaAddAll?this.disableAddAll=!0:(this.checkMark=!0,setTimeout((()=>{this.checkMark=!1,this.showQtyUpdateBtn=!1,this._setFocusInsideQty(),this._clearStatusAriaMessage()}),1e3),this.updateState={show:!1,button:"Update"},this._setFocusInsideQty(),this.product.quantity=e,this.quantityMessage=this._getQuantityMessage(),"minicart"===this.calledBy&&(this.changeMiniCartEmitter.emit(a.summary),this.updateUnavailableCountEmitter.emit(a.mfcUnavailableProductsCount),o&&this.onQtyUpdate.emit(this.product)),this.product.sellerId&&"mkp-carousel"!==this.configObj?.programType?this.showMkpAddToCartModal(this.product.sellerId,this.product.sellerName,this.product.price,n):"wineshop"===this.configObj?.programType&&this.showStaticFirstTimeCartModal("1P_WINE",n),this.isOnProductDetail&&t&&t?.currentValue?.isChecked!==t?.previousValue?.isChecked&&!1===t?.currentValue?.isChecked&&(this.preventFocusOnQty=!0,this.toasterService.show({title:"OK",message:"You've unsubscribed to this item.",type:ere.Info,interactiveElement:"Undo",autoCloseTime:3e4,isSnsCheckbox:!t?.currentValue?.isChecked,prevIdToFocus:".checkbox__input"},{top:this.toastMessagePostion}))),"biaAddAllBtn"!=this.calledBy&&window.AB.DATALAYER){let e=this.product.sellerId?this.product.sellerId:"1P_WINE"===a.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsProductInfo(e),this.addItemToCartAnalytics?(window.AB.DATALAYER.addItemToCart(),this.addItemToCartAnalytics=!1):this.increaseQuantityAnalytics?(window.AB.DATALAYER.increaseItemQuantity(),this.increaseQuantityAnalytics=!1):this.decreaseQuantityAnalytics&&(window.AB.DATALAYER.decreaseItemQuantity(),this.decreaseQuantityAnalytics=!1)}}}}),(e=>{if(console.error("Error while calling Cart API: "+e.message),this.isOnProductDetail&&t&&t?.currentValue?.isChecked!==t?.previousValue?.isChecked){let e={modal:"errorMod
1al",showModal:!0,prevIdToFocus:"",errModalType:t.currentValue.isChecked?"subscribe":"unsubscribe",selectedFrequency:this.snsInfo.selectedFrequency};this._productSnsModalService.show(e)}this.showQtyUpdateBtn=!1,this.loadingSpinner=!1,this.isQuantityIncreased=!1,this.isBiaAddAll||(this.quantityMessage=this._getQuantityMessage(this.product.originalQuantity))}))}_getQuantityMessage(e){if(this.product.qty=this.product.maxPurchaseQty&&e>this.product.maxPurchaseQty?this.product.maxPurchaseQty:e>0?e:this.product.qty,"minicart"===this.calledBy)return this.product.maxPurchaseQty&&this.product.qty>=this.product.maxPurchaseQty?this.isV2CarouselItem||this.isV2ProductItem?this.product.qty:this.product.qty+" max":(this.quantityAriaLabelMessage=this.product.qty>1?this.product.qty+" units of "+this.product.name+" in cart. Click to update":this.product.qty+" unit of "+this.product.name+" in cart. Click to update",this.adaCartUpdateMessage("Cart updated. "+this.product.qty+" in cart"),this.isV2CarouselItem||this.isV2ProductItem?this.product.qty:this.product.qty+" in Cart");{if(this.product.maxPurchaseQty&&this.product.quantity>=this.product.maxPurchaseQty)return this.isV2CarouselItem||this.isV2ProductItem?this.product.quantity:this.product.quantity+" max";this.quantityAriaLabelMessage=this.product.quantity>1?this.product.quantity+" units of "+this.product.name+" in cart. Click to update":this.product.quantity+" unit of "+this.product.name+" in cart. Click to update",this.adaCartUpdateMessage("Cart updated. "+this.product.qty+" in cart");let e=this.isBIA?"":" in Cart";return this.isV2CarouselItem||this.isV2ProductItem||"sticky-pdp"===this.componentInfo?this.product.quantity:this.product.quantity+e}}_getQuantityInCart(e){try{let t=JSON.parse(localStorage.getItem(this.cartLSname)).cartItems.find((t=>t.id==e)).quantity;return t>0?t:0}catch{return 0}}_isRegistered(){return this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()}_showSignInModal(e){let t=encodeURIComponent(window.location.href);if(window.SWY.CONFIGSERVICE.setCookie("ECommRedirectURL",t,0),e&&"weeklyAd"===e?.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj)+window.AB.signInLinkPath,t=window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.trackWeeklyAdIcmpid&&window.AB.DATALAYER.trackWeeklyAdIcmpid("sign-in-to-add",e)||"";window.location.assign(e+`${t}`)}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}_clearStatusAriaMessage(){this.statusAddAriaMessage=""}_setFocusInsideQty(){"minicart"===this.calledBy?setTimeout((()=>$("#qtyMiniCartInfo_"+this.product.itemId).focus()),0):"minicart"===this.calledBy?setTimeout((()=>$("#qtyMiniCartInfo_"+this.product.id).focus()),0):this.preventFocusOnQty||setTimeout((()=>$(this._elementRef.nativeElement).children().find("span#qtyInfo_"+this.product.id).focus()),0)}setFocusInsideQtyControl(){setTimeout((()=>{"minicart"===this.calledBy?($("#qtyInfoControl_"+this.product.itemId).focus(),$("#qtyInfoControl_"+this.product.itemId).select()):($("#qtyInfoControl_"+this.product.id).focus(),$("#qtyInfoControl_"+this.product.id).select())}),150)}_removeProductV2(){this.cartV2Service.removeProduct(this.product,"minicart"===this.calledBy?this.product.itemId:this.product.id,this.product.sellerId,this.configObj,!1,this.entryId).subscribe((e=>{if(e){"1P_SNS"===this.configObj?.programType?this.callSNSSuccessDispatch():this.cartService.refreshCart(e);let t=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId),i=this.cartV2Service.fetchCartDetailsFromResponse(e,t);if(window.AB.DATALAYER){let n=this.product.sellerId?this.product.sellerId:"1P_WINE"===i.cartCategory||"1P_WINE"===t?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsProductInfo(n),window.AB.DATALAYER.updateCartType("minicart"===this.calledBy?"mini_cart":""),window.AB.DATALAYER.updateCart(e,null,e.isWYSIWYGEnabled),this.removeItemFromCartAnalytics&&(window.AB.DATALAYER.removeItemFromCart(),this.removeItemFromCartAnalytics=!1)}this.isBiaAddAll||this._commonService.sendSponsoredProductClickEvent(this.product,"quantityStepper","removeProduct"),i=this.cartV2Service.handleResponseForPendingOrder(i),this.loadingSpinner=!1,this.checkMark=!0,setTimeout((()=>{this.checkMark=!1,this.showQtyUpdateBtn=!1,this._setFocusInsideQty(),this._clearStatusAriaMessage()}),1e3),this.updateState={show:!1,button:"Update"},this._setFocusInsideQty(),"minicart"===this.calledBy&&(this.changeMiniCartEmitter.emit(i.summary),this.updateUnavailableCountEmitter.emit(i.mfcUnavailableProductsCount)),this.isWYSIWYGEnabled=i.isWYSIWYGEnabled}}),(e=>{console.error("Error while calling Cart API: "+e.message),this.showQtyUpdateBtn=!1,this.loadingSpinner=!1,this.quantityMessage=this._getQuantityMessage(this.product.originalQuantity)}))}updateBiaAddAllBtnContext(){this.allProductsToAdd=this.calcAddAllProducts(this.products),this.noOfProductsToAdd=0===this.allProductsToAdd.length?this.products.length:this.allProductsToAdd.length,this.disableAddAll=0===this.allProductsToAdd.length}addAllItemsMap(){return console.warn("addAllItemsMap()"),this.addAllProductsMessage=1==this.noOfProductsToAdd?"1 item added to cart":`${this.noOfProductsToAdd} items added to cart`,this.analyticsAddAllItems(this.allProductsToAdd),this.allProductsToAdd.map((e=>({itemId:e.id,qty:1})))}calcAddAllProducts(e){let t=this.cartService._get(),i=t.cartItems?t.cartItems.map((e=>e.itemId)):[];return e.filter((function(e){let t=!1;for(let n in i)i[n]==e.id&&(t=!0);return e.price>0&&0==t}))}addAllItemsToCart(e){console.warn("addAllItemsToCart()"),this._cartAPICallV2(e)}adaCartUpdateMessage(e){this.quantityAdaMessage=e,setTimeout((()=>{this.quantityAdaMessage=""}),100)}updateLoadingMessage(e){this.stepperAnnouncement=`quantity content ${e} loading`}addToCart(){if(this.isAuthorized){let e=()=>{if(this.product.isMtoProduct)if(window.AB.COMMON.checkPendingOrder()){let e="abSlotEditOrder",t="error";localStorage.getItem(e)?this._commonService.preparationTimeExceedsPrebook(this.product,e)&&!this._commonService.byPassReserveSlotCheck(this.product)?this._displayMtoModal(t,"#mtoModalError",{show:!0,backdrop:!1}):this.beforeIncreaseCart(this.crossSellEnabled):this._displayMtoModal(t,"#mtoModalError",{show:!0,backdrop:!1})}else{let e="abSlot";localStorage.getItem(e)&&this._commonService.preparationTimeExceedsPrebook(this.product,e)&&!this._commonService.byPassReserveSlotCheck(this.product)?this._displayMtoModal("popup","#mtoModal",{show:!0}):this.beforeIncreaseCart(this.crossSellEnabled)}else this.beforeIncreaseCart(this.crossSellEnabled)};this._commonService.validateSession(e)}else this.beforeIncreaseCart(this.crossSellEnabled)}analyticsMTOClicks(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalClickEvents(`mto-pickup|${e}`)}analyticsAddAllItems(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addAllBIAItemsToCart(e,"qs-component",this.cartId,this.calledBy)}reserveNewTime(){if(window.AB.COMMON.isLSCompatible()){let e=JSON.parse(localStorage.getItem("abSlot")),t=e?.slotId,i=e?.type;if(t){let e=this._deleteSlotRequest(t,i),n="#mtoModal";this._http.delete(e.url,{headers:new jy(e.headers),responseType:"text"}).subscribe((e=>{this._aemService.isLSCompatible()&&localStorage.removeItem("abSlot"),this._resetReserveNavText(),this.beforeIncreaseCart(this.crossSellEnabled,!0)}),(e=>{$(n).modal("hide")}))}}}redirectToPrebookPage(){let e=`${document.location.origin}/erums/store/prebook`;window.location.href=e}chooseTimeLater(){if(window.AB.COMMON.isLSCompatible()){let e=JSON.parse(localStorage.getItem("abSlot")),t=e?.slotId,i=e?.type;if(t){let e=this._deleteSlotRequest(t,i),n="#mtoModal";this._http.delete(e.url,{headers:new jy(e.headers),responseType:"text"}).subscribe((e=>{window.AB.COMMON.isLSCompatible()&&localStorage.removeItem("abSlot"),this._resetReserveNavText(),this.beforeIncreaseCart(this.crossSellEnabled,!1),$(n).modal("hide")}),(e=>{$(n).modal("hide")}))}}}_deleteSlotRequest(e,t){let i=window.location.origin,n=window.AB.userInfo.branchId,r=this._userInfoService.getUserChannel()?this._userInfoService.getUserChannel().toUpperCase():"",s=window.SWY.CONFIGSERVICE.osdpConfig["osdp.slot.promise.service.endpoint"],a=window.AB.ec
1ommHttpOptionsOsdp;a.clientId="CC",a.storeId=n;let o=this.config[this.currentEnv].wiremockAPIDetails;if(o?.allowWiremockService){let e=this._utilService.getParams("mode");"record"===e?s=`${o?.recorderBaseUrl}${s}`:"playback"===e&&(s=`${o?.playbackBaseUrl}${s}`),a["ocp-apim-subscription-key"]="record"===e||"playback"===e?o?.subscriptionKey:a["ocp-apim-subscription-key"]}r&&("DELIVERY"===r||"PICKUP"===r)&&(a.serviceType="PICKUP"===r?"DUG":r);let l="";return"FLASH"===t&&(l="?type=FLASH"),{url:`${i}${s}/reserve/${n}/${e}${l}`,headers:a}}_resetReserveNavText(){if("dug"===window.AB.userInfo.preferenceMode.toLowerCase()){let e=document.querySelector(".reserve-nav__text_pickup");e&&(e.textContent="Reserve a pickup time")}else if("delivery"===window.AB.userInfo.preferenceMode.toLowerCase()){let e=document.querySelector(".reserve-nav__text_delivery");e&&(e.textContent="Reserve a delivery time")}}_displayMtoModal(e,t,i){this.mto[e].show=!0,setTimeout((()=>{$(t).modal(i),$(t).appendTo(".unified-footer");let n=this;$(t).on("shown.bs.modal",(function(){n.mtoShowADA(e)})),$(t).on("hidden.bs.modal",(function(){n.mto[e].show=!1,$(t).remove(),n.mtoHideADA(e)})),window.AB?.DATALAYER?.setModalViewEvents("mto-pickup|view")}),100)}mtoShowADA(e){let t=this.mto[e].closeBtn,i=this.mto[e].modalId,n=this.mto[e].firstFocusableElem,r=this.mto[e].lastFocusableElem;$(t).focus(),$(".root").children().children(":nth-child(1)").attr("aria-hidden",!0),$(".root").children().children(":nth-child(2)").attr("aria-hidden",!0),$(".unified-footer").siblings().attr("aria-hidden",!0),$(".unified-footer").children().attr("aria-hidden",!0),$(i).attr("aria-hidden",!1),$(r).on("keydown keypress",(function(e){$("this:focus")&&9===e.which&&(n===r?e.preventDefault():e.shiftKey||$(n).focus())}))}mtoHideADA(e){let t=this.mto[e].closeBtn;$(t).focus(),$(".root").children().children(":nth-child(1)").removeAttr("aria-hidden"),$(".root").children().children(":nth-child(2)").removeAttr("aria-hidden"),$(".unified-footer").siblings().removeAttr("aria-hidden"),$(".unified-footer").children().removeAttr("aria-hidden"),$(`#addButton_${this.product.id}`).focus()}showMkpAddToCartModal(e,t,i,n){n&&n[e]||this.showDynamicFirstTimeCartModal(e,t,i)}showStaticFirstTimeCartModal(e,t){let i="#addToCartModal-"+this.configObj?.programType;t&&t[e]||(window.ErrorStateModalComp.triggerEmptyStateModal(i,!0),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addedToSellerTypeModalTracking("wineshop"))}showDynamicFirstTimeCartModal(e,t,i){let n="#addToCartModal-"+this.configObj?.programType,r=$(n),s=$(n+" .error-state-modal__logo img"),a=s.attr("data-image-placeholder"),o=s.attr("data-alt-placeholder");s.attr("src",a?.replace("(sellerId)",e)),s.attr("alt",o?.replace("(sellerName)",t));let l=$(n+" .error-state-modal__title"),c=l.attr("data-message-placeholder")?.replace("(sellerName)",t);l?.html(c),r.attr("aria-label",c);let d=$(n+" .error-state-modal__shipping-text"),u=$(n+" .error-state-modal__noOrderMin"),p=$(n+" .error-state-modal__shipping-text .error-state-modal__shipping-text__cp"),h=$(n+" .error-state-modal__shipping-text .error-state-modal__shipping-text__mo"),f=JSON.parse(localStorage.getItem("mkpShipping"));if(f&&f.shippingInfo[e]){let t=f.shippingInfo[e].domesticShippingFreeThreshold,r=f.shippingInfo[e].shippingFee,s=$(n+" .error-state-modal__text"),a=$(n+" .error-state-modal__qualifyFreeShipping"),o=$(n+" .error-state-modal__domesticFreeShipping");if(t>0&&r>0){let e=$(n+" .error-state-modal__domesticFreeShipping .error-state-modal__shipping-text__cp");t>i?(e.html("$"+(t-i).toFixed(2).toString()),o.removeClass("d-none"),d.addClass("d-none"),s.removeClass("d-none"),a.addClass("d-none")):(a.removeClass("d-none"),o.addClass("d-none"),d.addClass("d-none"))}else{let t=f.shippingInfo[e].minCartThresholdValue;t&&t>0&&t>i?(p.html("$"+(t-i).toFixed(2).toString()),h.html("$"+t.toString()),u.addClass("d-none"),d.removeClass("d-none"),a.addClass("d-none"),o.addClass("d-none")):0===t?(d.addClass("d-none"),u.removeClass("d-none"),a.addClass("d-none"),o.addClass("d-none")):(d.addClass("d-none"),u.addClass("d-none"))}let l=$(n+" .error-state-modal__text__shipping"),c=$(n+" .error-state-modal__freeShipping");r&&r>0&&(t>0&&t>i||t<1)?(l?.html("$"+r),c.addClass("d-none"),s.removeClass("d-none")):0===r?(s.addClass("d-none"),c.removeClass("d-none")):(s?.addClass("d-none"),c?.addClass("d-none")),"mkp-cross-seller-page"===$(".main-wrapper").attr("data-custom-page-type")&&($(".modal-footer__action-btn__cart").html("Go to Seller"),$(n+" .modal
1-footer__action-btn__cart").attr("seller-url",this._commonService.getSellerLandingPath(e))),this.updateSrMsgs(n)}else console.warn("mkpShipping local storage missing or current seller shipping info is not available");window.ErrorStateModalComp.triggerEmptyStateModal(n,!0),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addedToSellerTypeModalTracking("marketplace")}updateSrMsgs(e){let t=$(e+" .error-state-modal__shipping-text-content").text(),i=$(e+" .error-state-modal__domesticFreeShipping-content").text(),n=$(e+" .error-state-modal__qualifyFreeShipping-content").text(),r=$(e+" .error-state-modal__text-content").text();$(e+" .error-state-modal__shipping-text-sr").text(t),$(e+" .error-state-modal__domesticFreeShipping-sr").text(i),$(e+" .error-state-modal__qualifyFreeShipping-sr").text(n),$(e+" .error-state-modal__text-sr").text(r)}addFirstTimeCartModalListeners(){let e=this,t="#addToCartModal-"+this.configObj?.programType;$(t).on("shown.bs.modal",(function(){setTimeout((()=>{$(t+" .error-state-modal__header__modal-close").focus()}),1e3)})),$(t).on("hidden.bs.modal",(function(){setTimeout((()=>{e._setFocusInsideQty()}),1e3)}))}onQscStepperClick(){if("instore"==window.AB.COMMON.getUserChannel())return window.rightDrawerComp.closeDrawer(),void window.storeFulfillmentModal.component.setModalDisplayData(2);this._isCheckboxChecked&&(this.isQuantityStepperExtended=!0)}qscIncrease(){this.qscQuantity!=this.product?.maxPurchaseQty&&(this.qscQuantity+=1,this.setLocalStorageQscQuantity(this.qscQuantity))}qscDecrease(){1!=this.qscQuantity?(this.qscQuantity-=1,this.setLocalStorageQscQuantity(this.qscQuantity)):this.updateCheckboxEmitter.emit(!1)}onQscAmtClick(){this.isQuantityStepperExtended&&(this.updateState.input=this.qscQuantity,this.updateState.show=!0,this.statusAriaLive="polite",this.setFocusInsideQtyControl())}setLocalStorageQscQuantity(e){this.product.maxPurchaseQty&&e>this.product.maxPurchaseQty&&(e=this.product.maxPurchaseQty),this._quickAddBasketService.setQuickAddBasketItemQuantity(this.product.id,e)}callSNSSuccessDispatch(){let e={"data-bpn":this.product.id,qty:this.product.quantity};this._commonService.dispatchCustomOneTimeEvent("snsOneTime","productQtyUpdateSuccess",e)}ngOnDestroy(){this.updateBiaAddAllSubscription&&this.updateBiaAddAllSubscription.unsubscribe(),this.subscriptions&&this.subscriptions.unsubscribe()}getMtoPopupText(){return`${this.product.mtoDisplyableTime}`}navigateBannerDomainToOpenStoreSlctChange(){let e=this._productUtilService.getBannerDomainUrl(this.configObj)+"/home.html?action=changeStore&goto="+encodeURIComponent(window.location.href)+"&modaltype=2";window.location.href=e}static{this.ɵfac=function(t){return new(t||e)($d(Tl),$d(vw),$d(Bw),$d(_w),$d(Vl),$d(xre),$d(Rw),$d(ov),$d(Sw),$d(Mw),$d(Dw),$d(Cw),$d(Wre),$d(Kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["quantity-stepper-al-v1"]],hostBindings:function(e,t){1&e&&jf("click",(function(e){return t.onQscClick(e)}),0,od)},inputs:{product:"product",products:"products",calledBy:"calledBy",componentInfo:"componentInfo",carouselTitle:"carouselTitle",carouselId:"carouselId",mainIngredient:"mainIngredient",isRecommended:"isRecommended",crossSellEnabled:"crossSellEnabled",crossSellType:"crossSellType",isAnyProductHasAddlInfo:"isAnyProductHasAddlInfo",isBIA:"isBIA",pathwaysWidget:"pathwaysWidget",isMarketPlaceEnabled:"isMarketPlaceEnabled",isWineShopEnabled:"isWineShopEnabled",isQscV2:"isQscV2",isCheckboxChecked:"isCheckboxChecked",snsInfo:"snsInfo",isMkpSellerTagDisabled:"isMkpSellerTagDisabled",configObj:"configObj"},outputs:{onQtyUpdate:"onQtyUpdate",removePastPurchasesEmitter:"removePastPurchasesEmitter",removeMiniCartEmitter:"removeMiniCartEmitter",changeMiniCartEmitter:"changeMiniCartEmitter",updateUnavailableCountEmitter:"updateUnavailableCountEmitter",updateCheckboxEmitter:"updateCheckboxEmitter",updateQscQtyEmitter:"updateQscQtyEmitter"},features:[ga],decls:5,vars:3,consts:[["qscV2",""],["class","quantity-stepper-v3",3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","btn product-btn__qty-step justify-content-center","role","group","tabindex","0","data-qa","addbutton",3,"id","ngClass","click","keydown.enter",4,"ngIf"],["class","btn product-btn__update",4,"ngIf"],["role","group","tabindex","0","data-qa","addbutton",1,"btn","product-btn__qty-step","justify-content-center",3,"click","keydown.enter","id","ngClass"],["class","product-btn__qty-step__decrease","role","button","tabindex","0","data-qa","prdctdcrmntr",3,"disabled","id","click",4,"ngIf"],["role","button","tabindex","0","data-qa","qty-stppr-qtymsg",1,"product-btn__qty-step__amt",3,"click","keydown.enter","id"],["class","product-btn__qty-step__increase","role","button","tabindex","0","data-qa","prdctincrmntr",3,"ngClass","id","click",4,"ngIf"],["role","button","tabindex","0","data-qa","prdctdcrmntr",1,"product-btn__qty-step__decrease",3,"click","disabled","id"],["aria-hidden","true",1,"svg-qty-stepper-decrease","product-btn__qty-step__decrease--icon"],["role","button","tabindex","0","data-qa","prdctincrmntr",1,"product-btn__qty-step__increase",3,"click","ngClass","id"],["aria-hidden","true",1,"svg-qty-stepper-increase","product-btn__qty-step__increase--icon"],[1,"btn","product-btn__update"],["onclick","this.select()","aria-label","Cart Quantity","type","number","min","0","step","1","data-qa","prd-qty-stppr-qtybox",1,"product-btn__update__input-box",3,"keydown.enter","keydown","keyup","ngModelChange","id","ngModel","max"],["data-qa","prdqtyupdate","tabindex","0",1,"btn","product-btn__update__input-btn",3,"click","disabled"],[1,"quantity-stepper-v3",3,"ngClass"],[1,"quantity-stepper-container"],[4,"ngIf","ngIfElse"],[3,"keyup","ngClass"],["aria-live","assertive","aria-atomic","true",1,"sr-only"],["class","btn product-btn__add","role","button","tabindex","0","data-qa","addbutton",3,"id","ngClass","click",4,"ngIf"],["role","group",3,"ngClass",4,"ngIf"],["role","button","tabindex","0","data-qa","addbutton",1,"btn","product-btn__add",3,"click","id","ngClass"],["role","group",3,"ngClass"],["role","button","tabindex","0","data-qa","prdctdcrmntr",1,"product-btn__qty-step__decrease",3,"click","ngClass","disabled","id"],[1,"sr-only"],["role","button","tabindex","0","data-qa","qty-stppr-qtymsg",1,"product-btn__qty-step__amt",3,"click","id"],["onclick","this.select()","aria-label","Cart Quantity","type","number","min","1","step","1","data-qa","prd-qty-stppr-qtybox",1,"product-btn__update__input-box",3,"keydown.enter","keydown","keyup","ngModelChange","id","ngModel","max"],["data-qa","prdqtyupdate",1,"btn","product-btn__update__input-btn",3,"click","disabled"],["id","mtoModal","tabindex","-1","role","dialog","aria-labelledby","mtoModalLabel","aria-hidden","true"],["role","document",1,"mto-popup__dialog","modal
1-dialog"],[1,"mto-popup__content","modal-content"],["data-qa","mto",1,"mto-popup__body","modal-body"],["type","button","data-dismiss","modal","aria-label","Close","data-qa","mto-close",1,"mto-popup__close-btn","close"],["xmlns","http://www.w3.org/2000/svg","width","20","height","20","fill","none","viewBox","0 0 20 20"],["fill","#4B4B4B","fill-rule","evenodd","d","M18.493 2.623L17.3 1.46 9.872 9.074 2.627 1.467 1.42 2.617l7.287 7.65-7.28 7.462 1.193 1.164 7.237-7.418 7.058 7.411 1.207-1.15-7.1-7.455 7.471-7.658z","clip-rule","evenodd"],["id","mtoModalLabel","data-qa","mto-ttl",1,"mto-popup__title"],["data-qa","mto-txt",1,"mto-popup__text"],["type","button","data-qa","mto-rsrv-btn",1,"mto-popup__reserve-btn","btn","btn-default",3,"click"],["type","button","data-qa","mto-chs-tm-btn",1,"mto-popup__choose-time-btn","btn","btn-default","btn-secondary",3,"click"],["type","button","data-dismiss","modal","data-qa","mto-dnt-add-btn",1,"mto-popup__dont-add-btn","btn","btn-link",3,"click"],["id","mtoModalError","tabindex","-1","aria-label","Item can't be added to cart","aria-hidden","true","role","dialog"],["role","document",1,"mto-popup-error__dialog","modal
1-dialog"],[1,"mto-popup-error__content","modal-content"],["data-qa","mto-err",1,"mto-popup-error__body","modal-body"],[1,"mto-popup-error__text-container"],["data-dismiss","modal","aria-label","Close","data-qa","mto-err-close",1,"mto-popup-error__close-btn","close"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 20 20",1,"mto-popup-error__close-svg"],[1,"mto-popup-error__paragraphs"],["data-qa","mto-err-ttl",1,"mto-popup-error__title"],["aria-hidden","true",1,"mto-popup-error__icon-exclamation"],["xmlns","http://www.w3.org/2000/svg","width","17","height","17","fill","#DD1E25","viewBox","0 0 16 16",1,"bi","bi-exclamation-circle-fill"],["d","M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"],["data-qa","mto-err-txt",1,"mto-popup-error__text"]],template:function(e,t){1&e&&ph(0,Tse,2,2,"ng-template",null,0,Wm)(2,Bse,3,7,"div",1)(3,Mse,19,8,"ng-container",2)(4,Rse,17,5,"ng-container",2),2&e&&(Vd(2),zh("ngIf","minicart"!==t.calledBy&&!t.isBiaAddAll),Vd(),zh("ngIf",t.mto.popup.show),Vd(),zh("ngIf",t.mto.error.show))},dependencies:[sy,cy,d_,BS,$_,tC,XS,ES,Iy]})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Fse=function(e){return e.ADD="Add",e.SIGNIN="Sign in to add",e.CUSTOMIZE="Customize",e.TEMPORARILY_UNAVAILABLE="Temp. unavailable",e.SELECTWEIGHT="Select wt",e.PREORDER="Preorder",e.ADDTOORDER="Add to order",e}(Fse||{}),Nse=e=>({"text-l--error":e}),Use=()=>({"pointer-events":"none"}),Vse=()=>({}),qse=(e,t)=>({"prebook-modal__content prebook-modal__content--btn-container":e,"rd__cont--prebook__body__btn-container w-100":t});function $se(e,t){1&e&&Of(0)}function jse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",9),qm(2,"titlecase"),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(3,"div",10)(4,"div",11),ph(5,$se,1,0,"ng-container",12),xf()()(),Df()}if(2&e){let e=Yf(),t=sm(2),i=sm(21);Vd(),zh("id",e.modalData.modalId),gh("aria-label","mto"===e.modalData.type?$m(2,3,e.reservedTimeIntent)+" time will change":"Please pickup a new "+(null==e.modalData?null:e.modalData.preference)+" time"),Vd(4),zh("ngTemplateOutlet","mto"===e.modalData.type?t:i)}}function zse(e,t){if(1&e){let e=Mf();kf(0,"div",13)(1,"button",14),Tf(2,"span",15),xf(),kf(3,"div",16)(4,"h2",17),am(5),qm(6,"titlecase"),xf()()(),kf(7,"div",18),am(8),qm(9,"titlecase"),xf(),kf(10,"div",19)(11,"div",20)(12,"button",21),jf("click",(function(){Wa(e);let t=Yf();return t.handleSlotAction("reserve-new-time",t.modalData.modalId),Ha(t.analyticsEvents("modalClick","reserve-new-time"))})),am(13,"Reserve new time"),xf(),kf(14,"button",22),jf("click",(function(){Wa(e);let t=Yf();return t.handleSlotAction("choose-time-later",t.modalData.modalId),Ha(t.analyticsEvents("modalClick","choose-time-later"))})),am(15,"Choose time later"),xf(),kf(16,"button",23),jf("click",(function(){Wa(e);let t=Yf();return t.handleClose(),Ha(t.analyticsEvents("modalClick","dont-add-item"))})),am(17,"Don't add item"),xf()()()}if(2&e){let e=Yf();Vd(5),cm("",$m(6,3,e.reservedTimeIntent)," time will change"),Vd(3),dm(" This item requires ",null==e.product?null:e.product.mtoDisplyableTime," to prepare. Please select a new time for ",$m(9,5,e.reservedTimeIntent),". ")}}function Wse(e,t){1&e&&Of(0)}function Hse(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",24),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",25)(3,"div",26)(4,"div",27)(5,"button",28),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",29),xf()(),kf(7,"div",30),ph(8,Wse,1,0,"ng-container",12),xf()()()(),Df()}if(2&e){let e=Yf(),t=sm(5);Vd(),zh("id",e.modalData.modalId),Vd(7),zh("ngTemplateOutlet",t)}}function Yse(e,t){if(1&e&&(kf(0,"span",43),am(1),xf()),2&e){let e=Yf().$implicit,t=Yf(5);zh("ngClass",Om(2,Nse,!e.channelInventory||"1"!==e.channelInventory[t.reservedTimeIntent])),Vd(),cm("(",e.quantity,")")}}function Gse(e,t){if(1&e&&(kf(0,"span",44),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),dm("",e.quantity," units of ",e.name,"")}}function Kse(e,t){if(1&e&&(kf(0,"span",39)(1,"span",45),am(2),qm(3,"currency"),xf(),kf(4,"span",44),am(5),qm(6,"currency"),xf()()),2&e){let e=Yf().$implicit,t=Yf(5);zh("ngClass",Om(9,Nse,!e.channelInventory||"1"!==e.channelInventory[t.reservedTimeIntent])),Vd(2),cm("(+",jm(3,3,e.price*e.quantity,"USD"),")"),Vd(3),cm(" ",jm(6,6,e.price*e.quantity,"USD")," more for each topping ")}}function Qse(e,t){1&e&&(kf(0,"span")(1,"span",46),am(2," Out of stock"),xf()())}function Jse(e,t){1&e&&(Ef(0),am(1,", "),Df())}function Zse(e,t){if(1&e&&(kf(0,"span")(1,"span",39)(2,"span"),am(3),xf(),ph(4,Yse,2,4,"span",40)(5,Gse,2,2,"span",41),xf(),ph(6,Kse,7,11,"span",42)(7,Qse,3,0,"span",8)(8,Jse,2,0,"ng-container",8),xf()),2&e){let e=t.$implicit,i=t.last,n=Yf(2).$implicit,r=Yf(3);Vd(),zh("ngClass",Om(8,Nse,!e.channelInventory||"1"!==e.channelInventory[r.reservedTimeIntent])),Vd(),gh("aria-hidden",r.isCateringEnabled&&e.quantity>1?"true":null),Vd(),cm("",e.name," "),Vd(),zh("ngIf",r.isCateringEnabled&&e.quantity>1),Vd(),zh("ngIf",r.isCateringEnabled&&e.quantity>1),Vd(),zh("ngIf",r.isCateringEnabled&&e.price>0),Vd(),zh("ngIf",!e.channelInventory||"1"!==e.channelInventory[r.reservedTimeIntent]),Vd(),zh("ngIf",!i||i&&n.preferences)}}function Xse(e,t){if(1&e&&(kf(0,"li"),am(1),ph(2,Zse,9,10,"span",37),xf()),2&e){let e=t.$implicit;Vd(),cm(" ",e.type,": "),Vd(),zh("ngForOf",null==e?null:e.options)}}function eae(e,t){if(1&e&&(kf(0,"li"),am(1," Preferences: "),kf(2,"span"),am(3),xf()()),2&e){let e=Yf().$implicit;Vd(3),lm(e.preferences)}}function tae(e,t){if(1&e&&(Ef(0),kf(1,"ul",38),ph(2,Xse,3,2,"li",37)(3,eae,4,1,"li",8),xf(),Df()),2&e){let e=t.$implicit;Vd(2),zh("ngForOf",null==e?null:e.customizations),Vd(),zh("ngIf",e.preferences)}}function iae(e,t){if(1&e&&(Ef(0),ph(1,tae,4,2,"ng-container",37),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.customizationData.items)}}function nae(e,t){if(1&e){let e=Mf();kf(0,"div",31)(1,"div",32),Tf(2,"img",33),xf(),kf(3,"h1",34),am(4," Add with your previous customizations? "),xf(),ph(5,iae,2,1,"ng-container",8),kf(6,"button",35),jf("click",(function(){return Wa(e),Ha(Yf().handleAddItemFromPreviousCustomization())})),am(7," Add "),xf(),kf(8,"a",36),jf("click",(function(){return Wa(e),Ha(Yf().handleModifyPreviousCustomization())})),am(9,"Modify"),xf()()}if(2&e){let e=Yf();Vd(2),zh("src","https://images.albertsons-media.com/is/image/ABS/"+(null==e.customizationData?null:e.customizationData.bpn)+"?$ecom-product-card-mobile-jpg$&defaultImage=Not_Available",id)("alt",null==e.customizationData?null:e.customizationData.name),Vd(3),zh("ngIf",e.customizationData),Vd(),zh("disabled",e.isRequiredIngredientOutOfStock)}}function rae(e,t){1&e&&Of(0)}function sae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",47),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",25)(3,"div",26)(4,"div",27)(5,"button",48),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",29),xf()(),kf(7,"div",30),ph(8,rae,1,0,"ng-container",12),xf()()()(),Df()}if(2&e){let e=Yf(),t=sm(8);Vd(),zh("id",e.modalData.modalId),Vd(7),zh("ngTemplateOutlet",t)}}function aae(e,t){1&e&&(Ef(0),am(1," Refresh "),Df())}function oae(e,t){1&e&&Tf(0,"div",60)}function lae(e,t){if(1&e){let e=Mf();kf(0,"div",49)(1,"div",50),Tf(2,"span",51),xf(),kf(3,"div",52)(4,"div",53)(5,"div",54),am(6,"Unable to load"),xf(),kf(7,"div",55),am(8," Sorry, we weren't able to load your previous customizations. Please refresh, or customize again. "),xf(),kf(9,"div",56)(10,"button",57),jf("click",(function(){return Wa(e),Ha(Yf().handleRefresh())})),ph(11,aae,2,0,"ng-container",58)(12,oae,1,0,"ng-template",null,7,Wm),xf()()(),kf(14,"a",59),jf("click",(function(){return Wa(e),Ha(Yf().startCustmization())})),am(15,"Start a new customization"),xf()()()}if(2&e){let e=sm(13),t=Yf();Vd(5),zh("id",t.modalData.modalId),Vd(5),zh("ngStyle",t.modalData.isLoading?Dm(4,Use):Dm(5,Vse)),Vd(),zh("ngIf",!t.modalData.isLoading)("ngIfElse",e)}}function cae(e,t){1&e&&Of(0)}function dae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",24),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",61)(3,"div",62)(4,"div",63)(5,"button",64),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",15),xf()(),kf(7,"div",65),ph(8,cae,1,0,"ng-container",12),xf(),kf(9,"div",19)(10,"div",66)(11,"button",67),jf("click",(function(){return Wa(e),Ha(Yf().handleModifyPreviousCustomization())})),am(12," Modify "),xf(),kf(13,"button",68),jf("click",(function(){return Wa(e),Ha(Yf().handleAddItemFromPreviousCustomization())})),am(14," Add "),xf()()()()()(),Df()}if(2&e){let e=Yf(),t=sm(11);Vd(),zh("id",e.modalData.modalId),Vd(7),zh("ngTemplateOutlet",t),Vd(5),zh("disabled",e.isRequiredIngredientOutOfStock)}}function uae(e,t){if(1&e&&(kf(0,"span",43),am(1),xf()),2&e){let e=Yf().$implicit,t=Yf(5);zh("ngClass",Om(2,Nse,!e.channelInventory||"1"!==e.channelInventory[t.reservedTimeIntent])),Vd(),cm("(",e.quantity,")")}}function pae(e,t){if(1&e&&(kf(0,"span",44),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),dm("",e.quantity," units of ",e.name,"")}}function hae(e,t){if(1&e&&(kf(0,"span",39)(1,"span",45),am(2),qm(3,"currency"),xf(),kf(4,"span",44),am(5),qm(6,"currency"),xf()()),2&e){let e=Yf().$implicit,t=Yf(5);zh("ngClass",Om(9,Nse,!e.channelInventory||"1"!==e.channelInventory[t.reservedTimeIntent])),Vd(2),cm("(+",jm(3,3,(null==e?null:e.quantity)>0?(null==e?null:e.price)*(null==e?null:e.quantity):null==e?null:e.price,"USD"),")"),Vd(3),cm(" ",jm(6,6,(null==e?null:e.quantity)>0?(null==e?null:e.price)*(null==e?null:e.quantity):null==e?null:e.price,"USD")," more for each topping ")}}function fae(e,t){1&e&&(kf(0,"span")(1,"span",46),am(2," Out of stock"),xf()())}function mae(e,t){1&e&&(Ef(0),am(1,", "),Df())}function gae(e,t){if(1&e&&(kf(0,"span",78)(1,"span",39)(2,"span"),am(3),xf(),ph(4,uae,2,4,"span",40)(5,pae,2,2,"span",41),xf(),ph(6,hae,7,11,"span",42)(7,fae,3,0,"span",8)(8,mae,2,0,"ng-container",8),xf()),2&e){let e=t.$implicit,i=t.last,n=Yf().$implicit,r=Yf(4);Vd(),zh("ngClass",Om(8,Nse,!e.channelInventory||"1"!==e.channelInventory[r.reservedTimeIntent])),Vd(),gh("aria-hidden",r.isCateringEnabled&&e.quantity>1?"true":null),Vd(),cm("",e.name," "),Vd(),zh("ngIf",r.isCateringEnabled&&e.quantity>1),Vd(),zh("ngIf",r.isCateringEnabled&&e.quantity>1),Vd(),zh("ngIf",r.isCateringEnabled&&(null==e?null:e.price)>0),Vd(),zh("ngIf",!e.channelInventory||"1"!==e.channelInventory[r.reservedTimeIntent]),Vd(),zh("ngIf",!i&&(null==n||null==n.options?null:n.options.length)>1)}}function bae(e,t){if(1&e&&(kf(0,"li",76),am(1),ph(2,gae,9,10,"span",77),xf()),2&e){let e=t.$implicit;Vd(),cm(" ",e.type,": "),Vd(),zh("ngForOf",null==e?null:e.options)}}function yae(e,t){if(1&e&&(kf(0,"li",76),am(1," Preferences: "),kf(2,"span",78),am(3),xf()()),2&e){let e=Yf().$implicit;Vd(3),lm(e.preferences)}}function vae(e,t){if(1&e&&(Ef(0),kf(1,"ul",38),ph(2,bae,3,2,"li",74)(3,yae,4,1,"li",75),xf(),Df()),2&e){let e=t.$implicit;Vd(2),zh("ngForOf",null==e?null:e.customizations),Vd(),zh("ngIf",e.preferences)}}function wae(e,t){if(1&e&&(Ef(0),ph(1,vae,4,2,"ng-container",37),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.customizationData.items)}}function _ae(e,t){if(1&e&&(kf(0,"div",69)(1,"div",70),Tf(2,"img",71),xf(),kf(3,"div",72)(4,"h3",73),am(5,"Add with your previous customizations?"),xf(
1)(),Tf(6,"hr"),ph(7,wae,2,1,"ng-container",8),xf()),2&e){let e=Yf();Vd(2),zh("src","https://images.albertsons-media.com/is/image/ABS/"+(null==e.customizationData?null:e.customizationData.bpn)+"?$ecom-product-card-mobile-jpg$&defaultImage=Not_Available",id)("alt",null==e.customizationData?null:e.customizationData.name),Vd(5),zh("ngIf",e.customizationData)}}function Sae(e,t){1&e&&Of(0)}function Cae(e,t){1&e&&(Ef(0),am(1," Refresh "),Df())}function Iae(e,t){1&e&&Tf(0,"div",60)}function Aae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",47),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",61)(3,"div",62)(4,"div",13)(5,"button",79),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",15),xf()(),kf(7,"div",65),ph(8,Sae,1,0,"ng-container",12),xf(),kf(9,"div",19)(10,"div",20)(11,"button",57),jf("click",(function(){return Wa(e),Ha(Yf().handleRefresh())})),ph(12,Cae,2,0,"ng-container",58)(13,Iae,1,0,"ng-template",null,7,Wm),xf(),kf(15,"button",80),jf("click",(function(){return Wa(e),Ha(Yf().startCustmization())})),am(16,"Start a new customization "),xf()()()()()(),Df()}if(2&e){let e=sm(14),t=Yf(),i=sm(14);Vd(),zh("id",t.modalData.modalId),Vd(7),zh("ngTemplateOutlet",i),Vd(3),zh("ngStyle",t.modalData.isLoading?Dm(5,Use):Dm(6,Vse)),Vd(),zh("ngIf",!t.modalData.isLoading)("ngIfElse",e)}}function kae(e,t){if(1&e&&(kf(0,"div")(1,"div",50),Tf(2,"span",51),xf(),kf(3,"div")(4,"div",81)(5,"h3",82),am(6,"Unable to load"),xf(),kf(7,"div",83),am(8," Sorry, we weren't able to load your previous customizations. Please refresh, or customize again. "),xf()()()()),2&e){let e=Yf();Vd(5),zh("id",e.modalData.modalId)}}function xae(e,t){1&e&&Of(0)}function Tae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",84),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",85)(3,"div",26)(4,"div",86)(5,"button",87),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",88),xf()(),ph(7,xae,1,0,"ng-container",12),xf()()(),Df()}if(2&e){let e=Yf(),t=sm(18);Vd(),zh("id",e.modalData.modalId),Vd(6),zh("ngTemplateOutlet",t)}}function Pae(e,t){1&e&&Of(0)}function Eae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",89)(2,"div",90)(3,"div",91)(4,"button",92),jf("click",(function(){return Wa(e),Ha(Yf().previousPageAction())})),Tf(5,"span",93),kf(6,"span",78),am(7,"Back"),xf()()(),ph(8,Pae,1,0,"ng-container",12),xf()(),Df()}if(2&e){Yf();let e=sm(18);Vd(8),zh("ngTemplateOutlet",e)}}function Dae(e,t){if(1&e&&(kf(0,"div",100)(1,"span",44),am(2),xf(),kf(3,"span",45),am(4),xf()()),2&e){let e=Yf(2);zh("ngClass","prebook_modal"===e.modalData.type?"mb-4":""),Vd(2),cm("Made to order deli items are available only from ",e.modalData.preBookShortTime,"."),Vd(2),cm("Made to order deli items are available only from ",e.modalData.preBookLongTime,".")}}function Oae(e,t){if(1&e&&(kf(0,"div",100),am(1,"This item requires more time to prepare."),xf()),2&e){zh("ngClass","prebook_modal"===Yf(2).modalData.type?"mb-4":"")}}function Bae(e,t){if(1&e){let e=Mf();kf(0,"div",94)(1,"div",95)(2,"div",96),am(3,"This item isn't available during the time you picked."),xf(),ph(4,Dae,5,3,"div",97)(5,Oae,2,1,"div",97),xf(),kf(6,"div",94)(7,"button",98),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.handleAddAnywayAction(t.modalData.type))})),am(8,"Got it, add anyways"),xf(),kf(9,"button",99),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.handleAddAndUpdateItem(t.modalData.type))})),am(10,"Add\nitem & update time"),xf()()()}if(2&e){let e=Yf();zh("ngClass","prebook_slot_drawer"===e.modalData.type?"rd__cont--prebook__body__content":"pt-1 prebook-modal__container"),Vd(),zh("ngClass","prebook_slot_drawer"===e.modalData.type?"rd__cont--prebook__body__text-container":"prebook-modal__content"),Vd(),zh("ngClass","prebook_slot_drawer"===e.modalData.type?"mb-0":"mb-2"),Vd(2),zh("ngIf",e.modalData.isAvaialableTime),Vd(),zh("ngIf",e.modalData.isMoreTimePrepare),Vd(),zh("ngClass",Bm(6,qse,"prebook_slot_drawer"!==e.modalData.type,"prebook_slot_drawer"===e.modalData.type))}}function Mae(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",101),jf("keydown",(function(t){Wa(e);let i=Yf();return Ha(i.onKeydownModalEvent(t,i.modalData.modalId))})),kf(2,"div",10)(3,"div",102)(4,"div",13)(5,"button",103),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(6,"span",15),xf(),kf(7,"div",104)(8,"div",45),So(),kf(9,"svg",105),Tf(10,"path",106)(11,"path",107)(12,"path",108)(13,"path",109)(14,"path",110)(15,"path",111)(16,"path",112)(17,"path",113)(18,"path",114)(19,"path",115)(20,"path",116)(21,"path",117)(22,"path",118)(23,"path",119)(24,"path",120)(25,"path",121)(26,"path",122)(27,"path",123)(28,"path",124)(29,"path",125)(30,"path",126)(31,"path",127)(32,"path",128)(33,"path",129)(34,"path",130)(35,"path",131)(36,"path",132),xf(
1)(),Co(),kf(37,"div",133),am(38,"Heads Up: This is a preorder item"),xf()()(),kf(39,"div",134)(40,"span"),am(41,"Your order will be completed after this item releases on "),kf(42,"span",45),am(43),qm(44,"date"),xf(),kf(45,"span",44),am(46),qm(47,"date"),xf(),am(48,". Do you want to continue adding this item? "),xf()(),kf(49,"div",19)(50,"div",20)(51,"button",135),jf("click",(function(){return Wa(e),Ha(Yf().handlePreorderItem())})),am(52," Continue"),xf(),kf(53,"button",136),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),am(54,"Don't add item"),xf()()()()()(),Df()}if(2&e){let e=Yf();Vd(),zh("id",e.modalData.modalId),Vd(42),lm(jm(44,3,e.modalData.itemEffectiveStartDate,"EEE, MMM d")),Vd(3),lm(jm(47,6,e.modalData.itemEffectiveStartDate,"EEEE, MMMM d"))}}function Rae(e,t){if(1&e){let e=Mf();kf(0,"div",13)(1,"button",137),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),Tf(2,"span",15),xf(),kf(3,"div",104)(4,"div",138),am(5),xf()()(),kf(6,"div",139),am(7," This preorder item hasnât been released yet. "),xf(),kf(8,"div",19)(9,"div",20)(10,"button",140),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.handleSlotAction("reserve-new-time",t.modalData.modalId))})),am(11,"Reserve new time"),xf(),kf(12,"button",141),jf("click",(function(){Wa(e);let t=Yf();return Ha(t.handleSlotAction("choose-time-later",t.modalData.modalId))})),am(13,"Choose time later"),xf(),kf(14,"button",142),jf("click",(function(){return Wa(e),Ha(Yf().handleClose())})),am(15,"Don't add item"),xf()()()}if(2&e){let e=Yf();Vd(5),cm("Please pick a new ",null==e.modalData?null:e.modalData.preference," time.")}}var Lae=(()=>{class e{constructor(e,t,i){this._commonService=e,this._userInfoService=t,this._aemService=i,this.closeModalEvent=new _l,this.refreshModalEvent=new _l,this.startCustomizationEvent=new _l,this.handleSlotEvent=new _l,this.addAnywayEvent=new _l,this.previousPageEvent=ne
1w _l,this.addAndUpdateEvent=new _l,this.addPreviousCustomizationEvent=new _l,this.addModifyPreviousCustomizationEvent=new _l,this.addPreorderItemEvent=new _l,this.reservedTimeIntent=this._userInfoService.getUserChannel(),this.isCateringEnabled=!this._aemService.getFeatureFlagByNameDisable("isCateringDisabled"),this.isDigitalDeliPdsModalEnabled=!this._aemService.getFeatureFlagByNameDisable("isDigitalDeliPdsModalDisabled")}ngOnChanges(e){e.modalData&&e.modalData.currentValue&&this.displayModal(e.modalData.currentValue)}onKeydownModalEvent(e,t){this._commonService.handleTabFocus(e,`#${t}`,document.getElementById(`${t}`).parentElement,'button:not([disabled]) , a, [tabindex]:not([tabindex="-1"])')}displayModal(e){let{modalId:t,modalOptions:i,closeBtnSelector:n,modalFlag:r,analyticsTag:s}=e,a=`#${t}`,o=this;$(a).off("shown.bs.modal hidden.bs.modal"),setTimeout((()=>{r&&(this[r]=!0),$(a).modal(i).appendTo(".unified-footer"),$(a).on("shown.bs.modal",(function(){setTimeout((()=>{$(n).focus()}),100)})),$(a).on("hidden.bs.modal",(function(){r&&(o[r]=!1),o.handleClose(),$(a).remove(),$(`#addButton_${o.product?.id}`).focus()})),s&&this.analyticsEvents("modalView",s)}),100)}handleClose(){let e={ctaRefId:this.modalData?.ctaRefId};this.closeModalEvent.emit(e)}handleRefresh(){this.refreshModalEvent.emit()}startCustmization(){this.startCustomizationEvent.emit()}handleSlotAction(e,t){this.handleSlotEvent.emit({type:e,modalId:t})}handleAddAnywayAction(e){this.analyticsEvents("modalClick","deli:only-available-in-time|got-it-add-anyways"),this.addAnywayEvent.emit(e)}handleAddAndUpdateItem(e){this.analyticsEvents("topNav","only-available-in-time:add-item-and-update-time"),this.addAndUpdateEvent.emit(e)}handleAddItemFromPreviousCustomization(){this.addPreviousCustomizationEvent.emit()}handlePreorderItem(){this.addPreorderItemEvent.emit()}previousPageAction(){this.previousPageEvent.emit()}handleModifyPreviousCustomization(){this.addModifyPreviousCustomizationEvent.emit()}get isRequiredIngredientOutOfStock(){return!!this.customizationData?.items?.length&&(this.customizationData?.items?.[0]?.customizations||[]).some((e=>!(!e?.options?.length||!e?.minSelect)&&e?.options.filter((e=>"1"===e?.channelInventory?.[this.reservedTimeIntent])).length<e?.minSelect))}analyticsEvents(e,t){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.handleModalAndLinkEvents({eventType:e,modalAndLinkData:"topNav"===e?`cta:${window.AB.DATALAYER.pathSections?.join(":")}|button|${t}`:t})}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["cart-slot-modal-al"]],inputs:{modalData:"modalData",product:"product",customizationData:"customizationData"},outputs:{closeModalEvent:"closeModalEvent",refreshModalEvent:"refreshModalEvent",startCustomizationEvent:"startCustomizationEvent",handleSlotEvent:"handleSlotEvent",addAnywayEvent:"addAnywayEvent",previousPageEvent:"previousPageEvent",addAndUpdateEvent:"addAndUpdateEvent",addPreviousCustomizationEvent:"addPreviousCustomizationEvent",addModifyPreviousCustomizationEvent:"addModifyPreviousCustomizationEvent",addPreorderItemEvent:"addPreorderItemEvent"},features:[ga],decls:22,vars:8,consts:[["mto",""],["product_customization_modal",""],["previous_customizations_error",""],["product_customization_modal_new",""],["previous_customizations_error_new",""],["prebook_modal",""],["preorder_slot",""],["showLoading",""],[4,"ngIf"],["data-backdrop","static","data-keyboard","false","tabindex","-1","role","dialog","aria-modal","true",1,"modal","fade",3,"keydown","id"],["aria-hidden","false",1,"modal-dialog","pds-modal-size__small","pds-modal-dialog"],["aria-hidden","false","data-qa","cart-slot-modal",1,"modal-content","pds-modal-content"],[4,"ngTemplateOutlet"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pb-1"],["aria-label","Close","data-dismiss","modal",1,"pds-close","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-trans
1parent--neutral__icon"],[1,"pds-modal-header__box","d-flex","flex-column","align-items-center"],["id","mto-modal-label","data-qa","mto-ttl",1,"modal-title","heading-s","flex-grow-1"],["data-qa","mto-txt",1,"modal-body","pds-modal-body--small","text-l","pt-3","pb-3","text-center"],[1,"modal-footer","pds-modal-footer","pds-modal-footer--small","border-top-0"],[1,"pds-modal-footer__button-box","align-items-center","d-flex","flex-column"],["aria-label","Reserve new time","data-dismiss","modal","data-qa","mto-rsrv-btn",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"],["aria-label","Choose time later","data-dismiss","modal","data-qa","mto-chs-tm-btn",1,"pds-btn","pds-btn-size__medium","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center",3,"click"],["data-dismiss","modal","data-qa","mto-dnt-add-btn","aria-label","Don't add item",1,"pds-btn","pds-btn-size__medium","pds-btn-transparent--primary","d-flex","align-items-center","justify-content-center",3,"click"],["role","dialog","aria-hidden","true","aria-modal","true","aria-label","Add with your previous customization.","tabindex","-1",1,"modal","fade","product-customization-modal",3,"keydown","id"],[1,"modal-dialog","modal
1-dialog-centered","notif-modal"],[1,"modal-content"],[1,"modal-header","product-customization-modal__header"],["data-dismiss","modal","aria-label","Add with your previous customizations? Close",1,"close","product-customization-modal__header__modal-close",3,"click"],["aria-hidden","true",1,"svg-icon","svg-close-primary","product-customization-modal__header__close-icon"],[1,"modal-body","notif-styles"],[1,"notif-styles__content"],[1,"d-flex","justify-content-center"],["loading","lazy",1,"notif-styles__img",3,"src","alt"],[1,"heading-s","notif-styles__content--title"],["aria-label","Add my previous customizations",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center","mt-2",3,"click","disabled"],["role","link","aria-label","Modify previous customizations","href","javascript:void(0);",1,"link-sm","links__action","underline","d-flex","justify-content-center",3,"click"],[4,"ngFor","ngForOf"],[1,"list-unstyled","m-0","p-0","text-left","text-l"],[3,"ngClass"],["aria-hidden","true",3,"ngClass",4,"ngIf"],["class","sr-only",4,"ngIf"],[3,"ngClass",4,"ngIf"],["aria-hidden","true",3,"ngClass"],[1,"sr-only"],["aria-hidden","true"],[1,"text-l-b--error"],["role","dialog","aria-modal","true","aria-label","Unable to load","tabindex","-1",1,"modal","fade","product-customization-modal",3,"keydown","id"],["data-dismiss","modal","aria-label","Close previous customization",1,"close","product-customization-modal__header__modal-close",3,"click"],[1,"notif-styles__content","notif-styles__content--error"],["aria-hidden","true",1,"d-flex","justify-content-center"],[1,"svg-error-broken-wifi","notif-styles__content--icon","mr-0"],[1,"d-flex","flex-column","align-items-center","notif-styles__content--error"],[1,"d-flex","flex-column","align-items-center","notif-styles__content"],["role","heading","aria-level","2",1,"heading-s","m-0",3,"id"],[1,"text-l","mx-4","text-center"],[1,"w-100","btn-container"],["aria-label","Refresh",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","ngStyle"],[4,"ngIf","ngIfElse"],["role","link","aria-label","Start a new customization","href","javascript:void(0);",1,"link-sm","links__action","underline","d-flex","justify-content-center","mt-1",3,"click"],["aria-live","assertive","role","alert","aria-label","Loading",1,"pp-loading-spinner"],[1,"modal-dialog","pds-modal-size__medium","pds-modal-dialog"],[1,"modal-content","pds-modal-content"],[1,"modal-header","pds-modal-header","pds-modal-header--small","border-bottom-0","d-flex","flex-column","pb-0"],["data-dismiss","modal","aria-label","Add with your previous customizations? Close",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],[1,"modal-body","pds-modal-body--small","text-l","pt-3","pb-3"],[1,"pds-modal-footer__button-box","align-items-center","d-flex"],["aria-label","Modify previous customizations",1,"pds-btn","pds-btn-size__medium","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center",3,"click"],["aria-label","Add my previous customizations",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","disabled"],[1,"px-4"],[1,"d-flex","justify-content-center","mb-3"],["loading","lazy",1,"image-container-pds-square",3,"src","alt"],[1,"d-flex","flex-column","align-items-center","text-center"],[1,"modal-title","heading-s","flex-grow-1"],["class","text-l--medium",4,"ngFor","ngForOf"],["class","text-l--medium",4,"ngIf"],[1,"text-l--medium"],["class","text-l-sb",4,"ngFor","ngForOf"],[1,"text-l-sb"],["data-dismiss","modal","aria-label","Close previous customization",1,"pds-modal-header__close-btn","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["role","link","aria-label","Start a new customization",1,"pds-btn","link-m--primary","pds-modal-footer__link",3,"click"],[1,"d-flex","flex-column","align-items-center","notif-styles__content","mt-3","text-center"],[1,"heading-s",3,"id"],[1,"text-l","mt-1","text-center"],["tabindex","-1","role","dialog","aria-label","This item isn't available.","tabindex","-1",1,"modal","fade","prebook-modal",3,"keydown","i
1d"],["role","document",1,"modal-dialog","modal-dialog-centered","notif-modal"],[1,"modal-header"],["data-dismiss","modal","aria-label","Close Customization",1,"close",3,"click"],[1,"svg-icon","svg-close-primary"],[1,"rd__cont--prebook","pt-4","prebook-slot-drawer"],[1,"rd__cont--prebook__body","d-flex","flex-column"],[1,"d-flex"],["aria-label","This item isnt available..., Back to Customization",1,"btn","btn-sm","pds-btn-transparent--primary","back",3,"click"],["aria-hidden","true",1,"svg-caret-left"],[1,"d-flex","flex-column","align-items-center",3,"ngClass"],[1,"d-flex","flex-column","align-items-center","text-center",3,"ngClass"],["role","heading","aria-level","2",1,"heading-s",3,"ngClass"],["class","text-l","data-qa","pdp_dd_pbs_mdl_sbttl",3,"ngClass",4,"ngIf"],["data-qa","pdp_dd_pbs_mdl_prmry_bttn","aria-label","Got It add anyways",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"],["aria-label","Add Item & Update Item link",1,"pds-btn","pds-btn-size__medium","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center",3,"click"],["data-qa","pdp_dd_pbs_mdl_sbttl",1,"text-l",3,"ngClass"],["tabindex","-1","role","dialog","aria-label","Heads Up: This is a preorder item","data-backdrop","static","data-keyboard","false","aria-modal","true",1,"modal","fade",3,"keydown","id"],["aria-hidden","false",1,"modal-content","pds-modal-content"],["aria-hidden","false","aria-label","Close","data-dismiss","modal","data-qa","preorder-close",1,"pds-close","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],[1,"pds-modal-header__box","d-flex","flex-column","align-items-center","text-center"],["aria-hidden","true","xmlns","http://www.w3.org/2000/svg","width","96","height","115","viewBox","0 0 96 115","fill","none"],["d","M26.9676 19.4089C27.2139 17.8171 32.3698 4.19624 32.4281 2.30938C32.4863 0.422528 26.0243 6.89862 26.4256 18.8624C26.2047 20.0241 26.9676 19.4089 26.9676 19.4089Z","fill","#C0EBAB"],["d","M28.8132 22.0254C27.8745 20.2252 22.9909 2.48237 21.6254 0.56736C20.2599 -1.34765 18.5186 10.0193 27.8243 21.874C28.4851 23.2247 28.8132 22.0254 28.8132 22.0254Z","fill","#A3D48A"],["d","M26.4931 22.4681C26.5892 20.6306 24.4336 4.13277 24.7862 2.05816C25.1387 -0.0164538 30.073 8.7158 27.1482 21.996C27.1069 23.3417 26.4931 22.4681 26.4931 22.4681Z","fill","#6EB749"],["d","M25.0004 26.7241C25.663 25.0093 34.361 10.8518 34.8867 8.81552C35.4124 6.77926 27.353 12.716 24.5964 26.0247C24.0847 27.2687 25.0004 26.7241 25.0004 26.7241Z","fill","#A3D48A"],["d","M24.129 48.577C22.9177 44.7355 21.9522 41.6807 21.051 37.274C19.8374 31.3465 19.5672 27.0251 20.8892 22.7844C21.2705 21.5643 21.7805 20.3566 22.8785 19.3354C24.8779 17.4791 28.2218 16.7969 30.7604 18.0563C32.1951 18.7683 33.0433 19.9363 33.6326 20.9758C36.0657 25.2645 35.6186 30.0478 35.2655 34.1767C33.966 49.3288 33.3161 56.9033 33.5918 59.2803C33.7828 60.9272 34.3022 64.616 33.3758 64.9365C32.7727 65.1459 31.8039 63.8355 31.152 62.9027C26.6742 56.4864 24.4185 49.4945 24.129 48.577Z","fill","#F59F49"],["d","M13.411 27.8316C13.0361 26.2616 12.7764 11.6887 12.106 9.9151C11.4356 8.14146 7.68003 16.5686 12.6763 27.5266C12.9101 28.6878 13.411 27.8316 13.411 27.8316Z","fill","#6EB749"],["d","M14.1618 28.4724C12.7925 26.9514 3.58948 10.8819 1.77226 9.35452C-0.0449545 7.82711 1.06504 19.3244 13.1524 28.5691C14.1371 29.7211 14.1618 28.4724 14.1618 28.4724Z","fill","#6EB749"],["d","M13.9447 29.817C13.3425 28.0704 5.0873 13.5169 4.63775 11.4537C4.1882 9.39049 12.1375 15.6759 14.3849 29.1326C14.8533 30.4009 13.9447 29.817 13.9447 29.817Z","fill","#A3D48A"],["d","M16.0702 55.4683C13.9791 52.1387 12.081 48.6944 10.3852 45.152C7.80178 39.6535 6.52074 35.4998 6.83574 31.0513C6.86557 29.6961 7.26542 28.374 7.993 27.2249C8.80607 26.0526 9.94557 25.1383 11.2735 24.5928C12.6015 24.0473 14.0609 23.8941 15.4751 24.1515C16.8449 24.5104 18.0711 25.2744 18.9894 26.3411C22.3954 29.9625 23.0765 34.7336 23.6904 38.8517C25.955 53.9363 27.0873 61.4787 27.9116 63.7319C28.4855 65.3009 29.8618 68.7745 29.0231 69.3042C28.4834 69.6447 27.2493 68.5604 26.3398 67.8314C22.3477 64.2061 18.8907 60.0444 16.0702 55.4683Z","fill","#F26A50"],["d","M52.3062 32.8978C52.7546 28.7388 55.938 26.3435 56.8509 25.6557C59.1499 23.9253 59.8082 24.8023 62.8216 22.6661C65.0674 21.0743 65.5619 19.97
173 67.8137 19.1144C69.0036 18.6584 70.7177 18.0015 72.0042 18.7916C73.5739 19.7557 73.5887 22.3064 73.5971 23.9076C73.6078 25.6932 73.2447 26.5099 72.7235 29.0145C71.8503 33.2109 72.3571 33.3651 71.7966 35.2209C71.4802 36.2672 69.7968 41.2537 64.9365 42.8605C64.5513 42.9881 59.4958 44.5626 55.5137 41.1163C53.0198 38.9576 51.9995 35.7392 52.3062 32.8978Z","fill","#294D17"],["d","M27.2649 48.745C26.8888 48.8003 26.5142 48.7112 26.2164 48.4958C25.9538 48.317 25.7578 48.0566 25.6551 47.7506C28.1336 45.3186 30.0905 42.4011 31.3884 39.201C30.3791 39.0414 29.4807 38.5199 28.8541 37.73C28.334 37.0499 28.0463 36.2099 28.0304 35.3259C28.0145 34.442 28.2716 33.5579 28.7659 32.796C29.3275 32.0055 30.1243 31.4128 31.0287 31.1138C30.5728 30.2115 30.3613 29.1914 30.4144 28.1511C30.4683 27.2468 30.7315 26.3551 31.1822 25.5474C31.6328 24.7397 32.2586 24.0389 33.0091 23.5014C33.9194 22.9402 34.9599 22.6613 35.9931 22.7018C36.2012 17.6552 42.1284 16.1229 42.7603 18.0923C43.718 16.3266 46.3988 14.827 48.3415 15.9545C51.5827 17.8358 48.6307 21.3349 48.5087 21.4888
1C49.2551 22.0111 49.7924 22.7813 50.0354 23.6778C50.3011 24.8161 50.1051 26.0426 49.4906 27.0914C48.963 27.9996 48.1808 28.7379 47.2505 29.2058C47.8121 30.1743 48.0531 31.3135 47.9406 32.4674C47.9047 33.1404 47.7249 33.8064 47.4141 34.4199C47.1034 35.0333 46.6691 35.5794 46.1405 36.0206C45.6357 36.3823 45.0693 36.6411 44.4763 36.781C43.8834 36.9208 43.2758 36.9389 42.6906 36.8342C42.7298 37.6191 42.5893 38.4141 42.2795 39.1571C41.9697 39.9001 41.4991 40.5714 40.9042 41.1194C40.3094 41.6673 39.6058 42.0769 38.8485 42.3169C38.0911 42.5569 37.3002 42.6209 36.5364 42.5034C35.156 42.341 33.9137 41.668 33.0446 40.6117C31.373 43.4904 29.4374 46.2144 27.2649 48.745Z","fill","#6EB749"],["d","M42.4861 22.9816C41.4527 24.284 40.5737 25.3315 39.9725 26.0161C39.6544 25.4542 39.3819 24.8653 39.1573 24.2548C38.6882 22.9342 38.6422 22.0689 38.5174 22.0863C38.2431 23.1815 38.2118 24.3097 38.426 25.3881C38.5369 26.2981 38.7562 27.1846 39.0791 28.0287C38.4068 29.1362 37.607 30.2894 36.8655 31.4168C36.5575 30.5459 36.0512 29.7705 35.3857 29.1503C34.638 28.4768 33.6683 28.004 33.529 28.1628C33.3898 28.3217 34.0657 28.8786 34.631 29.8056C35.2203 30.7948 35.583 31.9147 35.6939 33.0884L30.8452 41.8519C32.5024 40.0308 34.0517 38.1139 35.4852 36.1126C36.6032 34.5298 37.5802 33.0147 38.4303 31.5909C39.9735 31.4646 41.4956 31.0293 42.9066 30.3097C43.9522 29.7632 45.0551 28.9803 44.9707 28.7666C44.8863 28.5528 43.7966 28.9837 41.7497 29.3685C40.8212 29.5336 40.0583 29.6152 39.5552 29.6677C40.2276 28.5602 40.9843 27.5016 41.7094 26.4247C42.4664 26.2727 43.204 26.0094 43.8977 25.6428C45.0461 25.0212 46.2981 24.0401 46.1379 23.6925C45.9776 23.345 45.4006 23.5194 42.8024 24.4829C44.979 20.4741 45.3391 19.5747 45.2547 19.5257C44.2649 20.6225 43.3404 21.7769 42.4861 22.9816Z","fill","#A3D48A"],["d","M34.7587 39.7781C34.7264 39.6121 34.7409 39.4395 34.8006 39.2808C34.8604 39.122 34.9631 38.9842 35.0959 38.8832C37.6383 38.3149 40.1072 37.4282 42.4485 36.2432C46.2784 34.3194 49.7138 31.6394 52.5594 28.3558C51.5645 27.8529 50.7242 27.0768 50.1298 26.111C49.4938 25.0981 49.2111 23.8883 49.3273 22.6791C49.4435 21.4698 49.9522 20.3324 50.77 19.453C51.4165 18.7424 52.2273 18.2146 53.1241 17.92C52.6393 17.6021 52.2469 17.154 51.9889 16.623C51.7309 16.092 51.6165 15.4975 51.6574 14.9017C51.7124 14.4019 51.8774 13.9203 52.1397 13.4946C52.402 13.0688 52.7545 12.7102 53.1702 12.4459C53.5781 12.195 54.0303 12.0324 54.4992 11.9683C54.968 11.9042 55.4438 11.94 55.8967 12.0732C55.6535 11.4353 55.5506 10.7481 55.5953 10.0609C55.64 9.37367 55.8311 8.7034 56.1551 8.09871C56.4792 7.49402 56.9283 6.97002 57.4696 6.56388C58.0108 6.15773 58.6311 5.87961 59.2856 5.74993C59.937 5.60045 60.6089 5.58758 61.2624 5.71202C61.6938 5.80592 62.0834 6.04144 62.373 6.38353C62.6626 6.72562 62.8369 7.15599 62.8706 7.61152C62.9176 8.29225 62.9469 9.09354 62.9269 9.97413C62.5957 24.0066 50.0685 33.3194 48.4379 34.4926C44.467 37.3365 39.9966 39.3388 35.288 40.3822C35.1598 40.332 35.0448 40.2512 34.953 40.1463C34.8611 40.0414 34.7945 39.9151 34.7587 39.7781Z","fill","#A3D48A"],["d","M55.2272 26.6062C54.3446 25.3479 51.8726 25.0915 50.2511 25.4953C48.0508 26.0452 46.2384 28.1024 47.0847 29.6012C47.878 31.0042 50.8003 31.5525 52.7737 30.8713C54.8026 30.1689 56.2252 28.028 55.2272 26.6062Z","fill","#F59F49"],["d","M43.9561 24.8183L41.0692 37.5779C41.0356 37.7266 41.129 37.8735 41.2779 37.9062L66.9961 43.5463C67.1449 43.579 67.2929 43.4849 67.3265 43.3363L70.1525 30.8458C70.1861 30.6972 70.0927 30.5502 69.9439 30.5176L54.3848 27.1053C54.4173 28.1665 53.9158 29.3106 53.0013 29.8572C51.5988 30.6937 49.8566 29.7479 49.3758 28.2583C49.1543 27.5693 49.1942 26.7308 49.4958 26.0332L43.9561 24.8183Z","fill","#F7CC4A"],["d","M70.1997 30.1792L43.7242 24.7601C45.006 24.5417 46.4485 24.3728 48.0265 24.3144C49.3253 24.2686 50.5288 24.3027 51.6165 24.3861C57.8109 26.3171 64.0053 28.2482 70.1997 30.1792Z","fill","#F59F49"],["d","M63.6148 32.447C63.2093 31.5823 61.9212 31.5045 61.0529 31.8676C59.8743 32.3588 58.8331 33.9134 59.2092 34.9494C59.5642 35.9196 61.0699 36.1839 62.137 35.6116C63.2309 35.0198 64.072 33.42 63.6148 32.447Z","fill","#F59F49"],["d","M62.4814 38.7943C62.8565 39.0744 63.5245 38.8535 63.8932 38.5318C64.394 38.0957 64.6165 37.2441 64.2227 36.8869C63.8524 36.5529 63.0376 36.7389 62.6092 37.1869C62.1711 37.6481 62.0588 38.4792 62.4814 38.7943Z","fill","#F59F49"],["d","M47.
11134 32.6382C46.8815 31.9828 46.0628 31.9629 45.4982 32.2705C44.7317 32.6868 44.0202 33.9204 44.228 34.7091C44.4245 35.4476 45.3761 35.6048 46.074 35.1293C46.7894 34.638 47.3749 33.3757 47.1134 32.6382Z","fill","#F59F49"],["d","M4.74902 33.7952C4.74902 34.183 5.13133 106.248 5.13133 106.248C5.13133 106.248 61.9221 107.991 62.2112 107.894C62.5004 107.797 74.7325 104.184 74.7325 104.184L72.3917 33.2752L68.0567 36.5216L63.8777 33.0225L59.9077 36.8919L56.7466 34.292L54.1568 36.9064L50.5104 34.3908C50.5104 34.3908 48.3056 37.0052 48.0164 36.9064C47.7272 36.8077 44.8511 34.1976 44.8511 34.1976L42.4487 36.9064L39.1874 34.1061L36.7894 36.9064L33.0471 34.1061L30.2711 36.7206L27.2002 34.2048L24.3226 36.8193L21.1558 33.5294L18.5673 36.6159L16.4571 33.817L14.4413 37.0125L11.276 33.817L8.5415 37.6385L4.74902 33.7952Z","fill","#FABB7D"],["d","M63.8807 33.0225C63.6674 33.8489 62.4619 107.855 62.4619 107.855L69.6445 96.9334L68.3002 36.4838L63.8807 33.0225Z","fill","#F59F49"],["d","M72.3913 33.2751C72.6089 34.1031 74.8179 104.011 74.8179 104.011L69.5652 97.8033L67.9131 36.5926L72.3913 33.2751Z","fill","#F59F49"],["d","M62.4619 107.853C62.6752 107.545 69.6517 96.9319 69.6517 96.9319L74.9846 104.146L62.4619 107.853Z","fill","#F59F49"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.0601 42.2012L22.3491 42.4319L21.5945 56.8705H44.7307L44.9438 43.0493L49.2383 43.1175L49.0051 58.2349C48.9993 59.0266 48.6868 59.7845 48.1347 60.3447C47.5775 60.91 46.8216 61.2279 46.033 61.2279H20.1971C19.7963 61.2276 19.4 61.145 19.0319 60.9854C18.6634 60.8257 18.3307 60.5921 18.0538 60.2989C17.7765 60.0053 17.5608 59.6581 17.4193 59.2782C17.2778 58.8981 17.2134 58.493 17.2301 58.0869L17.2306 58.0746L18.0601 42.2012Z","fill","#F59F49"],["d","M48.5931 101.854L61.5117 80.5428C64.6612 75.3471 72.2153 75.3915 75.3036 80.6238L87.8822 101.935C91.044 107.292 87.1823 114.055 80.962 114.055H55.4648C49.2024 114.055 45.3468 107.209 48.5931 101.854Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M63.9861 83.2523C66.2661 79.3228 71.9662 79.3228 74.2462 83.2523L85.5905 102.803C87.8705 106.733 85.0205 111.644 80.4604 111.644H57.7719C53.2118 111.644 50.3618 106.733 52.6418 102.803L63.9861 83.2523Z","fill","#C63939"],["d","M68.3555 88.2406C68.5999 87.9554 68.911 87.8127 69.2887 87.8127C69.6664 87.8127 69.9886 87.9554 70.2552 88.2406C70.4996 88.5259 70.6218 88.8586 70.6218 89.239V98.9848C70.6218 99.3651 70.4996 99.6979 70.2552 99.9831C69.9886 100.268 69.6664 100.411 69.2887 100.411C68.911 100.411 68.5999 100.268 68.3555 99.9831C68.0889 99.6979 67.9556 99.3651 67.9556 98.9848V89.239C67.9556 88.8586 68.0889 88.5259 68.3555 88.2406ZM68.3555 102.96C68.5999 102.699 68.911 102.568 69.2887 102.568C69.6664 102.568 69.9886 102.699 70.2552 102.96C70.4996 103.246 70.6218 103.59 70.6218 103.994V104.957C70.6218 105.337 70.4996 105.67 70.2552 105.955C69.9886 106.241 69.6664 106.383 69.2887 106.383C68.911 106.383 68.5999 106.241 68.3555 105.955C68.0889 105.67 67.9556 105.337 67.9556 104.957V103.994C67.9556 103.59 68.0889 103.246 68.3555 102.96Z","fill","white"],["id","preorder-modal-label","role","heading","aria-level","2",1,"modal-title","heading-s","text-center","flex-grow-1","pt-3"],["id","preorder-modal-description",1,"modal-body","pds-modal-body--small","text-l","text-center","pt-3","pb-3"],["data-qa","preorder-continue-btn",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click"],["data-dismiss","modal","data-qa","dont-add-item-btn",1,"pds-btn","link-m--primary",3,"click"],["aria-label","Close","data-dismiss","modal","aria-hidden","false","data-qa","cart-slot-close",1,"pds-close","pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-transparent--neutral","d-flex","align-items-center","justify-content-center","ml-auto",3,"click"],["role","heading","aria-level","2","id","preorder_slot-modal-label",1,"modal-title","heading-s","flex-grow-1"],["id","preorder_slot-modal-description",1,"modal-body","pds-modal-body--small","text-l","pb-0","text-center"],["data-qa","cart-slot-rsrv-btn",1,"pds-btn","pds-btn-size__medium","pds-btn-filled--primary",3,"click"],["data-qa","cart-slot-chs-tm-btn",1,"pds-btn","pds-btn-size__medium","pds-btn-outlined--primary",3,"click"],["data-dismiss","modal","data-qa","cart-slot-dnt-add-btn",1,"pds-btn","link-m--primary",3,"click"]],template:function(e,t){1&e&&ph(0,jse,6,5,"ng-container",8)(1,zse,18,7,"ng-template",null,0,Wm)(3,Hse,9,2,"ng-container",8)(4,nae,10,4,"ng-template",null,1,Wm)(6,sae,9,2,"ng-container",8)(7,lae,16,6,"ng-template",null,2,Wm)(9,dae,15,3,"ng-container",8)(10,_ae,8,3,"ng-template",null,3,Wm)(12,Aae,17,7,"ng-container",8)(13,kae,9,1,"ng-template",null,4,Wm)(15,Tae,8,2,"ng-container",8)(16,Eae,9,1,"ng-container",8)(17,Bae,11,9,"ng-template",null,5,Wm)(19,Mae,55,9,"ng-container",8)(20,Rae,16,1,"ng-template",null,6,Wm),2&e&&(zh("ngIf",t.modalData&&("mto"===t.modalData.type||"preorder_slot"===t.modalData.type)),Vd(3),zh("ngIf",t.modalData&&"product_customization_modal"===t.modalData.type&&!t.isDigitalDeliPdsModalEnabled),Vd(3),zh("ngIf",t.modalData&&"previous_customizations_error"===t.modalData.type&&!t.isDigitalDeliPdsModalEnabled),Vd(3),zh("ngIf",t.modalData&&"product_customization_modal"===t.modalData.type&&t.isDigitalDeliPdsModalEnabled),Vd(3),zh("ngIf",t.modalData&&"previous_customizations_error"===t.modalData.type&&t.isDigitalDeliPdsModalEnabled),Vd(3),zh("ngIf",t.modalData&&"prebook_modal"===t.modalData.type),Vd(),zh("ngIf",t.modalData&&"prebook_slot_drawer"===t.modalData.type),Vd(3),zh("ngIf",t.modalData&&"preorder"===t.modalData.type))},dependencies:[sy,oy,cy,by,gy,Iy,By,Ty],encapsulation:2})}}return e})(),Fae=["decreaseBtn"],Nae=["spinnerBlock"],Uae=["addBtn"],Vae=["qtyInfoBtn"],qae=["qscStepperBubble"],$ae=["qscIncreaseBtn"],jae=(e,t,i,n,r,s)=>
1({"btn-stppr-disabled":e,"btn-stppr-signIn":t,"btn-stppr-add":i,"pds-btn-filled--primary":n,"pds-btn-outlined--primary":r,"pds-btn-filled--neutral":s}),zae=e=>({"pl-2":e}),Wae=e=>({"btn-stppr-disabled":e}),Hae=e=>({"svg-btn-stppr-increase--disabled":e}),Yae=e=>({"svg-btn-stppr-trash-bin--disabled":e}),Gae=e=>({"svg-btn-stppr-decrease--disabled":e}),Kae=e=>({"svg-btn-stppr-right-arrow--disabled":e}),Qae=(e,t)=>({"pc--carousel-wt-dropdown__menu pc--carousel-wt-dropdown__menu--c":e,"d-block":t}),Jae=e=>({"pc--carousel-wt-dropdown__menu__container pc--carousel-wt-dropdown__menu__container--c":e}),Zae=(e,t)=>({"pc--carousel-wt-dropdown__menu__container__item pc--carousel-wt-dropdown__menu__container__item--c":e,"wt-dropdown__menu__container__item-remove--disabled":t}),Xae=e=>({"pc--carousel-wt-dropdown__menu__container__item pc--carousel-wt-dropdown__menu__container__item--c":e}),eoe=(e,t)=>({"pds-svg-qty-stepper-decrease-medium-large pds-quantity-stepper-container-button-background--outlined__icon":e,"pds-svg-qty-stepper-trash pds-quantity-stepper-leading-button-container--outlined__icon__disabled":t}),toe=(e,t)=>({"pds-quantity-stepper-leading-button-container--outlined__icon__disabled":e,"pds-quantity-stepper-container-button-background--outlined__icon":t});function ioe(e,t){1&e&&Tf(0,"span",15)}function noe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",12,3),jf("click",(function(t){Wa(e);let i=Yf(5);return Ha(i.beforeCartAction(i.ctaLabel===i.CtaType.PREORDER?"preorder":i.ctaLabel===i.CtaType.ADD||i.orderAmendsOTA?"increase":"customize",t))})),ph(3,ioe,1,0,"span",13),kf(4,"span",14),am(5),xf()(),Df()}if(2&e){let e=Yf(5);Vd(),Jf("id",e.idAttribute),zh("ngClass",Fm(10,jae,e.loadingSpinner,e.ctaLabel===e.CtaType.SIGNIN||e.ctaLabel===e.CtaType.ADDTOORDER,e.ctaLabel===e.CtaType.ADD||e.ctaLabel===e.CtaType.PREORDER||e.ctaLabel===e.CtaType.CUSTOMIZE,e.ctaLabel!==e.CtaType.CUSTOMIZE&&e.ctaLabel!==e.CtaType.TEMPORARILY_UNAVAILABLE,e.ctaLabel===e.CtaType.CUSTOMIZE,e.ctaLabel===e.CtaType.TEMPORARILY_UNAVAILABLE))("disabled",e.disabledAttribute),gh("data-qty-id",e.dataQtyIdAttribute)("data-qa",e.dataQaAttribute)("aria-label",e.ariaLabelAttribute)("aria-disabled",e.loadingSpinner),Vd(2),zh("ngIf",e.ctaLabel===e.CtaType.ADD),Vd(),zh("ngClass",Om(17,zae,e.ctaLabel===e.CtaType.ADD)),Vd(),lm(e.ctaLabel)}}function roe(e,t){if(1&e&&Tf(0,"span",28),2&e){let e=Yf(7);zh("ngClass",Om(1,Yae,1===e.product.quantity||e.orderAmendsOTA))}}function soe(e,t){if(1&e&&Tf(0,"span",29),2&e){let e=Yf(7);zh("ngClass",Om(1,Gae,e.loadingSpinner||e.orderAmendsOTA))}}function aoe(e,t){if(1&e&&(kf(0,"span",30,5),Tf(2,"span",31),xf()),2&e){Zf("id","qtySpinner_",Yf(7).product.id,"")}}function ooe(e,t){if(1&e){let e=Mf();kf(0,"button",32,6),jf("click",(function(){return Wa(e),Ha(Yf(7).showUpdateQtyInput())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(7).showUpdateQtyInput())})),am(2),xf()}if(2&e){let e=Yf(7);Zf("id","qtyInfo_",e.product.id,""),gh("aria-label",e.quantityAriaLabelMessage),Vd(2),lm(e.product.quantity)}}function loe(e,t){if(1&e){let e=Mf();kf(0,"div",18)(1,"span",19),am(2,"Quantity stepper menu expanded"),xf(),kf(3,"span",20),am(4),xf(),kf(5,"button",21,4),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("decrease",t))})),ph(7,roe,1,3,"span",22)(8,soe,1,3,"span",23),xf(),ph(9,aoe,3,2,"span",24)(10,ooe,3,4,"button",25),kf(11,"button",26),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("increase",t))})),Tf(12,"span",27),xf()()}if(2&e){let e=Yf(6);Vd(4),lm(e.stepperAnnouncement),Vd(),Zf("id","dec_qtyInfo_",e.product.id,""),zh("ngClass",Om(16,Wae,e.loadingSpinner)),gh("aria-label",1===e.product.quantity?e.REMOVE+" Quantity of "+e.getProductFullName()+" from cart":"Decrease Quantity 1 unit of "+e.getProductFullName())("aria-disabled",e.loadingSpinner),Vd(2),zh("ngIf",1===e.product.quantity),Vd(),zh("ngIf",e.product.quantity>1),Vd(),zh("ngIf",e.loadingSpinner),Vd(),zh("ngIf",!e.loadingSpinner),Vd(),Zf("id","inc_qtyInfo_",e.product.id,""),zh("ngClass",Om(18,Wae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner)),gh("aria-label","Increase Quantity 1 unit of "+e.getProductFullName())("aria-disabled",e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner),Vd(),zh("ngClass",Om(20,Hae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner))}}function coe(e,t){if(1&e){let e=Mf();kf(0,"input",37),jf("keydown",(function(t){return Wa(e),Ha(Yf(7).inputQtyKeydown(t))})),mm("ngModelChange",(function(t){Wa(e);let i=Yf(7);return fm(i.updateState.input,t)||(i.updateState.input=t),Ha(t)})),jf("keyup.enter",(function(t){return Wa(e),Ha(Yf(7).beforeCartAction("update",t))}))("keyup",(function(t){return Wa(e),Ha(Yf(7).inputQtyKeyup(t))})),xf()}if(2&e){let e=Yf(7);Zf("id","qtyInfoControl_",e.product.id,""),zh("max",e.product.maxPurchaseQty),hm("ngModel",e.updateState.input),gh("aria-label","Cart quantity "+e.getProductFullName())}}function doe(e,t){if(1&e&&(kf(0,"span",30,5),Tf(2,"span",31),xf()),2&e){Zf("id","qtySpinner_",Yf(7).product.id,"")}}function uoe(e,t){if(1&e){let e=Mf();kf(0,"div",33)(1,"span",20),am(2),xf(),ph(3,coe,1,5,"input",34)(4,doe,3,2,"span",24),kf(5,"button",35),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("update",t))})),Tf(6,"span",36),xf()()}if(2&e){let e=Yf(6);Vd(2),lm(e.stepperAnnouncement),Vd(),zh("ngIf",!e.loadingSpinner),Vd(),zh("ngIf",e.loadingSpinner),Vd(),Zf("id","update_qtyInfo_",e.product.id,""),gh("aria-label","update quantity of "+e.getProductFullName())("aria-disabled",e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner),Vd(),zh("ngClass",Om(8,Kae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner))}}function poe(e,t){if(1&e&&(Ef(0),ph(1,loe,13,22,"div",16)(2,uoe,7,10,"div",17),Df()),2&e){let e=Yf(5);Vd(),zh("ngIf",!e.updateState.show),Vd(),zh("ngIf",e.updateState.show)}}function hoe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",38),jf("click",(function(){return Wa(e),Ha(Yf(5).showQtyStep
1per())})),am(2),xf(),Df()}if(2&e){let e=Yf(5);Vd(),Zf("id","bubble_qtyInfo_",e.product.id,""),gh("aria-label","collapsed, "+e.quantityAriaLabelMessage),Vd(),lm(e.product.quantity)}}function foe(e,t){if(1&e&&(Ef(0),ph(1,noe,6,19,"ng-container",9)(2,poe,3,2,"ng-container",9)(3,hoe,3,4,"ng-container",9),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.ctaLabel===e.CtaType.TEMPORARILY_UNAVAILABLE||null===e.product.quantity||0===e.product.quantity),Vd(),zh("ngIf",e.product.quantity>0&&!1===e.displayBubble),Vd(),zh("ngIf",e.ctaLabel!==e.CtaType.TEMPORARILY_UNAVAILABLE&&e.product.quantity>0&&!0===e.displayBubble)}}function moe(e,t){1&e&&Tf(0,"span",42)}function goe(e,t){if(1&e&&Tf(0,"span",29),2&e){let e=Yf(7);zh("ngClass",Om(1,Gae,e.loadingSpinner))}}function boe(e,t){if(1&e&&(kf(0,"span",30,5),Tf(2,"span",31),xf()),2&e){Zf("id","qtySpinner_",Yf(7).product.id,"")}}function yoe(e,t){if(1&e){let e=Mf();kf(0,"button",32,6),jf("click",(function(){return Wa(e),Ha(Yf(7).showQscUpdateQtyInput())}))("keydown.enter",(function(){return Wa(e),Ha(Yf(7).showQscUpdateQtyInput())})),am(2),xf()}if(2&e){let e=Yf(7);Zf("id","qtyInfo_",e.product.id,""),gh("aria-label",e.quantityAriaLabelMessage),Vd(2),lm(e.product.quantity)}}function voe(e,t){if(1&e){let e=Mf();kf(0,"div",40)(1,"span",19),am(2,"Quantity stepper menu expanded"),xf(),kf(3,"span",20),am(4),xf(),kf(5,"button",21,4),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("decrease",t))})),ph(7,moe,1,0,"span",41)(8,goe,1,3,"span",23),xf(),ph(9,boe,3,2,"span",24)(10,yoe,3,4,"button",25),kf(11,"button",26,7),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("increase",t))})),Tf(13,"span",27),xf()()}if(2&e){let e=Yf(6);Vd(4),lm(e.stepperAnnouncement),Vd(),Zf("id","dec_qtyInfo_",e.product.id,""),zh("ngClass",Om(16,Wae,e.loadingSpinner)),gh("aria-label",1===e.product.quantity?e.REMOVE+" Quantity of "+e.getProductFullName()+" from cart":"Decrease Quantity 1 unit of "+e.getProductFullName())("aria-disabled",e.loadingSpinner),Vd(2),zh("ngIf",1===e.product.quantity),Vd(),zh("ngIf",e.product.quantity>1),Vd(),zh("ngIf",e.loadingSpinner),Vd(),zh("ngIf",!e.loadingSpinner),Vd(),Zf("id","inc_qtyInfo_",e.product.id,""),zh("ngClass",Om(18,Wae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner)),gh("aria-label","Increase Quantity 1 unit of "+e.getProductFullName())("aria-disabled",e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner),Vd(2),zh("ngClass",Om(20,Hae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner))}}function woe(e,t){if(1&e){let e=Mf();kf(0,"input",45),jf("keydown",(function(t){return Wa(e),Ha(Yf(7).inputQtyKeydown(t))})),mm("ngModelChange",(function(t){Wa(e);let i=Yf(7);return fm(i.updateState.input,t)||(i.updateState.input=t),Ha(t)})),jf("keyup",(function(t){return Wa(e),Ha(Yf(7).inputQtyKeyup(t))})),xf()}if(2&e){let e=Yf(7);Zf("id","qtyInfoControl_",e.product.id,""),zh("max",e.product.maxPurchaseQty),hm("ngModel",e.updateState.input),gh("aria-label","Cart quantity "+e.getProductFullName())}}function _oe(e,t){if(1&e&&(kf(0,"span",30,5),Tf(2,"span",31),xf()),2&e){Zf("id","qtySpinner_",Yf(7).product.id,"")}}function Soe(e,t){if(1&e){let e=Mf();kf(0,"div",33)(1,"span",20),am(2),xf(),ph(3,woe,1,5,"input",43)(4,_oe,3,2,"span",24),kf(5,"button",44),jf("click",(function(t){return Wa(e),Ha(Yf(6).beforeCartAction("update",t))})),Tf(6,"span",36),xf()()}if(2&e){let e=Yf(6);Vd(2),lm(e.stepperAnnouncement),Vd(),zh("ngIf",!e.loadingSpinner),Vd(),zh("ngIf",e.loadingSpinner),Vd(),Zf("id","update_qtyInfo_",e.product.id,""),gh("aria-label","update quantity of "+e.getProductFullName())("aria-disabled",e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner),Vd(),zh("ngClass",Om(8,Kae,e.product.quantity>=e.product.maxPurchaseQty||e.loadingSpinner))}}function Coe(e,t){if(1&e&&(Ef(0),ph(1,voe,14,22,"div",39)(2,Soe,7,10,"div",17),Df()),2&e){let e=Yf(5);Vd(),zh("ngIf",!e.updateState.show),Vd(),zh("ngIf",e.updateState.show)}}function Ioe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",46,8),jf("click",(function(){return Wa(e),Ha(Yf(5).showQtyStepper())})),am(3),xf(),Df()}if(2&e){let e=Yf(5);Vd(),Zf("id","bubble_qtyInfo_",e.product.id,""),zh("disabled",!1===e.isCheckboxChecked),gh("aria-label","collapsed, "+e.quantityAriaLabelMessage),Vd(2),lm(e.product.quantity)}}function Aoe(e,t){if(1&e&&ph(0,Coe,3,2,"ng-container",9)(1,Ioe,4,5,"ng-container",9),2&e){let e=Yf(4);zh("ngIf",e.product.quantity>0&&!1===e.displayBubble&&!1!==e.isCheckboxChecked),Vd(),zh("ngIf",e.product.quantity>0&&!0===e.displayBubble)}}function koe(e,t){if(1&e&&(Ef(0),ph(1,foe,4,3,"ng-container",11)(2,Aoe,2,2,"ng-template",null,2,Wm),Df()),2&e){let e=sm(3),t=Yf(3);Vd(),zh("ngIf","buyItAgainQsc"!==t.calledBy)("ngIfElse",e)}}function xoe(e,t){if(1&e){let e=Mf();kf(0,"button",51),jf("click",(function(){return Wa(e),Ha(Yf(4).displayWeights())})),kf(1,"span",52),am(2),xf(),Tf(3,"span",53)(4,"span",54),xf()}if(2&e){let e=Yf(4);_h("aria-controls","qtyDropdownContentList_",e.product.id,""),_h("aria-label","select weight ",e.product.name,""),Zf("id","qtyDropdownBtn_",e.product.id,""),gh("aria-expanded",e.showWeights),Vd(2),lm(e.ctaLabel)}}function Toe(e,t){if(1&e){let e=Mf();kf(0,"button",55),jf("click",(function(){return Wa(e),Ha(Yf(4).displayWeights())})),kf(1,"span",56),am(2),xf()()}if(2&e){let e=Yf(4);_h("aria-controls","qtyDropdownContentList_",e.product.id,""),Zf("id","qtyDropdownBtn_",e.product.id,""),zh("disabled","buyItAgainQsc"===e.calledBy&&!1===e.isCheckboxChecked),gh("aria-expanded",e.showWeights)("aria-label",e.quantityAriaLabelMessage),Vd(2),lm(e.ctaLabel)}}function Poe(e,t){if(1&e){let e=Mf();kf(0,"li",65),jf("click",(function(t){let i=Wa(e).index;return Ha(Yf(5).beforeCartAction("weighted",t,i))}))("mouseenter",(function(){let t=Wa(e).index;return Ha(Yf(5).mouseEnter(t))}))("keydown.enter",(function(t){let i=Wa(e).index;return Ha(Yf(5).beforeCartAction("weighted",t,i))}
1)),am(1),qm(2,"number"),xf()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(5);Zf("id","dropdown-itm",i,""),zh("ngClass",Om(7,Xae,n.isCarouselRedesign)),Vd(),cm(" ",jm(2,4,e.weight,"1.2")," lb ")}}function Eoe(e,t){if(1&e){let e=Mf();kf(0,"div",57)(1,"ul",58),ph(2,Poe,3,9,"li",59),kf(3,"li",60),jf("click",(function(t){return Wa(e),Ha(Yf(4).beforeCartAction("weighted",t))}))("keydown.enter",(function(t){return Wa(e),Ha(Yf(4).beforeCartAction("weighted",t))}))("mouseenter",(function(){return Wa(e),Ha(Yf(4).mouseEnterRemoveBtn())})),am(4," Remove "),xf()(),kf(5,"div",61)(6,"span",62),am(7),qm(8,"currency"),xf(),kf(9,"span",63),am(10),qm(11,"currency"),xf()(),kf(12,"div",64),am(13,"Final cost by weight"),xf()()}if(2&e){let e=Yf(4);zh("ngClass",Bm(19,Qae,e.isCarouselRedesign,e.showWeights)),Vd(),_h("aria-labelledby","qtyDropdownBtn_",e.product.id,""),Zf("id","qtyDropdownContentList_",e.product.id,""),zh("ngClass",Om(22,Jae,e.isCarouselRedesign)),Vd(),zh("ngForOf",e.weightList),Vd(),zh("ngClass",Bm(24,Zae,e.isCarouselRedesign,0===e.selectedWeight)),gh("aria-disabled",0===e.selectedWeight),Vd(2),zh("ngClass",Om(27,Xae,e.isCarouselRedesign)),Vd(2),cm("Estimated Total: ",jm(8,13,e.estimatedPrice,"USD"),""),Vd(3),cm("Est. Total: ",jm(11,16,e.estimatedPrice,"USD"),""),Vd(2),zh("ngClass",Om(29,Xae,e.isCarouselRedesign))}}function Doe(e,t){if(1&e&&(kf(0,"div",47),ph(1,xoe,5,8,"button",48)(2,Toe,3,8,"button",49)(3,Eoe,14,31,"div",50),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",0===e.selectedWeight),Vd(),zh("ngIf",0!==e.selectedWeight),Vd(),zh("ngIf",e.showWeights)}}function Ooe(e,t){if(1&e&&(Ef(0),ph(1,koe,4,2,"ng-container",11)(2,Doe,4,3,"ng-template",null,1,Wm),Df()),2&e){let e=sm(3),t=Yf(2);Vd(),zh("ngIf",!t.isLBProduct||t.isDefaultCTA||null!==t.isEcomEnabled)("ngIfElse",e)}}function Boe(e,t){if(1&e){let e=Mf();kf(0,"div",68)(1,"div",69)(2,"button",70,4),jf("click",(function(t){return Wa(e),Ha(Yf(3).beforeCartAction("decrease",t))})),Tf(4,"span",71),xf(),kf(5,"div",72)(6,"span",73),am(7),xf()(),kf(8,"button",74),jf("click",(function(t){return Wa(e),Ha(Yf(3).beforeCartAction("increase",t))})),Tf(9,"span",75),xf()()()}if(2&e){let e=Yf(3);Vd(2),Zf("id","dec_qtyInfo_",e.product.id,""),zh("ngClass",Om(13,Wae,e.isLBProduct?e.product.quantity===+e.product.minWeight:1===e.product.quantity)),gh("aria-label",(e.isLBProduct?e.product.quantity===+e.product.minWeight:1===e.product.quantity)?e.REMOVE+" Quantity of "+e.getProductFullName()+" from cart":"Decrease Quantity "+(e.isLBProduct?e.product.minWeight+" lb":"1 unit")+" of "+e.getProductFullName()),Vd(2),zh("ngClass",Bm(15,eoe,e.isLBProduct?e.product.quantity>+e.product.minWeight:e.product.quantity>1,e.isLBProduct?e.product.quantity===+e.product.minWeight:1===e.product.quantity)),Vd(3),dm("",e.product.quantity,"",e.isLBProduct?" lb":""," "),Vd(),Zf("id","inc_qtyInfo_",e.product.id,""),zh("ngClass",Om(18,Wae,e.isLBProduct?e.product.quantity>=+e.product.maxWeight:e.product.quantity>=e.product.maxPurchaseQty)),gh("aria-label",(e.isLBProduct?"Increase Quantity "+ +e.product.minWeight+" lb of ":"Increase Quantity 1 unit of ")+e.getProductFullName())("aria-disabled",e.isLBProduct?e.product.quantity>=+e.product.maxWeight:e.product.quantity>=e.product.maxPurchaseQty),Vd(),zh("ngClass",Bm(20,toe,e.isLBProduct?e.product.quantity>=+e.product.maxWeight:e.product.quantity>=e.product.maxPurchaseQty,!(e.isLBProduct?e.product.quantity>=+e.product.maxWeight:e.product.quantity>=e.product.maxPurchaseQty)))}}function Moe(e,t){if(1&e){let e=Mf();kf(0,"button",76,3),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.beforeCartAction(null!=i.product&&i.product.isPreOrderItem?"preorder":"increase",t))})),am(2),xf()}if(2&e){let e=Yf(3);_h("data-qty-id","pc",e.product.id,"Inpt"),Zf("id","addButton_",e.product.id,""),gh("aria-label",e.qtyStepperOptions.ctaLabel+" "+e.getProductFullName()),Vd(2),lm(e.qtyStepperOptions.ctaLabel)}}function Roe(e,t){if(1&e&&ph(0,Boe,10,23,"div",66)(1,Moe,3,6,"button",67),2&e){let e=Yf(2);zh("ngIf","qtyStepperExpand"===e.calledBy),Vd(),zh("ngIf","customize-drawer"===e.calledBy&&e.qtyStepperOptions)}}function Loe(e,t){if(1&e&&(Ef(0),ph(1,Ooe,4,2,"ng-container",11)(2,Roe,2,2,"ng-template",null,0,Wm),Df()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf","qtyStepperExpand"!==t.calledBy&&"customize-drawer"!==t.calledBy)("ngIfElse",e)}}function Foe(e,t){if(1&e){let e=Mf();kf(0,"cart-slot-modal-al",77),jf("handleSlotEvent",(function(t){return Wa(e),Ha(Yf().handleSlotAction(t.type,t.modalId,"",!1))}))("closeModalEvent",(function(t){return Wa(e),Ha(Yf().handleCloseCartSlotModalData(t))}))("refreshModalEvent",(function(){return Wa(e),Ha(Yf().handleRefresh())}))("startCustomizationEvent",(function(){return Wa(e),Ha(Yf().startCustmization())}))("addAnywayEvent",(function(t){return Wa(e),Ha(Yf().handleAddAnywayAction(t))}))("previousPageEvent",(function(){return Wa(e),Ha(Yf().handlePreviousPageAction())}))("addAndUpdateEvent",(function(t){return Wa(e),Ha(Yf().handleAddItemAndUpdateSlot(t))}))("addPreviousCustomizationEvent",(function(){return Wa(e),Ha(Yf().handleAddItemFromPreviousCustomization())}))("addModifyPreviousCustomizationEvent",(function(){return Wa(e),Ha(Yf().handleModifyPreviousCustomization())}))("addPreorderItemEvent",(function(){return Wa(e),Ha(Yf().handlePreorderItem(
1))})),xf()}if(2&e){let e=Yf();zh("modalData",e.cartSlotModalData)("product",e.product)("customizationData",e.customizationData)}}var Noe=class e{static{this._xerCache=new Map}constructor(e,t,i,n,r,s,a,o,l,c,d,u,p,h,f){this._commonService=e,this._userInfoService=t,this._elementRef=i,this.cartService=n,this.cartV2Service=r,this._productUtilService=s,this._aemService=a,this._productCouponService=o,this._utilService=l,this._http=c,this.toasterService=d,this._quickAddBasketService=u,this.cdr=p,this.renderer=h,this._quickAddCheckboxService=f,this.qtyStepperExpandEmitter=new _l,this.qtyStepperInfoEmitter=new _l,this.hideCTA=!1,this.config=Iw,this.REMOVE="Remove",this.isAuthorized=!1,this.currentEnv="",this.baseDomainUrl="",this.quantityAriaLabelMessage="",this.displayBubble=!0,this.loadingSpinner=!1,this.refocusButton=null,this.timeouts=[],this.reservedTimeIntent="",this.isCarouselRedesign=!1,this.isQuantityIncreased=!1,this.subscriptions=new Ye,this.isCheckboxChecked=!1,this.isLBProduct=!1,this.showWeights=!1,this.weightList=[],this.estimatedPrice=0,this.selectedWeight=0,this.updateState={show:!1,input:null},this.refreshCount=0,this.customizationData={bpn:"",name:"",items:[]},this.showCartSlotModal=!1,this.cartModalConfig={preorder_slot:{type:"preorder_slot",modalId:"preorder-slot-modal",modalOptions:{show:!0},closeBtnSelector:".pds-close",modalFlag:"preorder-slot"},preorder:{type:"preorder",modalId:"preorder-modal",modalOptions:{show:!0},closeBtnSelector:".pds-close",modalFlag:"preorder"},mto:{type:"mto",modalId:"mto-modal",modalOptions:{show:!0},closeBtnSelector:".close",analyticsTag:"mto-pickup|view",modalFlag:"mto"},product_customization_modal:{type:"product_customization_modal",modalId:"isShowPreviousCustomization",modalOptions:{show:!0},closeBtnSelector:".close",modalFlag:"product_customization_modal"},previous_customizations_error:{type:"previous_customizations_error",modalId:"productCustErrorModal",modalOptions:{show:!0},closeBtnSelector:".close",modalFlag:"previous_customizations_error",isLoading:this.loadingSpinner},prebook_modal:{type:"prebook_modal",modalId:"dd-prebook-modal",modalOptions:{show:!0},closeBtnSelector:".close",isAvaialableTime:!1,isMoreTimePrepare:!1,preBookShortTime:"",preBookLongTime:"",modalFlag:"prebook_modal"},prebook_slot_drawer:{type:"prebook_slot_drawer",modalId:"prebookSlotDrawer",modalOptions:{show:!0},closeBtnSelector:".close",isAvaialableTime:!1,isMoreTimePrepare:!1,preBookShortTime:"",preBookLongTime:"",modalFlag:"prebook_slot_drawer",analyticsTag:"deli:only-available-in-time|view"}},this.isPreviousCustomizationError=!1,this.isShowPreviousCustomization=!1,this.CtaType=Fse,this.dataQaAttribute="",this.dataQtyIdAttribute="",this.idAttribute="",this.disabledAttribute=!1,this.ariaLabelAttribute="",this.isDefaultCTA=!1,this.orderAmendsOTA=!1,this.globalClickUnlistener=null,this.isAuthorized=this._userInfoService.isAuthorized(),this.currentEnv=this._commonService.getCurrentEnviorment(),this.baseDomainUrl=this.config[this.currentEnv]?.baseURL?.replace("{banner}",this._userInfoService.getBanner()),this.enableAdRelevanceTracking=!this._aemService.getFeatureFlagByNameDisable("disableAdRelevance"),this.reservedTimeIntent=this._userInfoService.getUserChannel(),this.debounceAddCart=this._commonService.debounce(this.addCart,600).bind(this),this.debounceQtyStepperExpand=this._commonService.debounce((e=>{this.qtyStepperExpandEmitter.emit(e)}),600).bind(this),this.debounceQtyStepperInfo=this._commonService.debounce((()=>{this.qtyStepperInfoEmitter.emit()}),600).bind(this),this.debouncedShowOrderAmendsToaster=this._commonService.debounce(((e,t)=>this.showOrderAmendsToaster(e,t)),500)}onFocusOutEvent(){this.timeouts.push(setTimeout((()=>{this.handleDisplay()}),100))}ngOnInit(){this.isCateringEnabled=!this._aemService.getFeatureFlagByNameDisable("isCateringDisabled"),this.isLBProduct="3"===this.product?.displayType&&("W"===this.product?.sellByWeight||"P"===this.product?.sellByWeight),this.isCarouselRedesign="carousel-v2"===this.calledBy,this.orderAmendsOTA="1P_OA"===this.configObj?.appName,this.isEcomEnabled=this._commonService.getIsEcomEnabled(this.product),this.isGuestAddToCartABSubscription=this._commonService.isABFlagDisabledEvent$.pipe(nn((e=>"isGuestAddToCartDisabled"===e.flagName))).subscribe((e=>{this.isGuestAddToCart=!("a"===e.testValue||this._userInfoService.isAuthorized()||this.configObj.programType&&"abs"!==this.configObj.programType),this.updateCTALabel(),"buyItAgainQsc"===this.calledBy&&this.doQuickStartCartInit(),this.getCurrentCartObj()})),this._commonService.listenToABXTestingFlag("abACIP295974","isGuestAddToCartDisabled","ACIP295974",300),this.checkAndUpdatePrebookSlotDrawerView()}updateCTALabel(){let e=!this._aemService.getFeatureFlagByNameDisable("isDigitalDeliDisabled"),t=!this._aemService.getFeatureFlagByNameDisable("isCustomCakesDisabled"),{isMtoProduct:i=!1,isCu
1stomizable:n=!1,multiCustomizations:r=!1}=this.product||{};if(this.isAuthorized||this.isGuestAddToCart){if(this.isPreorderElligible())return this.ctaLabel=Fse.PREORDER,void this.setBtnAttributes("preOrderButton_"+this.product.id,`${Fse.PREORDER} ${this.getProductFullName()}`,"preorderButton",`pc${this.product.id}Inpt`);if(this.orderAmendsOTA)return void(this.isLBProduct?this.ctaLabel=Fse.SELECTWEIGHT:(this.ctaLabel=Fse.ADDTOORDER,this.setBtnAttributes("addToOrderButton_"+this.product.id,`${Fse.ADDTOORDER} 1 unit of ${this.getProductFullName()}`,"addToOrderButton",`pc${this.product.id}Inpt`)));if(e||t){if(i&&this.isEcomEnabled&&this.isGuestAddToCart)return this.isDefaultCTA=!0,this.ctaLabel=Fse.SIGNIN,void this.setBtnAttributes("addButton_"+this.product.id,`${Fse.SIGNIN} ${this.isLBProduct?" weight of ":" 1 unit of "} ${this.getProductFullName()}`,"addbutton",`pc${this.product.id}Inpt`);if(i&&n||this.product.isCateringProduct||this.product.isCustomCake){if(!1===this.isEcomEnabled&&this.isCateringEnabled)return this.ctaLabel=Fse.TEMPORARILY_UNAVAILABLE,void this.setBtnAttributes("tempUnavailableButton_"+this.product.id,"Temporarily unavailable","","",!0);if(this.isEcomEnabled)return this.isDefaultCTA=!0,"buyItAgain"===this.calledBy||this.buyItAgainCarousel||this.parentCarousel?.find("[data-carousel-behaviour=buy-it-again-landing-category]").length?void this.addCTALabel():n?(this.ctaLabel=Fse.CUSTOMIZE,void this.setBtnAttributes("customizeButton_"+this.product.id,`${Fse.CUSTOMIZE} ${this.getProductFullName()}`,"customizebutton",`pc${this.product.id}Inpt`)):this.isLBProduct?void(this.ctaLabel=Fse.SELECTWEIGHT):void this.addCTALabel();if(r)return;return this.isLBProduct?void(this.ctaLabel=Fse.SELECTWEIGHT):void this.addCTALabel()}return this.isLBProduct?void(this.ctaLabel=Fse.SELECTWEIGHT):void this.addCTALabel()}this.isLBProduct?this.ctaLabel=Fse.SELECTWEIGHT:this.addCTALabel()}else this.ctaLabel=Fse.SIGNIN,this.setBtnAttributes("addButton_"+this.product.id,`${Fse.SIGNIN} ${this.isLBProduct?" weight of ":" 1 unit of "} ${this.getProductFullName()}`,"addbutton",`pc${this.product.id}Inpt`)}addCTALabel(){this.ctaLabel=Fse.ADD,this.setBtnAttributes("addButton_"+this.product.id,`${Fse.ADD} 1 unit of ${this.getProductFullName()}`,"addbutton",`pc${this.product.id}Inpt`),this.cdr.detectChanges()}setBtnAttributes(e,t,i,n,r){this.idAttribute=e,this.ariaLabelAttribute=t,this.dataQaAttribute=i,this.dataQtyIdAttribute=n,this.disabledAttribute=r||!1}ngAfterViewInit(){this.parentCarousel=$(this._elementRef.nativeElement).closest(".slick-product-carousel"),this.buyItAgainCarousel=this.parentCarousel?.find("[data-carousel-behaviour=buy-it-again]").length||this.parentCarousel?.find("[data-carousel-behaviour=buy-it-again-landing-category]").length,this.buyItAgainCarousel&&(this.isAuthorized||this.isGuestAddToCart)&&this.isDigitalDeliElgible()&&(this.isDefaultCTA=!0,this.addCTALabel())}enableListener(){this.globalClickUnlistener||(this.globalClickUnlistener=this.renderer.listen("document","click",(e=>{this.handleDocumentClick(e)})))}disableListener(){this.globalClickUnlistener&&(this.globalClickUnlistener(),this.globalClickUnlistener=null)}handleDocumentClick(e){let t=document.querySelector("#item-search-modal .modal-content");if(!t)return;let i=e.target;if(t.contains(i)&&"order-amends-ota"===this.toasterService.toasterRef?.ref?.instance?.data?.title){let e=this.toasterService.toasterRef?.ref?.instance?.data?.type===ere.Success;this.toasterService.toasterRef?.close(e)}}checkAndUpdatePrebookSlotDrawerView(){"prebook-slot-drawer"===this.calledBy&&this.updatePrebookData("prebook_slot_drawer")}updatePrebookData(e){if(this.showCartSlotModal=!0,this.prepTimeExceedsPrebook())this.cartSlotModalData=f(h({},this.cartModalConfig[e]),{isMoreTimePrepare:!0});else{let{shortFormat:t,longFormat:i}=this._productUtilService.formatTimeSlots("abSlot");this.cartSlotModalData=f(h({},this.cartModalConfig[e]),{isAvaialableTime:!0,preBookShortTime:t,preBookLongTime:i})}}ngOnDestroy(){this.timeouts.forEach((e=>{clearTimeout(e),this.timeouts=[]})),this.isGuestAddToCartABSubscription&&this.isGuestAddToCartABSubscription.unsubscribe(),this.subscriptions&&this.subscriptions.unsubscribe(),this.disableListener()}handleDisplay(){null!==this._elementRef.nativeElement.querySelector(":focus")||(this.isLBProduct?this.toggleDisplayWeights(!1):(this.displayBubble=!0,this.updateState.show=!1))}addCart(e){return v(this,null,(function*(){this.loadingSpinner=!0,0===e?this._removeProduct():(this.isGuestAddToCart||(yield this._handleAutoClip()),this._cartAPICall(e))}))}_handleAutoClip(){return v(this,null,(function*(){if(!this._commonService.isFeatureEnabled("isAutoClipABTestEnabled"))return void this._clipDigitalCoupon();let t="ACIP585422";try{if(!e._xerCache.has(t)){let i=yield this._commonService.getExperimentIdData(t,!1);e._xerCache.set(t,i??null)}let i=e._xerCache.get(t),n=i?.eligible||!1,r=i?.group;(!n||"A"===r||!r)&&this._clipDigitalCoupon()}catch{this._clipDigitalCoupon()}}))}
1_clipDigitalCoupon(){this._productCouponService.clipDigitalCoupon(this.product.upc)}getCurrentCartObj(){let e=this._commonService.currentCartObj,t=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId);e=e.pipe(bi((e=>this.cartV2Service.fetchCartDetailsFromResponse(e,t)))),e.subscribe((e=>{"buyItAgainQsc"!==this.calledBy?this.handleDefaultCartUpdate(e):"buyItAgainQsc"===this.calledBy&&this.handleQscCartUpdate(e)}))}handleDefaultCartUpdate(e){let t=0,i=[];try{let n={};if(n=e?.cartItems?.find((e=>e.itemId==this.product.id)),n){let e=n.qty??n.quantity;t=this.isLBProduct?n.selectedWeight??e:e,i=n.incrementPriceList??[],this.product.maxPurchaseQty=n?.maxPurchaseQty,this.entryId=n?.entryId}else t=0,i=[],this.entryId=null;t=t>0?t:0}catch{t=0,i=[]}this.isDigitalDeliElgible()||this._commonService.isEligibleCustomCakeProduct(this.product)?this.product.quantity=0:(this.product.quantity=t,this.previousQuantity=t,this.weightList=i,this.selectedWeight=t),"qtyStepperExpand"===this.calledBy&&(this.product.quantity=this.qtyStepperOptions?.quantity??(this.isLBProduct?parseFloat(this.product.incrementPriceList[0].weight):1));let n=this._commonService.orderAmendsCurrentOrderData;if(this.orderAmendsOTA&&n&&!this._commonService.isEmpty(n.orderItems)){let e=n.orderItems.find((e=>e.bpnNum===this.product.id)),t=this.isLBProduct?parseFloat(e?.orderedWeight??"0"):e?.quantity??0;this.product.quantity=t,this.selectedWeight=t,this.previousQuantity=t,this.weightList=this.isLBProduct?this.product.incrementPriceList?.filter((e=>parseFloat(e.weight)>=this.selectedWeight)):this.weightList}let r=this.orderAmendsOTA?"added to order":"in cart";if(this.isLBProduct&&!this.isDefaultCTA&&!1!==this.isEcomEnabled)this.ctaLabel=0!=this.selectedWeight?`${this.selectedWeight?.toFixed(2)} lb`:"Select wt",this.quantityAriaLabelMessage=`${this.selectedWeight} lb of ${this.product.name} ${r}. Click to update`;else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=`${this.product.quantity} ${e} of ${this.product.name} ${r}. Click to update`}}handleQscCartUpdate(e){let t=0,i=e?.cartItems?.find((e=>e.itemId==this.product.id));if(i)if(t=this.isLBProduct?i.selectedWeight??i.qty??i.quantity:i.qty??i.quantity,this.isLBProduct?this._quickAddBasketService.setQuickAddBasketItemWeight(this.product.id,t):this._quickAddBasketService.setQuickAddBasketItemQuantity(this.product.id,t),this.product.quantity=t,this.previousQuantity=t,this.selectedWeight=t,this.isLBProduct)this.ctaLabel=0!=this.selectedWeight?`${this.selectedWeight?.toFixed(2)} lb`:"Select wt",this.quantityAriaLabelMessage=this.selectedWeight+" lb of "+this.product.name+" selected in your quick start cart. Click to update";else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=this.product.quantity+` ${e} of `+this.product.name+" selected in your quick start cart. Click to update"}}doQuickStartCartInit(){if(void 0!==this._quickAddCheckboxService&&(this.quickAddCheckboxState$=this._quickAddCheckboxService.isChecked$,this.subscriptions.add(this.quickAddCheckboxState$.subscribe((e=>{this.handleStepperStateOnCheckboxChange(e)})))),this.isLBProduct?(this.product.quantity=Number(this._quickAddBasketService.getQuickAddBasketItemWeight(this.product.id)),this.weightList=this.product.incrementPriceList??[]):this.product.quantity=this._quickAddBasketService.getQuickAddBasketItemQuantity(this.product.id),this.selectedWeight=this.product.quantity,this.previousQuantity=this.product.quantity,this.displayBubble=!0,this.isLBProduct)this.quantityAriaLabelMessage=this.selectedWeight+" lb of "+this.product.name+" selected in your quick start cart. Click to update",this.ctaLabel=0!=this.selectedWeight?`${this.selectedWeight?.toFixed(2)} lb`:"Select wt";else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=this.product.quantity+` ${e} of `+this.product.name+" selected in your quick start cart. Click to update"}}handleStepperStateOnCheckboxChange(e){this.isCheckboxChecked=e,0==this.displayBubble&&0==e&&(this.displayBubble=!0)}getProductFullName(){let e="";return this.product&&(e=this.product.fullName&&this.product.fullName.length?this.product.fullName:this.product.name),e}_updateAnalyticsProductInfo(e){if(window.AB?.DATALAYER){let t=!this.isLBProduct&&!!this._elementRef.nativeElement.closest("cross-sell"),i=this._elementRef.nativeElement.closest(".slick-product-carou
1sel")?.querySelectorAll('[data-carousel-behaviour="bia-crossSell"]')?.length,n=this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelectorAll('[data-carousel-behaviour="bia-spaCarousel"]')?.length,r="";r=this.stpprDataObj?.carouselTitle?this.stpprDataObj.carouselTitle:i?this._elementRef.nativeElement.closest("cross-sell")?.querySelector(".cross-sell__header .cross-sell__title")?.textContent:n?this._elementRef.nativeElement.closest(".bia-spa-carousel-container")?.querySelector(".bia-spa-carousel-container-header")?.textContent?.trim():this._elementRef.nativeElement.closest(".master-product-carousel")?this._elementRef.nativeElement.closest(".master-product-carousel").querySelector("[data-carousel-title]")?.getAttribute("data-carousel-title"):window.AB.DATALAYER.isDFTAPage()?this._elementRef.nativeElement.closest(".slick-product-carousel")?.previousElementSibling?.textContent?.trim()||"":this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("lazy-wrapper")?.getAttribute("data-carousel-title")||this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector(".carousel-header-text")?.textContent?.trim()||this._elementRef.nativeElement.closest(".slick-product-carousel")?.querySelector("targeted-wrapper")?.getAttribute("data-carousel-title");let s={id:this.product.id||this.product.itemId,adobeMetricA:this.product.adobeMetrics?.metricA,adobeMetricC:this.product.adobeMetrics?.metricC,fullName:this.product.fullName,name:this.product.name,units:this._commonService.checkPendingOrder()?this.product.quantity:this.product.qty,unitType:this.product.unitQuantity,lbs:"0",each:"0",pricePerUnit:this.product.pricePer,listPrice:this.product.price?this.product.price.toString():"",carouselSection:r,basePrice:this.product.basePrice?this.product.basePrice.toString():"",pricingType:this.product.promoType,couponFlag:"0",couponClipped:"0",couponID:"",aisleId:this.product.aisleId,upc:this.product.upc,isCrossSell:t,isMTO:this.product.isMtoProduct,departmentName:this.product.departmentName,pathwaysWidget:this.stpprDataObj?.pathwaysWidget,sellerId:e||this.product.sellerId,sellerName:this.product.sellerName,editOrderFlow:!!this._commonService.checkPendingOrder(),snapEligible:this.product.snapEligible,isProductTrackingDisabled:!!this.product.isProductTrackingDisabled,isP13nGrid:!!this._elementRef.nativeElement.closest("#p13nProductGrid"),quantity:this.product.quantity,previousPrice:this.analyticsPreviousPrice,isPriceDecreased:this.analyticsIsPriceDecreased,badges:this.product.badges,isPreOrderItem:this.isPreorderElligible(),isOrderAmendsFlow:this.orderAmendsOTA,containsAlcohol:this.product.containsAlcohol,featured:this.product.featured,isCustomCake:this.product.isCustomCake};"LB"==this.product.unitQuantity?s.lbs=this.selectedWeight:"EACH"==this.product.unitQuantity&&(s.each=this.product.quantity?this.product.quantity.toString():this.product.qty?.toString());let a=[];if(a.length>0){let e=a.filter((e=>"C"===e.status)).length,t=a.length,i=a.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString();s.couponFlag=t.toString(),s.couponClipped=e.toString(),s.couponID=i}let o,l,c=!1,d=!1;if(r){let e=this.parentCarousel.find("[data-carousel-driven=pathway-search]").length,t=this.parentCarousel.find("[data-carousel-driven=p13n-generic]").length;s.isBIACarousalProduct=!!this.parentCarousel.find("[data-carousel-behaviour=bia-spaCarousel]").length,o=!!this.buyItAgainCarousel,l=!!e,c=-1!==r.search(/picks for you|picked for you|picks-for-you|picked-for-you/i),d=!!t,s.placement=window.AB.DATALAYER.setPlacementInfoCarouselItems(this._elementRef.nativeElement)}let u={isCrossSell:t,isRecommended:this.stpprDataObj?.isRecommended||c||d,isSponsored:this.product.featured,isPastPurchased:o||this.product.pastPurchased,isBrPathway:l};(this.product.adId||this.product.eventTracking)&&(u.isSponsored=!0),window.AB.DATALAYER.recommendationInfo(u),window.AB.DATALAYER.productInfo(s),r?window.AB.DATALAYER.isRecipesPage()?window.AB.DATALAYER.setCarouselName(`recipes|${r}`):window.AB.DATALAYER.setCarouselName(`shop|${r}`):window.AB.DATALAYER.setCarouselName(""),window.AB.DATALAYER.isPdp()&&(r?window.AB.DATALAYER.setPageFilterMetaInfo(!1):window.AB.DATALAYER.setPageFilterMetaInfo(!0))}}setAnalyticsSNSProdAction(e){"1P_SNS"===this.configObj?.programType&&localStorage.setItem("analyticsSNSProdAction",e)}setAnalyticsProductAction(){if(window.AB?.DATALAYER){let e=this.product.id||this.product.itemId;if(window.AB.DATALAYER.isProductInAnalyticsCart(e))switch(window.AB.DATALAYER.weightSelectionActionType(e,this.selectedWeight)){case"increase":this.increaseQuantityAnalytics=!0;break;case"decrease":this.decreaseQuantityAnalytics=!0}else this.addItemToCartAnalytics=!0}}extractUpcids(e){let t=[];return e?.items&&(this.customizationData?.items?.[0]?.customizations||[])?.forEach((e=>{e?.options?.forEach((e=>{e?.upcId&&"1"===e?.channelInventory?.[this.reservedTimeIntent]&&t.push(e.upcId)}))})),t}extractUpcidQty(e){let t=[];
1return e?.items&&(e?.items?.[0]?.customizations||[]).forEach((e=>{(e?.options||[]).forEach((e=>{let i=e?.upcId,n=e.quantity||0;"string"==typeof n&&(n=Number(n)),i&&"1"===e?.channelInventory?.[this.reservedTimeIntent]&&(n>0?t.push({upcId:i,qty:n}):t.push({upcId:i}))}))})),t}_cartAPICall(e){let t=JSON.parse(localStorage.getItem("cartId"));this.cartV2Service.addOrUpdateProductQuantity(this.product,this.product.id,this.isLBProduct?e.toString():e,!1,this.product.sellerId,this.isLBProduct,void 0,this.configObj,this.isGuestAddToCart,this.qtyStepperOptions??(this.customizationData?.items?.length>0&&(this.isCateringEnabled?{options:this.extractUpcidQty(this.customizationData),isValid:!0,comments:this.customizationData?.items?.[0]?.preferences||""}:{modifierOptionUPCs:{isValid:!0,upcs:this.extractUpcids(this.customizationData)}})),this.entryId,this.configObj?.dnfFlagOverride?.enableSelectiveCartDfta).subscribe((e=>{if(e)if(e.errorCode)this.orderAmendsOTAQtyOnRequestFailure=this.product.quantity,this.product.quantity=this.previousQuantity,this.selectedWeight=this.previousQuantity,this.updateState.show=!1,this.loadingSpinner=!1,this.isQuantityIncreased=!1,this.orderAmendsOTA&&this.showOrderAmendsToaster("error",null,e);else{let i=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId);this.customizationData?.items?.length>0&&this.handleCloseCartSlotModalData(),this.isQuantityIncreased&&(this.showPriceChangeToast(this.isQuantityIncreased,e),this.isQuantityIncreased=!1),"1P_SNS"===this.configObj?.programType?this.callSNSSuccessDispatch():!this.orderAmendsOTA&&"1P_SNS"!==this.configObj?.programType&&this.cartService.refreshCart(e,i),this.orderAmendsOTA&&(this.setFocusOnQuantityInfoButton(),this.loadingSpinner=!1,this.updateState.show=!1,this.previousQuantity=this.product.quantity);let n=this.cartV2Service.fetchCartDetailsFromResponse(e,i);if(n&&(n.cartId||n.guestCartId)&&n.cartItems){if(this._commonService.sendSponsoredProductClickEvent(this.product,"quantityStepper","addToCart"),this.enableAdRelevanceTracking&&!this.isCarouselRedesign&&this._commonService.recordRelevanceImpression(this.product,"quantityStepper","addToCart"),n=this.cartV2Service.handleResponseForPendingOrder(n),this.loadingSpinner=!1,this.updateState.show=!1,this.isLBProduct?this.focusQtyDropdownBtn():this.handleReturnFocusForQtyStppr(),window.AB.DATALAYER){let t=this.product.sellerId?this.product.sellerId:"1P_WINE"===n.cartCategory?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsProductInfo(t),window.AB.DATALAYER.updateCartType(""),window.AB.DATALAYER.updateCart(e,this.product,e.isWYSIWYGEnabled),this.addItemToCartAnalytics?(window.AB.DATALAYER.addItemToCart(),this.addItemToCartAnalytics=!1):this.increaseQuantityAnalytics?(window.AB.DATALAYER.increaseItemQuantity(),this.increaseQuantityAnalytics=!1):this.decreaseQuantityAnalytics&&(window.AB.DATALAYER.decreaseItemQuantity(),this.decreaseQuantityAnalytics=!1)}("customize-drawer"===this.calledBy||"prebook-slot-drawer"===this.calledBy)&&this._commonService.resetCustomizationData(),this.showCartSlotModal&&this.handleClosePrebookModal(this.cartSlotModalData.modalId,this.cartSlotModalData.type,!1),this.isPrebookRedirect&&this.redirectToPrebookPage(),this.product.sellerId&&"mkp-carousel"!==this.configObj?.programType?this.showMkpAddToCartModal(this.product.sellerId,this.product.sellerName,this.product.price,t):"wineshop"===this.configObj?.programType&&this.showStaticFirstTimeCartModal("1P_WINE",t)}"customize-drawer"===this.calledBy&&(this.qtyStepperOptions?.isCustomizationEditFlow?"MINI-CART"===this.qtyStepperOptions?.customizationEditSource?(window.rightdrawerCompAlRef?.component.closeDrawer(),setTimeout((()=>{let e=new URL(window.location.href);["src","entryId","pgm","action"].forEach((t=>e.searchParams.delete(t))),window.history.replaceState(null,"",e.toString()),window.rightdrawerCompAlRef?.component&&(window.rightdrawerCompAlRef.component.customizationDetails={flowType:"default",src:"",entryId:null}),window.rightDrawerComp?.openRightFlyout("mini-cart")}),400)):window.location.href="/erums/cart":window.rightdrawerCompAlRef?.component.closeDrawer())}this.orderAmendsOTA||this.handleCloseCartSlotModalData({type:"success"})}),(e=>{console.error("Error while calling Cart API: "+e.message),this.orderAmendsOTAQtyOnRequestFailure=this.product.quantity,this.product.quantity=this.previousQuantity,this.selectedWeight=this.previousQuantity,this.updateState.show=!1,this.loadingSpinner=!1,this.isQuantityIncreased=!1,this.orderAmendsOTA?this.showOrderAmendsToaster("error",null,e):this.isLBProduct?(this.ctaLabel=0!=this.selectedWeight?`${this.selectedWeight?.toFixed(2)} lb`:"Select wt",this.focusQtyDropdownBtn()):this.handleReturnFocusForQtyStppr(
1)}))}_showSignInModal(e){let t=encodeURIComponent(window.location.href);if(window.SWY.CONFIGSERVICE.setCookie("ECommRedirectURL",t,0),e&&"weeklyAd"===e?.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj)+window.AB.signInLinkPath,t=window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.trackWeeklyAdIcmpid&&window.AB.DATALAYER.trackWeeklyAdIcmpid("sign-in-to-add",e)||"";window.location.assign(e+`${t}`)}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}_removeProduct(){this.cartV2Service.removeProduct(this.product,this.product.id,this.product.sellerId,this.configObj,this.isGuestAddToCart,this.entryId,this.configObj?.dnfFlagOverride?.enableSelectiveCartDfta).subscribe((e=>{let t=this.cartV2Service.getCartName(this.configObj?.programType,this.product.sellerId);if(e){"1P_SNS"===this.configObj?.programType?this.callSNSSuccessDispatch():this.cartService.refreshCart(e,t);let i=this.cartV2Service.fetchCartDetailsFromResponse(e,t);if(this._commonService.sendSponsoredProductClickEvent(this.product,"quantityStepper","removeProduct"),i=this.cartV2Service.handleResponseForPendingOrder(i),this.loadingSpinner=!1,window.AB.DATALAYER){let n=this.product.sellerId?this.product.sellerId:"1P_WINE"===i.cartCategory||"1P_WINE"===t?"22222222":window.AB.DATALAYER.getBannerSellerId();this._updateAnalyticsProductInfo(n),window.AB.DATALAYER.updateCartType(""),window.AB.DATALAYER.updateCart(e,null,e.isWYSIWYGEnabled),this.removeItemFromCartAnalytics&&(window.AB.DATALAYER.removeItemFromCart(),this.removeItemFromCartAnalytics=!1)}}}),(e=>{console.error("Error while calling Cart API: "+e.message),this.product.quantity=this.previousQuantity,this.selectedWeight=this.previousQuantity,this.loadingSpinner=!1,this.displayBubble=!1,this.isLBProduct?(this.ctaLabel=`${this.selectedWeight?.toFixed(2)} lb`,this.focusQtyDropdownBtn()):this.timeouts.push(setTimeout((()=>{this.decreaseBtn?.nativeElement.focus()}),100))}))}
1showQtyStepper(){this.displayBubble=!1,this.updateState.show=!1,this.timeouts.push(setTimeout((()=>{this.qtyInfoBtn?.nativeElement.focus()}),100))}updateLoadingMessage(e){e&&e!==this.previousQuantity&&(this.stepperAnnouncement=`quantity content ${e} loading`,setTimeout((()=>{this.stepperAnnouncement=""}),3e3))}handleRefresh(){this.cartSlotModalData=f(h({},this.cartSlotModalData),{isLoading:!0}),this.fetchAndHandleCustomizations((()=>{this.showCartSlotModal=!0,this.cartSlotModalData=this.cartModalConfig.product_customization_modal,this.refreshCount=0}),(()=>{this.handleCloseCartSlotModalData(),this.redirectToProductDetailsPage()}),(()=>{this.cartSlotModalData=f(h({},this.cartSlotModalData),{isLoading:!1}),this.refreshCount++,3===this.refreshCount&&(this.handleCloseCartSlotModalData(),this.refreshCount=0,this.redirectToProductDetailsPage())}))}startCustmization(){this.handleCloseCartSlotModalData(),this.redirectToProductDetailsPage()}handleModifyPreviousCustomization(){this.handleCloseCartSlotModalData(),this.redirectToProductDetailsPage({src:"bia",pgm:"1p_deli",action:"edit"})}redirectToProductDetailsPage(e){let t=this.product?.name&&this._commonService.isSeoEnabled()?this._commonService.buildSeoPdpUrl(this.product.fullName||this.product.name,this.product.id):this._commonService.getProductDetailPath();if(t&&(t=t.replace("(bpn)",this.product.id),e)){let i=new URLSearchParams(e).toString();i&&(t+=`?${i}`)}window.location.href=t}handleAddAnywayAction(e){this.handlePrebookAction("choose-time-later","dd-prebook-modal",e,!1)}handleAddItemAndUpdateSlot(e){this.handlePrebookAction("reserve-new-time","dd-prebook-modal",e,!0)}handlePrebookAction(e,t,i="",n){this.handleSlotAction(e,t,i,n)}beforeCartAction(e,t,i){let n=!this._aemService.getFeatureFlagByNameDisable("isDigitalDeliDisabled");if(this.isAuthorized||this.isGuestAddToCart&&!(n&&this.product.isMtoProduct&&this.isEcomEnabled)){let n=this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0,r=()=>{if(["delivery","dug"].includes(n?.toLowerCase())){if("preorder"===e)this.isPreorderElligible()&&(void 0===this.product.quantity||this.product.quantity<1)&&!this.product?.isCustomizable||this.isPreorderElligible()&&"customize-drawer"===this.calledBy?this.openPreorderModal():this.product?.isCustomizable&&this.isPreorderElligible()&&this.redirectToProductDetailsPage();else if("increase"===e){let i=this.isDigitalDeliElgible();console.warn("Product Quantity",this.product.quantity),console.warn("Product Qty",this.product.qty),!i&&this.product.isMtoProduct?this.prepTimeExceedsPrebook()&&!this._commonService.byPassReserveSlotCheck(this.product)?(this.showCartSlotModal=!0,this.cartSlotModalData=this.cartModalConfig.mto):this.performCartAction(e,t):i&&(this.buyItAgainCarousel||["buyItAgain","buy-it-again"].includes(this.calledBy))?this.fetchAndHandleCustomizations((()=>{this.showCartSlotModal=!0,this.cartSlotModalData=this.cartModalConfig.product_customization_modal}),(()=>{this.redirectToProductDetailsPage()}),(()=>{this.showCartSlotModal=!0,this.cartSlotModalData=this.cartModalConfig.previous_customizations_error})):i&&"customize-drawer"===this.calledBy?this.qtyStepperOptions.options.length>0&&this.qtyStepperOptions.isValid||this.qtyStepperOptions.modifierOptionUPCs.upcs.length>0&&this.qtyStepperOptions.modifierOptionUPCs.isValid?this.checkAndInitializePrebookSlotDrawer(e,t):this.debounceQtyStepperInfo():this.performCartAction(e,t)}else if("decrease"===e)this.performCartAction(e,t);else if("weighted"===e)this.performCartAction(e,t,i);else if("update"===e)this.performCartAction(e,t);else if("customize"===e){if(window.AB&&window.AB.DATALAYER&&this._commonService.isSearchPage()){window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections.join(":")}|button|customize-cake`);let e={isPastPurchased:this.product?.pastPurchased,isSponsored:this.product?.featured};window.AB.DATALAYER.setPfmDetailProductItemToPDP(this._elementRef.nativeElement,this.product,e)}this.redirectToProductDetailsPage()}}else"J4U"===n&&(window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections.join(":")}|link|add-to-cart`),window.storeFulfillmentModal.component.setModalDisplayData(2))};this.isGuestAddToCart?r():this._commonService.validateSession(r)}else"increase"===e&&window.eddlLoadComplete&&window.AB.DATALAYER.setATCFlag(!0),this._showSignInModal(this.configObj)}openPreorderModal(){let e=this.product.itemEffectiveStartDate,t="preOrderButton";if(this._commonService.preparationTimeExceedsPrebook(this.product,"abSlot")){let i="dug"===this._userInfoService.getPreference()?.toLowerCase()?"pickup":"delivery";this.cartSlotModalData=f(h({},this.cartModalConfig.preorder_slot),{itemEffectiveStartDate:e,preference:i,ctaRefId:t})}else this.cartSlotModalData=f(h({},this.cartModalConfig.preorder),{itemEffectiveStartDate:e,ctaRefId:t});this.showCartSlotModal=!0}prepTimeExceedsPrebook(){return localStorage.getItem("abSlot")&&this._commonService.preparationTimeExceedsPrebook(this.product,"abSlot")}isSelectedSlotNotWithInDeliHours(){return!this._productUtilService.isSlotValidAtCurrentTime(window.AB?.storeFlagsData?.flags?.departmentsDetail,"Deli","abSlot")}
1checkAndInitializePrebookSlotDrawer(e,t){if(this.prepTimeExceedsPrebook()||this.isSelectedSlotNotWithInDeliHours()){window.rightDrawerComp.closeDrawer();let e={type:"prebook-slot",product:this.product,qtyStepperOptions:this.qtyStepperOptions,triggeredElement:"customize-drawer",configObj:this.configObj};setTimeout((()=>{this._commonService.rightDrawerSource.next(e)}),400)}else this.performCartAction(e,t)}performCartAction(e,t,i){"buyItAgainQsc"===this.calledBy?this.handleQscCartAction(e,t,i):"customize-drawer"===this.calledBy&&(this.qtyStepperOptions.options.length>0&&!this.qtyStepperOptions.isValid||this.qtyStepperOptions.modifierOptionUPCs.upcs.length>0&&!this.qtyStepperOptions.modifierOptionUPCs.isValid)?this.debounceQtyStepperInfo():this.handleGeneralFlowCartAction(e,t,i)}fetchAndHandleCustomizations(e,t,i){let n=this.product?.id,r=this._userInfoService.getShopStoreId();n&&r&&this.cartV2Service.getPrefCustomizations(n,r).subscribe({next:i=>{this.customizationData=i,i?.items?.[0]?.customizations?.length>0?e():t()},error:e=>{e&&i&&i()}})}isPreorderElligible(){let{isPreOrderItem:e}=this.product||{};return e&&(!this.configObj?.programType||["abs","1P_B2B"].includes(this.configObj?.programType))}isDigitalDeliElgible(){let e=!this._aemService.getFeatureFlagByNameDisable("isDigitalDeliDisabled"),{isMtoProduct:t=!1,isCustomizable:i=!1}=this.product||{};return e&&this.isEcomEnabled&&t&&i}handleGeneralFlowCartAction(e,t,i){if("increase"===e&&(this.isQuantityIncreased=!0,"qtyStepperExpand"===this.calledBy?this.isLBProduct?this.updateWeightedProductQuantity(e):this.product.quantity=this.product.quantity?this.product.quantity+1:1:this.product.quantity=this.qtyStepperOptions?.quantity??(this.product.quantity?this.product.quantity+1:1),this.displayBubble=!1,1===this.product.quantity||"customize-drawer"===this.calledBy?(this.addFocusToSpinnerBlock(),this.addItemToCartAnalytics=!0,this.setAnalyticsSNSProdAction("add-item")):(this.refocusButton=t?t.currentTarget:null,this.increaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-increase"))),"decrease"===e&&!this.orderAmendsOTA&&(this.isLBProduct&&"qtyStepperExpand"===this.calledBy?this.updateWeightedProductQuantity(e):this.product.quantity=this.product.quantity-1,0===this.product.quantity?(this.refocusButton=null,this.timeouts.push(setTimeout((()=>{this.addBtn?.nativeElement.focus()}),100)),window.AB.DATALAYER&&(this.removeItemFromCartAnalytics=!0,this.setAnalyticsSNSProdAction("remove-item"))):(this.refocusButton=t?t.currentTarget:null,this.decreaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-decrease"))),"weighted"===e&&(this.toggleDisplayWeights(!1),null==i||isNaN(i)?(this.orderAmendsOTA||(this.selectedWeight=0,this.ctaLabel="Select wt"),this.removeItemFromCartAnalytics=!0,this.focusQtyDropdownBtn()):(this.selectedWeight<parseFloat(this.weightList[i].weight)&&(this.isQuantityIncreased=!0),this.selectedWeight=parseFloat(this.weightList[i].weight),this.ctaLabel=`${this.selectedWeight?.toFixed(2)} lb`,this.setAnalyticsProductAction()),this.product.quantity=this.selectedWeight),"update"===e){this.updateState.input??=0;let e=this.orderAmendsOTA&&this.updateState.input<this.product.quantity;this.updateState.input>this.product.quantity?(this.isQuantityIncreased=!0,this.addFocusToSpinnerBlock(),this.increaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-increase")):this.updateState.input<this.product.quantity&&!e&&(0===this.updateState.input?(this.refocusButton=null,this.timeouts.push(setTimeout((()=>{this.addBtn?.nativeElement.focus()}),100)),window.AB.DATALAYER&&(this.removeItemFromCartAnalytics=!0,this.setAnalyticsSNSProdAction("remove-item"))):(this.addFocusToSpinnerBlock(),this.decreaseQuantityAnalytics=!0,this.setAnalyticsSNSProdAction("quantity-decrease"))),e||(this.product.quantity=this.updateState.input)}if(!this.isLBProduct&&this.product.maxPurchaseQty&&this.product.quantity>this.product.maxPurchaseQty&&(this.product.quantity=this.product.maxPurchaseQty),this.isLBProduct&&this.product.maxWeight&&this.product.quantity>Number(this.product.maxWeight)&&(this.product.quantity=Number(this.product.maxWeight)),"qtyStepperExpand"===this.calledBy)this.debounceQtyStepperExpand(this.product.quantity);else if(this.orderAmendsOTA){if(this.displayBubble=!0,this.updateState.show=!1,this.enableListener(),window.AB.DATALAYER){this._updateAnalyticsProductInfo(),window.AB.DATALAYER.updateCartType("");let e=[...this._commonService.orderAmendsCurrentOrderData?.orderItems??[]],t=this._commonService.isEmpty(e)?[]:[...e,this.cartV2Service.getOrderItem(this.product,this.product.quantity)].map((e=>f(h({},e),{isFound:!0,price:e.itemTotal,id:e.bpnNum,name:e.itemName,totalPrice:e.itemTotal})));window.AB.DATALAYER.updateCart({cartCategory:"1P",isWYSIWYGEnabled:!0,selectiveCart:!1,orderItems:t},this.product);let i=e.some((e=>e.bpnNum===this.product.id&&!e.isNewlyAdded));this.addItemToCartAnalytics||!i&&this.increaseQuantityAnalytics?(window.AB.DATALAYER.addItemToCart(),this.addItemToCartAnalytics=!1,this.increaseQuantityAnalytics=!1):this.increaseQuantityAnalytics&&(window.AB.DATALAYER.increaseItemQuantity(),this.increaseQuantityAnalytics=!1)}if(this.debouncedShowOrderAmendsToaster(e,i),this.isLBProduct)this.quantityAriaLabelMessage=this.selectedWeight+" lb of "+this.product.name+" added to order. Click to update";else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=this.product.quantity+` ${e} of `+this.product.name+" added to order. Click to update"}}else this.updateLoadingMessage(this.product.quantity),this.debounceAddCart(this.product.quantity)}focusOnPreviousButton(){let e;return e=this.isLBProduct?`qtyDropdownBtn_${this.product.id}`:0===this.product.quantity?`addToOrderButton_${this.product.id}`:this.displayBubble?`bubble_qtyInfo_${this.product.id}`:`qtyInfo_${this.product.id}`,e}
1showOrderAmendsToaster(e,t,i){this.toasterService.toasterRef&&this.toasterService.toasterRef.ref&&this.toasterService.toasterRef.ref.instance&&(this.toasterService.toasterRef?.close(!1),this.toasterService.toasterRef=null);let n=this.focusOnPreviousButton(),r="weighted"===e&&null!=t&&!isNaN(t),s="update"===e&&this.updateState.input>this.previousQuantity,a="update"===e&&this.updateState.input<this.previousQuantity,o="weighted"===e&&null==t;if("increase"===e||r||s){let e=this.previousQuantity;this.toasterService.show({title:"order-amends-ota",message:ire.formatRemoveActionMessage(this.product.quantity,this.product.name,this.product.restrictedValue&&this.product.restrictedValue>0),type:ere.Success,interactiveElement:tre.REMOVE_CTA,autoCloseTime:5e3,prevIdToFocus:n},{class:"popup--toaster--right"},(t=>t===tre.REMOVE_CTA?this.handleRemoveActionCTA(e):this.addCart(this.product.quantity)),!0)}else if("decrease"===e||o||a)this.toasterService.show({title:"order-amends-ota",message:tre.GOTOCHAT_MSG,type:ere.Info,prevIdToFocus:n,interactiveElement:tre.GOTOCHAT_CTA},{class:"popup--toaster--right"},null,!0);else if("error"===e){let{message:e,cta:t}=ire.getErrorMessageBasedOnErrorCode(i);this.toasterService.show({title:"order-amends-ota",message:e,type:ere.Error,interactiveElement:t,prevIdToFocus:n},{class:"popup--toaster--right"},(()=>this.addCart(this.orderAmendsOTAQtyOnRequestFailure)),!0)}}handleRemoveActionCTA(e=this.previousQuantity){this.toasterService.toasterRef.close(),this.toasterService.toasterRef=null,this.product.quantity=e,this.loadingSpinner=!1,this.isQuantityIncreased=!1;let t=this.focusOnPreviousButton();this.toasterService.show({title:"order-amends-ota",message:tre.REMOVE_ITEM,type:ere.Success,prevIdToFocus:t},{class:"popup--toaster--right"},null,!0)}setFocusOnQuantityInfoButton(){if(this.isLBProduct)this.quantityAriaLabelMessage=this.selectedWeight+" lb of "+this.product.name+" selected in your quick start cart. Click to update";else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=this.product.quantity+` ${e} of `+this.product.name+" selected in your quick start cart. Click to update"}setTimeout((()=>{this.qtyInfoBtn?.nativeElement.focus()}),0)}updateWeightedProductQuantity(e){let t=this.product.incrementPriceList.findIndex((e=>+e.weight==+this.product.quantity));if(-1===t||"decrease"===e&&0===t||"increase"===e&&t===this.product.incrementPriceList.length-1){if("decrease"===e)return void(this.product.quantity=parseFloat(this.product.incrementPriceList[0].weight));if("increase"===e)return void(this.product.quantity=parseFloat(this.product.incrementPriceList[this.product.incrementPriceList.length-1].weight))}"increase"===e&&t<this.product.incrementPriceList.length-1?this.product.quantity=parseFloat(this.product.incrementPriceList[t+1].weight):"decrease"===e&&t>0&&(this.product.quantity=parseFloat(this.product.incrementPriceList[t-1].weight))}handleCloseCartSlotModalData(e){this.showCartSlotModal=!1,this.cartSlotModalData={},this.refreshCount&&(this.refreshCount=0),$(".modal-backdrop")?.remove(),$("body")?.removeClass("modal-open"),$(".modal")?.modal("hide"),setTimeout((()=>{"success"===e?.type&&$(`#bubble_qtyInfo_${this.product.id}`)?.focus(),e?.ctaRefId&&$(`#${e.ctaRefId}_${this.product.id}`)?.focus()}),100),this.cdr.detectChanges()}handleAddItemFromPreviousCustomization(){this.isDigitalDeliElgible()&&(this.prepTimeExceedsPrebook()||this.isSelectedSlotNotWithInDeliHours())?(this.handleCloseCartSlotModalData(),this.updatePrebookData("prebook_modal")):this.handleGeneralFlowCartAction("increase",null)}handlePreorderItem(){this.performCartAction("increase",null)}handleQscCartAction(e,t,i){if(void 0!==this._quickAddCheckboxService&&null!==this._quickAddCheckboxService){switch(e){case"increase":this.isQuantityIncreased=!0,this.product.quantity+=1;break;case"decrease":1==this.product.quantity?(this._quickAddCheckboxService.setCheckboxState(!1),this._quickAddBasketService.updateQuickAddBasketSelectedProperty(this.product.id,!1)):this.product.quantity>1&&(this.product.quantity-=1);break;case"update":this.updateState.input??=0,this.updateState.input>=this.product.quantity?(this.isQuantityIncreased=this.updateState.input!=this.product.quantity,this.product.quantity=this.updateState.input,this.updateState.show=!1,setTimeout((()=>{this.qtyInfoBtn?.nativeElement.focus()}),0)):this.updateState.input<this.product.quantity&&(0===this.updateState.input?
1(this.product.quantity=1,this._quickAddCheckboxService.setCheckboxState(!1),this._quickAddBasketService.updateQuickAddBasketSelectedProperty(this.product.id,!1),this.updateState.show=!1):(this.updateState.show=!1,setTimeout((()=>{this.qtyInfoBtn?.nativeElement.focus()}),0)));break;case"weighted":this.toggleDisplayWeights(!1),null==i||isNaN(i)?(this._quickAddBasketService.setQuickAddBasketSelectedProperty(this.product.id,!1),this._quickAddCheckboxService.setCheckboxState(!1)):(this.selectedWeight<parseFloat(this.weightList[i].weight)&&(this.isQuantityIncreased=!0),this.selectedWeight=parseFloat(this.weightList[i].weight),this.ctaLabel=`${this.selectedWeight?.toFixed(2)} lb`,this.focusQtyDropdownBtn()),this.product.quantity=this.selectedWeight}if(this.checkMaxPurchaseQty(),this.updateStepperAnnouncementQsc(this.product.quantity),this.isLBProduct)this.quantityAriaLabelMessage=this.selectedWeight+" lb of "+this.product.name+" selected in your quick start cart. Click to update";else{let e=this.product.quantity>1?"units":"unit";this.quantityAriaLabelMessage=this.product.quantity+` ${e} of `+this.product.name+" selected in your quick start cart. Click to update"}"weighted"!==e?this._quickAddBasketService.setQuickAddBasketItemQuantity(this.product.id,this.product.quantity):this._quickAddBasketService.setQuickAddBasketItemWeight(this.product.id,this.product.quantity)}}checkMaxPurchaseQty(){this.product.maxPurchaseQty&&this.product.quantity>this.product.maxPurchaseQty&&(this.product.quantity=this.product.maxPurchaseQty)}updateStepperAnnouncementQsc(e){e&&e!==this.previousQuantity&&(this.stepperAnnouncement=`Quantity selected changed to ${e}`,this.resetStepperAnnouncement())}resetStepperAnnouncement(){setTimeout((()=>{this.stepperAnnouncement=""}),3e3)}showPriceChangeToast(e,t){if(e&&this._commonService.checkPendingOrder()){let e=t.cartItems?.find((e=>e.itemId===this.product.id)),i=this._commonService.getValidProductPrice(this.product),n=e?.price<e?.basePrice?e?.price:e?.basePrice;if(e&&n!==i){let e=`Great newsâyour price for this item is still $${n}, based on when you placed your order. `;this.analyticsPreviousPrice=n,n>i&&(e=`The price for ${this.product.name} has changed, but your price is still $${n} based on its price on the day your order was placed. `,this.analyticsIsPriceDecreased=!0),this.toasterService.show({title:"OK",message:e,type:ere.Info,interactiveElement:"See Policy",interactiveElementLink:"https://www.albertsonscompanies.com/policies-and-disclosures/terms-of-use/default.aspx"},{class:"popup--toaster--right"})}}}redirectToPrebookPage(){window.location.href="/erums/store/prebook"}handleSlotAction(e,t,i="",n){let r=localStorage.getItem("abSlot"),s=r?JSON.parse(r):{},a=s?.slotId,o=s?.type;if(a){let r=this._deleteSlotRequest(a,o);this._http.delete(r.url,{headers:new jy(r.headers),responseType:"text"}).subscribe((t=>
1{window.AB.COMMON.isLSCompatible()&&localStorage.removeItem("abSlot"),this._resetReserveNavText(),this.isPrebookRedirect="reserve-new-time"===e,this.performCartAction("increase",null)}),(e=>{this.handleClosePrebookModal(t,i,n)}))}}handleClosePrebookModal(e,t,i=!1){"prebook_slot_drawer"===t?window.rightDrawerComp.closeDrawer():($(`#${e}`).modal("hide"),this.handleCloseCartSlotModalData()),i&&this.redirectToPrebookPage()}handlePreviousPageAction(){window.rightDrawerComp.closeDrawer(),setTimeout((()=>{let e={configObj:this.configObj,type:"customize-drawer",product:this.product,triggeredElement:"item-unavailable"};this._commonService.rightDrawerSource.next(e)}),400)}_deleteSlotRequest(e,t){let i=window.location.origin,n=window.AB.userInfo.branchId,r=this._userInfoService.getUserChannel()?this._userInfoService.getUserChannel().toUpperCase():"",s=window.SWY.CONFIGSERVICE.osdpConfig["osdp.slot.promise.service.endpoint"],a=window.AB.ecommHttpOptionsOsdp;a.clientId="CC",a.storeId=n;let o=this.config[this.currentEnv].wiremockAPIDetails;if(o?.allowWiremockService){let e=this._utilService.getParams("mode");"record"===e?s=`${o?.recorderBaseUrl}${s}`:"playback"===e&&(s=`${o?.playbackBaseUrl}${s}`),a["ocp-apim-subscription-key"]="record"===e||"playback"===e?o?.subscriptionKey:a["ocp-apim-subscription-key"]}r&&("DELIVERY"===r||"PICKUP"===r)&&(a.serviceType="PICKUP"===r?"DUG":r);let l="";return"FLASH"===t&&(l="?type=FLASH"),{url:`${i}${s}/reserve/${n}/${e}${l}`,headers:a}}_resetReserveNavText(){if(this._aemService.getFeatureFlagByNameDisable("isNavigationEngineDisabled")){if("dug"===window.AB.userInfo.preferenceMode.toLowerCase()){let e=document.querySelector(".reserve-nav__text_pickup");e&&(e.textContent="Reserve a pickup time")}else if("delivery"===window.AB.userInfo.preferenceMode.toLowerCase()){let e=document.querySelector(".reserve-nav__text_delivery");e&&(e.textContent="Reserve a delivery time")}}else{document.querySelector(".s_nav_fulfillment_link.fulfillment_link_reserve").innerHTML="Reserve"}}analyticsMTOClicks(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalClickEvents(`mto-pickup|${e}`)}handleReturnFocusForQtyStppr(){this.refocusButton?this.refocusButton.focus():this.timeouts.push(setTimeout((()=>{this.qtyInfoBtn?.nativeElement.focus()}),100))}displayWeights(){"J4U"===(this._userInfoService.getPreference()?this._userInfoService.getPreference().toUpperCase():void 0)?window.storeFulfillmentModal.component.setModalDisplayData(2):this.showWeights?this.toggleDisplayWeights(!1):this.weightList&&this.weightList.length>0?(this.toggleDisplayWeights(!0),this.setADANavigation()):this.initializeWeightList()}toggleDisplayWeights(e){this.isCarouselRedesign&&(e?$(this._elementRef.nativeElement).closest(".product-carousel-v2").addClass("pc-z-index"):$(this._elementRef.nativeElement).closest(".product-carousel-v2").removeClass("pc-z-index")),this.showWeights=e}setADANavigation(){setTimeout((()=>{$("#dropdown-itm0").focus(),this.estimatedPrice=parseFloat(this.weightList[0].price);let e=this;$(".dropdown-item.wt-dropdown__menu__container__item").on("keydown keypress",(function(t){if($("this:focus")){let i=null;if(40===t.which?i=$(this).next():38===t.which&&(i=$(this).prev()),i&&i.length&&i.length>0){if(i.get(0).className.includes("wt-dropdown__menu__container__item-remove"))i.get(0).className.includes("wt-dropdown__menu__container__item-remove")&&!i.get(0).className.includes("wt-dropdown__menu__container__item-remove--disabled")&&(e.estimatedPrice=0);else{let t=i.get(0).id.replace("dropdown-itm","");e.estimatedPrice=parseFloat(e.weightList[Number(t)].price)}i.get(0).className.includes("wt-dropdown__menu__container__item-remove--disabled")||i.focus()}}})),$(".wt-dropdown__menu__container__item-remove").on("keydown keypress",(function(e){$("this:focus")&&38===e.which&&$(this).prev().focus()}))}),500)}initializeWeightList(){this.cartV2Service.getIncrementPriceList(this.product.upc).subscribe((e=>{if(e){let t=e.priceAndPromoResponse;t&&t.length>0&&(this.weightList=t[0].incrementPriceList,this.weightList&&this.weightList.length>0&&(this.toggleDisplayWeights(!0),this.setADANavigation()))}}),(e=>{this.toggleDisplayWeights(!1)}))}focusQtyDropdownBtn(){this.timeouts.push(setTimeout((()=>{$(`#qtyDropdownBtn_${this.product.id}`).focus()}),100))}mouseEnter(e){this.estimatedPrice=parseFloat(this.weightList[e].price),this.timeouts.push(setTimeout((()=>{$("#dropdown-itm"+e).focus()}),0))}mouseEnterRemoveBtn(){this.estimatedPrice=0}addFocusToSpinnerBlock(){this.loadingSpinner=!0,this.refocusButton=null,this.timeouts.push(setTimeout((()=>{this.spinnerBlock?.nativeElement.focus()}),100))}showUpdateQtyInput(){this.updateState.input=this.product.quantity,this.updateState.show=!0,setTimeout((()=>{$(`#qtyInfoControl_${this.product.id}`).focus()}),100)}showQscUpdateQtyInput(){setTimeout((()=>{$(`#qtyInfoControl_${this.product.id}`).focus()}),0),this.showUpdateQtyInput()}callSNSSuccessDispatch(){let e={"data-bpn":this.product.id,qty:this.product.quantity};this._commonService.dispatchCustomOneTimeEvent("snsOneTime","productQtyUpdateSuccess",e)}inputQtyKeyup(e){this.product.maxPurchaseQty&&e.target.value>this.product.maxPurchaseQty&&(e.preventDefault(),this.updateState.input=this.product.maxPurchaseQty)}inputQtyKeydown(e){let t=e,i=t.which?t.which:t.keyCode;if([8,9,13,37,38,39,40,46].includes(i)||"0123456789".includes(t.key)||t.preventDefault()," "==e.key){let e=document.querySelector(`#qtyInfoControl_${this.product.id}`);e.value=e.value.replace(/[^0-9]*/g,"")}}showStaticFirstTimeCartModal(e,t){let i="#addToCartModal-"+this.configObj?.programType;t&&t[e]||(window.ErrorStateModalComp.triggerEmptyStateModal(i,!0),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addedToSellerTypeModalTracking("wineshop"))}showMkpAddToCartModal(e,t,i,n){n&&n[e]||this.showDynamicFirstTimeCartModal(e,t,i)}showDynamicFirstTimeCartModal(e,t,i){let n="#addToCartModal-"+this.configObj?.programType,r=$(n),s=$(n+" .error-state-modal__logo img"),a=s.attr("data-image-placeholder"),o=s.attr("data-alt-placeholder");s.attr("src",a?.replace("(sellerId)",e)),s.attr("alt",o?.replace("(sellerName)",t));let l=$(n+" .error-state-modal__title"),c=l.attr("data-message-placeholder")?.replace("(sellerName)",t);l?.html(c),r.attr("aria-label",c);
1let d=$(n+" .error-state-modal__shipping-text"),u=$(n+" .error-state-modal__noOrderMin"),p=$(n+" .error-state-modal__shipping-text .error-state-modal__shipping-text__cp"),h=$(n+" .error-state-modal__shipping-text .error-state-modal__shipping-text__mo"),f=JSON.parse(localStorage.getItem("mkpShipping"));if(f&&f.shippingInfo[e]){let t=f.shippingInfo[e].domesticShippingFreeThreshold,r=f.shippingInfo[e].shippingFee,s=$(n+" .error-state-modal__text"),a=$(n+" .error-state-modal__qualifyFreeShipping"),o=$(n+" .error-state-modal__domesticFreeShipping");if(t>0&&r>0){let e=$(n+" .error-state-modal__domesticFreeShipping .error-state-modal__shipping-text__cp");t>i?(e.html("$"+(t-i).toFixed(2).toString()),o.removeClass("d-none"),d.addClass("d-none"),s.removeClass("d-none"),a.addClass("d-none")):(a.removeClass("d-none"),o.addClass("d-none"),d.addClass("d-none"))}else{let t=f.shippingInfo[e].minCartThresholdValue;t&&t>0&&t>i?(p.html("$"+(t-i).toFixed(2).toString()),h.html("$"+t.toString()),u.addClass("d-none"),d.removeClass("d-none"),a.addClass("d-none"),o.addClass("d-none")):0===t?(d.addClass("d-none"),u.removeClass("d-none"),a.addClass("d-none"),o.addClass("d-none")):(d.addClass("d-none"),u.addClass("d-none"))}let l=$(n+" .error-state-modal__text__shipping"),c=$(n+" .error-state-modal__freeShipping");r&&r>0&&(t>0&&t>i||t<1)?(l?.html("$"+r),c.addClass("d-none"),s.removeClass("d-none")):0===r?(s.addClass("d-none"),c.removeClass("d-none")):(s?.addClass("d-none"),c?.addClass("d-none")),"mkp-cross-seller-page"===$(".main-wrapper").attr("data-custom-page-type")&&($(".modal-footer__action-btn__cart").html("Go to Seller"),$(n+" .modal-footer__action-btn__cart").attr("seller-url",this._commonService.getSellerLandingPath(e))),this.updateSrMsgs(n)}else console.warn("mkpShipping local storage missing or current seller shipping info is not available");window.ErrorStateModalComp.triggerEmptyStateModal(n,!0),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addedToSellerTypeModalTracking("marketplace")}updateSrMsgs(e){let t=$(e+" .error-state-modal__shipping-text-content").text(),i=$(e+" .error-state-modal__domesticFreeShipping-content").text(),n=$(e+" .error-state-modal__qualifyFreeShipping-content").text(),r=$(e+" .error-state-modal__text-content").text();$(e+" .error-state-modal__shipping-text-sr").text(t),$(e+" .error-state-modal__domesticFreeShipping-sr").text(i),$(e+" .error-state-modal__qualifyFreeShipping-sr").text(n),$(e+" .error-state-modal__text-sr").text(r)}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w),$d(Vl),$d(Rw),$d(Mw),$d(Dw),$d(Cw),$d(Lw),$d(Sw),$d(ov),$d(xre),$d(Kw),$d(kg),$d(dp),$d(e_,8))}}static{this.ɵcmp=Qr({type:e,selectors:[["quantity-stepper-al-v2"]],viewQuery:function(e,t){if(1&e&&(tm(Fae,5),tm(Nae,5),tm(Uae,5),tm(Vae,5),tm(qae,5),tm($ae,5)),2&e){let e;im(e=nm())&&(t.decreaseBtn=e.first),im(e=nm())&&(t.spinnerBlock=e.first),im(e=nm())&&(t.addBtn=e.first),im(e=nm())&&(t.qtyInfoBtn=e.first),im(e=nm())&&(t.qscStepperBubble=e.first),im(e=nm())&&(t.qscIncreaseBtn=e.first)}},hostBindings:function(e,t){1&e&&jf("focusout",(function(e){return t.onFocusOutEvent(e)}))},inputs:{product:"product",calledBy:"calledBy",stpprDataObj:"stpprDataObj",configObj:"configObj",qtyStepperOptions:"qtyStepperOptions",hideCTA:"hideCTA"},outputs:{qtyStepperExpandEmitter:"qtyStepperExpandEmitter",qtyStepperInfoEmitter:"qtyStepperInfoEmitter"},decls:2,vars:2,consts:[["customizeDrawerButton",""],["weightedButtonTemplate",""],["qscQtyStepper",""],["addBtn",""],["decreaseBtn",""],["spinnerBlock",""],["qtyInfoBtn",""],["qscIncreaseBtn",""],["qscStepperBubble",""],[4,"ngIf"],[3,"modalData","product","customizationData","handleSlotEvent","closeModalEvent","refreshModalEvent","startCustomizationEvent","addAnywayEvent","previousPageEvent","addAndUpdateEvent","addPreviousCustomizationEvent","addModifyPreviousCustomizationEvent","addPreorderItemEvent",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"pds-btn","d-flex","align-items-center","justify-content-center","p-0","btn-stppr",3,"click","id","ngClass","disabled"],["aria-hidden","true","class","svg-btn-stppr-increase",4,"ngIf"],[1,"btn-stppr-text",3,"ngClass"],["aria-hidden","true",1,"svg-btn-stppr-increase"],["class","rounded-pill background-color-primary-default btn-stppr btn-stppr-expand p-0 d-flex w-100","role","group","aria-labelledby","qtyStpprExpandedLabel",4,"ngIf"],["class","rounded-pill background-color-primary-default btn-stppr btn-stppr-expand p-0 d-flex justify-content-end w-100",4,"ngIf"],["role","group","aria-labelledby","qtyStpprExpandedLabel",1,"rounded-pill","background-color-primary-default","btn-stppr","btn-stppr-expand","p-0","d-flex","w-100"],["id","qtyStpprExpandedLabel",1,"sr-only"],["aria-live","assertive","aria-atomic","true",1,"sr-only"],["data-qa","prdctdcrmntr",1,"btn","btn-primary","w-25","border-0","p-0","d-flex","align-items-center","justify-content-center",3,"click","id","ngClass"],["aria-hidden","true","class","svg-btn-stppr-trash-bin",3,"ngClass",4,"ngIf"],["aria-hidden","true","class","svg-btn-stppr-decrease",3,"ngClass",4,"ngIf"],["aria-hidden","true","tabindex","-1","class","w-50 d-flex justify-content-center align-items-center",3,"id",4,"ngIf"],["data-qa","qty-stppr-qtymsg","class","btn btn-primary w-50 border-0 rounded-0 p-0 btn-stppr-text",3,"id","click","keydown.enter",4,"ngIf"],["data-qa","prdctincrmntr",1,"btn","btn-primary","w-25","border-0","p-0","d-flex","justify-content-center","align-items-center",3,"click","id","ngClass"],["aria-hidden","true",1,"svg-btn-stppr-increase",3,"ngClass"],["aria-hidden","true",1,"svg-btn-stppr-trash-bin",3,"ngClass"],["aria-hidden","true",1,"svg-btn-stppr-decrease",3,"ngClass"],["aria-hidden","true","tabindex","-1",1,"w-50","d-flex","justify-content-center","align-items-center",3,"id"],[1,"pp-loading-spinner"],["data-qa","qty-stppr-qtymsg",1,"btn","btn-primary","w-50","border-0","rounded-0","p-0","btn-stppr-text",3,"click","keydown.enter","id"],[1,"rounded-pill","background-color-primary-default","btn-stppr","btn-stppr-expand","p-0","d-flex","justify-content-end","w-100"],["class","w-50 background-color-primary-default color-neutral-100 btn-stppr-expand__input btn-stppr-text title-xs text-center p-0 mt-1 mb-1","onclick","this.select();","type","number","min","1","step","1","data-qa","prd-qty-stppr-qtybox",3,"id","max","ngModel","keydown","ngModelChange","keyup.enter","keyup",4,"ngIf"],["data-qa","prdqtyupdate",1,"btn","btn-primary","w-25","border-0","p-0","d-flex","justify-content-center","align-items-center",3,"click","id"],["aria-hidden","true",1,"svg-btn-stppr-right-arrow",3,"ngClass"],["onclick","this.select();","type","number","min","1","step","1","data-qa","prd-qty-stppr-qtybox",1,"w-50","background-color-primary-default","color-neutral-100","btn-stppr-expand__input","btn-stppr-text","title-xs","text-center","p-0","mt-1","mb-1",3,"keydown","ngModelChange","keyup.enter","keyup","id","max","ngModel"],["data-qa","qty-stppr-bbl",1,"btn","btn-primary","btn-circle--md","bubble-qty-info",3,"click","id"],["class","background-color-primary-default rounded-pill btn-stppr btn-stppr-expand p-0 d-flex w-100","role","group","aria-labelledby","qtyStpprExpandedLabel",4,"ngIf"],["role","group","aria-labelledby","qtyStpprExpandedLabel",1,"background-color-primary-default","rounded-pill","btn-stppr","btn-stppr-expand","p-0","d-flex","w-100"],["aria-hidden","true","class","svg-btn-stppr-trash-bin",4,"ngIf"],["aria-hidden","true",1,"svg-btn-stppr-trash-bin"],["class","w-50 color-neutral-100 background-color-primary-default btn-stppr-expand__input btn-stppr-text title-xs text-center p-0 mt-1 mb-1","onclick","this.select();","type","number","min","1","step","1","data-qa","prd-qty-stppr-qtybox",3,"id","max","ngModel","keydown","ngModelChange","keyup",4,"ngIf"],["data-qa","prdqtyupdate",1,"btn","btn-primary","w-25","border-0","p-0","d-flexjustify-content-center","align-items-center",3,"click","id"],["onclick","this.select();","type","number","min","1","step","1","data-qa","prd-qty-stppr-qtybox",1,"w-50","color-neutral-100","background-color-primary-default","btn-stppr-expand__input","btn-stppr-text","title-xs","text-center","p-0","mt-1","mb-1",3,"keydown","ngModelChange","keyup","id","max","ngModel"],["data-qa","qty-stppr-bbl",1,"btn","btn-primary","btn-circle--md","bubble-qty-info",3,"click","id","disabled"],[1,"dropdown","wt-dropdown"],["data-qa","addwgtBtn","class","wt-dropdown__button btn btn-primary btn-stppr d-flex align-items-center border-0","aria-haspopup","true",3,"id","click",4,"ngIf"],["data-qa","qty-stppr-wgtbbl","class","btn btn-primary btn-circle btn-stppr d-flex align-items-center px-2","aria-haspopup","true",3,"id","disabled","click",4,"ngIf"],["data-qa","addwgt-drdwn","class","dropdown-menu dropdown-menu-right wt-dropdown__menu p-0",3,"ngClass",4,"ngIf"],["data-qa","addwgtBtn","aria-haspopup","true",1,"wt-dropdown__button","btn","btn-primary","btn-stppr","d-flex","align-items-center","border-0",3,"click","id"],[1,"body-text","wt-dropdown__text"],[1,"svg-caret-down","ml-2"],[1,"svg-caret-up","ml-2"],["data-qa","qty-stppr-wgtbbl","aria-haspopup","true",1,"btn","btn-primary","btn-circle","btn-stppr","d-flex","align-items-center","px-2",3,"click","id","disabled"],[1,"title-xs","wt-dropdown__text"],["data-qa","addwgt-drdwn",1,"dropdown-menu","dropdown-menu-right","wt-dropdown__menu","p-0",3,"ngClass"],["tabindex","-1","role","menu",1,"wt-dropdown__menu__container","p-0",3,"ngClass","id"],["class","dropdown-item wt-dropdown__menu__container__item body-text-sm d-flex align-items-center","role","menuitem","tabindex","-1",3,"ngClass","id","click","mouseenter","keydown.enter",4,"ngFor","ngForOf"],["role","menuitem","tabindex","-1",1,"dropdown-item","wt-dropdown__menu__container__item","
1wt-dropdown__menu__container__item-remove","body-text-sm","d-flex","align-items-center",3,"click","keydown.enter","mouseenter","ngClass"],[1,"dropdown-item","wt-dropdown__menu__price","wt-dropdown__menu__price--selected","color-primary-default","pb-0","body-text-sm",3,"ngClass"],["aria-live","polite",1,"sr-only"],["aria-hidden","true"],[1,"dropdown-item","wt-dropdown__menu__price","pt-0","body-text-sm",3,"ngClass"],["role","menuitem","tabindex","-1",1,"dropdown-item","wt-dropdown__menu__container__item","body-text-sm","d-flex","align-items-center",3,"click","mouseenter","keydown.enter","ngClass","id"],["class","pds-quantity-stepper d-flex w-100",4,"ngIf"],["attr.data-qa","addbutton","class","pds-btn pds-btn-size__large pds-btn-filled--primary d-flex align-items-center justify-content-center",3,"id","click",4,"ngIf"],[1,"pds-quantity-stepper","d-flex","w-100"],["role","group",1,"pds-quantity-stepper-container","pds-quantity-stepper-container--outlined","pds-quantity-stepper-container--size__large","d-flex","align-items-center"],["data-qa","prdctdcrmntr",1,"pds-quantity-stepper-container-button-background","pds-quantity-stepper-container-button-background--outlined","pds-quantity-stepper-container-button-background--size__large","d-flex","align-items-center","justify-content-center",3,"click","id","ngClass"],["aria-hidden","true",3,"ngClass"],[1,"pds-quantity-stepper-container-quantity-value","pds-quantity-stepper-container-quantity-value--outlined","pds-quantity-stepper-container-quantity-value__large","d-flex","justify-content-center"],["data-qa","qty-stppr-qtymsg",1,"pds-quantity-stepper-container-quantity-value-input-field-text--outlined"],["data-qa","prdctincrmntr",1,"pds-quantity-stepper-container-button-background","pds-quantity-stepper-container-button-background--outlined","pds-quantity-stepper-container-button-background--size__large","d-flex","align-items-center","justify-content-center",3,"click","id","ngClass"],["aria-hidden","true",1,"pds-svg-plus-icon-large",3,"ngClass"],["attr.data-qa","addbutton",1,"pds-btn","pds-btn-size__large","pds-btn-filled--primary","d-flex","align-items-center","justify-content-center",3,"click","id"],[3,"handleSlotEvent","closeModalEvent","refreshModalEvent","startCustomizationEvent","addAnywayEvent","previousPageEvent","addAndUpdateEvent","addPreviousCustomizationEvent","addModifyPreviousCustomizationEvent","addPreorderItemEvent","modalData","product","customizationData"]],template:function(e,t){1&e&&ph(0,Loe,4,2,"ng-container",9)(1,Foe,1,3,"cart-slot-modal-al",10),2&e&&(zh("ngIf",!t.hideCTA),Vd(),zh("ngIf",t.showCartSlotModal))},dependencies:[sy,oy,cy,d_,BS,$_,tC,XS,ES,Lae,Oy,By]})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}};function Uoe(e,t){if(1&e){let e=Mf();kf(0,"div",1)(1,"div",2)(2,"button",3),jf("click",(function(t){Wa(e);let i=Yf();return Ha(i.onQuantityChange(i.quantity-1,t))})),Tf(3,"span",4),xf(),kf(4,"div",5)(5,"span",6),am(6),xf(),kf(7,"span",7),am(8),xf()(),kf(9,"button",8),jf("click",(function(t){Wa(e);let i=Yf();return Ha(i.onQuantityChange(i.quantity+1,t))})),Tf(10,"span",9),xf()(),kf(11,"div",10),am(12),xf()()}if(2&e){let e=Yf();Vd(2),gh("aria-label",e.getAriaLabel("decrement")),Vd(2),gh("aria-label",e.quantityAriaLabel),Vd(2),cm(" ",e.quantity," "),Vd(2),um("",e.quantity," ",1===e.quantity?"unit":"units"," of ",null==e.option?null:e.option.name," selected"),Vd(),zh("disabled",e.isMaxQuantityReached()),gh("aria-label",e.getAriaLabel("increment")),Vd(),Kh(e.isMaxQuantityReached()?"pds-svg-plus-icon-small pds-quantity-stepper-container-button-background--filled__icon__disabled":"pds-svg-plus-icon-small pds-quantity-stepper-container-button-background--outlined__icon"),Vd(2),lm(e.announcementMessage)}}var Voe=(()=>{class e{constructor(e){this.commonService=e,this.qtyStepperInfoEmitter=new _l,this.announcementMessage=""}get quantity(){if(this.option?.name?.startsWith("No"))return 0;let e=this.commonService.customizationData();return e.selectedOptions?e.selectedOptions.find((e=>e?.upcId===this.option?.upcId))?.qty||(this.option?.isSelected?1:0):1}getAriaLabel(e){let t=this.option?.name||"item";return"decrement"===e?1===this.quantity?`Remove quantity 1 unit of ${t}`:`Decrease quantity 1 unit of ${t}`:this.isMaxQuantityReached()?`Increase quantity 1 unit of ${t} button disabled`:`Increase quantity 1 unit of ${t}`}get quantityAriaLabel(){return`${this.quantity} unit${1===this.quantity?"":"s"} of ${this.option?.name} selected`}announceMessage(e){this.announcementMessage=e}isMaxQuantityReached(){if(!this.modifier?.maxSelect)return!1;if("radio"===this.modifier.controlType||1===this.modifier.maxSelect)return 1===this.quantity;let e=this.commonService.customizationData();return this.commonService.isMaxQuantityReachedForModifier(this.modifier,e.selectedOptions)}onQuantityChange(e,t){if(this.option?.name?.startsWith("No"))return;try{t&&(t.stopPropagation(),t.preventDefault())}catch{}let i=this.getPositionText();if(1===this.quantity&&e<1){this.announceMessage(`${this.option?.name||"Item"} checkbox unchecked ${i}`);try{this.option.deSelect=!0}catch{}return void setTimeout((()=>{this.qtyStepperInfoEmitter.emit(0);let e=this.option?.upcId,t=document.querySelector(`input[data-upc-id='${e}']`);
1t&&"function"==typeof t.focus&&t.focus()}),100)}e<1&&(e=1);let n=`${e} ${1===e?"unit":"units"} of ${this.option?.name||"item"} updated`;if(this.option?.price){let t=(this.option.price||0)*e,r=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(t);this.announceMessage(`${n} ${i} ${r} additional charge`)}else this.announceMessage(`${n} ${i}`);this.qtyStepperInfoEmitter.emit(e),t&&t.target&&t.target.focus&&setTimeout((()=>{t.target.focus()}),0)}getPositionText(){try{let e=this.modifier?.options||[],t=e.findIndex((e=>e.upcId===this.option?.upcId));if(t>-1)return`${t+1} of ${e.length}`}catch{}return""}static{this.ɵfac=function(t){return new(t||e)($d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["quantity-stepper-simple-al-v1"]],inputs:{modifier:"modifier",option:"option"},outputs:{qtyStepperInfoEmitter:"qtyStepperInfoEmitter"},standalone:!0,features:[Pm],decls:1,vars:1,consts:[["class","customize-selection__options__opt__qty pds-quantity-stepper d-flex",4,"ngIf"],[1,"customize-selection__options__opt__qty","pds-quantity-stepper","d-flex"],["role","group",1,"pds-quantity-stepper-container","pds-quantity-stepper-container--outlined","pds-quantity-stepper-container--size__small","d-flex","align-items-center"],["id","decrement-outlined-small",1,"pds-quantity-stepper-container-button-background","pds-quantity-stepper-container-button-background--outlined","pds-quantity-stepper-container-button-background--size__small","d-flex","align-items-center","justify-content-center",3,"click"],["aria-hidden","true",1,"pds-svg-qty-stepper-decrease-small","pds-quantity-stepper-container-button-background--outlined__icon"],["role","status","aria-live","polite","aria-atomic","true",1,"pds-quantity-stepper-container-quantity-value","pds-quantity-stepper-container-quantity-value--outlined","pds-quantity-stepper-container-quantity-value__small","d-flex","justify-content-center","align-items-center"],["id","counter-outlined-small","aria-hidden","true",1,"pds-quantity-stepper-container-quantity-value-input-field-text","pds-quantity-stepper-container-quantity-value-input-field-text--outlined"],[1,"sr-only"],["id","increment-outlined-small",1,"pds-quantity-stepper-container-button-background","pds-quantity-stepper-container-button-background--outlined","pds-quantity-stepper-container-button-background--size__small","d-flex","align-items-center","justify-content-center",3,"click","disabled"],["aria-hidden","true"],["aria-live","polite","aria-atomic","true",1,"sr-only"]],template:function(e,t){1&e&&ph(0,Uoe,13,11,"div",0),2&e&&zh("ngIf",0!==t.quantity)},dependencies:[Ly,cy]})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),qoe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[Lse,Noe,mse,Wre],imports:[Ly,uC,Tre,Voe]})}}return e})();function $oe(e,t){if(1&e){let e=Mf();kf(0,"button",6),jf("click",(function(){Wa(e);let t=Yf(3);return Ha(t.processSnsAction("pg"+t.product.id+"Ar"))}))("keydown.enter",(function(){Wa(e);let t=Yf(3);return Ha(t.processSnsAction("pg"+t.product.id+"Ar"))})),kf(1,"div",7)(2,"span",8)(3,"span",9)(4,"span",10),am(5),xf()()()()()}if(2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Ar"),gh("aria-label",e.adaSnsOfferTitle()+e.product.name)("data-bpn",e.product.id),Vd(5),lm(e.ecomDescription)}}function joe(e,t){if(1&e&&(kf(0,"span",11)(1,"span",12),am(2),xf(),kf(3,"span",13),am(4),xf()()),2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Ar"),gh("data-bpn",e.product.id),Vd(2),dm(" ",e.adaSnsOfferTitle()," for ",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name," "),Vd(2),lm(e.ecomDescription)}}function zoe(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"span",7)(2,"span",15)(3,"span",9)(4,"a",16),qm(5,"date"),jf("click",(function(t){return Wa(e),Ha(Yf(3).analyticPickupDeliveryClick(t))})),am(6),qm(7,"date"),xf()()()()()}if(2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Ar"),gh("data-bpn",e.product.id),Vd(4),Jf("href",e.getARManageLink(),id),gh("aria-label",e.productFulfillDate?("dug"===e.productFulfillType?"Your pickup ":"Your "+e.productFulfillType+" ")+jm(5,5,e.productFulfillDate,"MMM. dd"):("dug"===e.productFulfillType?"Manage scheduled pickup":"Manage scheduled "+e.productFulfillType)+e.product.name),Vd(2),lm(e.productFulfillDate?("dug"===e.productFulfillType?"Your pickup ":"Your "+e.productFulfillType+" ")+jm(7,8,e.productFulfillDate,"MMM. dd"):"dug"===e.productFulfillType?"Manage scheduled pickup":"Manage scheduled "+e.productFulfillType)}}function Woe(e,t){if(1&e&&(kf(0,"span",17)(1,"span",12),am(2),qm(3,"date"),xf(),kf(4,"span",13),am(5),qm(6,"date"),xf()()),2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Ar"),gh("data-bpn",e.product.id),Vd(2),cm(" ",e.productFulfillDate?("dug"===e.productFulfillType?"Your pickup ":"Your "+e.productFulfillType+" ")+jm(3,4,e.productFulfillDate,"MMM. dd"):("dug"===e.productFulfillType?"Manage scheduled pickup":"Manage scheduled "+e.productFulfillType)+" "+(null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name)," "),Vd(3),cm("",e.productFulfillDate?("dug"===e.productFulfillType?"Your pickup ":"Your "+e.productFulfillType+" ")+jm(6,7,e.productFulfillDate,"MMM. dd"):"dug"===e.productFulfillType?"Manage scheduled pickup":"Manage scheduled "+e.productFulfillType," ")}}function Hoe(e,t){if(1&e&&(Ef(0),ph(1,$oe,6,4,"button",2)(2,joe,5,5,"span",3)(3,zoe,8,11,"div",4)(4,Woe,7,10,"span",5),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.isPcRedesignDisabled&&!e.isProductSubscribed&&!e.isProductOutOfStock()&&e.snsOffer),Vd(),zh("ngIf",!e.isPcRedesignDisabled&&!e.isProductSubscribed&&!e.isProductOutOfStock()&&e.snsOffer),Vd(),zh("ngIf",e.isPcRedesignDisabled&&e.isProductSubscribed),Vd(),zh("ngIf",!e.isPcRedesignDisabled&&e.isProductSubscribed)}}function Yoe(e,t){if(1&e){let e=Mf();kf(0,"div",29),Tf(1,"div",30),kf(2,"div",31),jf("click",(function(){return Wa(e),Ha(Yf(4).showModal("freqModal","frequency-modal-button"))}))("keydown.enter",(function(){return Wa(e),Ha(Yf(4).showModal("freqModal","frequency-modal-button"))})),am(3),xf()()}if(2&e){let e=Yf(4);Vd(2),Sh("aria-label","dataConfig.contents?.snsScheduledText Every ",1===e.selectedFrequency?"":e.selectedFrequency," week",e.
1selectedFrequency>1?"s":"",""),Vd(),um("",null==e.dataConfig.contents?null:e.dataConfig.contents.snsScheduledText," Every ",1===e.selectedFrequency?"":e.selectedFrequency," week",e.selectedFrequency>1?"s":"","")}}function Goe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",18)(2,"label",19)(3,"input",20),jf("change",(function(t){return Wa(e),Ha(Yf(3).checkValue(t))}))("keydown",(function(t){return Wa(e),Ha(Yf(3).checkValue(t))})),xf(),kf(4,"span",21),am(5),xf(),kf(6,"span",22),Tf(7,"span",23),xf()(),kf(8,"div",24)(9,"div",25),am(10),xf(),kf(11,"div",26),jf("click",(function(){return Wa(e),Ha(Yf(3).showModal("infoModal","info-modal-button"))}))("keydown.enter",(function(){return Wa(e),Ha(Yf(3).showModal("infoModal","info-modal-button"))})),am(12),xf()(),Tf(13,"div",27),ph(14,Yoe,4,6,"div",28),xf(),Df()}if(2&e){let e=Yf(3);Vd(2),gh("aria-label",(null==e.dataConfig.contents?null:e.dataConfig.contents.snsText)+(null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer)+(null==e.dataConfig.contents?null:e.dataConfig.contents.snsDescription)),Vd(),zh("checked",e.isChecked?"checked":""),gh("aria-checked",e.isChecked?"true":"false"),Vd(2),dm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsText," ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer,""),Vd(3),zh("ngClass",e.isChecked?"sns-container__info__subscribed":"sns-container__info"),Vd(2),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.snsDescription),Vd(),gh("aria-label",null==e.dataConfig.contents?null:e.dataConfig.contents.snsAboutProgramText),Vd(),lm(null==e.dataConfig.contents?null:e.dataConfig.contents.snsAboutProgramText),Vd(2),zh("ngIf",e.isChecked)}}function Koe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",32)(2,"div",33),Tf(3,"div",34),kf(4,"div",35),am(5),qm(6,"date"),xf(),kf(7,"div",36)(8,"a",37),qm(9,"date"),jf("click",(function(){return Wa(e),Ha(Yf(3).analyticsManageLinkClick())})),am(10,"Manage"),xf()()(),kf(11,"div",38),Tf(12,"div",39),kf(13,"div",40),am(14),xf()()(),Df()}if(2&e){let e=Yf(3);Vd(5),dm("Your next ","dug"===e.productFulfillType?"pickup":e.productFulfillType,": ",jm(6,5,e.productFulfillDate,"MMM. dd"),""),Vd(3),Jf("href",e.getARManageLink(),id),gh("aria-label",e.productFulfillDate?"This item may be restocked by your scheduled"+("dug"===e.productFulfillType?"pickup ":e.productFulfillType+" ")+"date Manage your next"+("dug"===e.productFulfillType?"pickup ":e.productFulfillType+" ")+jm(9,8,e.productFulfillDate,"MMM. dd"):""),Vd(6),cm("This item may be restocked by your scheduled ","dug"===e.productFulfillType?"pickup":e.productFulfillType," date. ")}}function Qoe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",41),Tf(2,"div",34),kf(3,"div",35),am(4),qm(5,"date"),xf(),kf(6,"div",36)(7,"a",37),qm(8,"date"),jf("click",(function(){return Wa(e),Ha(Yf(3).analyticsManageLinkClick())})),am(9,"Manage"),xf()()(),Df()}if(2&e){let e=Yf(3);Vd(4),dm("Your next ","dug"===e.productFulfillType?"pickup":e.productFulfillType,": ",jm(5,4,e.productFulfillDate,"MMM. dd"),""),Vd(3),Jf("href",e.getARManageLink(),id),gh("aria-label",e.productFulfillDate?"Manage your next"+("dug"===e.productFulfillType?"pickup ":e.productFulfillType+" ")+jm(8,7,e.productFulfillDate,"MMM. dd"):"")}}function Joe(e,t){if(1&e&&(Ef(0),kf(1,"div",44)(2,"div",45),am(3),qm(4,"date"),xf()(),kf(5,"div",46),am(6),qm(7,"date"),xf(),Df()),2&e){let e=Yf(4);Vd(3),dm("",null==e.dataConfig.contents?null:e.dataConfig.contents.snsNextRecurringOrderText,": ",jm(4,6,e.arSubscriptionList.fulfillment.nextOrderFulfillmentDate,"MMM. dd"),""),Vd(3),pm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsText," ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer,". ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsNextRecurringOrderText,": ",jm(7,9,e.arSubscriptionList.fulfillment.nextOrderFulfillmentDate,"MMM. dd")," ")}}function Zoe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",42)(2,"button",43),jf("click",(function(){return Wa(e),Ha(Yf(3).showModal("addRecurringModal","schedule-and-save-modal-button"))})),am(3),xf(),ph(4,Joe,8,12,"ng-container",1),xf(),Df()}if(2&e){let e=Yf(3);Vd(3),dm(" ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsText," ",null==e.dataConfig.contents?null:e.dataConfig.contents.snsOffer," "),Vd(),zh("ngIf",null==e.arSubscriptionList.fulfillment?null:e.arSubscriptionList.fulfillment.nextOrderFulfillmentDate)}}function Xoe(e,t){if(1&e&&(Ef(0),ph(1,Goe,15,10,"ng-container",1)(2,Koe,15,11,"ng-container",1)(3,Qoe,10,10,"ng-container",1)(4,Zoe,5,3,"ng-container",1),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",(null==e.arSubscriptionList?null:e.arSubscriptionList.isNewSnSUser)&&!e.isProductOutOfStock()),Vd(),zh("ngIf",!(null!=e.arSubscriptionList&&e.arSubscriptionList.isNewSnSUser)&&e.isProductOutOfStock()&&e.isProductSubscribed&&0!==e.productFulfillType.length&&0!==e.productFulfillDate.length),Vd(),zh("ngIf",!(null!=e.arSubscriptionList&&e.arSubscriptionList.isNewSnSUser)&&!e.isProductOutOfStock()&&e.isProductSubscribed&&0!==e.productFulfillType.length&&0!==e.productFulfillDate.length),Vd(),zh("ngIf",!(null!=e.arSubscriptionList&&e.arSubscriptionList.isNewSnSUser||e.isProductOutOfStock()||e.isProductSubscribed))}}function ele(e,t){if(1&e&&(Ef(0),ph(1,Hoe,5,4,"ng-container",1)(2,Xoe,5,4,"ng-container",1),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.isProductLinkToPdp),Vd(),zh("ngIf",!e.isProductLinkToPdp)}}function tle(e,t){1&e&&(Ef(0),kf(1,"div",47),Tf(2,"img",48),xf(),Df())}Em(zre,[sy,oy,cy,DS,WS,KS,d_,LS,$_,j_,ES,IS,Lse],[Ty]);var ile=(()=>{class e{constructor(e,t,i,n,r,s,a){this._arService=e,this._aemService=t,this._productSnsModalService=i,this._commonService=n,this._datalayerService=r,this._cartService=s,this._userInfoService=a,this.isPcRedesignDisabled=!0,this.setDetailProduct=ne
1w _l,this.onCheckedOrFrequencyChanged=new _l,this.isProductSubscribed=!1,this.isProductLinkToPdp=!1,this.showComponent=!1,this.snsOffer="",this.selectedFrequency=1,this.isChecked=!1,this.dataConfig={modal:"",showModal:!1,prevIdToFocus:"",ecomDescription:""},this.ecomDescription=""}ngOnInit(){this.isProductLinkToPdp=this.calledBy&&"product-detail-item"!==this.calledBy,this.dataConfig.contents=this._productSnsModalService.getDynamicContents(),this.getLatestArSubData(),this.subscriptionToaster=this._commonService._toasterInteractiveElement.subscribe((e=>{e&&(this.isChecked=!0,this.selectedFrequency=this.savedFrequency,this.onCheckedOrFrequencyChanged.emit({isChecked:!0,updateCart:!0}))})),this.modalFrequencySelected=this._productSnsModalService.frequencySelected.subscribe((e=>{e&&this.selectFrequency(e)})),this.errorModalSnsInfoSubscription=this._productSnsModalService.errorModalSnsInfo.subscribe((e=>{e&&(this.isChecked=e.isChecked,this.selectedFrequency=e.selectedFrequency,this.onCheckedOrFrequencyChanged.emit({isChecked:this.isChecked,selectedFrequency:this.selectedFrequency,updateCart:!1}))}))}setSnsOfferAndEcomDescription(){let e=this._commonService.getOfferWithDeliveryChannelEC(this.offers,this.product.upc,this.product.itemRetailSect);this.ecomDescription=e?.ecomDescription??"";let t=this.ecomDescription.match(/\d+%/);this.snsOffer=t?t[0]:""}ngAfterViewInit(){$(document).ready((function(){$("#infoTooltip").tooltip({trigger:"manual"})}))}ngOnDestroy(){this.subscriptionSNS&&this.subscriptionSNS.unsubscribe(),this.subscriptionCart&&this.subscriptionCart.unsubscribe(),this.subscriptionToaster&&this.subscriptionToaster.unsubscribe(),this.modalFrequencySelected&&this.modalFrequencySelected.unsubscribe(),this.errorModalSnsInfoSubscription&&this.errorModalSnsInfoSubscription.unsubscribe()}checkValue(e){e.srcElement.checked?(this.isChecked=!0,this._commonService._hasLSArSubscriptions()&&this.arSubscriptionList&&0==this.arSubscriptionList.isCheckboxFirstTimeChecked&&($("#infoTooltip").tooltip("show"),this.arSubscriptionList.isCheckboxFirstTimeChecked=!0,this.arSubscriptionList.showHeaderTooltip=!0,this._commonService.showHeaderTooltip.next(!0),this._arService._setSubscriptionsToLS(this.arSubscriptionList),$(document).on("click",(function(){$("#infoTooltip").tooltip("hide")})),setTimeout((()=>{$("#infoTooltip").tooltip("hide")}),6e3))):(this.isChecked=!1,this.savedFrequency=this.selectedFrequency,this.selectedFrequency=1,$("#infoTooltip").tooltip("hide")),this.onCheckedOrFrequencyChanged.emit({isChecked:this.isChecked,isFirstTimeSnsSub:this.arSubscriptionList.isNewSnSUser,updateCart:!0}),window.AB?.DATALAYER&&window.AB.DATALAYER.snsCheckboxClick(this.isChecked,this.product,this.selectedFrequency)}getLatestArSubData(){this.subscriptionSNS=this._commonService.arSubscriptions.subscribe((e=>{e?this._commonService.isEmpty(e)?(this.setSnsOfferAndEcomDescription(),this.showComponent=!0):(this.arSubscriptionList=e,this.checkForArProductDetails(),this.setSnsOfferAndEcomDescription(),this.showComponent=!0,this.isProductLinkToPdp||this.processProductSNSInformation()):(this.setSnsOfferAndEcomDescription(),this.showComponent=!0)}))}processProductSNSInformation(){let e=this._cartService._get();this._commonService.isEmpty(e)?this.subscriptionCart=this._commonService.currentCartObj.pipe(Hi(2)).subscribe((e=>{this._commonService.isEmpty(e)||this.performSideEffects(e)})):this.performSideEffects(e)}performSideEffects(e){if(!this._commonService.isEmpty(e.cart)){let t;t="B"===this._userInfoService.getSiteType()?e.cart.hasOwnProperty("1P_B2B")&&e.cart["1P_B2B"].cartItems.length>0&&e.cart["1P_B2B"].cartItems.find((e=>e.itemId==this.product.id)):e.cart.hasOwnProperty("abs")&&e.cart.abs.cartItems.length>0&&e.cart.abs.cartItems.find((e=>e.itemId==this.product.id)),t&&t.hasOwnProperty("snsSub")&&t.snsSub.isSnsSub&&(this.isChecked=!0,this.selectedFrequency=t.snsSub.snsFrequency.count,this.onCheckedOrFrequencyChanged.emit({isChecked:this.isChecked,selectedFrequency:this.selectedFrequency,updateCart:!1}))}}showModal(e,t){switch(this.dataConfig.modal=e,this.dataConfig.showModal=!0,this.dataConfig.prevIdToFocus=t,e){case"freqModal":this.dataConfig.selectedFrequency=this.selectedFrequency,this.dataConfig.frequencies=this.arSubscriptionList.snsFrequencies&&this.arSubscriptionList.snsFrequencies.length>0?this.arSubscriptionList.snsFrequencies:this._arService.getStaticFrequencyList();break;case"addRecurringModal":this.dataConfig.product=this.product,this.dataConfig.frequencies=this.arSubscriptionList.snsFrequencies&&this.arSubscriptionList.snsFrequencies.length>0?this.arSubscriptionList.snsFrequencies:this._arService.getStaticFrequencyList(),this.dataConfig.nextFulfillmentType=this.arSubscriptionList.fulfillment?.fulfillmentType?this.arSubscriptionList.fulfillment.fulfillmentType?.toLowerCase():"",this.dataConfig.nextFulfillmentDate=this.arSubscriptionList.fulfillment?.nextOrderFulfillmentDate?this.arSubscriptionList.fulfillment.nextOrderFulfillmentDate:"",this.dataConfig.subscriptionSource=this.calledBy,this.dataConfig.ecomDescription=this.ecomDescription}this._productSnsModalService.show(this.dataConfig),window.AB?.DATALAYER&&window.AB.DATALAYER.setSnsModalViewEvents(this.dataConfig,this.product,this.isChecked,this.selectedFrequency)}selectFrequency(e){this.selectedFrequency=e,this.onCheckedOrFrequencyChanged.emit({selectedFrequency:this.selectedFrequency,updateCart:!0})}checkForArProductDetails(){this.subscribedProduct=this.arSubscriptionList&&this.arSubscriptionList.subscribedItems[this.product.id],this.subscribedProduct&&(this.arSubscriptionList.fulfillment&&!this._commonService.isEmpty(this.arSubscriptionList.fulfillment)?(this.productFulfillType=this.arSubscriptionList.fulfillment.fulfillmentType.toLowerCase(),this.isProductSubscribed=this.subscribedProduct.isActiveSubscription?this.subscribedProduct.isActiveSubscription:this.subscribedProduct.subscriptionActive,this.productFulfillDate=this.subscribedProduct.nextFulfillmentDate):(this.productFulfillType=this.arSubscriptionList.fulfillmentType.toLowerCase(),this.isProductSubscribed=this.subscribedProduct.isActiveSubscription?this.subscribedProduct.isActiveSubscription:this.subscribedProduct.subscriptionActive,this.productFulfillDate=this.subscribedProduct.fulfillmentDate))}isProductOutOfStock(){return this.isPcRedesignDisabled?this.isBiaLandingPage?!this._commonService.isItemAvailable_v3(this.product):!this._commonService.isItemAvailable_v2(this.product):!this._commonService.isItemAvailable_v3(this.product,"",!0)}getARManageLink(){return`${window.location.origin}/schedule-and-save/manage`}adaSnsOfferTitle(){return this.ecomDescription?this.ecomDescription.replace("%","percent"):""}processSnsAction(e){this._datalayerService.getDataLayer()&&this._datalayerService.setSnsLinkClick(this.snsOffer),this._commonService.sendSponsoredProductClickEvent(this.product,"autoReplenishment","scheduleAndSave"),this.arSubscriptionList&&this.arSubscriptionList.isNewSnSUser?window.location.href=this.productDetailPath:this.showModal("addRecurringModal",e)}analyticPickupDeliveryClick(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.snsNextPickupDeliveryClick(e,this.calledBy,this.productFulfillType,this.productFulfillDate)}analyticsManageLinkClick(){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|pdp-manage-ss`)}static{this.ɵfac=function(t){return new(t||e)($d(Uw),$d(Cw),$d(Wre),$d(Bw),$d(kw),$d(Rw),$d(_w))}}static{this.ɵcmp=Qr({type:e,selectors:[["auto-replenishment-al-v1"]],inputs:{product:"product",calledBy:"calledBy",productDetailPath:"productDetailPath",isBiaLandingPage:"isBiaLandingPage",isPcRedesignDisabled:"isPcRedesignDisabled",offers:"offers"},outputs:{setDetailProduct:"setDetailProduct",onCheckedOrFrequencyChanged:"onCheckedOrFrequencyChanged"},decls:3,vars:2,consts:[[1,"auto-replenishment-v2"],[4,"ngIf"],["class","schedule-and-save schedule-n-save-manage",3,"id","click","keydown.enter",4,"ngIf"],["class","body-text-xs color-neutral-80 pc__text-xxs","data-qa","ar-schdl-sv",3,"id",4,"ngIf"],["class","schedule-and-save schedule-n-save-manage",3,"id",4,"ngIf"],["data-qa","ar-schdld-dt","class","body-text-xs color-neutral-80 pc__text-xxs",3,"id",4,"ngIf"],[1,"schedule-and-save","schedule-n-save-manage",3,"click","keydown.enter","id"],[1,"schedule-and-save__container"],[1,"schedule-and-save__wrapper","schedule-and-save__wrapper--alignment-text"],[1,"schedule-and-save__content"],["data-qa","ar-schdl-sv",1,"link-xs","schedule-and-save__content__text"],["data-qa","ar-schdl-sv",1,"body-text-xs","color-neutral-80","pc__text-xxs",3,"id"],[1,"sr-only"],["aria-hidden","true"],[1,"schedule-and-save","schedule-n-save-manage",3,"id"],[1,"schedule-and-save__wrapper","schedule-and-save__wrapper--alignment"],["role","link",1,"link-xs","schedule-and-save__content__text",3,"click","href"],["data-qa","ar-schdld-dt",1,"body-text-xs","color-neutral-80","pc__text-xxs",3,"id"],[1,"sns-container","p-3"],["for","checkboxLarge",1,"checkbox__group","mb-0"],["type","checkbox","id","checkboxLarge","data-qa","pdp-chckbx-ss",1,"checkbox__input",3,"change","keydown","checked"],[1,"checkbox__label","checkbox__label--lg","checkbox__label--dark"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],[3,"ngClass"],[1,"body-text-xs"],["tabindex","0","id","info-modal-button","role","button","data-qa","pdp-abtlnk-ss",1,"link-xs",3,"click","keydown.enter"],["data-toggle","tooltip","data-
1placement","top","data-original-title","Schedule how often you'd like this item.","id","infoTooltip"],["class","sns-container__repeat d-flex align-items-center",4,"ngIf"],[1,"sns-container__repeat","d-flex","align-items-center"],["alt","repeat",1,"svg-repeat"],["tabindex","0","id","frequency-modal-button","role","button",1,"link-sm","ml-2",3,"click","keydown.enter"],[1,"sns-container","p-3","mt-4"],[1,"d-flex","align-items-center","pb-2"],[1,"svg-repeat","mr-2"],[1,"word-highlight-sm","flex-grow-1"],[1,"link-sm","sns-container__returning__manage"],["role","link",1,"sns-modal__default",3,"click","href"],[1,"sns-container__returning__info","pt-2"],[1,"svg-info","float-left"],[1,"body-text-xs","ml-4"],[1,"sns-container","d-flex","align-items-center","p-3"],[1,"sns-modal__trigger-btn-container","d-flex","flex-column"],["type","button","id","schedule-and-save-modal-button","aria-labelledby","butttonLabel",1,"btn","btn-secondary","btn-xl","sns-modal__trigger-btn",3,"click"],[1,"sns-modal__trigger-btn","text-center"],[1,"title-xxs","mt-2","sns-modal__ada-color"],["id","butttonLabel",1,"sr-only"],[1,"ar-spinner"],["alt","Loading..","role","presentation","src","/etc/designs/wcax-commons/images/icons/busy.gif"]],template:function(e,t){1&e&&(kf(0,"div",0),ph(1,ele,3,2,"ng-container",1)(2,tle,3,0,"ng-container",1),xf()),2&e&&(Vd(),zh("ngIf",t.showComponent),Vd(),zh("ngIf",!t.showComponent))},dependencies:[sy,cy,Ty],encapsulation:2})}}return e})(),nle=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})();function rle(e,t){if(1&e){let e=Mf();kf(0,"span",15),jf("click",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(6);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function sle(e,t){if(1&e){let e=Mf();kf(0,"div",9)(1,"div",10)(2,"button",11),jf("click",(function(){return Wa(e),Ha(Yf(5).clipCoupon())})),xf()(),kf(3,"div",12)(4,"div",13),am(5),ph(6,rle,2,1,"span",14),xf()()()}if(2&e){let e=Yf(5);Vd(2),Zf("id","couponAddBtn",e.coupons[0].offerId,""),gh("data-toggle",e.showBoxtop&&"07"===e.coupons[0].offerSubPgm?e.modalAttrName:null)("data-target",e.showBoxtop&&"07"===e.coupons[0].offerSubPgm?e.modalIdName:null)("aria-label","Clip coupon for "+e.singleCouponText+" for "+e.getProductFullName()),Vd(3),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetailsLink)}}function ale(e,t){if(1&e){let e=Mf();kf(0,"span",15),jf("click",(function(){return Wa(e),Ha(Yf(7).setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(7).setProductDetails("offer-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(7);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function ole(e,t){if(1&e&&(Ef(0),kf(1,"div",17),Tf(2,"span",18),kf(3,"div",19),am(4),xf()(),kf(5,"div",12)(6,"div",13),am(7),ph(8,ale,2,1,"span",14),xf(),kf(9,"div",20),am(10),xf(),kf(11,"span",21),am(12),xf()(),Df()),2&e){let e=Yf(6);Vd(4),lm(e.clippedText),Vd(3),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetailsLink),Vd(2),cm("Add ",e.coupons[0].minPurchaseQty," Total for Offer "),Vd(2),lm(e.adaText)}}function lle(e,t){if(1&e){let e=Mf();kf(0,"span",15),jf("click",(function(){return Wa(e),Ha(Yf(7).setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(7).setProductDetails("offer-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(7);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function cle(e,t){if(1&e&&(Ef(0),kf(1,"div",22)(2,"div",23),Tf(3,"span",24),xf(),kf(4,"div",12)(5,"div",13),am(6),ph(7,lle,2,1,"span",14),xf(),kf(8,"div",20)(9,"span",25),am(10,"ð"),xf(),kf(11,"span",26),am(12,"Congratulations"),xf(),kf(13,"span",27),am(14),xf()(),kf(15,"span",21),am(16),xf()()(),Df()),2&e){let e=Yf(6);Vd(6),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetailsLink),Vd(7),lm(e.offerCompletedText),Vd(2),lm(e.adaText)}}function dle(e,t){if(1&e&&(kf(0,"div",16),ph(1,ole,13,5,"ng-container",0)(2,cle,17,4,"ng-container",0),xf()),2&e){let e=Yf(5);Vd(),zh("ngIf",!e.isOfferCompleteVisible(e.coupons[0])),Vd(),zh("ngIf",e.isOfferCompleteVisible(e.coupons[0]))}}function ule(e,t){if(1&e&&(Ef(0),ph(1,sle,7,7,"div",7)(2,dle,3,2,"div",8),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf","U"===e.coupons[0].status||!0===e.coupons[0].deleted),Vd(),zh("ngIf","C"===e.coupons[0].status&&!1===e.coupons[0].deleted)}}function ple(e,t){if(1&e){let e=Mf();kf(0,"span",15),jf("click",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(6);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function hle(e,t){if(1&e&&(Ef(0),kf(1,"div",17),Tf(2,"span",18),kf(3,"div",19),am(4),xf()(),kf(5,"div",12)(6,"div",13),am(7),ph(8,ple,2,1,"span",14),xf(),kf(9,"div",20),am(10),xf(),kf(11,"span",21),am(12),xf()(),Df()),2&e){let e=Yf(5);Vd(4),lm(e.clippedText),Vd(3),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetail
1sLink&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(2),cm("Add ",e.coupons[0].minPurchaseQty," Total for Offer "),Vd(2),lm(e.adaText)}}function fle(e,t){if(1&e){let e=Mf();kf(0,"span",15),jf("click",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(6).setProductDetails("offer-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(6);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function mle(e,t){if(1&e&&(Ef(0),kf(1,"div",22)(2,"div",23),Tf(3,"span",24),xf(),kf(4,"div",12)(5,"div",13),am(6),ph(7,fle,2,1,"span",14),xf(),kf(8,"div",20)(9,"span",25),am(10,"ð"),xf(),kf(11,"span",26),am(12,"Congratulations"),xf(),kf(13,"span",27),am(14),xf()(),kf(15,"span",21),am(16),xf()()(),Df()),2&e){let e=Yf(5);Vd(6),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetailsLink),Vd(7),lm(e.offerCompletedText),Vd(2),lm(e.adaText)}}function gle(e,t){if(1&e&&(Ef(0),kf(1,"div",16),ph(2,hle,13,5,"ng-container",0)(3,mle,17,4,"ng-container",0),xf(),Df()),2&e){let e=Yf(4);Vd(2),zh("ngIf",!e.isOfferCompleteVisible(e.coupons[0])),Vd(),zh("ngIf",e.isOfferCompleteVisible(e.coupons[0]))}}function ble(e,t){if(1&e&&(Ef(0),ph(1,ule,3,2,"ng-container",0)(2,gle,4,2,"ng-container",0),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.coupons[0].isClippable),Vd(),zh("ngIf",e.coupons&&e.coupons.length>0&&!e.coupons[0].isClippable&&e.coupons[0].ecomDescription)}}function yle(e,t){if(1&e){let e=Mf();kf(0,"span",36),jf("click",(function(){return Wa(e),Ha(Yf(4).setProductDetails("bogo-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).setProductDetails("bogo-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(4);gh("aria-label","Details for "+e.bogoText+" offer for "+e.getProductFullName())}}function vle(e,t){if(1&e&&(kf(0,"div",28)(1,"div",29),Tf(2,"span",24),xf(),kf(3,"div",30)(4,"div",31),am(5),ph(6,yle,2,1,"span",32),xf(),kf(7,"div",33)(8,"span",34),am(9,"ð"),xf(),kf(10,"span",26),am(11,"Congratulations"),xf(),kf(12,"span",35),am(13),xf()(),kf(14,"span",21),am(15),xf()()()),2&e){let e=Yf(3);Vd(5),cm(" ",e.bogoText," "),Vd(),zh("ngIf",e.showDetailsLink&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(7),lm(e.offerCompletedText),Vd(2),lm(e.adaText)}}function wle(e,t){if(1&e){let e=Mf();kf(0,"span",41),jf("click",(function(){return Wa(e),Ha(Yf(4).setProductDetails("bogo-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).setProductDetails("bogo-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(4);gh("aria-label","Details for "+e.bogoText+" offer for "+e.getProductFullName())}}function _le(e,t){if(1&e&&(kf(0,"div",37)(1,"div",38),Tf(2,"span",18),kf(3,"span",26),am(4,"Clip"),xf()(),kf(5,"div",30)(6,"div",39),am(7),ph(8,wle,2,1,"span",40),xf(),kf(9,"div",33),am(10),xf(),kf(11,"span",21),am(12),xf()()()),2&e){let e=Yf(3);Vd(7),cm(" ",e.bogoText," "),Vd(),zh("ngIf",e.showDetailsLink&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(2),lm(e.bogoTextDetail),Vd(2),lm(e.adaText)}}function Sle(e,t){if(1&e){let e=Mf();kf(0,"a",45),jf("click",(function(){return Wa(e),Ha(Yf(5).setProductDetails("coupon-list"))})),am(1),xf()}if(2&e){let e=Yf(5);gh("aria-description",e.getProductFullName()),Vd(),lm(e.availableCoupons)}}function Cle(e,t){if(1&e){let e=Mf();kf(0,"a",45),jf("click",(function(){return Wa(e),Ha(Yf(5).setProductDetails("coupon-list"))})),am(1),xf()}if(2&e){let e=Yf(5);gh("aria-description",e.getProductFullName()),Vd(),lm(e.clippedCompletedCoupons)}}function Ile(e,t){if(1&e&&(Ef(0),ph(1,Sle,2,2,"a",44)(2,Cle,2,2,"a",44),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",0===e.offersClippedCounter),Vd(),zh("ngIf",e.offersClippedCounter>0)}}function Ale(e,t){if(1&e&&(kf(0,"div",47),am(1),xf()),2&e){let e=Yf(5);Vd(),lm(e.availableCoupons)}}function kle(e,t){if(1&e&&(kf(0,"div",47),am(1),xf()),2&e){let e=Yf(5);Vd(),lm(e.clippedCompletedCoupons)}}function xle(e,t){if(1&e&&(kf(0,"div"),ph(1,Ale,2,1,"div",46)(2,kle,2,1,"div",46),xf()),2&e){let e=Yf(4);Vd(),zh("ngIf",0===e.offersClippedCounter),Vd(),zh("ngIf",e.offersClippedCounter>0)}}function Tle(e,t){if(1&e&&(kf(0,"div",42),Tf(1,"span",43),ph(2,Ile,3,2,"ng-container",0)(3,xle,3,2,"div",0),xf()),2&e){let e=Yf(3);Vd(2),zh("ngIf",e.isClickableMultipleCoupons),Vd(),zh("ngIf",!e.isClickableMultipleCoupons)}}function Ple(e,t){if(1&e&&(Ef(0),ph(1,ble,3,2,"ng-container",0)(2,vle,16,4,"div",4)(3,_le,13,4,"div",5)(4,Tle,4,2,"div",6),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.isSingleOffer()),Vd(),zh("ngIf",e.isSingleBogoOffer()&&e.isOfferCompleteVisible(e.product)),Vd(),zh("ngIf",e.isSingleBogoOffer()&&!e.isOfferCompleteVisible(e.product)),Vd(),zh("ngIf",e.isMultipleOffer())}}function Ele(e,t){if(1&e){let e=Mf();kf(0,"span",54),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(4).setProductDetails("offer-detail",t))}))("keyup.enter",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(4).setProductDetails("offer-detail",t))})),am(1,"Details"),xf()}if(2&e){let e=Yf(7);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function Dle(e,t){if(1&e&&(Ef(0),kf(1,"div",16)(2,"div",17),Tf(3,"span",49),kf(4,"div",50),am(5),xf()(),kf(6,"div",51)(7,"div",13),am(8),ph(9,Ele,2,1,"span",52),xf(),kf(10,"div",53),am(11),xf(),kf(12,"span",21),am(13),xf(
1)()(),Df()),2&e){let e=Yf(2).$implicit,t=Yf(4);Vd(5),lm(t.clippedText),Vd(3),cm(" ",t.singleCouponText," "),Vd(),zh("ngIf",t.showDetailsLink),Vd(2),cm("Add ",e.minPurchaseQty," Total for Offers"),Vd(2),lm(t.adaText)}}function Ole(e,t){if(1&e){let e=Mf();kf(0,"span",54),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(4).setProductDetails("offer-detail",t))}))("keyup.enter",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(4).setProductDetails("offer-detail",t))})),am(1,"Details"),xf()}if(2&e){let e=Yf(7);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName())}}function Ble(e,t){if(1&e&&(Ef(0),kf(1,"div",22)(2,"div",55),Tf(3,"span",56),xf(),kf(4,"div",51)(5,"div",13),am(6),ph(7,Ole,2,1,"span",52),xf(),kf(8,"div",57)(9,"span",25),am(10,"ð"),xf(),kf(11,"span",26),am(12,"Congratulations"),xf(),kf(13,"span",27),am(14),xf()(),kf(15,"span",21),am(16),xf()()(),Df()),2&e){let e=Yf(6);Vd(6),cm(" ",e.singleCouponText," "),Vd(),zh("ngIf",e.showDetailsLink),Vd(7),lm(e.offerCompletedText),Vd(2),lm(e.adaText)}}function Mle(e,t){if(1&e&&(Ef(0),ph(1,Dle,14,5,"ng-container",0)(2,Ble,17,4,"ng-container",0),Df()),2&e){let e=Yf().$implicit,t=Yf(4);Vd(),zh("ngIf",!t.isOfferCompleteVisible(e)),Vd(),zh("ngIf",t.isOfferCompleteVisible(e))}}function Rle(e,t){if(1&e&&(Ef(0),ph(1,Mle,3,2,"ng-container",0),Df()),2&e){let e=t.$implicit,i=Yf(4);Vd(),zh("ngIf",!i.couponIsExpired(e))}}function Lle(e,t){if(1&e&&(Ef(0),ph(1,Rle,2,1,"ng-container",48),Df()),2&e){let e=Yf(3);Vd(),zh("ngForOf",e.NDCCoupons)}}function Fle(e,t){if(1&e){let e=Mf();kf(0,"span",62),jf("click",(function(){return Wa(e),Ha(Yf(6).setProductDetails("bogo-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(6).setProductDetails("bogo-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(6);gh("aria-label","Details for "+e.bogoText+" offer for "+e.getProductFullName())}}function Nle(e,t){if(1&e&&(Ef(0),kf(1,"div",37)(2,"div",58),Tf(3,"span",56),xf(),kf(4,"div",59)(5,"div",39),am(6),ph(7,Fle,2,1,"span",60),xf(),kf(8,"div",61),am(9),xf(),kf(10,"span",21),am(11),xf()()(),Df()),2&e){let e=Yf(5);Vd(6),cm(" ",e.bogoText," "),Vd(),zh("ngIf",e.showDetailsLink&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(2),lm(e.bogoTextDetail),Vd(2),lm(e.adaText)}}function Ule(e,t){if(1&e){let e=Mf();kf(0,"span",62),jf("click",(function(){return Wa(e),Ha(Yf(6).setProductDetails("bogo-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(6).setProductDetails("bogo-detail"))})),am(1,"Details"),xf()}if(2&e){let e=Yf(6);gh("aria-label","Details for "+e.bogoText+" offer for "+e.getProductFullName())}}function Vle(e,t){if(1&e&&(Ef(0),kf(1,"div",28)(2,"div",63),Tf(3,"span",56),xf(),kf(4,"div",59)(5,"div",39),am(6),ph(7,Ule,2,1,"span",60),xf(),kf(8,"div",64)(9,"span",65),am(10,"ð"),xf(),kf(11,"span",26),am(12,"Congratulations"),xf(),kf(13,"span",35),am(14,"Offer Complete!"),xf()()()(),Df()),2&e){let e=Yf(5);Vd(6),cm(" ",e.bogoText," "),Vd(),zh("ngIf",e.showDetailsLink&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType))}}function qle(e,t){if(1&e&&(Ef(0),ph(1,Nle,12,4,"ng-container",0)(2,Vle,15,2,"ng-container",0),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",!e.isOfferCompleteVisible(e.product)),Vd(),zh("ngIf",e.isOfferCompleteVisible(e.product))}}function $le(e,t){if(1&e&&(Ef(0),ph(1,qle,3,2,"ng-container",0),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.validateBogoTexts())}}function jle(e,t){if(1&e&&(Ef(0),ph(1,Lle,2,1,"ng-container",0)(2,$le,2,1,"ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.isMultipleNDCOffer()),Vd(),zh("ngIf",e.isSingleBogoOffer())}}function zle(e,t){if(1&e&&(kf(0,"div")(1,"div",2)(2,"div",3),ph(3,Ple,5,4,"ng-container",0)(4,jle,3,2,"ng-container",0),xf()()()),2&e){let e=Yf();Vd(3),zh("ngIf","minicart"!==e.parentComponent&&"product-detail"!==e.parentComponent),Vd(),zh("ngIf","product-detail"===e.parentComponent)}}function Wle(e,t){1&e&&Tf(0,"div",66)}var Hle=(()=>{class e{set carouselTitle(e){this._carouselTitle=e}get carouselTitle(){return this._carouselTitle}constructor(e,t,i,n,r,s,a){this._commonService=e,this._userInfoService=t,this._elementRef=i,this.cartService=n,this._utilService=r,this._productC
1ouponService=s,this.cartV2Service=a,this.showDetailsLink=!0,this.showOfferComplete=!0,this.isClickableMultipleCoupons=!0,this.includeOffer=!1,this.productCouponDetails=new _l,this.singleCouponClip=new _l,this.coupons=[],this.availableOffersCounter=0,this.offersClippedCounter=0,this.isWYSIWYGEnabled=!1,this.isValidCouponBOGO=!1,this.clippedText="Clipped",this.offerCompletedText="Offer Complete!",this.personalizedPriceLabel="Personalized Price: ",this.showBoxtop=!1,this.modalAttrName="modal",this.modalIdName="#boxtop-modal",this.adaText="",this.isProductCardV2=!1,this.bogoText="Buy 1 Get 1 Free - ",this.bogoTextDetail="Add 2 Total for Offer",this.someCompletedCouponsText="<completed> of <counter> Offers Complete",this.allCompletedCouponsText="<completed> Offers Complete",this.someClippedCouponsText="<clipped> of <counter> Offers Clipped",this.someCouponsText="<counter> Offers Available",this.availableCoupons=""}ngOnInit(){if(this.isProductCardV2=!0,this.product.isBOGO=this.isBogoOffer(),this.productOffers&&typeof this.productOffers.offers<"u"&&null!=this.productOffers.offers){this._commonService.objPageCoupons.offersByUpc.hasOwnProperty(this.product.upc)||(this._commonService.objPageCoupons.offersByUpc[this.product.upc]=[]);for(let e in this.productOffers.offers)if(this.productOffers.offers.hasOwnProperty(e)&&!this.couponIsExpired(this.productOffers.offers[e])){let t=this.productOffers.offers[e];t.hasOwnProperty("deliveryChannel")&&"EC"===t.deliveryChannel||(this.coupons.push(t),this._commonService.objPageCoupons.offers[e]=t,this._commonService.objPageCoupons.offersByUpc[this.product.upc].includes(e)||this._commonService.objPageCoupons.offersByUpc[this.product.upc].push(e))}}0===this.coupons.length&&!this.includeOffer&&this._processFromLocalStorage(),this._init(),this._commonService.shopCouponRefreshSource.subscribe((e=>{if(e&&"object"==typeof e&&"id"in e&&"deleted"in e&&"status"in e){if(this._processFromLocalStorage(),"object"==typeof e){let t=this.coupons.find((t=>t.offerId===e.id));t&&(t.deleted=e.deleted,t.status=e.status,this.coupons=[...this.coupons])}let t=JSON.parse(JSON.stringify(this.coupons)),i=JSON.parse(JSON.stringify(this.NDCCoupons));t.length>0&&(this.coupons=this.cartService.processOfferComplete(this.cartDetails,t,this.product)),i.length>0&&(this.NDCCoupons=this.cartService.processOfferComplete(this.cartDetails,i,this.product)),this.cartService.processBOGOComplete(this.cartDetails,this.product),this._init()}})),this._commonService.currentCartObj.subscribe((e=>{let t=this.cartV2Service.fetchCartDetailsFromResponse(e,this.cartV2Service.getCartName(this.configObj.programType));this.cartDetails=t,this.isWYSIWYGEnabled=this.cartDetails.isWYSIWYGEnabled;let i=JSON.parse(JSON.stringify(this.coupons)),n=JSON.parse(JSON.stringify(this.NDCCoupons));i.length>0&&(this.coupons=this.cartService.processOfferComplete(this.cartDetails,i,this.product)),n.length>0&&(this.NDCCoupons=this.cartService.processOfferComplete(this.cartDetails,n,this.product)),this.cartService.processBOGOComplete(this.cartDetails,this.product),this.availableOffersCounter>1&&this.setOfferCompleteText()}))}_init(){this.coupons=this.coupons.filter((e=>e.isClippable||!e.isClippable&&e.ecomDescription)),this.availableOffersCounter=this.coupons?this.coupons.length:0,this.NDCCoupons=this.coupons.filter((e=>!1===e.isClippable)),this.NDCCoupons=this.coupons.filter((e=>!1===e.isClippable&&e.ecomDescription)),this.isBogoOffer()&&(this.availableOffersCounter=this.availableOffersCounter+1),this.offersClippedCounter=this.availableOffersCounter>0?this._productCouponService.getOffersClipped(this.coupons):0,this.isBogoOffer()&&(this.offersClippedCounter=this.offersClippedCounter+1),this.setOfferCompleteText(),this.setBogoText(),1===this.availableOffersCounter&&1===this.coupons.length&&(this.singleCouponText=this.coupons[0].offerPgm&&"PD"===this.coupons[0].offerPgm?"Personalized Price: "+this.coupons[0].ecomDescription:this.coupons[0].ecomDescription,this.coupons[0].offerComplete=!!this.coupons[0].offerComplete&&this.coupons[0].offerComplete),this.productDetails={product:this.product,offerCounter:this.availableOffersCounter,offerClipped:this.offersClippedCounter,coupons:this.coupons}
1,this.productCouponDetails.emit(this.productDetails),this.isValidCouponBOGO=this.availableOffersCounter>0||this.isBogoOffer()&&this._commonService.isProductPromoActive(this.product),this.availableOffersCounter>1&&(this.availableCoupons=this.someCouponsText.replace("<counter>",this.availableOffersCounter.toString()))}setBogoText(){this.bogoText=this.product.promoDescription?`${this.product.promoDescription}${"1P_SNS"!==this.configObj.programType?"-":""}`:"",this.bogoTextDetail=this.product.promoText?this.product.promoText:""}validateBogoTexts(){return this.bogoText.length>0&&this.bogoTextDetail.length>0}setOfferCompleteText(){let e=!0===this.isWYSIWYGEnabled&&this.coupons&&this.coupons.length>0?this._productCouponService.getCouponsCompletedCounter(this.coupons):0;this.isBogoOffer()&&this.product.offerComplete&&!0===this.product.offerComplete&&(e+=1),e>0?e===this.availableOffersCounter?this.clippedCompletedCoupons=this.allCompletedCouponsText.replace("<completed>",e.toString()):this.clippedCompletedCoupons=this.someCompletedCouponsText.replace("<completed>",e.toString()).replace("<counter>",this.availableOffersCounter.toString()):this.setSomeClippedCouponsText(this.offersClippedCounter,this.availableOffersCounter)}setSomeClippedCouponsText(e,t){this.clippedCompletedCoupons=this.someClippedCouponsText.replace("<clipped>",e.toString()).replace("<counter>",t.toString())}isBogoOffer(){return("M"===this.product.promoType||"B"===this.product.promoType)&&this._commonService.isProductPromoActive(this.product)}_processFromLocalStorage(){let e=[];
1if(!localStorage.getItem("abCoupons")){let t=[];this._commonService.objPageCoupons&&this._commonService.objPageCoupons.offersByUpc&&this._commonService.objPageCoupons.offersByUpc[this.product.upc]&&this._commonService.objPageCoupons.offers&&this._commonService.objPageCoupons.offersByUpc[this.product.upc].forEach((e=>{t.push(this._commonService.objPageCoupons.offers[e])})),e="minicart"===this.parentComponent?t.filter((e=>"C"===e.status)):t}"minicart"===this.parentComponent?this.coupons=this.getCouponsFromProduct(e):this.coupons=e}getCouponsFromProduct(e){let t=[],i=this.product.clipped||[],n=this.product.savings||[];return n&&(n=n.filter((e=>1==e.display&&"CMS"!==e.source))),t=[...i,...n].filter((r=new Set,e=>!r.has(e.offerId)&&r.add(e.offerId))).map((e=>f(h({},e),{status:"C",offerId:e.omsOfferId,ecomDescription:e.displayOfferTxt,deleted:!1}))),[...t,...e].filter((e=>t=>!e.has(t.offerId)&&e.add(t.offerId))(new Set));var r}couponIsExpired(e){return this._productCouponService.isCouponExpired(e)}productPromoIsActive(e){return this._commonService.isProductPromoActive(e)}clipCoupon(){if("07"===this.coupons[0].offerSubPgm&&(window.AB.userInfo.boxTopAuth||!this._isRegistered())&&(this.modalAttrName="",this.modalIdName=""),this._isRegistered()){let e=window.AB.userInfo.branchId;this._updateAnalyticsDataLayer(),this._updateAnalyticsCarouselName();let t={nativeElement:this._elementRef.nativeElement};this._productCouponService.clipCoupon(this.coupons[0],e,null,t).subscribe((e=>{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.offersClippedCounter=1,this.coupons[0].status="C",this.coupons[0].deleted=!1,this._commonService.sendSponsoredProductClickEventForAllowedRoutes(this.product,"productCoupon","clipCoupon"),this._commonService.shopCouponRefreshSource.next({id:this.coupons[0]?.offerId,status:"C",deleted:!1}),this.trackCRSClick("coupon-clip-click",e),setTimeout((()=>{$("#clippedCoupon"+this.coupons[0].offerId).focus(),this.adaText="This coupon has been clipped."}),100),setTimeout((()=>{this.adaText=""}),500),this.singleCouponClip.emit(this.productDetails),"pdp"===$(".product-info").attr("data-pagetype")&&window.dispatchEvent(new CustomEvent("DigitalCouponClipped",{detail:{offerId:e.items[0].itemId}})))}))}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}_updateAnalyticsDataLayer(){if(window.AB&&window.AB.DATALAYER){let e=this._carouselTitle||window.AB.DATALAYER.getAnalyticsCarouselTitle(this._elementRef.nativeElement);window.AB.DATALAYER.productInfo({id:this.productDetails.product.id,name:this.productDetails.product.name,units:this.productDetails.product.units,listPrice:this.productDetails.product.price,basePrice:this.productDetails.product.basePrice,carouselSection:e||"",pricingType:this.productDetails.product.promoDescriptionVal||"",couponID:this.productDetails.coupons.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString(),couponFlag:this.productDetails.offerCounter,couponClipped:this.offersClippedCounter,aisleId:this.productDetails.product.aisleId,upc:this.productDetails.product.upc})}}_updateAnalyticsLinkClick(e,t){if(window.AB&&window.AB.DATALAYER)if(t)window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement);else{let t="";0===this.offersClippedCounter?(t=`${this.availableOffersCounter} Coupons Available`,window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):this.offersClippedCounter>0&&(t=`${this.offersClippedCounter} of ${this.availableOffersCounter} Coupons Clipped`,window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement))}}trackCRSClick(e,t){let i=window.AB&&window.AB.DATALAYER;if(!i||void 0===i.setCRSClickEvent||!i.isHomePage||!i.isHomePage())return;let n=localStorage.getItem("analyticsProductPlacement")||window.digitalData?.pageFilter?.placement,r=this._carouselTitle||i.getAnalyticsCarouselTitle?.(this._elementRef.nativeElement)||this.product?.carouselSection||"no-val",s=this.coupons?.[0]||{},a={linkName:e,mTyp:"product-carousel",element:this._elementRef.nativeElement,placement:n,component:i.getCRSComponent({element:this._elementRef.nativeElement,section:r,detail
1:this.product?.adobeMetrics?.metricA||this.product?.impressionAdditionalDetail||"no-val",placement:n})};if("coupon-clip-click"===e){let e=t?.items?.[0]||{};a.batchCouponsClipped=[{type:s?.offerPgm||s?.offerType||s?.offerProgramType||"no-val",name:s?.brand||s?.name||s?.description||this.product?.name||"no-val",id:String(s?.offerId||s?.couponID||e?.itemId||"no-val"),clipMthd:"singleclip",carouselSec:r,clipCnt:"1",clipID:e?.clipId||e?.clipID||t?.clipID||"no-val",clipTime:(new Date).toISOString(),divisionName:window.AB?.userInfo?.divisionName||window.AB?.userInfo?.division||"no-val",msgData:s?.msgData||s?.messageData||s?.analyticsTag||"no-val",savings:String(s?.savings||s?.savingsValue||"0")}]}i.setCRSClickEvent(a)}_updateAnalyticsModalViewSNS(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalViewEvents(e)}_updateAnalyticsCarouselName(){window.AB.DATALAYER&&this._carouselTitle&&window.AB.DATALAYER.setCarouselName("shop|"+this._carouselTitle)}setProductDetails(e,t){if(this._commonService.sendSponsoredProductClickEventForAllowedRoutes(this.product,"productCoupon","couponClick"),("offer-detail"===e||"coupon-list"===e)&&this.trackCRSClick("offer-details-click"),"1P_SNS"===this.configObj.programType)switch(e){case"offer-detail":this._commonService.dispatchCustomOneTimeEvent("snsOneTime","singleCoupon",{coupons:this.coupons[0]}),this._updateAnalyticsModalViewSNS("offer-details-j4u-productcards|view");break;case"coupon-list":this._commonService.dispatchCustomOneTimeEvent("snsOneTime","multipleCoupons",{product:this.product}),this._updateAnalyticsModalViewSNS("offer-details-multiple-productcards|view")}else{let i={};"coupon-list"===e?(i={type:e,couponList:this.coupons,product:this.product},this._updateAnalyticsLinkClick("offer-drawer-multiple-productcards",null)):"offer-detail"===e?this.parentComponent&&"minicart"===this.parentComponent?(i={type:e,coupon:t||this.coupons[0],product:this.product,triggeredElement:"mini-cart"},this._updateAnalyticsLinkClick("offer-drawer-j4u-minicart",this.singleCouponText)):(i=this.parentComponent&&"product-detail"===this.parentComponent?{type:e,coupon:t,product:this.product,triggeredElement:"single-coupon-product-card"}:{type:e,coupon:this.coupons[0],product:this.product,triggeredElement:"single-coupon-product-card"},this._updateAnalyticsLinkClick("offer-drawer-j4u-productcards",this.singleCouponText)):"bogo-detail"===e&&(this.parentComponent&&"minicart"===this.parentComponent?(i={type:e,product:this.product,triggeredElement:"mini-cart"},this._updateAnalyticsLinkClick("offer-drawer-bogo-minicart",this.bogoText)):(i={type:e,product:this.product,triggeredElement:"single-coupon-product-card"},this._updateAnalyticsLinkClick("offer-drawer-bogo-productcards",this.bogoText))),i=f(h({},i),{configObj:this.configObj}),"b4uspa"===this.configObj.appName&&window.rightdrawerCompAlRef?window.rightdrawerCompAlRef.zone.run((()=>{window.rightdrawerCompAlRef.component.openRightDrawer(i)})):this._commonService.rightDrawerSource.next(i)}}openJ4UModal(e){if("c-products-by-upc"!==this.couponCalledBy&&"offer"!==this.couponCalledBy){let t=e.target.id;$("#offerDetailModal").find(".modal-body").load(e.target.pathname,(()=>{this._commonService.initJ4UModal(),$("#offerDetailModal #loadingConMedium").hide(),$("#offerDetailModal").modal({show:!0,backdrop:"static"},$(`#${t}`))}))}else $("html, body").animate({scrollTop:0},"slow")}getProductFullName(){let e="";return this.productDetails&&this.productDetails.product&&(e=this.productDetails.product.fullName&&this.productDetails.product.fullName.length?this.productDetails.product.fullName:this.productDetails.product.name),e}_isRegistered(){return this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()}isSingleOffer(){return"minicart"===this.parentComponent?1===this.availableOffersCounter&&!this.product.isBOGO:1===this.availableOffersCounter&&!1===this.isProductCardV2||1===this.availableOffersCounter&&!0===this.isProductCardV2&&!this.product.isBOGO}isSingleBogoOffer(){return"minicart"===this.parentComponent||"product-detail"===this.parentComponent?this.product.isBOGO&&this.productPromoIsActive(this.product):1===this.availableOffersCounter&&this.isProductCardV2&&this.product.isBOGO&&this.productPromoIsActive(this.product)}isMultipleOffer(){return this.availableOffersCounter>1}isMultipleNDCOffer(){return this.NDCCoupons.length>0}isOfferCompleteVisible(e){return this.isSingleOffer()?this.isCartProduct()&&e.offerComplete&&this.showOfferComplete:e.offerComplete&&this.showOfferComplete}isCartProduct(){let e=this.cartDetails.cartItems;if(e){if(this.product.id)return e.find((e=>e.itemId.toString()===this.product.id.toString()));if(this.product.itemId)return e.find((e=>e.itemId.toString()===this.product.itemId.toString()))}return!1}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w),$d(Vl),$d(Rw),$d(Sw),$d(Lw),$d(Mw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-coupon-al-v1"]],inputs:{product:"product",parentComponent:"parentComponent",productOffers:"productOffers",couponCalledBy:"couponCalledBy",showDetail
vendor: 4,161 bytes, line 1
1sLink:"showDetailsLink",showOfferComplete:"showOfferComplete",isClickableMultipleCoupons:"isClickableMultipleCoupons",configObj:"configObj",includeOffer:"includeOffer",carouselTitle:"carouselTitle"},outputs:{productCouponDetails:"productCouponDetails",singleCouponClip:"singleCouponClip"},features:[xm([Lw])],decls:2,vars:2,consts:[[4,"ngIf"],["class","sm-empty-height",4,"ngIf"],[1,"product-coupon-wrapper-v3"],[1,"coupon-container"],["class","bogo-coupon bogo-coupon--offer-completed",4,"ngIf"],["class","bogo-coupon bogo-coupon--offer-not-completed",4,"ngIf"],["aria-live","polite","class","multiple-coupon",4,"ngIf"],["class","single-coupon single-coupon--unclipped",4,"ngIf"],["class","single-coupon single-coupon--clipped",4,"ngIf"],[1,"single-coupon","single-coupon--unclipped"],[1,"single-coupon__clip-button"],[3,"click","id"],[1,"single-coupon__details"],[1,"single-coupon__details-text"],["class","single-coupon__details-text__link","tabindex","0","role","button",3,"click","keyup.enter",4,"ngIf"],["tabindex","0","role","button",1,"single-coupon__details-text__link",3,"click","keyup.enter"],[1,"single-coupon","single-coupon--clipped"],[1,"single-coupon__clipped-icon"],["aria-hidden","true",1,"svg-coupon-clipped-icon"],[1,"single-coupon__clipped-icon__info","single-coupon__clipped-icon__info--small"],[1,"single-coupon__details-info"],["aria-live","polite",1,"sr-only"],[1,"single-coupon","single-coupon--offer-completed"],[1,"single-coupon__tick-icon"],[1,"svg-coupon-tick-mark"],["aria-hidden","true",1,"single-coupon__details-info__party-icon"],[1,"sr-only"],[1,"single-coupon__details-info__text"],[1,"bogo-coupon","bogo-coupon--offer-completed"],[1,"bogo-coupon__tick-icon"],["aria-live","polite",1,"bogo-coupon__details"],["data-qa","rw-crt-itm-bg-cpn-clppd-offr",1,"bogo-coupon__details-text"],["class","bogo-coupon__details-text__link","data-qa","rw-crt-itm-bg-cpn-dtils-lnk","tabindex","0","role","button",3,"click","keyup.enter",4,"ngIf"],[1,"bogo-coupon__details-info"],["aria-hidden","true",1,"bogo-coupon__details-info__party-icon"],[1,"bogo-coupon__details-info__text"],["data-qa","rw-crt-itm-bg-cpn-dtils-lnk","tabindex","0","role","button",1,"bogo-coupon__details-text__link",3,"click","keyup.enter"],[1,"bogo-coupon","bogo-coupon--offer-not-completed"],[1,"bogo-coupon__clipped-icon"],[1,"bogo-coupon__details-text"],["class","bogo-coupon__details-text__link","tabindex","0","role","button",3,"click","keyup.enter",4,"ngIf"],["tabindex","0","role","button",1,"bogo-coupon__details-text__link",3,"click","keyup.enter"],["aria-live","polite",1,"multiple-coupon"],["aria-hidden","true",1,"svg-scissor"],["href","javascript:void(0);","role","button","class","multiple-coupon__text",3,"click",4,"ngIf"],["href","javascript:void(0);","role","button",1,"multiple-coupon__text",3,"click"],["class","multiple-coupon__not-clickable",4,"ngIf"],[1,"multiple-coupon__not-clickable"],[4,"ngFor","ngForOf"],["aria-hidden","true","data-qa","svg-icn-deal",1,"svg-checkedSucces"],["data-qa","sngl-cpn-clppd-txt",1,"single-coupon__clipped-icon__info","single-coupon__clipped-icon__info--small"],["data-qa","sngl-cpn-dtls-lnk",1,"single-coupon__details"],["class","single-coupon__details-text__link","role","button","tabindex","0","data-qa","dtls-for-cpn",3,"click","keyup.enter",4,"ngIf"],["data-qa","sngl-cpn-clppd-offr",1,"single-coupon__details-info"],["role","button","tabindex","0","data-qa","dtls-for-cpn",1,"single-coupon__details-text__link",3,"click","keyup.enter"],["data-qa","sngl-cpn-clppd-icn",1,"single-coupon__tick-icon"],["aria-hidden","true",1,"svg-checkedSucces"],["data-qa","cpn-clppd-offr-cmpltd",1,"single-coupon__details-info"],["data-qa","w-crt-itm-bg-cpn-clppd-icon",1,"bogo-coupon__clipped-icon"],["data-qa","bg-cpn-clppd-dtls",1,"bogo-coupon__details"],["data-qa","rw-crt-itm-bg-cpn-dtils-lnk","class","bogo-coupon__details-text__link","role","button","tabindex","0",3,"click","keyup.enter",4,"ngIf"],["data-qa","bgo-cpn-clppd-offr",1,"bogo-coupon__details-info"],["data-qa","rw-crt-itm-bg-cpn-dtils-lnk","role","button","tabindex","0",1,"bogo-coupon__details-text__link",3,"click","keyup.enter"],["data-qa","w-crt-itm-bg
1-cpn-clppd-icon",1,"bogo-coupon__tick-icon"],["data-qa","bg-cpn-clppd-offr-cmpltd",1,"bogo-coupon__details-info"],["aria-hidden","true","data-qa","bg-cpn-clppd-offr-cmpltd-prty-icon",1,"bogo-coupon__details-info__party-icon"],[1,"sm-empty-height"]],template:function(e,t){1&e&&ph(0,zle,5,2,"div",0)(1,Wle,1,0,"div",1),2&e&&(zh("ngIf",t.isValidCouponBOGO),Vd(),zh("ngIf",!t.coupons))},dependencies:[oy,cy],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function Yle(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1)(2,"button",2),jf("click",(function(t){Wa(e);let i=Yf(4);return t.stopPropagation(),Ha(i.setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).setProductDetails("offer-detail"))})),kf(3,"span",3),am(4),xf()(),kf(5,"button",4),jf("click",(function(){return Wa(e),Ha(Yf(4).clipCoupon())})),Tf(6,"span",5),xf()(),Df()}if(2&e){let e=Yf(4);Vd(2),gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName()+" unclipped, view deals"),Vd(2),lm(e.singleCouponText),Vd(),Zf("id","couponAddBtn",e.coupons[0].offerId,""),gh("aria-label","Clip coupon for "+e.singleCouponText+" for "+e.getProductFullName())}}function Gle(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1)(2,"button",2),jf("click",(function(t){Wa(e);let i=Yf(4);return t.stopPropagation(),Ha(i.setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).setProductDetails("offer-detail"))})),kf(3,"span",3),am(4),xf()(),Tf(5,"span",6),kf(6,"span",7),am(7),xf()(),Df()}if(2&e){let e=Yf(4);Vd(2),gh("aria-label",e.singleCouponText+" coupon clipped for "+e.getProductFullName()+" clipped, view deals"),Vd(2),lm(e.singleCouponText),Vd(3),lm(e.adaText)}}function Kle(e,t){if(1&e&&(Ef(0),ph(1,Yle,7,5,"ng-container",0)(2,Gle,8,3,"ng-container",0),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf","U"===(null==e.coupons[0]?null:e.coupons[0].status)||!0===(null==e.coupons[0]?null:e.coupons[0].deleted)),Vd(),zh("ngIf","C"===(null==e.coupons[0]?null:e.coupons[0].status)&&!1===(null==e.coupons[0]?null:e.coupons[0].deleted))}}function Qle(e,t){if(1&e){let e=Mf();kf(0,"button",2),jf("click",(function(t){Wa(e);let i=Yf(4);return t.stopPropagation(),Ha(i.setProductDetails("offer-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(4).setProductDetails("offer-detail"))})),kf(1,"span",3),am(2),xf()()}if(2&e){let e=Yf(4);gh("aria-label","Details for "+e.singleCouponText+" coupon for "+e.getProductFullName()),Vd(2),lm(e.singleCouponText)}}function Jle(e,t){if(1&e&&(kf(0,"div",11)(1,"span",12),am(2),xf(),kf(3,"span",13),am(4),xf()()),2&e){let e=Yf(4);Vd(2),lm("Details for "+e.singleCouponText+" coupon for "+e.getProductFullName()),Vd(2),lm(e.singleCouponText)}}function Zle(e,t){if(1&e&&(Ef(0),kf(1,"div",1),ph(2,Qle,3,2,"button",8)(3,Jle,5,2,"div",9),Tf(4,"span",10),kf(5,"span",7),am(6),xf()(),Df()),2&e){let e=Yf(3);Vd(2),zh("ngIf","1P_SNS"!==(null==e.configObj?null:e.configObj.programType)&&"1P_OA"!==(null==e.configObj?null:e.configObj.appName)),Vd(),zh("ngIf","1P_SNS"===(null==e.configObj?null:e.configObj.programType)||"1P_OA"===(null==e.configObj?null:e.configObj.appName)),Vd(3),lm(e.adaText)}}function Xle(e,t){if(1&e&&(Ef(0),ph(1,Kle,3,2,"ng-container",0)(2,Zle,7,3,"ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",(null==e.coupons[0]?null:e.coupons[0].isClippable)&&(null==e.coupons[0]?null:e.coupons[0].ecomDescription)),Vd(),zh("ngIf",e.coupons&&e.coupons.length>0&&!e.coupons[0].isClippable&&e.coupons[0].ecomDescription)}}function ece(e,t){if(1&e){let e=Mf();kf(0,"button",2),jf("click",(function(t){Wa(e);let i=Yf(3);return t.stopPropagation(),Ha(i.setProductDetails("bogo-detail"))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(3).setProductDetails("bogo-detail"))})),kf(1,"span",3),am(2),xf()()}if(2&e){let e=Yf(3);gh("aria-label","Details for "+e.bogoText+" offer for "+e.getProductFullName()),Vd(2),lm(e.bogoText)}}function tce(e,t){if(1&e&&(kf(0,"div",11)(1,"span",12),am(2),xf(),kf(3,"span",13),am(4),xf()()),2&e){let e=Yf(3);Vd(2),lm("Details for "+e.bogoText+" offer for "+e.getProductFullName()),Vd(2),lm(e.bogoText)}}function ice(e,t){if(1&e&&(Ef(0),kf(1,"div",1),ph(2,ece,3,2,"button",8)(3,tce,5,2,"div",9),Tf(4,"span",10),kf(5,"span",7),am(6),xf()(),Df()),2&e){let e=Yf(2);Vd(2),zh("ngIf","1P_SNS"!==(null==e.configObj?null:e.configObj.programType)&&"1P_OA"!==(null==e.configObj?null:e.configObj.appName)),Vd(),zh("ngIf","1P_SNS"===(null==e.configObj?null:e.configObj.programType)||"1P_OA"===(null==e.configObj?null:e.configObj.appName)),Vd(3),lm(e.adaText)}}function nce(e,t){if(1&e){let e=Mf();kf(0,"div",15)(1,"button",16),jf("click",(function(t){Wa(e);let i=Yf(3);return t.stopPropagation(),Ha(i.setProductDetails("coupon-list"))})),kf(2,"span",3),am(3),xf()()()}if(2&e){let e=Yf(3);Vd(),gh("aria-label",e.couponsText+" for "+e.getProductFullName()),Vd(2),lm(e.couponsText)}}function rce(e,t){1&e&&(Ef(0),Tf(1,"span",10),kf(2,"span",7),am(3,"clipped"),xf(),Df())}function sce(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",15)(2,"button",16),jf("click",(function(t){Wa(e);let i=Yf(3);return t.stopPropagation(),Ha(i.setProductDetails("coupon-list"))})),kf(3,"span",3),am(4),xf()(),ph(5,rce,4,0,"ng-container",0),xf(),Df()}if(2&e){let e=Yf(3);Vd(2),gh("aria-label",e.couponsText+" for "+e.getProductFullName()+" "+e.offersClippedCounter+" of "+e.availableOffersCounter+" clipped, view deals"),Vd(2),lm(e.multipleClippedCouponsText),Vd(),zh("ngIf",e.offersClippedCounter===e.availableOffersCounter)}}function ace(e,t){if(1&e&&(Ef(0),ph(1,nce,4,2,"div",14)(2,sce,6,3,"
1ng-container",0),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",0===e.offersClippedCounter),Vd(),zh("ngIf",e.offersClippedCounter>0)}}function oce(e,t){if(1&e&&(Ef(0),ph(1,Xle,3,2,"ng-container",0)(2,ice,7,3,"ng-container",0)(3,ace,3,2,"ng-container",0),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.isSingleOffer()),Vd(),zh("ngIf",e.isSingleBogoOffer()),Vd(),zh("ngIf",e.availableOffersCounter>1)}}var lce=(()=>{class e{set carouselTitle(e){this._carouselTitle=e}get carouselTitle(){return this._carouselTitle}constructor(e,t,i,n,r,s,a,o){this._commonService=e,this._userInfoService=t,this._elementRef=i,this.cartService=n,this._utilService=r,this._productCouponService=s,this.cartV2Service=a,this._aemService=o,this.productCouponDetails=new _l,this.coupons=[],this.availableOffersCounter=0,this.offersClippedCounter=0,this.isBOGO=!1,this.modalAttrName="modal",this.modalIdName="#boxtop-modal",this.adaText="",this.isWYSIWYGEnabled=!1,this.bogoText="",this.multipleClippedCouponsText="",this.couponsText="<counter> deals available"}ngOnInit(){this.productCouponInit()}productCouponInit(){if(this.isBOGO=this.isBogoOffer(),this.productOffers&&typeof this.productOffers.offers<"u"&&null!=this.productOffers.offers)for(let e in this.productOffers.offers)if(this.productOffers.offers.hasOwnProperty(e)&&!this.couponIsExpired(this.productOffers.offers[e])){let t=this.productOffers.offers[e];t.hasOwnProperty("deliveryChannel")&&"EC"===t.deliveryChannel||this.coupons.push(this.productOffers.offers[e])}this.productDetails={product:this.product,offerCounter:this.availableOffersCounter,offerClipped:this.offersClippedCounter,coupons:this.coupons},this.productCouponDetails.emit(this.productDetails),this.processOfferByType(),this._commonService.shopCouponRefreshSource.subscribe((e=>{if(e&&"object"==typeof e&&"id"in e&&"deleted"in e&&"status"in e){let t=this.coupons.find((t=>t.offerId===e.id));t&&(t.deleted=e.deleted,t.status=e.status,this.coupons=[...this.coupons]);let i=JSON.parse(JSON.stringify(this.coupons));i.length>0&&(this.coupons=this.cartService.processOfferComplete(this.cartDetails,i,this.product)),this.cartService.processBOGOComplete(this.cartDetails,this.product),this.processOfferByType(),this.productDetails={product:this.product,offerCounter:this.availableOffersCounter,offerClipped:this.offersClippedCounter,coupons:this.coupons},this.productCouponDetails.emit(this.productDetails)}})),this._commonService.currentCartObj.subscribe((e=>{let t=this.cartV2Service.fetchCartDetailsFromResponse(e,this.cartV2Service.getCartName(this.configObj.programType));this.cartDetails=t,this.isWYSIWYGEnabled=this.cartDetails.isWYSIWYGEnabled;let i=JSON.parse(JSON.stringify(this.coupons));i.length>0&&(this.coupons=this.cartService.processOfferComplete(this.cartDetails,i,this.product)),this.cartService.processBOGOComplete(this.cartDetails,this.product)})),this._clipCouponSubscription=this._productCouponService.clipDigitalCouponEvent$.pipe(qi((e=>e===this.product.upc&&this._isSingleUnClipDigitalCoupon()))).subscribe((e=>{this.clipCoupon()}))}processOfferByType(){this.coupons=this.coupons.filter((e=>e.isClippable||!e.isClippable&&e.ecomDescription)),this.availableOffersCounter=this.coupons?this.coupons.length:0,this.offersClippedCounter=this.availableOffersCounter>0?this._productCouponService.getOffersClipped(this.coupons):0,this.isBOGO&&(this.availableOffersCounter=this.availableOffersCounter+1,this.offersClippedCounter=this.offersClippedCounter+1,this.setBogoText()),this.setSingleCouponText(),this.setClippedCouponsText(),this.availableOffersCounter>1&&(this.couponsText=this.couponsText.replace("<counter>",this.availableOffersCounter.toString()))}setBogoText(){this.bogoText=this.product.promoDescription?`${this.product.promoDescription}`:""}setSingleCouponText(){1===this.availableOffersCounter&&1===this.coupons.length&&(this.singleCouponText=this.coupons[0].ecomDescription,this.coupons[0].offerComplete=!!this.coupons[0].offerComplete&&this.coupons[0].offerComplete)}setClippedCouponsText(){this.multipleClippedCouponsText=`${this.offersClippedCounter} of ${this.availableOffersCounter} clipped`}isBogoOffer(){return("M"===this.product.promoType||"B"===this.product.promoType)&&this.productPromoIsActive(this.product)}
1couponIsExpired(e){return this._productCouponService.isCouponExpired(e)}productPromoIsActive(e){return this._commonService.isProductPromoActive(e)}clipCoupon(){if("07"===this.coupons[0].offerSubPgm&&(window.AB.userInfo.boxTopAuth||!this._isRegistered())&&(this.modalAttrName="",this.modalIdName=""),this._isRegistered()){let e=window.AB.userInfo.branchId;this._updateAnalyticsDataLayer(),this._updateAnalyticsCarouselName(),this._productCouponService.clipCoupon(this.coupons[0],e).subscribe((e=>{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.coupons[0].status="C",this.coupons[0].deleted=!1,this.offersClippedCounter=1,this._commonService.sendSponsoredProductClickEventForAllowedRoutes(this.product,"productCoupon","clipCoupon"),this._commonService.shopCouponRefreshSource.next({id:this.coupons[0]?.offerId,status:"C",deleted:!1}),this.trackCRSClick("coupon-clip-click",e),setTimeout((()=>{$("#clippedCoupon"+this.coupons[0].offerId).focus(),this.adaText=`${this.coupons[0].ecomDescription} coupon has been clipped.`}),100),setTimeout((()=>{this.adaText=""}),500),"pdp"===$(".product-info").attr("data-pagetype")&&window.dispatchEvent(new CustomEvent("DigitalCouponClipped",{detail:{offerId:e.items[0].itemId}})))}))}else window.AB.COMMON.showSignInModal_OTP(window.location.href)}_isSingleUnClipDigitalCoupon(){return 1===this.availableOffersCounter&&!this.isBOGO&&(this.coupons[0]?.isClippable&&("U"===this.coupons[0]?.status||!0===this.coupons[0]?.deleted))}_updateAnalyticsDataLayer(){if(window.AB&&window.AB.DATALAYER){let e=this._carouselTitle||window.AB.DATALAYER.getAnalyticsCarouselTitle(this._elementRef.nativeElement);window.AB.DATALAYER.productInfo({id:this.product.id,name:this.product.name,units:this.product.units,listPrice:this.product.price,basePrice:this.product.basePrice,carouselSection:e||"",pricingType:this.product.promoDescriptionVal||"",couponID:this.coupons.filter((e=>"C"===e.status)).map((e=>e.offerId)).toString(),couponFlag:this.availableOffersCounter,couponClipped:this.offersClippedCounter,aisleId:this.product.aisleId,upc:this.product.upc})}}_updateAnalyticsLinkClick(e,t){if(window.AB&&window.AB.DATALAYER)if(t)window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement);else{let t="";0===this.offersClippedCounter?(t=`${this.availableOffersCounter} Coupons Available`,window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):this.offersClippedCounter>0&&(t=`${this.offersClippedCounter} of ${this.availableOffersCounter} Coupons Clipped`,window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement))}}trackCRSClick(e,t){let i=window.AB&&window.AB.DATALAYER;if(!i||void 0===i.setCRSClickEvent||!i.isHomePage||!i.isHomePage())return;let n=localStorage.getItem("analyticsProductPlacement")||window.digitalData?.pageFilter?.placement,r=this._carouselTitle||i.getAnalyticsCarouselTitle?.(this._elementRef.nativeElement)||this.product?.carouselSection||"no-val",s=this.coupons?.[0]||{},a={linkName:e,mTyp:"product-carousel",element:this._elementRef.nativeElement,placement:n,component:i.getCRSComponent({element:this._elementRef.nativeElement,section:r,detail:this.product?.adobeMetrics?.metricA||this.product?.impressionAdditionalDetail||"no-val",placement:n})};if("coupon-clip-click"===e){let e=t?.items?.[0]||{};a.batchCouponsClipped=[{type:s?.offerPgm||s?.offerType||s?.offerProgramType||"no-val",name:s?.brand||s?.name||s?.description||this.product?.name||"no-val",id:String(s?.offerId||s?.couponID||e?.itemId||"no-val"),clipMthd:"singleclip",carouselSec:r,clipCnt:"1",clipID:e?.clipId||e?.clipID||t?.clipID||"no-val",clipTime:(new Date).toISOString(),divisionName:window.AB?.userInfo?.divisionName||window.AB?.userInfo?.division||"no-val",msgData:s?.msgData||s?.messageData||s?.analyticsTag||"no-val",savings:String(s?.savings||s?.savingsValue||"0")}]}i.setCRSClickEvent(a)}_updateAnalyticsModalViewSNS(e){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setModalViewEvents(e)}_updateAnalyticsCarouselName(){window.AB.DATALAYER&&this._carouselTitle&&window.AB.DATALAYER.setCarouselName("shop|"+this._carouselTitle)}setProductDetails(e,t){this._commonService.sendSponsoredProductClickEventForAllowedRoutes(this.product,"productC
1oupon","couponClick"),("offer-detail"===e||"coupon-list"===e)&&this.trackCRSClick("offer-details-click");let i="1P_SNS"===this.configObj.programType,n="1P_OA"===this.configObj.appName;if(i||n){let t=n?"productCardComponentUpdate":"snsOneTime";if(!t)return;switch(e){case"offer-detail":this._commonService.dispatchCustomOneTimeEvent(t,"singleCoupon",{coupons:this.coupons[0]}),this._updateAnalyticsModalViewSNS("offer-details-j4u-productcards|view");break;case"coupon-list":this._commonService.dispatchCustomOneTimeEvent(t,"multipleCoupons",{product:this.product}),this._updateAnalyticsModalViewSNS("offer-details-multiple-productcards|view")}}else{let t={};"coupon-list"===e?(t={type:e,couponList:this.coupons,product:this.product},this._updateAnalyticsLinkClick("offer-drawer-multiple-productcards",null)):"offer-detail"===e?(t={type:e,coupon:this.coupons[0],product:this.product,triggeredElement:"single-coupon-product-card"},this._updateAnalyticsLinkClick("offer-drawer-j4u-productcards",this.singleCouponText)):"bogo-detail"===e&&(t={type:e,product:this.product,triggeredElement:"single-coupon-product-card"},this._updateAnalyticsLinkClick("offer-drawer-bogo-productcards",this.bogoText)),t=f(h({},t),{configObj:this.configObj}),"b4uspa"===this.configObj.appName&&window.rightdrawerCompAlRef?window.rightdrawerCompAlRef.zone.run((()=>{window.rightdrawerCompAlRef.component.openRightDrawer(t)})):this._commonService.rightDrawerSource.next(t)}}getProductFullName(){let e="";return this.product&&(e=this.product.fullName?this.product.fullName:this.product.name),e}_isRegistered(){return this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()}isSingleOffer(){return 1===this.availableOffersCounter&&!this.isBOGO}isSingleBogoOffer(){return 1===this.availableOffersCounter&&this.isBOGO&&this.productPromoIsActive(this.product)}ngOnDestroy(){this._clipCouponSubscription?.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w),$d(Vl),$d(Rw),$d(Sw),$d(Lw),$d(Mw),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-coupon-al-v2"]],inputs:{product:"product",productOffers:"productOffers",couponCalledBy:"couponCalledBy",configObj:"configObj",carouselTitle:"carouselTitle"}
1,outputs:{productCouponDetails:"productCouponDetails"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"product-coupon__info","d-flex","sunshine50","px-2","py-1"],[1,"border-0","sunshine50","p-0",3,"click","keyup.enter"],[1,"body-text-xs","product-coupon__info__text","text-wrap","text-left","color-neutral-90"],["data-qa","clpscssrs-btn",1,"product-coupon__icon-circle","rounded-circle","p-0","d-flex","justify-content-center","align-items-center",3,"click","id"],[1,"svg-scissor","background-color-primary-default","m-0"],["data-qa","clpchk-btn","aria-hidden","true",1,"svg-coupon-redesign-tick-mark","background-color-primary-default","m-1"],["aria-live","polite",1,"sr-only"],["class","border-0 sunshine50 p-0",3,"click","keyup.enter",4,"ngIf"],["class","border-0 sunshine50 p-0",4,"ngIf"],["aria-hidden","true",1,"svg-coupon-redesign-tick-mark","background-color-primary-default","m-1"],[1,"border-0","sunshine50","p-0"],[1,"sr-only"],["aria-hidden","true",1,"body-text-xs","product-coupon__info__text","text-wrap","text-left","color-neutral-90"],["aria-live","polite","class","product-coupon__info d-flex sunshine50 px-2 py-1",4,"ngIf"],["aria-live","polite",1,"product-coupon__info","d-flex","sunshine50","px-2","py-1"],["data-qa","prd-itm-multi-coupon",1,"border-0","sunshine50","p-0",3,"click"]],template:function(e,t){1&e&&ph(0,oce,4,3,"ng-container",0),2&e&&zh("ngIf",t.availableOffersCounter>0)},dependencies:[cy],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),cce=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[Hle],imports:[Ly]})}}return e})(),dce=["checkboxInput"],uce=e=>({"pc-contained":e}),pce=e=>({"pc__tc__cta-container--unselected":e}),hce=e=>({"pc__bc--unselected":e}),fce=e=>({"product-comp-v1__price__saleprice sunshine50 rounded":e}),mce=e=>({"pc__tooltip ":e}),gce=e=>({"pc__tap-zone--qsc":e}),bce=e=>({"pc__tc__imgc--unselected":e});function yce(e,t){if(1&e){let e=Mf();kf(0,"a",26),qm(1,"currency"),jf("click",(function(){Wa(e);let t=Yf();return t.sendAdIdClickEvent(),t.onProductClicked(),Ha(t.setPfmDetailProduct())})),xf()}if(2&e){let e=Yf();Ch("aria-label","",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name,",price approximatly ",jm(1,6,e.validPrice,"USD")," ",e.isLBProduct()?"lb":"each",""),zh("ngClass",Om(9,gce,"buyItAgainQsc"===e.calledBy)),gh("href",e.productDetailPath,id)}}function vce(e,t){if(1&e&&(Ef(0),kf(1,"span",27),am(2),xf(),Df()),2&e){let e=Yf();Vd(),gh("data-qa",e.isProductSubscribed?"ar-schdld-subscrbd":"bia_bdg"),Vd(),lm(e.isProductSubscribed?"Subscribed":"Buy again")}}function wce(e,t){if(1&e&&Tf(0,"span",30),2&e){let e=Yf(2);df("mr-1 ","pds-svg-"+(null==e.badgeToDisplay?null:e.badgeToDisplay.icon),"")}}function _ce(e,t){if(1&e&&(kf(0,"span",28),ph(1,wce,1,3,"span",29),am(2),xf()),2&e){let e=Yf();uf("d-flex flex-row text-xs",e.badgeToDisplay.isBoldText?"-b":""," pds-tag pds-tag-sizes--medium pds-tag-primary-colors--",(null==e.badgeToDisplay?null:e.badgeToDisplay.color)||"neutral"," position-absolute"),gh("data-qa",e.isProductSubscribed?"ar-schdld-subscrbd":"bia_bdg"),Vd(),zh("ngIf",!(null==e.badgeToDisplay||!e.badgeToDisplay.icon)),Vd(),cm(" ",null==e.badgeToDisplay?null:e.badgeToDisplay.badgeName," ")}}function Sce(e,t){if(1&e&&(Ef(0),kf(1,"span",40),am(2),xf(),Df()),2&e){let e=Yf(3);Vd(),zh("id","pg"+e.product.id+"-chk-label"),Vd(),cm(" Unselect this checkbox to remove ",e.product.name," from your quick start cart.")}}function Cce(e,t){if(1&e&&(Ef(0),kf(1,"span",40),am(2),xf(),Df()),2&e){let e=Yf(3);Vd(),zh("id","pg"+e.product.id+"-chk-label"),Vd(),cm(" Select this checkbox to add ",e.product.name," to your quick start cart.")}}function Ice(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",35)(2,"label",36)(3,"input",37,1),jf("keydown.enter",(function(t){return Wa(e),Ha(Yf(2).onCheckboxClick(t))}))("click",(function(t){return Wa(e),Ha(Yf(2).onCheckboxClick(t))})),xf(),kf(5,"span",38),Tf(6,"span",39),xf(),ph(7,Sce,3,2,"ng-container",6)(8,Cce,3,2,"ng-container",6),xf()(),Df()}if(2&e){let e=Yf(2);
1Vd(2),zh("for","pg"+e.product.id+"-chk"),Vd(),Zf("id","pg",e.product.id,"-chk"),gh("aria-checked",e.isCheckboxChecked),Vd(2),zh("ngClass",!0===e.isCheckboxChecked?"pc__tc__checkbox__checkmark--checked":"pc__tc__checkbox__checkmark"),Vd(2),zh("ngIf",!0===e.isCheckboxChecked),Vd(),zh("ngIf",!1===e.isCheckboxChecked)}}function Ace(e,t){if(1&e&&(Ef(0),Tf(1,"img",41),Df()),2&e){let e=Yf(2);Vd(),Jf("alt",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name),zh("src",e.getImageUrl(e.product.id,"desktop"),id),gh("data-src",e.getImageUrl(e.product.id,"desktop"))}}function kce(e,t){if(1&e&&Tf(0,"img",42),2&e){let e=Yf(2);Jf("alt",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name),gh("data-src",e.getImageUrl(e.product.id,"desktop"))}}function xce(e,t){if(1&e&&(Ef(0),ph(1,Ice,9,7,"ng-container",6),kf(2,"div",31)(3,"div",32)(4,"picture"),Tf(5,"source",33)(6,"source",33),ph(7,Ace,2,3,"ng-container",34)(8,kce,1,2,"ng-template",null,0,Wm),xf()()(),Df()),2&e){let e=sm(9),t=Yf();Vd(),zh("ngIf","buyItAgainQsc"===t.calledBy),Vd(),zh("ngClass",Om(15,bce,"buyItAgainQsc"===t.calledBy&&!1===t.isCheckboxChecked)),Vd(),Jf("id","pg"+t.product.id+"Img"),gh("data-bpn",t.product.id),Vd(),Kh(t.bgImgOpaque),Vd(),Zf("media","(max-width: ",t.sm,")"),gh("data-srcset",t.getImageUrl(t.product.id,"mobile")),Vd(),Zf("media","(max-width: ",t.md,")"),gh("data-srcset",t.getImageUrl(t.product.id,"tablet")),Vd(),zh("ngIf","cart"===(null==t.configObj?null:t.configObj.appName)||"dnf"===(null==t.configObj?null:t.configObj.appName)||"dnf"===(null==t.configObj?null:t.configObj.programType))("ngIfElse",e)}}function Tce(e,t){if(1&e&&(Ef(0),Tf(1,"quantity-stepper-al-v2",43),Df()),2&e){let e=Yf();Vd(),Zf("id","pg",e.product.id,"-qty"),zh("product",e.product)("calledBy",e.calledBy)("configObj",e.configObj)}}function Pce(e,t){1&e&&(Ef(0),kf(1,"span",44),am(2," approx. "),xf(),Df())}function Ece(e,t){1&e&&(Ef(0),kf(1,"span",45),am(2,"Sponsored"),xf(),Df())}function Dce(e,t){if(1&e&&(kf(0,"span",46),am(1),xf()),2&e){let e=Yf();Vd(),lm(null==e.product?null:e.product.priceIndicator)}}function Oce(e,t){if(1&e&&(kf(0,"span",47),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf();Vd(),cm(" / ",e.isLBProduct()?$m(2,1,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Bce(e,t){if(1&e&&(kf(0,"span",47),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf();Vd(),dm(" / ",e.product.averageWeightStr," ",e.isLBProduct()?$m(2,2,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Mce(e,t){if(1&e&&(kf(0,"del",48)(1,"span",17),am(2),qm(3,"currency"),xf(),kf(4,"span",49),am(5),qm(6,"currency"),xf()()),2&e){let e=Yf();Vd(2),cm("Original Price ",jm(3,2,e.product.basePrice,"USD"),""),Vd(3),cm(" ",jm(6,5,e.product.basePrice,"USD"),"")}}function Rce(e,t){if(1&e&&(kf(0,"span",50)(1,"span",17),am(2),qm(3,"titlecase"),qm(4,"currency"),xf(),kf(5,"span",49),am(6),qm(7,"currency"),qm(8,"titlecase"),xf()()),2&e){let e=Yf();Jf("id","pg"+e.product.id+"unitPer"),Vd(2),dm("price per ",$m(3,5,e.product.unitQuantity)," ",jm(4,7,e.product.showStrikeThrough?e.product.pricePer:e.product.basePricePer,"USD"),""),Vd(4),dm("(",jm(7,10,e.product.showStrikeThrough?e.product.pricePer:e.product.basePricePer,"USD")," / ",$m(8,13,e.product.unitQuantity),")")}}function Lce(e,t){if(1&e){let e=Mf();kf(0,"auto-replenishment-al-v1",52),jf("setDetailProduct",(function(){return Wa(e),Ha(Yf(2).setPfmDetailProduct())})),xf()}if(2&e){let e=Yf(2);zh("product",e.product)("offers",e.offers)("productDetailPath",e.productDetailPath)("calledBy","product-grid-item")("isPcRedesignDisabled",!1)}}function Fce(e,t){if(1&e&&(Ef(0),ph(1,Lce,1,5,"auto-replenishment-al-v1",51),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.showArSubscription())}}function Nce(e,t){if(1&e){let e=Mf();kf(0,"a",53),jf("click",(function(){Wa(e);let t=Yf();return t.sendAdIdClickEvent(),t.onProductClicked(),Ha(t.setPfmDetailProduct())})),am(1),xf()}if(2&e){let e=Yf();Jf("id","pg"+e.product.id),gh("aria-label",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name)("data-bpn",e.product.id)("href",e.productDetailPath,id),Vd(),cm(" ",e.product.name," ")}}function Uce(e,t){if(1&e&&(kf(0,"span",54)(1,"span",17),am(2),xf(),kf(3,"span",49),am(4),xf()()),2&e){let e=Yf();Jf("id","pg"+e.product.id),gh("data-bpn",e.product.id),Vd(2),lm(null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name),Vd(2),lm(e.product.name)}}function Vce(e,t){if(1&e&&(kf(0,"div",55),Tf(1,"div",56),kf(2,"div",57),am(3),xf()()),2&e){let e=Yf();Vd(3),lm(e.product.fullName)}}function qce(e,t){if(1&e&&(kf(0,"span",17),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.srOnlyText)}}function $ce(e,t){1&e&&(kf(0,"span",63),am(1," | "),xf())}function jce(e,t){if(1&e&&(kf(0,"span"),ph(1,qce,2,1,"span",60),kf(2,"span",61),am(3),xf(),ph(4,$ce,2,0,"span",62),xf()),2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),zh("ngIf",e.srOnlyText),Vd(),gh("data-qa",e.qaAttribute)("aria-hidden",e.srOnlyText?"true":"false"),Vd(),cm(" ",e.displayableText," "),Vd(),zh("ngIf",n.pcTags.length>i+1)}}function zce(e,t){if(1&e&&(Ef(0),kf(1,"div",58),ph(2,jce,5,5,"span",59),xf(),Df()),2&e){let e=Yf();Vd(2),zh("ngForOf",e.pcTags)}}function Wce(e,t){if(1&e&&Tf(0,"span",68),2&e){zh("ngClass","svg-star-icon-"+t.$implicit+"-filled")}}function Hce(e,t){if(1&e&&(kf(0,"div",65),ph(1,Wce,1,1,"span",66),kf(2,"span",17),am(3),xf(),kf(4,"span",67),am(5),xf()()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.ratingStars),Vd(2),dm("Rated ",null==e.product||null==e.product.productReview?null:e.product.productReview.avgRating," out of 5, ",null==e.product||null==e.product.productReview?null:e.product.productReview.reviewCount," reviews"),Vd(2),lm(null==e.product||null==e.product.productReview?null:e.product.productReview.reviewCount)}}
1function Yce(e,t){if(1&e&&(Ef(0),ph(1,Hce,6,4,"div",64),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.showPCReview(e.product))}}function Gce(e,t){if(1&e&&(Ef(0),Tf(1,"product-coupon-al-v2",69),Df()),2&e){let e=Yf(2);Vd(),zh("product",e.product)("productOffers",e.productOffers)("configObj",e.configObj)}}function Kce(e,t){if(1&e&&(Ef(0),ph(1,Gce,2,3,"ng-container",6),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.productCouponVisible)}}function Qce(e,t){if(1&e&&(Ef(0),kf(1,"span",17),am(2),qm(3,"date"),xf(),kf(4,"div",70),am(5,"Available on "),kf(6,"span",71),am(7),qm(8,"date"),xf()(),Df()),2&e){let e=Yf();Vd(2),cm(" Available on ",jm(3,2,null==e.product?null:e.product.itemEffectiveStartDate,"EEEE, MMMM d"),""),Vd(5),lm(jm(8,5,null==e.product?null:e.product.itemEffectiveStartDate,"EEE, MMM d"))}}function Jce(e,t){if(1&e&&(Ef(0),kf(1,"div",72)(2,"span"),am(3,"Sold & shipped by"),xf(),kf(4,"div",73)(5,"a",74),am(6),xf()()(),Df()),2&e){let e=Yf();Vd(5),gh("href",e.sellerLandingPath,id),Vd(),lm(e.product.sellerName)}}function Zce(e,t){1&e&&Of(0)}function Xce(e,t){if(1&e&&(kf(0,"span",79),am(1),qm(2,"titlecase"),xf()),2&e){let e=Yf(3);Vd(),um(" ",$m(2,3,e.reservedTimeIntent)," unavailable ",e.isSlotWithInDelihours?"":"(Deli open "+e.digitalDisplayTimeLabel+")"+(e.isItemEligibleToAdd?"":"; ")," ",e.isItemEligibleToAdd?"":"Requires "+(null==e.product?null:e.product.mtoDisplyableTime)," ")}}function ede(e,t){if(1&e&&(kf(0,"span",80),am(1),xf()),2&e){let e=Yf(3);Vd(),lm(e.product.itemNotAvailableTxt)}}function tde(e,t){1&e&&Of(0)}function ide(e,t){if(1&e&&ph(0,Xce,3,5,"span",77)(1,ede,2,1,"span",78)(2,tde,1,0,"ng-container",76),2&e){Yf();let e=sm(6),t=Yf();zh("ngIf",(null==t.displayableElements?null:t.displayableElements.mto)&&t.itemAvailable&&(!t.isItemEligibleToAdd||!t.isSlotWithInDelihours)),Vd(),zh("ngIf",!t.itemAvailable),Vd(),zh("ngTemplateOutlet",e)}}function nde(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",81),jf("click",(function(){return Wa(e),Ha(Yf(3).viewSimilarClick())})),am(2,"Similar products"),xf(),Df()}if(2&e){let e=Yf(3);Vd(),_h("aria-label","Similar products ",e.product.name,"")}}function rde(e,t){if(1&e&&ph(0,nde,3,2,"ng-container",6),2&e){let e=Yf(2);zh("ngIf","1P_SNS"!==(null==e.configObj?null:e.configObj.programType)&&"1P_OA"!==(null==e.configObj?null:e.configObj.appName))}}function sde(e,t){if(1&e&&(Ef(0),kf(1,"div",75),ph(2,Zce,1,0,"ng-container",76)(3,ide,3,3,"ng-template",null,2,Wm)(5,rde,1,1,"ng-template",null,3,Wm),xf(),Df()),2&e){let e=sm(4),t=sm(6),i=Yf();Vd(2),zh("ngTemplateOutlet",null!=i.product&&i.product.isPreOrderItem?t:e)}}var ade=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l){this.commonService=e,this.productUtilService=t,this.aemService=i,this.elementRef=n,this._userInfoService=r,this.intersectionObserverService=s,this._elementRef=a,this._quickAddBasketService=o,this._quickAddCheckboxService=l,this.envConfig=Iw,this.reservedTimeIntent="",this.isCalledByRightDrawerOrOneTimeAddFlow=!1,this.productDetailPath="",this.sm="575px",this.md="768px",this.bgImgOpaque="product-image-opaque-full",this.itemAvailable=!0,this.isArEnable=!1,this.isItemEligibleToAdd=!0,this.isSlotWithInDelihours=!0,this.subscription=new Ye,this.sellerLandingPath="",this.productOffers={},this.isProductSubscribed=!1,this.pcTags=[],this.isCustomizableProduct=!1,this.hideBuyAgainTag=!1,this.isCheckboxChecked=!1,this.isDigitalDeliProductStoreNotEligible=!1,this.digitalDis
1playTimeLabel="",this.isEligibleCustomCakeProduct=!1,this.showArSubscription=()=>this.isArEnable&&!!this.product&&this.product.isArProduct&&this.commonService.isActiveProduct(this.product),this.getStarRatings=e=>{if(e){let t=Number(e),i=Math.floor(t),n=i>0?i:0,r=100*(t-i),s=[],a=0;switch(!0){case r>0&&r<=25:a=0;break;case r>25&&r<=75:a=50;break;case r>75&&r<=100:a=100}for(let e=0;e<5;e++)s[e]=e<i?100:e==n?a:0;return s}return[0,0,0,0,0]}}set product(e){this.addElipsis(e),this.commonService.checkStrikeThrough(e),this._product=e,this.ratingStars=this.getStarRatings(e?.productReview?.avgRating)}get product(){return this._product}ngOnInit(){let e=this.commonService.getCurrentEnviorment(),t=this.envConfig[e]?.baseImageUrl?this.envConfig[e]?.baseImageUrl:"//images.albertsons-media.com/is/image/ABS";this.imagePath=t+"/${product.id}?$grid-product-card-${viewport}$&defaultImage=Not_Available",this.performInitialChecks(),this.setDisplayableElements(),this.getLatestArSubData(),this.setSellerLandingPath(),this.setTagDisplayableElements(),this.enableOOSReDesign="buy-it-again"==this.calledBy||"buyItAgain"===this.calledBy||"buy-it-again-qsc"===this.calledBy||"buyItAgainQsc"===this.calledBy,this.hideBuyAgainTag="buy-it-again"==this.calledBy||"buyItAgain"===this.calledBy||"buy-it-again-qsc"===this.calledBy||"buyItAgainQsc"===this.calledBy}performInitialChecks(){if(this.isDigitalDeliProductStoreNotEligible=this.commonService.isDigitalDeliProductStoreNotEligible(this.product),this.isEligibleCustomCakeProduct=this.commonService.isEligibleCustomCakeProduct(this.product),window.AB.arFlagLoaded?(this.isArEnable=window.AB.arFlag.display,this.isCustomizableProduct=this.commonService.isProductEligibleForCustomization(window.AB.storeFlagsData,this.product)):this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display,this.isCustomizableProduct=this.commonService.isProductEligibleForCustomization(window.AB.storeFlagsData,this.product)}))),this.productOffers=this.commonService.getOffersByUpc(this.product,this.offers),this.itemAvailable=this.commonService.isItemAvailable_v3(this.product,this.configObj?.programType,!0,this.isDigitalDeliProductStoreNotEligible,this.isEligibleCustomCakeProduct),this.configObj="Y"==this.product.isMarketplaceItem?f(h({},this.configObj),{programType:"mkp"}):this.configObj,this._product?.name&&this.commonService.isSeoEnabled()?this.productDetailPath=this.commonService.buildSeoPdpUrl(this._product.fullName||this._product.name,this._product.id):(this.productDetailPath=this.commonService.getProductDetailPath(this.configObj?.programType),this.productDetailPath&&(this.productDetailPath=this.productDetailPath.replace("(bpn)",this._product.id))),this.validPrice=this.commonService.getValidProductPrice(this._product),this.commonService.checkPendingOrder()&&(this.product?.isMtoProduct||this.product?.isPreOrderItem)){let e=localStorage.getItem("abSlotEditOrder");this.reservedTimeIntent=JSON.parse(e)?.serviceType??"";let{hyphinFormat:t}=this.productUtilService.formatTimeSlots("abSlotEditOrder");
1this.digitalDisplayTimeLabel=t??"",e?(this.isItemEligibleToAdd=!this.commonService.preparationTimeExceedsPrebook(this.product,"abSlotEditOrder"),this.isSlotWithInDelihours=this.isEligibleCustomCakeProduct||this.productUtilService.isSlotValidAtCurrentTime(window.AB?.storeFlagsData?.flags?.departmentsDetail,"Deli","abSlotEditOrder")):this.isItemEligibleToAdd=!1}this.product.averageWeight<1&&this.product.averageWeight>0&&"ea"!==this.product.displayUnitQuantityText&&(this.product.averageWeightStr=this.product.averageWeight[0].substring(1,4)),this.productCouponVisible=this.itemAvailable&&"c-products-by-upc-drawer"!==this.calledBy&&"s-bogo"!==this.calledBy}getLatestArSubData(){this.subscriptionSNS=this.commonService.arSubscriptions.subscribe((e=>{e&&!this.commonService.isEmpty(e)&&(this.isProductSubscribed=e.subscribedItems[this.product.id]&&e.subscribedItems[this.product.id]?.isActiveSubscription),this.setBadgeToDisplay(),this.commonService.checkStrikeThrough(this.product)}))}setTagDisplayableElements(){this.pcTags=this.productUtilService.productTagElements(this.product,this.displayableElements)}setDisplayableElements(){let e=this.configObj?.programType?this.configObj?.programType:"abs";this.displayableElements=this.productUtilService.getProductDisplayableElementsByProgramType(e)}addElipsis(e){e?.name&&e?.name.trim().length>60&&(e.fullName=e.name,e.name=e?.name.slice(0,30)+"..."+e?.name.slice(-20))}setSellerLandingPath(){this.configObj?.programType&&("mkp"===this.configObj.programType||"mkp-carousel"===this.configObj.programType||this.product?.isMarketplaceItem&&"Y"===this.product.isMarketplaceItem)&&(this.sellerLandingPath=this.commonService.getSellerLandingPath(this.product.sellerId))}ngAfterViewInit(){(this.product&&this.product.adId||this.product.eventTracking)&&this.intersectionObserverService.createObserver(this._elementRef.nativeElement,this.product),"buyItAgainQsc"===this.calledBy&&this.performQscFlowSetup(),window.AB.LAZYLOAD&&"function"==typeof window.AB.LAZYLOAD.init&&window.AB.LAZYLOAD.init()}getImageUrl(e,t){let i=this.imagePath;return i?i.replace("${product.id}",e).replace("${viewport}",t):""}sendAdIdClickEvent(){this.commonService.sendSponsoredProductClickEvent(this.product,"productCardGridOrCrossSell","viewProductDetails")}onProductClicked(){this.commonService.recordRelevanceImpression(this.product,"productCardGridOrCrossSell","viewProductDetails")}isLBProduct(){return"3"===this.product?.displayType&&("W"===this.product?.sellByWeight||"P"===this.product?.sellByWeight)}setPfmDetailProduct(e){if(window.AB?.DATALAYER){let t={isSpotlight:e,isPastPurchased:this._product?.pastPurchased,isSponsored:this._product?.featured,pathwaysWidget:this.pathwaysWidget};window.AB.DATALAYER.setPfmDetailProductItemToPDP(this.elementRef.nativeElement,this._product,t)}}showPCReview(e){return"buy-it-again"!==this.calledBy&&"buyItAgain"!==this.calledBy&&e&&e.productReview&&"true"===e.productReview.isReviewDisplayEligible&&e.productReview.avgRating&&""!=e.productReview.avgRating&&"0.0"!=e.productReview.avgRating&&"0"!=e.productReview.avgRating&&null!=e.productReview.avgRating&&e.productReview.reviewCount>0}viewSimilarClick(){if(!this.calledBy||"buy-it-again"!=this.calledBy&&"buyItAgain"!=this.calledBy){let e="/bin/safeway/product/similar?aisleId={product.aisleId}";e=e.replace("{product.aisleId}",this.product.aisleId),window.location.href=e}else this.commonService.showBiaLPCrossSell(this.product.id),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setVie
1wSimilarItemsClick(this._product)}analyticsSimilarItemsCTA(){window.AB?.DATALAYER&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|view-similar-items`)}performQscFlowSetup(){this.isCheckboxChecked=this._quickAddBasketService.isProductSelected(this.product.id),this._quickAddCheckboxService.setCheckboxState(this.isCheckboxChecked),this.setCheckboxInputState(this.isCheckboxChecked),void 0!==this._quickAddCheckboxService&&this.subscription.add(this._quickAddCheckboxService.isChecked$.subscribe((e=>{!1===e&&this.checkboxInput.nativeElement.focus(),this.isCheckboxChecked!==e&&(this.isCheckboxChecked=e,this.setCheckboxInputState(this.isCheckboxChecked))})))}setCheckboxInputState(e){void 0!==this.checkboxInput&&(this.checkboxInput.nativeElement.checked=e)}onCheckboxClick(e){let t=e.target;this.isCheckboxChecked=t.checked,this._quickAddBasketService.setQuickAddBasketSelectedProperty(this.product.id,this.isCheckboxChecked),this._quickAddCheckboxService.setCheckboxState(this.isCheckboxChecked)}setBadgeToDisplay(){this.badgeToDisplay=this.productUtilService.getBadgeToDisplay(this.isProductSubscribed,this.product)}ngOnDestroy(){this.subscription.unsubscribe(),this.subscriptionSNS.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(Dw),$d(Cw),$d(Vl),$d(_w),$d(jw),$d(Vl),$d(Kw),$d(e_))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-item-al-v2"]],viewQuery:function(e,t){if(1&e&&tm(dce,5),2&e){let e;im(e=nm())&&(t.checkboxInput=e.first)}},inputs:{pathwaysWidget:"pathwaysWidget",configObj:"configObj",isCalledByRightDrawerOrOneTimeAddFlow:"isCalledByRightDrawerOrOneTimeAddFlow",offers:"offers",isAnyProductHasAddlInfo:"isAnyProductHasAddlInfo",unAttendDeliveryFlag:[0,"isRestricted","unAttendDeliveryFlag"],calledBy:"calledBy",product:[0,"data","product"]},features:[xm([e_])],decls:39,vars:49,consts:[["noSrc",""],["checkboxInput",""],["mtoTemplate",""],["similarProducts",""],[1,"pc","p-3","position-relative",3,"ngClass","id"],["class","w-100 h-100 position-absolute pc__tap-zone product-fname",3,"ngClass","click",4,"ngIf"],[4,"ngIf"],["style","top: 0;",3,"class",4,"ngIf"],[1,"pc__tc"],[1,"d-flex","align-items-end","justify-content-end","position-relative","w-100","pc__tc__cta-container",3,"ngClass"],[1,"pc__bc",3,"ngClass"],[1,"d-flex","flex-column","align-items-start","align-self-stretch","pt-1","pc__bc__gap"],[1,"d-flex","flex-column","align-self-stretch"],[1,"d-flex","body-text-xs","pc__text-xxs","color-neutral-80","pc__label-container"],[1,"product-comp-v1__price","d-flex","align-items-baseline","flex-wrap"],["class","text-l-b font-italic pds-tag-low-price--redwood60 product-comp-v1__price__badge","aria-hidden","true",4,"ngIf"],["data-qa","prd-itm-prc",1,"product-comp-v1__price__text",3,"id","ngClass"],[1,"sr-only"],["aria-hidden","true",1,"color-neutral-90"],["aria-hidden","true","data-qa","qty-txt",4,"ngIf"],["class","body-text-xxs color-neutral-80","data-qa","prd-itm-prc-del",4,"ngIf"],["class","body-text-xxs color-neutral-80","data-qa","prd-itm-pprc-qty","aria-hidden","true",3,"id",4,"ngIf"],[1,"position-relative",3,"ngClass"],["class","title-xxs color-neutral-90 product-fname","data-qa","prd-itm-pttl","tabindex","-1",3,"id","click",4,"ngIf"],["class","title-xxs color-neutral-90 product-fname","data-qa","prd-itm-pttl",3,"id",4,"ngIf"],["class","pc__tooltip__title",4,"ngIf"],[1,"w-100","h-100","position-absolute","pc__tap-zone","product-fname",3,"click","ngClass"],[1,"background-color-neutral-20","color-neutral-90","pc__text-xxs","body-text-xs","text-center","rounded","px-1","position-absolute","pc__badge"],[2,"top","0"],["role","img","aria-hidden","true",3,"class",4,"ngIf"],["role","img","aria-hidden","true"],[1,"pc__tc__imgc","p-1","d-flex","justify-content-center",3,"ngClass"],[3,"id"],[3,"media"],[4,"ngIf","ngIfElse"],[1,"pc__tc__checkbox","checkbox"],[1,"checkbox__group",3,"for"],["type","checkbox",1,"checkbox__input",3,"keydown.enter","click","id"],[1,"checkbox__checkmark",3,"ngClass"],[1,"svg-checkmark"],[1,"sr-only",3,"id"],["data-qa","prd-itm-img",1,"ab-lazy","pc__tc__imgc__img","w-100","h-100",3,"src","alt"],["data-qa","prd-itm-img",1,"ab-lazy","pc__tc__imgc__img","w-100","h-100",3,"alt"],[1,"w-100","d-flex","justify-content-end",3,"id","product","calledBy","configObj"],["aria-hidden","false","data-qa","pr-itm-aprx"],["aria-hidden","false","data-qa","prd-itm-spnsrd",1,"ml-auto"],["aria-hidden","true",1,"text-l-b","font-italic","pds-tag-low-price--redwood60","product-comp-v1__price__badge"],["aria-hidden","true","data-qa","qty-txt"],["data-qa","prd-itm-prc-del",1,"body-text-xxs","color-neutral-80"],["aria-hidden","true"],["data-qa","prd-itm-pprc-qty","aria-hidden","true",1,"body-text-xxs","color-neutral-80",3,"id"],[3,"product","offers","productDetailPath","calledBy","isPcRedesignDisabled","setDetailProduct",4,"ngIf"],[3,"setDetailProduct","product","offers","productDetailPath","calledBy","isPcRedesignDisabled"],["data-qa","prd-itm-pttl","tabindex","-1",1,"title-xxs","color-neutral-90","product-fname",3,"click","id"],["data-qa","prd-itm-pttl",1,"title-xxs","color-neutral-90","product-fname",3,"id"],[1,"pc__tooltip__title"],[1,"pc__tooltip__title__arrow-light"],[1,"title-xxs","color-neutral-90"],[1,"w-100"],[4,"ngFor","ngForOf"],["class","sr-only",4,"ngIf"],[1,"pc__tags"],["class","pc__tags-divider","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"pc__tags-divider"],["class","rating-stars d-flex align-items-center",4,"ngIf"],[1,"rating-stars","d-flex","align-items-center"],["class","mr-0","aria-hidden","true",3,"ngClass",4,"ngFor","ngForOf"],["aria-hidden","true",1,"body-text-xxs","color-neutral-80"],["aria-hidden","true",1,"mr-0",3,"ngClass"],[1,"position-relative",3,"product","productOffers","configObj"],["aria-hidden","true",1,"text-s","pt-1"],[1,"text-s-b--info"],[1,"title-xxxs","pt-2"],[1,"links","m-0"],[1,"links__action","link-xs","position-relative"],[1,"pt-2"],[4,"ngTemplateOutlet"],["class","title-xxxs color-neutral-80",4,"ngIf"],["aria-hidden","false","class","title-xxxs color-neutral-80","data-qa","prd-itm-oos",4,"ngIf"],[1,"title-xxxs","color-neutral-80"],["aria-hidden","false","data-qa","prd-itm-oos",1,"title-xxxs","color-neutral-80"],["data-qa","prd-itm-vw-smlr-itms",1,"links__action","link-xs","position-relative","similar-products",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",4),ph(1,yce,2,11,"a",5)(2,vce,3,2,"ng-container",6)(3,_ce,3,7,"span",7),kf(4,"div",8),ph(5,xce,10,17,"ng-container",6),kf(6,"div",9),ph(7,Tce,2,5,"ng-container",6),xf()(),kf(8,"div",10)(9,"div",11)(10,"div",12)(11,"div",13),ph(12,Pce,3,0,"ng-container",6)(13,Ece,3,0,"ng-container",6),xf(),Ef(14),kf(15,"div",14),ph(16,Dce,2,1,"span",15),kf(17,"span",16)(18,"span",17),am(19),qm(20,"currency"),xf(),kf(21,"span",18),am(22),qm(23,"currency"),xf(),ph(24,Oce,3,3,"span",19)(25,Bce,3,4,"span",19),xf(
1),ph(26,Mce,7,8,"del",20)(27,Rce,9,15,"span",21),xf(),Df(),xf(),ph(28,Fce,2,1,"ng-container",6),kf(29,"div",22),ph(30,Nce,2,5,"a",23)(31,Uce,5,4,"span",24)(32,Vce,4,1,"div",25),xf(),ph(33,zce,3,1,"ng-container",6)(34,Yce,2,1,"ng-container",6)(35,Kce,2,1,"ng-container",6)(36,Qce,9,8,"ng-container",6),xf(),ph(37,Jce,7,2,"ng-container",6)(38,sde,7,1,"ng-container",6),xf()()),2&e&&(Jf("id","pg"+t.product.id+"container"),zh("ngClass",Om(39,uce,t.isCalledByRightDrawerOrOneTimeAddFlow)),Vd(),zh("ngIf","1P_SNS"!==(null==t.configObj?null:t.configObj.programType)&&"1P_OA"!==(null==t.configObj?null:t.configObj.appName)),Vd(),zh("ngIf",!t.hideBuyAgainTag&&(t.isProductSubscribed||(null==t.displayableElements?null:t.displayableElements.buyItAgain)&&(null==t.product?null:t.product.pastPurchased))),Vd(),zh("ngIf",null==t.badgeToDisplay?null:t.badgeToDisplay.badgeName),Vd(2),zh("ngIf",null==t.displayableElements?null:t.displayableElements.image),Vd(),zh("ngClass",Om(41,pce,"buyItAgainQsc"===t.calledBy&&!1===t.isCheckboxChecked)),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.addToCart)&&t.itemAvailable&&t.isItemEligibleToAdd&&t.isSlotWithInDelihours),Vd(),zh("ngClass",Om(43,hce,"buyItAgainQsc"===t.calledBy&&!1===t.isCheckboxChecked)),Vd(4),zh("ngIf","approx"===(null==t.product?null:t.product.displayEstimateText)),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.sponsoredLabel)&&(null==t.product?null:t.product.featured)),Vd(3),zh("ngIf",null==t.product?null:t.product.priceIndicator),Vd(),Jf("id","pg"+t.product.id+"price"),zh("ngClass",Om(45,fce,t.product.showStrikeThrough&&!1!==(null==t.product?null:t.product.priceHighlight))),Vd(2),um("",(null==t.product?null:t.product.priceIndicator)||""," Your Price ",jm(20,33,t.validPrice,"USD")," ",t.isLBProduct()?"lb":"each",""),Vd(3),cm(" ",jm(23,36,t.validPrice,"USD"),""),Vd(2),zh("ngIf",(t.product.displayUnitQuantityText||t.isLBProduct())&&1===t.product.averageWeight),Vd(),zh("ngIf",(t.product.displayUnitQuantityText||t.isLBProduct())&&t.product.averageWeight<1&&t.product.averageWeight>0),Vd(),zh("ngIf",t.product.showStrikeThrough),Vd(),zh("ngIf",!t.isLBProduct()),Vd(),zh("ngIf",!t.isCustomizableProduct&&(null==t.displayableElements?null:t.displayableElements.scheduleNSave)&&(!t.unAttendDeliveryFlag||0===t.product.restrictedValue)),Vd(),zh("ngClass",Om(47,mce,(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60)),Vd(),zh("ngIf","1P_SNS"!==(null==t.configObj?null:t.configObj.programType)&&"1P_OA"!==(null==t.configObj?null:t.configObj.appName)),Vd(),zh("ngIf","1P_SNS"===(null==t.configObj?null:t.configObj.programType)||"1P_OA"===(null==t.configObj?null:t.configObj.appName)),Vd(),zh("ngIf",(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60),Vd(),zh("ngIf",t.pcTags.length>0),Vd(),zh("ngIf",null==t.displayableElements?null:t.displayableElements.starRating),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.coupons)&&t.itemAvailable),Vd(),zh("ngIf",(null==t.product?null:t.product.isPreOrderItem)&&(!(null!=t.configObj&&t.configObj.programType)||"abs"===(null==t.configObj?null:t.configObj.programType)||"1P_B2B"===(null==t.configObj?null:t.configObj.programType))),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.sellerTag)&&"Y"===t.product.isMarketplaceItem&&t.product.sellerId&&t.product.sellerName),Vd(),zh("ngIf",!t.itemAvailable||t.itemAvailable&&!t.isItemEligibleToAdd||t.itemAvailable&&!t.isSlotWithInDelihours))},dependencies:[sy,oy,cy,by,Noe,ile,lce,Sy,Iy,By,Ty],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),ode=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[ade,e_],imports:[Ly,qoe,nle,cce]})}}return e})();var lde=(()=>{class e{initCarousel(e){let t,i=$(e),n=this;i.hasClass("slick-initialized")||i.on("init",((e,t)=>{this.updateADAaccessibleElements(t)})).slick({nextArrow:'<button type="button" aria-label="Next" class="btn btn-sm slick-next banner-unit-spotlight__nav-buttons"></button>',prevArrow:'<button type="button" aria-label="Previous" class="btn btn-sm slick-prev banner-unit-spotlight__nav-buttons"></button>',accessibility:!1,infinite:!1,tail:!0,centerMode:!1,swipe:!0,variableWidth:!0,swipeToSlide:!1,arrows:!0,responsive:[{breakpoint:7681,settings:"unslick"},{breakpoint:1279,settings:{slidesToShow:3.5,slidesToScroll:3}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1}},{breakpoint:0,settings:{slidesToShow:1,slidesToScroll:1}}]}).on("beforeChange",(function(e,r,s,a){if(s<a){let e=Number($(".slick-active",$(i)).last().attr("data-slick-index"))+1;n.setSlideFocus(e,i),t="next"}else{let e=Number($(".slick-active",$(i)).first().attr("data-slick-index"))-1;n.setSlideFocus(e,i),t="prev"}})).on("afterChange",((e,r,s)=>{n.updateADAaccessibleElements(r),setTimeout((()=>{switch(t){case"next":$(".slick-current a:first",$(i)).focus();break;case"prev":$(".slick-active:last a:last",$(i)).focus()}}),0)}))}updateADAaccessibleElements(e){e?.$slides&&e?.$slides.map((t=>
1$(e?.$slides[t])?.find(".product-carousel-item-v3__image-link")?.attr("tabindex","-1")));window.AB.COMMON.updateCarouselControlForADA(e,{classListString:'a:not(.banner-unit-spotlight__content__logo__tile__cta, .product-carousel-item-v3__image-link), [role="button"]',component:"spotlightBanner"})}setSlideFocus(e,t){let i=$('.slick-list .slick-slide[data-slick-index="'+e+'"]',$(t));i&&setTimeout((()=>i.focus()),0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),cde=y(w()),dde=(()=>{class e{constructor(){this.trackedImpressions=[]}createObserver(e,t){if(["spotlight-banner","sp-video","horizontal-video-carousel-wrapper"].includes(e.nodeName.toLowerCase())){let i;i=new IntersectionObserver((n=>this.handlePCintersect(n,t,e,i)),{root:null,rootMargin:"0px",threshold:.5}),i.observe(e)}}handlePCintersect(e,t,i,n){e.forEach((e=>{let r=t.adId||t.eventTracking,s=t.placementOnViewBeacon;e.isIntersecting&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&(r&&this.isImpressionTacked(r)&&this.trackedImpressions.push(r),s&&this.isImpressionTacked(s)&&(["spotlight-banner","sp-video","horizontal-video-carousel-wrapper"].includes(i.nodeName.toLowerCase())&&window.citrusAdTracker(t,"AD_PLACEMENT_IMPRESSION"),this.trackedImpressions.push(s)),n.unobserve(i))}))}isImpressionTacked(e){return!this.trackedImpressions.includes(e)||"object"==typeof e&&null==cde.find(this.trackedImpressions,e)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),ude=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._commonService=t,this._utilService=i,this._userInfoService=n,this._aemService=r,this.apiParams=new Ky,this.dynamicCarousels=["more-like-this","best-sellers","most-popular-l2"],this.viewedAdIdsArr=[],this.adIdsToBeSent=[],this.slickChanges=new kt,this.slickChanges$=this.slickChanges.asObservable(),this.activeSlides={},this.breakpoints=[],this.navigationTypeCarousel="",this.isPlacementBeaconCalled=!1,this.carouselBSub=new Tt({}),this.carouselBSub$=this.carouselBSub.asObservable(),this._productInfo=function(e){this.dl=window.digitalData,this.dl&&(this.dl.productInfo={productID:e.id,productName:e.name,units:e.units,listPrice:e.listPrice,carouselSection:e.carouselSection,isRecommended:e.isRecommended,isSponsored:e.isSponsored,basePrice:e.basePrice,pricingType:e.pricingType,couponFlag:e.couponFlag,couponClipped:e.couponClipped,couponID:e.couponID,aisleId:e.aisleId,upc:e.upc,departmentName:e.departmentName})},this.handleActiveSlides=e=>{e.$slides.removeClass("slick-active").attr("aria-hidden","true");let t=e.currentSlide,i=Math.min(t+e.options.slidesToShow,e.$slides.length);e.$slides.slice(t,i).addClass("slick-active").attr("aria-hidden","false")}}getDataSource(e){let t=e?e.getAttribute("data-carousel-type"):"";if(this.navigationTypeCarousel=e?e.getAttribute("data-navigation-type"):"","generic-products"===t)return e.getAttribute("data-products")}getData(e,t){this.carousel=e;let i=Di((()=>fi([])));if("generic-products"===e.type)return i=this._getGenericProductsData(),i}getBehaviour(e){let t=e.getAttribute("data-carousel-behaviour");if(t&&"false"!==t)return $(e).closest(".master-product-carousel").addClass(t),t;let i="static-carousel";return"buy-it-again"===t&&(i="buy-it-again"),"bia-crossSell"===t&&(i="bia-crossSell"),"bia-spaCarousel"===t&&(i="bia-spaCarousel"),$(e).closest(".master-product-carousel").addClass(i),i}checkCarouselBehaviour(e,t,i){$(".master-product-carousel.most-popular .slick-product-carousel").first();let n=$(i.parentElement);"onError"===e&&n.addClass("d-none")}getProductsBPNArray(e){let t=[];return e.forEach((e=>t.push(e.id))),t.join(",")}getProductsUPCArray(e){let t=[];return e.forEach((e=>t.push(e.upc))),t.join(",")}processImpression(e,t){let i=$(e).find(".carousel-content-wrapper").slick("getSlick").$slides;for(let e of i)if($(e).hasClass("slick-active")){let i=e.getAttribute("data-slick-index"),n=t[i]?.adId||t[i]?.eventTracking;n&&(!this.viewedAdIdsArr.includes(n)||"object"==typeof n&&!this.viewedAdIdsArr.some((e=>
1JSON.stringify(e)===JSON.stringify(n))))&&(this.viewedAdIdsArr.push(n),this.adIdsToBeSent.push(n))}if(this.adIdsToBeSent.length){t[0]?.placementBeacons&&!this.isPlacementBeaconCalled&&window.citrusAdTracker&&"function"==typeof window.citrusAdTracker&&(window.citrusAdTracker({beacons:t[0].placementBeacons},"AD_IMPRESSION_PLACEMENT"),this.isPlacementBeaconCalled=!0);let e=new CustomEvent("productsImpression",{detail:this.adIdsToBeSent});console.warn("productsImpression",e),document.dispatchEvent(e),this.adIdsToBeSent=[]}}replaceURLParam(e,t,i){return e.substring(0,e.indexOf(t+"=")+(t+"=").length)+i+e.substring(e.indexOf("&",e.indexOf(t+"=")),e.length)}_updateAnalyticsDataLayer(){let e=this.carousel.apiPostBody;this._productInfo({aisleId:e})}checkRecommendations(e){return"recommendations"===e.behaviour}_getGenericProductsData(){return this.carouselBSub.next(this.carousel),fi(JSON.parse(this.carousel.dataSource))}getUserType(){return fi(window.AB.userInfo)}removeMask(e){$(e).parent().removeClass("mask"),$(e).parent().removeClass("no-block-height")}initSlick(e,t,i,n,r,s,a){switch(t){case"bia-crossSell":case"bia-spaCarousel":this.activeSlides={359:1,424:2,767:3,1279:4};break;case"dynamic-grid-with-facets":this.activeSlides={359:2,424:3,767:4};break;case"buy-it-again-landing-category":this.activeSlides={359:2,767:3,1279:4,1439:5};break;case"horizontal-video":this.activeSlides={359:1,767:1,1024:2,1280:3,1440:4};break;default:this.activeSlides="searchCrossSell"===s||"dealsSponsoredCarousel"===s||"dealsdiscovery-carousel"===s||"aislesCrossSell"===s?{359:2,767:4,1279:4}:r&&"dnf"==r?.appName?{359:2,767:4,1023:5,1279:6,1439:7,2559:10}:{359:2,767:4,1279:6}}for(let e in this.activeSlides)this.breakpoints.push({breakpoint:Number(e),settings:{slidesToShow:this.activeSlides[e],slidesToScroll:this.activeSlides[e],dots:!1,arrows:!0}});let o;$("meta[name=template]")&&$("meta[name=template]").attr("content");$(e).find(".carousel-content-wrapper").not(".slick-initialized").on("init",((i,n)=>{this.handleShowingRedesignNavButtons(e),this.addSlickRedesignClasses(e),this.setCarouselRedesignWidth(e,n.slideCount,t),this.slickChanges.next({})})).slick({tail:!0,dots:!1,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,nextArrow:` <button type="button"\n class="btn slick-redesign-next btn-secondary btn-circle--md " \n aria-label="Next ${a??""} set">\n <span class="svg-icon svg-btn-slick-next "></span>\n </button>`,prevArrow:`<button type="button"\n class="btn slick-redesign-prev btn-secondary btn-circle--md" aria-label="Previous ${a??""} set">\n <span class="svg-icon svg-btn-slick-prev "></span>\n </button> `,responsive:this.breakpoints}).on("beforeChange",(function(t,i,n,r){if(n<r){let t='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).last().attr("data-slick-index"))+1)+'"]',i=$(t,$(e));i&&setTimeout((()=>i.focus()),0),o="next"}else{let t='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).first().attr("data-slick-index"))-1)+'"]',i=$(t,$(e));i&&setTimeout((()=>i.focus()),0),o="prev"}})).on("afterChange",((r,s,a,l)=>{this.handleActiveSlides(s),this.processImpression(e,i),this.handleShowingRedesignNavButtons(e),this.addSlickRedesignClasses(e),this.setCarouselRedesignWidth(e,s.slideCount,t),this.slickChanges.next({}),setTimeout((()=>{switch(o){case"next":window.innerWidth>=768&&setTimeout((()=>{$(".slick-current a:first",$(e)).focus()}),100),window.AB.DATALAYER&&(window.AB.DATALAYER.trackSlickArrows({caller:"product",action:"right",component:e}),window.AB.DATALAYER.trackP13nCarousel(e,i,"forward",n));break;case"prev":window.innerWidth>=768&&setTimeout((()=>{$(".slick-active:last a:last",$(e)).focus()}),100),window.AB.DATALAYER&&(window.AB.DATALAYER.trackSlickArrows({caller:"product",action:"left",component:e}),window.AB.DATALAYER.trackP13nCarousel(e,i,"back",n))}}),0)}))}setAriaLabelForProductCarousel(e,t){let i=e.querySelector(".slick-next"),n=e.querySelector(".slick-prev"),r="Next "+(t||""),s="Previous "+(t||"");null!=i&&(i.setAttribute("aria-label",r),n.setAttribute("aria-label",s))}handleShowingRedesignNavButtons(e){$(e).find(".slick-redesign-next, .slick-redesign-prev").each(((e,t)=>{let i=t.classList.contains(".slick-redesign-next")?"svg-btn-slick-next--disabled":"svg-btn-slick-prev--disabled";t.classList.contains("slick-disabled")?($(t).prop("disabled",!0),$(t).children().addClass(i)):($(t).prop("disabled",!1),$(t).children().removeClass(i)),window.innerWidth<768?$(t).addClass("d-none"):$(t).removeClass("d-none")}))}
1addSlickRedesignClasses(e){$(e).find(".slick-track").first().addClass("pc-carousel-grid"),$(e).find(".slick-list").first().addClass("pc-slick-list"),$(e).find(".slick-slide").each(((e,t)=>{$(t).addClass("pc-slick-slide")})),$(e).find(".slick-track").first().children(".slick-slide").each(((e,t)=>{$(t).children().first().addClass("h-100")}))}setCarouselRedesignWidth(e,t,i){let n=t/this.activeSlides[this.getCurrentBreakpoint().breakpoint]*100;"bia-spaCarousel"===i&&$(e).parent().css("width","100%"),"horizontal-video"===i&&this.getCurrentBreakpoint().breakpoint<768?$(e).find(".slick-track").first().css("max-width",250*t+"px"):$(e).find(".slick-track").first().css("max-width",`${n}%`)}getCurrentBreakpoint(){for(let e=this.breakpoints.length-1;e>=0;e--)if(this.breakpoints[e].breakpoint<window.innerWidth)return this.breakpoints[e];return this.breakpoints[0]}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(Sw),lr(_w),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),pde=(e,t,i)=>({"pc--carousel--vine px-2 pt-3 pb-2":e,"p-3 pc--carousel":t,"pc--light d-flex p-0":i}),hde=e=>({"d-flex align-items-center justify-content-center":e}),fde=e=>({"pc--light__bc d-flex":e}),mde=e=>({"flex-grow-1":e}),gde=e=>({"pc__tooltip ":e}),bde=e=>({"d-flex flex-grow-1":e}),yde=e=>({"pc__tc__imgc--light":e}),vde=(e,t)=>({"pc--carousel--vine__tc__imgc__img":e,"pc--carousel__tc__imgc__img":t}),wde=e=>({"product-comp-v1__price__saleprice sunshine50 rounded":e});function _de(e,t){if(1&e&&(Ef(0),kf(1,"span",15),am(2),xf(),Df()),2&e){let e=Yf();Vd(),gh("data-qa",e.isProductSubscribed?"ar-schdld-subscrbd":"bia_bdg"),Vd(),lm(e.isProductSubscribed?"Subscribed":"Buy again")}}function Sde(e,t){if(1&e&&Tf(0,"span",18),2&e){let e=Yf(2);df("mr-1 ","pds-svg-"+(null==e.badgeToDisplay?null:e.badgeToDisplay.icon),"")}}function Cde(e,t){if(1&e&&(kf(0,"span",16),ph(1,Sde,1,3,"span",17),am(2),xf()),2&e){let e=Yf();uf("d-flex flex-row text-xs",null!=e.badgeToDisplay&&e.badgeToDisplay.isBoldText?"-b":""," pds-tag pds-tag-sizes--medium pds-tag-primary-colors--",(null==e.badgeToDisplay?null:e.badgeToDisplay.color)||"neutral"," position-absolute"),gh("data-qa",e.isProductSubscribed?"ar-schdld-subscrbd":"bia_bdg"),Vd(),zh("ngIf",!(null==e.badgeToDisplay||!e.badgeToDisplay.icon)),Vd(),cm(" ",null==e.badgeToDisplay?null:e.badgeToDisplay.badgeName," ")}}function Ide(e,t){if(1&e&&(Ef(0),kf(1,"div",19)(2,"div")(3,"picture"),Tf(4,"source",20)(5,"source",20)(6,"img",21),xf()()(),Df()),2&e){let e=Yf();Vd(),zh("ngClass",Om(11,yde,e.isLightWeightProduct)),Vd(),gh("data-bpn",e.product.id),Vd(2),Zf("media","(max-width: ",e.sm,")"),zh("srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),Zf("media","(max-width: ",e.md,")"),zh("srcset",e.getImageUrl(e.product.id,"tablet")),Vd(),Jf("alt",null!=e.product&&null!=e.product.fullName&&e.product.fullName.length?e.product.fullName:e.product.name),zh("src",e.getImageUrl(e.product.id,"desktop"),id)("ngClass",Bm(13,vde,"wine-carousel"===e.programType,!e.isLightWeightProduct))}}function Ade(e,t){1&e&&Of(0)}function kde(e,t){if(1&e&&(Ef(0),kf(1,"div",22),ph(2,Ade,1,0,"ng-container",23),xf(),Df()),2&e){Yf();let e=sm(27);Vd(2),zh("ngTemplateOutlet",e)}}function xde(e,t){1&e&&(Ef(0),kf(1,"span",24),am(2," approx. "),xf(),Df())}function Tde(e,t){1&e&&(Ef(0),kf(1,"span",25),am(2,"Sponsored"),xf(),Df())}function Pde(e,t){if(1&e&&(kf(0,"span",33),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(null==e.product?null:e.product.priceIndicator)}}function Ede(e,t){if(1&e&&(kf(0,"span",34),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(2);Vd(),cm(" / ",e.isLBProduct()?$m(2,1,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Dde(e,t){if(1&e&&(kf(0,"span",34),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(2);Vd(),dm(" / ",e.product.averageWeightStr," ",e.isLBProduct()?$m(2,2,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Ode(e,t){if(1&e&&(kf(0,"del",35)(1,"span",29),am(2),qm(3,"currency"),xf(),kf(4,"span",34),am(5),qm(6,"currency"),xf()()),2&e){let e=Yf(2);Vd(2),cm("Original Price ",jm(3,2,e.product.basePrice,"USD"),""),Vd(3),cm(" ",jm(6,5,e.product.basePrice,"USD"),"")}}function Bde(e,t){if(1&e&&(Ef(0),kf(1,"div",26),ph(2,Pde,2,1,"span",27),kf(3,"span",28)(4,"span",29),am(5),qm(6,"currency"),xf(),kf(7,"span",30),am(8),qm(9,"currency"),xf(),ph(10,Ede,3,3,"span",31)(11,Dde,3,4,"span",31),xf(),ph(12,Ode,7,8,"del",32),xf(),Df()),2&e){let e=Yf();Vd(2),zh("ngIf",null==e.product?null:e.product.priceIndicator),Vd(),zh("ngClass",Om(14,wde,e.product.showStrikeThrough&&!1!==(null==e.product?null:e.product.priceHighlight))),Vd(2),dm("",(null==e.product?null:e.product.priceIndicator)||""," Your Price ",jm(6,8,e.validPrice,"USD"),""),Vd(3),cm(" ",jm(9,11,e.validPrice,"USD"),""),Vd(2),zh("ngIf",!(!e.product.displayUnitQuantityText&&!e.isLBProduct()||1!==e.product.averageWeight)),Vd(),zh("ngIf",!!((e.product.displayUnitQuantityText||e.isLBProduct())&&e.product.averageWeight<1&&e.product.averageWeight>0)),Vd(),zh("ngIf",e.product.showStrikeThrough)}}function Mde(e,t){if(1&e){let e=Mf();kf(0,"auto-replenishment-al-v1",37),jf("setDetailProduct",(function(){return Wa(e),Ha(Yf(2).setPfmDetailCarousel())})),xf()}if(2&e){let e=Yf(2);zh("product",e.product)("offers",e.offers)("productDetailPath",e.productDetailPath)("calledBy","product-carou
1sel-item")("isPcRedesignDisabled",!1)}}function Rde(e,t){if(1&e&&(Ef(0),ph(1,Mde,1,5,"auto-replenishment-al-v1",36),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.showArSubscription()&&e.showArSubscriptionByAppName())}}function Lde(e,t){if(1&e&&(kf(0,"div",38),Tf(1,"div",39),kf(2,"div",40),am(3),xf()()),2&e){let e=Yf();Vd(3),lm(e.product.fullName)}}function Fde(e,t){if(1&e&&(kf(0,"span",29),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.srOnlyText)}}function Nde(e,t){1&e&&(kf(0,"span",46),am(1," | "),xf())}function Ude(e,t){if(1&e&&(kf(0,"span")(1,"span",24),ph(2,Fde,2,1,"span",43),kf(3,"span",44),am(4),xf()(),ph(5,Nde,2,0,"span",45),xf()),2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(2),zh("ngIf",e.srOnlyText),Vd(),gh("data-qa",e.qaAttribute)("aria-hidden",e.srOnlyText?"true":"false"),Vd(),cm("",e.displayableText," "),Vd(),zh("ngIf",n.pcTags.length>i+1)}}function Vde(e,t){if(1&e&&(Ef(0),kf(1,"div",41),ph(2,Ude,6,5,"span",42),xf(),Df()),2&e){let e=Yf();Vd(2),zh("ngForOf",e.pcTags)}}function qde(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"product-coupon-al-v2",47),jf("productCouponDetails",(function(t){return Wa(e),Ha(Yf().onProductCouponDetailsChange(t))})),xf(),Df()}if(2&e){let e=Yf();Vd(),zh("carouselTitle",e.carousel.title)("product",e.product)("productOffers",e.productOffers)("configObj",e.configObj)}}function $de(e,t){if(1&e&&(Ef(0),kf(1,"span",29),am(2),qm(3,"date"),xf(),kf(4,"div",48),am(5,"Available on "),kf(6,"span",49),am(7),qm(8,"date"),xf()(),Df()),2&e){let e=Yf();Vd(2),cm(" Available on ",jm(3,2,null==e.product?null:e.product.itemEffectiveStartDate,"EEEE, MMMM d"),""),Vd(5),lm(jm(8,5,null==e.product?null:e.product.itemEffectiveStartDate,"EEE, MMM d"))}}function jde(e,t){1&e&&Of(0)}function zde(e,t){if(1&e&&(Ef(0),kf(1,"div",50),ph(2,jde,1,0,"ng-container",23),xf(),Df()),2&e){Yf();let e=sm(27);Vd(2),zh("ngTemplateOutlet",e)}}function Wde(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",51)(2,"span"),am(3,"Sold & shipped by"),xf(),kf(4,"div",52)(5,"a",53),jf("click",(function(){return Wa(e),Ha(Yf()._updateAnalyticsCTA("sellerName"))})),am(6),xf()()(),Df()}if(2&e){let e=Yf();Vd(5),gh("href",e.sellerLandingPath,id),Vd(),lm(e.product.sellerName)}}function Hde(e,t){1&e&&Of(0)}function Yde(e,t){if(1&e&&(kf(0,"span",57),am(1),qm(2,"titlecase"),xf()),2&e){let e=Yf(3);Vd(),um(" ",$m(2,3,e.reservedTimeIntent)," unavailable ",e.isSlotWithInDelihours?"":"(Deli open "+e.digitalDisplayTimeLabel+")"+(e.isItemEligibleToAdd?"":"; ")," ",e.isItemEligibleToAdd?"":"Requires "+(null==e.product?null:e.product.mtoDisplyableTime)," ")}}function Gde(e,t){1&e&&Of(0)}function Kde(e,t){if(1&e&&(kf(0,"div",54),ph(1,Yde,3,5,"span",55),kf(2,"span",56),am(3),xf(),ph(4,Gde,1,0,"ng-container",23),xf()),2&e){Yf();let e=sm(5),t=Yf();Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.mto)&&t.itemAvailable&&(!t.isItemEligibleToAdd||!t.isSlotWithInDelihours)),Vd(2),lm(t.product.itemNotAvailableTxt),Vd(),zh("ngTemplateOutlet",e)}}function Qde(e,t){if(1&e&&(kf(0,"a",59),am(1,"Similar products"),xf()),2&e){let e=Yf(3);_h("aria-label","Similar products ",e.product.name,""),Jf("href","/bin/safeway/product/similar?aisleId="+e.product.aisleId,id)}}function Jde(e,t){if(1&e&&ph(0,Qde,2,3,"a",58),2&e){let e=Yf(2);zh("ngIf",!e.itemAvailable||e.product.disableInStoreUICheck)}}function Zde(e,t){if(1&e&&(Ef(0),ph(1,Hde,1,0,"ng-container",23)(2,Kde,5,3,"ng-template",null,1,Wm)(4,Jde,1,1,"ng-template",null,2,Wm),Df()),2&e){let e=sm(3),t=sm(5),i=Yf();Vd(),zh("ngTemplateOutlet",null!=i.product&&i.product.isPreOrderItem?t:e)}}function Xde(e,t){if(1&e&&(Ef(0),Tf(1,"quantity-stepper-al-v2",60),Df()),2&e){let e=Yf(2);
1Vd(),zh("product",e.product)("configObj",e.configObj)("stpprDataObj",e.stpprDataObj)("calledBy","carousel-v2")}}function eue(e,t){if(1&e&&ph(0,Xde,2,4,"ng-container",5),2&e){let e=Yf();zh("ngIf",(null==e.displayableElements?null:e.displayableElements.addToCart)&&e.itemAvailable&&e.isItemEligibleToAdd&&e.product.disableInStoreUICheck&&e.isSlotWithInDelihours)}}function tue(){return window}var iue=(()=>{class e{set product(e){e.id=e.id?e.id:e.itemId,e.unitQuantity=e.unitQuantity?e.unitQuantity:e.unitOfMeasure,"featured-products"!==this.carousel.dataDriven?this._commonService.checkStrikeThrough(e):this._commonService.checkStrikeThroughSponsored(e),this._commonService.getPromoDescriptionAPI(e),this._product=e}get product(){return this._product}constructor(e,t,i,n,r,s,a){this._commonService=e,this._elementRef=t,this._productCarouselALV1Service=i,this._aemService=n,this._productUtilService=r,this._userInfoService=s,this.intersectionObserverService=a,this.envConfig=Iw,this.hasCoupons=!1,this.loadingSpinner=!1,this.updateAnalyticsInfo=!1,this.isArEnable=!1,this.itemAvailable=!0,this.sellerLandingPath="",this.stpprDataObj={},this.sm="575px",this.md="768px",this.pcTags=[],this.isProductSubscribed=!1,this.isItemEligibleToAdd=!0,this.isSlotWithInDelihours=!0,this.reservedTimeIntent="",this.isLastOrFirstCardOfPreviousOrNextSet=!1,this.isFirstCardOfNextSet=!1,this.isCustomizableProduct=!1,this.isDnfSponsoredProduct=!1,this.isLightWeightProduct=!1,this.digitalDis
1playTimeLabel="",this.appName="",this.pageName="",this.calledBy="",this.subscription=new Ye,this.showArSubscription=()=>this.isArEnable&&!!this.product&&this.product.isArProduct&&this.validPrice>0&&this._commonService.isActiveProduct(this.product),this.carouselSubscription=this._productCarouselALV1Service.carouselBSub$.subscribe((e=>{this.carousel=e,this.stpprDataObj.carouselTitle=this.carousel?.carouselTitle,this.stpprDataObj.isRecommended=this.carousel?.isRecommended}))}ngOnInit(){let e=this._commonService.getCurrentEnviorment(),t=this.envConfig[e]?.baseImageUrl?this.envConfig[e]?.baseImageUrl:"//images.albertsons-media.com/is/image/ABS";this.imagePath=t+"/${product.id}?$grid-product-card-${viewport}$&defaultImage=Not_Available",this.productOffers=this._commonService.getOffersByUpc(this.product,this.offers),this._commonService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&(this.carousel?.pathwaysWidget&&(this.stpprDataObj.pathwaysWidget=this.carousel.pathwaysWidget),this.subscribeForAdaFocusEvent(),window.AB.arFlagLoaded?(this.isArEnable=this._aemService.getArFlag()?.display,this.isCustomizableProduct=this._commonService.isProductEligibleForCustomization(window.AB.storeFlagsData,this.product)):this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display,this.isCustomizableProduct=this._commonService.isProductEligibleForCustomization(window.AB.storeFlagsData,this.product)}))),this.productDetailPath=this.getProductDetailPath(),this.itemAvailable=this._commonService.isItemAvailable_v3(this.product,this.configObj?.programType,!0),this.validPrice=this._commonService.getValidProductPrice(this._product),this.addElipsis(this.product),this.appName=this.configObj&&this.configObj.appName?this.configObj.appName:"",this.isLightWeightProduct=this.configObj?.isLightWeightProduct??!1,this.checkAndSetProgramTypeForB2BSite(),this._updateAnalyticsProducts(),this.setSellerLandingPath(),this.setDisplayableElements(),this.setTagDisplayableElements(),this.getLatestArSubData(),this.setWeightedPrice(),this.isItemEligibleToAddToCart(),this.setIsDnfSponsoredProduct())}))}ngOnChanges(e){e.configObj?.currentValue?.isLightWeightProduct!==e.configObj?.previousValue?.isLightWeightProduct&&(this.configObj=h({},this.configObj),this.isLightWeightProduct=this.configObj?.isLightWeightProduct??!1,this.setDisplayableElements())}ngAfterViewInit(){setTimeout((()=>{this.indexOfCard=Number(this._elementRef.nativeElement.closest(".slick-slide")?.getAttribute("data-slick-index"))+1}),100),this.handleImpressionTracking()}getLatestArSubData(){this.subscriptionSNS=this._commonService.arSubscriptions.subscribe((e=>{e&&!this._commonService.isEmpty(e)&&(this.isProductSubscribed=e.subscribedItems[this.product.id]&&e.subscribedItems[this.product.id]?.isActiveSubscription),this.setBadgeToDisplay(),this._commonService.checkStrikeThrough(this.product)}))}isItemEligibleToAddToCart(){if(this._commonService.checkPendingOrder()&&(this.product?.isMtoProduct||this.product?.isPreOrderItem)){let e=localStorage.getItem("abSlotEditOrder");this.reservedTimeIntent=JSON.parse(e)?.serviceType??"";let{hyphinFormat:t}=this._productUtilService.formatTimeSlots("abSlotEditOrder");
1this.digitalDisplayTimeLabel=t??"",e?(this.isItemEligibleToAdd=!this._commonService.preparationTimeExceedsPrebook(this.product,"abSlotEditOrder"),this.isSlotWithInDelihours=this._productUtilService.isSlotValidAtCurrentTime(window.AB?.storeFlagsData?.flags?.departmentsDetail,"Deli","abSlotEditOrder")):this.isItemEligibleToAdd=!1}}setTagDisplayableElements(){this.pcTags=this._productUtilService.productTagElements(this.product,this.displayableElements,!0)}setWeightedPrice(){this.product.averageWeight?.length&&this.product.averageWeight?.[0]<1&&this.product.averageWeight?.[0]>0&&"ea"!==this.product.displayUnitQuantityText&&(this.product.averageWeightStr=this.product.averageWeight[0].substring(1,4))}sendAdIdClickEvent(){"dnf"!==this.appName&&this._commonService.sendSponsoredProductClickEvent(this.product,"productCardCarousel","viewProductDetails")}onProductCouponDetailsChange(e){this.productDetails=e}setProductDetails(){localStorage.setItem("currentProduct",JSON.stringify(this.productDetails))}setIsDnfSponsoredProduct(){this.configObj&&this.configObj.appName&&"dnf"==this.configObj.appName&&(this.product.adId||this.product.eventTracking)?this.isDnfSponsoredProduct=!0:this.isDnfSponsoredProduct=!1}getImageUrl(e,t){return this.imagePath.replace("${product.id}",e).replace("${viewport}",t)}setProductInfoCarouselSection(){localStorage.setItem("carouselSection_"+this._product.id,this.carousel.title+"")}addElipsis(e){e?.name&&e?.name.trim().length>60&&(e.fullName=e.name,e.name=e?.name.slice(0,30)+"..."+e?.name.slice(-20))}setPfmDetailCarousel(){"spotlight-banner"==this.calledBy?window.AB.isLSEnabled&&window.AB.DATALAYER&&void 0!==window.AB.DATALAYER.setPfmDetailProduct&&(window.AB.DATALAYER.setTopNavPreviousPage(),window.AB.DATALAYER.setPfmDetailProductItemToPDP(this._elementRef.nativeElement,this.product,{isSpotlight:!0})):window.AB.DATALAYER&&void 0!==window.AB.DATALAYER.setPfmDetailCarouselToPDP&&window.AB.DATALAYER.setPfmDetailCarouselToPDP(this.carousel,this._elementRef.nativeElement,this.product)}onProductCardClick(e){e?.target?.closest('.pc__tap-zone, .title-xxs[data-qa="prd-itm-pttl"]')&&this.trackCRSProductClick()}trackCRSProductClick(){let e=window.AB&&window.AB.DATALAYER;if(!e||void 0===e.setCRSClickEvent||!e.isHomePage||!e.isHomePage()||"featured-products"===this.carousel?.dataDriven)return;let t=localStorage.getItem("analyticsProductPlacement")||window.digitalData?.pageFilter?.placement,i=localStorage.getItem("pfmDetailCarouselPDP")||this.product?.pfmDetail,n=this.product?.adobeMetrics?.metricA||this.product?.impressionAdditionalDetail||"no-val",r=f(h({},this.product),{productID:this.product?.productID||this.product?.id||this.product?.itemId?.toString(),productName:this.product?.fullName||this.product?.productName||this.product?.name,listPrice:this.product?.listPrice||this.product?.price,pfmDetail:i,carouselSection:this.carousel?.title||this.product?.carouselSection});e.setCRSClickEvent({linkName:"product-click",mTyp:"product-carousel",element:this._elementRef.nativeElement,placement:t,component:e.getCRSComponent({element:this._elementRef.nativeElement,section:this.carousel?.title||this.product?.carouselSection,detail:n,placement:t}),product:r})}_updateAnalyticsProducts(){window.AB.DATALAYER&&("buy-it-again"===this.carousel.behaviour||"buy-it-again"===this.carousel.dataDriven)&&!this.updateAnalyticsInfo&&(window.AB.DATALAYER.setPastPurchasedImpressions("buyItAgainCarousel"),this.updateAnalyticsInfo=!0)}trackProductImageClick(){window.AB.DATALAYER&&window.AB.DATALAYER.isAccountPage()&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|prd-img`)}setSellerLandingPath(){this.configObj?.programType&&("mkp"===this.configObj.programType||"mkp-carousel"===this.configObj.programType||this.product?.isMarketplaceItem&&"Y"===this.product.isMarketplaceItem)&&(this.sellerLandingPath=this._commonService.getSellerLandingPath(this.product.sellerId))}subscribeForAdaFocusEvent(){this.slickChangesSubscription=this._productCarouselALV1Service.slickChanges$.subscribe((()=>
1{let e=this._elementRef?.nativeElement?.closest(".slick-slide"),t='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), span[role="button"], a[role="button"], img[role="button"]',i=(e.querySelectorAll(t)[0],e.querySelectorAll(t)),n=i[i.length-1];window.innerWidth<768?setTimeout((()=>{if(i.forEach((e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")})),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden"),e?.classList?.contains("slick-active")||!e?.nextElementSibling?.classList?.contains("slick-active")&&!e?.previousElementSibling?.classList?.contains("slick-active"))this.isLastOrFirstCardOfPreviousOrNextSet&&($(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().off("focus"),this.isLastOrFirstCardOfPreviousOrNextSet=!1);else{let t=this.isFirstCardOfNextSet=e?.previousElementSibling?.classList?.contains("slick-active"),i=function(i){t?$(e).closest(".carousel-content-wrapper").slick("slickNext"):$(e).closest(".carousel-content-wrapper").slick("slickPrev")};$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().on("focus",i),this.isLastOrFirstCardOfPreviousOrNextSet=!0}}),100):this.isLastOrFirstCardOfPreviousOrNextSet&&$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().off("focus")}))}getProductDetailPath(){if(this.enableProductDetailsPath){if("wine-carousel"===this.configObj?.programType||"wine-carousel"===this.configObj?.appName){let e=this._commonService.getWineShopSearchResultsPage();return e&&e.replace("{q}",this._aemService.getURLParameterByName("q"))}if("mkp-carousel"===this.configObj?.programType||"mkp-carousel"===this.configObj?.appName){let e=this._commonService.getMarketPlaceCrossSellerSearchResultsPath();return e&&e.replace("{q}",this._aemService.getURLParameterByName("q"))}{let e=this.configObj?.programType?this.configObj?.programType:this.configObj?.appName;if(this.product?.name&&this._commonService.isSeoEnabled())return this._commonService.buildSeoPdpUrl(this.product.fullName||this.product.name,this.product.id);let t=this._commonService.getProductDetailPath(e);return t=t.replace("(bpn)",this.product.id),t}}return this.productDetailPath}ngOnDestroy(){this.subscription.unsubscribe(),this.carouselSubscription.unsubscribe(),this.subscriptionSNS?.unsubscribe(),this.slickChangesSubscription?.unsubscribe()}isLBProduct(){return"3"===this.product?.displayType&&("W"===this.product?.sellByWeight||"P"===this.product?.sellByWeight)}showArSubscriptionByAppName(){return"dnf"!==this.configObj?.appName}setDisplayableElements(){this.programType=this.configObj?.programType??"","horizontal-video"===this.carousel.behaviour&&this.isLightWeightProduct?this.displayableElements=this._productUtilService.getProductDisplayableElementsByProgramType("light-weight"):this.displayableElements=this._productUtilService.getProductDisplayableElementsByProgramType(this.programType),"buy-it-again"===this.carousel?.dataDriven&&(this.displayableElements.buyItAgain=!1)}checkAndSetProgramTypeForB2BSite(){"B"===window.AB?.userInfo?.siteType&&(this.programType="1P_B2B",this.configObj.programType=this.programType)}_updateAnalyticsCTA(e){tue().AB?.DATALAYER&&tue().AB.DATALAYER.analyticsCTATracking("cta:global-search|"+("productCards"===e?"product-cards|see-results-on-marketplace":`internal-link|${this.product.sellerName}`))}handleImpressionTracking(){this.product&&"spotlight-banner"==this.calledBy&&(this.product.adId||this.product.eventTracking)&&this.intersectionObserverService.createObserver(this._elementRef.nativeElement,this.product)}setBadgeToDisplay(){this.badgeToDisplay=this._productUtilService.getBadgeToDisplay(this.isProductSubscribed,this.product)}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(Vl),$d(ude),$d(Cw),$d(Dw),$d(_w),$d(jw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-carousel-item-al-v2"]],hostBindings:function(e,t){1&e&&jf("click",(function(e){return t.onProductCardClick(e)}))},inputs:{pageName:"pageName",carousel:"carousel",offers:"offers",totalNumOfProducts:"totalNumOfProducts",unAttendDeliveryFlag:[0,"isRestricted","unAttendDeliveryFlag"],enableProductDetailsPath:"enableProductDetailsPath",product:"product",configObj:"configObj",calledBy:"calledBy"},features:[ga],decls:28,vars:53,consts:[["quantityStepperTemplate",""],["mtoTemplate",""],["similarProducts",""],[1,"pc","position-relative","h-100",3,"ngClass"],[1,"w-100","h-100","position-absolute","pc__tap-zone",3,"click"],[4,"ngIf"],["style","top: 0;",3,"class",4,"ngIf"],[1,"pc__tc",3,"ngClass"],[1,"pc__bc",3,"ngClass"],[1,"d-flex","flex-column","align-items-start","align-self-stretch","pt-1","pc__bc__gap"],[1,"d-flex","flex-column","align-self-stretch",3,"ngClass"],[1,"d-flex","body-text-xs","pc__text-xxs","color-neutral-80","pc__label-container"],[1,"position-relative",3,"ngClass"],["data-qa","prd-itm-pttl","tabindex","-1",1,"title-xxs","color-neutral-90",3,"click","id"],["class","pc__tooltip__title pc__tooltip__title--carousel",4,"ngIf"],[1,"background-color-neutral-20","color-neutral-90","pc__text-xxs","body-text-xs","text-center","rounded","px-1","position-absolute","pc__badge"],[2,"top","0"],["role","img","aria-hidden","true",3,"class",4,"ngIf"],["role","img","aria-hidden","true"],[1,"pc__tc__imgc","p-1","d-flex","justify-content-center",3,"ngClass"],[3,"media","srcset"],["loading","lazy","data-qa","prd-pctr",1,"pc__tc__imgc__img","w-100","h-100","ab-lazy",3,"src","alt","ngClass"],["data-qa","qty-stppr",1,"d-flex","align-items-end","justify-content-end","position-relative","w-100","pc__tc__cta-container"],[4,"ngTemplateOutlet"],["aria-hidden","false"],["aria-hidden","false",1,"ml-auto"],[1,"product-comp-v1__price","d-flex","align-items-baseline","flex-wrap"],["class","text-l-b font-italic pds-tag-low-price--redwood60 product-comp-v1__price__badge","aria-hidden","true",4,"ngIf"],["data-qa","prd-itm-prc",1,"product-comp-v1__price__text",3,"ngClass"],[1,"sr-only"],["aria-hidden","true",1,"color-neutral-90"],["aria-hidden","true",4,"ngIf"],["class","body-text-xxs color-neutral-80",4,"ngIf"],["aria-hidden","true",1,"text-l-b","font-italic","pds-tag-low-price--redwood60","product-comp-v1__price__badge"],["aria-hidden","true"],[1,"body-text-xxs","color-neutral-80"],[3,"product","offers","productDetailPath","calledBy","isPcRedesignDisabled","setDetailProduct",4,"ngIf"],[3,"setDetailProduct","product","offers","productDetailPath","calledBy","isPcRedesignDisabled"],[1,"pc__tooltip__title","pc__tooltip__title--carousel"],[1,"pc__tooltip__title__arrow-light"],[1,"title-xxs","color-neutral-90"],[1,"pc__tags-ellipses","w-100"],[4,"ngFor","ngForOf"],["class","sr-only",4,"ngIf"],[1,"pc__tags"],["class","pc__tags-divider","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"pc__tags-divider"],[1,"position-relative",3,"productC
1ouponDetails","carouselTitle","product","productOffers","configObj"],["aria-hidden","true",1,"text-s","pt-1"],[1,"text-s-b--info"],["data-qa","qty-stppr",1,"d-flex","align-items-end","justify-content-end","position-relative","w-100","pc__tc__cta-container__light"],[1,"title-xxxs","pt-2"],[1,"links","m-0"],[1,"links__action","link-xs","position-relative",3,"click"],[1,"pt-2"],["class","title-xxxs color-neutral-80",4,"ngIf"],["data-qa","prd-itm-oos",1,"title-xxxs","color-neutral-80"],[1,"title-xxxs","color-neutral-80"],["class","links__action link-xs position-relative","data-qa","prd-itm-vw-smlr-itms",3,"href",4,"ngIf"],["data-qa","prd-itm-vw-smlr-itms",1,"links__action","link-xs","position-relative",3,"href"],[1,"w-100","d-flex","justify-content-end",3,"product","configObj","stpprDataObj","calledBy"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"a",4),qm(2,"currency"),jf("click",(function(){return Wa(e),t.setProductInfoCarouselSection(),t.setProductDetails(),t.setPfmDetailCarousel(),t.sendAdIdClickEvent(),Ha(t.trackProductImageClick())})),xf(),ph(3,_de,3,2,"ng-container",5)(4,Cde,3,7,"span",6),kf(5,"div",7),ph(6,Ide,7,16,"ng-container",5)(7,kde,3,1,"ng-container",5),xf(),kf(8,"div",8)(9,"div",9)(10,"div",10)(11,"div",11),ph(12,xde,3,0,"ng-container",5)(13,Tde,3,0,"ng-container",5),xf(),ph(14,Bde,13,16,"ng-container",5),xf(),ph(15,Rde,2,1,"ng-container",5),kf(16,"div",12)(17,"a",13),jf("click",(function(){return Wa(e),t.setProductInfoCarouselSection(),t.setProductDetails(),t.setPfmDetailCarousel(),Ha(t.sendAdIdClickEvent())})),am(18),xf(),ph(19,Lde,4,1,"div",14),xf(),ph(20,Vde,3,1,"ng-container",5)(21,qde,2,4,"ng-container",5)(22,$de,9,8,"ng-container",5)(23,zde,3,1,"ng-container",5),xf(),ph(24,Wde,7,2,"ng-container",5)(25,Zde,6,1,"ng-container",5),xf(),ph(26,eue,1,1,"ng-template",null,0,Wm),xf()}2&e&&(Hh("max-width","searchCrossSell"===t.pageName||"dealsSponsoredCarousel"===t.pageName||"aislesCrossSell"===t.pageName?"311px":null),zh("ngClass",Mm(39,pde,"wine-carousel"===t.programType,"wine-carousel"!==t.programType&&!t.isLightWeightProduct,t.isLightWeightProduct)),Vd(),Ih("aria-label","",null!=t.product&&null!=t.product.fullName&&t.product.fullName.length?t.product.fullName:t.product.name," ,price approximatly ",jm(2,36,t.validPrice,"USD")," , ",t.indexOfCard," of ",t.totalNumOfProducts," "),gh("href",t.productDetailPath,id),Vd(2),zh("ngIf",t.isProductSubscribed||(null==t.displayableElements?null:t.displayableElements.buyItAgain)&&(null==t.product?null:t.product.pastPurchased)),Vd(),zh("ngIf",null==t.badgeToDisplay?null:t.badgeToDisplay.badgeName),Vd(),zh("ngClass",Om(43,hde,t.isLightWeightProduct)),Vd(),zh("ngIf",null==t.displayableElements?null:t.displayableElements.image),Vd(),zh("ngIf",!t.isLightWeightProduct),Vd(),zh("ngClass",Om(45,fde,t.isLightWeightProduct)),Vd(2),zh("ngClass",Om(47,mde,t.isLightWeightProduct)),Vd(2),zh("ngIf","approx"===t.product.displayEstimateText),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.sponsoredLabel)&&(null==t.product?null:t.product.featured)),Vd(),zh("ngIf",null==t.displayableElements?null:t.displayableElements.price),Vd(),zh("ngIf",!(t.isCustomizableProduct||null==t.displayableElements||!t.displayableElements.scheduleNSave||t.unAttendDeliveryFlag&&0!==t.product.restrictedValue)),Vd(),zh("ngClass",Om(49,gde,(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60))("ngClass",Om(51,bde,t.isLightWeightProduct)),gh("data-bpn",t.product.id)("data-name",t.product.name),Vd(),Jf("id","pg"+t.product.id),gh("aria-label",null!=t.product&&null!=t.product.fullName&&t.product.fullName.length?t.product.fullName:t.product.name)("data-bpn",t.product.id)("href",t.productDetailPath,id),Vd(),cm(" ",t.product.name," "),Vd(),zh("ngIf",(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60),Vd(),zh("ngIf",!t.isLightWeightProduct&&t.pcTags.length>0),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.coupons)&&t.itemAvailable),Vd(),zh("ngIf",(null==t.product?null:t.product.isPreOrderItem)&&(!(null!=t.configObj&&t.configObj.programType)||"abs"===(null==t.configObj?null:t.configObj.programType)||"1P_B2B"===(null==t.configObj?null:t.configObj.programType))),Vd(),zh("ngIf",t.isLightWeightProduct),Vd(),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.sellerTag)&&"Y"===t.product.isMarketplaceItem&&t.product.sellerId&&t.product.sellerName),Vd(),zh("ngIf",!t.itemAvailable||t.itemAvailable&&!t.isItemEligibleToAdd||t.itemAvailable&&!t.product.disableInStoreUICheck||t.itemAvailable&&!t.isSlotWithInDelihours))},dependencies:[sy,oy,cy,by,Noe,lce,ile,Sy,Iy,By,Ty],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),nue=(()=>{class e{transform(e,...t){return e||null}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"getFontColor",type:e,pure:!0,standalone:!0})}}return e})(),rue=(()=>
1{class e{transform(e,t="desktop"){let i=`$product-carousel-mkt-card-${t}$`;switch(e?.displayType){case"imageOnly":return{"background-image":`url(${e.backgroundImg.split("?")[0]}?${i})`};case"colorTextPlate":case"transparentTextPlate":return e.backgroundImg?{"background-image":`url(${e.backgroundImg.split("?")[0]}?${i})`}:e.backgroundColor?{"background-color":e.backgroundColor}:{};default:return{}}}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵpipe=is({name:"getBackgroundStyles",type:e,pure:!0,standalone:!0})}}return e})(),sue=(e,t)=>({"product-carousel-theme2":e,"pb-3":t}),aue=e=>({"pds-marketing-card--left d-flex justify-content-center align-items-stretch w-100":e});function oue(e,t){if(1&e&&Tf(0,"a",10),2&e){let e=Yf(3);zh("target","true"===(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.openNewTab)?"_blank":"_self"),gh("href",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaLink,id)("aria-label",null==e.marketingTile?null:e.marketingTile.backgroundImgAltText)}}function lue(e,t){if(1&e&&(kf(0,"div",17),qm(1,"getFontColor"),am(2),xf()),2&e){let e=Yf(4);Hh("color",$m(1,3,null==e.marketingTile?null:e.marketingTile.fontColor)),Vd(2),cm(" ",e.marketingTile.eyebrow," ")}}function cue(e,t){if(1&e&&(kf(0,"div",18)(1,"a",19),qm(2,"getFontColor"),am(3),xf()()),2&e){let e=Yf(4);Vd(),Hh("color",$m(2,6,null==e.marketingTile?null:e.marketingTile.fontColor)),zh("href",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaLink,id)("target","true"===(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.openNewTab)?"_blank":"_self"),gh("aria-label",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaAltText),Vd(2),cm(" ",e.marketingTile.webCtaProps.ctaText," ")}}function due(e,t){if(1&e&&(kf(0,"div",11)(1,"div",12),ph(2,lue,3,5,"div",13),kf(3,"div",14),qm(4,"getFontColor"),am(5),xf(),kf(6,"div",15),qm(7,"getFontColor"),am(8),xf()(),ph(9,cue,4,8,"div",16),xf()),2&e){let e=Yf(3);Vd(2),zh("ngIf",null==e.marketingTile?null:e.marketingTile.eyebrow),Vd(),Hh("color",$m(4,8,null==e.marketingTile?null:e.marketingTile.fontColor)),Vd(2),lm(null==e.marketingTile?null:e.marketingTile.marketingTileTitle),V
1d(),Hh("color",$m(7,10,null==e.marketingTile?null:e.marketingTile.fontColor)),Vd(2),lm(null==e.marketingTile?null:e.marketingTile.marketingTileSubtitle),Vd(),zh("ngIf","true"===(null==e.marketingTile?null:e.marketingTile.webCtaMarketing)&&(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaText))}}function uue(e,t){if(1&e&&Tf(0,"img",25),2&e){let e=Yf(4);Jf("src",(null==e.marketingTile?null:e.marketingTile.iconBackgroundImage)+(e.viewportDeviceType?"?$product-carousel-mkt-card-icon-"+e.viewportDeviceType+"$":""),id),Jf("alt",null==e.marketingTile?null:e.marketingTile.iconImageAltText)}}function pue(e,t){if(1&e&&(kf(0,"a",26),qm(1,"getFontColor"),am(2),xf()),2&e){let e=Yf(4);Hh("--cta-color",null==e.marketingTile?null:e.marketingTile.fontColor)("color",$m(1,8,null==e.marketingTile?null:e.marketingTile.fontColor)),zh("href",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaLink,id)("target","true"===(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.openNewTab)?"_blank":"_self"),gh("aria-label",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaAltText),Vd(2),cm(" ",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaText," ")}}function hue(e,t){if(1&e&&(kf(0,"div",20),ph(1,uue,1,2,"img",21),kf(2,"div",22),qm(3,"getFontColor"),am(4),xf(),kf(5,"div",23),qm(6,"getFontColor"),am(7),xf(),ph(8,pue,3,10,"a",24),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf","icon"===(null==e.marketingTile?null:e.marketingTile.badgeSetupType)),Vd(),Hh("color",$m(3,8,null==e.marketingTile?null:e.marketingTile.fontColor)),Vd(2),lm(null==e.marketingTile?null:e.marketingTile.marketingTileTitle),V
1d(),Hh("color",$m(6,10,null==e.marketingTile?null:e.marketingTile.fontColor)),Vd(2),lm(null==e.marketingTile?null:e.marketingTile.marketingTileSubtitle),Vd(),zh("ngIf","true"===(null==e.marketingTile?null:e.marketingTile.webCtaMarketing)&&(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaText))}}function fue(e,t){if(1&e&&(kf(0,"div",29),am(1),xf()),2&e){let e=Yf(4);gh("aria-label",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerText),Vd(),cm(" ",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerText," ")}}function mue(e,t){if(1&e&&(kf(0,"a",30),am(1),xf()),2&e){let e=Yf(4);zh("href",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerCtaLink,id)("target","true"===(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerExternalBrowser)?"_blank":"_self"),gh("aria-label",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerAltText),Vd(),cm(" ",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerText," ")}}function gue(e,t){if(1&e&&(Ef(0),ph(1,fue,2,2,"div",27)(2,mue,2,4,"a",28),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!(null!=e.marketingTile&&null!=e.marketingTile.webCtaProps&&e.marketingTile.webCtaProps.disclaimerCtaLink)),Vd(),zh("ngIf",null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.disclaimerCtaLink)}}function bue(e,t){if(1&e&&(Ef(0),kf(1,"div",5),ph(2,oue,1,3,"a",6),kf(3,"div",7),qm(4,"getBackgroundStyles"),ph(5,due,10,12,"div",8)(6,hue,9,12,"div",9)(7,gue,3,2,"ng-container",3),xf()(),Df()),2&e){let e=Yf(2);Vd(),zh("ngClass",Om(9,aue,"left"===(null==e.marketingTile?null:e.marketingTile.alignment))),Vd(),zh("ngIf","true"===(null==e.marketingTile?null:e.marketingTile.webCtaMarketing)&&(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.ctaLink)),Vd(),zh("ngStyle",jm(4,6,e.marketingTile,e.viewportDeviceType)),Vd(2),zh("ngIf","imageOnly"!==(null==e.marketingTile?null:e.marketingTile.displayType)&&"left"===(null==e.marketingTile?null:e.marketingTile.alignment)),Vd(),zh("ngIf","imageOnly"!==(null==e.marketingTile?null:e.marketingTile.displayType)&&"left"!==(null==e.marketingTile?null:e.marketingTile.alignment)),Vd(),zh("ngIf","true"===(null==e.marketingTile?null:e.marketingTile.webCtaMarketing)&&"true"===(null==e.marketingTile||null==e.marketingTile.webCtaProps?null:e.marketingTile.webCtaProps.showDisclaimer))}}function yue(e,t){if(1&e){let e=Mf();kf(0,"product-carousel-item-al-v2",32),mm("isRestrictedChange",(function(t){Wa(e);let i=Yf(3);return fm(i.unAttendDeliveryFlag,t)||(i.unAttendDeliveryFlag=t),Ha(t)})),xf()}if(2&e){let e=Yf().$implicit,t=Yf(2);zh("product",e)("carousel",t.carousel)("offers",t.offers),hm("isRestricted",t.unAttendDeliveryFlag),zh("configObj",t.configObj)("enableProductDetailsPath",t.enableProductDetailsPath)("totalNumOfProducts",null==t.v2ChildComponents?null:t.v2ChildComponents.length)("pageName",t.pageName)}}function vue(e,t){if(1&e&&(Ef(0),ph(1,yue,1,8,"product-carousel-item-al-v2",31),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",(i.allowNotAvailable()||i.isItemAvailable(e))&&(null!==e.id||null!==e.itemId)&&null!==e.name)}}function wue(e,t){if(1&e&&(Ef(0),kf(1,"div",2),ph(2,bue,8,11,"ng-container",3)(3,vue,2,1,"ng-container",4),xf(),Df()),2&e){let e=Yf();Vd(),zh("ngClass",Bm(4,sue,e.enableDstV2Theme,e.marketingTile&&(e.marketingTile.backgroundImg||e.marketingTile.backgroundColor))),gh("experienceName",e.experienceName),Vd(),zh("ngIf",e.marketingTile&&(e.marketingTile.backgroundImg||e.marketingTile.backgroundColor)),Vd(),zh("ngForOf",e.products)}}function _ue(e,t){if(1&e&&(kf(0,"div",33),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.errorMessage," ")}}var Sue=(()=>{class e{set carouselProducts(e){this.products=e}set carouselProductsOffers(e){this.offers=e}constructor(e,t,i,n,r,s,a,o,l){this.elementRef=e,this._carouselService=t,this._zone=i,this._commonService=n,this._userInfoService=r,this._aemService=s,this._appConfigService=a,this.productUtilService=o,this._intersectionObserverService=l,this.pageName="",this.marketingTile=null,this._childComponentsReady=new Tt(!1),this.isAuthorizedUser=!1,this.products=[],this.error=!1,this.unAttendDeliveryFlag=!1,this.isThemeBuilderEnabled=!1,this.viewportDeviceType="desktop",this.showBoxtop=!1,this.showCarousel=!0,this.sponsoredCarousel=!1,this.isAnyProductHasAddlInfo=!1,this.isArEnable=!1,this.isFromBia=!1,this.enableDstV2Theme=!1,this.isMarketPlaceEnabled=!1,this.isWineShopEnabled=!1,this.subscription=new Ye}ngOnInit(){this.updateImage(window.innerWidth),this.wrapper=this.elementRef.nativeElement,this.isAuthorizedUser=this._userInfoService.isAuthorized(),this.isThemeBuilderEnabled=!(!window.SWY.CONFIGSERVICE||!window.SWY.CONFIGSERVICE.isThemeBuilderEnabled);let e=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.pageLevelFlagConfig&&window.SWY.CONFIGSERVICE.pageLevelFlagConfig.disableV2Theme;if(this.enableDstV2Theme=!1===e,this.enableDstV2Theme=!0,this.carousel={type:this.carouselType,dataDriven:this.wrapper.getAttribute("data-carousel-driven"),behaviour:this._carouselService.getBehaviour(this.wrapper),sellerId:this.wrapper.getAttribute("data-carousel-seller-id"),title:this.wrapper.getAttribute("data-carousel-title"),userRestrictions:this.wrapper.getAttribute("data-carousel-users"),dataSource:this._carouselService.getDataSource(this.wrapper),apiPostBody:this.wrapper.getAttribute("data-carousel-api-post"),actionButton:this.wrapper.getAttribute("data-carousel-action"),aisleName:this.wrapper.getAttribute("data-carousel-aisle-name"),hostName:this.wrapper.getAttribute("data-carousel-hostName"),maxNoOfProducts:this.wrapper.getAttribute("data-carousel-max-products"),buyItAgainPage:this.wrapper.getAttribute("data-buy-it-again-page"),isRecommended:!1,id:this.createCarouselId(),isAuthorizedUser:this.isAuthorizedUser,sellerType:this.wrapper.getAttribute("data-seller-type"),pathwaysWidget:{},badgePreference:this.wrapper.getAttribute("data-badge-preferrence"),badgeList:this.wrapper.getAttribute("data-badge-list")},this.carousel.deptId=this.deptId,this.carousel.isRecommended=this._carouselService.checkRecommendations(this.carousel),"mkp"===this.configObj?.programType||"mkp-carousel"===this.configObj?.programType){this.isMarketPlaceEnabled=!0,this.programType=this.configObj.programType;let e=document.querySelector("product-detail")?.getAttribute("data-product-seller-id"),t=document.querySelector("product-detail")?.getAttribute("data-product-seller-name");if(e&&(this.carousel.sellerId=e,t)){let e=this.carousel.title.replace("{sellerName}",t);e&&(this.carousel.title=e,this.wrapper.closest(".slick-product-carou
1sel").querySelector(".carousel-header-wrapper .carousel-header-text-wrapper .carousel-header-text").innerHTML=e)}}"wineshop"===this.configObj?.programType&&this._aemService._isWineShopEnabledForStore()&&(this.isWineShopEnabled=!0,this.programType=this.configObj.programType);let t=this.wrapper.getAttribute("data-card-type");t&&(this.cardType=t),"featured-products"===this.carousel.dataDriven?this.sponsoredCarousel=!0:"buy-it-again"===this.carousel.dataDriven&&(this.isFromBia=!0),window[this.wrapper.getAttribute("id")+"_CompRef"]={zone:this._zone,component:this},this.showCarousel=!0,this._aemService.isArFlagLoaded()?this.isArEnable=this._aemService.getArFlag()?.display:this._commonService.canTriggerProductsCall()&&this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display}))),this.isAnyProductHasAddlInfo=this.checkAnyProductHasArEnabled(this.products),this.isAnyProductHasAddlInfo&&$(this.elementRef.nativeElement).closest(".slick-product-carousel.preset-block-height").addClass("preset-block-height-ar")}ngOnChanges(e){e.configObj?.currentValue?.isLightWeightProduct!==e.configObj?.previousValue?.isLightWeightProduct&&(this.configObj=h({},e.configObj.currentValue))}onResize(e){this.updateImage(e.target.innerWidth)}updateImage(e){this.viewportDeviceType=e<768?"mobile":e>=768&&e<1024?"tablet":"desktop"}checkTargetContextIds(){return!(!this._commonService.checkAnalyticsSwyObject()||!window.analyticsSwy.storedData.ids.paramsForRecs)}initCarouselSlick(){let e=this.v2ChildComponents;e&&(e.length>0?(this._carouselService.initSlick(this.wrapper,this.carousel.behaviour,this.products,this.analyticsp13nData,this.configObj,this.pageName,this.carousel.title),this._carouselService.setAriaLabelForProductCarousel(this.wrapper,this.carousel.title),window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.products,"load",this.analyticsp13nData),this.handleImpressionTracking()):e.changes.subscribe((()=>{this._carouselService.initSlick(this.wrapper,this.carousel.behaviour,this.products,this.analyticsp13nData,this.configObj,this.pageName,this.carousel.title),this._carouselService.setAriaLabelForProductCarousel(this.wrapper,this.carousel.title),window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.products,"load",this.analyticsp13nData),this.handleImpressionTracking()})))}checkRestrictedItems(){this.unAttendDeliveryFlag=!0}createCarouselId(){return Math.floor(900*Math.random()+100)}isItemAvailable(e){return this._commonService.isItemAvailable_v3(e,this.programType,!0)}allowNotAvailable(){return this.carousel&&"buy-it-again-landing-category"===this.carousel.behaviour}isScheduleAndSaveCarousel(){return"sns"===this.cardType}checkAnyProductHasArEnabled(e){let t=this.productUtilService.getProductDisplayableElementsByProgramType(this.configObj.programType);return!!(e&&this.isArEnable&&t.scheduleNSave)&&e.some((e=>e.isArProduct))}handleImpressionTracking(){this._intersectionObserverService.createObserver(this.wrapper,null,this.products,this._carouselService.processImpression.bind(this._carouselService))}ngAfterViewInit(){this.initCarouselSlick()}ngOnDestroy(){this.subscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(ude),$d(Tl),$d(Bw),$d(_w),$d(Cw),$d(Vw),$d(Dw),$d(jw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-carousel-al-v1"]],viewQuery:function(e,t){if(1&e&&tm(iue,5),2&e){let e;im(e=nm())&&(t.v2ChildComponents=e)}},hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}),0,od)},inputs:{deptId:"deptId",cardType:"cardType",carouselProducts:"carouselProducts",carouselProductsOffers:"carouselProductsOffers",carouselType:"carouselType",isCaasCarousel:"isCaasCarousel",enableProductDetailsPath:"enableProductDetailsPath",configObj:"configObj",analyticsp13nData:[0,"carouselP13nData","analyticsp13nData"],pageName:"pageName",marketingTile:"marketingTile"},features:[xm([ude]),ga],decls:3,vars:2,consts:[["errorTemplate",""],[4,"ngIf","ngIfElse"],["data-qa","prd-crsl",1,"carousel-content-wrapper","product-carou
1sel-v2","d-block","carousel-content-wrapper--redesign",3,"ngClass"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"pds-marketing-card","full-height","position-relative",3,"ngClass"],["class","w-100 h-100 position-absolute pc__tap-zone",3,"target",4,"ngIf"],[1,"pds-marketing-card__background","full-height",3,"ngStyle"],["class","pds-marketing-card__text-plate d-flex flex-column justify-content-end align-items-start w-100",4,"ngIf"],["class","pds-marketing-card__text-plate",4,"ngIf"],[1,"w-100","h-100","position-absolute","pc__tap-zone",3,"target"],[1,"pds-marketing-card__text-plate","d-flex","flex-column","justify-content-end","align-items-start","w-100"],[1,"pds-marketing-card__text","d-flex","flex-column","align-items-start"],["class","pds-marketing-card__eyebrow eyebrow-m text-start",3,"color",4,"ngIf"],[1,"pds-marketing-card__heading-left","heading-xxs","text-start"],[1,"pds-marketing-card__desc-left","text-s","text-start","mt-0"],["class","pds-marketing-card__pds-link d-flex align-items-start",4,"ngIf"],[1,"pds-marketing-card__eyebrow","eyebrow-m","text-start"],[1,"pds-marketing-card__pds-link","d-flex","align-items-start"],[1,"pds-marketing-card__action-link","link-s","align-self-start",2,"text-decoration-style","solid",3,"href","target"],[1,"pds-marketing-card__text-plate"],["class","pds-marketing-card__image",3,"src","alt",4,"ngIf"],[1,"pds-marketing-card__heading","poppins"],[1,"pds-marketing-card__desc","nunito-sans"],["role","button","class","pds-marketing-card__button pds-btn pds-btn-size__small pds-btn-outlined--neutral d-flex align-items-center justify-content-center",3,"--cta-color","href","target","color",4,"ngIf"],[1,"pds-marketing-card__image",3,"src","alt"],["role","button",1,"pds-marketing-card__button","pds-btn","pds-btn-size__small","pds-btn-outlined--neutral","d-flex","align-items-center","justify-content-center",3,"href","target"],["class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent","tabindex","0",4,"ngIf"],["role","button","class","pds-marketing-card__tag text-xs pds-tag pds-tag-primary-colors--whiteTransparent pds-tag-interactive",3,"href","target",4,"ngIf"],["tabindex","0",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent"],["role","button",1,"pds-marketing-card__tag","text-xs","pds-tag","pds-tag-primary-colors--whiteTransparent","pds-tag-interactive",3,"href","target"],["data-qa","prd-crsl-cmpnnt","class","h-100","role","region",3,"product","carousel","offers","isRestricted","configObj","enableProductDetailsPath","totalNumOfProducts","pageName","isRestrictedChange",4,"ngIf"],["data-qa","prd-crsl-cmpnnt","role","region",1,"h-100",3,"isRestrictedChange","product","carousel","offers","isRestricted","configObj","enableProductDetailsPath","totalNumOfProducts","pageName"],[1,"carousel-content-loading"]],template:function(e,t){if(1&e&&ph(0,wue,4,7,"ng-container",1)(1,_ue,2,1,"ng-template",null,0,Wm),2&e){let e=sm(2);zh("ngIf",!t.error)("ngIfElse",e)}},dependencies:[sy,oy,cy,gy,iue,nue,rue],styles:[".pds-marketing-card[_ngcontent-%COMP%]{padding-left:8px}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]{z-index:1}.pds-marketing-card[_ngcontent-%COMP%] a.pc__tap-zone[_ngcontent-%COMP%]:focus{outline-offset:-3px}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:hover{border:1px solid var(--cta-color, #1F1E1E)!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%]:focus{outline:2px solid var(--cta-color, #535250)!important}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__button[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag[_ngcontent-%COMP%]{z-index:5}.pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%], .pds-marketing-card[_ngcontent-%COMP%] a.pds-marketing-card__tag.pds-tag-interactive[_ngcontent-%COMP%]:hover{text-decoration:underline!important}"]})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Cue=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[ude],imports:[Ly,i_,qoe,cce,nle]})}}return e})(),Iue=(()=>{class e{constructor(e){this._http=e,this._slickFocusableSelector="a, button, input, select, textarea, [tabindex]",this.br_uid_2=encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),this.params=new Ky,this.headers=new jy,this.query="*",this.sort="",this.start=0,this.hostName=window.location.origin,this.request_type="pathway-search",this.search_type="keyword",this.rows=5,this.widgetId="",this.pgm="wineshop",this.facet=!1,this.availabilityCheck=!0,this.channel="shipping",this.elevateSessionId=encodeURIComponent(window.AB.COMMON.getCookie("_elevaate_session_id")),this.winesCarouselData=new Tt({}),this._winesCarousalAvailable=new Tt(!1),this.winesplaceCarousalAvailable$=this._winesCarousalAvailable.asObservable(),this._handleBannerParameter=()=>{let e=window.AB?.userInfo?.banner;e&&(this.params=this.params.has("banner")?this.params.set("banner",e):this.params.append("banner",e))}}getWineShopProducts(e){this._winesCarousalAvailable.next(!0),this.widgetId=e,this.query=this.getSearchKeyword(),this.generateURL(),this.headers=this.headers.set("Ocp-Apim-Subscription-Key",window.SWY.CONFIGSERVICE.searchConfig?.apimSubscriptionKey);let t=window.SWY?.CONFIGSERVICE?.searchConfig?.apimSearchPath+window.AB?.wineCarouselEndPoint,i={headers:this.headers,params:this.params};this._http.get(t,i).subscribe((e=>{if(e&&e.response)return this.winesCarouselData.next(e.response)}))}generateURL(){let e,t=encodeURIComponent(window.AB.userInfo.wfcStoreId);e=window.AB&&window.AB.storeFlagsData&&window.AB.storeFlagsData&&window.AB.storeFlagsData.flags&&window.AB.storeFlagsData.flags.timezone?window.AB.storeFlagsData.flags.timezone:"America/Los_Angeles",this.params=this.params.set("request-id",this._getUTCTimeStampRandom()).set("url",this.hostName).set("pageurl",this.hostName).set("pagename",this.request_type).set("rows",String(this.rows)).set("start",String(this.start)).set("search-type",this.search_type).set("storeid",t).set("search-uid",this.br_uid_2).set("q",this.query).set("sort",this.sort).set("featuredsessionid",this.elevateSessionId).set("screenwidth",$(window).width()).set("channel",this.channel).set("widget-id",this.widgetId).set("pgm",this.pgm).set("facet",String(this.facet)).set("dvid","web-4.1"+this.request_type).set("availabilityCheck",String(this.availabilityCheck)).set("zipcode",window.AB.userInfo.zipcode).set("timezone",e),this._handleBannerParameter()}getSearchKeyword(){let e=new URL(window.location.href);return e.searchParams.has("q")?e.searchParams.get("q"):"*"}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}initSlick(e,t,i=!1){let n,r={},s=[];n="crossSeller"==t?this.buildActiveSlides(2,4,5,5,6):this.buildActiveSlides(2,3,3.5,4,6),r="crossSeller"==t?this.buildActiveSlides(2,4,5,5,6):this.buildActiveSlides(2,2,2,1,1),s=[{breakpoint:359,settings:{slidesToShow:n[359],slidesToScroll:r[359],dots:!0,arrows:!1}
1},{breakpoint:767,settings:{slidesToShow:n[767],slidesToScroll:r[767],dots:!0,arrows:!1}},{breakpoint:1023,settings:{slidesToShow:n[1023],slidesToScroll:r[1023],dots:!1,arrows:!0}},{breakpoint:1199,settings:{slidesToShow:n[1199],slidesToScroll:r[1199],dots:!1,arrows:!0}},{breakpoint:1439,settings:{slidesToShow:n[1439],slidesToScroll:r[1439],dots:!1,arrows:"crossSeller"==t}}];let a,o=null;$(e).find(".carousel-content-wrapper").not(".slick-initialized").on("init",((t,n)=>{i||(this.addSlickRedesignClasses(e),this.setCarouselRedesignWidth(e,n.slideCount)),this._syncSlickSlideFocusability(e)})).slick({tail:!0,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,responsive:s}).on("beforeChange",(function(t,i,n,r){if(o=null,$("body").addClass("focus-outline"),i?.$dots)a="";else if(n<r){a="next";let t=$(".slick-list .slick-current ~ .slick-slide:not(.slick-active)",$(e));t.length&&(o=t[0])}else{a="prev";let t=$(".slick-list .slick-current",$(e)).prev();t.length&&(o=t[0])}})).on("afterChange",((t,n,r,s)=>{if(i||(this.addSlickRedesignClasses(e),this.setCarouselRedesignWidth(e,n.slideCount)),this._syncSlickSlideFocusability(e),n?.$dots){if(r>0){$('.slick-list .slick-slide[data-slick-index="'+(r-1)+'"]',$(e)).removeClass("slick-active").attr("aria-hidden","true").attr("tabindex","-1")}let t=$('.slick-current a[aria-hidden!="true"], .slick-current .sr-only',$(e));t.length&&t[0].focus(),setTimeout((()=>{this._syncSlickSlideFocusability(e),this.adaHandler()}),0)}else if("next"==a){o||(o=$(".slick-current",$(e)));let t=$('a[aria-hidden!="true"], .sr-only',o);t.length&&t[0].focus()}else o||(o=$(".slick-active:last",$(e))),$("a:last",o).focus()})),setTimeout((()=>{this._syncSlickSlideFocusability(e),this.adaHandler()}),0)}_syncSlickSlideFocusability(e){let t=$(e).find(".carousel-content-wrapper").first();t.length&&(t.find(".slick-slide").each(((e,t)=>{let i=$(t),n=i.hasClass("slick-active");i.attr("aria-hidden",n?"false":"true"),i.find(this._slickFocusableSelector).each(((e,t)=>{let i=$(t);if(typeof i.attr("data-original-tabindex")>"u"){let e=i.attr("tabindex");i.attr("data-original-tabindex",typeof e>"u"?"":e)}if(n){let e=i.attr("data-original-tabindex");""===e?i.removeAttr("tabindex"):i.attr("tabindex",e)}else i.attr("tabindex","-1")}))})),this._syncArrowFocusability(t.find(".slick-prev")),this._syncArrowFocusability(t.find(".slick-next")))}_syncArrowFocusability(e){e.each(((e,t)=>{let i=$(t);i.hasClass("slick-disabled")||"true"===i.attr("aria-disabled")||i.prop("disabled")?i.attr("tabindex","-1"):i.attr("tabindex","0")}))}buildActiveSlides(e,t,i,n,r){return{359:e,767:t,1023:i,1199:n,1439:r}}adaHandler(){let e=$(".slick-dots");if(e){let t=e.find("li");$.each(t,((e,t)=>{let i=$(t).find("button");i.attr("aria-label",`Slide ${e+1}`),$(t).hasClass("slick-active")&&i.attr("aria-label",i.attr("aria-label")+", current slide")}))}}addSlickRedesignClasses(e){$(e).find(".slick-track").first().addClass("pc-carousel-grid pc-carousel-grid--vine"),$(e).find(".slick-list").first().addClass("pc-slick-list"),$(e).find(".slick-slide").each(((e,t)=>{$(t).addClass("pc-slick-slide"),$(t).children().first().addClass("h-100")}))}setCarouselRedesignWidth(e,t){let i=t/2*100;window.innerWidth>=1280?i=t/5*100:window.innerWidth>=768&&(i=t/4*100),$(e).find(".slick-track").first().css("max-width",`${i}%`)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Aue=(()=>{class e{constructor(e){this._videoEvent=new kt,this.videoEvent$=this._videoEvent.asObservable(),this.playerLibraryUrl="https://asset.fwcdn3.com/js/fwn.js",this.renderer=e.createRenderer(null,null)}init(){this.initPlayerEventListeners(),this.loadScript(),window.getFireworksComp?.setCookieConsent()}initPlayerEventListeners(){let e=e=>{"fw:ads:unfilled_ad"==e.type&&console.warn(`${e.type} --`,e?.detail),this._videoEvent.next(e)};["fw:ads:unfilled_ad","fw:player:content-change","fw:video:click"].forEach((t=>{document.addEventListener(t,e.bind(this))}))}loadScript(){let e=this.renderer.createElement("script");e.async=!0,this.renderer.setAttribute(e,"src",this.playerLibraryUrl),this.renderer.setAttribute(e,"data-fwparam_cookies_opt_in","true"),this.renderer.setAttribute(e,"data-fwparam_cookies_root","false"),this.renderer.appendChild(document.head,e)}static{this.ɵfac=function(t){return new(t||e)(lr(cp))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),kue=e=>
1({"aspect-ratio":e});function xue(e,t){if(1&e&&Tf(0,"fw-player",2),2&e){let e=Yf();zh("ngStyle",Om(2,kue,e.isOrienationH?"16 / 9":"9 / 16")),gh("auto_subtitles_enabled",!1)}}function Tue(e,t){if(1&e){let e=Mf();kf(0,"div",3)(1,"abs-video-wrapper",4),jf("abs-video-ready",(function(t){return Wa(e),Ha(Yf().onInHouseVideoReady(t))}))("abs-video-play",(function(t){return Wa(e),Ha(Yf().onInHouseVideoPlay(t))})),xf()()}if(2&e){let e=Yf();Yh("abs-video-container--search","search"===(null==e.configObj?null:e.configObj.calledBy))("abs-video-container--pdp","pdp"===(null==e.configObj?null:e.configObj.calledBy)),zh("ngStyle",Om(6,kue,e.isOrienationH?"16 / 9":"9 / 16")),Vd(),gh("data-content",e.inHouseWrapperContent)}}var Pue=(()=>{class e{constructor(e,t,i,n,r){this.renderer=e,this.el=t,this._service=i,this._aemService=n,this._featureFlagService=r,this.xml="",this.title="",this.compId=0,this.ctaUrl="",this.isOrienationH=!1,this.configObj={calledBy:"search"},this.videoEvent=new _l,this.isLoading=!0,this.hideVideo=!1,this.isClickTracked=!1,this.isInHousePlayerEnabled=!1,this.widgetName="video-pl",this.sponsoredVideoType="sponsored",this.inHouseWrapperContent=""}ngOnInit(){this.compId&&(this.widgetName+=this.compId),this.isInHousePlayerEnabled=!0!==this._featureFlagService.getFeatureFlagByNameDisable(this.getInHouseVideoFeatureFlag()),this.isInHousePlayerEnabled?this.setInHouseWrapperContent():(this._service.init(),this._service.videoEvent$.subscribe((e=>{this.videoEventHandler(e)})))}getInHouseVideoFeatureFlag(){return"pdp"===this.configObj?.calledBy?"IsPdpInHouseVideoDisabled":"IsSearchInHouseVideoDisabled"}ngAfterViewInit(){this.loadAd()}ngOnChanges(e){this.isInHousePlayerEnabled&&(e.xml||e.title)&&this.setInHouseWrapperContent()}loadAd(){if(this.xml){let e=this.el.nativeElement.querySelector(this.isInHousePlayerEnabled?"abs-video-wrapper":"fw-player");e&&(this.isInHousePlayerEnabled?(this.setInHouseWrapperContent(),this.renderer.setAttribute(e,"data-content",this.inHouseWrapperContent)):(this.renderer.setAttribute(e,"name",this.widgetName),this.renderer.setAttribute(e,"vast_xml",this.xml)))}else console.error("Invalid XML")}setInHouseWrapperContent(){let e={designType:"inline",playback:{autoplay:!0,muted:!0,loop:!0,controls:!0,preload:"auto"},videos:[{title:this.title,videoType:this.sponsoredVideoType,aspectRatio:this.isOrienationH?"16:9":"9:16",videoOrientation:this.isOrienationH?"horizontal":"vertical",sponsoredContent:[{vastXml:this.xml,vmapXml:"",offsetSeconds:0,adPlacement:"preroll",loop:!0}],products:[]}]};this.inHouseWrapperContent=JSON.stringify(e)}onInHouseVideoReady(e){return v(this,null,(function*(){this.videoEvent.emit({isLoading:!1})}))}onInHouseVideoPlay(e){this.isClickTracked||(this.videoEvent.emit({isClicked:!0}),this.isClickTracked=!0)}videoEventHandler(e){if(e&&e.detail&&e.detail.name===this.widgetName)switch(e.type){case"fw:player:content-change":this.isLoading=!1,this.videoEvent.emit({isLoading:this.isLoading});break;case"fw:ads:unfilled_ad":this.isLoading=!1,this.hideVideo=!0,this.videoEvent.emit({isLoading:this.isLoading,hideVideo:this.hideVideo});break;case"fw:video:click":this.isClickTracked||(this.videoEvent.emit({isClicked:!0}),this.isClickTracked=!0)}}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Vl),$d(Aue),$d(Cw),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["video-player"]],inputs:{xml:"xml",title:"title",compId:"compId",ctaUrl:"ctaUrl",isOrienationH:"isOrienationH",configObj:"configObj"},outputs:{videoEvent:"videoEvent"},features:[ga],decls:2,vars:2,consts:[["ads_hide_badge","true","channel","empty_channel","ad_channel_id","xBpzZRx","ad_positions","0","player_minimize","false","branding","false","player_more_menu","false","player_captions","false","max_videos","1","autoplay","true","player_fullscreen","false","overlay_play_button_size","100","reverse_audio_controls","true","style","display: block;width:100%; height: 100%; --fw-player-border-radius:0;--fw-storyblock-border-radius:0;--fw-player-play-overlay-opacity: 1; --fw-player-play-overlay-background-color: rgba(0, 0, 0, 0.75);--fw-player-caption-background: black;--fw-player-caption-color: white;",3,"ngStyle",4,"ngIf"],["class","abs-video-container",3,"abs-video-container--search","abs-video-container--pdp","ngStyle",4,"ngIf"],["ads_hide_badge","true","channel","empty_channel","ad_channel_id","xBpzZRx","ad_positions","0","player_minimize","false","branding","false","player_more_menu","false","player_captions","fal
1se","max_videos","1","autoplay","true","player_fullscreen","false","overlay_play_button_size","100","reverse_audio_controls","true",2,"display","block","width","100%","height","100%","--fw-player-border-radius","0","--fw-storyblock-border-radius","0","--fw-player-play-overlay-opacity","1","--fw-player-play-overlay-background-color","rgba(0, 0, 0, 0.75)","--fw-player-caption-background","black","--fw-player-caption-color","white",3,"ngStyle"],[1,"abs-video-container",3,"ngStyle"],["id","absVideoWrapper",1,"abs-video-wrapper",3,"abs-video-ready","abs-video-play"]],template:function(e,t){1&e&&ph(0,xue,1,4,"fw-player",0)(1,Tue,2,8,"div",1),2&e&&(zh("ngIf",!t.isInHousePlayerEnabled),Vd(),zh("ngIf",t.isInHousePlayerEnabled))},dependencies:[cy,gy],encapsulation:2})}}return e})(),Eue=["accordionActive"],Due=e=>({"b2b-logo":e}),Oue=(e,t)=>({"chevron-up":e,"chevron-down":t}),Bue=e=>({"mb-0":e});function Mue(e,t){if(1&e&&Tf(0,"img",15),2&e){let e=Yf(2);_h("aria-label","",e.store.bannerName," logo image"),Zf("alt","",e.store.bannerName," logo image"),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.store.bannerName,"_logo?$fulfillment$&defaultImage=Not_Available",id)}}function Rue(e,t){if(1&e&&(Tf(0,"img",16),qm(1,"lowercase"),qm(2,"titlecase")),2&e){let e=Yf(2);df("store-icon-logo b2b-logo ",$m(1,9,null==e.store?null:e.store.bannerName),""),_h("aria-label","",e.store.bannerName," logo image"),Zf("alt","",$m(2,11,e.store.bannerName)," Business logo image"),Zf("src","https://images.albertsons-media.com/is/image/ABS/",e.store.bannerName,"_logo_b2b?$fulfillment$&defaultImage=Not_Available",id)}}function Lue(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("Shop for delivery at ",null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"","",e.store.bannerName,".com")}}function Fue(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(2);Vd(),cm("You will be redirected to ",null!=e.store&&e.store.isNonMigratedStore?e.store.nonMigratedStoreRedirectUrl:(null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"")+e.store.bannerName+".com","")}}function Nue(e,t){if(1&e&&(Ef(0),kf(1,"div",11),ph(2,Mue,1,6,"img",12)(3,Rue,3,13,"img",13)(4,Lue,2,2,"p",14)(5,Fue,2,1,"p",14),xf(),Df()),2&e){let e=Yf();Vd(),Zf("id","address_",e.store.storeID,"-delivery"),Vd(),zh("ngIf","B"!==e.siteType),Vd(),zh("ngIf",e.store.isB2BStore&&"B"===e.siteType),Vd(),zh("ngIf",!e.store.isSisterBanner&&!e.store.isNonMigratedStore),Vd(),zh("ngIf",e.store.isSisterBanner||e.store.isNonMigratedStore)}}function Uue(e,t){if(1&e&&(kf(0,"p",21),am(1),xf()),2&e){let e=Yf(4);gh("aria-label",e.store.pickupType)("data-test",e.store.pickupType),Vd(),lm(e.store.pickupType)}}function Vue(e,t){if(1&e&&(kf(0,"div",11),Tf(1,"img",18),qm(2,"lowercase"),qm(3,"titlecase"),kf(4,"p",19),am(5),xf(),kf(6,"p",19),am(7),xf(),ph(8,Uue,2,3,"p",20),xf()),2&e){let e=Yf(3);Zf("id","address_",e.store.storeID,""),Vd(),df("store-icon-logo ",$m(2,16,null==e.store?null:e.store.bannerName),""),Sh("aria-label","",e.store.storeName," ",e.store.isB2BStore?" Business":""," logo"),Jf("src",e.store.storeLogoURL,id),zh("alt",null!=e.store&&e.store.isB2BStore?$m(3,18,e.store.bannerName)+" Business":e.store.storeName+" logo")("ngClass",Om(20,Due,null==e.store?null:e.store.isB2BStore)),Vd(4),lm(e.store.street),Vd(2),um("",e.store.city,", ",e.store.state," ",e.store.zipcode,""),Vd(),zh("ngIf","pickup"===e.storePrefType&&e.store.pickupType)}}function que(e,t){if(1&e&&(Ef(0),ph(1,Vue,9,22,"div",17),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf","delivery"!==e.storePrefType)}}function $ue(e,t){if(1&e&&(kf(0,"div",11),Tf(1,"img",18),qm(2,"lowercase"),kf(3,"p"),am(4),xf(),kf(5,"p"),am(6,"Would you like to proceed?"),xf()()),2&e){let e=Yf(2);Zf("id","address_",e.store.storeID,""),Vd(),df("store-icon-logo ",$m(2,12,null==e.store?null:e.store.bannerName),""),_h("aria-label","",e.store.storeName," logo"),Zf("alt","",e.store.storeName," logo"),Jf("src",e.store.storeLogoURL,id),zh("ngClass",Om(14,Due,null==e.store?null:e.store.isB2BStore)),Vd(3),cm("You will be redirected to ",null!=e.store&&e.store.isNonMigratedStore?e.store.nonMigratedStoreRedirectUrl:(null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"")+e.displayedSisterBanner+".com","")}}function jue(e,t){if(1&e&&ph(0,que,2,1,"ng-container",7)(1,$ue,7,16,"ng-template",null,2,Wm),2&e){let e=sm(2),t=Yf();zh("ngIf",!(null!=t.store&&t.store.showConfirmation))("ngIfElse",e)}}function zue(e,t){if(1&e){let e=Mf();kf(0,"a",27),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.updateStore(i.store,t,!0))})),am(1," Shop "),kf(2,"span",28),am(3),xf()()}if(2&e){let e=Yf(3);Sh("aria-describedby","address_",e.store.storeID,"-delivery store-distance__",e.store.distance,""),Vd(3),cm("You will be redirected to",null!=e.store&&e.store.isNonMigratedStore?e.store.nonMigratedStoreRedirectUrl:(null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"")+e.displayedSisterBanner+".com","")}}function Wue(e,t){if(1&e){let e=Mf();kf(0,"button",29),jf("click",(function(t){Wa(e);let i=Yf(3);return Ha(i.updateStore(i.store,t,!0))})),am(1,"Shop"),xf()}if(2&e){let e=Yf(3);Sh("aria-describedby","address_",e.store.storeID,"-delivery store-distance__",e.store.distance,"")}}function Hue(e,t){if(1&e&&(kf(0,"div",24),ph(1,zue,4,4,"a",25)(2,Wue,2,3,"button",26),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled)}}function Yue(e,t){if(1&e&&(kf(0,"div",24)(1,"a",30),am(2,"Selected"),xf()()),2&e){let e=Yf(2);Vd(),_h("aria-describedby","addressOf_",e.store.storeID,"")}}function Gue(e,t){if(1&e&&(kf(0,"div",22),ph(1,Hue,3,2,"div",23)(2,Yue,3,2,"ng-template",null,3,Wm),xf()),2&e){let e=sm(3),t=Yf();Vd(),zh("ngIf",!t.store.selected)("ngIfElse",e)}}function Kue(e,t){if(1&e){let e=Mf();kf(0,"a",36),jf("click",(function(t){Wa(e);let i=Yf(4);return Ha(i.updateStore(i.store,t))})),am(1,"Select"),xf()}if(2&e){let e=Yf(4);Sh("aria-describedby","address_",e.store.storeID," store-distance__",e.store.distance,""),Sh("data-test","",e.store.isSisterBanner,"_",e.store.bannerName,"")}}function Que(e,t){if(1&e){let e=Mf();kf(0,"button",37),jf("click",(function(t){Wa(e);let i=Yf(4);return Ha(i.updateStore(i.store,t))})),am(1,"Select"),xf()}if(2&e){let e=Yf(4);Sh("aria-describedby","address_",e.store.storeID," store-distance__",e.store.distance,""),Sh("data-test","",e.store.isSisterBanner,"_",e.store.bannerName,"")}}function Jue(e,t){if(1&e&&(Ef(0),kf(1,"p",32),am(2),qm(3,"number"),kf(4,"span",33),am(5,"from your current location"),xf()(),ph(6,Kue,2,6,"a",34)(7,Que,2,6,"button",35),Df()),2&e){let e=Yf(3);Vd(),Zf("id","store-distance__",e.store.distance," body-m"),Vd(),cm("",jm(3,5,e.store.distance,"1.2-2")," mi. "),Vd(4),zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled)}}function Zue(e,t){if(1&e){let e=Mf();kf(0,"a",40),jf("click",(function(t){Wa(e);let i=Yf(4);return Ha(i.updateStore(i.store,t,!0))})),am(1,"Yes "),kf(2,"span",28),am(3),xf()()}if(2&e){let e=Yf(4);Sh("aria-describedby","address_",e.store.storeID," store-distance__",e.store.distance,""),Vd(3),cm("Button. You will be redirected to ",null!=e.store&&e.store.isNonMigratedStore?e.store.nonMigratedStoreRedirectUrl:(null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"")+e.displayedSisterBanner+".com",". Would you like to proceed?")}}function Xue(e,t){if(1&e){let e=Mf();kf(0,"button",41),jf("click",(function(t){Wa(e);let i=Yf(4);return Ha(i.updateStore(i.store,t,!0))})),am(1,"Yes "),kf(2,"span",28),am(3),xf()()}if(2&e){let e=Yf(4);Sh("aria-describedby","address_",e.store.storeID," store-distance__",e.store.distance,""),Sh("data-test","",e.store.isSisterBanner,"_",e.store.bannerName,""),Vd(3),cm("Button. You will be redirected to ",null!=e.store&&e.store.isNonMigratedStore?e.store.nonMigratedStoreRedirectUrl:(null!=e.store&&e.store.isB2BStore&&"B"===e.siteType?"business.":"")+e.displayedSisterBanner+".com",". Would you like to proceed?")}}function epe(e,t){if(1&e&&ph(0,Zue,4,4,"a",38)(1,Xue,4,7,"button",39),2&e){let e=Yf(3);zh("ngIf",!e.isThemeBuilderEnabled),Vd(),zh("ngIf",e.isThemeBuilderEnabled)}}function tpe(e,t){if(1&e&&(kf(0,"div",22)(1,"div",24),ph(2,Jue,8,8,"ng-container",7)(3,epe,2,2,"ng-template",null,4,Wm),xf()()),2&e){let e=sm(4),t=Yf(2);Vd(2),zh("ngIf",!(null!=t.store&&t.store.showConfirmation))("ngIfElse",e)}}function ipe(e,t){if(1&e&&ph(0,tpe,5,2,"div",31),2&e){zh("ngIf","delivery"!==Yf().storePrefType)}}function npe(e,t){if(1&e){let e=Mf();kf(0,"p",45,5),jf("keydown.enter",(function(){Wa(e);let t=Yf(2);return Ha(t.isOpenCBA(t.store&&t.store.storeID))}))("keyup.Space",(function(){Wa(e);let t=Yf(2);return Ha(t.isOpenCBA(t.store&&t.store.storeID))}))("click",(function(){Wa(e);let t=Yf(2);return Ha(t.isOpenCBA(t.store&&t.store.storeID))})),am(2),xf()}if(2&e){let e=Yf(2);zh("ngClass",Bm(3,Oue,e.storeCardHasCBAOpen(null==e.store?null:e.store.storeID)||e.isOpen,!e.storeCardHasCBAOpen(null==e.store?null:e.store.storeID)&&!e.isOpen)),gh("aria-expanded",e.storeCardHasCBAOpen(null==e.store?null:e.store.storeID)||e.isOpen),Vd(2),cm("",e.oosSellerTotal?(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.cart_unavailable_total)+e.oosSellerTotal:null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.cart_unavailable_total," item(s) in your cart need your attention.")}}function rpe(e,t){if(1&e&&Tf(0,"span"),2&e){let e=Yf(4);Kh(null==e.store?null:e.store.bannerIconClassName)}}function spe(e,t){if(1&e&&(kf(0,"span",53),am(1),xf()),2&e){let e=Yf(4);Vd(),lm(null==e.store?null:e.store.bannerName)}}function ape(e,t){if(1&e&&(kf(0,"p",50),ph(1,rpe,1,2,"span",51)(2,spe,2,1,"span",52),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",null==e.store?null:e.store.bannerIconClassName),Vd(),zh("ngIf",null==e.store?null:e.store.bannerName)}}function ope(e,t){if(1&e&&(kf(0,"p"),am(1),qm(2,"titlecase"),xf(
1)),2&e){let e=Yf(4);Vd(),dm("Item Not Offered for ",$m(2,2,e.storePrefType)," (",e.store.unavailable_item.not_offered_count,")")}}function lpe(e,t){if(1&e&&(kf(0,"li",56),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e)}}function cpe(e,t){if(1&e&&(kf(0,"ul"),ph(1,lpe,2,1,"li",55),xf()),2&e){let e=Yf(4);Vd(),zh("ngForOf",e.not_available_list)}}function dpe(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(4);Vd(),cm("Items Out of Stock (",e.store.unavailable_item.oos_count,")")}}function upe(e,t){if(1&e&&(kf(0,"li",56),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e)}}function ppe(e,t){1&e&&(kf(0,"p"),am(1,"Only sandwich slice available"),xf())}function hpe(e,t){if(1&e&&(kf(0,"li",56),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e.name)}}function fpe(e,t){if(1&e&&(kf(0,"div",54),ph(1,ope,3,4,"p",14)(2,cpe,2,1,"ul",14)(3,dpe,2,1,"p",14),kf(4,"ul"),ph(5,upe,2,1,"li",55),xf(),ph(6,ppe,2,0,"p",14),kf(7,"ul"),ph(8,hpe,2,1,"li",55),xf()()),2&e){let e=Yf(3);zh("ngClass",Om(7,Bue,"pickup"===e.storePrefType)),Vd(),zh("ngIf",null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count),Vd(),zh("ngIf",null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count),Vd(),zh("ngIf",null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.oos_count),Vd(2),zh("ngForOf",e.not_oos_offered_list),Vd(),zh("ngIf",e.store.unavailable_item.not_offered_modifiers.length>0),Vd(2),zh("ngForOf",e.store.unavailable_item.not_offered_modifiers)}}function mpe(e,t){if(1&e&&Tf(0,"img",60),2&e){let e=Yf(2).$implicit,t=Yf(3);Jf("alt",null==e?null:e.storeName),zh("src",t.sellerImage(e.sellerId),id)}}function gpe(e,t){if(1&e&&(kf(0,"span",53),am(1),xf()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),lm(t.getSellerName(e.sellerId))}}function bpe(e,t){if(1&e&&(kf(0,"p",50),ph(1,mpe,1,2,"img",59)(2,gpe,2,1,"span",52),xf()),2&e){let e=Yf().$implicit;Vd(),zh("ngIf",null==e?null:e.sellerId),Vd(),zh("ngIf",null==e?null:e.sellerId)}}function ype(e,t){if(1&e&&(kf(0,"p"),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm("Items Out of Stock (",null==e?null:e.oos_count,")")}}function vpe(e,t){if(1&e&&(kf(0,"li",56),am(1),xf()),2&e){let e=t.$implicit;Vd(),lm(e.name)}}function wpe(e,t){if(1&e&&(kf(0,"ul"),ph(1,vpe,2,1,"li",55),xf()),2&e){let e=Yf(2).$implicit;Vd(),zh("ngForOf",null==e?null:e.oos_offered_ids)}}function _pe(e,t){if(1&e&&(kf(0,"div",61)(1,"div",62),ph(2,ype,2,1,"p",14)(3,wpe,2,1,"ul",14),xf()()),2&e){let e=Yf().$implicit;Vd(2),zh("ngIf",null==e?null:e.oos_count),Vd(),zh("ngIf",null==e?null:e.oos_offered_ids)}}function Spe(e,t){if(1&e&&(kf(0,"div",57),ph(1,bpe,3,2,"p",47)(2,_pe,4,2,"div",58),xf()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngIf",i.oosSellerTotal>0&&(e.oos_count||(null==e?null:e.oos_offered_ids.length)>0)),Vd(),zh("ngIf",e&&(e.oos_count||(null==e?null:e.oos_offered_ids.length)>0))}}function Cpe(e,t){if(1&e&&(kf(0,"div",46),ph(1,ape,3,2,"p",47)(2,fpe,9,9,"div",48)(3,Spe,3,2,"div",49),xf()),2&e){let e=Yf(2);Yh("border-bottom",(null==e.unavailableSeller?null:e.unavailableSeller.length)>0),Vd(),zh("ngIf",((null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count)>0||(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.oos_count)>0)&&e.oosSellerTotal>0),Vd(),zh("ngIf",(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count)>0||(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.oos_count)>0),Vd(),zh("ngForOf",e.sellerProducts)}}function Ipe(e,t){if(1&e&&(kf(0,"div",42),ph(1,npe,3,6,"p",43)(2,Cpe,4,5,"div",44),xf()),2&e){let e=Yf();Vd(),zh("ngIf",(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count)>0||(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.oos_count)>0||e.oosSellerTotal>0),Vd(),zh("ngIf",e.storeCardHasCBAOpen(null==e.store?null:e.store.storeID)||e.isOpen||e.isOpen&&((null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.not_offered_count)>0||(null==e.store||null==e.store.unavailable_item?null:e.store.unavailable_item.oos_count)>0||e.oosSellerTotal>0))}}function Ape(e,t){if(1&e&&Tf(0,"img",60),2&e){let e=Yf().$implicit,t=Yf(3);Jf("alt",(null==e||null==e.seller?null:e.seller.sellerName)||(null==e?null:e.businessName)),zh("src",null!=e&&null!=e.seller&&e.seller.sellerId?t.sellerImage(null==e||null==e.seller?null:e.seller.sellerId):t.sellerImage(null==e?null:e.id),id)}}function kpe(e,t){if(1&e&&(kf(0,"span",68),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm((null==e||null==e.seller?null:e.seller.sellerName)||(null==e?null:e.businessName))}}function xpe(e,t){if(1&e&&(kf(0,"span",66)(1,"span"),ph(2,Ape,1,2,"img",59),xf(),ph(3,kpe,2,1,"span",67),xf()),2&e){let e=t.$implicit;Vd(2),zh("ngIf",(null==e||null==e.seller?null:e.seller.sellerId)||(null==e?null:e.id)),Vd(),zh("ngIf",(null==e||null==e.seller?null:e.seller.sellerName)||(null==e?null:e.businessName))}}function Tpe(e,t){if(1&e&&(kf(0,"p",50)(1,"span",64),am(2),xf(),ph(3,xpe,4,2,"span",65),xf()),2&e){let e=Yf(2);Vd(2),dm("",null==e.unavailableSeller?null:e.unavailableSeller.length," store",(null==e.unavailableSeller?null:e.unavailableSeller.length)>1?"s":""," not available to deliver:"),Vd(),zh("ngForOf",e.unavailableSeller)}}function Ppe(e,t){if(1&e&&(kf(0,"div",63),ph(1,Tpe,4,3,"p",47),xf()),2&e){let e=Yf();Vd(),zh("ngIf",(null==e.unavailableSeller?null:e.unavailableSeller.length)>0)}}function Epe(){return window}
1var Dpe=(()=>{class e{constructor(e,t,i,n,r){this.storeFulfillment=e,this.storeFulFillmentService=t,this.elementRef=i,this._featureFlagService=n,this.abTestService=r,this.isPopupWrapperView=!1,this.isStoreSelectionWrapperView=!1,this.windowLocation=new FD,this.not_available_list=[],this.not_oos_offered_list=[],this.siteType=window.AB&&window.AB.userInfo&&window.AB.userInfo.siteType,this.sellerImage=e=>`https://images.albertsons-media.com/is/image/ABS/mkp-${e}-logo?$mkp-seller-logo-desktop$&defaultImage=Not_Available`,this.getSellerName=e=>{let t=this.storeFulFillmentService.getSellerFromCart().filter((t=>t.seller.sellerId===e))[0]?.seller?.sellerName;if(this.mkpSellers?.length>0){let i=this.mkpSellers?.find((t=>t.id===e))?.businessName;return i||t}},this.storePrefType=this.elementRef.nativeElement.getAttribute("data-type"),this.isClosedStoreEnabled=Epe().SWY.configService.isClosedStoreEnabled,this.isMarketplaceDisabled=!(window.AB.storeFlagsData&&window.AB.storeFlagsData.flags&&window.AB.storeFlagsData.flags.ecomStore&&"true"==window.AB.storeFlagsData.flags.ecomStore.isMKPEnabled)}ngOnInit(){this.isOpen=!!this.isOpen&&this.isOpen,this.loadUnavailableCartItems(),this.isGuestAddToCartABSubscription=this.abTestService.isABFlagDisabledEvent$.pipe(nn()).subscribe((e=>{"isGuestAddToCartDisabled"===e.flagName&&(this.isGuestAddToCartEnabled="a"!==e.testValue)})),this.abTestService.listenToABXTestingFlag("abACIP295974","isGuestAddToCartDisabled","ACIP295974")}loadUnavailableCartItems(){0==this.not_available_list.length&&this.store&&this.store.unavailable_item&&this.store.unavailable_item.not_offered_ids?.length&&this.store.unavailable_item.not_offered_ids.forEach((e=>{this.not_available_list.push(e.name)})),0==this.not_oos_offered_list.length&&this.store&&this.store.unavailable_item&&this.store.unavailable_item.oos_offered_ids?.length&&this.store.unavailable_item.oos_offered_ids.forEach((e=>{this.not_oos_offered_list.push(e.name)}))}updateStore(e,t,i){if(t.preventDefault(),this.isStoreSelectionWrapperView){this.displayedSisterBanner=e.bannerName;let n=Epe().AB.userInfo.banner.toLocaleUpperCase()===this.displayedSisterBanner.toLocaleUpperCase();if(!n&&!i||e?.isNonMigratedStore){this.storeFulfillment.isSisterBanner=!0;for(let t=0;t<this.storesWithLimit.length;t++)this.storesWithLimit[t].storeID==e.storeID?this.storesWithLimit[t].showConfirmation=!0:this.storesWithLimit[t].showConfirmation=!1;if(void 0!==t&&(0==t.screenX&&0==t.screenY||$(window).width()<1025)){let e=$(t.target).parent();setTimeout((function(){e.find(".card-store-btn-selected").focus()}),50)}}if(e?.isNonMigratedStore)return i?this.redirectToNonMigratedStore(e?.nonMigratedStoreRedirectUrl):void 0;if(!n&&i){let t=e.bannerName;if(t=t.replace(/-|\s/g,"").toLowerCase(),"ios"===this.platform||"android"===this.platform){if("function"==typeof this.nativeCallback){let e={type:"crossBannerRedirect",payload:{banner:t}};this.nativeCallback(e)}let i=this.appDeepLinks[t],n=i.includes("?")?"&":"?";n+="zipCode="+e.zipcode+"&storeId="+e.storeID+"&isCrossBanner=true",i&&(window.location.href=i+n)}else{let i="www-"+t,n=Epe().SWY.CONFIGSERVICE.bannerDomainMap[i],r=this.shRedirectPath.includes("?")?"&":"?";r+="zipCode="+e.zipcode+"&storeId="+e.storeID+"&isCrossBanner=true",e.street&&(r+="&address="+encodeURIComponent(e.street)),e.pickupType&&(r+="&serviceType="+encodeURIComponent(e.pickupType));let s=n+this.shRedirectPath+r,a=n+Epe().SWY.ssoPath+"?goto="+encodeURIComponent(s);window.location.href=a}}else"function"==typeof this.shCallback&&this.shCallback(e)}else{let n=this.storeFulfillment.activeTab.replace("modal-tab-","").toLocaleUpperCase(),r=n;this.banner=e.logo.replace("svg-icon-",""),this.banner=this.banner.replace("-logo","").toLocaleUpperCase(),this.displayedSisterBanner=e.bannerName,this.storeFulfillment.isServiceErrorMessage=!1;let s,a,o=e.street+" "+e.city+", "+e.state+" "+e.zipcode,l=e.storeID,c=e.z
1ipcode,d=Epe().AB.userInfo.userType,u="user",p=this,h=Epe().AB.userInfo.banner.toLocaleUpperCase()===this.displayedSisterBanner.toLocaleUpperCase(),f=e.isEcommStore;if(!1===this.storeFulFillmentService.isWineShopDisabled&&e.isWineD2CEnabled&&(a=e.wfcStoreId),!h||e?.isNonMigratedStore){this.storeFulfillment.isSisterBanner=!0;for(let t=0;t<this.storesWithLimit.length;t++)this.storesWithLimit[t].storeID==e.storeID?this.storesWithLimit[t].showConfirmation=!0:this.storesWithLimit[t].showConfirmation=!1;if(void 0!==t&&(0==t.screenX&&0==t.screenY||$(window).width()<1025)){let e=$(t.target).parent();setTimeout((function(){e.find(".card-store-btn-selected").focus()}),50)}}if(e?.isNonMigratedStore)return i?this.redirectToNonMigratedStore(e?.nonMigratedStoreRedirectUrl):void 0;void 0!==t&&"pickup"===r.toLowerCase()&&("r"===d.toLowerCase()||"c"===d.toLowerCase())&&(void 0!==this.store.unavailable_item&&this.store.unavailable_item.cart_unavailable_total&&e.storeID===this.store.unavailable_item.id?localStorage.setItem("toastMessage","pickup-unavailable"):localStorage.setItem("toastMessage","pickup")),s=this.updateAnalytics(n,i,h);let m=c;"delivery"===r.toLowerCase()&&(m=p.storeFulfillment.zipCode),this.isZipMKTPEligible(m).subscribe((t=>{if("false"===t)return;Epe().SWY.ENFORCEMENT.generateSessionUpdateObject(r,l,m,d,u,this.displayedSisterBanner,(function(t){let a=Epe().AB.COMMON.getURLParameterByName("action",!1),l=d.toLowerCase(),c=!!Epe().SWY.CONFIGSERVICE.featureToggleConfig.enableCookieRestructure;if("g"===l){if(h)"delivery"===r.toLowerCase()?p.isStoreAvailableWithUserAddr&&p.addrDetailsFromStoreByAddr?.address&&Object.keys(p.addrDetailsFromStoreByAddr?.address).length>0?"full"===p.zipCoverage?.toLowerCase()?t.info.COMMON.resolvedBy="zipcode":(p.createDeliveryAddrCookie(),t.info.COMMON.resolvedBy="delivery-addr"):(p.addrDetailsFromStoreByAddr={},t=p.removeGeoCookieAndUpdateSessionObj(t)):t=p.removeGeoCookieAndUpdateSessionObj(t),p.isGuestAddToCartEnabled?Epe().AB.COMMON.updateUserSession(t,null,(function(e){p.refreshPage(a)})):(Epe().AB.COMMON.updateUserSession(t),p.refreshPage(a));else if(!h&&i){"delivery"!==r.toLowerCase()?t=p.removeGeoCookieAndUpdateSessionObj(t):"full"!==p.zipCoverage?.toLowerCase()&&(t.info.COMMON.resolvedBy="delivery-addr");let i=e.bannerName;i=i.replace(/-|\s/g,"").toLowerCase();let a="www-"+i;"B"===Epe().AB?.userInfo?.siteType&&e.isB2BStore&&!p.storeFulfillment.isB2bSisterBannerDisabled&&(a="www-business-"+i);let o=Epe().SWY.CONFIGSERVICE.bannerDomainMap[a];p.isReBanneredStore&&Epe().AB.COMMON.setDefaultStoreId();let l,c=p.storeFulfillment.zipCode;s?(o+="?storeId="+e.storeID+"&preference="+n+"&zipcode="+c+"&ml="+s,l="&storeId="+e.storeID+"&preference="+n+"&zipcode="+c+"&ml="+s):(o+="?storeId="+e.storeID+"&preference="+n+"&zipcode="+c,l="&storeId="+e.storeID+"&preference="+n+"&zipcode="+c);let d="zipcode";if("delivery"===r.toLowerCase()&&p.isStoreAvailableWithUserAddr&&p.addrDetailsFromStoreByAddr?.address&&Object.keys(p.addrDetailsFromStoreByAddr?.address).length>0&&(d="full"===p.zipCoverage?.toLowerCase()?"zipcode":"delivery-addr"),p.addrDetailsFromStoreByAddr?.address?.addressLine1&&p.addrDetailsFromStoreByAddr?.address?.addressLine1.length>0){let e=p.getDeliveryAddrData(),t=`&addr=${btoa(JSON.stringify(e))}`;o+=t,l+=t}o+=`&resolvedBy=${d}`,l+=`&resolvedBy=${d}`;let u=!!document.getElementById("wine-shop-walled-header");if("delivery"===r?.toLowerCase()&&u&&p._featureFlagService.isVncDeepLinkDisabled()){let e=new URL(o),t=new URL(window.location.href);e.pathname=t.pathname,t.searchParams.get("q")&&e.searchParams.set("q",t.searchParams.get("q")),o=e.toString()}let h=JSON.parse(localStorage.getItem("abCart"));p.isGuestAddToCartEnabled&&h?.guestCartId?(o+="&guestCartId="+h.guestCartId,Epe().AB.COMMON.updateUserSession(t,null,(function(e){!1===e.success||"CustomerId"===e.name?(p.storeFulfillment.isServiceErrorMessage=!0,p.storeFulfillment.serviceErrorMessage.next("Apologies, our site is currently experiencing technical difficulties, please try again later.")):p.refreshPageBannerChange(i,c,l,o)}))):p.refreshPageBannerChange(i,c,l,o)}"preselection"===localStorage.getItem("toastMessage")&&p.storeFulFillmentService.fulfillmentSelectionCallback()}else if("r"===l||"c"===l){let n=r.toLowerCase(),l="";switch(n){case"instore":t.info.J4U.address=o,t.info.SHOP.address=o,c&&(t.info.COMMON.address=o),p.isClosedStoreEnabled&&(t.info.COMMON.isClosed=!1),t.info.COMMON.isCrossBannerMFCUser=!1,i&&(t.info.J4U.banner=e.bannerName);break;case"pickup":t.info.SHOP.address=o,t.info.J4U.address=o,c&&(t.info.COMMON.address=o),p.isClosedStoreEnabled&&(t.info.COMMON.isClosed=!1),t.info.COMMON.isCrossBannerMFCUser=!1,i&&(t.info.SHOP.banner=e.bannerName);break;case"delivery":p.isClosedStoreEnabled&&(t.info.COMMON.isClosed=!1),t.info.COMMON.isCrossBannerMFCUser=!1,i&&(t.info.SHOP.banner=e.bannerName)}
1if(h||i){if(h)"delivery"===n?p.isStoreAvailableWithUserAddr&&p.addrDetailsFromStoreByAddr?.address&&Object.keys(p.addrDetailsFromStoreByAddr?.address).length>0?"full"===p.zipCoverage?.toLowerCase()?(p.addrDetailsFromStoreByAddr={},t.info.COMMON.resolvedBy="zipcode"):t.info.COMMON.resolvedBy="delivery-addr":(p.addrDetailsFromStoreByAddr={},t=p.removeGeoCookieAndUpdateSessionObj(t)):t=p.removeGeoCookieAndUpdateSessionObj(t);else{if("delivery"===n&&(p.isStoreAvailableWithUserAddr||(p.addrDetailsFromStoreByAddr={}),document.getElementById("wine-shop-walled-header")&&p._featureFlagService.isVncDeepLinkDisabled())){let t=e.bannerName;t=t.replace(/-|\s/g,"").toLowerCase();let i="www-"+t;"B"===Epe().AB?.userInfo?.siteType&&e.isB2BStore&&!p.storeFulfillment.isB2bSisterBannerDisabled&&(i="www-business-"+t),l=Epe().SWY.CONFIGSERVICE.bannerDomainMap[i]+Epe().SWY.ssoPath;let n=new URL(l),r=new URL(window.location.href);n.pathname=r.pathname,r.searchParams.get("q")&&n.searchParams.set("q",r.searchParams.get("q")),l+=Epe().SWY.ssoPath+"?goto="+Epe().location.pathname,l=n.toString()}t=p.removeGeoCookieAndUpdateSessionObj(t)}Epe().AB.COMMON.updateUserSession(t,null,(function(e){if((!1===e.success||"CustomerId"===e.name)&&(p.storeFulfillment.isServiceErrorMessage=!0,p.storeFulfillment.serviceErrorMessage.next("Apologies, our site is currently experiencing technical difficulties, please try again later.")),!0===e.success&&"CustomerId"!=e.name)if(null!=a&&"changeStore"===a)p.windowLocation.locationReplace(Epe().location.origin);else{let e=!Epe().SWY?.CONFIGSERVICE?.featureToggleConfig?.disableB2BCompleteProfile,t=localStorage.getItem("complete-b2b-business-profile");p.isPopupWrapperView&&"created"===t?localStorage.removeItem("complete-b2b-business-profile"):e&&"B"===Epe().AB?.userInfo?.siteType&&"created"===t&&localStorage.setItem("complete-b2b-business-profile","show"),p.redirectOrReload()}}),s,null,p.addrDetailsFromStoreByAddr,l)}}}),f,a)}))}}refreshPageBannerChange(e,t,i,n){"onboarding"===this.behaviourType?this.storeFulFillmentService.redirectOnboardingWidget(e,t,i):this.windowLocation.setHref(n)}refreshPage(e){"onboarding"===this.behaviourType?(Epe().AB.userInfo.prepareSharedInfo(),this.storeFulFillmentService.triggerCreateAccount(!0)):null!=e&&"changeStore"===e?this.windowLocation.locationReplace(Epe().location.origin):this.redirectOrReload()}updateAnalytics(e,t,i){let n,r=this.storeFulfillment.isTwoTabModal;if(Epe().AB.DATALAYER)switch(e){case"PICKUP":if(t&&0==i)if("onboarding"===this.behaviourType)n="fulfillment%2Dlanding%7Cdug%2DcrossBanner";else{let e=this.updateModalLinkPickup(this.store.pickupType);n=1==r?"fulfillment%2Dshop%7C"+e+"%2DcrossBanner":"fulfillment%2Dglobal%7C"+e+"%2DcrossBanner",this.store.unavailable_item&&this.store.unavailable_item.cart_unavailable_total&&(n+="%2Du"+this.store.unavailable_item.cart_unavailable_total)}else if(1==i)if("onboarding"===this.behaviourType)Epe().AB.DATALAYER.setModalClickEvents("fulfillment-landing|dug");else{let e=this.updateModalLinkPickup(this.store.pickupType);1==r?localStorage.setItem("analyticsModalAction","fulfillment-shop|"+e):localStorage.setItem("analyticsModalAction","fulfillment-global|"+e),this.store.unavailable_item&&this.store.unavailable_item.cart_unavailable_total&&localStorage.setItem("analyticsUnavailableCount",this.store.unavailable_item.cart_unavailable_total)}break;case"INSTORE":t&&0==i?n="fulfillment%2Dglobal%7CinStore%2DcrossBanner":1==i&&localStorage.setItem("analyticsModalAction","fulfillment-global|inStore");break;case"DELIVERY":t&&!1===i?"onboarding"===this.behaviourType?n="fulfillment%2Dlanding%7Cdelivery%2DcrossBanner":(n=!0===r?"fulfillment%2Dshop%7Cdelivery%2DcrossBanner":"fulfillment%2Dglobal%7Cdelivery%2DcrossBanner",this.store.unavailable_item&&this.store.unavailable_item.cart_unavailable_total&&(n+="%2Du"+this.store.unavailable_item.cart_unavailable_total)):!0===i&&("onboarding"===this.behaviourType?Epe().AB.DATALAYER.setModalClickEvents("fulfillment-landing|delivery"):(!0===r?localStorage.setItem("analyticsModalAction","fulfillment-shop|delivery"):localStorage.setItem("analyticsModalAction","fulfillment-global|delivery"),this.store.unavailable_item&&this.store.unavailable_item.cart_unavailable_total&&localStorage.setItem("analyticsUnavailableCount",this.store.unavailable_item.cart_unavailable_total)))}return n}updateModalLinkPickup(e){let t;switch(e){case"Locker Pickup":t="locker";break;case"Kiosk Pickup":t="kiosk";break;case"Counter Pickup":t="counter";break;default:t="dug"}return t}analyticsModalClickEvent(e,t){if(Epe().AB?.DATALAYER){let i=this.storeFulfillment.isTwoTabModal?"fulfillment-shop":"fulfillment-global",n="pickup"===t?.toLowerCase()?"dug":t?.toLowerCase();Epe().AB.DATALAYER.setModalClickEvents(`${i}|${n}`,e)}}isOpenCBA(e){if(this.loadUnavailableCartItems(),this.isOpen=!this.isOpen,"pickup"===this.storePrefType&&e){let t=this.storeFulfillment.storeHasCBAOpen(e);this.storeFulfillment.setStoreStatusCBA(e,!t),this.isOpen=!t}if(this.activeAccordion){let e=this.activeAccordion.nativeElement;this.isOpen?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","fal
1se")}this.isOpen&&Epe().AB.DATALAYER&&(this.storeFulfillment.isTwoTabModal?Epe().AB.DATALAYER.setModalClickEvents("fulfillment-shop|unavailable-expand"):Epe().AB.DATALAYER.setModalClickEvents("fulfillment-global|unavailable-expand"))}storeCardHasCBAOpen(e){return"pickup"===this.storePrefType&&this.storeFulfillment.storeHasCBAOpen(e)}isZipMKTPEligible(e){return!1!==this.isMarketplaceDisabled?fi(!1):document.getElementById("marketplace-walled-header")&&!0===this.storeFulfillment.isTwoTabModal?this.storeFulFillmentService.isZipMKTPEligible(e).pipe(bi((e=>e)),$i((e=>(console.error(e),fi(!1))))):fi(!1)}redirectOrReload(){let e=Epe().AB.COMMON.getURLParameterByName("goto",!1);null!=e?this.windowLocation.setHref(decodeURIComponent(e)):this.isPopupWrapperView?this.storeFulFillmentService.onNextPopup.next(!0):this.windowLocation.locationReload()}createDeliveryAddrCookie(){let e=this.getDeliveryAddrData(),t=window.dataLayer&&window.dataLayer.find((e=>"OneTrustGroupsUpdated"===e.event));if(t&&t?.OnetrustActiveGroups.includes("C0003")){let t=this.storeFulFillmentService.getGeoCookieName();this.setCookie(t,e)}}getDeliveryAddrData(){let e;return"business"===this.addrDetailsFromStoreByAddr?.address?.type&&(e=this.addrDetailsFromStoreByAddr?.address?.bName),{type:this.addrDetailsFromStoreByAddr?.address?.type,adr1:this.addrDetailsFromStoreByAddr?.address?.addressLine1,adr2:this.addrDetailsFromStoreByAddr?.address?.addressLine2,city:this.addrDetailsFromStoreByAddr?.address?.city,zip:this.addrDetailsFromStoreByAddr?.address?.postalCode.substring(0,this.addrDetailsFromStoreByAddr?.address?.postalCode.indexOf("-")),st:this.addrDetailsFromStoreByAddr?.address?.stateCode,bName:e}}removeGeoCookieAndUpdateSessionObj(e){return this.storeFulFillmentService.removeGeoCookie(),e.info.COMMON.resolvedBy="zipcode",e}setCookie(e,t,i=!0){let n=new Date;n.setTime(n.getTime()+27e5);let r="expires="+n.toUTCString();t=encodeURIComponent(JSON.stringify(t)),document.cookie=`${e}=${t}; ${r}; path=/;`,i&&(window.AB.userInfo.resolvedBy="delivery-addr")}ngOnDestroy(){this.isGuestAddToCartABSubscription&&this.isGuestAddToCartABSubscription.unsubscribe()}redirectToNonMigratedStore(e){let t=window.location.protocol+"//www."+e;window.location.href=t}static{this.ɵfac=function(t){return new(t||e)($d(LB),$d(HD),$d(Vl),$d(uP),$d(QD))}}static{this.ɵcmp=Qr({type:e,selectors:[["store-card"]],viewQuery:function(e,t){if(1&e&&tm(Eue,5),2&e){let e;im(e=nm())&&(t.activeAccordion=e.first)}},inputs:{store:"store",storesWithLimit:"storesWithLimit",isThemeBuilderEnabled:"isThemeBuilderEnabled",behaviourType:"behaviourType",isReBanneredStore:"isReBanneredStore",sellerProducts:"sellerProducts",mkpSellers:"mkpSellers",unavailableSeller:"unavailableSeller",oosSellerTotal:"oosSellerTotal",isStoreAvailableWithUserAddr:"isStoreAvailableWithUserAddr",addrDetailsFromStoreByAddr:"addrDetailsFromStoreByAddr",isPartialCoverage:"isPartialCoverage",zipCoverage:"zipCoverage",isPopupWrapperView:"isPopupWrapperView",isStoreSelectionWrapperView:"isStoreSelectionWrapperView",shRedirectPath:"shRedirectPath",shCallback:"shCallback",nativeCallback:"nativeCallback",platform:"platform",appDeepLinks:"appDeepLinks"},decls:9,vars:6,consts:[["instorePickupBlock",""],["selectButtonBlock",""],["detailsIsSisterBanner",""],["selectedStoreBlock",""],["buttonIsSisterBanner",""],["accordionActive",""],["data-qa","hmpg-flfllmntmdl-bnnrstores",1,"col-8","col-sm-8","card-store__address"],[4,"ngIf","ngIfElse"],["class","col-4 col-sm-4 card-store__location",4,"ngIf","ngIfElse"],["class","accordion-item section",4,"ngIf"],["class","mtkp-unavailable",4,"ngIf"],[1,"caption",3,"id"],["role","img","class","store-icon-logo",3,"alt","src",4,"ngIf"],["role","img",3,"alt","src","class",4,"ngIf"],[4,"ngIf"],["role","img",1,"store-icon-logo",3,"alt","src"],["role","img",3,"alt","src"],["class","caption",3,"id",4,"ngIf"],["role","img",3,"alt","src","ngClass"],[1,"body-m"],["class","pickupType body-m body-m--bold",4,"ngIf"],[1,"pickupType","body-m","body-m--bold"],[1,"col-4","col-sm-4","card-store__location"],["class","caption",4,"ngIf","ngIfElse"],[1,"caption"],["href","#","class","btn btn-default card-store-btn btn-primary","data-qa","hmpg-flfllmntmdl-shpdlivrybttn","role","button",3,"click",4,"ngIf"],["class","btn btn-outline-primary card-store-btn shop-pickup-dst","data-qa","hmpg-flfllmntmdl-shpdlivrybttn",3,"click",4,"ngIf"],["href","#","data-qa","hmpg-flfllmntmdl-shpdlivrybttn","role","button",1,"btn","btn-default","card-store-btn","btn-primary",3,"click"],[1,"sr-only"],["data-qa","hmpg-flfllmntmdl-shpdlivrybttn",1,"btn","btn-outline-primary","card-store-btn","shop-pickup-dst",3,"click"],["href","#","data-qa","hmpg-flfllmntmdl-slctdbttn","role","button","disabled","","aria-disabled","true",1,"btn","btn-default","card-store-btn-disabled","btn-outline-primary"],["class","col-4 col-sm-4 card-store__location",4,"ngIf"],[3,"id"],[1,"d-none"],["href","#","class","btn btn-default card-store-btn btn-primary","role","button","data-qa","hmpg-flfllmntmdl-srchrsltSlctbtn",3,"click",4,"ngIf"],["class","btn btn-outline-primary card-store-btn shop-pickup-dst",3,"click",4,"ngIf"],["href","#","role","button","data-qa","hmpg-flfllmntmdl-srchrsltSlctbtn",1,"btn","btn-default","card-store-btn","btn-primary",3,"click"],[1,"btn","btn-outline-primary","card-store-btn","shop-pickup-dst",3,"click"],["href","#","class","btn btn-default card-store-btn-selected btn-primary","data-qa","hmpg-flfllmntmdl-crssbnnrysbttn","role","button",3,"click",4,"ngIf"],["class","btn btn-outline-primary card-store-btn-selected shop-pickup-dst","data-qa","hmpg-flfllmntmdl-crssbnnrysbttn",3,"click",4,"ngIf"],["href","#","data-qa","hmpg-flfllmntmdl-crssbnnrysbttn","role","button",1,"btn","btn-default","card-store-btn-selected","btn-primary",3,"click"],["data-qa","hmpg-flfllmntmdl-crssbnnrysbttn",1,"btn","btn-outline-primary","card-store-btn-selected","shop-pickup-dst",3,"click"],[1,"accordion-item","section"],["role","button","tabindex","0","class","accordion-header active-header body-s accordion--active",3,"ngClass","keydown.enter","keyup.Space","click",4,"ngIf"],["class","col-12 col-sm-12 accordion-content open-content pb-1",3,"border-bottom",4,"ngIf"],["role","button","tabindex","0",1,"accordion-header","active-header","body-s","accordion--active",3,"keydown.enter","keyup.Space","click","ngClass"],[1,"col-12","col-sm-12","accordion-content","open-content","pb-1"],["class","store-info",4,"ngIf"],["class","col-12 carousel-content-wrapper product-carou
1sel-v2 oos-items",3,"ngClass",4,"ngIf"],["class","seller-content",4,"ngFor","ngForOf"],[1,"store-info"],[3,"class",4,"ngIf"],["class","banner-name",4,"ngIf"],[1,"banner-name"],[1,"col-12","carousel-content-wrapper","product-carousel-v2","oos-items",3,"ngClass"],["class","body-s unavailable-list-item",4,"ngFor","ngForOf"],[1,"body-s","unavailable-list-item"],[1,"seller-content"],["class","col-12 carousel-content-wrapper product-carousel-v2 oos-items",4,"ngIf"],["class","marketplace-pill__sellerImage",3,"src","alt",4,"ngIf"],[1,"marketplace-pill__sellerImage",3,"src","alt"],[1,"col-12","carousel-content-wrapper","product-carousel-v2","oos-items"],[1,"col-12"],[1,"mtkp-unavailable"],[1,"title-xxxs"],["class","show-pipe",4,"ngFor","ngForOf"],[1,"show-pipe"],["class","banner-name title-xxxs",4,"ngIf"],[1,"banner-name","title-xxxs"]],template:function(e,t){if(1&e&&(kf(0,"div",6),ph(1,Nue,6,6,"ng-container",7)(2,jue,3,2,"ng-template",null,0,Wm),xf(),ph(4,Gue,4,2,"div",8)(5,ipe,1,1,"ng-template",null,1,Wm)(7,Ipe,3,2,"div",9)(8,Ppe,2,1,"div",10)),2&e){let e=sm(3),i=sm(6);Vd(),zh("ngIf","delivery"===t.storePrefType)("ngIfElse",e),Vd(3),zh("ngIf","delivery"===t.storePrefType)("ngIfElse",i),Vd(3),zh("ngIf",(t.store&&(null==t.store?null:t.store.unavailable_item)&&(null==t.store||null==t.store.unavailable_item?null:t.store.unavailable_item.cart_unavailable_total)||t.oosSellerTotal>0)&&"instore"!==t.storePrefType),Vd(),zh("ngIf",(null==t.unavailableSeller?null:t.unavailableSeller.length)>0)}},dependencies:[sy,oy,cy,Sy,Oy,Iy],encapsulation:2})}}return e})(),Ope=(()=>{class e{constructor(e){this._http=e,this._httpOptions={headers:new jy({"Content-Type":"text/plain","Ocp-Apim-Subscription-Key":window.SWY.CONFIGSERVICE.bringgConfig["apim.key"],"Access-Control-Allow-Origin":"*"})},this._httpOptionsPost={headers:new jy({"Content-Type":"application/json","Ocp-Apim-Subscription-Key":window.SWY.CONFIGSERVICE.bringgConfig["apim.key"],"Access-Control-Allow-Origin":"*"})}}_validateParamsURL(e,t){return t.filter((t=>!e.has(t)))}_getParamValues(e,t){let i={};return t.forEach((t=>{i[t]=e.get(t)?e.get(t):""})),i}getTimerValue(){return window.SWY?.CONFIGSERVICE?.bringgConfig?.["order.call.store.time.min"]?parseInt(window.SWY?.CONFIGSERVICE?.bringgConfig?.["order.call.store.time.min"],10):5}getRecursiveTimerValue(){return window.SWY?.CONFIGSERVICE?.bringgConfig?.["order.status.check.time.min"]?parseInt(window.SWY?.CONFIGSERVICE?.bringgConfig?.["order.status.check.time.min"],10):2}getParams(e,t){let i=new URLSearchParams(window.location.search);return this._validateParamsURL(i,e).length>0?this._validateParamsURL(i,e):this._getParamValues(i,t)}getDUGOrder(e){let t=window.SWY.CONFIGSERVICE.bringgConfig.basepath+`${window.SWY.CONFIGSERVICE.bringgConfig["order.details.path"]}/${e}`;return this._http.get(t,this._httpOptions)}getDUGOrderRecursive(e){let t=window.SWY.CONFIGSERVICE.bringgConfig.basepath+`${window.SWY.CONFIGSERVICE.bringgConfig["order.details.path"]}/${e}`;return this._http.get(t,this._httpOptions).pipe($i((()=>fi({}))))}postArrivedUser(e){let t=window.SWY.CONFIGSERVICE.bringgConfig.basepath+window.SWY.CONFIGSERVICE.bringgConfig["order.arrival.path"];return this._http.post(t,e,this._httpOptionsPost)}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Bpe=(()=>{class e{constructor(e,t){this.http=e,this._appConfigService=t,this._paramsFromUrl=null,this._savedLocalStorage={},this.userUUID=null,this.prBannerId=null}getApiConfig(e,t){let i=this._appConfigService.getParams("mode"),n=t,r=e;if(window.AB.allowWiremockService&&("record"===i||"playback"===i)){n=window.AB.wcaxXapiApimKey;let t=window.AB.wiremockRecorderBaseUrl,s=window.AB.wiremockPlaybackBaseUrl;switch(!0){case"record"===i:r=`${t}${e}`;break;case"playback"===i:r=`${s}${e}`}}return{apiEndpoint:r,subscriptionKey:n}}submitReview(e,t,i,n){let{apiEndpoint:r,subscriptionKey:s}=this.getApiConfig(i,n);return this.http.post(`${r}?${t.toString()}`,e,this._getHttpOptions(s))}getProducts(e,t,i){let{apiEndpoint:n,subscriptionKey:r}=this.getApiConfig(t,i);return this.http.post(n,e,this._getHttpOptions(r)).pipe(hn((e=>{e&&e.products&&e.products.meta&&(e.products.meta.uuid&&(this.userUUID=e.products.meta.uuid),e.products.meta.prBannerId&&(this.prBannerId=e.products.meta.prBannerId))})),sn(1))}getNicknameFromState(){return AB&&AB.userInfo&&AB.userInfo.firstName&&AB.userInfo.firstName.length>0?AB.userInfo.firstName[0].toUpperCase():"anonymous"}getLocationFromLocalStorage(){let e=this.getLocalStorageItem("abStoreAddress");return e&&e.storeCity?e.storeCity:"unset"}getBannerFromState(){return SWY&&SWY.CONFIGSERVICE&&SWY.CONFIGSERVICE.resolvedBanner?SWY.CONFIGSERVICE.resolvedBanner:null}getBannerIdFromLocalStorage(){let e=this.getLocalStorageItem("abStoreAddress");return e&&e.bannerId?e.bannerId:null}getUUIDFromState(){return AB&&AB.userInfo&&AB.userInfo.UUID?AB.userInfo.UUID:null}getIOvationToken(){return ioGetBlackbox()&&ioGetBlackbox().blackbox?ioGetBlackbox().blackbox:null}getParamsFromUrl(){if(null===this._paramsFromUrl){let e=":",t="anonymous",i=new URLSearchParams(this.getWindowLocationSearch()).get("t");if(i&&i.split(e).length>0){let n=i.split(e),[r=null,s=null,a=null,o=null]=n;this._paramsFromUrl={token:""!==r?r:null,nickname:s&&""!==s?s.toUpperCase():t,initialUpc:""!==a?a:null,initialRating:""!==o?o:null}}else this._paramsFromUrl={token:null,nickname:null,initialUpc:null,initialRating:null}}return this._paramsFromUrl}getLocalStorageItem(e){return this._savedLocalStorage.hasOwnProperty(e)?this._savedLocalStorage[e]:localStorage&&localStorage.getItem(e)?(this._savedLocalStorage[e]=JSON.parse(localStorage.getItem(e)),this._savedLocalStorage[e]):null}getWindowLocationSearch(){return window.location.search}_getHttpOptions(e){return{headers:(new jy).set("Ocp-Apim-Subscription-Key",e)}}isValidFileSize(e,t){if(e){let i=e.size;return!(parseInt((i/1048576).toFixed(3))>t)}return!0}upload(e,t,i){let n=new FormData;n.append("file",e),n.append("upload_preset","image"===t?"prod_preset":"prod_video_preset");let r=new ev("POST",i,n,{reportProgress:!0,responseType:"json"});return this.http.request(r)}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(hP))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Mpe=(()=>{class e{constructor(e){this._http=e,this.disableRecipePriceandServingSearch=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.disableRecipePriceandServingSearch}
1getMealsData(e){let t,i,n=e.api,r=e.isTargetedContent,s=window.AB.userInfo.branchId,a=(new jy).set("Ocp-Apim-Subscription-Key",e.subscriptionKey),o=e.maxNoOfRecipes;if(e.isAuthorizedUser&&(a=a.append("Authorization",`Bearer ${window.AB.userInfo.SWY_SHOP_TOKEN}`)),n=n?.replace("{storeId}",s),"true"===e.isCuratedWeb)return"true"===r?fi(JSON.parse(e.targetedMealsData)):(i=e.recipesIds?.split(","),n=n.replace("{mealRecipesIds}",i),a=a.append("Content-Type","application/json"),this._http.get(n,{headers:a}));if("true"===e.isCookbookWeb)return"true"===r?fi(JSON.parse(e.targetedMealsData)):(t=e.cookbookId,n=n.replace("{cookbookId}",t),a=a.append("Content-Type","application/json"),this._http.get(n,{headers:a}));if("searchPage"==e.page){let e=new URL(window.location.href),t=e.searchParams.has("q")?encodeURIComponent(e.searchParams.get("q")):"*";if(!1===this.disableRecipePriceandServingSearch)return n=n.replace("{q}",t),n=n.replace("{size}",o),a=a.append("Content-Type","application/json"),this._http.get(n,{headers:a});{n=n.replace("{offset}",0);let e={storeId:s,searchInput:t,offset:0,pageSize:12};return this._http.post(n,e,{headers:a})}}return"true"===e.isPlannedMeals?e.isAuthorizedUser?"true"===r?fi(JSON.parse(e.targetedMealsData)):(a=(new jy).set("Ocp-Apim-Subscription-Key",window.AB.plannedMealsSubKey),a=a.append("Content-Type","application/json"),a=a.append("Authorization",`Bearer ${window.AB.userInfo.SWY_SHOP_TOKEN}`),n=window.AB.plannedMealsEndpoint+s+"¬OlderThan=30",this._http.get(n,{headers:a})):void 0:"true"===e.isDataDrivenRecipes&&"true"===r?fi(JSON.parse(e.targetedMealsData)):(n=n.replace("{bpn}",e.bpn).replace("{offset}",0),this._http.get(n,{headers:a}))}hideCarousel(e){$(e).parent().addClass("mask")}showCarousel(e){$(e).parent().removeClass("mask")}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Rpe=(()=>{class e{constructor(){this.slickChanges=new kt,this.slickChanges$=this.slickChanges.asObservable()}initMealsSlick(e,t,i,n,r,s){let a={},o=[];a={359:1,767:3,1023:4,1279:5,1439:6},"dynamic-grid-with-facets"===s&&(a={359:1,767:3,1023:3,1279:4,1439:4}),o=[{breakpoint:359,settings:{slidesToShow:a[359],slidesToScroll:a[359],dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:a[767],slidesToScroll:a[767],dots:!1,arrows:!0}},{breakpoint:1023,settings:{slidesToShow:a[1023],slidesToScroll:a[1023],dots:!1,arrows:!0}},{breakpoint:1279,settings:{slidesToShow:a[1279],slidesToScroll:a[1279],dots:!1,arrows:!0}},{breakpoint:1439,settings:{slidesToShow:a[1439],slidesToScroll:a[1439],dots:!1,arrows:!0}}];let l,c={425:1,650:2,767:2,1024:3,1440:4},d=".meals-carousel-container";"true"===t&&(d=".planned-meals-module__container",o=[{breakpoint:0,settings:{slidesToShow:c[425],slidesToScroll:c[425],arrows:!0}},{breakpoint:425,settings:{slidesToShow:c[425],slidesToScroll:c[425],arrows:!0}},{breakpoint:650,settings:{slidesToShow:c[650],slidesToScroll:c[650],arrows:!0}},{breakpoint:767,settings:{slidesToShow:c[767],slidesToScroll:c[767],dots:!1,arrows:!0}},{breakpoint:1024,settings:{slidesToShow:c[1024],slidesToScroll:c[1024],dots:!1,arrows:!0}},{breakpoint:1439,settings:{slidesToShow:c[1440],slidesToScroll:c[1440],dots:!1,arrows:!0}}],a=c,$(d).on("init",((e,t)=>{t?.breakpointSettings[t?.activeBreakpoint]?.slidesToShow<t?.$slides?.length&&$(t?.$slider)?.parent()?.siblings(".meals-carousel-header-wrapper")?.find(".planned-meals-module__nav .nav-link")?.removeClass("d-none")}))),$(e).find(d).not(".slick-initialized").on("init",(()=>{!r&&n&&(this.handleShowingRedesignNavButtons(e,n),this.slickChanges.next())})).slick(h(h(h(h({tail:!0,dots:!1,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1,responsive:o},"true"===t&&{nextArrow:r?'<button type="button" aria-label="Go to the next slide" class="slick-next planned-meals-module__next-btn" data-qa="hmpg_plnmls_rcp_chv_rgt"></button>':n?.find(".slick-redesign-next").first()}),"true"===t&&{prevArrow:r?'<button type="button" aria-label="Go to the previous slide" class="slick-prev planned-meals-module__prev-btn" data-qa="hmpg_plnmls_rcp_chv_lft"></button>':n?.find(".slick-redesign-prev").first()}),("true"===t||!r)&&{nextArrow:r?'<button type="button" aria-label="Go to the next slide" class="slick-next planned-meals-module__next-btn planned-meals-module__unified-controls" data-qa="hmpg_plnmls_rcp_chv_rgt"></button>':n?.find(".slick-redesign-next").first()}),("true"===t||!r)&&{prevArrow:r?'<button type="button" aria-label="Go to the previous slide" class="slick-prev planned-meals-module__prev-btn planned-meals-module__unified-controls" data-qa="hmpg_plnmls_rcp_chv_lft"></button>':n?.find(".slick-redesign-prev").first()})).on("beforeChange",(function(t,i,n,s){if(i?.breakpointSettings[i?.activeBreakpoint]?.slidesToShow<i?.$slides?.length&&$(i?.$slider)?.parent()?.siblings(".planned-meals-module__nav")?.find(".nav-link")?.removeClass("d-none"),r)if(n<s){let t='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).last(
1).attr("data-slick-index"))+1)+'"]',i=$(t,$(e));i&&setTimeout((()=>i.focus()),0),l="next"}else{let t='.slick-list .slick-slide[data-slick-index="'+(Number($(".slick-active",$(e)).first().attr("data-slick-index"))-1)+'"]',i=$(t,$(e));i&&setTimeout((()=>i.focus()),0),l="prev"}})).on("afterChange",((t,s,a,o)=>{if(a>0)for(let t=0;t<a;t++)$('.slick-list .slick-slide[data-slick-index="'+t+'"]',$(e)).removeClass("slick-active").attr("aria-hidden","true").attr("tabindex","-1");r||(this.handleShowingRedesignNavButtons(e,n),this.slickChanges.next(null)),setTimeout((()=>{switch(l){case"next":r&&($(".slick-current a:first",$(e)).attr("tabindex","0"),$(".slick-current a:first",$(e)).focus()),window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(e,i,"forward");break;case"prev":r&&($(".slick-active:last a:last",$(e)).attr("tabindex","0"),$(".slick-active:last a:last",$(e)).focus()),window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(e,i,"back")}}),0)}))}setAriaLabelForMealCarousel(e,t){let i=e.querySelector(".slick-next"),n=e.querySelector(".slick-prev"),r="Next "+t,s="Previous "+t;null!=i&&(i.setAttribute("aria-label",r),n.setAttribute("aria-label",s)),this.setAriaRolesForMealCarousel(e)}setAriaRolesForMealCarousel(e){let t=e.querySelector(".slick-list"),i=e.querySelector(".slick-track"),n=e.querySelectorAll(".slick-slide");t&&t.setAttribute("role","presentation"),i&&i.setAttribute("role","presentation"),n&&n.length&&n.forEach((e=>{e.setAttribute("role","listitem")}))}handleShowingRedesignNavButtons(e,t){t.find(".carousel-nav__controls-wrapper>button").each(((e,t)=>{let i=t.classList.contains("slick-redesign-next")?"svg-btn-slick-next--disabled":"svg-btn-slick-prev--disabled";t.classList.contains("slick-disabled")?($(t).prop("disabled",!0),$(t).children().addClass(i)):($(t).prop("disabled",!1),$(t).children().removeClass(i)),window.innerWidth<768?$(t).addClass("d-none"):$(t).removeClass("d-none")}))}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Lpe=["offersModal"],Fpe=["offersPill"];function Npe(e,t){if(1&e){let e=Mf();kf(0,"button",3,1),jf("click",(function(){return Wa(e),Ha(Yf().openOffersModal())})),am(2),xf()}if(2&e){let e=Yf();Sh("aria-label","View ",e.countLabel," for ",e.mealName,""),gh("data-qa",e.qaAttributePrefix+"mls_rcp_offers"),Vd(2),lm(e.countLabel)}}function Upe(e,t){if(1&e&&Tf(0,"img",24),2&e){gh("src",Yf().$implicit.imageUrl,id)}}function Vpe(e,t){if(1&e&&(kf(0,"span",25),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.offerDetail)}}function qpe(e,t){1&e&&(So(),kf(0,"svg",26),Tf(1,"path",27),xf())}function $pe(e,t){1&e&&(So(),kf(0,"svg",28),Tf(1,"polygon",29),xf())}function jpe(e,t){if(1&e){let e=Mf();kf(0,"li",15)(1,"span",16),ph(2,Upe,1,1,"img",17),xf(),kf(3,"span",18)(4,"span",19),am(5),xf(),ph(6,Vpe,2,1,"span",20),xf(),kf(7,"button",21),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).toggleClip(t))})),ph(8,qpe,2,0,"svg",22)(9,$pe,2,0,"svg",23),xf()()}if(2&e){let e=t.$implicit,i=Yf(2);gh("data-qa",i.qaAttributePrefix+"mls_offer_row"),Vd(2),zh("ngIf",e.imageUrl),Vd(3),lm(e.title),Vd(),zh("ngIf",e.offerDetail),Vd(),zh("ngClass",i.isClipped(e)?"meals-offer-modal__clip--clipped":"sunshine50"),gh("aria-label",(i.isClipped(e)?"Clipped ":"Clip ")+e.title)("aria-disabled",i.isClipped(e)?"true":null)("data-qa",i.qaAttributePrefix+"mls_offer_clp"),Vd(),zh("ngIf",!i.isClipped(e)),Vd(),zh("ngIf",i.isClipped(e))}}function zpe(e,t){if(1&e){let e=Mf();kf(0,"div",4),Tf(1,"span",5),kf(2,"h2",6),am(3),xf(),kf(4,"button",7),jf("click",(function(){return Wa(e),Ha(Yf().closeOffersModal())})),So(),kf(5,"svg",8),Tf(6,"path",9),xf()()(),Co(),kf(7,"div",10)(8,"ul",11),ph(9,jpe,10,10,"li",12),xf()(),kf(10,"div",13)(11,"button",14),jf("click",(function(){return Wa(e),Ha(Yf().closeOffersModal())})),am(12,"Done"),xf()()}if(2&e){let e=Yf();Vd(2),gh("data-qa",e.qaAttributePrefix+"mls_offer_mdl_ttl"),Vd(),lm(e.countLabel),Vd(),gh("data-qa",e.qaAttributePrefix+"mls_offer_mdl_cls"),Vd(5),zh("ngForOf",e.offers),Vd(2),gh("data-qa",e.qaAttributePrefix+"mls_offer_mdl_done")}}var Wpe=(()=>{class e{constructor(e){this._modalService=e,this.qaAttributePrefix="",this.offerClipToggled=new _l,this.clippedState={}}get offerCount(){return Array.isArray(this.offers)?this.offers.length:0}get countLabel(){return`${this.offerCount} ${1===this.offerCount?"offer":"offers"} available`}openOffersModal(){this.clippedState={}
1,(this.offers||[]).forEach((e=>{this.clippedState[e.id]=!0===e.isClipped})),this.modalRef=this._modalService.show(this.offersModalTemplate,{class:"meals-offer-modal-dialog modal-dialog-centered"}),this._onHiddenSubscription?.unsubscribe(),this._onHiddenSubscription=this._modalService.onHidden.subscribe((()=>{this._onHiddenSubscription?.unsubscribe(),this.offersPillElement?.nativeElement?.focus()}))}closeOffersModal(){this.modalRef?.hide()}isClipped(e){return!0===this.clippedState[e.id]}toggleClip(e){}ngOnDestroy(){this._onHiddenSubscription?.unsubscribe(),this.modalRef?.hide()}static{this.ɵfac=function(t){return new(t||e)($d(i$))}}static{this.ɵcmp=Qr({type:e,selectors:[["meals-offer-label"]],viewQuery:function(e,t){if(1&e&&(tm(Lpe,5),tm(Fpe,5)),2&e){let e;im(e=nm())&&(t.offersModalTemplate=e.first),im(e=nm())&&(t.offersPillElement=e.first)}},inputs:{offers:"offers",mealName:"mealName",qaAttributePrefix:"qaAttributePrefix"},outputs:{offerClipToggled:"offerClipToggled"},decls:3,vars:1,consts:[["offersModal",""],["offersPill",""],["type","button","class","meals-offer-label sunshine50 position-relative",3,"click",4,"ngIf"],["type","button",1,"meals-offer-label","sunshine50","position-relative",3,"click"],[1,"meals-offer-modal__header","d-flex","align-items-center"],["aria-hidden","true",1,"meals-offer-modal__header-spacer"],[1,"meals-offer-modal__title"],["type","button","aria-label","Close offers",1,"meals-offer-modal__close",3,"click"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true"],["d","M1 1L13 13M13 1L1 13","stroke","#2b2b2b","stroke-width","1.5","stroke-linecap","round"],[1,"meals-offer-modal__list"],[1,"meals-offer-modal__rows"],["class","meals-offer-modal__row d-flex align-items-center",4,"ngFor","ngForOf"],[1,"meals-offer-modal__footer"],["type","button",1,"btn","btn-primary","w-100",3,"click"],[1,"meals-offer-modal__row","d-flex","align-items-center"],["aria-hidden","true",1,"meals-offer-modal__row-image"],["alt","","loading","lazy",4,"ngIf"],[1,"meals-offer-modal__row-text"],[1,"meals-offer-modal__row-title","color-neutral-90"],["class","meals-offer-modal__row-detail color-neutral-90",4,"ngIf"],["type","button",1,"meals-offer-modal__clip",3,"click","ngClass"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","width","12","height","12","aria-hidden","true",4,"ngIf"],["aria-hidden","true","viewBox","0 0 24 24","width","16","height","16","version","1.1","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["alt","","loading","lazy"],[1,"meals-offer-modal__row-detail","color-neutral-90"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","width","12","height","12","aria-hidden","true"],["fill","#2b2b2b","d","M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36c-.5-.23-1.05-.36-1.64-.36-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm0 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3h-3z"],["aria-hidden","true","viewBox","0 0 24 24","width","16","height","16","version","1.1","xmlns","http://www.w3.org/2000/svg"],["fill","#2b2b2b","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236"]],template:function(e,t){1&e&&ph(0,Npe,3,5,"button",2)(1,zpe,13,5,"ng-template",null,0,Wm),2&e&&zh("ngIf",t.offerCount>0)},dependencies:[sy,oy,cy],styles:[".meals-offer-label{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;box-sizing:border-box;width:fit-content;margin:0;height:20px;padding:4px 8px;border:0;border-radius:8px;font-family:inherit;font-size:10px;font-weight:400;line-height:1.2;letter-spacing:0;white-space:nowrap;color:#1f1e1e;text-decoration:underline;cursor:pointer;z-index:1}.modal-dialog.meals-offer-modal-dialog{display:flex;align-items:center;min-height:calc(100% - 3.5rem);max-width:500px;margin:1.75rem auto}
1.modal-dialog.meals-offer-modal-dialog .modal-content{width:100%;border-radius:8px}.meals-offer-modal__header{padding:16px;border-bottom:1px solid #e0e0e0}.meals-offer-modal__header-spacer{width:24px;flex-shrink:0}.meals-offer-modal__title{flex:1;margin:0;font-size:22px;font-weight:500;line-height:1.3;text-align:center}.meals-offer-modal__close{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}.meals-offer-modal__list{max-height:520px;overflow-y:auto;padding:16px}.meals-offer-modal__rows{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;list-style:none}.meals-offer-modal__row{gap:12px;padding:12px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff}.meals-offer-modal__row-image{width:40px;height:40px;flex-shrink:0;border-radius:4px;overflow:hidden;background-color:#e0e0e0}.meals-offer-modal__row-image img{width:100%;height:100%;object-fit:cover}.meals-offer-modal__row-text{display:block;flex:1;min-width:0}.meals-offer-modal__row-title{display:block;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meals-offer-modal__row-detail{display:block;margin-top:2px;font-size:12px;text-decoration:underline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meals-offer-modal__clip{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;padding:0;border:1px dashed #2b2b2b;border-radius:50%;cursor:pointer}.meals-offer-modal__clip--clipped{border:0;background:transparent;cursor:default}.meals-offer-modal__footer{padding:16px;border-top:1px solid #e0e0e0}\n"],encapsulation:2})}}return e})(),Hpe=e=>({bullet:!0,"hidden-bullet":e});function Ype(e,t){if(1&e&&(kf(0,"span",22),am(1),xf()),2&e){let e=Yf(2);gh("data-qa",e.qaAttributePrefix+"mls_rcp_disc"),Vd(),cm("",e.roundedDiscountPercentage,"% off")}}function Gpe(e,t){if(1&e&&(Ef(0),kf(1,"div",23)(2,"div",24)(3,"div",25),Tf(4,"img",26),xf()()(),Df()),2&e){let e=Yf(2);Vd(2),Jf("id","ml"+e.meal.id+"Img"),gh("data-bpn",e.meal.id),Vd(2),Jf("alt",e.meal.name),gh("src",e.getMealImageUrl(),id)("data-qa",e.qaAttributePrefix+"mls_rcp_mg")}}function Kpe(e,t){1&e&&(kf(0,"span",27),am(1,"starting at"),xf())}function Qpe(e,t){if(1&e&&(kf(0,"span",28),am(1,"Sponsored"),xf()),2&e){gh("data-qa",Yf(2).qaAttributePrefix+"mls_rcp_spnsrd")}}function Jpe(e,t){if(1&e&&(kf(0,"del",33),am(1),xf()),2&e){let e=Yf(3);gh("data-qa",e.qaAttributePrefix+"mls_rcp_price_del"),Vd(),lm(e.validateField("basepriceperserving"))}}function Zpe(e,t){if(1&e&&(kf(0,"div",29)(1,"span",30)(2,"span",31),am(3),xf()(),ph(4,Jpe,2,2,"del",32),xf()),2&e){let e=Yf(2);gh("data-qa",e.qaAttributePrefix+"mls_rcp_price"),Vd(),Jf("id","ml"+e.meal.id+"price"),Vd(2),cm("",e.validateField("priceperserving"),"/serv."),Vd(),zh("ngIf",e.isOnSale)}}function Xpe(e,t){if(1&e&&(kf(0,"li"),am(1),xf()),2&e){let e=t.$implicit;gh("data-qa",e.qa),Vd(),lm(e.text)}}function ehe(e,t){if(1&e&&(kf(0,"ul",34),ph(1,Xpe,2,2,"li",35),xf()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.metadataItems)("ngForTrackBy",e.trackByIndex)}}function the(e,t){if(1&e&&Tf(0,"span",39),2&e){zh("ngClass","svg-star-icon-"+t.$implicit+"-filled")}}function ihe(e,t){if(1&e&&(kf(0,"span",40),am(1),xf()),2&e){let e=Yf(3);Vd(),lm(e.ratingCountValue)}}function nhe(e,t){if(1&e&&(kf(0,"section",36),ph(1,the,1,1,"span",37)(2,ihe,2,1,"span",38),xf()),2&e){let e=Yf(2);gh("aria-label",e.ratingAccessibilityLabel)("data-qa",e.qaAttributePrefix+"mls_rcp_rtng"),Vd(),zh("ngForOf",e.starFills)("ngForTrackBy",e.trackByIndex),Vd(),zh("ngIf",e.hasRatingCount)}}function rhe(e,t){if(1&e&&Tf(0,"meals-offer-label",41),2&e){let e=Yf(2);zh("offers",e.validOffers)("mealName",null==e.meal?null:e.meal.name)("qaAttributePrefix",e.qaAttributePrefix)}}function she(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",2)(2,"a",3),jf("click",(function(t){return Wa(e),Ha(Yf().mealsCardTracking(t))})),xf(),ph(3,Ype,2,2,"span",4),kf(4,"div",5),ph(5,Gpe,5,5,"ng-container",6),xf(),kf(6,"div",7)(7,"div",8)(8,"div",9)(9,"div",10),p
1h(10,Kpe,2,0,"span",11)(11,Qpe,2,1,"span",12),xf(),ph(12,Zpe,5,4,"div",13),xf(),kf(13,"section",14)(14,"div",15),am(15),xf(),kf(16,"div",16),Tf(17,"div",17),kf(18,"div",18),am(19),xf()()(),ph(20,ehe,2,2,"ul",19)(21,nhe,3,5,"section",20)(22,rhe,1,3,"meals-offer-label",21),xf()()(),Df()}if(2&e){let e=Yf();Vd(2),Jf("id","meal"+e.meal.id),gh("href",e.getMealDetailPath(),id)("aria-label",e.cardAccessibilityLabel),Vd(),zh("ngIf",e.showDiscountTag),Vd(2),zh("ngIf",e.getMealImageUrl()),Vd(5),zh("ngIf",e.hasPrice),Vd(),zh("ngIf",e.isSponsored),Vd(),zh("ngIf",e.hasPrice),Vd(2),Jf("id","ml"+e.meal.id),gh("data-bpn",e.meal.id)("data-qa",e.qaAttributePrefix+"mls_rcp_title_trnctd"),Vd(),cm(" ",null==e.meal?null:e.meal.name," "),Vd(4),lm(null==e.meal?null:e.meal.name),Vd(),zh("ngIf",e.hasMetadata),Vd(),zh("ngIf",e.hasRating),Vd(),zh("ngIf",e.showOffers)}}function ahe(e,t){if(1&e&&(kf(0,"label",52),am(1),xf()),2&e){let e=Yf(2);Vd(),cm("",null==e.meal?null:e.meal.serving_count," servings")}}function ohe(e,t){if(1&e){let e=Mf();kf(0,"a",42),jf("click",(function(t){return Wa(e),Ha(Yf().mealsCardTracking(t))})),kf(1,"div",43),ph(2,ahe,2,1,"label",44),Tf(3,"img",45),kf(4,"div",46)(5,"span",47),am(6),xf(),kf(7,"div",48)(8,"span",49),am(9),xf(),Tf(10,"span",50),kf(11,"span",51),am(12),xf()()()()()}if(2&e){let e=Yf();Jf("id","meal"+(null==e.meal?null:e.meal.id)),gh("href",e.getMealDetailPath(),id),Vd(2),zh("ngIf",(null==e.meal?null:e.meal.serving_count)>1),Vd(),gh("src",e.getMealImageUrl(),id),Vd(3),lm(e.meal.title),Vd(3),lm((null==e.meal?null:e.meal.cooking_time)>0?e.transformDuration(e.meal.cooking_time):""),Vd(),zh("ngClass",Om(8,Hpe,e.validateField("bullet"))),Vd(2),lm(e.meal.calories>0?e.meal.calories+" cal":"")}}function lhe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}var che=(()=>{class e{constructor(e,t){this._elementRef=e,this._mealsCarouselService=t,this.isLastOrFirstCardOfPreviousOrNextSet=!1,this.isFirstCardOfNextSet=!1,this.qaAttributePrefix=""}ngOnInit(){this.subscribeForAdaFocusEvent(),this.pageName&&(this.qaAttributePrefix=`${this.pageName}_`)}subscribeForAdaFocusEvent(){this.slickChangesSubscription=this._mealsCarouselService.slickChanges$.subscribe((()=>{let e=this._elementRef?.nativeElement?.closest(".slick-slide");if(!e)return;let t='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), span[role="button"], a[role="button"], img[role="button"]',i=(e.querySelectorAll(t)[0],e.querySelectorAll(t)),n=i[i.length-1];window.innerWidth<768?setTimeout((()=>{if(i.forEach((e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false")})),e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden"),e?.classList?.contains("slick-active")||!e?.nextElementSibling?.classList?.contains("slick-active")&&!e?.previousElementSibling?.classList?.contains("slick-active"))this.isLastOrFirstCardOfPreviousOrNextSet&&($(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().off("focus"),this.isLastOrFirstCardOfPreviousOrNextSet=!1);else{let t=this.isFirstCardOfNextSet=e?.previousElementSibling?.classList?.contains("slick-active"),i=function(i){t?$(e).closest(".carousel-content-wrapper").slick("slickNext"):$(e).closest(".carousel-content-wrapper").slick("slickPrev")};$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().on("focus",i),this.isLastOrFirstCardOfPreviousOrNextSet=!0}}),100):this.isLastOrFirstCardOfPreviousOrNextSet&&$(this._elementRef.nativeElement).find(this.isFirstCardOfNextSet?".pc__tap-zone":n).first().off("focus")}))}ngOnDestroy(){this.slickChangesSubscription?.unsubscribe()}getMealDetailPath(){return"true"===this.isPlannedMeals?"/meal-plans-recipes/planned-meals/"+this.meal.id:this.meal?.shoppableUrl?this.meal.shoppableUrl:this.meal?.shoppable_url}getMealImageUrl(){return this.meal?.thumbnailImageUrl?this.meal.thumbnailImageUrl:this.meal?.images?.thumbnailImageUrl}validateField(e){let t;if("true"===this.isPlannedMeals)return!this.meal.calories||!this.meal.cooking_time;switch(e){case"cookingtime":t=this.meal.cookingMinutes?this.transformDuration(this.meal.cookingMinutes):"";break;case"cookingtimesr":t=this.meal.cookingMinutes?this.transformDurationForScreenReader(this.meal.cookingMinutes):"";break;case"calories":t=this.meal.calories?this.meal.calories+" cal":"";break;case"bullet":t=!this.meal.calories||!this.meal.cookingMinutes;break;case"priceperserving":t=this.meal.price?.pricePerServing?this.transformPrice(this.meal.price?.pricePerServing):"";break;case"basepriceperserving":t=this.meal.price?.basePricePerServing?this.transformPrice(this.meal.price?.basePricePerServing):"";break;default:t=""}return t}transformDuration(e){let t=Math.floor(e/60),i=e%60;return`${t>0?t+" hr":""} ${i>0?i+" mins":""}`}transformDurationForScreenReader(e){let t=Math.floor(e/60),i=e%60;return`${t>0?t+" hour":""} ${i>0?i+" minutes":""}`}
1transformPrice(e){return`${(e/100).toLocaleString("en-US",{style:"currency",currency:"USD"})}`}mealsCardTracking(e){window.eddlLoadComplete&&e&&e.target&&window.AB.DATALAYER.setTopNavMealsCard(e.target,this.meal.id)}get isPriceSuppressed(){return!1===this.isPriceAvailable}get hasPrice(){return!this.isPriceSuppressed&&!!this.meal?.price?.pricePerServing}get isOnSale(){return this.hasPrice&&"number"==typeof this.meal?.price?.basePricePerServing&&this.meal.price.pricePerServing<this.meal.price.basePricePerServing}get showDiscountTag(){let e=this.meal?.price?.discountPercentage;return"number"==typeof e&&Number.isFinite(e)&&e>15}get roundedDiscountPercentage(){return Math.round(this.meal?.price?.discountPercentage||0)}get servingCountValue(){return this.meal?.servingCount||this.meal?.serving_count}get showServings(){return this.servingCountValue>0}get roundedCalories(){return Math.round(this.meal?.calories)}get hasMetadata(){return this.meal?.cookingMinutes>0||this.meal?.calories>0||this.showServings}get metadataItems(){return[(this.meal?.cookingMinutes??0)>0?{text:this.cookTimeLabel,qa:this.qaAttributePrefix+"mls_rcp_mns"}:null,(this.meal?.calories??0)>0?{text:`${this.roundedCalories} cal`,qa:this.qaAttributePrefix+"mls_rcp_cls"}:null,this.showServings?{text:`${this.servingCountValue} serv`,qa:this.qaAttributePrefix+"ml_rcp_srv"}:null].filter(Boolean)}get cookTimeLabel(){let e=Math.round(this.meal?.cookingMinutes);if(!(e>0))return"";let t=Math.floor(e/60),i=e%60;return 0===t?`${i} min`:i>0?`${t} hr ${i} min`:`${t} hr`}get resolvedRating(){let e=lhe(this.meal?.hyvorRating),t=lhe(this.meal?.hyvorCount);if(null!==e&&null!==t)return{value:e,count:t,isHyvor:!0};let i=lhe(this.meal?.rating);return{value:null===i?null:5*i,count:lhe(this.meal?.ratingCount),isHyvor:!1}}get ratingValue(){return this.resolvedRating.value}get ratingCountValue(){return this.resolvedRating.count}get hasRating(){let{value:e,count:t,isHyvor:i}=this.resolvedRating;return(e??0)>0&&(!i||t>0)}get hasRatingCount(){return(this.ratingCountValue??0)>0}get normalizedRating(){return this.ratingValue??0}getStarRatings(e){let t=Math.min(Math.max(e||0,0),5),i=Math.round(2*t)/2;return[0,1,2,3,4].map((e=>i>=e+1?100:i>=e+.5?50:0))}get starFills(){let e=this.ratingValue;return(!this._starFills||this._starFillsRating!==e)&&(this._starFillsRating=e,this._starFills=this.getStarRatings(this.normalizedRating)),this._starFills}trackByIndex(e){return e}get roundedRating(){let e=Math.min(Math.max(this.normalizedRating,0),5);return Math.round(2*e)/2}get validOffers(){let e=this.meal?.offers;return(!this._validOffers||this._validOffersSource!==e)&&(this._validOffersSource=e,this._validOffers=Array.isArray(e)?e.filter((e=>!!e?.id&&!!e?.title)):[]),this._validOffers}get isSponsored(){return!0===this.meal?.isSponsored}get showOffers(){return this.validOffers.length>0}get ratingAccessibilityLabel(){let e=`Rated ${this.roundedRating} out of 5 stars`;return this.hasRatingCount?`${e}, ${this.ratingCountValue} reviews`:e}get accessibilityPriceLabel(){let e=this.meal?.price?.pricePerServing,t=this.meal?.price?.basePricePerServing;return e?t&&t>e?`on sale for ${this.transformPrice(e)} per serving, regularly ${this.transformPrice(t)} per serving`:`${this.transformPrice(e)} per serving`:"Price not available"}get cardAccessibilityLabel(){let e=this.hasPrice?`, ${this.accessibilityPriceLabel}`:"",t=this.showDiscountTag?`, ${this.roundedDiscountPercentage} percent off`:"",i=this.hasRating?`, rated ${this.roundedRating} out of 5 stars`:"",n=this.meal?.calories?`, ${this.meal.calories} calories`:"",r=this.meal?.cookingMinutes?`, ${this.meal.cookingMinutes} minute cook time`:"",s=this.showServings?`, ${this.servingCountValue} ${1===this.servingCountValue?"serving":"servings"}`:"",a=this.isSponsored?", Sponsored":"";return`${this.meal?.name||""}${e}${t}${i}${n}${r}${s}${a}`}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Rpe))}}static{this.ɵcmp=Qr({type:e,selectors:[["meals-card"]],inputs:{meal:"meal",pageName:"pageName",isPlannedMeals:"isPlannedMeals",isPriceAvailable:"isPriceAvailable"},decls:3,vars:2,consts:[["isPlannedMeal",""],[4,"ngIf","ngIfElse"],[1,"pc","pc--mc","position-relative","bg-white"],[1,"w-100","h-100","position-absolute","pc__tap-zone",3,"click","id"],["class","pc__text-xxs body-text-xs text-center pc__badge","aria-hidden","true",4,"ngIf"],[1,"pc__tc"],[4,"ngIf"],[1,"pc__bc"],[1,"d-flex","flex-column","align-items-start","align-self-stretch","pc__bc__gap"],[1,"d-flex","flex-column","align-self-stretch"],[1,"d-flex","pc__label-container","color-neutral-80"],["aria-hidden","true",4,"ngIf"],["class","ml-auto","aria-hidden","true",4,"ngIf"],["class","product-comp-v1__price d-flex align-items-end flex-wrap","aria-hidden","true",4,"ngIf"],[1,"pc__tooltip","position-relative","align-self-stretch"],["tabindex","-1","aria-hidden","true",1,"title-xxs","color-neutral-90","meals-card__title-area",3,"id"],["aria-hidden","true",1,"pc__tooltip__title"],["aria-hidden","true",1,"pc__tooltip__title__arrow-light"],["aria-hidden","true",1,"title-xxs","color-neutral-90"],["class","meals-card__metadata","aria-hidden","true",4,"ngIf"],["class","d-flex align-items-center meals-card__rating","role","img",4,"ngIf"],[3,"offers","mealName","qaAttributePrefix",4,"ngIf"],["aria-hidden","true",1,"pc__text-xxs","body-text-xs","text-center","pc__badge"],[1,"pc__tc__imgc","d-flex","justify-content-center"],[3,"id"],[1,"product-image-opaque-full"],["loading","lazy","aria-hidden","true",1,"ab-lazy","pc__tc__imgc__img","pc__tc--mc-img","w-100","h-100",3,"alt"],["aria-hidden","true"],["aria-hidden","true",1,"ml-auto"],["aria-hidden","true",1,"product-comp-v1__price","d-flex","align-items-end","flex-wrap"],[1,"product-comp-v1__price__text","product-comp-v1__price__saleprice","sunshine50",3,"id"],[1,"color-neutral-90"],["class","meals-card__price-base color-neutral-80",4,"ngIf"],[1,"meals-card__price-base","color-neutral-80"],["aria-hidden","true",1,"meals-card__metadata"],[4,"ngFor","ngForOf","ngForTrackBy"],["role","img",1,"d-flex","align-items-center","meals-card__rating"],["class","mr-0","aria-hidden","true",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["class","meals-card__rating-count color-neutral-80","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mr-0",3,"ngClass"],["aria-hidden","true",1,"meals-card__rating-count","color-neutral-80"],[3,"offers","mealName","qaAttributePrefix"],["data-qa","hmpg_plnmls_crd",1,"planned-meals-module",3,"click","id"],["role","text",1,"planned-meals-module__content"],["class","body-text-xs planned-meals-module__servings",4,"ngIf"],["data-qa","hmpg_plnmls_rcp_mg","loading","lazy","aria-hidden","true",1,"planned-meals-module__image","ab-lazy"],[1,"body-text-sm","planned-meals-module__text-box"],[1,"planned-meals-module__title-clamp"],[1,"price-xs","planned-meals-module__calories-info"],["data-qa","hmpg_plnmls_rcp_mns",1,"time"],["aria-hidden","true",3,"ngClass"],[1,"calories"],[1,"body-text-xs","planned-meals-module__servings"]],template:function(e,t){if(1&e&&ph(0,she,23,16,"ng-container",1)(1,ohe,13,10,"ng-template",null,0,Wm),2&e){let e=sm(2);zh("ngIf","true"!==t.isPlannedMeals)("ngIfElse",e)}},dependencies:[sy,oy,cy,Wpe],styles:[".pc--mc .meals-card__metadata{display:flex;list-style:none;margin:0;padding:0;align-items:center;font-size:10px;font-weight:700;line-height:1.45;letter-spacing:0}.pc--mc .meals-card__metadata>li{display:inline-flex;align-items:center;padding:0 4px;
1color:var(--pds-theme-color-foreground-info, #2d5a7a)}.pc--mc .meals-card__metadata>li:first-child{padding-left:0}.pc--mc .meals-card__metadata>li+li:before{content:\"\";flex-shrink:0;width:1px;height:10px;background-color:var(--pds-global-color-general-grey-40, #c2c1c0);margin-right:4px}.pc--mc{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;width:186px;min-width:186px;padding:20px 0 0;margin-left:-5px}.pc--mc .pc__tc{width:164px;margin:0;padding:0}.pc--mc .pc__bc{width:163px;margin:0;padding:0}.pc--mc .pc__tc__imgc{padding:0}.pc--mc .pc__tc__imgc>div,.pc--mc .product-image-opaque-full{width:100%}.pc--mc .pc__tc__imgc__img{aspect-ratio:1/1;object-fit:cover}.pc--mc .pc__badge{position:absolute;top:0;left:0;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:2px;width:fit-content;background-color:#178257;color:var(--pds-theme-color-foreground-neutral_high_inverse, #ffffff);font-size:10px;font-weight:400;line-height:1.2;letter-spacing:0;padding:2px 4px;border-radius:4px}.pc--mc .pc__bc__gap{gap:4px}.pc--mc .pc__label-container{align-items:center;font-size:10px;font-weight:400;line-height:1.45;letter-spacing:0}.pc--mc .product-comp-v1__price__saleprice{display:inline-flex;align-items:flex-end;width:fit-content;font-size:18px;font-weight:700;line-height:1.2;letter-spacing:0;border-radius:4px;padding:0 2px}.pc--mc .meals-card__price-base{font-size:10px;font-weight:400;line-height:1.45;letter-spacing:0;margin-left:4px}.pc--mc .title-xxs{font-size:12px;font-weight:600;line-height:1.45;letter-spacing:0}.pc--mc .meals-card__title-area{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}.pc--mc .meals-card__rating{gap:2px;min-height:16px}.pc--mc .meals-card__rating-count{font-size:10px;font-weight:400;line-height:1.45;letter-spacing:0}.pc--mc .meals-card__rating .svg-star-icon-0-filled,.pc--mc .meals-card__rating .svg-star-icon-50-filled,.pc--mc .meals-card__rating .svg-star-icon-100-filled{position:relative;display:inline-block;flex-shrink:0;width:12px;height:12px;border-radius:1px}.pc--mc .meals-card__rating .svg-star-icon-0-filled:after,.pc--mc .meals-card__rating .svg-star-icon-50-filled:after,.pc--mc .meals-card__rating .svg-star-icon-100-filled:after{content:\"\";position:absolute;left:0;top:0;width:100%;height:100%;background-repeat:no-repeat;background-position:center;background-size:contain}.pc--mc .meals-card__rating .svg-star-icon-100-filled:after{background-image:url(\"data:image/svg+xml,%3Csvg%20width='12'%20height='12'%20viewBox='0.471%200.680%2011.146%2010.630'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%20%3Cpath%20d='M5.56543%201.4458C5.71597%200.98249%206.37192%200.982486%206.52246%201.4458L7.40137%204.1499C7.45491%204.31468%207.608%204.42623%207.78125%204.42627L10.625%204.42627C11.1121%204.42627%2011.315%205.05007%2010.9209%205.33643L8.62012%207.0083C8.47998%207.11017%208.42107%207.29079%208.47461%207.45557L9.35352%2010.1597C9.50403%2010.6229%208.97418%2011.0083%208.58008%2010.7222L6.2793%209.05029C6.13913%208.94846%205.94878%208.9485%205.80859%209.05029L3.50781%2010.7222C3.1137%2011.0085%202.58384%2010.623%202.73437%2010.1597L3.61328%207.45557C3.6668%207.29085%203.6078%207.11019%203.46777%207.0083L1.16699%205.33643C0.773004%205.05018%200.975097%204.42667%201.46191%204.42627L4.30664%204.42627C4.4798%204.42613%204.63301%204.31461%204.68652%204.1499L5.56543%201.4458Z'%20fill='%23EEBD3E'%20stroke='%237D4A12'%20stroke-width='0.604'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%20%3C/svg%3E\")}.pc--mc .meals-card__rating .svg-star-icon-50-filled:after{background-image:url(\"data:image/svg+xml,%3Csvg%20width='12'%20height='12'%20viewBox='0.471%200.680%2011.146%2010.630'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%20%3Cpath%20d='M5.18514%201.32199C5.45542%200.490149%206.63224%200.490151%206.90252%201.32199L7.78135%204.02672L10.6253%204.02672C11.4999%204.02672%2011.8636%205.14595%2011.156%205.66006L8.85519%207.33168L9.73401%2010.0364C10.0043%2010.8682%209.05222%2011.56%208.34461%2011.0459L6.04383%209.37425L3.74304%2011.0459C3.03544%2011.56%202.08337%2010.8682%202.35365%2010.0364L3.23247%207.33168L0.931682%205.66006C0.224079%205.14595%200.587741%204.02
1672%201.46239%204.02672L4.30631%204.02672L5.18514%201.32199Z'%20fill='white'/%3E%20%3Cpath%20d='M5.20488%201.26123C5.35619%200.795526%206.04383%200.904439%206.04383%201.39411L6.04383%209.37425L3.74304%2011.0459C3.03544%2011.56%202.08337%2010.8682%202.35365%2010.0364L3.23247%207.33167L0.931682%205.66005C0.224079%205.14595%200.587741%204.02672%201.46239%204.02672L4.30631%204.02672L5.20488%201.26123Z'%20fill='%23EEBD3E'/%3E%20%3Cpath%20d='M5.56543%201.4458C5.71597%200.98249%206.37192%200.982486%206.52246%201.4458L7.40137%204.1499C7.45491%204.31468%207.608%204.42623%207.78125%204.42627L10.625%204.42627C11.1121%204.42627%2011.315%205.05007%2010.9209%205.33643L8.62012%207.0083C8.47998%207.11017%208.42107%207.29079%208.47461%207.45557L9.35352%2010.1597C9.50403%2010.6229%208.97418%2011.0083%208.58008%2010.7222L6.2793%209.05029C6.13913%208.94846%205.94878%208.9485%205.80859%209.05029L3.50781%2010.7222C3.1137%2011.0085%202.58384%2010.623%202.73437%2010.1597L3.61328%207.45557C3.6668%207.29085%203.6078%207.11019%203.46777%207.0083L1.16699%205.33643C0.773004%205.05018%200.975097%204.42667%201.46191%204.42627L4.30664%204.42627C4.4798%204.42613%204.63301%204.31461%204.68652%204.1499L5.56543%201.4458Z'%20stroke='%237D4A12'%20stroke-width='0.604'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%20%3C/svg%3E\")}.pc--mc .meals-card__rating .svg-star-icon-0-filled:after{background-image:url(\"data:image/svg+xml,%3Csvg%20width='12'%20height='12'%20viewBox='0.471%200.680%2011.146%2010.630'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%20%3Cpath%20d='M5.56543%201.4458C5.71597%200.98249%206.37192%200.982486%206.52246%201.4458L7.40137%204.1499C7.45491%204.31468%207.608%204.42623%207.78125%204.42627L10.625%204.42627C11.1121%204.42627%2011.315%205.05007%2010.9209%205.33643L8.62012%207.0083C8.47998%207.11017%208.42107%207.29079%208.47461%207.45557L9.35352%2010.1597C9.50403%2010.6229%208.97418%2011.0083%208.58008%2010.7222L6.2793%209.05029C6.13913%208.94846%205.94878%208.9485%205.80859%209.05029L3.50781%2010.7222C3.1137%2011.0085%202.58384%2010.623%202.73437%2010.1597L3.61328%207.45557C3.6668%207.29085%203.6078%207.11019%203.46777%207.0083L1.16699%205.33643C0.773004%205.05018%200.975097%204.42667%201.46191%204.42627L4.30664%204.42627C4.4798%204.42613%204.63301%204.31461%204.68652%204.1499L5.56543%201.4458Z'%20fill='white'%20stroke='%237D4A12'%20stroke-width='0.604'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%20%3C/svg%3E\")}\n"],encapsulation:2})}}return e})(),dhe=(e,t,i)=>({"meals-carousel-container":e,"meals-carousel-container__unified-controls":t,"planned-meals-module__container":i});function uhe(e,t){if(1&e&&(Ef(0),kf(1,"div",2),Tf(2,"meals-card",3),xf(),Df()),2&e){let e=t.$implicit,i=Yf();Vd(2),zh("pageName",i.pageName)("meal",e)("isPlannedMeals",i.isPlannedMeals)("isPriceAvailable",i.isPriceAvailable)}}var phe=(()=>{class e{constructor(e,t){this.elementRef=e,this._mealsCarouselService=t,this.carouselBehaviour=null,this.isPriceAvailable=!1,this.wrapper=this.elementRef.nativeElement}ngOnInit(){}ngAfterViewInit(){this.meals.length>0&&(this.isPriceAvailable=this.meals.some((e=>e?.price)),window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.meals,"load"));let e=$(this.elementRef.nativeElement).closest("true"===this.isPlannedMeals?".planned-meals-module-carousel":".meals-carousel");this.childComponents.changes.pipe(cn(null)).subscribe((()=>{this.processCarousel(e)}))}processCarousel(e){this._mealsCarouselService.initMealsSlick(this.wrapper,this.isPlannedMeals,this.meals,e,this.isMealCarouselRedesignDisabled,this.carouselBehaviour),this._mealsCarouselService.setAriaLabelForMealCarousel(this.wrapper,this.carouselTitle)}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Rpe))}}static{this.ɵcmp=Qr({type:e,selectors:[["meals-carousel"]],viewQuery:function(e,t){if(1&e&&tm(che,5),2&e){let e;im(e=nm())&&(t.childComponents=e)}},inputs:{meals:"meals",carouselTitle:"carouselTitle",pageName:"pageName",isPlannedMeals:"isPlannedMeals",isMealCarouselRedesignDisabled:"isMealCarouselRedesignDisabled",carouselBehaviour:"carouselBehaviour"},decls:2,vars:6,consts:[["role","list",3,"ngClass"],[4,"ngFor","ngForOf"],[2,"overflow","visible"],[3,"pageName","meal","isPlannedMeals","isPriceAvailable"]],template:function(e,t){1&e&&(kf(0,"div",0),ph(1,uhe,3,4,"ng-container",1),xf()),2&e&&(zh("ngClass",Mm(2,dhe,"true"!==t.isPlannedMeals,"true"!==t.isPlannedMeals,"true"===t.isPlannedMeals)),Vd(),zh("ngForOf",t.meals))},dependencies:[sy,oy,che],styles:[".meals-carousel-container .slick-list,.planned-meals-module__container .slick-list{padding-left:6px;padding-bottom:4px}\n"],encapsulation:2})}}return e})(),hhe=(e,t)=>({"meals-carousel":e,"planned-meals-module-carousel":t}),fhe=(e,t,i)=>({"meals-carousel-header-wrapper__unified-controls":e,"carousel-nav d-flex align-items-center justify-content-between py-2":t,"meals-carousel-header-wrapper":i}),mhe=(e,t)=>({"planned-meals-module__title":e,"meal-carousel-title":t}),ghe=(e,t)=>({hmpg_plnmls_ttl:e,"ml-crsl-hdng-ftrd-tms":t}),bhe=(e,t,i)=>({"d-none":e,"meals-module-nav":t,"meal-carousel__unified-controls":i}),yhe=e=>({"col-12":!0,"planned-meals-module__nav p0":e}),vhe=(e,t,i)=>({"d-none":e,"meal-carousel__unified-controls":t,"planned-meals-module__unified-controls":i}),whe=(e,t)=>({hmpg_plnmls_rcp_vwll:e,"mls-srsl-vw-ll":t});function _he(e,t){if(1&e&&(kf(0,"div",8)(1,"span",9),am(2),xf()()),2&e){let e=Yf(2);Vd(2),lm("true"===e.carousel.isCookbookWeb?e.carousel.title?e.carousel.title:e.mealsTitleApi:e.carousel.title)}}function She(e,t){if(1&e&&(kf(0,"div",10)(1,"h2",11),am(2),xf()()),2&e){let e=Yf(2);Vd(),zh("ngClass",Bm(3,mhe,"true"===e.carousel.isPlannedMeals&&"searchPage"!=e.carousel.page,"true"!==e.carousel.isPlannedMeals))("data-qa",Bm(6,ghe,"true"===e.carousel.isPlannedMeals,"true"!==e.carousel.isPlannedMeals)),Vd(),lm("true"===e.carousel.isCookbookWeb?e.carousel.title?e.carousel.title:e.mealsTitleApi:e.carousel.title)}}function Che(e,t){if(1&e){let e=Mf();kf(0,"div",15)(1,"a",16),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackViewAll(t))})),am(2),xf()()}if(2&e){let e=Yf(3);zh("ngClass",Om(5,yhe,"true"===e.carousel.isPlannedMeals)),Vd(),zh("ngClass",Mm(7,vhe,"true"===e.carousel.isPlannedMeals,"true"===e.carousel.isCuratedWeb||"true"===e.carousel.isCookbookWeb,"true"===e.carousel.isPlannedMeals))("data-qa",Bm(11,whe,"true"===e.carousel.isPlannedMeals,"true"!==e.carousel.isPlannedMeals))("href",e.carousel.ctaLink,id),Vd(),lm(e.carousel.ctaTitle)}}function Ihe(e,t){if(1&e&&(kf(0,"span",17),am(1),kf(2,"span",18),am(3),xf()()),2&e){let e=Yf(3);Vd(),cm("",e.mealsCtaText," "),Vd(2),lm(e.carousel.title?e.carousel.title:e.mealsTitleApi)}}function Ahe(e,t){if(1&e){let e=Mf();Ef(0),ph(1,Che,3,14,"div",12),kf(2,"div",2)(3,"a",13),jf("click",(function(t){return Wa(e),Ha(Yf(2).trackViewAll(t))})),ph(4,Ihe,4,2,"span",14),xf()(),Df()}if(2&e){let e=Yf(2);Vd(),zh("ngIf",e.carousel&&e.carousel.ctaLink&&e.carousel.ctaTitle),Vd(),zh("ngClass",Mm(7,bhe,"true"!==e.carousel.isCookbookWeb,"true"===e.carousel.isCookbookWeb,"true"===e.carousel.isCookbookWeb)),Vd(),_h("aria-label","",e.carousel.title?e.carousel.title:e.mealsTitleApi," view all"),Jf("title",e.carousel.title?e.carousel.title:e.mealsTitleApi),Jf("href",e.mealsCtaUrl,id),Vd(),zh("ngIf",e.mealsCtaUrl)}}function khe(e,t){if(1&e){let e=Mf();kf(0,"a",27),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackViewAll(t))})),am(1),xf()}if(2&e){let e=Yf(3);zh("ngClass",Mm(4,vhe,"true"===e.carousel.isPlannedMeals,"true"===e.carousel.isCuratedWeb||"true"===e.carousel.isCookbookWeb,"true"===e.carousel.isPlannedMeals))("data-qa",Bm(8,whe,"true"===e.carousel.isPlannedMeals,"true"!==e.carousel.isPlannedMeals))("href",e.carousel.ctaLink,id),Vd(),lm(e.carousel.ctaTitle)}}function xhe(e,t){if(1&e){let e=Mf();kf(0,"a",28),jf("click",(function(t){return Wa(e),Ha(Yf(3).trackViewAll(t))})),am(1),kf(2,"span",18),am(3),xf()()}if(2&e){let e=Yf(3);_h("aria-label","",e.carousel.title?e.carousel.title:e.mealsTitleApi," view all"),Jf("title",e.carousel.title?e.carousel.title:e.mealsTitleApi),Jf("href",e.mealsCtaUrl,id),zh("ngClass",Mm(7,bhe,"true"!==e.carousel.isCookbookWeb,"true"===e.carousel.isCookbookWeb,"true"===e.carousel.isCookbookWeb)),Vd(),cm(" ",e.mealsCtaText," "),Vd(2),lm(e.carousel.title?e.carousel.title:e.mealsTitleApi)}}function The(e,t){if(1&e&&(kf(0,"span",29),am(1),xf()),2&e){let e=Yf(3);Vd(),cm(" ",e.adaAnnouncement," ")}}function Phe(e,t){if(1&e){let e=Mf();kf(0,"div",19),ph(1,khe,2,11,"a",20)(2,xhe,4,11,"a",21),kf(3,"button",22),jf("click",(function(){return Wa(e),Ha(Yf(2).onPrevBtn())})),Tf(4,"span",23),xf(),kf(5,"button",24),jf("click",(function(){return Wa(e),Ha(Yf(2).onNextBtn())})),Tf(6,"span",25),xf()(),ph(7,The,2,1,"span",26)}if(2&e){let e=Yf(2);Vd(),zh("ngIf",e.carousel&&e.carousel.ctaLink&&e.carousel.ctaTitle),Vd(),zh("ngIf",e.mealsCtaUrl),Vd(5),zh("ngIf",e.isAdaAnnouncementEnabled)}}function Ehe(e,t){if(1&e&&(Ef(0),kf(1,"div",2),ph(2,_he,3,1,"div",4)(3,She,3,9,"ng-template",null,0,Wm),kf(5,"div",5),ph(6,Ahe,5,11,"ng-container",6)(7,Phe,8,3,"ng-template",null,1,Wm),xf()(),Tf(9,"meals-carousel",7),Df()),2&e){let e=sm(4),t=sm(8),i=Yf();Vd(),zh("ngClass",Mm(11,fhe,"true"===i.carousel.isPlannedMeals,!i.isMealCarouselRedesignDisabled,i.isMealCarouselRedesignDisabled)),Vd(),zh("ngIf",!i.isMealCarouselRedesignDisabled)("ngIfElse",e),Vd(4),zh("ngIf",i.isMealCarouselRedesignDisabled)("ngIfElse",t),Vd(3),zh("pageName",i.carousel.page)("meals",i.meals)("carouselTitle",i.carousel.title)("isPlannedMeals",i.carousel.isPlannedMeals)("isMealCarouselRedesignDisabled",i.isMealCarouselRedesignDisabled)("carouselBehaviour",i.carousel.behaviour)}}var Dhe=(()=>{class e{constructor(e,t,i){this.elementRef=e,this._mealsCarouselWrapperService=t,this._featureFlagService=i,this.meals=[],this.plannedMeals=[],this.showCarousel=!1,this.isAuthorizedUser=window.AB.COMMON.authorize(),this.isTargetedContent=!1,this.isMealCarouselRedesignDisabled=!0,this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1,this.disableRecipePriceandServingSearch=window.SWY.CONFIGSERVICE&&window.SWY.CONFIGSERVICE.featureToggleConfig&&window.SWY.CONFIGSERVICE.featureToggleConfig.disableRecipePriceandServingSearch}ngOnInit(){this.isMealCarouselRedesignDisabled=this._featureFlagService.getFeatureFlagByNameDisable("isMealCarouselRedesignDisabled"),this.wrapper=this.elementRef.nativeElement.parentNode.parentNode;let e=$("product-detail").attr("data-product-id")||$(".product-details-wrapper").attr("data-bpn");this.mealsCtaText="View All",this.carousel={title:this.wrapper.getAttribute("data-carousel-title"),page:this.wrapper.getAttribute("data-carousel-page"),render:this.wrapper.getAttribute("data-carousel-render"),maxNoOfRecipes:this.wrapper.getAttribute("data-carousel-max-recipes"),api:this.wrapper.getAttribute("data-carousel-api"),subscriptionKey:this.wrapper.getAttribute("data-carousel-subscription-key"),isAuthorizedUser:this.isAuthorizedUser,bpn:e,recipesIds:this.wrapper.getAttribute("data-recipe-ids"),isCuratedWeb:this.wrapper.getAttribute("data-curated-web"),isPlannedMeals:this.wrapper.getAttribute("data-plannedmeals-web"),isDataDrivenRecipes:this.wrapper.getAttribute("data-driven-recipes"),cookbookId:this.wrapper.getAttribute("data-cookbook-id"),isCookbookWeb:this.wrapper.getAttribute("data-cookbook-web"),ctaLink:this.wrapper.getAttribute("data-carousel-cta-link"),ctaTitle:this.wrapper.getAttribute("data-carousel-cta-title"),personalizedMeal:this.wrapper.getAttribute("data-personalized-checkbox"),isTargetedContent:this.wrapper.getAttribute("data-targeted-content"),targetedMealsData:this.wrapper.getAttribute("data-meals"),behaviour:this.wrapper.getAttribute("data-carousel-behaviour")},this._init()}_init(){let e=2;if(("true"===this.carousel.isCuratedWeb||"true"===this.carousel.isCookbookWeb)&&(e=0),"true"===this.carousel.isPlannedMeals&&!this.isAuthorizedUser)return this._mealsCarouselWrapperService.hideCarousel(this.wrapper);this._mealsCarouselWrapperService.getMealsData(this.carousel).subscribe((t=>{if(t&&t.curatedWebCtaTitle&&t.curatedWebCtaLink?(this.carousel.ctaTitle=t.curatedWebCtaTitle,this.carousel.ctaLink=t.curatedWebCtaLink,this.mealsCtaText=t.curatedWebCtaTitle,this.mealsCtaUrl=t.curatedWebCtaLink):t&&t.webCtaText&&t.webCtaLink&&(this.carousel.ctaTitle=t.webCtaText,this.carousel.ctaLink=t.webCtaLink,this.mealsCtaText=t.webCtaText,this.mealsCtaUrl=t.webCtaLink),"true"!==this.carousel.isPlannedMeals){let i=t?.hits||t?.savedRecipes?.thumbs;"true"===this.carousel.isTargetedContent&&Array.isArray(i)&&i.length>0?(this.meals=i,this.showCarousel=!0,this.mealsCtaUrl=t.webUri,this.carousel.isPlannedMeals="false",t?.ctaText&&t.ctaText?.length>0&&(this.mealsCtaText=t.ctaText)):t&&t.variants&&t.variants.length>e?(this.meals=t.variants,this.mealsTitleApi=t.title,this.mealsCtaUrl=t.webUri,this.showCarousel=!0,this.carousel.isPlannedMeals="false",t.pagination&&t.pagination.totalCount?this.updateAnalyticsRecipeCount(t.pagination.totalCount):this.updateAnalyticsRecipeCount(this.meals.length)):!1===this.disableRecipePriceandServingSearch&&Array.isArray(i)&&i.length>e?(this.meals=i,this.mealsTitleApi=t.title,this.mealsCtaUrl=t.webUri,this.showCarousel=!0,this.carousel.isPlannedMeals="false"):this._mealsCarouselWrapperService.hideCarousel(this.wrapper)}"true"===this.carousel.isPlannedMeals&&(!0===t?.hasPlannedMeals||"true"===t?.hasPlannedMeals)&&t?.plannedMeals?.length>0?this.checkPlannedMealsResponse(t.plannedMeals):"true"===this.carousel.isPlannedMeals&&!0!==t?.hasPlannedMeals&&!(t?.plannedMeals?.length>0)&&this._mealsCarouselWrapperService.hideCarousel(this.wrapper),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setP13nExperimentExposure(t,"recipe")}),(e=>{this._mealsCarouselWrapperService.hideCarousel(this.wrapper)}))}checkPlannedMealsResponse(e){let t=e.filter((e=>e.id&&e.thumbnailImageUrl&&e.title&&e.variantId));!t?.length&&this._mealsCarouselWrapperService.hideCarousel(this.wrapper),t?.length&&(this.showCarousel=!0,this.meals=t)}updateAnalyticsRecipeCount(e){window.eddlLoadComplete&&window.AB.DATALAYER.searchResultsCarou
1selsProductCount(0,e,"recipe-carousel")}trackViewAll(e){window.eddlLoadComplete&&window.AB.DATALAYER.setLinkClickViewAll({linkTarget:this.mealsCtaUrl,carouselTitle:this.carousel?.title,event:e})}onPrevBtn(){this.setAdaAnnouncement("Previous set of items shown")}onNextBtn(){this.setAdaAnnouncement("Next set of items shown")}setAdaAnnouncement(e){clearTimeout(this.announcementTimeout),this.isAdaAnnouncementEnabled=!0,setTimeout((()=>{this.adaAnnouncement=e}),100),this.announcementTimeout=setTimeout((()=>{this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1}),500)}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Mpe),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["meals-carousel-wrapper"]],decls:2,vars:5,consts:[["redesignTitle",""],["redesignHeader",""],[3,"ngClass"],[4,"ngIf"],["class","carousel-nav__header-title color-neutral-90",4,"ngIf","ngIfElse"],[1,"meals-carousel-header-cta"],[4,"ngIf","ngIfElse"],[3,"pageName","meals","carouselTitle","isPlannedMeals","isMealCarouselRedesignDisabled","carouselBehaviour"],[1,"carousel-nav__header-title","color-neutral-90"],["role","heading",1,"planned-meals-module__title","color-neutral-90"],[1,"meals-carousel-header-text"],[3,"ngClass","data-qa"],["class","col-12",3,"ngClass",4,"ngIf"],["role","button",1,"meals-nav-link",3,"click","title","href"],["id","mealsCarouselHeaderLink","class","meals-carousel-header-cta-text",4,"ngIf"],[1,"col-12",3,"ngClass"],["role","nav-link",1,"text-capitalize","nav-link",3,"click","ngClass","data-qa","href"],["id","mealsCarouselHeaderLink",1,"meals-carousel-header-cta-text"],[1,"sr-only"],[1,"carousel-nav__controls-wrapper","d-flex","align-items-center"],["class","link-sm links__action mr-3","role","nav-link",3,"ngClass","data-qa","href","click",4,"ngIf"],["class","link-sm links__action mr-3","role","button",3,"ngClass","title","href","click",4,"ngIf"],["type","button","aria-label","View previous items",1,"btn","slick-redesign-prev","btn-secondary","btn-circle--md","mr-3",3,"click"],[1,"svg-icon","svg-btn-slick-prev"],["type","button","aria-label","View next items",1,"btn","slick-redesign-next","btn-secondary","btn-circle--md",3,"click"],[1,"svg-icon","svg-btn-slick-next"],["role","status","aria-atomic","true","aria-live","assertive","class","sr-only",4,"ngIf"],["role","nav-link",1,"link-sm","links__action","mr-3",3,"click","ngClass","data-qa","href"],["role","button",1,"link-sm","links__action","mr-3",3,"click","ngClass","title","href"],["role","status","aria-atomic","true","aria-live","assertive",1,"sr-only"]],template:function(e,t){1&e&&(kf(0,"div",2),ph(1,Ehe,10,15,"ng-container",3),xf()),2&e&&(zh("ngClass",Bm(2,hhe,"true"!==t.carousel.isPlannedMeals,"true"===t.carousel.isPlannedMeals)),Vd(),zh("ngIf",t.showCarousel))},dependencies:[sy,cy,phe],encapsulation:2})}}return e})(),Ohe=["zone"];function Bhe(e,t){if(1&e&&Tf(0,"div",1,0),2&e){zh("id",Yf().zoneId)}}var Mhe=(()=>{class e{constructor(e){this._zoneRendererService=e,this.componentType="",this.componentData=null,this.zoneId=""}ngAfterViewInit(){if(!this.zoneRef?.nativeElement||!this.componentData||"gridRow"!==this.componentType&&"gridRowWithFacets"!==this.componentType);else{let e={items:[this.componentData]},t="gridRowWithFacets"===this.componentType;this._zoneRendererService.renderGridZone(this.zoneRef.nativeElement,e,t)}}static{this.ɵfac=function(t){return new(t||e)($d(Xw))}}static{this.ɵcmp=Qr({type:e,selectors:[["zone"]],viewQuery:function(e,t){if(1&e&&tm(Ohe,5),2&e){let e;im(e=nm())&&(t.zoneRef=e.first)}},inputs:{componentType:"componentType",componentData:"componentData",zoneId:"zoneId"},decls:1,vars:1,consts:[["zone",""],[3,"id"]],template:function(e,t){1&e&&ph(0,Bhe,2,1,"div",1),2&e&&yf("gridRow"===t.componentType||"gridRowWithFacets"===t.componentType?0:-1)},encapsulation:2})}}return e})(),Rhe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),Lhe=["sortDropdownItemContainer"],Fhe=["themeBuilderEnabledTemplate"],Nhe=["defaultTemplate"],Uhe=["DSTV2Template"],Vhe=["sortId"],qhe=e=>({"dropdown-item":!0,"filter-selected-link":e}),$he=e=>({"sort-ui__dropdown-anchor":!0,"dropdown-item":!0,"filter-selected-link":e});function jhe(e,t){if(1&e){let e=Mf();kf(0,"li",14)(1,"a",15),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Zf("id","sortRule-",i,""),zh("ngClass",Om(6,qhe,n.activeSortRule&&n.activeSortRule.label===e.label)),gh("aria-current",!!e.selected||null)("aria-label",e.label),Vd(),lm(e.label)}}function zhe(e,t){if(1&e&&(kf(0,"div",5,4)(2,"div",6)(3,"button",7)(4,"p",8)(5,"span",9),am(6,"Sort "),xf(),kf(7,"span",10),am(8),xf(),Tf(9,"span",11),xf()(),kf(10,"ul",12),ph(11,jhe,3,8,"li",13),xf()()()),2&e){let e=Yf();Vd(3),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(5),cm(" (",e.activeSortRule?e.activeSortRule.label:"",")"),Vd(3),zh("ngForOf",e.sortRules)}}function Whe(e,t){if(1&e){let e=Mf();kf(0,"li",24)(1,"a",15),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Zf("id","sortRule-",i,""),zh("ngClass",Om(6,$he,n.activeSortRule&&n.activeSortRule.label===e.label)),gh("aria-current",!!e.selected||null)("aria-label",e.label),Vd(),lm(e.label)}}function Hhe(e,t){if(1&e&&(kf(0,"div",16,4)(2,"button",17)(3,"p",18)(4,"span",19),am(5,"Sort by "),xf(),kf(6,"span",20),am(7),xf(),Tf(8,"span",21),xf()(),kf(9,"ul",22),ph(10,Whe,3,8,"li",23),xf()()),2&e){let e=Yf();Vd(2),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(5),cm(" ",e.activeSortRule?e.activeSortRule.label:"",""),Vd(3),zh("ngForOf",e.sortRules)}}function Yhe(e,t){if(1&e){let e=Mf();kf(0,"li",14)(1,"a",30),jf("click",(function(){let t=Wa(e).$implicit;return Ha(Yf(2).doSortEmitter(t))})),am(2),xf()()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2);Vd(),Ch("aria-label","",e.label," ",i+1," of ",null==n.sortRules?null:n.sortRules.length,""),Zf("id","sortRule-",i,""),gh("aria-current",!!e.selected||null),Vd(),lm(e.label)}}function Ghe(e,t){if(1&e&&(kf(0,"div",25,4)(2,"div",26)(3,"button",27)(4,"span",9),am(5,"Sort by "),xf(),kf(6,"span",28),am(7),xf()(),kf(8,"ul",29),ph(9,Yhe,3,8,"li",13),xf()()()),2&e){let e=Yf();Vd(3),_h("aria-activedescendent","sortRule-",e.selectedSortRuleIndex,""),gh("aria-expanded",e.arriaExpanded)("data-active-id",e.selectedSortRuleIndex),Vd(4),cm(" ",e.activeSortRule?e.activeSortRule.label:"",""),Vd(2),zh("ngForOf",e.sortRules)}}var Khe=(()=>{class e{constructor(e,t){this.rd=e,this._commonService=t,this.activeSortRuleEmitter=new _l,this.arriaExpanded=!1,this.defaultSorted=!1,this.sortByComponent=function(){let e=$(".dropdown-sort-by.dropdown");$(".sort-by-text").focusout((function(){$(this).css("outline","none")})),e.on("hidden.bs.dropdown",(function(e){e.preventDefault(),setTimeout((function(){$("#sortByID").focus()}),300)})),$("div.cfh-banner.cfh-banner__search").length>0&&$("#filterMV").addClass("showPromo"),$(document).not(".squaredThree").on("click","label",(function(e){$(this).css("outline","none")})),$(".label-more").on("click",(function(e){$(this).prev().children(":eq(5)").children("label").css("outline","none")}))},this.isThemeBuilderEnabled=window.SWY.CONFIGSERVICE.isThemeBuilderEnabled,this.enableDstV2Theme=this._commonService.hasPageV2Theme(
1)}doSortEmitter(e){this.activeSortRule=e,this.activeSortRuleEmitter.emit(this.activeSortRule),window.AB.DATALAYER&&this.activeSortRule&&this.activeSortRule.label&&window.AB.DATALAYER.sortBy(this.activeSortRule.label)}ngOnChanges(e){e.activeSortRule&&this.sortRules.forEach(((e,t)=>{this.activeSortRule&&e.field===this.activeSortRule.field?(this.selectedSortRuleIndex=t,e.selected=!0,this.defaultSorted=!0):e.selected=null}))}ngAfterViewInit(){this.sortByComponent()}ngOnInit(){this.loadSortDropdownItemContainer()}loadSortDropdownItemContainer(){switch(!0){case this.enableDstV2Theme:this.sortDropdownItemContainer.createEmbeddedView(this.DSTV2Template);break;case this.isThemeBuilderEnabled:this.sortDropdownItemContainer.createEmbeddedView(this.themeBuilderEnabledTemplate);break;default:this.sortDropdownItemContainer.createEmbeddedView(this.defaultTemplate)}}removeVowels(e){return e.toLowerCase().replace(/ /g,"").replace(/[aeiou]/g,"")}static{this.ɵfac=function(t){return new(t||e)($d(dp),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["sort-by"]],viewQuery:function(e,t){if(1&e&&(tm(Lhe,7,yp),tm(Fhe,7,Yu),tm(Nhe,7,Yu),tm(Uhe,7,Yu),tm(Vhe,7)),2&e){let e;im(e=nm())&&(t.sortDropdownItemContainer=e.first),im(e=nm())&&(t.themeBuilderEnabledTemplate=e.first),im(e=nm())&&(t.defaultTemplate=e.first),im(e=nm())&&(t.DSTV2Template=e.first),im(e=nm())&&(t.el=e.first)}},inputs:{sortRules:"sortRules",activeSortRule:"activeSortRule"},outputs:{activeSortRuleEmitter:"activeSortRuleEmitter"},features:[ga],decls:8,vars:0,consts:[["sortDropdownItemContainer",""],["defaultTemplate",""],["themeBuilderEnabledTemplate",""],["DSTV2Template",""],["sortId",""],["role","region","aria-label","Sort by",1,"sort-by-wrapper","card"],[1,"dropdown","dropdown-sort-by","card-header"],["type","button","id","sortByID","data-toggle","dropdown","aria-haspopup","true","data-qa","srt-ptns-dflt"],[1,"sort-by-text"],[1,"float-left"],[1,"d-none","d-lg-block","float-left"],[1,"svg-icon","svg-icon-sort-by-caret","svg-icon-Arrow_down_black"],["aria-labelledby","sortByID","role","menu",1,"dropdown-menu","card-body","dropdown-menu-sort-mobile"],["role","none",4,"ngFor","ngForOf"],["role","none"],["href","#","onClick","return false;","role","menuitem","tabindex","-1","data-qa","srt-ptns",3,"click","ngClass","id"],["role","region","aria-label","Sort by",1,"sort-ui","dropdown","dropdown-sort-by"],["type","button","id","sortByID","data-toggle","dropdown","aria-haspopup","true","data-qa","srt-ptns-dflt",1,"sort-ui__sort-btn"],[1,"sort-ui__text-container"],[1,"sort-ui__default-text"],[1,"sort-ui__strategy","d-none","d-lg-inline-block"],[1,"sort-ui__icon","svg-caret-down"],["aria-labelledby","sortByID","role","menu",1,"sort-ui__dropdown","dropdown-menu","dropdown-menu-sort-mobile"],["role","none","class","sort-ui__dropdown-item",4,"ngFor","ngForOf"],["role","none",1,"sort-ui__dropdown-item"],[1,"dropdown-sort-by","sort-by-wrapper","card"],[1,"dropdown","sort-dropdown"],["type","button","id","sortDropdown","data-toggle","dropdown","role","button","aria-haspopup","true","aria-controls","sortDropdownMenu","data-qa","srt-ptns-dflt",1,"btn","btn-secondary","sort-dropdown__btn"],[1,"d-lg-block","float-left"],["id","sortDropdownMenu","role","menu","aria-label","Sort",1,"dropdown-menu","sort-dropdown__wrapper"],["role","menuitem","href","javascript:void(0);","data-qa","srt-ptns",1,"dropdown-item",3,"click","id"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,zhe,12,6,"ng-template",null,1,Wm)(4,Hhe,11,6,"ng-template",null,2,Wm)(6,Ghe,10,6,"ng-template",null,3,Wm))},dependencies:[sy,oy],encapsulation:2})}}return e})(),Qhe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),Jhe=["productGridItemContainer"],Zhe=["DSTV2Template"],Xhe=["genericProductCardTemplate"],efe=e=>({"has-tooltip":e}),tfe=e=>({"mb-3":e}),ife=e=>({"product-title--disabled":e}),nfe=e=>({show:e}),rfe=()=>({"qsc-qty-stepper-v3":!0}),sfe=()=>({"qsc-dropdown-v2":!0});function afe(e,t){1&e&&(Ef(0),kf(1,"div",22),am(2,"Buy it Again"),xf(),Df())}function ofe(e,t){if(1&e&&(kf(0,"div",23),Tf(1,"div",24),kf(2,"div",25),am(3),xf()()),2&e){let e=Yf(2);Vd(3),lm(e.product.fullName)}}function lfe(e,t){if(1&e&&(Ef(0),kf(1,"div",26)(2,"span"),am(3,"SNAP"),xf(
1)(),Df()),2&e){let e=Yf(2);Vd(),zh("ngClass",Om(1,tfe,e.product.displayEstimateText))}}function cfe(e,t){if(1&e&&(Ef(0),kf(1,"span",27),am(2),xf(),Df()),2&e){let e=Yf(2);Vd(2),cm(" ",e.product.displayEstimateText," ")}}function dfe(e,t){1&e&&(Ef(0),kf(1,"span",28),Tf(2,"span",29),xf(),Df())}function ufe(e,t){if(1&e&&(kf(0,"span",37),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(3);Vd(),cm(" / ",e.isLBProduct()?$m(2,1,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function pfe(e,t){if(1&e&&(kf(0,"span",37),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(3);Vd(),dm(" / ",e.product.averageWeightStr," ",e.isLBProduct()?$m(2,2,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function hfe(e,t){if(1&e&&(kf(0,"del",38)(1,"span",33),am(2,"Original Price"),xf(),am(3),qm(4,"currency"),xf()),2&e){let e=Yf(3);Vd(3),cm(" ",jm(4,1,e.product.basePrice,"USD")," ")}}function ffe(e,t){if(1&e&&(Ef(0),kf(1,"div",30)(2,"div",31)(3,"span",32)(4,"span",33),am(5,"Your Price"),xf(),am(6),qm(7,"currency"),ph(8,ufe,3,3,"span",34)(9,pfe,3,4,"span",34),kf(10,"span",35),am(11),xf()(),ph(12,hfe,5,4,"del",36),xf()(),Df()),2&e){let e=Yf(2);Vd(3),Jf("id","pg"+e.product.id+"price"),Vd(3),cm(" ",jm(7,6,e.validPrice,"USD")," "),Vd(2),zh("ngIf",(e.product.displayUnitQuantityText||e.isLBProduct())&&1===e.product.averageWeight),Vd(),zh("ngIf",(e.product.displayUnitQuantityText||e.isLBProduct())&&e.product.averageWeight<1&&e.product.averageWeight>0),Vd(2),lm(e.isLBProduct()?"lb":"each"),Vd(),zh("ngIf",e.product.showStrikeThrough)}}function mfe(e,t){if(1&e&&(kf(0,"div",39),Tf(1,"div",40),kf(2,"div",41),am(3),xf()()),2&e){let e=Yf(2);Vd(3),lm(e.product.fullName)}}function gfe(e,t){if(1&e&&(kf(0,"div",44)(1,"span",45),am(2),qm(3,"currency"),qm(4,"titlecase"),xf(),kf(5,"span",33),am(6),qm(7,"currency"),qm(8,"titlecase"),xf()()),2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"unitPer"),Vd(2),dm("(",jm(3,5,e.product.pricePer,"USD")," / ",$m(4,8,e.product.unitQuantity),")"),Vd(4),dm("(",jm(7,10,e.product.pricePer,"USD")," per ",$m(8,13,e.product.unitQuantity),")")}}function bfe(e,t){1&e&&(Ef(0),kf(1,"div",46),am(2,"Sponsored"),xf(),Df())}function yfe(e,t){if(1&e&&(kf(0,"div",42),ph(1,gfe,9,15,"div",43)(2,bfe,3,0,"ng-container",9),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.isLBProduct()),Vd(),zh("ngIf",e.sponsoredProduct)}}function vfe(e,t){if(1&e){let e=Mf();kf(0,"div",49)(1,"div",50),Tf(2,"span",51),kf(3,"span",33),am(4,"Sorry"),xf(),kf(5,"div",52)(6,"span",33),am(7),xf(),am(8),xf()(),kf(9,"a",53),jf("click",(function(){return Wa(e),Ha(Yf(3).analyticsSimilarItemsCTA())})),am(10,"View similar items"),xf()()}if(2&e){let e=Yf(3);zh("ngClass",e.isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar"),Vd(7),lm(e.product.name),Vd(),cm(" ",e.product.itemNotAvailableTxt," "),Vd(),Jf("title",e.product.name),Zf("href","/bin/safeway/product/similar?aisleId=",e.product.aisleId,"",id)}}function wfe(e,t){1&e&&(Ef(0),kf(1,"p",54),am(2," This item is only available in-store. "),xf(),Df())}function _fe(e,t){if(1&e&&(kf(0,"div",49)(1,"span"),am(2,"Available only with Attended Delivery"),xf()()),2&e){zh("ngClass",Yf(3).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function Sfe(e,t){if(1&e&&(kf(0,"p",55),am(1),xf()),2&e){let e=Yf(3);Zf("id","pg",e.product.id,""),zh("ngClass",e.isAnyProductHasAddlInfo?"product-card-container__mto-message--with-ar":""),Vd(),cm(" ",e.product.mtoText," ")}}function Cfe(e,t){if(1&e&&ph(0,vfe,11,6,"div",47)(1,wfe,3,0,"ng-container",9)(2,_fe,3,1,"div",47)(3,Sfe,2,4,"p",48),2&e){let e=Yf(2);zh("ngIf",!e.itemAvailable),Vd(),zh("ngIf",e.itemAvailable&&!e.product.disableInStoreUICheck),Vd(),zh("ngIf",e.unAttendDeliveryFlag&&e.product.restrictedValue>0&&!e.itemAvailable),Vd(),zh("ngIf",e.product.isMtoProduct&&e.product.mtoText)}}function Ife(e,t){if(1&e){let e=Mf();kf(0,"div",49)(1,"div")(2,"button",57),jf("click",(function(){return Wa(e),Ha(Yf(3).viewSimilarClick())})),am(3,"View Similar"),xf()()()}if(2&e){zh("ngClass",Yf(3).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function Afe(e,t){if(1&e&&(kf(0,"div",58)(1,"span",33),am(2),xf(),kf(3,"span"),am(4),xf()()),2&e){let e=Yf(3);Vd(2),lm(e.product.name),Vd(2),cm(" ",e.product.itemNotAvailableTxt," ")}}function kfe(e,t){1&e&&(Ef(0),kf(1,"p",54),am(2," This item is only available in-store. "),xf(),Df())}function xfe(e,t){if(1&e&&(kf(0,"div",49)(1,"span"),am(2,"Available only with Attended Delivery"),xf()()),2&e){zh("ngClass",Yf(3).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function Tfe(e,t){if(1&e&&(kf(0,"p",55),am(1),xf()),2&e){let e=Yf(3);Zf("id","pg",e.product.id,""),zh("ngClass",e.isAnyProductHasAddlInfo?"product-card-container__mto-message--with-ar":""),Vd(),cm(" ",e.product.mtoText," ")}}function Pfe(e,t){if(1&e&&(Ef(0),ph(1,Ife,4,1,"div",47)(2,Afe,5,2,"div",56)(3,kfe,3,0,"ng-container",9)(4,xfe,3,1,"div",47)(5,Tfe,2,4,"p",48),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.itemAvailable),Vd(),zh("ngIf",!e.itemAvailable),Vd(),zh("ngIf",e.itemAvailable&&!e.product.disableInStoreUICheck),Vd(),zh("ngIf",e.unAttendDeliveryFlag&&e.product.restrictedValue>0&&!e.itemAvailable),Vd(),zh("ngIf",e.product.isMtoProduct&&e.product.mtoText)}}function Efe(e,t){1&e&&Of(0)}function Dfe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"quantity-stepper-al-v1",59),jf("removePastPurchasesEmitter",(function(t){return Wa(e),Ha(Yf(2).onRemovedItem(t))})),xf(),Df()}if(2&e){let e=Yf(2);Vd(),Zf("id","pg",e.product.id,"-qty"),zh("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("crossSellEnabled",e.crossSell)("crossSellType",e.crossSellType)("calledBy",e.stepperCalledBy)("configObj",e.configObj)}}function Ofe(e,t){if(1&e&&(Ef(0),Tf(1,"quantity-dropdown-al-v1",60),Df()),2&e){let e=Yf(2);Vd(),zh("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("noWeightModal",!0)}}function Bfe(e,t){if(1&e&&(Ef(0),kf(1,"div",61)(2,"div",27),am(3,"Sold & shipped by"),xf(),kf(4,"a",62),am(5),xf()(),Df()),2&e){let e=Yf(2);Vd(4),gh("href",e.sellerLandingPath,id),Vd(),lm(e.product.sellerName)}}function Mfe(e,t){if(1&e){let e=Mf();kf(0,"div",7)(1,"div",8),jf("click",(function(){return Wa(e),Ha(Yf().setProductDetails())})),ph(2,afe,3,0,"ng-container",9),kf(3,"div",10)(4,"a",11),jf("click",(function(){Wa(e);let t=Yf();return t.setPfmDetailProduct(),t.sendAdIdClickEvent(),Ha(t.onProductClicked())})),kf(5,"picture"),Tf(6,"source",12)(7,"source",12)(8,"img",13),xf()(),ph(9,ofe,4,1,"div",14),xf(),kf(10,"div",15),ph(11,lfe,4,3,"ng-container",9)(12,cfe,3,1,"ng-container",9)(13,dfe,3,0,"ng-container",9),xf(),ph(14,ffe,13,9,"ng-container",9),kf(15,"div",16)(16,"div",17)(17,"a",18),jf("click",(function(){Wa(e);let t=Yf();return t.setPfmDetailProduct(),t.sendAdIdClickEvent(),Ha(t.onProductClicked())}
1)),am(18),xf(),ph(19,mfe,4,1,"div",19),xf(),ph(20,yfe,3,2,"div",20)(21,Cfe,4,4,"ng-template",null,3,Wm)(23,Pfe,6,5,"ng-container",21)(24,Efe,1,0,"ng-container",9),xf(),ph(25,Dfe,2,8,"ng-container",9)(26,Ofe,2,3,"ng-container",9),xf(),ph(27,Bfe,6,2,"ng-container",9),xf()}if(2&e){let e=sm(22),t=Yf();Vd(),Kh("product-item-"+t.product.id),Vd(),zh("ngIf",t.pastPurchased),Vd(),zh("ngClass",Om(37,efe,(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60)),Vd(),Jf("id","pg"+t.product.id+"Img"),gh("data-bpn",t.product.id)("href",t.getProductDetailPath(),id),Vd(),Kh(t.bgImgOpaque),Vd(),Zf("media","(max-width: ",t.sm,")"),Jf("srcset",t.getImageUrl(t.product.id,"mobile")),Vd(),Zf("media","(max-width: ",t.md,")"),Jf("srcset",t.getImageUrl(t.product.id,"tablet")),Vd(),Jf("src",t.getImageUrl(t.product.id,"desktop"),id),Jf("alt",t.product.name),Vd(),zh("ngIf",(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60),Vd(2),zh("ngIf",t.product.snapEligible),Vd(),zh("ngIf",t.product.displayEstimateText),Vd(),zh("ngIf",t.showPCReview(t.product)),Vd(),zh("ngIf",t.itemAvailable),Vd(2),zh("ngClass",Om(39,efe,(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60)),Vd(),Jf("id","pg"+t.product.id),gh("data-bpn",t.product.id)("href",t.getProductDetailPath(),id),Vd(),lm(t.product.name),Vd(),zh("ngIf",(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60),Vd(),zh("ngIf",t.itemAvailable),Vd(3),zh("ngIf",t.enableOOSReDesign)("ngIfElse",e),Vd(),zh("ngIf",t.productCouponV2Visible),Vd(),zh("ngIf",t.itemAvailable&&t.product.disableInStoreUICheck&&(!t.unAttendDeliveryFlag||0===t.product.restrictedValue)&&!t.isLBProduct()),Vd(),zh("ngIf",t.itemAvailable&&t.product.disableInStoreUICheck&&(!t.unAttendDeliveryFlag||0===t.product.restrictedValue)&&t.isLBProduct()),Vd(),zh("ngIf",t.product.sellerId&&t.product.sellerName)}}function Rfe(e,t){1&e&&(Ef(0),kf(1,"div",22),am(2,"Buy it Again"),xf(),Df())}function Lfe(e,t){if(1&e&&(Ef(0),ph(1,Rfe,3,0,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.pastPurchased)}}function Ffe(e,t){if(1&e){let e=Mf();kf(0,"a",11),jf("click",(function(){Wa(e);let t=Yf(3);return t.setPfmDetailProduct(),t.sendAdIdClickEvent(),Ha(t.onProductClicked())})),kf(1,"picture"),Tf(2,"source",12)(3,"source",12)(4,"img",66),xf()()}if(2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Img"),gh("data-bpn",e.product.id)("href",e.getProductDetailPath(),id),Vd(),Kh(e.bgImgOpaque),Vd(),Zf("media","(max-width: ",e.sm,")"),Jf("srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),Zf("media","(max-width: ",e.md,")"),Jf("srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),Jf("src",e.getImageUrl(e.product.id,"desktop"),id),Jf("alt",e.product.name)}}function Nfe(e,t){if(1&e&&(kf(0,"div",67)(1,"picture"),Tf(2,"source",68)(3,"source",68)(4,"img",69),xf()()),2&e){let e=Yf(3);Jf("id","pg"+e.product.id+"Img"),gh("data-bpn",e.product.id),Vd(),Kh(e.bgImgOpaque),Vd(),Zf("media","(max-width: ",e.sm,")"),gh("data-srcset",e.getImageUrl(e.product.id,"mobile")),Vd(),Zf("media","(max-width: ",e.md,")"),gh("data-srcset",e.getImageUrl(e.product.id,"tablet")),Vd(),Jf("alt",e.product.name),gh("data-src",e.getImageUrl(e.product.id,"desktop"))}}function Ufe(e,t){if(1&e&&(kf(0,"div",23),Tf(1,"div",24),kf(2,"div",25),am(3),xf()()),2&e){let e=Yf(4);Vd(3),lm(e.product.fullName)}}function Vfe(e,t){if(1&e&&(Ef(0),ph(1,Ufe,4,1,"div",14),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",(null==e.product||null==e.product.fullName?null:e.product.fullName.length)>60)}}function qfe(e,t){if(1&e&&(Ef(0),kf(1,"div",10),ph(2,Ffe,5,14,"a",64)(3,Nfe,5,13,"div",65)(4,Vfe,2,1,"ng-container",9),xf(),Df()),2&e){let e=Yf(2);Vd(),zh("ngClass",Om(4,efe,(null==e.product||null==e.product.fullName?null:e.product.fullName.length)>60)),Vd(),zh("ngIf","1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(),zh("ngIf","1P_SNS"===(null==e.configObj?null:e.configObj.programType)),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.title)}}function $fe(e,t){if(1&e&&(Ef(0),kf(1,"div",70)(2,"span"),am(3,"SNAP"),xf(
1)(),Df()),2&e){let e=Yf(2);Vd(),zh("ngClass",Om(1,tfe,(null==e.displayableElements?null:e.displayableElements.estimateLabel)&&e.itemAvailable&&!e.isLBProduct()&&e.validPrice>0&&e.product.displayEstimateText))}}function jfe(e,t){if(1&e&&(kf(0,"span",27),am(1),xf()),2&e){let e=Yf(3);Vd(),cm(" ",e.product.displayEstimateText," ")}}function zfe(e,t){if(1&e&&(Ef(0),ph(1,jfe,2,1,"span",71),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.itemAvailable&&!e.isLBProduct()&&e.validPrice>0&&e.product.displayEstimateText)}}function Wfe(e,t){if(1&e&&(kf(0,"span",28),Tf(1,"span",29),kf(2,"span",73),am(3),xf(),kf(4,"span",33),am(5),xf()()),2&e){let e=Yf(3);Vd(3),lm(null==e.product||null==e.product.productReview?null:e.product.productReview.avgRating),Vd(2),cm("Rating ",null==e.product||null==e.product.productReview?null:e.product.productReview.avgRating," out of 5 stars")}}function Hfe(e,t){if(1&e&&(Ef(0),ph(1,Wfe,6,2,"span",72),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.showPCReview(e.product))}}function Yfe(e,t){if(1&e&&(kf(0,"span",37),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(4);Vd(),cm(" / ",e.isLBProduct()?$m(2,1,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Gfe(e,t){if(1&e&&(kf(0,"span",37),am(1),qm(2,"lowercase"),xf()),2&e){let e=Yf(4);Vd(),dm(" / ",e.product.averageWeightStr," ",e.isLBProduct()?$m(2,2,e.product.unitQuantity):e.product.displayUnitQuantityText,"")}}function Kfe(e,t){if(1&e&&(kf(0,"del",38)(1,"span",33),am(2,"Original Price"),xf(),am(3),qm(4,"currency"),xf()),2&e){let e=Yf(4);Vd(3),cm(" ",jm(4,1,e.product.basePrice,"USD")," ")}}function Qfe(e,t){if(1&e&&(Ef(0),kf(1,"div",30)(2,"div",31)(3,"span",32)(4,"span",33),am(5,"Your Price"),xf(),am(6),qm(7,"currency"),ph(8,Yfe,3,3,"span",34)(9,Gfe,3,4,"span",34),kf(10,"span",35),am(11),xf()(),ph(12,Kfe,5,4,"del",36),xf()(),Df()),2&e){let e=Yf(3);Vd(3),Jf("id","pg"+e.product.id+"price"),Vd(3),cm(" ",jm(7,6,e.validPrice,"USD")," "),Vd(2),zh("ngIf",(e.product.displayUnitQuantityText||e.isLBProduct())&&1===e.product.averageWeight),Vd(),zh("ngIf",(e.product.displayUnitQuantityText||e.isLBProduct())&&e.product.averageWeight<1&&e.product.averageWeight>0),Vd(2),lm(e.isLBProduct()?"lb":"each"),Vd(),zh("ngIf",e.product.showStrikeThrough)}}function Jfe(e,t){if(1&e&&(Ef(0),ph(1,Qfe,13,9,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.itemAvailable)}}function Zfe(e,t){if(1&e){let e=Mf();kf(0,"a",18),jf("click",(function(){Wa(e);let t=Yf(3);return t.setPfmDetailProduct(),t.sendAdIdClickEvent(),Ha(t.onProductClicked())})),am(1),xf()}if(2&e){let e=Yf(3);Jf("id","pg"+e.product.id),gh("data-bpn",e.product.id)("href",e.getProductDetailPath(),id),Vd(),cm(" ",e.product.name," ")}}function Xfe(e,t){if(1&e&&(kf(0,"span",77),am(1),xf()),2&e){let e=Yf(3);Jf("id","pg"+e.product.id),gh("data-bpn",e.product.id),Vd(),cm(" ",e.product.name," ")}}function eme(e,t){if(1&e&&(kf(0,"div",39),Tf(1,"div",40),kf(2,"div",41),am(3),xf()()),2&e){let e=Yf(3);Vd(3),lm(e.product.fullName)}}function tme(e,t){if(1&e&&(kf(0,"div",44)(1,"span",45),am(2),qm(3,"currency"),qm(4,"titlecase"),xf(),kf(5,"span",33),am(6),qm(7,"currency"),qm(8,"titlecase"),xf()()),2&e){let e=Yf(4);Jf("id","pg"+e.product.id+"unitPer"),Vd(2),dm("(",jm(3,5,e.product.pricePer,"USD")," / ",$m(4,8,e.product.unitQuantity),")"),Vd(4),dm("(",jm(7,10,e.product.pricePer,"USD")," per ",$m(8,13,e.product.unitQuantity),")")}}function ime(e,t){1&e&&(Ef(0),kf(1,"div",46),am(2,"Sponsored"),xf(),Df())}function nme(e,t){if(1&e&&(Ef(0),ph(1,ime,3,0,"ng-container",9),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.sponsoredProduct)}}function rme(e,t){if(1&e&&(kf(0,"div",42),ph(1,tme,9,15,"div",43)(2,nme,2,1,"ng-container",9),xf()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.isLBProduct()),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.sponsoredLabel)}}function sme(e,t){if(1&e){let e=Mf();kf(0,"div",49)(1,"div")(2,"button",57),jf("click",(function(){return Wa(e),Ha(Yf(4).viewSimilarClick())})),am(3,"View Similar"),xf()()()}if(2&e){zh("ngClass",Yf(4).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function ame(e,t){if(1&e&&(kf(0,"div",58)(1,"span",33),am(2),xf(),kf(3,"span",45),am(4),xf()()),2&e){let e=Yf(4);Vd(2),lm(e.product.name+" "+e.product.itemNotAvailableTxt),Vd(2),lm(e.product.itemNotAvailableTxt)}}function ome(e,t){1&e&&(Ef(0),kf(1,"p",54),am(2," This item is only available in-store. "),xf(),Df())}function lme(e,t){if(1&e&&(kf(0,"div",49)(1,"span"),am(2,"Available only with Attended Delivery"),xf()()),2&e){zh("ngClass",Yf(5).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function cme(e,t){if(1&e&&(Ef(0),ph(1,lme,3,1,"div",47),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.unAttendDeliveryFlag&&e.product.restrictedValue>0&&!e.itemAvailable)}}function dme(e,t){if(1&e&&(kf(0,"p",55),am(1),xf()),2&e){let e=Yf(5);Zf("id","pg",e.product.id,""),zh("ngClass",e.isAnyProductHasAddlInfo?"product-card-container__mto-message--with-ar":""),Vd(),cm(" ",e.product.mtoText," ")}}function ume(e,t){if(1&e&&(Ef(0),ph(1,dme,2,4,"p",48),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.product.isMtoProduct&&e.product.mtoText)}}function pme(e,t){if(1&e&&(Ef(0),ph(1,sme,4,1,"div",47)(2,ame,5,2,"div",56)(3,ome,3,0,"ng-container",9)(4,cme,2,1,"ng-container",9)(5,ume,2,1,"ng-container",9),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",!e.itemAvailable&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType)),Vd(),zh("ngIf",!e.itemAvailable),Vd(),zh("ngIf",e.itemAvailable&&!e.product.disableInStoreUICheck),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.unattendedDeliveryLabel),V
1d(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.mto)}}function hme(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",53),jf("click",(function(){return Wa(e),Ha(Yf(6).analyticsSimilarItemsCTA())})),am(2,"View similar items"),xf(),Df()}if(2&e){let e=Yf(6);Vd(),Jf("title",e.product.name),Zf("href","/bin/safeway/product/similar?aisleId=",e.product.aisleId,"",id)}}function fme(e,t){if(1&e&&(kf(0,"div",49)(1,"div",50),Tf(2,"span",51),kf(3,"span",33),am(4,"Sorry"),xf(),kf(5,"div",52)(6,"span",33),am(7),xf(),am(8),xf()(),ph(9,hme,3,3,"ng-container",9),xf()),2&e){let e=Yf(5);zh("ngClass",e.isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar"),Vd(7),lm(e.product.name),Vd(),cm(" ",e.product.itemNotAvailableTxt," "),Vd(),zh("ngIf",(null==e.displayableElements?null:e.displayableElements.viewSimilarItemsLink)&&"1P_SNS"!==(null==e.configObj?null:e.configObj.programType))}}function mme(e,t){if(1&e&&(Ef(0),ph(1,fme,10,4,"div",47),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",!e.itemAvailable)}}function gme(e,t){1&e&&(Ef(0),kf(1,"p",54),am(2," This item is only available in-store. "),xf(),Df())}function bme(e,t){if(1&e&&(Ef(0),ph(1,gme,3,0,"ng-container",9),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.itemAvailable&&!e.product.disableInStoreUICheck)}}function yme(e,t){if(1&e&&(kf(0,"div",49)(1,"span"),am(2,"Available only with Attended Delivery"),xf()()),2&e){zh("ngClass",Yf(5).isAnyProductHasAddlInfo?"item-not-available--with-addl-info":"item-not-available--with-out-ar")}}function vme(e,t){if(1&e&&(Ef(0),ph(1,yme,3,1,"div",47),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.unAttendDeliveryFlag&&e.product.restrictedValue>0&&!e.itemAvailable)}}function wme(e,t){if(1&e&&(kf(0,"p",55),am(1),xf()),2&e){let e=Yf(5);Zf("id","pg",e.product.id,""),zh("ngClass",e.isAnyProductHasAddlInfo?"product-card-container__mto-message--with-ar":""),Vd(),cm(" ",e.product.mtoText," ")}}function _me(e,t){if(1&e&&(Ef(0),ph(1,wme,2,4,"p",48),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",e.product.isMtoProduct&&e.product.mtoText)}}function Sme(e,t){if(1&e&&ph(0,mme,2,1,"ng-container",9)(1,bme,2,1,"ng-container",9)(2,vme,2,1,"ng-container",9)(3,_me,2,1,"ng-container",9),2&e){let e=Yf(3);zh("ngIf",null==e.displayableElements?null:e.displayableElements.title),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.availableInStoreLabel),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.unattendedDeliveryLabel),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.mto)}}function Cme(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"product-coupon-al-v1",78),jf("productCouponDetails",(function(t){return Wa(e),Ha(Yf(4).onProductCouponDetailsChange(t))})),xf(),Df()}if(2&e){let e=Yf(4);
1Vd(),zh("product",e.product)("couponCalledBy",e.calledBy)("showDetailsLink",!e.isScheduleAndSaveCard())("productOffers",e.productOffers)("configObj",e.configObj)}}function Ime(e,t){if(1&e&&(Ef(0),ph(1,Cme,2,5,"ng-container",9),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.productCouponV2Visible)}}function Ame(e,t){if(1&e&&(Ef(0),kf(1,"div",74)(2,"div",17),ph(3,Zfe,2,4,"a",75)(4,Xfe,2,3,"span",76)(5,eme,4,1,"div",19),xf(),ph(6,rme,3,2,"div",20)(7,pme,6,5,"ng-container",21)(8,Sme,4,4,"ng-template",null,4,Wm)(10,Ime,2,1,"ng-container",9),xf(),Df()),2&e){let e=sm(9),t=Yf(2);Vd(),zh("ngClass",Om(9,ife,"1P_SNS"===(null==t.configObj?null:t.configObj.programType))),Vd(),zh("ngClass",Om(11,efe,(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60)),Vd(),zh("ngIf","1P_SNS"!==(null==t.configObj?null:t.configObj.programType)),Vd(),zh("ngIf","1P_SNS"===(null==t.configObj?null:t.configObj.programType)),Vd(),zh("ngIf",(null==t.product||null==t.product.fullName?null:t.product.fullName.length)>60),Vd(),zh("ngIf",t.itemAvailable),Vd(),zh("ngIf",t.enableOOSReDesign)("ngIfElse",e),Vd(3),zh("ngIf",(null==t.displayableElements?null:t.displayableElements.coupons)&&"1P_SNS"!==t.configObj.programType)}}function kme(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",79)(2,"div",80)(3,"label",81)(4,"input",82),jf("keydown.enter",(function(t){return Wa(e),Ha(Yf(4).onCheckboxClick(t))}))("click",(function(t){return Wa(e),Ha(Yf(4).onCheckboxClick(t))})),xf(),kf(5,"span",83),Tf(6,"span",84),xf()()(),kf(7,"quantity-stepper-al-v1",85),jf("removePastPurchasesEmitter",(function(t){return Wa(e),Ha(Yf(4).onRemovedItem(t))}))("updateCheckboxEmitter",(function(){return Wa(e),Ha(Yf(4).onCheckboxClick())})),xf()(),Df()}if(2&e){let e=Yf(4);Vd(),zh("ngClass",e.isAnyProductHasAddlInfo?"qsc-product-card__selector-container__with-ar":"qsc-product-card__selector-container__with-out-ar"),Vd(),zh("ngClass",Om(18,nfe,e.isCheckboxChecked)),Vd(),Zf("for","pg",e.product.id,"-chk"),Vd(),Zf("id","pg",e.product.id,"-chk"),gh("aria-checked",e.isCheckboxChecked),Vd(3),Zf("id","pg",e.product.id,"-qty"),zh("ngClass",Dm(20,rfe))("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("crossSellEnabled",e.crossSell)("crossSellType",e.crossSellType)("calledBy",e.stepperCalledBy)("configObj",e.configObj)("isQscV2",!0)("isCheckboxChecked",e.isCheckboxChecked)}}function xme(e,t){if(1&e){let e=Mf();kf(0,"quantity-stepper-al-v1",59),jf("removePastPurchasesEmitter",(function(t){return Wa(e),Ha(Yf(4).onRemovedItem(t))})),xf()}if(2&e){let e=Yf(4);Zf("id","pg",e.product.id,"-qty"),zh("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("crossSellEnabled",e.crossSell)("crossSellType",e.crossSellType)("calledBy",e.stepperCalledBy)("configObj",e.configObj)}}function Tme(e,t){if(1&e&&(Ef(0),ph(1,kme,8,21,"ng-container",21)(2,xme,1,8,"ng-template",null,5,Wm),Df()),2&e){let e=sm(3),t=Yf(3);Vd(),zh("ngIf","buy-it-again-qsc"===t.calledBy)("ngIfElse",e)}}function Pme(e,t){if(1&e&&(Ef(0),ph(1,Tme,4,2,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.itemAvailable&&e.product.disableInStoreUICheck&&(!e.unAttendDeliveryFlag||0===e.product.restrictedValue)&&!e.isLBProduct())}}function Eme(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",79)(2,"div",80)(3,"label",81)(4,"input",86),jf("click",(function(t){return Wa(e),Ha(Yf(4).onCheckboxClick(t))})),xf(),kf(5,"span",83),Tf(6,"span",84),xf()()(),kf(7,"quantity-dropdown-al-v1",87),jf("updateCheckboxEmitter",(function(){return Wa(e),Ha(Yf(4).onCheckboxClick())})),xf()(),Df()}if(2&e){let e=Yf(4);Vd(),zh("ngClass",e.isAnyProductHasAddlInfo?"qsc-product-card__selector-container__with-ar":"qsc-product-card__selector-container__with-out-ar"),Vd(),zh("ngClass",Om(12,nfe,e.isCheckboxChecked)),Vd(),Zf("for","pg",e.product.id,"-chk"),Vd(),Zf("id","pg",e.product.id,"-chk"),Vd(3),zh("ngClass",Dm(14,sfe))("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("isQscV2",!0)("isCheckboxChecked",e.isCheckboxChecked)("configObj",e.configObj)}}function Dme(e,t){if(1&e&&Tf(0,"quantity-dropdown-al-v1",88),2&e){let e=Yf(4);zh("product",e.product)("isAnyProductHasAddlInfo",e.isAnyProductHasAddlInfo)("configObj",e.configObj)}}function Ome(e,t){if(1&e&&(Ef(0),ph(1,Eme,8,15,"ng-container",21)(2,Dme,1,3,"ng-template",null,6,Wm),Df()),2&e){let e=sm(3),t=Yf(3);Vd(),zh("ngIf","buy-it-again-qsc"===t.calledBy)("ngIfElse",e)}}function Bme(e,t){if(1&e&&(Ef(0),ph(1,Ome,4,2,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.itemAvailable&&e.product.disableInStoreUICheck&&(!e.unAttendDeliveryFlag||0===e.product.restrictedValue)&&e.isLBProduct())}}function Mme(e,t){if(1&e){let e=Mf();kf(0,"auto-replenishment-al-v1",90),jf("setDetailProduct",(function(){return Wa(e),Ha(Yf(4).setPfmDetailProduct())}
1)),xf()}if(2&e){let e=Yf(4);zh("product",e.product)("productDetailPath",e.productDetailPath)("calledBy","product-grid-item")("isBiaLandingPage",e.enableOOSReDesign)}}function Rme(e,t){if(1&e&&(Ef(0),ph(1,Mme,1,4,"auto-replenishment-al-v1",89),Df()),2&e){let e=Yf(3);Vd(),zh("ngIf",e.showArSubscription())}}function Lme(e,t){if(1&e&&(Ef(0),ph(1,Rme,2,1,"ng-container",9),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.product.disableInStoreUICheck&&(!e.unAttendDeliveryFlag||0===e.product.restrictedValue))}}function Fme(e,t){if(1&e&&(Ef(0),kf(1,"div",61)(2,"div",27),am(3,"Sold & shipped by"),xf(),kf(4,"a",62),am(5),xf()(),Df()),2&e){let e=Yf(2);Vd(4),gh("href",e.sellerLandingPath,id),Vd(),lm(e.product.sellerName)}}function Nme(e,t){if(1&e){let e=Mf();kf(0,"div",63)(1,"div",8),jf("click",(function(){return Wa(e),Ha(Yf().setProductDetails())})),ph(2,Lfe,2,1,"ng-container",9)(3,qfe,5,6,"ng-container",9),kf(4,"div",15),ph(5,$fe,4,3,"ng-container",9)(6,zfe,2,1,"ng-container",9)(7,Hfe,2,1,"ng-container",9),xf(),ph(8,Jfe,2,1,"ng-container",9)(9,Ame,11,13,"ng-container",9)(10,Pme,2,1,"ng-container",9)(11,Bme,2,1,"ng-container",9)(12,Lme,2,1,"ng-container",9)(13,Fme,6,2,"ng-container",9),xf()()}if(2&e){let e=Yf();zh("ngClass",!0===e.isAnyProductHasAddlInfo?"product-card-container--with-addl-info":"product-card-container--without-ar"),Vd(),Kh("product-item-"+e.product.id),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.buyItAgain),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.image),Vd(2),zh("ngIf",e.displayableElements.snapEligible&&e.product.snapEligible),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.estimateLabel),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.starRating),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.price),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.title),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.addToCart),Vd(),zh("ngIf",e.displayableElements.addToCart),Vd(),zh("ngIf",null==e.displayableElements?null:e.displayableElements.scheduleNSave),Vd(),zh("ngIf",(null==e.displayableElements?null:e.displayableElements.sellerTag)&&e.product.sellerId&&e.product.sellerName)}}function Ume(){return window}var Vme=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l,c,d){this.http=e,this._elementRef=t,this._abTestService=i,this._commonService=n,this._userInfoService=r,this._utilService=s,this._productUtilService=a,this._aemService=o,this._productFilterService=l,this.intersectionObserverService=c,this._quickAddBasketService=d,this.removedProduct=new _l,this.updateQscQtyEmitter=new _l,this.imagePath="//images.albertsons-media.com/is/image/ABS/${product.id}?$ecom-product-card-${viewport}-jpg$&defaultImage=Not_Available",this.removeProductHistory=!1,this.sm="575px",this.md="768px",this.bgImgOpaque="product-image-opaque-full",this.loadingSpinner=!1,this.isRightDrawer=!1,this.itemAvailable=!0,this.isArEnable=!1,this.userChannel="",this.productCouponV2Visible=!1,this.productOffers={},this.subscription=new Ye,this.sellerLandingPath="",this.showArSubscription=()=>this.isArEnable&&!!this.product&&this.product.isArProduct&&this._commonService.isActiveProduct(this.product),this.removeProductHistory=window.AB.removeHistoryAction&&"true"==window.AB.removeHistoryAction,this.removeProductHistoryUrl=window.AB.removeProductHistoryPath,this.attendDeliveryTxt=window.AB.attendDeliveryTxt,this.isThemeBuilderEnabled=!(!window.SWY.CONFIGSERVICE||!window.SWY.CONFIGSERVICE.isThemeBuilderEnabled),this.userChannel=this._userInfoService.getUserChannel()}set product(e){window.AB.searchRank=window.AB.searchRank+1,e.searchRank=window.AB.searchRank,e.updBtnText=e.updBtnText?e.updBtnText:"Update",e.updBtnMode=!e.updBtnMode||e.updBtnMode,e.id=e.id?e.id:e.pid?e.pid:e.itemId,e.pricePer=e.pricePer?e.pricePer:e.unitPrice,e.unitQuantity=e.unitQuantity?e.unitQuantity:e.unitOfMeasure,this._commonService.getPromoDescriptionAPI(e),this._commonService.checkStrikeThrough(e);let t=e.name||e.description;t&&this._commonService.isSeoEnabled()?this.productDetailPath=this._commonService.buildSeoPdpUrl(t,e.id):(this.productDetailPath=this._commonService.getProductDetailPath(this.configObj?.programType),this.productDetailPath&&(this.productDetailPath=this.productDetailPath.replace("(bpn)",e.id))),e.name=!e.name&&e.description?e.description:e.name,e.fullName=e.name&&e.name.length>60?e.name:e.fullName,e.name=this.addElipsis(e.name),this._product=e,this.sponsoredProduct=e.featured,this.pastPurchased=e.pastPurchased,this._filter||this._productFilterService.addDepartment(e.departmentName)}get product(){return this._product}ngOnInit(){if(this.configObj="Y"==this.product.isMarketplaceItem?{programType:"mkp"}:this.configObj,this.enableOOSReDesign="buy-it-again"==this.calledBy,this.isCheckboxChecked=!0,"buy-it-again-qsc"===this.calledBy){let e=this._quickAddBasketService.selectAllItems$.subscribe((e=>{this.isCheckboxChecked!=e&&this.toggleCheckbox()}));this.subscription.add(e),this.isCheckboxChecked=this._quickAddBasketService.isProductSelected(this.product.id)}this.isScheduleAndSaveCard()||(window.AB.arFlagLoaded?this.isArEnable=window.AB.arFlag.display:this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display})))),this.isRightDrawer=!0,this.removeProductHistory&&"historylist"===this.calledBy?this.stepperCalledBy="editpastpurchases":"historylastorder"===this.calledBy||"erumslastorder"===this.calledBy||"last-order"===this.calledBy?this.stepperCalledBy="lastorder":"crossSellComp"===this.calledBy&&(this.stepperCalledBy="crosssell"),this.enableOOSReDesign?this.itemAvailable=this._commonService.isItemAvailable_v3(this.product,this.configObj?.programType):this.itemAvailable=this._commonService.isItemAvailable_v2(this.product,this.configObj?.programType),this.productC
1ouponV2Visible=this.itemAvailable&&"c-products-by-upc-drawer"!==this.calledBy&&"s-bogo"!=this.calledBy,this.productOffers=this._commonService.getOffersByUpc(this.product,this.offers),this.itemAvailable&&(this.validPrice=this._commonService.getValidProductPrice(this._product)),("buy-it-again"===this.calledBy||"buy-it-again-qsc"===this.calledBy)&&(this.pastPurchased=!1),this.loadGridProductItem(),this._updateAnalytics(this._product),this.product.averageWeight<1&&this.product.averageWeight>0&&"ea"!==this.product.displayUnitQuantityText&&(this.product.averageWeightStr=this.product.averageWeight[0].substring(1,4)),this.setSellerLandingPath(),this.setDisplayableElements()}setSellerLandingPath(){this.configObj?.programType&&("mkp"===this.configObj.programType||"mkp-carousel"===this.configObj.programType||this.product?.isMarketplaceItem&&"Y"===this.product.isMarketplaceItem)&&(this.sellerLandingPath=this._commonService.getSellerLandingPath(this.product.sellerId))}_updateAnalyticsCTA(e){Ume().AB?.DATALAYER&&Ume().AB.DATALAYER.analyticsCTATracking("cta:global-search|"+("productCards"===e?"product-cards|see-results-on-marketplace":`internal-link|${this.product.sellerName}`))}loadGridProductItem(){if(!0===(this.configObj?.appName&&"dnf"===this.configObj?.appName))this.productGridItemContainer.createEmbeddedView(this.DSTV2Template);else this.productGridItemContainer.createEmbeddedView(this.GenericProductCardTemplate)}ngAfterViewInit(){(this.product&&this.product.adId||this.product.eventTracking)&&this.intersectionObserverService.createObserver(this._elementRef.nativeElement,this.product),window.AB.LAZYLOAD&&"function"==typeof window.AB.LAZYLOAD.init&&window.AB.LAZYLOAD.init(),"buy-it-again-qsc"===this.calledBy&&(this.checkboxInput=document.querySelector(`#pg${this.product.id}-chk`),this.checkboxInput.checked=this.isCheckboxChecked)}sendAdIdClickEvent(){this._commonService.sendSponsoredProductClickEvent(this.product,"productCardGridOrCrossSell","viewProductDetails")}onProductCouponDetailsChange(e){this.productDetails=e}setProductDetails(){localStorage.setItem("currentProduct",JSON.stringify(this.productDetails))}removeProductInHistory(e){let t=e.target||e.srcElement||e.currentTarget,i=this.product.id,n=this.product.name,r={ProductId:i};r=JSON.stringify(r),this.http.post(this.removeProductHistoryUrl,r).subscribe((e=>{e.ack||($(t).parents(".product-item-"+i).parent().remove(),this.removedProduct.emit(n))}))}getImageUrl(e,t){let i=this.imagePath;return i?i.replace("${product.id}",e).replace("${viewport}",t):""}addElipsis(e){if(e&&e.length>60){let t=(e=e.trim()).split("").filter(((e,t)=>t<30)).join(""),i=e.split("").reverse().filter(((e,t)=>t<20)).reverse().join("");e=t.trim()+"... "+i.trim()}return e}onLoadSpinner(e){this.loadingSpinner=e}onRemovedItem(e){this.removeProductInHistory(e)}onSetBgImgOpaque(e){!0===e?this.bgImgOpaque="product-image-opaque-half":!1===e&&(this.bgImgOpaque="product-image-opaque-full")}setPfmDetailProduct(e){if(window.AB?.DATALAYER){let t={isSpotlight:e,calledBy:this.calledBy,isPastPurchased:this.pastPurchased,isSponsored:this.sponsoredProduct,pathwaysWidget:this.pathwaysWidget};window.AB.DATALAYER.setPfmDetailProductItemToPDP(this._elementRef.nativeElement,this.product,t),window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|product`)}}_updateAnalytics(e){e.pastPurchased&&window.AB.DATALAYER&&window.AB.DATALAYER.setPastPurchasedImpressions("aisles")}analyticsSimilarItemsCTA(){window.AB?.DATALAYER&&window.AB.DATALAYER.analyticsCTATracking(`cta:${window.AB.DATALAYER.pathSections?.join(":")}|link|view-similar-items`)}ngOnDestroy(){this.subscription.unsubscribe()}getProductDetailPath(){if(this.configObj?.bannerDomain&&this.configObj?.appName&&"weeklyAd"===this.configObj?.appName)return this._productUtilService.getBannerDomainUrl(this.configObj)+this.productDetailPath;if(this.isScheduleAndSaveCard()||"dnf"===this.configObj?.appName)return null;{if(this.product?.name&&this._commonService.isSeoEnabled())return this._commonService.buildSeoPdpUrl(this.product.fullName||this.product.name,this.product.id);let e=this._commonService.getProductDetailPath(this.configObj?.programType);return e=e?e.replace("(bpn)",this.product.id):"",e}}onProductClicked(){this.isScheduleAndSaveCard()&&Ume().openItemDetail(this.product.id),this._aemService.getFeatureFlagByNameDisable("disableAdRelevance")||this._commonService.recordRelevanceImpression(this.product,"productCardGridOrCrossSell","viewProductDetails")}isScheduleAndSaveCard(){return"sns"===this.cardType}isLBProduct(){return"3"===this.product?.displayType&&("W"===this.product?.sellByWeight||"P"===this.product?.sellByWeight)}showPCReview(e){return"buy-it-again"!==this.calledBy&&e&&e.productReview&&"true"===e.productReview.isReviewDisplayEligible&&e.productReview.avgRating&&""!=e.productReview.avgRating&&"0.0"!=e.productReview.avgRating&&"0"!=e.productReview.avgRating&&null!=e.productReview.avgRating}
1setDisplayableElements(){let e=this.configObj?.programType?this.configObj?.programType:"abs";this.displayableElements=this._productUtilService.getProductDisplayableElementsByProgramType(e)}setQuickAddBasketSelectedProperty(e,t){this._quickAddBasketService.setQuickAddBasketSelectedProperty(e,t)}onCheckboxClick(e){if("instore"==this._userInfoService.getUserChannel())return window.rightDrawerComp.closeDrawer(),window.storeFulfillmentModal.component.setModalDisplayData(2),void e?.preventDefault();this.toggleCheckbox(),this.setQuickAddBasketSelectedProperty(this.product.id,this.isCheckboxChecked)}toggleCheckbox(){this.isCheckboxChecked=!this.isCheckboxChecked,this.checkboxInput.checked=this.isCheckboxChecked}viewSimilarClick(){if(this.calledBy&&"buy-it-again"==this.calledBy)this._commonService.showBiaLPCrossSell(this.product.id),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setViewSimilarItemsClick(this._product);else{let e="/bin/safeway/product/similar?aisleId={product.aisleId}";e=e.replace("{product.aisleId}",this.product.aisleId),window.location.href=e}}static{this.ɵfac=function(t){return new(t||e)($d(ov),$d(Vl),$d(vw),$d(Bw),$d(_w),$d(Sw),$d(Dw),$d(Cw),$d($w),$d(jw),$d(Kw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-item-al-v1"]],viewQuery:function(e,t){if(1&e&&(tm(Jhe,7,yp),tm(Zhe,7,Yu),tm(Xhe,7,Yu)),2&e){let e;im(e=nm())&&(t.productGridItemContainer=e.first),im(e=nm())&&(t.DSTV2Template=e.first),im(e=nm())&&(t.GenericProductCardTemplate=e.first)}},inputs:{calledBy:"calledBy",isAnyProductHasAddlInfo:"isAnyProductHasAddlInfo",crossSell:"crossSell",crossSellType:"crossSellType",gridSource:"gridSource",pathwaysWidget:"pathwaysWidget",cardType:"cardType",enableDstV2Theme:"enableDstV2Theme",isMarketPlaceEnabled:"isMarketPlaceEnabled",configObj:"configObj",offers:"offers",unAttendDeliveryFlag:[0,"isRestricted","unAttendDeliveryFlag"],_filter:[0,"filter","_filter"],product:[0,"data","product"]},outputs:{removedProduct:"removedProduct",updateQscQtyEmitter:"updateQscQtyEmitter"},decls:6,vars:0,consts:[["productGridItemContainer",""],["DSTV2Template",""],["genericProductCardTemplate",""],["DSTV2DefaultOOS",""],["GenericDefaultOOS",""],["defaultStepper",""],["defaultDropdown",""],[1,"product-card-container"],[3,"click"],[4,"ngIf"],[1,"product-card-container__image-container","mt-3",3,"ngClass"],["tabindex","-1",3,"click","id"],[3,"media","srcset"],["loading","lazy","data-qa","prd-itm-img",1,"product-card-container__product-image",3,"src","alt"],["class","product-item-image-tooltip",4,"ngIf"],[1,"d-flex","justify-content-start","flex-row","align-items-end"],[1,"product-title"],[1,"product-title__text",3,"ngClass"],["data-qa","prd-itm-pttl",1,"product-title__name",3,"click","id"],["class","product-item-title-tooltip",4,"ngIf"],["class","product-title__details",4,"ngIf"],[4,"ngIf","ngIfElse"],["data-qa","bia_bdg",1,"buy-it-again__badge"],[1,"product-item-image-tooltip"],[1,"product-item-image-tooltip__arrow"],[1,"product-item-image-tooltip__inner"],[1,"product-card-container__snap","product-card-container__snap--details","word-highlight-xs",3,"ngClass"],[1,"body-text-xxs"],[1,"d-flex","ml-auto"],["title","customer review star",1,"svg-star-icon"],[1,"product-card-container__details"],[1,"product-price"],["data-qa","prd-itm-prc",1,"product-price__saleprice","product-price__discounted-price",3,"id"],[1,"sr-only"],["aria-hidden","true","data-qa","qty-txt",4,"ngIf"],["data-qa","each-or-lb",1,"sr-only"],["class","product-price__baseprice","data-qa","prd-itm-prc-del",4,"ngIf"],["aria-hidden","true","data-qa","qty-txt"],["data-qa","prd-itm-prc-del",1,"product-price__baseprice"],[1,"product-item-title-tooltip"],[1,"product-item-title-tooltip__arrow"],[1,"product-item-title-tooltip__inner"],[1,"product-title__details"],["class","product-title__qty","data-qa","prd-itm-pprc-qty",3,"id",4,"ngIf"],["data-qa","prd-itm-pprc-qty",1,"product-title__qty",3,"id"],["aria-hidden","true"],["data-qa","prd-itm-spnsrd",1,"product-title__right-text"],["class","item-not-available",3,"ngClass",4,"ngIf"],["class","product-card-container__mto-message","data-qa","qty-stppr-mto",3,"id","ngClass",4,"ngIf"],[1,"item-not-available",3,"ngClass"],[1,"item-not-available__message"],["aria-hidden","true",1,"item-not-available__message__close-btn","svg-x-outline-product-card"],["data-qa","prd-itm-oos",1,"item-not-available__message__text"],["data-qa","prd-itm-vw-smlr-itms",1,"item-not-available__view-similar-items",3,"click","title","href"],[1,"product-card-container__instore-only"],["data-qa","qty-stppr-mto",1,"product-card-container__mto-message",3,"id","ngClass"],["class","product-card-container__labels",4,"ngIf"],[1,"btn","btn-secondary","bia-oos-font","btn-md","mt-3","totalWidth",3,"click"],[1,"product-card-container__labels"],[3,"removePastPurchasesEmitter","id","product","isAnyProductHasAddlInfo","crossSellEnabled","crossSellType","calledBy","configObj"],[3,"product","isAnyProductHasAddlInfo","noWeightModal"],[1,"product-card-container__seller"],[1,"link-xxs","product-card-container__seller__name"],[1,"product-card-container",3,"ngClass"],["tabindex","-1",3,"id","click",4,"ngIf"],[3,"id",4,"ngIf"],["data-qa","prd-itm-img",1,"ab-lazy","product-card-container__product-image",3,"src","alt"],[3,"id"],[3,"media"],["data-qa","prd-itm-img",1,"ab-lazy","product-card-container__product-image",3,"alt"],["id","snapLabel",1,"product-card-container__snap","product-card-container__snap--detail
1s","word-highlight-xs",3,"ngClass"],["class","body-text-xxs",4,"ngIf"],["class","d-flex ml-auto",4,"ngIf"],["aria-hidden","true",1,"star-rating"],[1,"product-title",3,"ngClass"],["class","product-title__name","data-qa","prd-itm-pttl",3,"id","click",4,"ngIf"],["class","product-title__name","data-qa","prd-itm-pttl",3,"id",4,"ngIf"],["data-qa","prd-itm-pttl",1,"product-title__name",3,"id"],[3,"productCouponDetails","product","couponCalledBy","showDetailsLink","productOffers","configObj"],[1,"qsc-product-card__selector-container",3,"ngClass"],[1,"checkbox",3,"ngClass"],["aria-label","Checkbox",1,"checkbox__group",3,"for"],["type","checkbox",1,"checkbox__input",3,"keydown.enter","click","id"],[1,"checkbox__checkmark","qsc-checkbox__checkmark"],[1,"svg-checkmark"],[3,"removePastPurchasesEmitter","updateCheckboxEmitter","ngClass","id","product","isAnyProductHasAddlInfo","crossSellEnabled","crossSellType","calledBy","configObj","isQscV2","isCheckboxChecked"],["type","checkbox","checked","isCheckboxChecked","aria-checked","true",1,"checkbox__input",3,"click","id"],[3,"updateCheckboxEmitter","ngClass","product","isAnyProductHasAddlInfo","isQscV2","isCheckboxChecked","configObj"],[3,"product","isAnyProductHasAddlInfo","configObj"],[3,"product","productDetailPath","calledBy","isBiaLandingPage","setDetailProduct",4,"ngIf"],[3,"setDetailProduct","product","productDetailPath","calledBy","isBiaLandingPage"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,Mfe,28,41,"ng-template",null,1,Wm)(4,Nme,14,15,"ng-template",null,2,Wm))},dependencies:[sy,cy,Lse,mse,Hle,ile,Sy,Iy,By],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),qme=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[Vme],imports:[Ly,qoe,cce,nle]})}}return e})(),$me=(()=>{class e{constructor(e,t,i,n){this._http=e,this._commonService=t,this._userInfoService=i,this._utilService=n,this.config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment(),this.httpOptions={headers:new jy({"ocp-apim-subscription-key":this.getSubscriptionKey(this.config[this.currentEnv])})}}getSubscriptionKey(e){let t=e?.wiremockAPIDetails,i=this._utilService.getParams("mode");return!t?.allowWiremockService||"record"!==i&&"playback"!==i?e?.searchAPIDetails?.subscriptionKey?.value:t?.subscriptionKey}getCatalogXapiProductPrice(e){let t=`${window.AB.catalogXapiProductsBpnEndpoint}?store-id=${this._userInfoService.getShopStoreId()}&includeOffer=true&bpn=${e}`;return this._http.get(t,this.httpOptions)}getCatalogXapiProductPriceByUPC(e,t,i,n,r,s,a,o){let l=`${window.AB.catalogXapiProductsUpcEndpoint}?upc=${e}&banner=${window.AB.userInfo.banner}&includeOffer=true`;if(t&&(l=`${l}&guest=${t}`),i){l=`${l}&hhid=${window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:""}`}return n&&(l=this._commonService.generateCBAUrl(l)),s&&(l=`${l}&seller-id=${s}`),r&&(l=`${l}&sellerId=${r}`),a&&o&&(l=`${l}&${a}=${o}`),window.AB.userInfo.branchId?(l=`${l}&store-id=${window.AB.userInfo.branchId}`,this._http.get(l,this.httpOptions)):fi({})}getCatalogData(e){let t="",i="",n=this.config[this.currentEnv].wiremockAPIDetails,r=n?.allowWiremockService?this._utilService.getParams("mode"):"";switch(e.apiType){case"c-bogo":case"c-club-card":default:break;case"c-virtual-shelf-general":case"c-virtual-shelf-promo":let s=e.value[e.apiType].virtualShelfId,a=window.AB.userInfo.banner;return i=e.apiUrl+"?storeId="+window.AB.userInfo.branchId+"&virtualShelfId="+s+`&banner=${a}&page=0&pageSize=999`,e?.badgePreference&&e?.badgeList&&(i=`${i}&${e.badgePreference}=${e.badgeList}`),t=this._commonService.generateCBAUrl(i),n?.allowWiremockService&&("record"===r?t=`${n?.recorderBaseUrl}${t}`:"playback"===r&&(t=`${n?.playbackBaseUrl}${t}`)),this._http.get(t,this.httpOptions);case"c-products-by-upc":case"c-products-by-upc-drawer":let o=this._userInfoService.getShopStoreId();return this._commonService.$upcs.pipe(Hi(1),Ti((i=>{if(i&&i.length>0){let s=this._userInfoService.getUserChannel(),a=this._userInfoService.getBanner(),l={ids:i,storeId:o,banner:a},c=s?f(h({},l),{channel:s}):l;return c=f(h({},c),{includeOffer:!0}),e.badgePreference&&e.badgeList&&(c[e.badgePreference]=e.badgeList),t=e.apiUrl,n?.allowWiremockService&&("record"===r?t=`${n?.recorderBaseUrl}${t}`:"playback"===r&&(t=`${n?.playbackBaseUrl}${t}`)),this._http.post(t,c,this.httpOptions).pipe($i((()=>fi({ack:!0,response:{docs:[],offersData:{}}}))))}return fi({ack:!0,response:{docs:[],offersData:{}}})})))}}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Bw),lr(_w),lr(Sw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),jme=(()=>{class e{constructor(e,t,i,n,r){this._http=e,this._productCatalogALV1Service=t,this._commonService=i,this._userInfoService=n,this._p13nEndpointService=r,this._config=Iw,this.defaultNoResultsMsg="No products available.",this.objGridData={drivenType:"",apiUrl:"",apiType:"",sorts:"",defaultSort:"",value:{},products:[],widgetId:"",badgePreference:"",badgeList:""},this._currentEnv=this._commonService.getCurrentEnviorment()}getData(){return this.hasDynamicData()&&!this.objGridData.doGenericFlow?this.getDynamicData():this.hasStaticData()?this.get
1StaticData():this.objGridData.doGenericFlow?this.getGenericData():fi({products:[],offersData:{}})}getGenericData(){let e=fi([]);if("generic"===this.objGridData.drivenType)e=this.getP13nProductsData();return e}getP13nProductsData(){let e={modelConfigurationId:this.objGridData.modelConfigurationId,uiPageSize:135,excludeCartItems:!0,excludeOOS:!0},t=this._p13nEndpointService.generateProductsRequestPayload(e);return this._p13nEndpointService.getP13nProductsRecommendation(t).pipe(bi((e=>({products:e?.productsinfo,p13nAdobeMetrics:e?.p13nAdobeMetrics,offersData:e?.offersData}))))}getDynamicData(){let e=fi([]);switch(this.objGridData.drivenType="catalog",this.objGridData.drivenType){case"catalog":e=this._productCatalogALV1Service.getCatalogData(this.objGridData);break;case"purchase":e=this.getPurchaseData(this.objGridData);break;case"relevancy":e=this.getRelevancyData();break;default:e=this.getDotNetData()}return e}getRelevancyData(){let e,t,i,n,r,s=fi({}),a="",o="https://www.safeway.com/abs/pub/xapi";switch(!0){case"similar-products"===this.objGridData.apiType:e=window.AB.COMMON.getURLParameterByName("bpn"),i=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=`${o}/pdreco/similarproducts?bpn=${e}&storeId=${i}`,r={headers:new jy({"Ocp-Apim-Subscription-Key":"7bad9afbb87043b28519c4443106db06",accept:"application/json"})};break;case"substitution"===this.objGridData.apiType:e=window.AB.COMMON.getURLParameterByName("bpn"),t=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId&&window.AB.COMMON.getURLParameterByName("hhid")?window.AB.COMMON.getURLParameterByName("hhid"):"",i=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"",a=`${o}/pdreco/substitution?bpn=${e}&storeId=${i}&hhid=${t}`,r={headers:new jy({"Ocp-Apim-Subscription-Key":"7bad9afbb87043b28519c4443106db06",accept:"application/json"})};break;case!!this.objGridData.widgetId&&!!this.objGridData.apiType:let s=window.AB.COMMON.getURLParameterByName("query"),l=window.AB.COMMON.getURLParameterByName("item_ids");a="https://pathways.dxpapi.com/api/v2/widgets/"+this.objGridData.apiType+"/"+this.objGridData.widgetId+"?_br_uid_2=uid%3D2582397584083%3Av%3D12.0%3Ats%3D1587279462499%3Ahc%3D358&account_id=6175&url=www.bloomique.com&domain_key=albertsons&request_id=1597706996821&fields=name%2CaisleId%2Cpid%2Cupc%2Cprice%2CbasePrice%2CpricePer%2Cquantity%2CquantityOrder%2CunitOfMeasure%2CpromoDescription%2CsalesRank%2CdepartmentName%2CpromoType%2CpromoTitle%2CpromoText%2CofferText%2CpromoEndDate%2CrestrictedValue&rows=30&start=0&query="+s+"&item_ids="+l,n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":"e914eec9448c4d5eb672debf5011cf8f",Authorization:"Bearer "+n,accept:"application/json"})};break;default:e=window.AB.COMMON.getURLParameterByName("bpn"),a="https://www.safeway.com/api/v1/core/Search_Results?account_id=6175&auth_key=eyxny75nafpl1ra4&domain_key=albertsons&request_id=8913801407865&_br_uid_2=uid%253D4195525208755%253Av%253D12.0%253Ats%253D1602201845750%253Ahc%253D90&url=https://www.safeway.com&ref_url=https://www.safeway.com&request_type=mlt&fl=name,aisleId,pid,upc,price,basePrice,pricePer,quantity,quantityOrder,unitOfMeasure,promoDescription,salesRank,departmentName,promoType,promoTitle,promoText,offerText,promoEndDate,restrictedValue,unitQuantity,displayEstimateText,displayUnitQuantityText&rows=12&start=0&sort=&view_id=1502&pid="+e+"&facet=false",n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":"e914eec9448c4d5eb672debf5011cf8f",Authorization:"Bearer "+n,accept:"application/json"})}}return a+="&includeOffer=true",s=this._http.get(a,r).pipe($i((()=>fi({purchases:null,offersData:{},purchasesCount:0})))),s}getPurchaseData(e){let t=fi({}),i=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],n=window.AB.userInfo.SWY_SHOP_TOKEN,r={headers:new jy({"ocp-apim-subscription-key":i,Authorization:"Bearer "+n,accept:"application/json"})},s=e.apiUrl,a=window.AB&&window.AB.userInfo&&window.AB.userInfo.branchId?window.AB.userInfo.branchId:"";if("buy-it-again"===e.apiType);else{s=`${s}/${window.AB&&window.AB.userInfo&&window.AB.userInfo.customerId?window.AB.userInfo.customerId:""}?storeId=${a}`,s=this._commonService.generateCBAUrl(s),s+="&includeOffer=true",t=this._http.get(s,r).pipe($i((e=>fi({purchases:null,purchasesCount:0,offersData:{}}))))}return t}getDotNetData(){let e=window.AB.gridDataURL;switch(this.objGridData.drivenType){case"erumslastorder":let t=window.SWY.CONFIGSERVICE.erumsConfig["orders.service.endpoint"]+"/orders/latest?includeOffer=true";return this._http.get(t,{headers:new jy(window.AB.lastOrderErumsHttpOptions)}).pipe($i((()=>fi({ack:!0,products:[],offersData:{}}))));case"search":return e=this._replaceSearchValue(e)+"&storeId="+window.AB.userInfo.branchId+"&includeOffer=true",this._http.get(e);case"bogo":case"rewardcard":break;case"promo":case"recipe":case"dynamicpromo":return e+="&storeId="+window.AB.userInfo.branchId+"&includeOffer=true",this._http.get(e);case"historylist":return e+="&rand="+Math.floor(1e6*Math.random())+"&storeId="+window.AB.userInfo.branchId+"&includeOffer=true",this._http.get(e).pipe($i((()=>fi({ack:!0,products:[],offerData:{}}))));default:return this._http.get(e)}}getAllBrands(){let e=this._replaceSearchValue(window.AB.gridDataURLNoParam);return this._http.get(e)}getStaticData(){return fi({products:this.objGridData.products,offersData:{}})}getUpdatedData(e){null!=e&&(e=e.slice(0,-2));let t=window.AB.aemAislePath+"?aisleId="+e+"&storeId="+window.AB.userInfo.branchId;return $((function(){window.AB.DATALAYER.productInfo({aisleId:e})})),this._http.get(t)}hasDynamicData(){return"static"!==this.objGridData.drivenType&&!(!window.AB.gridDataURL&&!this.objGridData.apiUrl&&"relevancy"!==this.objGridData.drivenType)}hasBrandUrl(){return window.AB.gridDataURLNoParam&&window.AB.gridDataURLNoParam.length}hasStaticData(){return this.objGridData.products.length>0}getNoResultsMsg(e){let t;switch(e){case"shelf-page":case"promo":case"rewardcard":case"bogo":case"catalog":case"erumslastorder":case"historylastorder":case"historylist":t=window.AB.errorText||this.defaultNoResultsMsg;break;case"search":t='<div class=\'no-result\'><div class=container\'><dl>\n <dd>Check for typos.</dd><dd>Be more general (e.g. "carrots" instead of "bags of carrots")</dd>\n <dd>Try looking within the aisles shown below</dd>\n </dl></div></div>';break;default:t="<span>No items are available.</span>"}return t}extractBrand(){let e=gt.create((e=>{e.next({ack:!0}),e.complete()}
1));return this.hasBrandUrl()&&(e=this.getAllBrands()),e}areAllProductsUnavailable(e){let t=!0;return!!Array.isArray(e)&&(e.forEach((e=>{0!==e.price&&(t=!1)})),t)}_replaceSearchValue(e){let t=window.AB.COMMON.getURLParameterByName("q");null==t?t="":(t=decodeURIComponent(t),t=encodeURIComponent(t)),e=e.replace(/\(searchTerm\)/g,t);let i=window.AB.COMMON.getURLParameterByName("brand");return null==i?i="":(i=decodeURIComponent(i),i=encodeURIComponent(i)),e=e.replace(/\(searchBrand\)/g,i)}getMoreSearchProducts({searchQuery:e,start:t,rows:i,fulfillmentType:n,nextPageToken:r}){let s=this._config[this._currentEnv].searchProductsAPIDetails.searchProductsAPI,a=this._config[this._currentEnv].baseURL.replace("{banner}",this._userInfoService.getBanner()),o={pageurl:a,url:a,"request-id":this._getUTCTimeStampRandom(),pagename:"search",rows:i,start:t,"search-type":"keyword",storeid:this._userInfoService.getShopStoreId(),q:e,dvid:"GhXAoLXN-ss-search",channel:n,uuid:this._userInfoService.getUUID(),featured:!1,banner:this._userInfoService.getBanner(),includeOffer:!0};r&&(o.nextPageToken=r);let l=`/${s}?${Object.keys(o).map((e=>e+"="+o[e])).join("&")}`,c={headers:new jy({"ocp-apim-subscription-key":this._config[this._currentEnv].searchProductsAPIDetails.subscriptionKey.value,accept:"application/json"})};return this._http.get(l,c).pipe(bi((e=>({products:e?.primaryProducts?.response?.docs,offers:e?.offersData,nextPageToken:e?.primaryProducts?.response?.miscInfo?.nextPageToken}))),$i((e=>mi(Error("Error in getting products")))))}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}calculateCardsPerRow(e,t){return null!==e&&null!==t?Math.round(e.offsetWidth/t.offsetWidth):0}calculateFullWidthIndices(e,t){let i=new Map;return null!=e&&t>0&&e.forEach(((e,n)=>{let r=Math.floor(n/t)+1;(n+1)%t==0&&i.set(n,r)})),i}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr($me),lr(Bw),lr(_w),lr(Qw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),zme=(()=>{class e{initRules(){return{"a-z":{field:"name",rule:[{field:"name",direction:1,type:"string"}],label:"Alphabetical A - Z",sort_at:"client"},"a-z-description":{field:"description",rule:[{field:"description",direction:-1,type:"string"}],label:"Alphabetically",sort_at:"client"},"z-a":{field:"name",rule:[{field:"name",direction:-1,type:"string"}],label:"Alphabetical Z - A",sort_at:"client"},"search-rank":{field:"searchRank",rule:[{field:"searchRank",direction:-1,type:"number"},{field:"name",direction:-1,type:"string"}],label:"Search Ranking",sort_at:"client"},"most-popular":{field:"salesRank",rule:[{field:"salesRank",direction:1,type:"number"},{field:"name",direction:1,type:"string"}],label:"Most Popular",sort_at:"client"},"price-low-high":{field:"price",rule:[{field:"price",direction:1,type:"number"},{field:"name",direction:1,type:"string"}],label:"Price - Low to High",sort_at:"client"},"purchase-history":{field:"purchaseRank",rule:[{field:"purchaseRank",direction:-1,type:"string"}],label:"Purchase History",sort_at:"client"},"new-offers":{field:"arrivalRank",rule:[{field:"arrivalRank",direction:1,type:"string"}],label:"New Offers",sort_at:"client"},"about-to-expire":{field:"expiryRank",rule:[{field:"expiryRank",direction:1,type:"string"}],label:"About to Expire",sort_at:"client"},category:{field:"categoryId",rule:[{field:"categoryId",direction:1,type:"string"}],label:"Category",sort_at:"client"},"expiry-date":{field:"endDate",rule:[{field:"endDate",direction:1,type:"string"}],label:"Expiry Date",sort_at:"client"},"added-date":{field:"addedDate",rule:[{field:"addedDate",direction:1,type:"string"}],label:"Added Date",sort_at:"client"},"reward-card-specials":{field:"promoDescription",rule:[{field:"promoDescription",direction:-1,type:"custom",callback:(e,t)=>this.isPromoMatch(e[t.field])?"AAA":"ZZZ"},{field:"name",direction:-1,type:"string"}],label:this._commonService.getPromoDescription(),sort_at:"client"},aisles:{field:"groupByTemplate",rule:[],label:"Aisles",sort_at:"client"},aisles_departmentName:{field:"departmentName",rule:[{field:"departmentName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},aisles_aisleName:{field:"aisleName",rule:[{field:"aisleName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"}
1,aisles_shelfName:{field:"shelfName",rule:[{field:"shelfName",direction:-1,type:"string"},{field:"name",direction:-1,type:"string"}],label:"Aisles",sort_at:"client"},"bloomreach-top-sellers":{field:"salesRank+asc",rule:null,label:"Top sellers",sort_at:"server"},"bloomreach-price-low-high":{field:"price+asc",rule:null,label:"Price low to high",sort_at:"server"},"bloomreach-best-match":{field:"",rule:null,label:"Best Match",sort_at:"server"},"bloomreach-club-card":{field:"promoType+asc",rule:null,label:this._commonService.getPromoDescription(),sort_at:"server"},aisles_coupons:{field:"purchaseInd",rule:[{field:"purchaseInd",direction:-1,type:"string"}],label:"Type of Coupons",sort_at:"client"},FREQUENCY:{field:"FREQUENCY",rule:null,label:"Frequently Purchased",sort_at:"server"},PURCHASE_DATE:{field:"PURCHASE_DATE",rule:null,label:"Purchase Date",sort_at:"server"},RECOMMENDED:{field:"RECOMMENDED",rule:null,label:"Recommended",sort_at:"server"},RECENTLY_PURCHASED:{field:"PURCHASE_DATE",rule:null,label:"Recently Purchased",sort_at:"server"}}}isPromoMatch(e){let t=this._commonService.getPromorulesArray();if(!t||0===t.length)return!1;let i=!1;return t.forEach((function(t){e&&e.length>0&&e.match(t.rule)&&(i=!0)})),i}constructor(e){this._commonService=e,this.sorts=new Array,this.rules=this.initRules(),this.available=window.AB.availableSorts||[],this.hasSort()&&this.generate()}setAvailableSort(e){this.available=e}getDefaultSort(){return this.default||(this.available.filter((e=>"a-z"===e)).length>0?this.default=this.getSortByName("a-z"):this.default=this.available[0]?this.getSortByName(this.available[0]):this.getSortByName("a-z")),this.default}getDefaultSortForConfigurableSort(e){return this.available.filter((t=>t===e)).length>0?this.default=this.getSortByName(e):this.default=this.available[0]?this.getSortByName(this.available[0]):this.getSortByName(e),this.default}hasSort(){return!!this.available.length}getSortByName(e){return this.rules[e]}getSortOptions(e){let t=[];return e&&e.split(",").forEach(((e,i)=>{let n=this.getSortByName(e.trim());n&&t.push(new yw(n))})),t}getSorts(){return this.sorts}sortBy(e,t,i="asc"){let n=Array.isArray(t)?t:[t],r=Array.isArray(i)?i:[i];return[...e].sort(((e,t)=>{for(let i=0;i<n.length;i++){let s=n[i],a="function"==typeof s?s(e):e[s],o="function"==typeof s?s(t):t[s];if(a<o)return"asc"===r[i]?-1:1;if(a>o)return"asc"===r[i]?1:-1}return 0}))}sort(e,t){let i=e&&e.rule?e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})):"",n=e&&e.rule?e.rule.map((e=>1===e.direction?"asc":"desc")):"";return this.sortBy(t,i,n)}couponsSort(e,t){let i=e.rule.map((t=>i=>{let n=Object.assign({},i);return"string"===t.type&&n&&n[t.field]&&(n[t.field]=n[t.field].toString().toLowerCase()),"number"===t.type&&(n[t.field]=parseFloat(n[t.field])),"custom"===t.type?t.callback.call(this,n,e):n[t.field]})),n=e.rule.map((e=>1===e.direction?"asc":"desc"));return this.sortBy(t,i,n)}generate(){0!==this.available.length&&(this.sorts=[],this.available.forEach(((e,t)=>{let i=this.rules[e];if(i){if("groupByTemplate"===i.field){let e="aisles_"+window.AB.headerType;i.rule=this.rules[e]?this.rules[e].rule:""}this.sorts.push(new yw(i)),void 0===this.default&&e===window.AB.defaultSort&&(this.default=i)}})))}static{this.ɵfac=function(t){return new(t||e)(lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Wme=e=>({"no-results":!0,"search-no-results":e}),Hme=e=>({"pc-grid-contained":e}),Yme=e=>({"bia-sort":e});function Gme(e,t){if(1&e&&(kf(0,"div",4),Tf(1,"div",5)(2,"div",5),xf()),2&e){let e=Yf(2);zh("ngClass",Om(3,Wme,e.searchNoResults)),Vd(),zh("innerHTML",e.noResults,ed),Vd(),zh("innerHTML",e.aisleHTML,ed)}}function Kme(e,t){if(1&e&&(kf(0,"div",2),ph(1,Gme,3,5,"div",3),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.showGrid)}}function Qme(e,t){if(1&e){let e=Mf();kf(0,"sort-by",15),jf("activeSortRuleEmitter",(function(t){return Wa(e),Ha(Yf(2).activeSortRuleEmitter(t))})),xf()}if(2&e){let e=Yf(2);zh("sortRules",e.sortRules)("activeSortRule",e.activeSortRule)("ngClass",Om(3,Yme,e.biaSort))}}function Jme(e,t){if(1&e&&(kf(0,"div",19)(1,"h2"),am(2),xf()()),2&e){let e=Yf().$implicit,t=Yf(2);Vd(2),lm(e[t.groupByField])}}function Zme(e,t){1&e&&(Ef(0),Tf(1,"div",20),Df())}function Xme(e,t){if(1&e&&(Ef(0),bm(1),Tf(2,"zone",21),Df()),2&e){Yf();let e=vm(2),t=Yf(2),i=t.dynamicGridHasFacets?"gridRowWithFacets":"gridRow";Vd(2),zh("componentType",i)("componentData",t.gridComponents.get(e))("zoneId","gridZoneContent"+e)}}function ege(e,t){if(1&e){let e=Mf();Ef(0),bm(1)(2)(3)(4),ph(5,Jme,3,1,"div",16),kf(6,"product-item-al-v2",17),mm("isRestrictedChange",(function(t){Wa(e);let i=Yf(2);return fm(i.unAttendDeliveryFlag,t)||(i.unAttendDeliveryFlag=t),Ha(t)}
1)),xf(),ph(7,Zme,2,0,"ng-container",18)(8,Xme,3,3,"ng-container",18),Df()}if(2&e){let e=t.$implicit,i=t.index,n=Yf(2),r=!0===n.hasCrossSell&&(n.fullWidthIndices.has(i)||i+1===n.products.length);Vd(2);let s=ym(n.fullWidthIndices.get(i)),a=(null==n.gridComponents?null:n.gridComponents.size)>0&&n.gridComponents.has(s),o="cross-sell-placeholder-"+e.id;Vd(3),zh("ngIf",e.isGroupSplit&&n.isAisleSort&&n.loadSort()),Vd(),zh("ngClass",n.hasCrossSell?o:""),hm("isRestricted",n.unAttendDeliveryFlag),zh("data",e)("offers",n.dataOffers)("calledBy",n.calledBy)("configObj",n.configObj)("isCalledByRightDrawerOrOneTimeAddFlow",n.isCalledByRightDrawerOrOneTimeAddFlow),Vd(),zh("ngIf",!0===r),Vd(),zh("ngIf",!0===a&&!0===n.showGridZoneComponents)}}function tge(e,t){if(1&e){let e=Mf();kf(0,"div",22)(1,"button",23),jf("click",(function(){return Wa(e),Ha(Yf(2).loadMoreProducts("grid_button"))})),am(2,"Load more"),xf()()}}function ige(e,t){1&e&&(kf(0,"div",24)(1,"div",25)(2,"div",26)(3,"div",27),Tf(4,"div",28),xf()()()())}function nge(e,t){if(1&e){let e=Mf();kf(0,"div",29)(1,"button",30),jf("click",(function(){return Wa(e),Ha(Yf(2).loadMoreProductsServerSide("grid_button"))})),am(2,"Load more"),xf()()}}function rge(e,t){if(1&e&&(kf(0,"div",6),ph(1,Qme,1,5,"sort-by",7),kf(2,"div",8),ph(3,ege,9,11,"ng-container",9),Tf(4,"div",10),xf(),kf(5,"div",11),am(6),xf(),ph(7,tge,3,0,"div",12)(8,ige,5,0,"div",13)(9,nge,3,0,"div",14),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.products.length>0&&e.hasSort&&e.loadSort()),Vd(),zh("ngClass",Om(7,Hme,e.isCalledByRightDrawerOrOneTimeAddFlow)),Vd(),zh("ngForOf",e.products),Vd(3),lm(e.afbEvent),Vd(),zh("ngIf","loadmore"===e.component.pagination.load_type&&!e.isServerGridLoading&&(e.products.length<e.productsSecondary.length||e.isOneTimeAddFlow&&(null==e.searchKeyword?null:e.searchKeyword.length)>0&&e.nextPageToken)),Vd(),zh("ngIf",e.isServerGridLoading),Vd(),zh("ngIf",e.hasServerSideLoadMore&&!e.isServerGridLoading)}}var sge=(()=>{class e{set offersFromDynamicGrid(e){this.dataOffers=e}set replacementProducts(e){if(!0===this.objGridData?.usesDynamicGridWrapper&&null!=e){if(0==e.length)return void this._processNoData();this.products=e,this.handleProductsPerRowCalculations()}}set additionalProducts(e){if(!0===this.objGridData?.usesDynamicGridWrapper&&null!=e){if(0==e.length)return void this._processNoData();this.products=this.products.concat(e),this.handleProductsPerRowCalculations()}}constructor(e,t,i,n,r,s,a,o,l,c,d,u){this._productGridService=e,this._http=t,this.elementRef=n,this._commonService=r,this._userInfoService=s,this._aemService=a,this._sortService=o,this._cartService=l,this._dataScrollService=c,this._productFilterService=d,this._loaderService=u,this.gridComponents=new Map,this.showGridZoneComponents=!0,this.isDynamicGridFlow=!1,this.dynamicGridHasFacets=!1,this.config=Iw,this.pTime=new Date,this.notAvailableDisp=["historylastorder","historylist","purchase"],this.infiniteScrollPage=1,this._isServerLoadMoreTriggered=!1,this.products=[],this.initialProducts=[],this.productsSecondary=[],this.ack=!0,this.showGrouping="mask",this.filterAisleParam="",this.filterBrandParam="",this.isFilter=!1,this.noResults="",this.displayNoResults=!1,this.aisleHTML="",this.groupByField=window.AB.headerType||"departmentName",this.currentGroupBy="",this.groupByHeadingField="",this.isGroupInit=!1,this.isAisleSort=!1,this.allowNotAvailable=!1,this.areAllProductsUnavailable=!1,this.unAttendDeliveryFlag=!1,this.afbEvent="",this.showBackToTopButton=!1,this.totalProducts=0,this.searchNoResults=!1,this.productColumnClass="col-12 col-sm-6 col-lg-4",this.productColumnClassV2="col-6 col-sm-6 col-md-3 col-lg-3 col-xl-3",this.component={},this.dataOffers={},this.biaSort=!1,this.showAddAllItemsBtn=!1,this.arProductsArray=[],this.enableDSTV2Theme=!1,this.hasServerSideLoadMore=!1,this.isServerGridLoading=!1,this.isArEnable=!1,this.snsFulfillmentType="",this.isCalledByRightDrawerOrOneTimeAddFlow=!1,this.isOneTimeAddFlow=!1,this.searchKeyword="",this.subscription=new Ye,this.productsPerRowInPCRedesign=0,this.fullWidthIndices=new Map,this.nextPageToken="",this.hasCrossSell=!1,this.checkAnyProductHasAddlInfo=e=>!!e&&e.some((e=>e?.isArProduct&&this.isArEnable||"Y"==e?.isMarketplaceItem)),this.wrapperName="targeted-wrapper",this.wrapperAttribute="data-targeted-component",window?.AB?.userInfo&&!this._userInfoService.getUserSession()&&this._userInfoService.initUserSession(),this._componentElement=this.elementRef.nativeElement,this.isThemeBuilderEnabled=!1,this.calcTime("START"),this.showGrid=!0,window.productGenericGridCompRef={zone:i,component:this}
1,this.enableDSTV2Theme=this._commonService.hasPageV2Theme()}ngOnInit(){this.isCalledByRightDrawerOrOneTimeAddFlow="c-products-by-upc-drawer"===this.calledBy||"s-bogo"===this.calledBy;let e=this._componentElement.getAttribute("data-configObj");if(e&&void 0===this.configObj&&(this.configObj=JSON.parse(e),("1P_SNS"===this.configObj?.programType||"1P_OA"===this.configObj?.appName)&&this.setOneTimeAddFlowData()),this.configObj=f(h({},this.configObj??{}),{programType:this.configObj?.programType??"abs"}),localStorage.setItem("productGenericGridData",JSON.stringify(this.objGridData)),this.component={pagination:{load_type:this.objGridData?.load_type,load_items:this._getLoadMoreItems(),infinite_type:this.objGridData?.infinite_type,paginate_at:"buy-it-again"===this.objGridData?.apiType?"server":"client",page:1}},this.qualifiedProducts?(this.qualifiedProducts=JSON.parse(this.qualifiedProducts),this.isOneTimeAddFlow&&this.qualifiedProducts?.products?.length&&(this.qualifiedProducts.products="1P_SNS"===this.configObj.programType?this.filterSnsNextOrderBpns(this.qualifiedProducts.products):this.qualifiedProducts.products,this.nextPageToken=this.qualifiedProducts?.nextPageToken??"")):this.qualifiedProducts=null,!0!==this.isDynamicGridFlow){let e=this._componentElement.getAttribute("data-offers");if(e){let t=JSON.parse(e)||{};this.dataOffers=t?.offers}}this.hasSort=this._sortService.hasSort(),this.sortRules=this._sortService.getSorts(),this.sortRules=this.sortRules?.filter((e=>"Search Ranking"!==e.label)),this.products=[],this.calcTime("INIT"),this.noResults=this._productGridService.getNoResultsMsg(this.productGridPage),this.allowNotAvailable=-1!==this.notAvailableDisp.indexOf(this.productGridPage),"cart"===this.configObj?.appName?this.allowNotAvailable=!0:this.allowNotAvailable,this.productColumnClass="c-products-by-upc"===this.objGridData?.apiType||"offer"===this.productGridPage?"col-12 col-sm-6 col-md-4 col-lg-3":this.productColumnClass,(!0===this.objGridData?.doGenericFlow&&!1===this.objGridData?.usesDynamicGridWrapper||!0===this.objGridData?.usesDynamicGridWrapper)&&(this.productColumnClassV2="c-products-by-upc"===this.objGridData.apiType||"offer"===this.productGridPage||"c-products-by-upc-drawer"===this.objGridData.apiType||"s-bogo"===this.objGridData.apiType?"col-6 col-sm-6 col-md-3 col-lg-2 col-xl-2":this.productColumnClassV2),this.calcTime("INIT"),this.calcTime("REQUESTED DATA"),this._productGridService.objGridData=this.objGridData,localStorage.setItem("productGenericGridData",JSON.stringify(this.objGridData)),"erumslastorder"===this.productGridPage||"historylist"===this.productGridPage||"purchase"===this.productGridPage?this._commonService.userInfoRefresh.subscribe((e=>{"initFunc"===e&&this._getResults()})):(this._getResults(),"c-products-by-upc"===this.objGridData?.apiType&&this._commonService.shopCouponRefreshSource.subscribe((e=>{e&&"object"==typeof e&&"id"in e&&"deleted"in e&&"status"in e&&this._init()})));let t=this._cartService._get();this._commonService.isEmpty(t)?this._cartService._loadERUMSRemoteCart():this._commonService._cartObjSource.next(t)}setOneTimeAddFlowData(){this.qualifiedProducts=this._componentElement.getAttribute("data-products");let e=this._componentElement.getAttribute("data-current-order-data");this._commonService.orderAmendsCurrentOrderData=e?JSON.parse(e):{},this.isOneTimeAddFlow=!0,this.isCalledByRightDrawerOrOneTimeAddFlow=!0,this.searchKeyword=this.configObj["data-search-key"],this.snsFulfillmentType=this.configObj["data-fulfillment-channel"];let t=this._componentElement.attributes;this.objGridData={drivenType:"catalog",apiUrl:"",apiType:"",sorts:!1,defaultSort:void 0,value:{},products:[],widgetId:!1,load_type:t["data-load-type"]?.value??"loadmore",infinite_type:t["data-infinite-scroll-type"]?.value??"client",badgePreference:t["data-badge-preferrence"]?.value||"",badgeList:t["data-badge-list"]?.value||""}}_getResults(){this._aemService.isArFlagLoaded()?(this.isArEnable=this._aemService.getArFlag()?.display,console.warn("== PRODUCT GENERIC GRID DECIDED isArEnable property in the component"),this._init()):this._commonService.canTriggerProductsCall()?this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display,console.warn("== PRODUCT GENERIC GRID RECEIVED EVENT AND NOW IS READY TO MAKE PRODUCTS CALL"),this._init()}))):this._init()}
1_init(){if(null!=this.qualifiedProducts){if((0==this.qualifiedProducts.ack||this.isOneTimeAddFlow)&&this.qualifiedProducts.products&&this.qualifiedProducts.products.length>0){let e=new gt((e=>{e.next(this.qualifiedProducts),e.complete()}));this.calcTime("RECEIVED DATA"),e.subscribe({next:e=>{if("purchase"===this.objGridData.drivenType)if("buy-it-again"===this.objGridData.apiType)this.activeSortRule=this.objGridData.value.sortRule;else this.activeSortRule=this._sortService.getDefaultSort();else this.activeSortRule=this._sortService.getDefaultSort();this._sendProductsToAddAllComponent(e);for(let t of e.products)this._productFilterService.addDepartment(t.departmentName);if(!0===this.isFilter&&(e.products=e.products.filter((e=>this._doFilter(e)))),this.allowNotAvailable||(e.products=e.products.filter((e=>e.price>0&&null!=e.price))),this.component.pagination.page=1,this._pagination(e),this.checkAvailability(e.products),this.arProductsArray=this.chunkArray([...e.products]),this.calcTime("PROCESSED DATA"),this.searchResult(this.totalProducts),this._dataScrollService.backToTopScroll$.subscribe((e=>this.showBackToTopButton=e>window.innerHeight)),("c-bogo"===this.objGridData.apiType||"bogo"===this.productGridPage)&&null!=$(".bogo--paragraph")&&($(".bogo--paragraph").removeClass("mask"),$(".bogo--error").addClass("mask")),typeof e.brands<"u"&&null!=e.brands)for(let t of e.brands)this._productFilterService.addBrand(t);else"search"===this.productGridPage&&this._productGridService.extractBrand().subscribe((e=>{if(typeof e.brands<"u"&&null!=e.brands)for(let t of e.brands)this._productFilterService.addBrand(t)}))},error:e=>{this._processNoData()}})}else this._processNoData();this._isServerLoadMoreTriggered=!1,setTimeout((()=>{this.showGrid=!0,$("#loadingConMedium").hide()}),10),this.calcTime("END")}else this._processNoData()}_pagination(e){if("loadmore"===this.component.pagination.load_type)if("client"===this.component.pagination.paginate_at){let t=null!=e.products&&""!==e.products;"relevancy"!==this.productGridPage?this.productsSecondary=t?this.doSort(e.products):[]:this.productsSecondary=t?e.products:[],this.loadMoreProducts()}else"server"===this.component.pagination.paginate_at&&null!=e.products&&""!==e.products&&(this.products.push(...e.products),this.hasServerSideLoadMore=this.products.length>=this._getLoadMoreItems(),this._serverNewItemToFocus&&this.products[this._serverNewItemToFocus]&&this.products[this._serverNewItemToFocus].id&&this.focusProduct(this._serverNewItemToFocus));else"infinitescroll"===this.component.pagination.load_type&&"client"===this.component.pagination.infinite_type||"infinitescroll"===this.component.pagination.load_type&&"server"===this.component.pagination.infinite_type?this.infiniteScroll(e):(this.products=null!=e.products&&""!==e.products?e.products:[],this.totalProducts=this.products.length,"search"!==this.productGridPage&&"relevancy"!==this.productGridPage&&!0!==this.isDynamicGridFlow&&this.doSort())}ngAfterViewInit(){this.calcTime("VIEW Init"),window.AB&&window.AB.DATALAYER&&"p13n"===this.calledBy&&window.AB.DATALAYER.trackP13nGrid(this.elementRef.nativeElement,this.qualifiedProducts),!0===this.isDynamicGridFlow&&this.handleProductsPerRowCalculations()}checkAvailability(e){this.areAllProductsUnavailable=this._productGridService.areAllProductsUnavailable(e)}calcTime(e){let t=new Date;this.pTime.getHours(),this.pTime.getMinutes(),this.pTime.getSeconds(),this.pTime.getMilliseconds(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()}getCart(){let e=window.AB.miniCartPath;return""!==this._aemService.getOrderNumberCookie()&&(e+="?id="+this._aemService.getOrderNumberCookie()),this._http.get(e)}_doFilter(e){let t=!0;return t=window.AB.COMMON.getURLParameterByName("aisle")&&e.departmentName===this.filterAisleParam,t}hasGroupHeading(){this.hasSort&&this.isAisleSort&&!this.isGroupInit&&(this.isGroupInit=!0,this.products.forEach((e=>{e[this.groupByField]!==this.currentGroupBy&&(this.currentGroupBy=e[this.groupByField],e.isGroupSplit=!0)})))}doSort(e){if(this.currentGroupBy="",this.products.forEach((e=>{e.hasOwnProperty("isGroupSplit")&&delete e.isGroupSplit})),this.isGroupInit=!1,e)return this.isOneTimeAddFlow?e:this._sortService.sort(this.activeSortRule,e);"loadmore"===this.component.pagination.load_type?this.component.pagination.paginate_at&&"client"!==this.component.pagination.paginate_at?this.component.pagination.paginate_at&&"server"===this.component.pagination.paginate_at&&(this.products=[],this._init()):(this.productsSecondary=this.isOneTimeAddFlow?this.productsSecondary:this._sortService.sort(this.activeSortRule,this.productsSecondary),this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.component.pagination.load_items*this.component.pagination.page)):"infinitescroll"===this.component.pagination.load_type&&"client"===this.component.pagination.infinite_type?(this.productsSecondary=this.isOneTimeAddFlow?this.productsSecondary:this._sortService.sort(this.activeSortRule,this.productsSecondary),this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.infiniteScrollItems*this.infiniteScrollPage)):(this.products=this._sortProductsByDepartmentName(this.products),this.products=this.isOneTimeAddFlow?this.products:this._sortService.sort(this.activeSortRule,this.products)),this.isAisleSort=this.activeSortRule&&this.activeSortRule.field===this._sortService.getSortByName("aisles").field,this.hasGroupHeading()}_sortProductsByDepartmentName(e){let t=e;if("Aisles"===this.activeSortRule?.label){let i=(e,t)=>e.departmentName<t.departmentName?-1:1;t=e&&e.sort(i)}return t}activeSortRuleEmitter(e){if("purchase"===(this.activeSortRule=e,this.objGridData.drivenType))if("buy-it-again"===this.objGridData.apiType)this.objGridData.value.sortRule=this.activeSortRule;this.doSort()}searchResult(e){let t=document.querySelector("#searchNrResults");if("search"===this.productGridPage&&t){let i=window.AB.COMMON.getURLParameterByName("q");e>0?t.innerHTML=e+" results for <b>"+i+"</b>":(t.innerText=null!=i?'No results for "'+i+'"':"No results found.",this.searchNoResults=!0,document.querySelector(".asidediv.col-md-9").classList.remove("col-md-9"),document.querySelector(".asidediv").classList.add("col-md-12")),window.AB.DATALAYER.updateSearch(i,e)}}infiniteScroll(e){if(this.productsSecondary=null!=e.products&&""!==e.products?this.doSort(e.products):[],this.infiniteScrollItems=this._dataScrollService.getNumberOfItems(),this.totalProducts=this.productsSecondary.length,this.hideLoader(),this.allowNotAvailable||(this.productsSecondary=this.productsSecondary.filter((e=>e.price>0&&null!=e.price))),this.productsSecondary.length<=this.infiniteScrollItems)return this.products=this.productsSecondary,void this.doSort();this.$infiniteScroll=this._dataScrollService.pageToLoad$.pipe(pn((()=>this.products.length<this.productsSecondary.length))).subscribe((e=>{this.products=this._sortProductsByDepartmentName(this.products),this.products=this.productsSecondary.slice(0,this.infiniteScrollItems*e),this.infiniteScrollPage=e,this.showLoader(),this.isAisleSort=this.activeSortRule&&this.activeSortRule.field===this._sortService.getSortByName("aisles").field,this.isGroupInit=!1,this.hasGroupHeading(),this.products.length===this.productsSecondary.length&&this.hideLoader()}))}checkRestrictedItems(){this.unAttendDeliveryFlag=!0}loadSort(){return!!(this.objGridData.doGenericFlow&&!0!==this.isDynamicGridFlow||"c-products-by-upc-drawer"!==this.objGridData.apiType&&"s-bogo"!==this.objGridData.apiType)}removedProduct(e){this.afbEvent="Product "+e+" was removed"}backToTopOnClick(){$("html, body").animate({scrollTop:0},"slow"),this.showBackToTopButton=!1;let e=$(".title-bg h2.simple-page-title-text").get(0);void 0!==e&&e.focus()}_processNoData(){this.products=[],this.productsPerRowInPCRedesign=0,this.displayNoResults=!0,$("#loadingConMedium").hide(),("c-bogo"===this.objGridData.apiType||"bogo"===this.productGridPage)&&"mobile"!==window.AB.COMMON.getBreakp
1oint()&&(this.noResults=this._productGridService.getNoResultsMsg(this.productGridPage),0!==$(".bogo--error").length?($(".bogo--error").html(this.noResults).removeClass("mask"),$(".bogo--paragraph").addClass("mask")):$(".bogo--paragraph").after('<div class="bogo--error">'+this.noResults+"</div>"),this.noResults=""),"search"===this.productGridPage&&(this.searchResult(0),this._http.get(window.AB.aisleHTMLTitlePath,{responseType:"text"}).subscribe((e=>{this.aisleHTML=e,this._http.get(window.AB.aisleHTMLPath,{responseType:"text"}).subscribe((e=>{this.aisleHTML+=e}))}))),"loadmore"===this.component.pagination.load_type&&"server"===this.component.pagination.paginate_at&&(this.hasServerSideLoadMore=!1),this.hasServerSideLoadMore&&(this.isServerGridLoading=!1,this.hasServerSideLoadMore=!1)}filterSnsNextOrderBpns(e){let t=localStorage.getItem("snsNextOrderBpns");if(t){let i=JSON.parse(t);return e.filter((e=>!i.hasOwnProperty(e.id)))}return e}loadMoreProducts(e){let t;"grid_button"===e&&(t=this.products.length,this.component.pagination.page++),"grid_button"===e&&this.isOneTimeAddFlow&&this.searchKeyword?.length>0?this._setMoreProducts(t):this._showMoreProducts(t),window.AB&&window.AB.DATALAYER&&this.isOneTimeAddFlow&&"grid_button"===e&&window.AB.DATALAYER.setLinkClickEvents(`ota-${this.searchKeyword?.length>0?"search-results":"bia"}:load-more|page:${this.component.pagination.page-1}`)}_setMoreProducts(e){this.isServerGridLoading=!0,this._productGridService.getMoreSearchProducts({searchQuery:this.searchKeyword,start:(this.component.pagination.page-1)*this.component.pagination.load_items,rows:this.component.pagination.load_items,fulfillmentType:this.snsFulfillmentType,nextPageToken:this.nextPageToken}).subscribe((t=>{t.products&&t?.products?.length>0&&(this.productsSecondary=this.productsSecondary.concat(this.filterSnsNextOrderBpns(t.products))),t.offers&&(this.dataOffers.offers=h(h({},this.dataOffers?.offers),t.offers)),this.isServerGridLoading=!1,this.nextPageToken=t?.nextPageToken??"",this._showMoreProducts(e)}),(e=>{this.component.pagination.page--,this.isServerGridLoading=!1,this._commonService.dispatchCustomOneTimeEvent("snsOneTime","loadMoreUpdateError",{})}))}_showMoreProducts(e){this.productsSecondary=this._sortProductsByDepartmentName(this.productsSecondary),this.products=this.productsSecondary.slice(0,this.component.pagination.load_items*this.component.pagination.page);let t=[...this.products];this.arProductsArray=this.chunkArray(t||[]),this.isGroupInit=!1,this.hasGroupHeading(),e&&this.products[e].id&&this.focusProduct(e)}focusProduct(e){if(null==e)return;let t=new MutationObserver((function(t){setTimeout((()=>{let t=document.querySelectorAll("product-item-al-v2")[e];t&&(t.querySelector(".product-fname").focus(),this.disconnect())}),500)})),i=this.elementRef.nativeElement;t.observe(i,{childList:!0,subtree:!0})}loadMoreProductsServerSide(e){if("purchase"===(this._isServerLoadMoreTriggered=!0,this.isServerGridLoading=!0,"grid_button"===e&&(this._serverNewItemToFocus=this.products.length),this.objGridData.drivenType))if("buy-it-again"===this.objGridData.apiType)this.objGridData.value.pageNumber=this.objGridData.value.pageNumber+1,this._init();else this._isServerLoadMoreTriggered=!1;else this._isServerLoadMoreTriggered=!1}_getLoadMoreItems(){return window.innerWidth<=768?this._componentElement.getAttribute("data-load-more-mobile-items")?this._componentElement.getAttribute("data-load-more-mobile-items"):15:window.innerWidth>768&&window.innerWidth<=992?this._componentElement.getAttribute("data-load-more-tablet-items")?this._componentElement.getAttribute("data-load-more-tablet-items"):20:this._componentElement.getAttribute("data-load-more-desktop-items")?this._componentElement.getAttribute("data-load-more-desktop-items"):30}isItemAvailable(e){return this._commonService.isItemAvailable_v2(e)}chunkArray(e){let t=window.location.href.includes("foru/offer-details")?6:4,i=window.innerWidth<768?2:t,n=[];for(;e.length;)n.push(e.splice(0,i));return n}checkAnyArProductInRow(e){if(this.isOneTimeAddFlow)return!1;let t=this.arProductsArray?this.arProductsArray.find((t=>t.find((t=>t.pid===e.pid)))):[];return!!t&&this.checkAnyProductHasAddlInfo(t)}handleProductsPerRowCalculations(){setTimeout((()=>{let e=this.elementRef.nativeElement.querySelector(".pc-grid"),t=this.elementRef.nativeElement.querySelector(".pc-grid-prdItem");this.productsPerRowInPCRedesign=this.products.length>0?this._productGridService.calculateCardsPerRow(e,t):0,this.fullWidthIndices=this._productGridService.calculateFullWidthIndices(this.products,this.productsPerRowInPCRedesign)}),0)}_sendProductsToAddAllComponent(e){let t=e.products;"c-virtual-shelf-general"===this.objGridData.apiType&&(t.length>50||0===t.length||$(".load-more").length>0?$(".dynamic-angular-content-injector").hide():($(".dynamic-angular-content-injector").show(),t=t.filter((e=>"1"===e.inventoryAvailable)),this._commonService._products.next(t)))}showLoader(){this._loaderService.show()}hideLoader(){this._loaderService.hide()}ngOnDestroy(){this.subscription.unsubscribe()}static{this.ɵfac=function(t){return new(t||e)($d(jme),$d(ov),$d(Tl),$d(Vl),$d(Bw),$d(_w),$d(Cw),$d(zme),$d(Rw),$d(Ww),$d($w),$d(Hw))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-generic-grid-al-v1"]],inputs:{dataValue:"dataValue",staticProducts:"staticProducts",qualifiedProducts:"qualifiedProducts",configObj:"configObj",objGr
1idData:"objGridData",calledBy:"calledBy",gridComponents:"gridComponents",showGridZoneComponents:"showGridZoneComponents",isDynamicGridFlow:"isDynamicGridFlow",offersFromDynamicGrid:"offersFromDynamicGrid",dynamicGridHasFacets:"dynamicGridHasFacets",hasCrossSell:"hasCrossSell",replacementProducts:"replacementProducts",additionalProducts:"additionalProducts"},features:[xm([zme,jme,Ww,Hw])],decls:2,vars:2,consts:[["class","product-level-1 container-fluid p0","style","color: #5A5A5A; font-size: 20px;","data-qa","prd-gnrc-grd",4,"ngIf"],["class","product-level-4",4,"ngIf"],["data-qa","prd-gnrc-grd",1,"product-level-1","container-fluid","p0",2,"color","#5A5A5A","font-size","20px"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"innerHTML"],[1,"product-level-4"],[3,"sortRules","activeSortRule","ngClass","activeSortRuleEmitter",4,"ngIf"],[1,"pc-grid","w-100","gutters-items-v2","product-grid-v2","product-card-grid",3,"ngClass"],[4,"ngFor","ngForOf"],[1,"pc__col-full-width"],["aria-live","polite","aria-atomic","true",1,"visuallyhidden"],["class","row justify-content-center",4,"ngIf"],["id","searchGridLoading","class","loading-div-medium",4,"ngIf"],["class","load-more-container",4,"ngIf"],[3,"activeSortRuleEmitter","sortRules","activeSortRule","ngClass"],["class","section-heading product-group sort-by-aisle pc__col-full-width",4,"ngIf"],["data-qa","prd-itm",1,"pc-grid-prdItem","h-100",3,"isRestrictedChange","ngClass","isRestricted","data","offers","calledBy","configObj","isCalledByRightDrawerOrOneTimeAddFlow"],[4,"ngIf"],[1,"section-heading","product-group","sort-by-aisle","pc__col-full-width"],[1,"pc__col-full-width","cross-sell-row"],[1,"pc__col-full-width",3,"componentType","componentData","zoneId"],[1,"row","justify-content-center"],["role","button",1,"bloom-load-button","btn","btn-secondary","btn-xl","mt-3",3,"click"],["id","searchGridLoading",1,"loading-div-medium"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"load-more-container"],["role","button",1,"btn","btn-default","btn-secondary","load-more",3,"click"]],template:function(e,t){1&e&&ph(0,Kme,2,1,"div",0)(1,rge,10,9,"div",1),2&e&&(zh("ngIf",t.displayNoResults&&(0===t.products.length||!t.allowNotAvailable&&t.areAllProductsUnavailable)),Vd(),zh("ngIf",t.showGrid&&t.products.length>0&&(t.allowNotAvailable||!t.areAllProductsUnavailable)))},dependencies:[sy,oy,cy,ade,Mhe,Khe],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),age=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[sge,jme,$me],imports:[Ly,qme,ode,Rhe,Qhe]})}}return e})(),oge=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),lge=function(e){return e[e.BuyItAgain=0]="BuyItAgain",e[e.Generic=1]="Generic",e}(lge||{}),cge=(()=>{class e{constructor(){this._facets=new Tt([]),this._processedFacets$=this._facets.pipe(bi((e=>this.removeDuplicateFacets(e)))),this.facets$=this._processedFacets$,this.standardFacets$=this._processedFacets$.pipe(bi((e=>e.filter((e=>!this.ungroupedFacets.has(e.attribute)))))),this.ungroupedFacets$=this._processedFacets$.pipe(bi((e=>e.filter((e=>this.ungroupedFacets.has(e.attribute)))))),this.ungroupedFacets=new Set(["offerType"]),this._facetDisplayStateMap=new Tt(new Map),this.facetDisplayStateMap$=this._facetDisplayStateMap.asObservable(),this._selectedFacetValueMap=new Tt(new Map),this.selectedFacetValueMap$=this._selectedFacetValueMap.asObservable(),this._facetRequest=new kt,this.facetRequest$=this._facetRequest.asObservable(),this._showMobileModal=new kt,this.showMobileModal$=this._showMobileModal.asObservable(),this.aisleIdQuery="",this.aisleIdhasDept=!1,this.facetStandardizers={offertype:e=>f(h({},e),{values:[{name:"Y",value:"Y",count:1,rank:1}]}),price:e=>{let t=e.values.filter((e=>"price:[* to 0]"!==e.value.toLowerCase())).map((e=>f(h({},e),{name:this.formatPriceString(e.name)})));return f(h({},e),{values:t})}}}setFacets(e){this._facets.next(e)}initializeFacetsData(e,t={}){if(null==e||0===e.length)return;let i=this.standardizeGenericLandingPageFacets(e);this.setFacets(i);let n=this.mapFacetsToCollapsedExpandedFacets(i,!1);t&&Object.keys(t).length>0&&this.expandFacetsFromUrl(n,t),this._facetDisplayStateMap.next(n);let r=this.mapFacetsToSelectedFacetValueMap(i);if(t&&Object.keys(t).length>0){let e=this.applyFacetsFromUrl(r,t);this._selectedFacetValueMap.next(e)}else this._selectedFacetValueMap.next(r)}initializeBiaFacetData(e,t){if(null==e||0===e.length)return;this.setFacets(e);let i=this.mapFacetsToCollapsedExpandedFacets(e,!0,"bia");this._facetDisplayStateMap.next(i);let n=this.mapFacetsToSelectedFacetValueMap(e),r=this.updateBiaSelectedFacetsFromUrl(n,t);this._selectedFacetValueMap.next(r)}isUngroupedFacet(e){return this.ungroupedFacets.has(e)}updateBiaSelectedFacetsFromUrl(e,t){let i=new Map(e),n=t?.deptId?[t.deptId]:t?.categories;
1return n&&n.forEach((e=>{let t=`facet-categories-${e}`;if(i.has(t)){let e=i.get(t);e&&i.set(t,f(h({},e),{selected:!0}))}})),i}toggleExpandedFacet(e){this.updateFacetDisplayState((t=>{let i=t.get(e);return i&&t.set(e,f(h({},i),{expanded:!i.expanded})),t}))}toggleShowMoreState(e){this.updateFacetDisplayState((t=>{let i=t.get(e);return i&&t.set(e,f(h({},i),{showMoreState:!i.showMoreState})),t}))}toggleSelectedFacet(e){this.updateSelectedFacetState((t=>{let i=t.get(e);if(!i)return t;let n=f(h({},i),{selected:!i.selected});t.set(e,n);let{facetAttributeName:r,selected:s}=n,a=n?.facetValue;return this._pageType===lge.BuyItAgain&&"categories"===r&&void 0!==a?this.updateAisleIdQueryParamOnToggle(a,s):this._pageType===lge.Generic&&this.updateGenericQueryParamOnToggle(r,a,s),this.trackFilterUpdates(!0,s?"add":"remove",n.facetDisplayName,n.facetValueDisplayName),t}))}updateAisleIdQueryParamOnToggle(e,t){let i=new URLSearchParams(window.location.search),n=i.get("aisleId"),r=[];n&&(r=n.split(",").filter((e=>e))),t?r.includes(e)||r.push(e):r=r.filter((t=>t!==e)),r.length>0?i.set("aisleId",r.join(",")):i.delete("aisleId"),history.replaceState(null,null,"?"+i.toString())}updateGenericQueryParamOnToggle(e,t,i){if(!e||!t)return;let n=new URLSearchParams(window.location.search),r=n.get(e),s=[];r&&(s=this.parseComplexQueryParam(r)),i?!s.includes(t)&&!s.some((e=>e===t))&&s.push(t):s=s.filter((e=>e!==t)),s.length>0?n.set(e,s.join(",")):n.delete(e);let a=window.location.protocol+"//"+window.location.host+window.location.pathname+(n.toString()?"?"+n.toString():"")+window.location.hash;history.replaceState(null,"",a),console.log("Updated URL:",a)}mapFacetsToCollapsedExpandedFacets(e,t=!0,i){return e.reduce(((e,n)=>{let r=this.determineFacetType(n.attribute,i),s={expanded:t,showMoreState:!1,facetType:r};return e.set(n.attribute,s),e}),new Map)}determineFacetType(e,t){return"bia"===t&&["orderDate","purchased"].includes(e)?"radio":"checkbox"}mapFacetsToSelectedFacetValueMap(e){return e.reduce(((e,t)=>(t.values.forEach((i=>{let n="facet-"+t.attribute+"-"+i.value,r={facetDisplayName:t.name,facetAttributeName:t.attribute,facetValueDisplayName:i.name,facetValue:i.value,selected:i.defaultValue||!1};e.set(n,r)})),e)),new Map)}clearFacet(e){this.updateSelectedFacetState((t=>(t.forEach((t=>{t.facetAttributeName===e&&(this.trackFilterUpdates(!1,"remove",t.facetDisplayName,t.facetValueDisplayName),t.selected=!1,this._pageType===lge.Generic&&this.clearGenericFacetFromQueryParam(t.facetAttributeName))})),t)))}clearAllFacets(e){this.updateSelectedFacetState((t=>(t.forEach((t=>{this._pageType===lge.BuyItAgain&&"viewAll"===e&&"categories"===t.facetAttributeName||(t.selected=""===t.facetValue,this._pageType===lge.Generic&&this.clearGenericFacetFromQueryParam(t.facetAttributeName))})),this.trackFilterUpdates(!0,"remove","clearAll","clearAll"),t)))}transformSelectedFacetsToRequest(e){let t=Array.from(e.values()).filter((e=>e.selected)).reduce(((e,t)=>(e.has(t.facetAttributeName)?e.get(t.facetAttributeName).push(t.facetValue):e.set(t.facetAttributeName,[t.facetValue]),e)),new Map);return{attributes:Array.from(t,(([e,t])=>({attribute:e,values:t}))),filterStrategy:"MODEL_DEFAULT"}}toggleRadioButton(e,t){this.updateSelectedFacetState((i=>{i.forEach(((e,n)=>{e.facetAttributeName===t&&i.set(n,f(h({},e),{selected:!1}))}));let n=i.get(e);return n&&(i.set(e,f(h({},n),{selected:!0})),this.trackFilterUpdates(!0,"add",n.facetDisplayName,n.facetValueDisplayName)),i}))}toggleFacetOnChipRemoval(e){let t=this._selectedFacetValueMap.value.get(e);if(void 0===t)return;let i=t.facetAttributeName;"purchased"===i||"orderDate"===i?this.toggleRadioButton("facet-"+i+"-",i):this.toggleSelectedFacet(e)}showModalFromBiaMobileView(){this._showMobileModal.next(!0)}trackFilterUpdates(e,t,i,n,r){window.AB&&window.AB.DATALAYER&&("add"===t?(window.AB.DATALAYER.addFilterType(i),window.AB.DATALAYER.addFilterSelection(`${i?.trim()}: ${n?.trim()}`,r)):"remove"===t&&(window.AB.DATALAYER.removeFilterType(i),window.AB.DATALAYER.removeFilterSelection("clearAll"===n?"clearAll":`${i?.trim()}: ${n?.trim()}`)),e&&window.AB.DATALAYER.setPageFilter())}updateFacetDisplayState(e){this._facetDisplayStateMap.next(e(new Map(this._facetDisplayStateMap.value)))}
1updateSelectedFacetState(e){let t=e(new Map(this._selectedFacetValueMap.value));this._selectedFacetValueMap.next(t),this._facetRequest.next(this.transformSelectedFacetsToRequest(t))}updateSelectedFacetStateWithoutRequest(e){let t=e(new Map(this._selectedFacetValueMap.value));this._selectedFacetValueMap.next(t)}removeDuplicateFacets(e){let t=new Set;return e.filter((e=>!t.has(e.attribute)&&(t.add(e.attribute),!0)))}standardizeGenericLandingPageFacets(e){return e.map((e=>{let t=this.facetStandardizers[e.attribute.toLowerCase()];return t?t.call(this,e):e}))}formatPriceString(e){let t=e.slice(1,-1).split(" TO "),i=t[0],n=t[1];return 0===Number(i)&&Number(n)>0?e="Less than $"+n:Number(i)>0&&"*"===n?e="Greater than $"+i:Number(i)>0&&Number(n)>0&&(e="$"+i+" to $"+n),e}updateFacetsWithStatePreservation(e){if(!e?.length)return;let t=this.standardizeGenericLandingPageFacets(e);this.setFacets(t);let i=new Map,n=new Map;t.forEach((e=>{i.set(e.attribute,e);let t=new Map;e.values.forEach((i=>{let n=`facet-${e.attribute}-${i.value}`;t.set(n,i)})),n.set(e.attribute,t)})),this.updateFacetDisplayState((e=>{let i=new Map;return t.forEach((t=>{let n=t.attribute,r=e.get(n),s={expanded:!1,showMoreState:!1,facetType:this.determineFacetType(n)};r&&(s=f(h({},r),{facetType:r.facetType||s.facetType})),i.set(n,s)})),i})),this.updateSelectedFacetStateWithoutRequest((e=>{let i=new Map;return t.forEach((t=>{let n=t.attribute;t.values.forEach((r=>{let s=`facet-${n}-${r.value}`,a={facetDisplayName:t.name,facetAttributeName:n,facetValueDisplayName:r.name,facetValue:r.value,selected:r.defaultValue||!1},o=e.get(s);o&&(a.selected=o.selected),i.set(s,a)}))})),i}))}setPageType(e){this._pageType=e}applyFacetsFromUrl(e,t){let i=new Map(e);return Object.entries(t).forEach((([e,t])=>{!t||!t.length||t.forEach((t=>{let n=`facet-${e}-${t}`;if(i.has(n)){let e=i.get(n);e&&i.set(n,f(h({},e),{selected:!0}))}}))})),i}expandFacetsFromUrl(e,t){Object.keys(t).forEach((i=>{if(t[i]?.length&&e.has(i)){let t=e.get(i);t&&e.set(i,f(h({},t),{expanded:!0}))}}))}parseComplexQueryParam(e){if(!e)return[];let t=[],i="",n=!1;for(let r=0;r<e.length;r++){let s=e[r];'"'===s?(n=!n,i+=s):","!==s||n?i+=s:(i.trim()&&t.push(i.trim()),i="")}return i.trim()&&t.push(i.trim()),t}clearGenericFacetFromQueryParam(e){let t=new URLSearchParams(window.location.search);t.delete(e),history.replaceState(null,null,"?"+t.toString())}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function dge(e,t){if(1&e){let e=Mf();kf(0,"div",2)(1,"product-grid-lazy-wrapper",3),jf("viewAllDeptEmitter",(function(t){return Wa(e),Ha(Yf(2).handleViewAllDept(t))})),xf()()}if(2&e){let e=Yf().$implicit,t=Yf();Vd(),zh("deptId",e.value)("deptNm",e.name)("configObj",t.configObj),gh("data-carousel-api-post",e.value)}}function uge(e,t){if(1&e&&(Ef(0),ph(1,dge,2,4,"div",1),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf","All"!==e.name)}}var pge=(()=>{class e{set currentSort(e){this._sortRule===e||null==e||(this._sortRule=e,0===this.selectedFacetIds.size?this._sortedDisplayedDepartmentsInfo=this.sortDisplayedDepartments(this.departmentInfo,this._sortRule?.field):this._sortedDisplayedDepartmentsInfo=this.sortDisplayedDepartments(this.departmentInfo,this._sortRule?.field).filter((e=>this.selectedFacetIds.has(e.value))))}constructor(e){this._facetService=e,this.departmentNameEmitter=new _l,this._displayedDepartments=[],this._displayedDepartmentsInfo=[],this._sortedDisplayedDepartmentsInfo=[],this.departmentInfo=[],this.selectedFacetIds=new Set,this.subscriptions=new Ye}ngOnDestroy(){this.subscriptions.unsubscribe()}ngOnInit(){let e=this._facetService.facets$.subscribe((e=>{this.departmentInfo=e.find((e=>"categories"===e.attribute))?.values}));this.subscriptions.add(e);let t=this._facetService.selectedFacetValueMap$.subscribe((e=>{this.selectedFacetIds=new Set(Array.from(e.values()).filter((e=>e.selected&&"categories"===e.facetAttributeName&&""!==e.facetValue)).map((e=>e.facetValue))),0===this.selectedFacetIds.size?this._sortedDisplayedDepartmentsInfo=this.sortDisplayedDepartments(this.departmentInfo,this._sortRule?.field):this._sortedDisplayedDepartmentsInfo=this.sortDisplayedDepartments(this.departmentInfo,this._sortRule?.field).filter((e=>this.selectedFacetIds.has(e.value)))}));this.subscriptions.add(t)}sortDisplayedDepartments(e,t){switch(t){case"alphabeticalatoz":return[...e].sort(((e,t)=>e.name?.toLowerCase().localeCompare(t.name?.toLowerCase())));case"alphabeticalztoa":return[...e].sort(((e,t)=>t.name?.toLowerCase().localeCompare(e.name?.toLowerCase())));default:return[...e]}}handleViewAllDept(e){this.departmentNameEmitter.emit(e)}static{this.ɵfac=function(t){return new(t||e)($d(cge))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-category-carousal-list"]],inputs:{currentSort:"currentSort",configObj:"configObj"},outputs:{departmentNameEmitter:"departmentNameEmitter"},decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],["class","bia-carousel-list-item",4,"ngIf"],[1,"bia-carousel-list-item"],["data-lazy-component","product-carou
1sel","data-carousel-type","apidriven","data-carousel-users","R","data-carousel-action","qty-stepper","data-carousel-behaviour","buy-it-again-landing","data-carousel-driven","buy-it-again","data-carousel-max-products","21","data-include-offer","true","data-navigation-type","page-by-page","attr.data-filter-cart-items","true",3,"viewAllDeptEmitter","deptId","deptNm","configObj"]],template:function(e,t){1&e&&ph(0,uge,2,1,"ng-container",0),2&e&&zh("ngForOf",t._sortedDisplayedDepartmentsInfo)},encapsulation:2})}}return e})(),hge=(()=>{class e{constructor(e,t,i,n,r,s){this._p13nService=e,this._zoneService=t,this._userInfoService=i,this._aemService=n,this._purchasesEndpointService=r,this._commonService=s,this._zone1=new kt,this.zone1$=this._zone1.asObservable(),this._zone2=new kt,this.zone2$=this._zone2.asObservable(),this._fetchGridData=new kt,this.fetchGridData$=this._fetchGridData.asObservable(),this._productsSubject=new kt,this._gridData=new kt,this.gridData$=this._gridData.asObservable(),this.objGridData={drivenType:"",apiUrl:"",apiType:"",sorts:"",defaultSort:"",value:{},products:[]},this._isEntireGridLoadingState=new kt,this.isEntireGridLoadingState$=this._isEntireGridLoadingState.asObservable(),this._additionalProducts=new kt,this.additionalProducts$=this._additionalProducts.asObservable(),this.test$=new gt}getDynamicGridUrlData(){let e={modelConfigId:null,fragmentId:null,zones:null},t=new URLSearchParams(window.location.search);return e.modelConfigId=t.get("modelConfigId"),e.fragmentId=t.get("fragmentId"),e.zones=t.get("zones")?.split(",")||[],e}fetchZonesFromUrlData(e,t,i){let n=!1;return i.forEach((t=>{switch(t){case"1":case"2":this.fetchZoneData(t,e).subscribe((e=>{("1"===t?this._zone1:this._zone2).next(e)}));break;case"grid":n=!0;break;default:console.warn("UNKNOWN ZONE: ${zone}")}})),n}getGridZoneComponents(){let e=this.getDynamicGridUrlData(),{fragmentId:t,modelConfigId:i,zones:n}=e;return!0===n.includes("grid")?this.getGridZoneData("Grid",t):fi(null)}fetchProductsForGridRerender(e,t,i=!1){this._productsSubject.next({gridProducts:e,gridZoneComponents:t,isAdditionalProducts:i})}initializeFetchProductsGridSubscription(){this._productsSubject.pipe(dn((({gridProducts:e,gridZoneComponents:t,isAdditionalProducts:i})=>{let n=new kt;return Oi([e,(t||fi(null)).pipe(ln(1),un(n))]).pipe(bi((([e,t])=>({productGridData:e,gridZoneData:t,isAdditionalProducts:i}))))}))).subscribe((({productGridData:e,gridZoneData:t,isAdditionalProducts:i})=>{this._gridData.next({productGridEndpointResponse:e??{ack:!1,products:[]},gridZoneResponse:t,isAdditionalProducts:i??!1})}))}getGridZoneData(e,t){let i=null;window.AB?.COMMON?.isLSCompatible&&"function"==typeof window.AB.COMMON.isLSCompatible&&window?.AB?.COMMON?.isLSCompatible()&&(i=localStorage.getItem("timezone"));let n={zone:`zone${e}`,fragment:t,storeId:this._userInfoService.getShopStoreId(),banner:this._userInfoService.getBanner(),channel:this._userInfoService.getUserChannel(),zipcode:this._userInfoService.getShopZipcode(),cartItems:window.AB?.COMMON?.authorize()?this.getProductBPNFromCartObj(!0):[],marketingCloudVisitorId:this.getMarketingCloudVisitorId()};return i&&(n.deliveryTimeZone=i),this._zoneService.getLandingPageZoneContent(n).pipe($i((e=>(console.error("Error fetching data for zone: ${zone}",e),fi(null)))))}fetchZoneData(e,t){return this._zoneService.getLandingPageZoneContent({zone:`zone${e}`,fragment:t,storeId:this._userInfoService.getShopStoreId(),banner:this._userInfoService.getBanner(),channel:this._userInfoService.getUserChannel(),zipcode:this._userInfoService.getShopZipcode()}).pipe($i((e=>(console.error("Error fetching data for zone: ${zone}",e),fi(null)))))}getSmartBasketData(e){return this._purchasesEndpointService.fetchSmartBasketResponse(e).pipe(bi((e=>({products:e?.purchases??[],ack:!1}))),$i((e=>(console.warn("Issue fetching smart basket data",e),fi({products:[],ack:!1})))))}getGenericGridData(e){let t=this._p13nService.generateProductsRequestPayload(e);return this._p13nService.getP13nProductsRecommendation(t).pipe(bi((e=>{let{offersData:t}=e||{};return f(h({products:e?.productsinfo??[],ack:!1},e?.p13nAdobeMetrics&&{p13nAdobeMetrics:e.p13nAdobeMetrics}),{offers:t,sortable:e?.sortable,facets:e?.facets,nextPageToken:e?.nextPageToken})})),$i((e=>fi({products:[],ack:!1}))))}getBuyItAgainData(e){let t=this.generateBaseRecommendationRequest();if(e?.facets&&e?.facets?.attributes?.length>0){let i=e.facets;t.filter=i}e?.sort&&e?.sort?.length>
10&&(t.sort=e.sort),e?.nextPageToken&&(t.nextPageToken=e.nextPageToken);let i=window.AB?.COMMON?.authorize()?this.getProductBPNFromCartObj(!1):[];return i.length>0&&(t.cartItems=i),this.fetchPurchasesGridEndpointData(t).pipe(bi((e=>({products:e?.productsInfo??[],ack:!1,facets:e?.facets??[],nextPageToken:e?.nextPageToken,sortable:e?.sortable,offers:e?.offersData}))),$i((e=>fi({products:[],ack:!1,facets:[]}))))}generateBaseRecommendationRequest(){return{assortmentChannel:this._userInfoService.getUserChannel(),banner:this._userInfoService.getBanner(),storeId:this._userInfoService.getShopStoreId(),host:window.location.origin,includeFacets:!0,bruId:this._aemService.getCookie("_br_uid_2"),uiPageSize:32}}fetchPurchasesGridEndpointData(e){let t=window.SWY.CONFIGSERVICE?.searchConfig?.apimP13nSubscriptionKey,i=window.SWY.CONFIGSERVICE.omsConfig["apim.api.purchase.purchases.basepath"];return this._purchasesEndpointService.fetchPurchasesGridEndpointData({request:e,apimKey:t,basePath:i})}getProductBPNFromCartObj(e){let t=[];if(window.AB?.COMMON?.isLSCompatible()){if(e){let e=JSON.parse(localStorage.getItem("oosBPNs")),i=e?.data;e?.expirationTimeStamp<(new Date).getTime()&&(localStorage.removeItem("oosBPNs"),i=[]),i&&i.length>0&&t.push(...i)}let i=localStorage.getItem("abCart");return i&&(i=JSON.parse(i),i&&i.cartItems?.length>0&&"ABS"===i.cartSource&&"1P"===i.cartCategory&&i.cartItems.forEach((e=>{e.itemId&&t.push({bpn:e.itemId.toString()})}))),t}}getMarketingCloudVisitorId(){let e="";if(this._commonService.checkAnalyticsSwyObject()){let t=window.analyticsSwy.storedData.ids;e=t.marketingCloudVisitorId?t.marketingCloudVisitorId:""}if(!e){let t=window.AB.COMMON.getCookie("AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg");if(t){let i=t.split("|");i&&i?.indexOf("MCMID")>0&&(e=i[i?.indexOf("MCMID")+1]??"")}}return e}static{this.ɵfac=function(t){return new(t||e)(lr(Qw),lr(Zw),lr(_w),lr(Cw),lr(t_),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function fge(e,t){if(1&e&&(kf(0,"div")(1,"div",6),Tf(2,"product-carousel-al-v1",7),xf()()),2&e){let e=Yf(3);Vd(2),zh("carouselProducts",e.products)("carouselProductsOffers",e.offers)("enableProductDetailsPath",!0)("configObj",e.configObj),gh("data-carousel-type","bpncurated")("data-carousel-behaviour","buy-it-again-landing-category")("data-carousel-action","qty-stepper")("data-carousel-max-products",21)("data-products",e.getCarouselProductsJson(e.products))("data-offers",e.getCarouselOffersJson(e.offers))("data-navigation-type","page-by-page")("data-seller-type","abs")}}function mge(e,t){if(1&e&&(Ef(0),ph(1,fge,3,12,"div",1),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",e.products&&e.products.length>0)}}function gge(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",2)(2,"h2",3),am(3),xf(),kf(4,"a",4),jf("click",(function(){return Wa(e),Ha(Yf().handleViewAllDeptEmission())})),am(5," View All "),xf()(),ph(6,mge,2,1,"ng-container",5),Df()}if(2&e){let e=Yf(),t=sm(2);Vd(3),lm(e.deptNm),Vd(3),zh("ngIf",!e.isLoading)("ngIfElse",t)}}function bge(e,t){1&e&&(kf(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12),Tf(5,"div",13),xf()()()()())}var yge=(()=>{class e{set deptId(e){this.getCarouselApi(e),this._deptId=e}constructor(e,t,i){this.elementRef=e,this._facetService=t,this._dynamicGridService=i,this.viewAllDeptEmitter=new _l,this._deptId="",this.products=[],this.offers=null,this.isB2B=window.AB&&window.AB.userInfo&&"B"===window.AB.userInfo.siteType,this.isLoading=!0,this.subscription=new Ye,this.wrapper=this.elementRef.nativeElement,this.lazyLoadingComponent=this.wrapper.getAttribute("data-lazy-component")}ngOnInit(){}getCarouselApi(e){let t={facets:{attributes:[{attribute:"categories",values:[e]}],filterStrategy:"MODEL_DEFAULT"}};this.subscription.add(this._dynamicGridService.getBuyItAgainData(t).subscribe((e=>{this.products=e.products,this.offers=e?.offers,this.isLoading=!1})))}getCarouselProductsJson(e){return e&&e.length>0?JSON.stringify({products:e}):"{}"}getCarouselOffersJson(e){return e?JSON.stringify({offers:e}):"{}"}ngOnDestroy(){this.subscription.unsubscribe()}handleViewAllDeptEmission(){this.viewAllDeptEmitter.emit({deptName:this.deptNm,deptId:this._deptId})}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(cge),$d(hge))}}static{this.ɵcmp=Qr({type:e,selectors:[["product-grid-lazy-wrapper"]],inputs:{deptId:"deptId",deptNm:"deptNm",configObj:"configObj"},outputs:{viewAllDeptEmitter:"viewAllDeptEmitter"},decls:3,vars:1,consts:[["loading",""],[4,"ngIf"],["data-qa","bia-crsl-ttl",1,"bia-carousel-title"],["data-qa","dptmnt-nm",1,"department-name","d-inline","mr-3"],["href","javascript:void(0);","data-qa","bctvwll",1,"link-md","links__action","underline","d-inline",3,"click"],[4,"ngIf","ngIfElse"],["data-qa","prd-crsl",1,"slick-product-carou
1sel","clearfix"],[3,"carouselProducts","carouselProductsOffers","enableProductDetailsPath","configObj"],[1,"carousel-content-loading","d-flex","align-items-center","justify-content-center"],["id","product-carousel-loading-id",1,"otp-auth-loader"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&ph(0,gge,7,3,"ng-container",1)(1,bge,6,0,"ng-template",null,0,Wm),2&e&&zh("ngIf",!(!t.products||0===t.products.length))},dependencies:[cy,Sue],encapsulation:2})}}return e})(),vge=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,age,Qhe,Cue,oge]})}}return e})();Em(pge,[oy,cy,yge],[]);var wge=["crossSellContainer"],_ge=["defaultTemplate"],Sge=["DSTV2Template"],Cge=()=>({});function Ige(e,t){if(1&e&&(kf(0,"div",14),Tf(1,"product-item-al-v1",15),xf()),2&e){let e=Yf().$implicit,t=Yf(2);Vd(),zh("data",e)("isAnyProductHasAddlInfo",t.checkAnyArProductInRow(e))("ngClass",t.checkAnyArProductInRow(e)?"product-card-container--with-ar":"product-card-container--with-out-ar")("calledBy",t.crossSellComp)("configObj",t.configObj)}}function Age(e,t){if(1&e&&(Ef(0),ph(1,Ige,2,5,"div",13),Df()),2&e){let e=t.$implicit,i=Yf(2);Vd(),zh("ngIf",i.isItemAvailable(e))}}function kge(e,t){if(1&e){let e=Mf();kf(0,"div",3),Tf(1,"div",4),kf(2,"div",5)(3,"span",6),am(4),xf(),kf(5,"div",7)(6,"button",8),jf("click",(function(){return Wa(e),Ha(Yf().closeCrossSell())})),So(),kf(7,"svg",9),Tf(8,"path",10),xf()()()(),Co(),kf(9,"div",11),ph(10,Age,2,1,"ng-container",12),xf()()}if(2&e){let e=Yf();Vd(4),lm(e.crossSellTitle),Vd(6),zh("ngForOf",e.products)}}function xge(e,t){1&e&&(Ef(0),Tf(1,"div",23),Df())}function Tge(e,t){if(1&e&&(kf(0,"div",25),Tf(1,"product-item-al-v1",26),xf()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(),zh("data",e)("enableDstV2Theme",t.enableDstV2Theme)("isAnyProductHasAddlInfo",t.checkAnyArProductInRow(e))("ngClass",t.checkAnyArProductInRow(e)?"product-card-container--with-ar":"product-card-container--with-out-ar")("calledBy",t.crossSellComp)("configObj",t.configObj)}}function Pge(e,t){if(1&e&&(Ef(0),ph(1,Tge,2,6,"div",24),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngIf",i.isItemAvailable(e))}}function Ege(e,t){if(1&e&&(Ef(0),ph(1,Pge,2,1,"ng-container",12),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.products)}}function Dge(e,t){if(1&e&&(Ef(0),kf(1,"div",27)(2,"div",28),Tf(3,"product-carousel-al-v1",29),xf()(),Df()),2&e){let e=Yf(2);Vd(3),zh("enableProductDetailsPath",!0)("carouselProducts",e.products)("carouselProductsOffers",Dm(12,Cge))("configObj",e.configObj),gh("data-lazy-component","product-carousel")("data-carousel-type","bpncurated")("data-carousel-behaviour","bia-crossSell")("data-carousel-action","qty-stepper")("data-carousel-max-products",14)("data-navigation-type","page-by-page")("data-include-offer",!1)("data-seller-type","abs")}}function Oge(e,t){1&e&&(Ef(0),kf(1,"div",30),Tf(2,"div",31),kf(3,"div",32),am(4,"Sorry, but we can't find any similar items at this time. "),xf()(),Df())}function Bge(e,t){if(1&e){let e=Mf();kf(0,"div",16),ph(1,xge,2,0,"ng-container",17),kf(2,"div",18)(3,"h3",19),am(4),xf(),kf(5,"button",20),jf("click",(function(){return Wa(e),Ha(Yf().onCloseButtonClick())})),Tf(6,"span",21),xf()(),kf(7,"div",22),ph(8,Ege,2,1,"ng-container",17)(9,Dge,4,13,"ng-container",17)(10,Oge,5,0,"ng-container",17),xf()()}if(2&e){let e=Yf();Vd(),zh("ngIf",!1===e.enableDynamicGridView),Vd(3),lm(e.crossSellTitle),Vd(3),zh("ngClass","bia-lp"!=e.placement?e.row:""),Vd(),zh("ngIf","bia-lp"!=e.placement),Vd(),zh("ngIf","bia-lp"==e.placement&&e.availableProducts&&e.availableProducts.length>0),Vd(),zh("ngIf","bia-lp"==e.placement&&(!e.availableProducts||0==e.availableProducts.length))}}var Mge=(()=>{class e{constructor(e,t,i,n){this._appConfigService=e,this._featureFlagService=t,this.cdr=i,this._commonService=n,this.enableDstV2Theme=!1,this.enableGenericGridView=!1,this.enableDynamicGridView=!1,this.placement="",this.crossSellOpen=!1,this.arProductsArray=[],this.subscription=new Ye,this.configObj={appName:null,programType:"abs"},this.isB2B=window.AB&&window.AB.userInfo&&"B"===window.AB.userInfo.siteType,this.checkAnyProductHasArEnabled=e=>!(!e||!this.isArEnable)&&e.some((e=>e.isArProduct)),this.getNextSibling=function(e,t){return $(e)?.nextAll(t).first()}
1,this.enableDstV2Theme=this._featureFlagService.hasPageV2Theme()}ngOnInit(){this.configObj.programType=this.isB2B?"1P_B2B":this.configObj.programType,this._checkIsArEnable(),this.getCrossSellDataFromAL(),this._appConfigService.$crossSellTarget.subscribe((e=>{if(this.crossSellOpen&&!1===this.enableDynamicGridView?this.clearCrossSell():this.crossSellOpen&&!0===this.enableDynamicGridView&&this.closeDynamicGridCrossSell(),this.products=e.products,this.availableProducts=this.products?.filter(this._appConfigService.isItemAvailable_v3Predicate),this.bpn=e.bpn,this.placement=e?.placement?e.placement:"",this.enableBiaOosUi="bia-lp"==this.placement,this.placement&&"bia-lp"==this.placement&&(document.getElementById("allAlertCSS").innerHTML+=".product-carousel-theme2{background-color:unset!important}"),this.loadCrossSellContainer(),this.enableDstV2Theme?this.caret=document.getElementsByClassName("cross-sell__caret")[0]:this.caret=document.getElementsByClassName("cross-sell-caret")[0],this.products){this.arProductsArray=this.chunkArray([...this.products]),window.crossSellComponentRef={products:this.products,forBPN:this.bpn},this.crossSellTitle=this.placement&&"bia-lp"==this.placement?"Similar Items":"Customers Also Bought",this.crossSellOpen=!0,this.crossSell=document.getElementById("cross-sell-container"),this.crossSell.classList.add("cross-sell-product-"+this.bpn);let e=document.getElementsByClassName("cross-sell-placeholder-"+this.bpn)[0];this.getNextSibling(e,".cross-sell-row")?.append(this.crossSell),this.crossSell.classList.remove("cross-sell-container-hide"),this.position=e?.getAttribute("data-cross-sell-position"),!0===this.enableDstV2Theme&&!1===this.enableDynamicGridView?this.caret.classList.add("cross-sell__caret--position"+this.position):!1===this.enableDstV2Theme&&!1===this.enableDynamicGridView&&this.caret.classList.add("position-"+this.position)}else if(this.placement&&"bia-lp"==this.placement){this.crossSellTitle=this.placement&&"bia-lp"==this.placement?"Similar Items":"Customers Also Bought",this.crossSellOpen=!0,this.crossSell=document.getElementById("cross-sell-container"),this.crossSell.classList.add("cross-sell-product-"+this.bpn);let e=document.getElementsByClassName("cross-sell-placeholder-"+this.bpn)[0];this.getNextSibling(e,".cross-sell-row")?.append(this.crossSell),this.crossSell.classList.remove("cross-sell-container-hide"),this.position=e?.getAttribute("data-cross-sell-position"),this.enableDstV2Theme?this.caret.classList.add("cross-sell__caret--position"+this.position):!1===this.enableDstV2Theme&&!1===this.enableDynamicGridView&&this.caret.classList.add("position-"+this.position)}else this.crossSellOpen&&!this.crossSell.classList.contains("cross-sell-container-hide")&&(window.crossSellComponentRef={products:[],forBPN:this.bpn},this.crossSell.classList.add("cross-sell-container-hide"),this.crossSellOpen=!1)}),(e=>{window.crossSellComponentRef={products:[],forBPN:this.bpn}})),this._appConfigService.$crossSellClose.subscribe((e=>{this.closeCrossSell()}))}ngOnDestroy(){this.subscription.unsubscribe()}_checkIsArEnable(){window.AB.arFlagLoaded?this.isArEnable=window.AB.arFlag.display:this._appConfigService.canTriggerProductsCall()?this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag.display}))):this.isArEnable=!1}loadCrossSellContainer(){if(this.crossSellContainer.length>0&&(this.crossSellContainer.clear(),this.cdr.detectChanges()),!0===this.enableDstV2Theme)this.crossSellContainer.createEmbeddedView(this.DSTV2Template);else this.crossSellContainer.createEmbeddedView(this.defaultTemplate)}onCloseButtonClick(){!0!==this.enableDynamicGridView?this.closeCrossSell():this.closeDynamicGridCrossSell()}chunkArray(e){let t=window.innerWidth<768?2:4;for(var i=[];e.length;)i.push(e.splice(0,t));return i}checkAnyArProductInRow(e){let t=this.arProductsArray?this.arProductsArray.find((t=>t.find((t=>t.upc===e.upc)))):[];return!!t&&this.checkAnyProductHasArEnabled(t)}closeCrossSell(){this.clearCrossSell(),this.crossSell.classList.add("cross-sell-container-hide"),this.crossSellOpen=!1,window.crossSellComponentRef={products:[],forBPN:""}}closeCrossSellBIA(){this.crossSell||(this.crossSell=document.getElementById("cross-sell-container")),this.caret||(this.caret=document.getElementsByClassName("cross-sell__caret")[0]),this.clearCrossSell(),this.crossSell.classList.add("cross-sell-container-hide"),this.crossSellOpen=!1,window.crossSellComponentRef={products:[],forBPN:""},document.getElementsByClassName("cross-sell-holder-container")[0]?.append(this.crossSell)}closeDynamicGridCrossSell(){this.crossSell||(this.crossSell=document.getElementById("cross-sell-container")),this.clearCrossSell(),this.crossSell.classList.add("cross-sell-container-hide"),this.crossSellOpen=!1,window.crossSellComponentRef={products:[],forBPN:""},document.getElementsByClassName("cross-sell-holder-container")[0]?.append(this.crossSell)}clearCrossSell(){!0!==this.enableDynamicGridView&&this.caret.classList.remove("position-"+this.position,"cross-sell__caret--position"+this.position),this.crossSell.classList.remove("cross-sell-product-"+this.bpn)}isItemAvailable(e){return this.enableBiaOosUi?this._appConfigService.isItemAvailable_v3(e):this._appConfigService.isItemAvailable_v2(e)}getCrossSellDataFromAL(){this._commonService.$crossSellTarget.subscribe((e=>{this._appConfigService.crossSellTargetSource.next(e)})),this._commonService.$crossSellClose.subscribe((e=>{this._appConfigService.crossSellCloseSource.next(e)}))}static{this.ɵfac=function(t){return new(t||e)($d(hP),$d(uP),$d(kg),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["cross-sell"]],viewQuery:function(e,t){if(1&e&&(tm(wge,7,yp),tm(_ge,7,Yu),tm(Sge,7,Yu)),2&e){let e;im(e=nm())&&(t.crossSellContainer=e.first),im(e=nm())&&(t.defaultTemplate=e.first),im(e=nm())&&(t.DSTV2Template=e.first)}},inputs:{enableDynamicGridView:"enableDynamicGridView"},decls:6,vars:0,consts:[["crossSellContainer",""],["defaultTemplate",""],["DSTV2Template",""],["id","cross-sell","role","regi
1on","aria-labelledby","cross-sell-title","tabindex","-1",1,"cross-sell-wrapper"],[1,"cross-sell-caret"],[1,"cross-sell-header"],[1,"title"],[1,"close"],["tabindex","0","aria-label","close",1,"close-btn",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 20.13 19.5",1,"svg-icon","svg-icon-Close"],["d","M13.9,12.2V12l7.7-7.1.1-.1a1.3,1.3,0,0,0-.1-1.9,1.45,1.45,0,0,0-2.1,0L12.1,9.7l-7.5-7a1.57,1.57,0,0,0-2.2,0h0l-.1.1a1.51,1.51,0,0,0,.1,1.9l7.7,7.2v.2L2.4,19.2l-.1.1a1.3,1.3,0,0,0,.1,1.9,1.45,1.45,0,0,0,2.1,0l7.4-6.8,7.5,6.9a1.45,1.45,0,0,0,2.1,0l.1-.1a1.3,1.3,0,0,0-.1-1.9Z","transform","translate(-1.94 -2.25)"],[1,"row","gutters-items-v2","grid-wrapper","product-grid-v2","product-card-wrapper"],[4,"ngFor","ngForOf"],["class","col-6 col-sm-6 col-md-3 col-lg-3 col-xl-3",4,"ngIf"],[1,"col-6","col-sm-6","col-md-3","col-lg-3","col-xl-3"],[3,"data","isAnyProductHasAddlInfo","ngClass","calledBy","configObj"],["id","cross-sell","role","region",1,"cross-sell"],[4,"ngIf"],[1,"cross-sell__header"],[1,"cross-sell__title","title-sm"],["type","button","aria-label","Close Customers Also Bought","tabindex","0",1,"cross-sell__header__close-btn",3,"click"],[1,"svg-icon","svg-close"],[1,"cross-sell__products",3,"ngClass"],[1,"cross-sell__caret","svg-cross-sell-caret"],["class","col-6 col-sm-6 col-md-3 col-lg-3 col-xl-3 cross-sell__product",4,"ngIf"],[1,"col-6","col-sm-6","col-md-3","col-lg-3","col-xl-3","cross-sell__product"],[3,"data","enableDstV2Theme","isAnyProductHasAddlInfo","ngClass","calledBy","configObj"],[1,"master-product-carousel","section","static-carousel"],["data-qa","prd-crsl",1,"slick-product-carousel","clearfix"],[3,"enableProductDetailsPath","carouselProducts","carouselProductsOffers","configObj"],[1,"h-100","w-100","d-flex","flex-column","align-items-center"],[1,"svg-cross-sell-no-similar-items","cross-sell__no-items"],[1,"text-center","cross-sell__no-items-text"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,kge,11,2,"ng-template",null,1,Wm)(4,Bge,11,6,"ng-template",null,2,Wm))},dependencies:[sy,oy,cy,Sue,Vme],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Rge=(()=>{class e{constructor(e,t){this.appConfigService=e,this.document=t,this.instantCartViewStateSource=new kt,this.instantCartViewState$=this.instantCartViewStateSource.asObservable()}get window(){return this.document.defaultView||window}changeToInstantCartView(e){this.instantCartViewStateSource.next(e)}processZoneResponse(e){try{let t=JSON.parse(e.getAttribute("data-zone-response"));return this.window.AB?.DATALAYER&&this.window.AB.DATALAYER.setP13nExperimentExposure(t),{inStockProducts:this.getInStockProducts(t),responseData:t}}catch(e){return console.warn("Error processing zone response for smart basket: "+e.message),{inStockProducts:[],responseData:null}}}getInStockProducts(e){if(!e?.productsinfo?.length)return[];let t=this.collectOutOfStockIds(e);return e.productsinfo.filter((e=>!t.some((t=>t.bpn===e.id))))}collectOutOfStockIds(e){let t=e.productsinfo.filter((e=>!this.appConfigService.isItemAvailable_v3(e))).map((e=>({bpn:e.id})));if(this.appConfigService.isLSCompatible()){let e=this.getStoredOutOfStockData(),i=e?.data||[],n=new Map;[...t,...i].forEach((e=>{n.set(e.bpn,e)}));let r=Array.from(n.values());return this.updateOutOfStockStorage(r,e?.expirationTimeStamp),r}return t}getStoredOutOfStockData(){if(!1===this.appConfigService.isLSCompatible())return null;try{let e=this.window.localStorage.getItem("oosBPNs");return e?JSON.parse(e):null}catch(e){return console.warn("Error reading out-of-stock data from localStorage:",e),null}}updateOutOfStockStorage(e,t){if(!1!==this.appConfigService.isLSCompatible())try{let i={data:e,expirationTimeStamp:t||(new Date).getTime()+216e5};this.window.localStorage.setItem("oosBPNs",JSON.stringify(i))}catch(e){console.warn("Error updating out-of-stock storage:",e)}}static{this.ɵfac=function(t){return new(t||e)(lr(hP),lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),Lge=(()=>{class e{constructor(){this.AMVC_COOKIE_NAME="AMCV_A7BF3BC75245ADF20A490D4D@AdobeOrg",this._parseCookieData()}_parseCookieData(){let e,t,i,n,r,s={sessionId:"",tntId:"",marketingCloudVisitorId:""};if(e=window.SWY.CONFIGSERVICE.getCookie("mbox"),e.length>0){let t=e.split("#")[0];"PC"===t?(s.tntId=e.split("#")[1],s.sessionId=e.split("#")[3]):"session"===t&&(s.sessionId=e.split("#")[1],s.tntId=e.split("#")[3])}t=window.SWY.CONFIGSERVICE.getCookie(this.AMVC_COOKIE_NAME),t.length>0&&(i=t.split("|"),n=i.indexOf("MCMID"),r=i[n+1],s.marketingCloudVisitorId=r),console.debug("adobeUserContextService _parseCookieData parsed values : "+JSON.stringify(s)),this._setValue(s)}_setValue(e){this.adobeUserContext=e}getValue(){return this.adobeUserContext}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Fge=(()=>{class e{constructor(){}getTotalOffersCompleted(e,t){let i=0;return e.forEach((e=>{("C"===e.status&&1==e.offerComplete||!1===e.isClippable&&1==e.offerComplete)&&i++})),1==t.offerComplete&&i++,i}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Nge=["couponContainer"];function Uge(e,t){if(1&e&&(kf(0,"h1",8),am(1),xf()),2&e){let e=Yf();Vd(),cm("",e.offerCounter," Coupons Available")}}function Vge(e,t){if(1&e&&(kf(0,"h1",9),am(1),xf()),2&e){let e=Yf();Vd(),dm("",e.offersClipped," of ",e.offerCounter," Coupons Clipped")}}function qge(e,t){if(1&e&&(kf(0,"h1",10),am(1),xf()),2&e){let e=Yf();Vd(),dm("",e.offersCompleted," of ",e.offerCounter," Offers Completed")}}function $ge(e,t){if(1&e){let e=Mf();kf(0,"div",20)(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",24),am(5),xf(),kf(6,"a",25),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).openDetailsDrawer("offer-detail",t))}
1)),am(7,"Shop Deal"),xf()()}if(2&e){let e=Yf(2).$implicit,t=Yf(2);Vd(5),dm("",t.clippedLabel," : Add ",e.minPurchaseQty," Total for Offer"),Vd(),gh("aria-label","Shop Deal for "+e.ecomDescription)}}function jge(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"div",27),So(),kf(2,"svg",28)(3,"g",29)(4,"g",30),Tf(5,"polygon",31),xf()()()(),Co(),kf(6,"p",32),am(7,"Offer Complete!"),xf(),kf(8,"a",25),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).openDetailsDrawer("offer-detail",t))})),am(9,"Shop Deal"),xf()()}if(2&e){let e=Yf(2).$implicit;Vd(8),gh("aria-label","Shop Deal for "+e.ecomDescription)}}function zge(e,t){if(1&e&&(Ef(0),kf(1,"div",12,0)(3,"div",13)(4,"a",14),Tf(5,"img",15),xf(),kf(6,"div",16)(7,"p"),am(8),xf()()(),kf(9,"div",17),ph(10,$ge,8,3,"div",18)(11,jge,10,1,"div",19),xf()(),Df()),2&e){let e=Yf().$implicit,t=Yf(2);Vd(5),Jf("src",t.getImageUrl(t.couponListData.product.id,"desktop"),id),Vd(3),lm(e.ecomDescription),Vd(2),zh("ngIf",0==e.offerComplete),Vd(),zh("ngIf",1==e.offerComplete)}}function Wge(e,t){if(1&e){let e=Mf();kf(0,"div",20)(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",24),am(5),xf(),kf(6,"a",25),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).openDetailsDrawer("offer-detail",t))})),am(7,"Shop Deal"),xf()()}if(2&e){let e=Yf(2).$implicit,t=Yf(2);Vd(5),dm("",t.clippedLabel," : Add ",e.minPurchaseQty," Total for Offer"),Vd(),gh("aria-label","Shop Deal for "+e.ecomDescription)}}function Hge(e,t){if(1&e){let e=Mf();kf(0,"div",34)(1,"button",35),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).clipCoupon(t))})),am(2,"Clip Deal"),xf(),kf(3,"a",25),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).openDetailsDrawer("offer-detail",t))})),am(4,"Shop Deal"),xf()()}if(2&e){let e=Yf(2).$implicit;Vd(),gh("aria-label","Clip Deal for "+e.ecomDescription),Vd(2),gh("aria-label","Shop Deal for "+e.ecomDescription)}}function Yge(e,t){if(1&e){let e=Mf();kf(0,"div",26)(1,"div",27),So(),kf(2,"svg",28)(3,"g",29)(4,"g",30),Tf(5,"polygon",31),xf()()()(),Co(),kf(6,"p",32),am(7,"Offer Complete!"),xf(),kf(8,"a",25),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(2).openDetailsDrawer("offer-detail",t))})),am(9,"Shop Deal"),xf()()}if(2&e){let e=Yf(2).$implicit;Vd(8),gh("aria-label","Shop Deal for "+e.ecomDescription)}}function Gge(e,t){if(1&e&&(Ef(0),kf(1,"div",12,0)(3,"div",13)(4,"a",14),Tf(5,"img",15),xf(),kf(6,"div",16)(7,"p"),am(8),xf()()(),kf(9,"div",17),ph(10,Wge,8,3,"div",18)(11,Hge,5,2,"div",33)(12,Yge,10,1,"div",19),xf()(),Df()),2&e){let e=Yf().$implicit,t=Yf(2);Vd(5),Jf("src",t.getImageUrl(e.imageId),id),Vd(3),lm(e.ecomDescription),Vd(2),zh("ngIf","C"==e.status&&!1===e.deleted&&0==e.offerComplete),Vd(),zh("ngIf","U"==e.status||!0===e.deleted),Vd(),zh("ngIf","C"==e.status&&!1===e.deleted&&1==e.offerComplete)}}function Kge(e,t){if(1&e&&(Ef(0),ph(1,zge,12,4,"ng-container",7)(2,Gge,13,5,"ng-container",7),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",!e.isClippable&&e.ecomDescription),Vd(),zh("ngIf",e.isClippable)}}function Qge(e,t){if(1&e&&(Ef(0),ph(1,Kge,3,2,"ng-container",11),Df()),2&e){let e=Yf();Vd(),zh("ngForOf",e.couponListData.coupons)}}function Jge(e,t){if(1&e&&(Ef(0),kf(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",38),am(5),xf(),Df()),2&e){let e=Yf(2);Vd(5),lm(e.couponListData.product.promoText)}}function Zge(e,t){1&e&&(Ef(0),kf(1,"div",27),So(),kf(2,"svg",28)(3,"g",29)(4,"g",30),Tf(5,"polygon",31),xf()()()(),Co(),kf(6,"p",39),am(7,"Offer Complete!"),xf(),Df())}function Xge(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",12)(2,"div",13)(3,"a",14),Tf(4,"img",15),xf(),kf(5,"div",16)(6,"p"),am(7),xf()()(),kf(8,"div",36)(9,"div",37),ph(10,Jge,6,1,"ng-container",7)(11,Zge,8,0,"ng-container",7),kf(12,"a",25),jf("click",(function(){return Wa(e),Ha(Yf().openDetailsDrawer("bogo-detail"))})),am(13,"Shop Deal"),xf()()()(),Df()}if(2&e){let e=Yf();Vd(4),Jf("src",e.getImageUrl(e.couponListData.product.id,"desktop"),id),Vd(3),lm(e.couponListData.product.promoDescription),Vd(3),zh("ngIf",0==e.couponListData.product.offerComplete),Vd(),zh("ngIf",1==e.couponListData.product.offerComplete)}}var ebe=(()=>
1{class e{constructor(e,t,i,n,r,s,a){this._productCouponService=e,this._j4uService=t,this._appConfigService=i,this.cartService=n,this._couponListService=r,this._elementRef=s,this._commonService=a,this.clippedLabel=window.SWY.CONFIGSERVICE.nimbusConfig.couponActionTypes.CLD,this.offerCounter=0,this.offersClipped=0,this.offersCompleted=0,this.isBogoProduct=!1,this.imagePath="",this.couponFocusIndex=0,this.imagePath=window.AB.dMTProductCard}ngAfterViewInit(){this.couponContainer.changes.subscribe((()=>{this.setFocus()}))}ngOnInit(){this.isBogoProduct=!(!this.couponListData.product||!this.couponListData.product.promoType)&&("M"===this.couponListData.product.promoType||"B"===this.couponListData.product.promoType),this.offerCounter=this.couponListData.coupons?this.couponListData.coupons.length:0,this.setOfferClippedCouponsCounter(),this.isBogoProduct&&(this.offerCounter+=1),this._commonService.currentCartObj.subscribe((e=>{e&&this.couponListData.product&&(this.cartService.processOfferComplete(e,this.couponListData.coupons,this.couponListData.product),this.cartService.processBOGOComplete(e,this.couponListData.product),this.offersCompleted=this._couponListService.getTotalOffersCompleted(this.couponListData.coupons,this.couponListData.product))})),this._appConfigService.shopCouponRefresh.subscribe((e=>{e&&this.setOfferClippedCouponsCounter()})),console.warn("COUPON LIST: ",this.couponListData)}setOfferClippedCouponsCounter(){this.offersClipped=this.offerCounter>0?this._productCouponService.getOffersClipped(this.couponListData.coupons):0,this.isBogoProduct&&(this.offersClipped+=1)}getImageUrl(e,t){return t?this.imagePath.replace("${product.id}",e).replace("${viewport}",t):window.SWY.CONFIGSERVICE.nimbusConfig.couponImageBaseUrl+e}clipCoupon(e){if(this._isRegistered()){let t=window.AB.userInfo.branchId;window&&window.digitalData&&(window.digitalData.coupon={carouselSection:"offer-drawer"});let i={nativeElement:this._elementRef.nativeElement};this._j4uService.clipCoupon(e,t,i).subscribe((t=>{t&&t.items&&t.items[0]&&1===t.items[0].status&&(this.couponFocusIndex=this.couponListData.coupons.findIndex((t=>t.offerId==e.offerId)),this.setOfferClippedCouponsCounter(),this.offersCompleted=this._couponListService.getTotalOffersCompleted(this.couponListData.coupons,this.couponListData.product))}))}else window.rightDrawerComp.closeDrawer(),window.AB.COMMON.showSignInModal_OTP(window.location.href)}setFocus(){if(this.couponContainer.length>0){let e=this.couponContainer.toArray();e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-clipped-add-more-text")&&e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-clipped-add-more-text").focus(),e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-offer-complete-text")&&e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-offer-complete-text").focus()}}openDetailsDrawer(e,t){let i={};"offer-detail"===e?(i={type:e,coupon:t,product:this.couponListData.product,triggeredElement:"coupon-list"},this._updateAnalyticsLinkClick("offer-drawer-j4u-multiple")):"bogo-detail"===e&&(i={type:e,product:this.couponListData.product,triggeredElement:"coupon-list"},this._updateAnalyticsLinkClick("offer-drawer-bogo-multiple")),this._appConfigService.rightDrawerSource.next(i)}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}_updateAnalyticsLinkClick(e){let t="";0===this.offersClipped?(t=this.offerCounter+" Coupons Available",window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):this.offersClipped>0?(t=this.offersClipped+" of "+this.offerCounter+" Coupons Clipped",window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):window.AB.DATALAYER.setLinkClickEvents(e)}static{this.ɵfac=function(t){return new(t||e)($d(Pne),$d(PD),$d(hP),$d(Rw),$d(Fge),$d(Vl),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-list"]],viewQuery:function(e,t){if(1&e&&tm(Nge,5),2&e){let e;im(e=nm())&&(t.couponContainer=e)}},inputs:{couponListData:"couponListData"},features:[xm([Fge])],decls:8,vars:5,consts:[["couponContainer",""],["id","couponList",1,"coupon-list"],[1,"coupon-list-status-text"],["class","available",4,"ngIf"],["class","some-clipped",4,"ngIf"],["class","completed",4,"ngIf"],[1,"coupon-list-container-wrapper"],[4,"ngIf"],[1,"available"],[1,"some-clipped"],[1,"completed"],[4,"ngFor","ngForOf"],[1,"coupon-list-container"],[1,"coupon-list-details","col-9","col-sm-8","col-md-8","col-lg-9","col-xl-9"],[1,"coupon-list-image"],["alt","image","onError","this.style.display = 'none'",3,"src"],[1,"coupon-list-description"],["aria-live","polite",1,"coupon-list-status","col-3","col-sm-4","col-md-4","col-lg-3","col-xl-3"],["class","coupon-list-clipped-add-more",4,"ngIf"],["class","coupon-list-offer-completed",4,"ngIf"],[1,"coupon-list-clipped-add-more"],[1,"svg-deal-icon-container"],["xmlns","http://www.w3.org/2000/svg","stroke","#000","viewBox","0 0 13 13","aria-hidden","true","data-qa","svg-icn-deal",1,"svg-icon","svg-deal-icon","fl"],["fill-rule","evenodd","d","M8.627 2.551c-.193.186-.293.413-.293.67 0 .251.105.49.296.675.196.19.431.285.698.285.26 0 .507-.101.698-.285.196-.19.296-.417.296-.674 0-.25-.105-.49-.296-.674-.196-.19-.431-.286-.698-.286-.287 0-.517.095-.701.289zM6.816.856C7.174.71 7.497.64 7.803.64h2.834c.347 0 .677.133.953.386.255.233.395.558.395.915v2.752c0 .296-.073.608-.222.954-.153.353-.33.618-.542.81L6.319 11.22c-.253.244-.573.368-.95.368-.362 0-.685-.127-.935-.369L1.061 7.963c-.254-.245-.382-.554-.382-.918-.012-.34.108-.654.353-.92L5.96 1.382c.218-.21.498-.383.857-.526z"],["tabindex","-1",1,"coupon-list-clipped-add-more-text"],["href","javascript:void(0);","role","button",1,"coupon-list-shop-deal",3,"click"],[1,"coupon-list-offer-completed"],[1,"svg-check-mark-container"],["aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark","fl"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray","fill","#757575"],["id","GrayCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236","data-qa","gry-chk"],["tabindex","-1",1,"coupon-list-offer-complete-text"],["class","coupon-list-unclipped",4,"ngIf"],[1,"coupon-list-unclipped"],["role","button",1,"clip-deal-btn",3,"click"],[1,"coupon-list-status","col-3","col-sm-4","col-md-4","col-lg-3","col-xl-3"],[1,"coupon-list-bogo"],[1,"coupon-list-bogo-text"],[1,"coupon-list-bogo-complete-text"]],template:function(e,t){1&e&&(kf(0,"div",1)(1,"div",2),ph(2,Uge,2,1,"h1",3)(3,Vge,2,2,"h1",4)(4,qge,2,2,"h1",5),xf(),kf(5,"div",6),ph(6,Qge,2,1,"ng-container",7)(7,Xge,14,4,"ng-container",7),xf()()),2&e&&(Vd(2),zh("ngIf",0===t.offersCompleted&&0===t.offersClipped),Vd(),zh("ngIf",0===t.offersCompleted&&t.offersClipped>0),Vd(),zh("ngIf",t.offersCompleted>0),Vd(2),zh("ngIf",t.couponListData.coupons.length>0),Vd(),zh("ngIf",t.isBogoProduct))},dependencies:[oy,cy],encapsulation:2})}}return e})(),tbe=e=>({"offer-terms-condition":!0,collapsed:e}),ibe=e=>({collapse:!0,show:e});function nbe(e,t){1&e&&(kf(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),Tf(4,"div",6),xf()()()())}function rbe(e,t){if(1&e){let e=Mf();kf(0,"div",10),jf("keydown.enter",(function(){return Wa(e),Ha(Yf(2).backtoComponent())}))("click",(function(){return Wa(e),Ha(Yf(2).backtoComponent())})),Tf(1,"span",11),kf(2,"span",12),am(3,"back"),xf()()}}function sbe(e,t){if(1&e&&(kf(0,"div",16)(1,"div",17)(2,"div",18),So(),kf(3,"svg",19),Tf(4,"path",20),xf()(),Co(),kf(5,"p",21),am(6,"clipped"),xf()(),kf(7,"div",22)(8,"p",23),am(9),xf(
1),kf(10,"p",24),am(11),kf(12,"span",25),am(13,"Exp."),xf(),kf(14,"span",26),am(15,"Expiration"),xf(),am(16),qm(17,"date"),xf()()()),2&e){let e=Yf(4);Vd(9),lm(e.offer.ecomDescription),Vd(2),cm("",e.offerText," |Â "),Vd(5),cm(" ",jm(17,3,e.offer.endDate,"M/d"),"")}}function abe(e,t){if(1&e&&(kf(0,"div",27)(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"div",22)(7,"p",23),am(8),xf(),Tf(9,"img",33),kf(10,"span",34),am(11,"Offer Complete!"),xf()()()),2&e){let e=Yf(4);Vd(8),lm(e.offer.ecomDescription)}}function obe(e,t){if(1&e&&(Ef(0),kf(1,"div",13),ph(2,sbe,18,6,"div",14)(3,abe,12,1,"div",15),xf(),Df()),2&e){let e=Yf(3);Vd(2),zh("ngIf",!1===e.offer.offerComplete),Vd(),zh("ngIf",!0===e.offer.offerComplete)}}function lbe(e,t){if(1&e){let e=Mf();kf(0,"div",36)(1,"button",37),jf("click",(function(){return Wa(e),Ha(Yf(4).clipCoupon())})),xf(),kf(2,"div",22)(3,"p",23),am(4),xf(),kf(5,"p",38),am(6),kf(7,"span",25),am(8,"Exp."),xf(),kf(9,"span",39),am(10,"Expiration"),xf(),am(11),qm(12,"date"),xf()()()}if(2&e){let e=Yf(4);Vd(),gh("aria-label","Clip coupon for "+e.offer.ecomDescription)("aria-describedby","offer-exp"+e.offer.offerId),Vd(3),lm(e.offer.ecomDescription),Vd(),Jf("id","offer-exp"+e.offer.offerId),Vd(),cm("",e.offerText," - "),Vd(5),cm(" ",jm(12,6,e.offer.endDate,"M/d"),"")}}function cbe(e,t){if(1&e&&(kf(0,"div",16)(1,"div",17)(2,"div",18),So(),kf(3,"svg",19),Tf(4,"path",20),xf()(),Co(),kf(5,"p",21),am(6,"clipped"),xf()(),kf(7,"div",22)(8,"p",23),am(9),xf(),kf(10,"p",24),am(11),kf(12,"span",40),am(13,"Exp."),xf(),kf(14,"span",26),am(15,"Expiration"),xf(),am(16),qm(17,"date"),xf()()()),2&e){let e=Yf(4);Vd(9),lm(e.offer.ecomDescription),Vd(2),cm("",e.offerText," |Â "),Vd(5),cm(" ",jm(17,3,e.offer.endDate,"M/d"),"")}}function dbe(e,t){if(1&e&&(kf(0,"div",27)(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"div",22)(7,"p",23),am(8),xf(),Tf(9,"img",33),kf(10,"span",34),am(11,"Offer Complete!"),xf()()()),2&e){let e=Yf(4);Vd(8),lm(e.offer.ecomDescription)}}function ube(e,t){if(1&e&&(Ef(0),kf(1,"div",13),ph(2,lbe,13,9,"div",35)(3,cbe,18,6,"div",14)(4,dbe,12,1,"div",15),xf(),Df()),2&e){let e=Yf(3);Vd(2),zh("ngIf","U"===e.offer.status||!0===e.offer.deleted),Vd(),zh("ngIf","C"===e.offer.status&&!1===e.offer.deleted&&!1===e.offer.offerComplete),Vd(),zh("ngIf","C"===e.offer.status&&!1===e.offer.deleted&&!0===e.offer.offerComplete)}}function pbe(e,t){if(1&e&&(Ef(0),ph(1,obe,4,2,"ng-container",1)(2,ube,5,3,"ng-container",1),Df()),2&e){let e=Yf(2);Vd(),zh("ngIf",!e.offer.isClippable),Vd(),zh("ngIf",e.offer.isClippable)}}function hbe(e,t){if(1&e&&(Ef(0),kf(1,"div",17)(2,"div",18),So(),kf(3,"svg",19),Tf(4,"path",20),xf()()(),Co(),kf(5,"div",42)(6,"p",43),am(7),xf(),kf(8,"p",44),am(9),kf(10,"span",25),am(11,"Exp."),xf(),kf(12,"span",45),am(13,"Expiration"),xf(),am(14),qm(15,"date"),xf()(),Df()),2&e){let e=Yf(3);Vd(7),lm(e.bogoText),Vd(2),cm("",e.bogoTextDetail," | "),Vd(5),cm(" ",jm(15,3,e.product.promoEndDate,"M/d"),"")}}function fbe(e,t){if(1&e&&(Ef(0),kf(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"div",42)(7,"p",43),am(8),xf(),Tf(9,"img",46),kf(10,"span",47),am(11,"Offer Complete!"),xf()(),Df()),2&e){let e=Yf(3);Vd(8),lm(e.bogoText)}}function mbe(e,t){if(1&e&&(Ef(0),kf(1,"div",41),ph(2,hbe,16,6,"ng-container",1)(3,fbe,12,1,"ng-container",1),xf(),Df()),2&e){let e=Yf(2);Vd(2),zh("ngIf",0==e.product.offerComplete),Vd(),zh("ngIf",1==e.product.offerComplete)}}function gbe(e,t){if(1&e){let e=Mf();kf(0,"div",48)(1,"div",49)(2,"a",50),jf("click",(function(){return Wa(e),Ha(Yf(2).toggleAccordion())})),kf(3,"span",51),am(4,"Offer Terms and Conditions"),xf(),Tf(5,"span",52),xf()(),kf(6,"div",53)(7,"div",54)(8,"div",55),am(9),xf(),kf(10,"div",56)(11,"span",57),am(12,"Disclaimer: "),xf()()()()()}if(2&e){let e=Yf(2);Vd(2),zh("ngClass",Om(4,tbe,0==e.showAccordion)),gh("aria-expanded",e.showAccordion),Vd(4),zh("ngClass",Om(6,ibe,1==e.showAccordion)),Vd(3),lm(e.detail)}}function bbe(e,t){if(1&e&&(Ef(0),kf(1,"div",7),ph(2,rbe,4,0,"div",8)(3,pbe,3,2,"ng-container",1)(4,mbe,4,2,"ng-container",1)(5,gbe,13,8,"div",9),xf(),Df()),2&e){let e=Yf();Vd(2),zh("ngIf","coupon-list"===e.TriggerElement||"mini-cart"===e.TriggerElement),Vd(),zh("ngIf",e.offer),Vd(),zh("ngIf",void 0===e.offer&&e.product&&("M"===e.product.promoType||"B"===e.product.promoType)&&e.validateBogoTexts()),Vd(),zh("ngIf",e.offer&&e.offer.isClippable)}}var ybe=(()=>{class e{constructor(e,t,i,n,r,s){this._offerDetailService=e,this._j4uService=t,this.cartService=i,this._featureFlagService=n,this._commonService=r,this._elementRef=s,this.backtoTriggeredComponent=new _l,this.showAccordion=!1,this.offerText="",this.isDisclaimerLoaded=!1,this.showSpinner=!1}ngOnInit(){this.setBogoText(),this.offer&&(this.showSpinner=!0,"coupon-carousel"===this.TriggerElement?this.offerText=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[this.offer.usageType]:this.offerText=`Add ${this.offer.minPurchaseQty} Total for Offer`,this.offerDisclaimerExFrgPath=window.AB.offerDisclaimerXfPath,this._offerDetailService.getOfferDetailData(this.offer.offerId,this.offer.offerPgm).subscribe({next:e=>{e&&(this.detail=e.offerDetail.details?e.offerDetail.details:"",this.offer.ecomDescription=e.offerDetail.ecomDescription?e.offerDetail.ecomDescription:"",this.offer.isClippable=!0!==e.offerDetail.isClippable&&!1!==e.offerDetail.isClippable||e.offerDetail.isClippable,this.showSpinner=!1)},error:e=>{}}),this.offer.status||(this.offer.status="U")),this._commonService.currentCartObj.subscribe((e=>{if(e)if(this.offer){let t=[];t.push(this.offer),this.cartService.processOfferComplete(e,t,this.product)}else this.cartService.processBOGOComplete(e,this.product)}))}toggleAccordion(){this.isDisclaimerLoaded?this.showAccordion=!this.showAccordion:this._offerDetailService.getOfferDisclaimerTemplate(this.offerDisclaimerExFrgPath).subscribe((e=>{e&&($(".offer-detail-v2 .offer-disclaimer").append(e),this.showAccordion=!0,this.isDisclaimerLoaded=!0)}))}clipCoupon(){if(this._isRegistered()){let e=window.AB.userInfo.branchId,t={nativeElement:this._elementRef.nativeElement};this._j4uService.clipCoupon(this.offer,e,t).subscribe((e=>
1{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.offer.status="C")}))}else window.rightDrawerComp.closeDrawer(),window.AB.COMMON.showSignInModal_OTP(window.location.href)}backtoComponent(){let e=this.offer?this.offer:null;this.backtoTriggeredComponent.emit(e)}_isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}validateBogoTexts(){return this.bogoText.length>0&&this.bogoTextDetail.length>0}setBogoText(){this.bogoText=this.product.promoDescription?`${this.product.promoDescription}`:"",this.bogoTextDetail=this.product.promoText?this.product.promoText:""}static{this.ɵfac=function(t){return new(t||e)($d(F3),$d(PD),$d(Rw),$d(uP),$d(Bw),$d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["offer-detail-v2"]],inputs:{offer:"offer",product:"product",TriggerElement:"TriggerElement"},outputs:{backtoTriggeredComponent:"backtoTriggeredComponent"},features:[xm([F3])],decls:2,vars:2,consts:[["id","loadingConSmall","class","loading-div-small",4,"ngIf"],[4,"ngIf"],["id","loadingConSmall",1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"offer-detail-v2"],["class","back-btn-container","tabindex","0","role","button","data-qa","bck-btn",3,"keydown.enter","click",4,"ngIf"],["class","card",4,"ngIf"],["tabindex","0","role","button","data-qa","bck-btn",1,"back-btn-container",3,"keydown.enter","click"],["aria-hidden","true","role","img","data-qa","bck-arrow",1,"back-arrow"],["data-qa","back-btn",1,"back-btn"],[1,"offer-info-container"],["class","offer-clipped",4,"ngIf"],["class","offer-completed",4,"ngIf"],[1,"offer-clipped"],[1,"status-container"],[1,"deal-icon-container"],["xmlns","http://www.w3.org/2000/svg","stroke","#000","viewBox","0 0 13 13","aria-hidden","true","data-qa","svg-icn-deal",1,"svg-icon","svg-deal-icon","fl"],["fill-rule","evenodd","d","M8.627 2.551c-.193.186-.293.413-.293.67 0 .251.105.49.296.675.196.19.431.285.698.285.26 0 .507-.101.698-.285.196-.19.296-.417.296-.674 0-.25-.105-.49-.296-.674-.196-.19-.431-.286-.698-.286-.287 0-.517.095-.701.289zM6.816.856C7.174.71 7.497.64 7.803.64h2.834c.347 0 .677.133.953.386.255.233.395.558.395.915v2.752c0 .296-.073.608-.222.954-.153.353-.33.618-.542.81L6.319 11.22c-.253.244-.573.368-.95.368-.362 0-.685-.127-.935-.369L1.061 7.963c-.254-.245-.382-.554-.382-.918-.012-.34.108-.654.353-.92L5.96 1.382c.218-.21.498-.383.857-.526z"],[1,"clipped-status"],[1,"offer-details"],["role","heading","aria-level","1","data-qa","offr-dscptn",1,"offer-description"],["data-qa","offr-exp",1,"offer-exp"],["aria-hidden","true"],[1,"sr-only"],[1,"offer-completed"],[1,"svg-check-mark-container"],["aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark","fl"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray","fill","#757575"],["id","GrayCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236","data-qa","gry-chk"],["src","/etc/designs/wcax-commons/images/icons/partypopper.png","alt","","data-qa","prty-icn",1,"party-icon"],["data-qa","offr-cmplt-txt",1,"offer-complete-text"],["class","offer-unclipped",4,"ngIf"],[1,"offer-unclipped"],["role","button",1,"clip-btn",3,"click"],["data-qa","offr-exp",1,"offer-exp",3,"id"],["data-qa","exp-dt",1,"sr-only"],["aria-hidden","true","data-qa","exp-dt"],[1,"bogo-info-container"],[1,"bogo-details"],["role","heading","aria-level","1","data-qa","bgo-dscptn",1,"bogo-description"],["data-qa","bgo-exp",1,"bogo-exp"],["data-qa","bgo-exp-date",1,"sr-only"],["src","/etc/designs/wcax-commons/images/icons/partypopper.png","alt","","data-qa","bgo-prty-icn",1,"party-icon"],["data-qa","bgo-offr-cmplt-txt",1,"offer-complete-text"],[1,"card"],["id","offerTermsHeader",1,"card-header"],["role","button","href","javascript:void(0);","aria-controls","offerTermsBody",3,"click","ngClass"],["role","heading","aria-level","2","data-qa","offr-trms-txt",1,"offer-terms-text"],["aria-hidden","true","role","img","data-qa","svg-icn-arrow-dwn",1,"svg-icon","svg-icon-Arrow_down_black"],["id","offerTermsBody","aria-labelledby","offerTermsHeader",3,"ngClass"],[1,"card-body"],[1,"offer-terms-text"],[1,"offer-disclaimer"],[1,"disclaimer-heading"]],template:function(e,t){1&e&&ph(0,nbe,5,0,"div",0)(1,bbe,6,4,"ng-container",1),2&e&&(zh("ngIf",t.showSpinner),Vd(),zh("ngIf",!t.showSpinner))},dependencies:[sy,cy,Ty],encapsulation:2})}}return e})(),vbe=(()=>{class e{constructor(){this.tooltipMessage=new Tt(""),this.tooltipMessage$=this.tooltipMessage.asObservable(),this.showTooltip=new kt,this.showTooltip$=this.showTooltip.asObservable()}setTooltipMessage(e){this.tooltipMessage.next(e)}showTooltipMessage(){this.showTooltip.next(!0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function wbe(e,t){if(1&e){let e=Mf();kf(0,"div",4),jf("keydown.enter",(function(){return Wa(e),Ha(Yf().backtoComponent())}))("click",(function(){return Wa(e),Ha(Yf().backtoComponent())})),Tf(1,"span",5),kf(2,"span",6),am(3,"back"),xf()()}}function _be(e,t){if(1&e){let e=Mf();kf(0,"substitution-dst",7),jf("itemSelected",(function(t){return Wa(e),Ha(Yf().selectedItem(t))})),xf()}if(2&e){let e=Yf();zh("substitutionItemData",e.substitutionProducts)("itemId",e.productId)("product",e.product)("cartId",e.cartId)("orderId",e.orderId)("storeId",e.storeId)("token",e.token)("banner",e.banner)("zipCode",e.zipCode)("serviceType",e.serviceType)("quantity",e.quantity)("substitutePreference",e.substitutePreference)("editOrderFlag",e.editOrderFlag)("subConfirmFlag",!1)("isMiniCartFlag",e.fromMiniCart)}}function Sbe(e,t){1&e&&(kf(0,"div",8)(1,"div",9)(2,"div",10)(3,"div",11),Tf(4,"div",12),xf()()(),kf(5,"span",13),am(6,"Loading substitute products"),xf()())}var Cbe=(()=>{class e{constructor(e,t){this._substitionService=e,this._tooltipService=t,this.backtoTriggeredComponent=new _l,this.substitutionMessage="Your substitution has been updated.",this.substitutionProducts=[],this.dataInitialized=!1,this.cartId="",this.orderId="",this.storeId="",this.banner="",this.token="",this.zipCode="",this.serviceType="",this.quantity=1,this.substitutePreference="",this.editOrderFlag=!1,this.fromMiniCart=!0}ngOnInit(){this.editOrderFlag=window.AB.COMMON.checkPendingOrder(),this.editOrderFlag?(this.storeId=window.AB.COMMON.getCookie("OrderStoreId"),this.orderId=window.AB.COMMON.getCookie("OrderNumber")):(this.storeId=window.AB.userInfo.branchId,window.AB.COMMON.checkCartId("cartId")&&(this.cartId=window.AB.COMMON.getCartId("cartId"))),this.zipCode=window.AB.userInfo.zipcode,this.serviceType=window.AB.userInfo.preferenceMode&&window.AB.userInfo.preferenceMode.toLowerCase(),this.banner=window.AB.userInfo.banner,this.token=window.AB.userInfo.SWY_SHOP_TOKEN,this.fromMiniCart="mini-cart"===this.triggerElement,this.product&&(this.productId=this.product.id?this.product.id:this.product.itemId,this.quantity=this.product.qty,this.substitutePreference=this.product.substitutionPreferenceV2),this.get
1SubstitutionProducts(),$("#substitution-dst").show(),this._tooltipService.setTooltipMessage(this.substitutionMessage)}backtoComponent(e){"mini-cart"===this.triggerElement?this.backtoTriggeredComponent.emit({}):window.rightDrawerComp.closeDrawer(),e&&this._tooltipService.showTooltipMessage()}selectedItem(e){1!=e.initial&&this.backtoComponent(!0)}getSubstitutionProducts(){let e=window.AB.userInfo.houseId,t=this.getChannel(),i=this.product&&this.product.substituteItems&&this.product.substituteItems.length>0?this.product.substituteItems[0]:null,n="";i&&(n=i.id?i.id+"":i.itemId+""),this._substitionService.getSubstitutionProducts(this.productId,n,this.storeId,e,!1,!0,t).subscribe((e=>{this.substitutionProducts=e.map((e=>h({},e))),this.dataInitialized=!0,this.setAnalyticsSubstitutionInfo(this.substitutionProducts,this.substitutePreference)}),(e=>{this.substitutionProducts=[],this.dataInitialized=!0,this.setAnalyticsSubstitutionInfo(null,this.substitutePreference)}))}getChannel(){return window.AB.COMMON&&window.AB.COMMON.getUserChannel?window.AB.COMMON.getUserChannel():""}setAnalyticsSubstitutionInfo(e,t){window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setSubstitutionModalView(e,t)}static{this.ɵfac=function(t){return new(t||e)($d(fC),$d(vbe))}}static{this.ɵcmp=Qr({type:e,selectors:[["substitution-list"]],inputs:{product:"product",triggerElement:"triggerElement"},outputs:{backtoTriggeredComponent:"backtoTriggeredComponent"},decls:5,vars:3,consts:[["substitutionSpinner",""],[1,"substitution-list-wrapper"],["class","back-btn-container","tabindex","0","role","button",3,"keydown.enter","click",4,"ngIf"],[3,"substitutionItemData","itemId","product","cartId","orderId","storeId","token","banner","zipCode","serviceType","quantity","substitutePreference","editOrderFlag","subConfirmFlag","isMiniCartFlag","itemSelected",4,"ngIf","ngIfElse"],["tabindex","0","role","button",1,"back-btn-container",3,"keydown.enter","click"],["aria-hidden","true","role","img",1,"back-arrow"],["aria-label","Back to cart",1,"back-btn"],[3,"itemSelected","substitutionItemData","itemId","product","cartId","orderId","storeId","token","banner","zipCode","serviceType","quantity","substitutePreference","editOrderFlag","subConfirmFlag","isMiniCartFlag"],[1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],["aria-live","polite",1,"sr-only"]],template:function(e,t){if(1&e&&(kf(0,"div",1),ph(1,wbe,4,0,"div",2)(2,_be,1,15,"substitution-dst",3)(3,Sbe,7,0,"ng-template",null,0,Wm),xf()),2&e){let e=sm(4);Vd(),zh("ngIf","mini-cart"===t.triggerElement),Vd(),zh("ngIf",!0===t.dataInitialized)("ngIfElse",e)}},dependencies:[cy,XA],encapsulation:2})}}return e})(),Ibe=["rightDrawerContainer"],Abe=["miniCart"],kbe=["offerDetailV2"],xbe=["couponList"],Tbe=["bogoDetail"],Pbe=["substitutionList"],Ebe=["miniCartV2"];function Dbe(e,t){1&e&&Tf(0,"mini-cart-wrapper")}function Obe(e,t){if(1&e&&Tf(0,"mini-cart",8),2&e){zh("calledBy",Yf().calledBy)}}function Bbe(e,t){if(1&e){let e=Mf();kf(0,"div",9)(1,"offer-detail-v2",10),jf("backtoTriggeredComponent",(function(t){return Wa(e),Ha(Yf().loadTriggeredComponent(t))})),xf(),kf(2,"div",11)(3,"p",12),am(4,"Qualifying Product(s)"),xf(),Tf(5,"product-generic-grid",13),xf()()}if(2&e){let e=Yf();Vd(),zh("offer",e.coupon)("product",e.product)("TriggerElement",e.detailsDrawerTriggeredComponent),Vd(4),zh("dataValue",e.dataValue)}}function Mbe(e,t){if(1&e){let e=Mf();kf(0,"div",9)(1,"offer-detail-v2",14),jf("backtoTriggeredComponent",(function(t){return Wa(e),Ha(Yf().loadTriggeredComponent(t))})),xf(),kf(2,"div",11)(3,"p",12),am(4,"Qualifying Product(s)"),xf(),Tf(5,"product-generic-grid",15),xf()()}if(2&e){let e=Yf();Vd(),zh("product",e.product)("TriggerElement",e.detailsDrawerTriggeredComponent),Vd(4),zh("staticProducts",e.productList)}}function Rbe(e,t){if(1&e&&Tf(0,"coupon-list",16),2&e){zh("couponListData",Yf().couponListData)}}function Lbe(e,t){if(1&e){let e=Mf();kf(0,"substitution-list",17),jf("backtoTriggeredComponent",(function(t){return Wa(e),Ha(Yf().loadTriggeredComponent(t))})),xf()}if(2&e){let e=Yf();zh("product",e.product)("triggerElement",e.detailsDrawerTriggeredComponent)}}function Fbe(e,t){1&e&&(kf(0,"div",18)(1,"div",19)(2,"div",20)(3,"div",21),Tf(4,"div",22),xf()()()())}var Nbe=(()=>{class e{constructor(e,t,i,n,r){this.zone=e,this._appConfigService=t,this._featureFlagService=i,this.elementRef=n,this.renderer=r,this.calledBy="right-drawer",this.couponListData={},this.dataValue="",this.gridSource="drawer",this.renderingComponent="",this.productList=[],this.coupon={},this.showSpinner=!1,this.detailsDrawerTriggeredComponent="",window.rightdrawerCompRef={zone:e,component:this}}ngOnInit(){this._appConfigService.$rightDrawerSource.subscribe((e=>{switch(e.hasOwnProperty("type")&&(this.renderingComponent=e.type),!0){case e.hasOwnProperty("product")&&"substitution-list"===this.renderingComponent:this.product=h({},e.product),this.detailsDrawerTriggeredComponent=e.triggeredElement,window.rightDrawerComp.openRightFlyout("substitution-list");break;case e.hasOwnProperty("couponList")&&e.hasOwnProperty("product"):case e.hasOwnProperty("couponList")&&"coupon-list"===this.renderingComponent:this.couponListData.coupons=e.couponList,this.couponListData.product=e.product,window.rightDrawerComp.openRightFlyout("multiple-coupon");break;case e.hasOwnProperty("coupon")&&e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement"):this.dataValue=`{'c-products-by-upc-drawer': {'offerId': '${e.coupon.offerId}' }}`,this.coupon=h({},e.coupon),this.product=h({},e.product),this.detailsDrawerTriggeredComponent=e.triggeredElement,window.rightDrawerComp.openRightFlyout("single-coupon");break;case e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement"):this.product=h({},e.product),this.productList=[h({},e.product)],this.detailsDrawerTriggeredComponent=e.triggeredElement,window.rightDrawerComp.openRightFlyout("single-coupon")}this.loadComponents()}))}renderCouponComponents(e,t,i){this.renderingComponent=e,"coupon-list"===e?(this.couponListData.coupons=t,this.couponListData.product=i):"offer-detail"
1===e?(this.dataValue=`{'c-products-by-upc-drawer': {'offerId': '${t.offerId}' }}`,this.coupon=h({},t),this.product=h({},i)):"bogo-detail"===e&&(this.product=h({},i),this.productList=[h({},i)]),this.loadComponents()}loadComponents(e){switch(e&&(this.renderingComponent=e),$("right-drawer-al-v1").addClass("d-none"),this.renderer.removeClass(this.elementRef.nativeElement,"d-none"),this.updateCloseButton(this.renderingComponent),this.renderingComponent){case"mini-cart":case"default":this.removeExistingEmbeddedView(),this.rightDrawerContainer.createEmbeddedView(this.miniCartV2);break;case"coupon-list":this.renderComponent(this.couponList);break;case"offer-detail":this.renderComponent(this.offerDetailV2);break;case"bogo-detail":this.renderComponent(this.bogoDetail);break;case"substitution-list":this.renderComponent(this.substitutionList)}}updateCloseButton(e){let t=$(".sidebar-right-drawer .right-drawer__close");"mini-cart"==e?(t.addClass("mini-cart-v2-close-button"),t.css({"z-index":9999999}),window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled||(t.removeClass("d-none"),t.removeClass("d-lg-block"),$(".myaccount-flyout-wrapper")?.removeAttr("aria-hidden"))):t.removeClass("mini-cart-v2-close-button")}renderComponent(e){this.removeExistingEmbeddedView(),this.showSpinner=!0,setTimeout((()=>{this.rightDrawerContainer.createEmbeddedView(e),this.showSpinner=!1}),500)}removeExistingEmbeddedView(){this.rightDrawerContainer.length>0&&this.rightDrawerContainer.remove()}loadTriggeredComponent(e){switch(this.detailsDrawerTriggeredComponent){case"mini-cart":this.removeExistingEmbeddedView(),this.rightDrawerContainer.createEmbeddedView(this.miniCartV2),this.updateCloseButton("mini-cart"),this.handleADA();break;case"coupon-list":if(e){let t=this.couponListData.coupons.findIndex((t=>t.offerId==e.offerId));this.couponListData.coupons[t].status=e.status,this.couponListData.coupons[t].deleted=e.deleted}this.renderComponent(this.couponList),this.handleADA()}}handleADA(){let e=$(".right-drawer__close"),t=$(".menu-nav__mobile-menu-trigger .menu-nav__icon-container");switch(this.detailsDrawerTriggeredComponent){case"mini-cart":e.attr("aria-label","close shopping cart"),t.attr("aria-label","close shopping cart");break;case"coupon-list":e.attr("aria-label","close coupons list"),t.attr("aria-label","close coupons list")}window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled&&window.innerWidth<992?t.focus():e.focus()}static{this.ɵfac=function(t){return new(t||e)($d(Tl),$d(hP),$d(uP),$d(Vl),$d(dp))}}static{this.ɵcmp=Qr({type:e,selectors:[["right-drawer"]],viewQuery:function(e,t){if(1&e&&(tm(Ibe,7,yp),tm(Abe,7,Yu),tm(kbe,7,Yu),tm(xbe,7,Yu),tm(Tbe,7,Yu),tm(Pbe,7,Yu),tm(Ebe,7,Yu)),2&e){let e;im(e=nm())&&(t.rightDrawerContainer=e.first),im(e=nm())&&(t.miniCart=e.first),im(e=nm())&&(t.offerDetailV2=e.first),im(e=nm())&&(t.couponList=e.first),im(e=nm())&&(t.bogoDetail=e.first),im(e=nm())&&(t.substitutionList=e.first),im(e=nm())&&(t.miniCartV2=e.first)}},decls:15,vars:1,consts:[["rightDrawerContainer",""],["miniCartV2",""],["miniCart",""],["offerDetailV2",""],["bogoDetail",""],["couponList",""],["substitutionList",""],["id","loadingConSmall","class","loading-div-small",4,"ngIf"],[3,"calledBy"],[1,"offer-detail-v2-wrapper"],[3,"backtoTriggeredComponent","offer","product","TriggerElement"],[1,"product-grid-container"],["role","heading","aria-level","2","data-qa","qlfy-prd-txt",1,"qualifying-products-text"],["data-infinite-scroll-type","client","data-driven","catalog","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10","data-api-type","c-products-by-upc-drawer",3,"dataValue"],[3,"backtoTriggeredComponent","product","TriggerElement"],["data-infinite-scroll-type","client","data-driven","static","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10","data-api-type","s-bogo",3,"staticProducts"],[3,"couponListData"],[3,"backtoTriggeredComponent","product","triggerElement"],["id","loadingConSmall",1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,Dbe,1,0,"ng-template",null,1,Wm)(4,Obe,1,1,"ng-template",null,2,Wm)(6,Bbe,6,4,"ng-template",null,3,Wm)(8,Mbe,6,3,"ng-template",null,4,Wm)(10,Rbe,1,1,"ng-template",null,5,Wm)(12,Lbe,1,2,"ng-template",null,6,Wm)(14,Fbe,5,0,"div",7)),2&e&&(Vd(14),zh("ngIf",t.showSpinner))},dependencies:[cy,Ine,$ne,ebe,ybe,Cbe],encapsulation:2})}}return e})(),Ube=(()=>{class e{constructor(e,t){this._wcaxTooltipComponent=e,this._tooltipService=t}ngOnInit(){this._tooltipService.tooltipMessage$.subscribe((e=>{this.message=e})),this._tooltipService.showTooltip$.subscribe((()=>{this.childTooltipComponent&&this.childTooltipComponent.showTooltip()}))}static{this.ɵfac=function(t){return new(t||e)($d(ek),$d(vbe))}}static{this.ɵcmp=Qr({type:e,selectors:[["tooltip"]],viewQuery:function(e,t){if(1&e&&tm(ek,5),2&e){let e;im(e=nm())&&(t.childTooltipComponent=e.first)}},decls:2,vars:0,consts:[["aria-live","polite"]],template:function(e,t){1&e&&(kf(0,"div",0),Tf(1,"wcax-tooltip-dst"),xf())},dependencies:[ek],encapsulation:2})}}return e})(),Vbe=(()=>{class e{constructor(){this.defaultConfig={promo:{enabled:!1},link:{enabled:!1},title:{enabled:!1},subtitle:{enabled:!1},cta:{enabled:!1},cssModifiers:{}},this.config=h({},this.defaultConfig)}reset(){return this.config=h({},this.defaultConfig),this}withPromo(e){return this.config.promo={enabled:!0,text:e?.text,linkText:e?.linkText,backgroundColor:e?.backgroundColor,url:e?.linkUrl},this}withLink(e){return e?.text&&(this.config.link={enabled:!0,text:e?.text,url:e?.url,altText:e?.altText}),this}withTitle(e){return this.config.title={enabled:!0,text:e?.text},this}withSubtitle(e){return this.config.subtitle={enabled:!0,text:e?.text},this}withCta(e){return this.config.cta={enabled:!0,text:e?.text,url:e?.url,altText:e?.altText},this}build(){return this.buildCssModifiers(),h({},this.config)}getDefaultConfig(){return h({},this.defaultConfig)}buildCssModifiers(){this.config.cssModifiers={thumbnailContainerClass:this.calculateThumbnailContainerClass(this.config),ctaLinkClass:this.calculateCtaLinkClass(this.config)}}calculateThumbnailContainerClass(e){return e.link?.enabled?"smart-basket__thumbnail-container--followed-by-link":e.promo?.enabled?"smart-basket__thumbnail-container--followed-by-promo":"smart-basket__thumbnail-container--standalone"}calculateCtaLinkClass(e){return e.link?.enabled&&!e.promo?.enabled?"smart-basket__cta-link--standalone":"smart-basket__cta-link--followed-by-promo"}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),qbe=(()=>{class e{constructor(e){this.smartBasketBuilderService=e}
1buildSmartBasketTextPlateWithTransparent(e){return this.smartBasketBuilderService.reset().withTitle({text:e?.title}).withSubtitle({text:e?.subTitle}).withCta({text:e?.ctaText,altText:e?.ctaAltText,url:e?.ctaLink}).build()}buildSmartBasketWithLinkTextPlateWithTransparent(e){return this.smartBasketBuilderService.reset().withTitle({text:e?.title}).withSubtitle({text:e?.subTitle}).withCta({text:e?.ctaText,altText:e?.ctaAltText,url:e?.ctaLink}).withLink({text:e?.linkProps?.ctaText,url:e?.linkProps?.ctaLink,altText:e?.linkProps?.ctaAltText}).build()}buildSmartBasketWithPromoTextPlateWithTransparent(e){return this.smartBasketBuilderService.reset().withTitle({text:e?.title}).withSubtitle({text:e?.subTitle}).withCta({text:e?.ctaText,altText:e?.ctaAltText,url:e?.ctaLink}).withPromo({text:e?.smartBasketPromotion?.promoTitle,backgroundColor:e?.smartBasketPromotion?.promoBackgroundColor}).build()}buildSmartBasketWithLinkWithPromoTextPlateWithTransparent(e){return this.smartBasketBuilderService.reset().withTitle({text:e?.title}).withSubtitle({text:e?.subTitle}).withCta({text:e?.ctaText,altText:e?.ctaAltText,url:e?.ctaLink}).withLink({text:e?.linkProps?.ctaText,url:e?.linkProps?.ctaLink,altText:e?.linkProps?.ctaAltText}).withPromo({text:e?.smartBasketPromotion?.promoTitle,backgroundColor:e?.smartBasketPromotion?.promoBackgroundColor}).build()}buildSmartBasketWithLinkWithPromoWithLinkTextPlateWithTransparent(e){return this.smartBasketBuilderService.reset().withTitle({text:e?.title}).withSubtitle({text:e?.subTitle}).withCta({text:e?.ctaText,altText:e?.ctaAltText,url:e?.ctaLink}).withLink({text:e?.linkProps?.ctaText,url:e?.linkProps?.ctaLink,altText:e?.linkProps?.ctaAltText}).withPromo({text:e?.smartBasketPromotion?.promoTitle,linkText:e?.smartBasketPromotion?.ctaText,linkUrl:e?.smartBasketPromotion?.ctaLink,backgroundColor:e?.smartBasketPromotion?.promoBackgroundColor}).build()}buildConfiguration(e){switch(e?.designType){case"smartBasketTextPlateWithTransparent":return this.buildSmartBasketTextPlateWithTransparent(e);case"smartBasketWithLinkTextPlateWithTransparent":return this.buildSmartBasketWithLinkTextPlateWithTransparent(e);case"smartBasketWithPromoTextPlateWithTransparent":return this.buildSmartBasketWithPromoTextPlateWithTransparent(e);case"smartBasketWithLinkWithPromoTextPlateWithTransparent":return this.buildSmartBasketWithLinkWithPromoTextPlateWithTransparent(e);case"smartBasketWithLinkWithPromoWithLinkTextPlateWithTransparent":return this.buildSmartBasketWithLinkWithPromoWithLinkTextPlateWithTransparent(e);default:return this.smartBasketBuilderService.reset().withTitle({text:e.title||"Instant Grocery Basket"}).withSubtitle({text:e.subTitle||"Your frequently bought items"}).withCta({text:e.ctaText||"Add to cart",url:e.ctaLink||"shop/purchases/buy-it-again.html"}).build()}}static{this.ɵfac=function(t){return new(t||e)(lr(Vbe))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),$be=(()=>{class e{constructor(e){this.document=e,this.window=this.document.defaultView}setHref(e){this.window.location.href=e}getHref(){return this.window.location.href}reload(e=!1){this.window.location.reload()}replace(e){this.window.location.replace(e)}getHostname(){return this.window.location.hostname}getPathname(){return this.window.location.pathname}getSearch(){return this.window.location.search}getHash(){return this.window.location.hash}static{this.ɵfac=function(t){return new(t||e)(lr(Qg))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),jbe=["thumbnailContainer"],zbe=(e,t)=>t.id,Wbe=()=>({"content-wrapper-v2":!0}),Hbe=e=>({"qsc-v2-quick-start-title__small":e}),Ybe=e=>({"qsc-v2-quick-start-sub-title__small":e}),Gbe=(e,t,i)=>({"qsc-view-items-btn-top":e,"qsc-view-items-btn__large":t,"qsc-view-items-btn__small":i}),Kbe=e=>({"margin-right":e}),Qbe=e=>({"background-image":e}),Jbe=(e,t,i,n,r)=>({"product-v2__large":e,"product-v2__medium":t,"product-v2__small":i,"product-less-spacing":n,"product-more-spacing":r}),Zbe=(e,t,i,n,r)=>({"product-v2__large":e,"product-v2__medium":t,"product-v2__small more-products-v2__small":i,"product-less-spacing":n,"product-more-spacing":r}),Xbe=e=>({$implicit:e}),eye=(e,t)=>({config:e,linkMarginClass:t}),tye=e=>({config:e});function iye(e,t){if(1&e&&Tf(0,"div",23),2&e){let e=Yf().$implicit,t=Yf(4);zh("ngStyle",Om(1,Qbe,"url("+t.getImageUrl(e.id,"desktop")+")"))}}function nye(e,t){1&e&&Tf(0,"div",24)}function rye(e,t){if(1&e&&(Ef(0),ph(1,iye,1,3,"div",21)(2,nye,1,0,"div",22),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",e),Vd(),zh("ngIf",!e)}}function sye(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",16),am(2),xf(),kf(3,"div",17),am(4),xf(),kf(5,"div",18)(6,"div",12),ph(7,rye,3,2,"ng-container",13),kf(8,"div",19),am(9,"..."),xf()(),kf(10,"button",20),jf("click",(function(t){return Wa(e),Ha(Yf(3).onBannerClick(t))})),am(11),xf()(),Df()}if(2&e){let e=Yf(3);
1Vd(2),cm(" ",e.instantBasketDictionary._title," "),Vd(2),cm(" ",e.instantBasketDictionary._sub_title," "),Vd(3),zh("ngForOf",e.mainProductsToShow),Vd(3),gh("aria-label",e.instantBasketDictionary._CTA_title),Vd(),lm(e.instantBasketDictionary._CTA_title)}}function aye(e,t){if(1&e&&Tf(0,"div",26),2&e){let e=Yf().$implicit,t=Yf(3);zh("ngClass",Lm(2,Jbe,t.imageSize==t.ImageSizeEnum.Large,t.imageSize==t.ImageSizeEnum.Medium,t.imageSize==t.ImageSizeEnum.Small,t.lessSpacing,!t.lessSpacing))("ngStyle",Om(8,Qbe,"url("+t.getImageUrl(e.id,"desktop")+")"))}}function oye(e,t){if(1&e&&(Ef(0),ph(1,aye,1,10,"div",25),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",e)}}function lye(e,t){if(1&e&&(kf(0,"div",27),am(1),xf()),2&e){let e=Yf(3);zh("ngClass",Lm(2,Zbe,e.imageSize==e.ImageSizeEnum.Large,e.imageSize==e.ImageSizeEnum.Medium,e.imageSize==e.ImageSizeEnum.Small,e.lessSpacing,!e.lessSpacing)),Vd(),cm(" +",e.remainingProducts," ")}}function cye(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",28)(2,"span"),am(3,"Want more?"),xf(),am(4," Â "),kf(5,"a",29),jf("click",(function(){return Wa(e),Ha(Yf(3).analyticsTrackCTA("view-all-your-bia-items","link"))})),am(6," View all your Buy It Again items "),xf()(),Df()}}function dye(e,t){if(1&e){let e=Mf();kf(0,"div",5),jf("click",(function(t){return Wa(e),Ha(Yf(2).onBannerClick(t))})),kf(1,"div",6),ph(2,sye,12,5,"ng-container",7),Ef(3),kf(4,"div",8)(5,"div",9),am(6),xf(),kf(7,"div",10),am(8),xf()(),kf(9,"div",11)(10,"div",12),ph(11,oye,2,1,"ng-container",13)(12,lye,2,8,"div",14),xf(),kf(13,"button",15),jf("click",(function(t){Wa(e);let i=Yf(2);return i.analyticsTrackCTA(i.instantBasketDictionary._CTA_title,"button"),Ha(i.onBannerClick(t))})),am(14),xf()(),ph(15,cye,7,0,"ng-container",7),Df(),xf()()}if(2&e){let e=Yf(2);Vd(),zh("ngClass",Dm(13,Wbe)),Vd(),zh("ngIf",!e.enableDstV2Theme),Vd(3),zh("ngClass",Om(14,Hbe,e.bannerSize==e.BannerSizeEnum.Small)),Vd(),cm(" ",e.instantBasketDictionary._title," "),Vd(),zh("ngClass",Om(16,Ybe,e.bannerSize==e.BannerSizeEnum.Small||e.bannerSize==e.BannerSizeEnum.Large)),Vd(),cm(" ",e.displayMobileSubtitle?"Restock your essentials in 1 step":e.instantBasketDictionary._sub_title," "),Vd(3),zh("ngForOf",e.mainProductsToShow),Vd(),zh("ngIf",e.remainingProducts>0),Vd(),zh("ngClass",Mm(18,Gbe,e.bannerSize==e.BannerSizeEnum.Small||e.bannerSize==e.BannerSizeEnum.Medium||e.bannerSize==e.BannerSizeEnum.Large,e.bannerSize==e.BannerSizeEnum.Large,e.bannerSize==e.BannerSizeEnum.Small))("ngStyle",Om(22,Kbe,e.extraButtonMargin?"12px":null)),gh("aria-label",e.instantBasketDictionary._CTA_title),Vd(),cm("",e.instantBasketDictionary._CTA_title," "),Vd(),zh("ngIf",e.isHomeTargeted&&!e.hideBiaCta)}}function uye(e,t){if(1&e&&ph(0,dye,16,24,"div",4),2&e){let e=Yf();yf((null==e.products?null:e.products.length)>0?0:-1)}}function pye(e,t){1&e&&Of(0)}function hye(e,t){if(1&e&&ph(0,pye,1,0,"ng-container",30),2&e){let e=Yf(2);zh("ngTemplateOutlet",sm(3))("ngTemplateOutletContext",Om(2,Xbe,e.smartBasketConfig))}}function fye(e,t){if(1&e&&ph(0,hye,1,4,"ng-container"),2&e){yf(Yf().products.length>0?0:-1)}}function mye(e,t){if(1&e&&(kf(0,"div",41)(1,"picture"),Tf(2,"source",42)(3,"source",42)(4,"img",43),xf()()),2&e){let e=Yf().$implicit,t=Yf(2);Vd(2),Zf("media","(max-width: ",t.sm,")"),gh("data-srcset",t.getImageUrl(e.id,"mobile")),Vd(),Zf("media","(max-width: ",t.md,")"),gh("data-srcset",t.getImageUrl(e.id,"tablet")),Vd(),Jf("alt",e.name),zh("src",t.getImageUrl(e.id,"desktop"),id),gh("data-src",t.getImageUrl(e.id,"desktop"))}}function gye(e,t){if(1&e&&ph(0,mye,5,9,"div",41),2&e){yf(t.$index<Yf(2).numProductsCanDisplay?0:-1)}}function bye(e,t){if(1&e&&(kf(0,"div",40),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" +",e.products.length-e.numProductsCanDisplay," ")}}function yye(e,t){1&e&&Of(0)}function vye(e,t){if(1&e&&(bm(0),ph(1,yye,1,0,"ng-container",30)),2&e){let e=Yf().$implicit,t=vm(4);Yf();let i=sm(7),n=null==e||null==e.cssModifiers?null:e.cssModifiers.ctaLinkClass;Vd(),zh("ngTemplateOutlet",i)("ngTemplateOutletContext",Bm(2,eye,t,n))}}function wye(e,t){1&e&&Of(0)}function _ye(e,t){if(1&e&&ph(0,wye,1,0,"ng-container",30),2&e){Yf();let e=vm(3);Yf(),zh("ngTemplateOutlet",sm(5))("ngTemplateOutletContext",Om(2,tye,e))}}function Sye(e,t){if(1&e){let e=Mf();bm(0)(1)(2)(3)(4),kf(5,"div",31)(6,"div",32),jf("click",(function(){return Wa(e),Ha(Yf().seeProducts())})),kf(7,"div",33)(8,"div",34)(9,"div",35),am(10),xf(),kf(11,"div",36),am(12),xf()(),kf(13,"div",37)(14,"button",38),jf("click",(function(){Wa(e);let t=vm(2);return Ha(Yf().analyticsTrackCTA(t.text,"link"))})),am(15),xf()()(),bm(16),kf(17,"div",39,3),_f(19,gye,1,1,null,null,zbe),ph(21,bye,2,1,"div",40),xf()(),ph(22,vye,2,5,"ng-container")(23,_ye,1,4,"ng-container"),xf()}if(2&e){let e=t.$implicit,i=Yf(),n=null==e?null:e.title,r=null==e?null:e.subtitle;Vd(2);let s=ym(null==e?null:e.cta);Vd();let a=ym(null==e?null:e.promo);Vd();let o=ym(null==e?null:e.link);Vd(6),cm(" ",n.text," "),Vd(2),cm(" ",r.text," "),Vd(3),cm(" ",s.text," ");let l=null==e||null==e.cssModifiers?null:e.cssModifiers.thumbnailContainerClass;Vd(2),Kh(l),Vd(2),Cf(i.products),Vd(2),yf(i.products.length>i.numProductsCanDisplay?21:-1),Vd(),yf(o.enabled?22:-1),Vd(),yf(a.enabled?23:-1)}}function Cye(e,t){if(1&e&&(kf(0,"div",47),am(1),xf()),2&e){let e=Yf().config;Yh("mb-1",!(null==e||!e.linkText)),Vd(),cm(" ",null==e?null:e.text," ")}}function Iye(e,t){if(1&e){let e=Mf();kf(0,"div",46)(1,"a",48),jf("click",(function(){Wa(e);let t=Yf().config;return Ha(Yf().analyticsTrackCTA(null==t?null:t.linkText,"link",!0))})),am(2),xf()()}if(2&e){let e=Yf().config;Vd(),zh("href",null==e?null:e.url,id),Vd(),lm(null==e?null:e.linkText)}}function Aye(e,t){if(1&e&&(kf(0,"div",44),ph(1,Cye,2,3,"div",45)(2,Iye,3,2,"div",46),xf()),2&e){let e,i=t.config;Hh("background-color",null!==(e=null==i?null:i.backgroundColor)&&void 0!==e?e:null),Vd(),yf(null!=i&&i.text?1:-1),Vd(),yf(null!=i&&i.linkText?2:-1)}}function kye(e,t){if(1&e&&(kf(0,"div",49)(1,"a",50),am(2),xf()()),2&e){let e=t.config,i=t.linkMarginClass;Vd(),Kh(i),zh("href",null==e?null:e.url,id),Vd(),cm(" ",null==e?null:e.text," ")}}var xye=function(e){return e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Large=2]="Large",e}(xye||{}),Tye=function(e){return e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Large=2]="Large",e}(Tye||{}),Pye=(()=>{class e{onResize(e){if(this.products?.length>=1){if(this.enableSmartBasketV2){let t=e.target.innerWidth;return void this.handleV2SmartBasketResize(t)}
1this.setProductsSpacing(),this.setProducts()}}set config(e){this.setConfiguration(e)}constructor(e,t,i,n,r,s,a,o,l){this._elementRef=e,this._buyItAgainService=t,this._featureFlagService=i,this._appConfigService=n,this._instantGroceryBasketService=r,this._smartBasketDirectorService=s,this._cdRef=a,this._windowLocationService=o,this.document=l,this.instantBasketDictionary={_title:"",_sub_title:"",_CTA_title:"",_CTA_link:""},this.smartBasketConfig=null,this.mainProductsToShow=[],this.products=[],this.BannerSizeEnum=xye,this.ImageSizeEnum=Tye,this.isHomeTargeted=!1,this.enableSmartBasketV2=!1,this.sm="575px",this.md="768px",this.onSeeProductsClicked=new _l,this.window=this.document.defaultView,this.enableDstV2Theme=this._featureFlagService.hasPageV2Theme(),this.enableSmartBasketV2=!1===this._featureFlagService.getFeatureFlagByNameDisable("disableSmartBasketV2"),this.imagePath=this.window.AB.dMTProductCard}updateDomFlags(){this.hideBiaCta="true"===this._elementRef?.nativeElement?.parentNode?.parentNode?.getAttribute("data-hide-bia-cta"),this.isAemAuthored="true"===this._elementRef?.nativeElement?.getAttribute("data-aem-authored"),this.isHomeTargeted="true"===this._elementRef?.nativeElement?.parentNode?.parentNode?.getAttribute("data-home-targeted")}ngOnInit(){this.updateDomFlags(),this._appConfigService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&this.window.AB?.COMMON?.authorize()&&(this.enableSmartBasketV2?this.initSmartBasketV2():this._init())}))}ngAfterViewInit(){this.window.AB?.DATALAYER&&this.window.AB.DATALAYER.setSmartBasketImpressions(this.zoneNode),console.warn("After init")}getImageUrl(e,t){let i=this.imagePath;return i?i.replace("${product.id}",e).replace("${viewport}",t):""}seeProducts(){this.enableSmartBasketV2?this.seeSmartBasketProductsV2():this.seeSmartBasketProductsV1()}seeSmartBasketProductsV1(){if(this.isHomeTargeted){if(!this.hideBiaCta)return void this._windowLocationService.setHref("/shop/purchases/buy-it-again.html?view=instantCart&fromHp=true");this._instantGroceryBasketService.changeToInstantCartView(!0)}else this.isAemAuthored&&this._windowLocationService.setHref(this.instantBasketDictionary._CTA_link);this.onSeeProductsClicked.emit()}seeSmartBasketProductsV2(){this.hideBiaCta?this._instantGroceryBasketService.changeToInstantCartView(!0):this._windowLocationService.setHref(this.smartBasketConfig?.cta?.url)}setProducts(){this.setProductsAndStyling()}setProductsAndStyling(){this.displayMobileSubtitle=!1,this.extraButtonMargin=!1;let e=this.instantBasketElement.offsetWidth;this.setStyling(e);let t=this.calculateSliceIndex();this.mainProductsToShow=this.products.slice(0,t);let i=this.products.length-t;this.remainingProducts=i>0?i:0}analyticsTrackCTA(e,t,i){if(this.window.AB?.DATALAYER){let n=this._elementRef.nativeElement?window.AB.COMMON?.getSlotsInfo(this._elementRef.nativeElement):{section:"0",row:"0"},r=n.section<10?`0${n.section}`:n.section;this.window.AB.DATALAYER.setAnalyticsCrossPageData({action:"set",name:"analyticsFeatureTracking",data:"smartBasketACIP416781",isAcrossPages:!0}),this.window.AB.DATALAYER.analyticsCTATracking(`cta:${this.window.AB.DATALAYER.pathSections?.join(":")}|${t}|${i?"promotional-banner-":""}z${r||"00"}-qsc:${this.window.AB.DATALAYER.sanitizeAnalyticsText(e)}`)}}handleV2SmartBasketResize(e){let t=this.getLayoutConfig(e);if(!this.thumbnailContainer)return void(this.numProductsCanDisplay=0);let i=this.thumbnailContainer.nativeElement.clientWidth-t.containerPadding,n=t.
1imageWidth+t.imagePadding,r=Math.floor(i/n);if(r<this.products.length){let e=i-t.additionalProductsWidth;r=Math.floor(e/n)}r>9&&(r=9),this.numProductsCanDisplay=r}getLayoutConfig(e){let t=e>=768;return{imageWidth:t?72:56,containerPadding:t?48:2,imagePadding:t?16:2,additionalProductsWidth:t?64:48}}setStyling(e){this.setImageSize(),this.setBannerSizeAndExtraStyling(e)}setImageSize(){let e=this.window.innerWidth;this.imageSize=e<=767?Tye.Small:768<=e&&e<=1023?Tye.Medium:Tye.Large}setBannerSizeAndExtraStyling(e){e<=767?(e<=360&&(this.displayMobileSubtitle=!0),this.bannerSize=xye.Small):768<=e&&e<=1023?this.bannerSize=xye.Medium:1024<=e&&(this.bannerSize=xye.Large)}calculateSliceIndex(){let e=this.instantBasketElement.clientWidth,t=getComputedStyle(this.instantBasketElement),i=e-parseInt(t.paddingLeft),n=this.getProductImageWidth();this.lessSpacing?n+=8:n+=16;let r=i-this.getRemainingProductsWidth();return Math.floor(r/n)}getProductImageWidth(){return this.imageSize==Tye.Small?48:this.imageSize==Tye.Medium?72:80}getRemainingProductsWidth(){return this.imageSize==Tye.Small?40:64}_init(){if(this.isHomeTargeted)return this.zoneNode=this._elementRef?.nativeElement?.parentNode?.parentNode,void this.getProductsFromZoneResponse();if(this.isAemAuthored){let e=this._elementRef.nativeElement,t={title:e.getAttribute("data-title")||"Quick add",subtitle:e.getAttribute("data-sub-title")||"Restock your essentials in one step",cta:e.getAttribute("data-cta-text")||"View items",ctaLink:e.getAttribute("data-cta-link")||"/shop/purchases/buy-it-again.html?view=instantCart"};this.setConfiguration(t),this.getInstantCartProducts()}else this.getInstantCartProducts()}getProductsFromZoneResponse(){try{let e=JSON.parse(this.zoneNode.getAttribute("data-zone-response")),t={cta:e?.linkText,title:e?.carouselTitle,subtitle:e?.carouselSubTitle};this.setConfiguration(t),this.window.AB?.DATALAYER&&this.window.AB.DATALAYER.setP13nExperimentExposure(e);let i=JSON.parse(localStorage.getItem("oosBPNs")),n=i?.data,r=null,s=(e?.productsinfo?.filter((e=>!this._appConfigService.isItemAvailable_v3(e)))).map((e=>({bpn:e.id})));if(s){n&&(s=s.concat(n),r=i?.expirationTimeStamp);let e={data:s,expirationTimeStamp:r||(new Date).getTime()+216e5};localStorage.setItem("oosBPNs",JSON.stringify(e))}let a=e?.productsinfo?.filter((e=>!s.some((t=>t.bpn===e.id))));
1this.handleInstantCartResponse(a)}catch(e){console.warn("Error parsing zone response for smart basket"+e.error)}}processZoneResponse(){let{inStockProducts:e,responseData:t}=this._instantGroceryBasketService.processZoneResponse(this.zoneNode);this.smartBasketConfig=this._smartBasketDirectorService.buildConfiguration(t),this.products=e,this._cdRef.detectChanges(),this.handleV2SmartBasketResize(this.window.innerWidth)}getInstantCartProducts(){let e={apiUrl:`${this.window.SWY.CONFIGSERVICE.omsConfig["apim.api.purchase.purchases.basepath"]}/purchasehistory/smartbasket`,value:{category:"",pageNumber:0,pageSize:50,purchaseType:"",sortRule:null}};""!=this.adobeTargetGroup&&(e.value.excludeCartItems=!0),this._buyItAgainService.getInstantCartProducts(e).subscribe({next:e=>{this.window.AB?.DATALAYER&&this.window.AB.DATALAYER.setP13nExperimentExposure(e),e&&e.purchases&&!(e.purchases.length<1)&&(this.products=e.purchases,this._cdRef.detectChanges(),this.instantBasketElement=this.document.querySelector("instant-grocery-basket>div"),this.setProducts(),this.setProductsSpacing())},error:e=>{console.warn("Error occurred in fetching Instant Start Cart Grocery Basket products")}})}onBannerClick(e){e.stopPropagation(),this.seeProducts()}setProductsSpacing(){if(!this.instantBasketElement.offsetWidth)return;let e=this.instantBasketElement.offsetWidth;this.lessSpacing=!(1024<=e&&e<1280||1440<=e)}handleInstantCartResponse(e){!e||e?.length<1||(this.products=e,this._cdRef.detectChanges(),this.instantBasketElement=this.document.querySelector("instant-grocery-basket>div"),this.setProducts(),this.setProductsSpacing())}setConfiguration(e){this.instantBasketDictionary._title=e&&e.title?e.title:"Quick add",this.instantBasketDictionary._sub_title=e&&e.subtitle?e.subtitle:"Restock your essentials in one step. ",this.instantBasketDictionary._CTA_title=e&&e.cta?e.cta:"View items",this.instantBasketDictionary._CTA_link=e&&e.ctaLink?e.ctaLink:"/shop/purchases/buy-it-again.html?view=instantCart"}initSmartBasketV2(){this.zoneNode=this._elementRef?.nativeElement?.parentNode?.parentNode,this.zoneNode&&null!=this.zoneNode.getAttribute("data-zone-response")?this.processZoneResponse():console.warn("No zone node found for smart basket V2")}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(xne),$d(uP),$d(hP),$d(Rge),$d(qbe),$d(kg),$d($be),$d(Qg))}}static{this.ɵcmp=Qr({type:e,selectors:[["instant-grocery-basket"]],viewQuery:function(e,t){if(1&e&&tm(jbe,5),2&e){let e;im(e=nm())&&(t.thumbnailContainer=e.first)}},hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}),0,od)},inputs:{config:"config",adobeTargetGroup:"adobeTargetGroup"},outputs:{onSeeProductsClicked:"onSeeProductsClicked"},features:[xm([xne,Vbe,qbe])],decls:8,vars:1,consts:[["smartBasket",""],["promoTemplate",""],["ctaLinkTemplate",""],["thumbnailContainer",""],["data-id","buy-it-again-instant-grocery-basket","data-qa","nstnt-grcry-bskt-wrppr",1,"instant-grocery-basket-wrapper","instant-grocery-basket-wrapper-v2","col-xl-12","col-12","col-sm-12","col-md-12","col-lg-12"],["data-id","buy-it-again-instant-grocery-basket","data-qa","nstnt-grcry-bskt-wrppr",1,"instant-grocery-basket-wrapper","instant-grocery-basket-wrapper-v2","col-xl-12","col-12","col-sm-12","col-md-12","col-lg-12",3,"click"],[1,"content-wrapper",3,"ngClass"],[4,"ngIf"],[1,"qsc-v2-title-container"],["data-qa","qck-strt-ttl",1,"title-sm-bold","qsc-v2-quick-start-title",3,"ngClass"],["data-qa","qck-strt-sub-ttl",1,"body-text-sm","qsc-v2-quick-start-sub-title",3,"ngClass"],[1,"products","products-v2"],[1,"products-list"],[4,"ngFor","ngForOf"],["class","product product-v2 more-products-v2",3,"ngClass",4,"ngIf"],["tabindex","0","data-qa","see-prd",1,"btn","btn-secondary","qsc-view-items-btn__medium",3,"click","ngClass","ngStyle"],["data-qa","qck-strt-ttl",1,"title"],["data-qa","qck-strt-sub-ttl",1,"subtitle"],[1,"products"],["data-qa","qck-bskt-prds",1,"product"],["tabindex","0","data-qa","see-prd",1,"btn","btn-default","btn-see-products",3,"click"],["class","product","data-qa","qck-bskt-prds",3,"ngStyle",4,"ngIf"],["class","product circle-default",4,"ngIf"],["data-qa","qck-bskt-prds",1,"product",3,"ngStyle"],[1,"product","circle-default"],["class","product product-v2","data-qa","qck-bskt-prds",3,"ngClass","ngStyle",4,"ngIf"],["data-qa","qck-bskt-prds",1,"product","product-v2",3,"ngClass","ngStyle"],[1,"product","product-v2","more-products-v2",3,"ngClass"],[1,"secondary-cta-container"],["href","/shop/purchases/buy-it-again.html?view=item",1,"secondary-cta",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"smart-basket","d-flex","flex-column"],[1,"smart-basket__content","d-flex","flex-column",3,"click"],[1,"smart-basket__upper-content","d-flex","justify-content-between"],[1,"smart-basket__title-container"],[1,"smart-basket__title","poppins"],[1,"smart-basket__subtitle"],[1,"d-inline-flex","align-items-center","align-items-md-start"],[1,"smart-basket__cta-btn","pds-btn","pds-btn-outlined--primary","d-flex","align-items-center","justify-content-center","text-nowrap",3,"click"],[1,"smart-basket__thumbnail-container","d-flex"],[1,"smart-basket__addl-prds","d-flex","justify-content-center","align-items-center"],["data-qa","see-prd",1,"smart-basket__thumbnail"],[3,"media"],["data-qa","qck-bskt-prds",1,"ab-lazy","w-100","h-100",3,"src","alt"],[1,"smart-basket__promo-container"],[1,"smart-basket__promo-text","text-center",3,"mb-1"],[1,"d-flex","justify-content-center"],[1,"smart-basket__promo-text","text-center"],[1,"smart-basket__promo-text","smart-basket__promo-text--link",3,"click","href"],[1,"d-flex","w-100","align-items-center","justify-content-center"],[1,"smart-basket__cta-link",3,"href"]],template:function(e,t){1&e&&ph(0,uye,1,1
1)(1,fye,1,1)(2,Sye,24,11,"ng-template",null,0,Wm)(4,Aye,3,4,"ng-template",null,1,Wm)(6,kye,3,4,"ng-template",null,2,Wm),2&e&&yf(t.enableSmartBasketV2?1:0)},dependencies:[sy,oy,cy,by,gy],encapsulation:2})}}return e})(),Eye=["storeCard"],Dye=["storeCardBtn"],Oye=(()=>{class e{constructor(){}ngOnInit(){}selectStore(e,t){let i={storeId:e.storeID,banner:e.bannerName,zipCode:e.zipcode};window.AB.COMMON.setCookie("abs_previouslogin",""),window.AB.COMMON.setCookie("SWY_SHARED_SESSION_INFO",""),window.AB.COMMON.setCookie("SincerelyFoodBanner",JSON.stringify(i),0)}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵcmp=Qr({type:e,selectors:[["store-card-lite"]],viewQuery:function(e,t){if(1&e&&(tm(Eye,5),tm(Dye,5)),2&e){let e;im(e=nm())&&(t.storeCard=e.first),im(e=nm())&&(t.storeCardBtn=e.first)}},inputs:{store:"store",continueLink:"continueLink"},decls:19,vars:19,consts:[["storeCard",""],["storeCardBtn",""],[1,"store-card","row"],[1,"store-card__wrapper"],[1,"col-8","col-sm-8","card-store__address"],[1,"store-card__left",3,"id"],["role","img",1,"store-icon-logo",3,"alt","src"],[1,"store-card__left__address","body-text"],[1,"col-4","col-sm-4","store-card__right"],[1,"store-card__distance"],[1,"d-none"],["role","button",1,"btn","btn-secondary","btn-md","store-card__btn",3,"click","href"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",2,0)(2,"div",3)(3,"div",4)(4,"div",5),Tf(5,"img",6),kf(6,"div",7),am(7),xf(),kf(8,"div",7),am(9),xf()()(),kf(10,"div",8)(11,"div",9),am(12),qm(13,"number"),kf(14,"span",10),am(15,"from your current location"),xf()(),kf(16,"a",11,1),jf("click",(function(i){return Wa(e),Ha(t.selectStore(t.store,i))})),am(18,"Select"),xf()()()()}2&e&&(Vd(4),Zf("id","address_",t.store.storeID,""),Vd(),_h("aria-label","",t.store.bannerName," logo image"),Zf("alt","",t.store.bannerName," logo image"),Jf("src",t.store.storeLogoURL,id),Vd(2),lm(t.store.street),Vd(2),um("",t.store.city,", ",t.store.state," ",t.store.zipcode,""),Vd(3),cm("",jm(13,16,t.store.distance,"1.2-2")," mi. "),Vd(4),Sh("aria-describedby","address_",t.store.storeID," store-distance__",t.store.distance,""),Jf("href",t.continueLink,id))},dependencies:[Oy],encapsulation:2})}}return e})();function Bye(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"a",9),am(2),xf(),Tf(3,"img",10),kf(4,"div",11),am(5),kf(6,"span",12)(7,"a",13),jf("click",(function(){return Wa(e),Ha(Yf(2).createAcctFlow())})),am(8),xf()()(),Df()}if(2&e){let e=Yf(2);Vd(),Jf("href",e.signInLink,id),gh("aria-label",e.signInBtnLabel),V
1d(),lm(e.signInBtnLabel),Vd(),Jf("src",e.albBrandsLogoImage,id),Jf("alt",e.albBrandsLogoAltText),Vd(2),cm("",e.dontHaveAcct," "),Vd(2),gh("aria-label",e.dontHaveAcctLinkLabel),Vd(),lm(e.dontHaveAcctLinkLabel)}}function Mye(e,t){if(1&e&&(kf(0,"div",26),am(1),xf()),2&e){let e=Yf(3);Vd(),cm(" ",e.inputErrorMessage," ")}}function Rye(e,t){if(1&e&&(Ef(0),Tf(1,"store-card-lite",29,1),Df()),2&e){let e=t.$implicit,i=Yf(4);Vd(),zh("store",e)("continueLink",i.createAcctLink)}}function Lye(e,t){if(1&e&&(kf(0,"div",27),ph(1,Rye,3,2,"ng-container",28),xf()),2&e){let e=Yf(3);Vd(),zh("ngForOf",e.storesWithLimit)}}function Fye(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",30),Tf(2,"div",31),kf(3,"div",32)(4,"a",33),jf("click",(function(){return Wa(e),Ha(Yf(3).continueWithoutStore())})),am(5),xf()()(),Df()}if(2&e){let e=Yf(3);Vd(2),zh("innerHTML",e.noStoreFoundMsg,ed),Vd(2),Jf("href",e.createAcctLink,id),Vd(),lm(e.createAcctBtnLabel)}}function Nye(e,t){1&e&&(Ef(0),kf(1,"div",34)(2,"div",35)(3,"div",36)(4,"div",37),Tf(5,"div",38),xf()()()(),Df())}function Uye(e,t){if(1&e){let e=Mf();kf(0,"button",39),jf("click",(function(t){return Wa(e),Ha(Yf(3).loadMoreStores(t))})),kf(1,"span",40),am(2,"Load More Stores"),xf()()}}function Vye(e,t){if(1&e){let e=Mf();kf(0,"div",14)(1,"button",15),jf("click",(function(){return Wa(e),Ha(Yf(2).getStoresByGeo())})),Tf(2,"span",16),am(3," Use my current location "),xf(),kf(4,"div",17)(5,"input",18),mm("ngModelChange",(function(t){Wa(e);let i=Yf(2);return fm(i.zipCode,t)||(i.zipCode=t),Ha(t)})),jf("blur",(function(){Wa(e);let t=Yf(2);return Ha(t.checkValidation(t.zipCode))}))("keydown.enter",(function(){return Wa(e),Ha(Yf(2).getStoresBySearch())}))("focus",(function(){return Wa(e),Ha(Yf(2).clearErrorMessage())})),xf(),kf(6,"button",19),jf("click",(function(){return Wa(e),Ha(Yf(2).getStoresBySearch())})),Tf(7,"span",20),xf()(),ph(8,Mye,2,1,"div",21)(9,Lye,2,1,"div",22)(10,Fye,6,3,"ng-container",6)(11,Nye,6,0,"ng-container",6)(12,Uye,3,0,"button",23),xf(),kf(13,"div",24),am(14),kf(15,"span")(16,"a",25),am(17),xf()()()}if(2&e){let e=Yf(2);Vd(5),zh("ngClass",e.inputErrorMessage.length>0?"store-locator__zipcode__input--error":""),hm("ngModel",e.zipCode),Vd(3),zh("ngIf",e.inputErrorMessage.length>0),Vd(),zh("ngIf",e.showStores),Vd(),zh("ngIf",e.noStores),Vd(),zh("ngIf",e.showLoading),Vd(),zh("ngIf",e.showLoadMore),Vd(2),cm(" ",e.signInText," "),Vd(2),Jf("href",e.signInLink,id),Vd(),lm(e.signInLinkLabel)}}function qye(e,t){if(1&e&&(Ef(0),kf(1,"div",7),ph(2,Bye,9,8,"ng-container",8)(3,Vye,18,10,"ng-template",null,0,Wm),xf(),Df()),2&e){let e=sm(4),t=Yf();Vd(2),zh("ngIf","landing"==t.view)("ngIfElse",e)}}function $ye(){return window}var jye=(()=>{class e{constructor(e,t,i){this.elementRef=e,this._http=t,this.storeResolverService=i,this.showStores=!1,this.noStores=!1,this.view="landing",this.currentStoreIndex=0,this.requestedByGeoLoc=!1,this.showLoadMore=!1,this.showLoading=!1,this.zipCode="",this.inputErrorMessage="",this.storeRadius=this.elementRef.nativeElement.getAttribute("data-storeSelectRadius"),this.totalResults=this.elementRef.nativeElement.getAttribute("data-totalResults"),this.signInText=this.elementRef.nativeElement.getAttribute("data-signInText"),this.signInLinkLabel=this.elementRef.nativeElement.getAttribute("data-signInLinkLabel"),this.signInLink=this.elementRef.nativeElement.getAttribute("data-signInLink"),this.pageLogoImage=this.elementRef.nativeElement.getAttribute("data-pageLogoImage"),this.pageLogoAltText=this.elementRef.nativeElement.getAttribute("data-pageLogoAltText"),this.pageSubtitle=this.elementRef.nativeElement.getAttribute("data-pageSubtitle"),this.displayHeaderOnly=this.elementRef.nativeElement.getAttribute("data-displayHeaderOnly"),this.albBrandsLogoImage=this.elementRef.nativeElement.getAttribute("data-albBrandsLogoImage"),this.albBrandsLogoAltText=this.elementRef.nativeElement.getAttribute("data-albBrandsLogoAltText"),this.createAcctBtnLabel=this.elementRef.nativeElement.getAttribute("data-createAcctBtnLabel"),this.signInBtnLabel=this.elementRef.nativeElement.getAttribute("data-signInBtnLabel"),this.chooseStoreMsg=this.elementRef.nativeElement.getAttribute("data-chooseStoreMsg"),this.noStoreFoundMsg=this.elementRef.nativeElement.getAttribute("data-noStoreFoundMsg"),this.dontHaveAcct=this.elementRef.nativeElement.getAttribute("data-dontHaveAcct"),this.dontHaveAcctLinkLabel=this.elementRef.nativeElement.getAttribute("data-dontHaveAcctLinkLabel"),this.createAcctLink=this.elementRef.nativeElement.getAttribute("data-createAcctLink"),this.limit=5,this.$scene7Preset="?$fulfillment$&defaultImage=Not_Available",this.currentBanner=$ye().AB.userInfo.banner.toLowerCase(),this.currentBanner=this.currentBanner.charAt(0).toUpperCase()+this.currentBanner.slice(1),$ye().AB.COMMON.getURLParameterByName("create-account",!1)&&(this.view="create-account"),this.displayedSubtitle="landing"==this.view?this.pageSubtitle:this.chooseStoreMsg}ngOnInit(){}createAcctFlow(){this.view="create-account",this.displayedSubtitle=this.chooseStoreMsg}getStoresBySearch(){if(this.requestedByGeoLoc=!1,this.resetVariables(),this.checkValidation(this.zipCode)){let e={zipcode:this.zipCode,size:this.totalResults,radius:this.storeRadius,excludeBanners:"none"};
1this.getStores(e),$ye().AB.DATALAYER&&$ye().AB.DATALAYER.setLinkClickEvents("scf|fulfillment-global|search")}else this.showStores=!1,this.showLoading=!1}getStoresByGeo(){let e=this;this.zipCode="",this.resetVariables(),navigator.geolocation.getCurrentPosition((function(t){let i=t.coords.longitude,n=t.coords.latitude;console.info("User Allowed Geo: long"+i+"lat"+n),e.requestedByGeoLoc=!0;let r={latitude:n,longitude:i,size:e.totalResults,radius:e.storeRadius,excludeBanners:"none"};e.getStores(r),$ye().AB.DATALAYER&&$ye().AB.DATALAYER.setLinkClickEvents("scf|fulfillment-global|geo")}),(function(t){throw e.showLoading=!1,e.inputErrorMessage="We are unable to locate you. Please check your browser setting or enter ZIP Code in the form field.",new Error("Error in Geo"+t)}),{enableHighAccuracy:!0,maximumAge:0})}getStores(e){let t=$ye().AB.storeResolverInstoreEndpoint;this.storeResolverService.getStores(t,e).subscribe((e=>{this.storesData=e,this.storesData.instore&&this.storesData.instore.stores&&this.storesData.instore.stores[0].address&&this.storesData.instore.stores[0].address.zipcode&&(this.requestedByGeoLoc&&(this.zipCode=this.storesData.instore.stores[0].address.zipcode),this.zipCode=this.storesData.instore.stores[0].address.zipcode,this.stores=this.storesData.instore,this.mapStores())}),(e=>{this.storesData=e,this.storesData.error&&this.storesData.error.instore&&this.storesData.error.instore.errors&&this.storesData.error.instore.errors[0]&&this.storesData.error.instore.errors[0].code&&"SR-0003"==this.storesData.error.instore.errors[0].code?this.noStores=!0:this.inputErrorMessage="Apologies, our site is currently experiencing technical difficulties, please try again later.",this.showLoading=!1}))}mapStores(){let e=this.stores;if(e.stores){this.showLoadMore=!(e.stores.length<=this.limit);let t=e.stores.map(((t,i)=>({city:e.stores[i].address.city,distance:t.distance,logo:this.isURL(e.stores[i].storeRewards.storeLogoURL)?this.getLogoSvg(e.stores[i].domainName.replace(/-|'|\s/g,"")):this.getLogoSvg(e.stores[i].polarisBannerName),storeID:t.locationId,street:e.stores[i].address.line1,state:e.stores[i].address.state,zipcode:e.stores[i].address.zipcode,isSisterBanner:e.stores[i].polarisBannerName!==this.currentBanner.toLowerCase(),bannerName:e.stores[i].polarisBannerName,storeName:this.isURL(e.stores[i].storeRewards.storeLogoURL)?e.stores[i].domainName.replace(/-|'|\s/g,""):this.getLogoSvg(e.stores[i].polarisBannerName),storeLogoURL:this.checkURL(e.stores[i].storeRewards.storeLogoURL,e.stores[i].polarisBannerName),showConfirmation:!1,selected:!1,isEcommStore:e.stores[i].ecomStore})));this.storesList=t,console.info("this.storesList = "+this.storesList),this.showLimitedStore(),this.showLoading=!1,this.showStores=!0}else e.errors&&(this.showStores=!1)}continueWithoutStore(){window.AB.COMMON.setCookie("SincerelyFoodBanner",JSON.stringify({storeId:"",banner:"sincerely-food"}),0),$ye().AB.DATALAYER&&$ye().AB.DATALAYER.setLinkClickEvents("scf|fulfillment-global|continue")}isURL(e){return!!e}getLogoSvg(e){if(e)return this.bannerLogoClass="safeway"===e.toLowerCase()?"svg-icon-{banner}-logo-rgb":"svg-icon-{banner}-logo",this.bannerLogoClass=this.bannerLogoClass.replace("{banner}",e),this.bannerLogoClass}checkURL(e,t){return t=t.charAt(0).toUpperCase()+t.slice(1),e?e+this.$scene7Preset:"../../../../../../../../etc/designs/wcax-commons/images/icons/"+t+"_RGB_store_fulfillment.svg"}showLimitedStore(){this.storesWithLimit=void 0!==this.storesList&&this.storesList.length?this.storesList.slice(0,this.limit):[]}checkValidation(e){return void 0!==e&&e.length<=0?(this.inputErrorMessage="ZIP Code is required.",!1):null!=e.match(/[^0-9]/g)?(this.inputErrorMessage="ZIP Code must contain numeric characters only.",!1):e.length<5?(this.inputErrorMessage="Please enter 5 numbers.",!1):(this.inputErrorMessage="",!0)}loadMoreStores(e){let t=this.storesWithLimit,i=[];if(this.storesList&&this.showLoadMore){let e=this.storesList.slice(this.limit);for(let t=0;t<this.limit;t++)e[t+this.currentStoreIndex]&&i.push(e[t+this.currentStoreIndex]);this.currentStoreIndex+=this.limit,this.currentStoreIndex>=this.storesList.length-this.limit&&(this.showLoadMore=!1,this.currentStoreIndex=0),this.storesWithLimit=this.storesWithLimit.concat(i)}if(0==e.screenX&&0==e.screenY||$(window).width()<1025){let e=this,i=t.length;setTimeout((function(){e.storeCardList._results[i].storeCardBtn.nativeElement.focus()}),0)}}resetVariables(){this.showLoading=!0,this.storesList=[],this.noStores=!1,this.storesWithLimit=[],this.showLoadMore=!1,this.currentStoreIndex=0,this.inputErrorMessage=""}clearErrorMessage(){this.inputErrorMessage=""}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(ov),$d(zD))}}static{this.ɵcmp=Qr({type:e,selectors:[["store-selector-lite"]],viewQuery:function(e,t){if(1&e&&tm(Oye,5),2&e){let e;im(e=nm())&&(t.storeCardList=e)}},decls:6,vars:4,consts:[["createAccount",""],["child",""],[1,"header-lite__wrapper","ecommunity-header"],[1,"header-lite__page-logo"],["width","317","height","50",3,"src","alt"],[1,"header-lite__subtitle","ecommunity-header__subtitle"],[4,"ngIf"],[1,"store-selector-lite"],[4,"ngIf","ngIfElse"],["tabindex","0","role","link",1,"btn","btn-primary","store-selector-lite__btn",3,"href"],[1,"store-selector-lite__logos",3,"src","alt"],[1,"body-text-sm"],[1,"store-selector-lite__link"],["tabindex","0","role","link",1,"sign-in-text__link",3,"click"],[1,"store-locator"],["data-qa","hmpg-flfllmntmdl-glctricn",1,"store-locator__my-location",3,"click"],[1,"svg-locate-icon"],[1,"store-locator__zipcode"],["aria-describedby","searchZipError","aria-labelledby","zipcode","aria-label","search Zipcode","tabindex","0","maxlength","5","type","text","placeholder","Enter ZIP Code to get started.",1,"input-search","store-locator__zipcode__input","form-control",3,"ngModelChange","blur","keydown.enter","focus","ngClass","ngModel"],["aria-label","search Zipcode","role","button","tabindex","0",1,"store-locator__zipcode__search-btn",3,"click"],[1,"svg-search"],["class","body-text-xs form-error-text store-locator__error","id","searchZipError","role","alert","aria-live","polite",4,"ngIf"],["class","store-list",4,"ngIf"],["class","load-more",3,"click",4,"ngIf"],[1,"sign-in-text"],[1,"sign-in-text__link",3,"href"],["id","searchZipError","role","alert","aria-live","polite",1,"body-text-xs","form-error-text","store-locator__error"],[1,"store-list"],[4,"ngFor","ngForOf"],[3,"store","continueLink"],[1,"n
1o-stores"],[1,"no-stores__text",3,"innerHTML"],[1,"no-stores__btn"],[1,"btn","btn-primary","btn-xl",3,"click","href"],["id","storeloc-lite-loader"],[1,"loading-spinner"],["alt","Loading...",1,"small","progress"],[1,"prog1"],[1,"prog2"],[1,"load-more",3,"click"],[1,"load-more__btn"]],template:function(e,t){1&e&&(kf(0,"div",2)(1,"div",3),Tf(2,"img",4),xf(),kf(3,"div",5),am(4),xf()(),ph(5,qye,5,2,"ng-container",6)),2&e&&(Vd(2),Jf("src",t.pageLogoImage,id),Jf("alt",t.pageLogoAltText),Vd(2),cm(" ",t.displayedSubtitle,""),Vd(),zh("ngIf","false"==t.displayHeaderOnly))},dependencies:[sy,oy,cy,d_,$_,sC,ES,Oye],encapsulation:2})}}return e})(),zye=(()=>{class e{isRegistered(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Wye=(()=>{class e{constructor(){}getProductDisplayableElementsByProgramType(e){return{mkp:{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!0,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!0,prop65Title:!0,nestedFulfillment:!1,promoText:!0},wineshop:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0},abs:{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0},"wine-carousel":{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!1,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!1,scheduleNSave:!1,buyItAgain:!1,starRating:!1,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0},"mkp-carousel":{estimateLabel:!1,sponsoredLabel:!1,itemNotAvailable:!0,availableInStoreLabel:!1,unattendedDeliveryLabel:!1,mto:!1,coupons:!1,addToCart:!0,scheduleNSave:!1,buyItAgain:!1,starRating:!0,price:!0,viewSimilarItemsLink:!1,image:!0,title:!0,sellerTag:!0,prop65Title:!0,nestedFulfillment:!1,promoText:!0},"1P_B2B":{estimateLabel:!0,sponsoredLabel:!0,itemNotAvailable:!0,availableInStoreLabel:!0,unattendedDeliveryLabel:!0,mto:!0,coupons:!0,addToCart:!0,scheduleNSave:!0,buyItAgain:!0,starRating:!0,price:!0,viewSimilarItemsLink:!0,image:!0,title:!0,sellerTag:!1,prop65Title:!0,nestedFulfillment:!0,promoText:!0}}[e]}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),Hye=y(C()),Yye=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l,c,d,u){this._http=e,this._searchResultsService=t,this._adobeUserContextService=i,this._productCatalogService=n,this._cartService=r,this._appConfigService=s,this._buyItAgainService=a,this._abTestService=o,this._featureFlagService=l,this._p13nEndpointService=c,this._utilService=d,this._aemService=u,this.apiParams=new Ky,this.dynamicCarousels=["more-like-this","best-sellers","most-popular-l2"],this.viewedAdIdsArr=[],this.adIdsToBeSent=[],this.priceEndpoint=window.AB.productPriceDetailPath+"?storeId="+window.AB.userInfo.branchId+"&id=",this.carouselBehaviours={"my-last-order":"historylastorder","pdp-carousel":"similar-products","most-popular":"G","aisle-level-2":"aemaisle","static-carousel":"","best-sellers":"search_type=bestseller","more-like-this":"request_type=mlt","most-popular-l2":"search_type=bestseller",recommendations:"pdreco/carousel"},this.pdpCarousel={"api-placeholder":"{aisleId}","view-more-link":"/bin/safeway/product/similar?aisleId="},this.protocol="https://",this.adobeUserContext={sessionId:"",tntId:"",marketingCloudVisitorId:""},this.navigationTypeCarousel="",this.uuid=window.AB.userInfo.UUID?window.AB.userInfo.UUID:window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO")?JSON.parse(window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO"))?.uuid:null,this._productInfo=function(e){this.dl=window.digitalData,this.dl&&(this.dl.productInfo={productID:e.id,productName:e.name,units:e.units,listPrice:e.listPrice,carouselSection:e.carouselSection,isRecommended:e.isRecommended,isSponsored:e.isSponsored,basePrice:e.basePrice,pricingType:e.pricingType,couponFlag:e.couponFlag,couponClipped:e.couponClipped,couponID:e.couponID,aisleId:e.aisleId,upc:e.upc,departmentName:e.departmentName})},this._buyItAgainService.facetsApiResponse$.subscribe((e=>{this.biaFacets=e}))}getDataSource(e){let t=e?e.getAttribute("data-carousel-type"):"",i=e?e.getAttribute("data-carousel-behaviour"):"";return this.navigationTypeCarousel=e?e.getAttribute("data-navigation-type"):"","my-last-order-erums"===i?window.SWY.CONFIGSERVICE.erumsConfig["orders.service.endpoint"]+"/orders/latest":"apidriven"===t?e.getAttribute("data-carousel-api"):"embeddedjson"===t?e.getAttribute("data-carousel-json"):"bpncurated"===t?e.getAttribute("data-carousel-bpn"):"generic-products"===t?e.getAttribute("data-products"):void 0}getData(e,t,i,n){this.carousel=e;let r=Di((()=>fi([])));return"apidriven"===e.type?e.isSponsoredDealsCarousel?new gt((e=>{this._appConfigService.validateSession((()=>{this.handleTokenValidationAndApiCall(e,t,i,n)}),!0)})):!this._aemService.getFeatureFlagByNameDisable("biaHomePageSessionRefreshDisabled")&&e.isHomePageCarousel&&"featured-products"===e.dataDriven&&"static-carousel"===e.behaviour?hi(this._appConfigService.validateSession(null,!1)).pipe(dn((()=>window.SWY.ENFORCEMENT.isTokenActive()?this._getAPIData(t,i,n):fi([])))):(r=this._getAPIData(t,i,n),r):"bpncurated"===e.type?(r=this._getBPNCuratedData(i,n),r):"embeddedjson"===e.type?(r=this._getEmbeddedJSONData(),r):("generic-products"===e.type&&(r=this._getGenericProductsData()),r)}getBehaviour(e){let t=e.getAttribute("data-carousel-behaviour");
1if(t&&"false"!==t)return $(e).closest(".master-product-carousel").addClass(t),t;let i=e.getAttribute("data-carousel-api")?e.getAttribute("data-carousel-api"):"",n=e.getAttribute("data-carousel-users")?e.getAttribute("data-carousel-users"):"",r=e.getAttribute("data-carousel-api-post")?e.getAttribute("data-carousel-api-post"):"",s="static-carousel";switch(!0){case i.includes(this.carouselBehaviours["my-last-order"]):s="my-last-order";break;case"my-last-order-erums"===t:s="my-last-order-erums";break;case"dynamic-grid-with-facets"===t:s=t;break;case"my-last-order-purchase-xapi"===t:s="my-last-order-purchase-xapi";break;case"buy-it-again"===t:s="buy-it-again";break;case i.includes(this.carouselBehaviours["pdp-carousel"]):s="pdp-carousel";break;case r&&i.includes(this.carouselBehaviours["most-popular-l2"]):s="most-popular-l2";break;case n===this.carouselBehaviours["most-popular"]:s="most-popular";break;case i.includes(this.carouselBehaviours["best-sellers"]):s="best-sellers";break;case i.includes(this.carouselBehaviours["more-like-this"]):s="more-like-this";break;case i.includes(this.carouselBehaviours["aisle-level-2"]):s="aisle-level-2";break;case i.includes(this.carouselBehaviours.recommendations):s="recommendations"}return $(e).closest(".master-product-carousel").addClass(s),s}checkCarouselBehaviour(e,t,i){let n=$(".master-product-carousel.most-popular .slick-product-carousel").first(),r=$(i.parentElement);"onError"===e&&(("my-last-order"===t.behaviour||"my-last-order-erums"===t.behaviour)&&n.length>0&&n.removeClass("mask"),r.addClass("d-none"))}mergeProducts(e,t,i){let n=!0,r="",s=window.AB?.userInfo?.wfcStoreId;switch("wineshop"===i.sellerType&&this._isWineShopEnabledForStore()&&s&&(r="wineshop"),i.type){case"apidriven":if(!e||"my-last-order-erums"===i.behaviour)return e;e.forEach((e=>{this._appConfigService.isItemAvailable_v2(e,r)&&!0===n&&(n=!1)}));break;case"bpncurated":if(!e||!t)return null;e.forEach((e=>{let i=t.find((t=>t.id===e.id));i&&(this._appConfigService.isItemAvailable_v2(i,r)&&!0===n&&(n=!1),(!e.name||void 0===e.name||null===e.name)&&(e.name=e.description),Object.assign(e,i))}))}return!0===n?null:e}getProductsBPNArray(e){let t=[];return e.forEach((e=>t.push(e.id))),t.join(",")}getProductsUPCArray(e){let t=[];return e.forEach((e=>t.push(e.upc))),t.join(",")}getUpdatedProducts(e,t,i){if("apidriven"===t.type&&e.length>0)return fi({ack:!1,productsinfo:e});if("bpncurated"===t.type&&e.length>0)return fi({ack:!1,productsinfo:e});let n=null!=i&&""!==i?this.protocol+i+this.priceEndpoint:this.priceEndpoint,r=this.getProductsUPCArray(e);if(0===r.length)return fi({ack:!0});if(window.AB.catalogServiceSubscriptionKey&&window.AB.catalogServiceEnable)return this._productCatalogService.getCatalogXapiProductPriceByUPC(r,!(!this.carousel||this.carousel.isAuthorizedUser),!1,!0,t.sellerId,"",!1,t.badgePreference,t.badgeList);{let t=this.getProductsBPNArray(e);return 0===t.length?fi({ack:!0}):this._http.get(n+t).pipe(bi((e=>(!1===e.ack&&e.productsinfo&&e.productsinfo.filter((e=>null!==e.id)),e))))}}_getAPIData(e,t,i){let n=!1;if(("curated-search"===this.carousel.dataDriven||"curated-category"===this.carousel.dataDriven)&&(n=!0),"pathway-search"===this.carousel.dataDriven||"pathway-category"===this.carousel.dataDriven||n){let e=window.AB.userInfo.banner,t=this.carousel.dataSource+"&banner="+e;t+="&request-id="+this._getUTCTimeStampRandom();let r=window.AB?.userInfo?.wfcStoreId,s=window.AB.COMMON.getUserChannel(),a=window.location.origin,o=encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),l=window.AB.userInfo.branchId,c={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})};switch(i?.programType){case"wineshop":if(!this._isWineShopEnabledForStore()||!r)return;t+="&pgm=wineshop",l=r,s="shipping";break;case"mkp":t+="&pgm=mkp";break;case"1P_B2B":t=t+"&pgm="+i.programType}return t=t.replace("{storeid}",l).replace("{url}",a).replace("{search-uid}",o).replace("{channel}",s),n&&(t=this.modifyDataCarouselApi(t,"q",""),this.carousel.widgetId&&(t=this.modifyDataCarouselApi(t,"widget-id",this.carousel.widgetId)),window.AB.COMMON.getCookie("absVisitorId")&&(t=this.modifyDataCarouselApi(t,"visitorId",window.AB.COMMON.getCookie("absVisitorId"))),this.uuid&&(t=this.modifyDataCarouselApi(t,"uuid",this.uuid))),this.carousel.badgePreference&&this.carousel.badgeList&&(t=this.modifyDataCarouselApi(t,this.carousel.badgePreference,this.carousel.badgeList)),this._http.get(this._appConfigService.generateFinalApiUrl(t),c)}"my-last-order-purchase-xapi"!==this.carousel.behaviour&&"buy-it-again"!==this.carousel.dataDriven&&(this.carousel.dataSource.includes("includeOffer=true")||(this.carousel.dataSource.indexOf("?")>0?this.carousel.dataSource+="&":this.carousel.dataSource+="?",this.carousel.dataSource+="includeOffer=true"));let r=window.AB?.userInfo?.banner,s=this.carousel.dataSource.indexOf("banner");if(r&&-1==s&&"p13n-generic"!==this.carousel.dataDriven&&(this.carousel.dataSource.indexOf("?")>0?this.carousel.dataSource+="&":this.carousel.dataSource+="?",this.carousel.dataSource+=`banner=${r}`),"my-last-order-purchase-xapi"!==this.carousel.behaviour&&"buy-it-again"!==this.carousel.dataDriven&&"p13n-generic"!==this.carousel.dataDriven&&(this.carousel.dataSource=this._appConfigService.generateCBAUrl(this.carousel.dataSource)),"featured-products"===this.carousel.dataDriven){let t={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})};if(this.isEmsmSponsoredAPIMigration()){let e=this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimEmsmSponsoredCarouselSubscriptionKey);t.headers=t.headers.set("Ocp-Apim-Subscription-Key",e)}let i=this.getUrl_EndPoint("",e);if(this.carousel.isCrossSellCarousel&&this.carousel.crossSellCarouselCategoryId&&this.carousel.crossSellCarouselProductId&&(i+=`&bpn=${this.carousel.crossSellCarouselProductId}&category-id=${this.carousel.crossSellCarouselCategoryId}&pagename=cross-sell-search-v2&q=${this.carousel.searchKeyword}`,this._aemService.getFeatureFlagByNameDisable("isSpCarouselProductTrackingDisabled")||(i+=`&disableTracking=${this.carousel.isDisableTracking}`)),this.carousel.isAislesCrossSellCarousel&&this.carousel.crossSellCarouselCategoryId&&this.carousel.crossSellCarouselProductId&&(i+=`&bpn=${this.carousel.crossSellCarouselProductId}&category-id=${this.carousel.crossSellCarouselCategoryId}&pagename=cross-sell-aisles-v2`,this._aemService.getFeatureFlagByNameDisable("isSpCarouselProductTrackingDisabled")||(i+=`&disableTracking=${this.carousel.isDisableTracking}`)),this.carousel.dataSource.includes("homepage")||!this.carousel.dataSource.includes("homepage")&&!this.carousel.dataSource.includes("product-details")&&this.carousel.apiPostBody){let e=this.setExcludeBpns();return""!==e&&(i+=`&exclude-bpn=${e}`),this._http.get(this._appConfigService.generateFinalApiUrl(i),t)}if(this.carousel.dataSource.includes("product-details")){let i=$(".product-info").attr("data-shelfid"),n=$(".product-details-wrapper")?.attr("data-bpn");if(i){let r=this.getEmsmEndpointForPDP(this.getUrl_EndPoint(i,e,""));if(r=r.replace("pagename=product-details","pagename=product-details-v2"),n&&(r+="&bpn="
1+n),!this._aemService.getFeatureFlagByNameDisable("isSpCarouselProductTrackingDisabled")){r+=`&disableTracking=${"true"===this.carousel.isDisableTracking?"true":"false"}`}return this._http.get(this._appConfigService.generateFinalApiUrl(r),t)}return this._appConfigService.shelfId$.pipe(Ti((i=>{if(i){let r=this.getEmsmEndpointForPDP(this.getUrl_EndPoint(i,e,"")).replace("pagename=product-details","pagename=product-details-v2");if(n&&(r+="&bpn="+n),!this._aemService.getFeatureFlagByNameDisable("isSpCarouselProductTrackingDisabled")){r+=`&disableTracking=${"true"===this.carousel.isDisableTracking?"true":"false"}`}return this._http.get(this._appConfigService.generateFinalApiUrl(r),t)}return fi({})})))}return fi({})}if("aisles-xapi-l2"===this.carousel.dataDriven)return this._getAisleLevel2xAPIData(this.carousel.dataSource);if("top-category-prod-br"===this.carousel.dataDriven)return this._getTopCategoryProductsXAPIData(this.carousel.dataSource);if("buy-it-again"===this.carousel.behaviour||"buy-it-again"===this.carousel.dataDriven){let t=window.AB.userInfo.SWY_SHOP_TOKEN,i={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"]),Authorization:`Bearer ${t}`})};window.AB.COMMON.isB2BSite()&&(i.headers=i.headers.set("pgm","1P_B2B"));let n=(0,Hye.default)().subtract(3,"months"),r=((0,Hye.default)(n).format("YYYY"),(0,Hye.default)(n).format("MM"),(0,Hye.default)(n).format("DD"),this.getUrl_EndPoint("",e));r=`${r}&includeOffer=true`,"buy-it-again-landing"!=this.carousel.behaviour&&(r=this._appConfigService.generateCBAUrl(r));let s=(this.carousel.apiPostBody.split("_").filter((e=>e))||[]).length;return r=this.replaceURLParam(r,"pageSize",21),1===s&&(r+="&isHomePage=true"),r+="&version=v2","true"==this.carousel.excludeCartItems?r+="&excludeCartItems=true":r+="&excludeCartItems=false",this.carousel.badgePreference&&this.carousel.badgeList&&(r+=`&${this.carousel.badgePreference}=${this.carousel.badgeList}`),this._http.get(this._appConfigService.generateFinalApiUrl(r),i)}if("p13n-generic"===this.carousel.dataDriven){let e=!1;"true"===this.carousel.excludeCartItems&&(e=!0);let t=this.carousel.apiPostBody?this.carousel.apiPostBody:"",i="www."+window.AB.userInfo.banner+".com",n="https://www."+window.AB.userInfo.banner+".com"+window.location.pathname,r=h({modelConfigurationId:this.carousel.modelConfigurationId,uiPageSize:this.carousel.maxNoOfProducts,assortmentChannel:window.AB.COMMON.getUserChannel(),banner:window.AB.userInfo.banner,storeId:window.AB.userInfo.branchId,excludeCartItems:e,host:i,pageURL:n,aisleId:t,excludeOOS:!0},this.carousel?.badgePreference&&this.carousel?.badgeList?{[this.carousel?.badgePreference]:this.carousel?.badgeList}:{}),s=this._p13nEndpointService.generateProductsRequestPayload(r);return this._p13nEndpointService.getP13nProductsRecommendation(s).pipe(bi((e=>(this.setDynamicUiElements(e),e))))}if("aisle-level-2"===this.carousel.behaviour)return this._getAisleLevel2Data(e);if(this.dynamicCarousels.includes(this.carousel.behaviour)||this._checkMostPopular(this.carousel))return this._getBloomreachData(this.carousel.behaviour,e);if("my-last-order-erums"===this.carousel.behaviour){let e=window.AB.lastOrderErumsHttpOptions["ocp-apim-subscription-key"];return this._http.get(this._appConfigService.generateFinalApiUrl(this.carousel.dataSource),{headers:new jy(f(h({},window.AB.lastOrderErumsHttpOptions),{"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(e)}))})}if("recommendations"===this.carousel.behaviour){let i={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.erumsConfig["xapi.pdreco.apim.key"])})};window.AB.COMMON.isB2BSite()&&(i.headers=i.headers.set("pgm","1P_B2B"));let n=this.getNewUrl(e,t),r=this.addAdobeUserContext(n),s=null!=e&&""!==e?this.protocol+e+r:r;return this._http.get(this._appConfigService.generateFinalApiUrl(s),i)}if("my-last-order-purchase-xapi"===this.carousel.behaviour){let t=window.SWY.CONFIGSERVICE.omsConfig["swy.api.purchase.service.purchases.apim.key"],i=window.AB.userInfo.SWY_SHOP_TOKEN,n=window.AB.userInfo.customerId,r="?storeId="+window.AB.userInfo.branchId,s="&size="+this.carousel.maxNoOfProducts,a=this.carousel.dataSource+"/"+n+r+"&"+s+"&includeOffer=true";a=this._appConfigService.generateCBAUrl(a);let o={headers:new jy({"ocp-apim-subscription-key":this._appConfigService.getFinalSubscriptionKey(t),Authorization:"Bearer "+i,accept:"application/json"})},l=null!=e&&""!==e?this.protocol+e+a:a;return this._http.get(this._appConfigService.generateFinalApiUrl(l),o)}if("pdp-carousel"===this.carousel.behaviour){let i={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})};window.AB.COMMON.isB2BSite()&&(i.headers=i.headers.set("pgm","1P_B2B"));let n=this.getNewUrl(e,t);if(!this._aemService.getFeatureFlagByNameDisable("isSpCarouselProductTrackingDisabled")){n+=`&disableTracking=${("true"===this.carousel.isDisableTracking).toString()}`}return this._http.get(this._appConfigService.generateFinalApiUrl(n),i)}return this._http.get(this._appConfigService.generateFinalApiUrl(this.carousel.dataSource))}handleTokenValidationAndApiCall(e,t,i,n){window.SWY.ENFORCEMENT.isTokenActive()?this._getAPIData(t,i,n).subscribe({next:t=>e.next(t),error:t=>e.error(t),complete:()=>e.complete()}):(e.next([]),e.complete())}getEmsmEndpointForPDP(e){if(!this._aemService.getFeatureFlagByNameDisable("isEMSMSponsoredDisabled")&&window.SWY.CONFIGSERVICE?.searchConfig?.apimEmsmSponsoredCarouselEndpoint){let t=new URL(window.location?.origin+e);return window.SWY.CONFIGSERVICE?.searchConfig?.apimEmsmSponsoredCarouselEndpoint+t.search}return e}isEmsmSponsoredAPIMigration(){if(!this._aemService.getFeatureFlagByNameDisable("isEMSMSponsoredDisabled")){let e=2===String(this.carousel.apiPostBody??"").split("_").filter(
1Boolean).length,t=this.carousel.isAislesCrossSellCarousel&&this.carousel.crossSellCarouselCategoryId&&this.carousel.crossSellCarouselProductId,i=this.carousel.isCrossSellCarousel&&this.carousel.crossSellCarouselCategoryId&&this.carousel.crossSellCarouselProductId,n=this.carousel.dataSource.includes("product-details");if(e||t||i||n)return!0}return!!(!this._aemService.getFeatureFlagByNameDisable("isEMSMSponsoredDealsDisabled")&&this.carousel.dataSource.includes("deals-carousel")||this.carousel.dataSource.includes("dealsdiscovery-carousel"))}setExcludeBpns(){let e="";if(localStorage.getItem("abCart")){let t=this._cartService._get().cartItems;if(t&&t.length>0){let i=t.map((e=>e.itemId));i.length>0&&(i.forEach((function(t){e+=t+","})),e=e.substring(0,e.length-1))}}return e}setDynamicUiElements(e){this.setDynamicTitle(e),this.setDynamicCtaLink(e),this.setDynamicCtaText(e)}setDynamicTitle(e){this.setDynamicUiElement(this.carousel,"title",e,e?.carouselTitle,"hasDynamicTitle")}setDynamicCtaLink(e){this.setDynamicUiElement(this.carousel,"ctaLink",e,e?.p13nData?.metadata?.webCtaLink,"hasDynamicCtaLink")}setDynamicCtaText(e){this.setDynamicUiElement(this.carousel,"ctaText",e,e?.p13nData?.metadata?.webCtaText,"hasDynamicCtaText")}setDynamicUiElement(e,t,i,n,r){n&&(e[t]=n),i[r]=null!=n}checkImplicitDiet_AB_Eligibility(e){let t=e,i=!1,n=t.productList?t.productList:[];if(n.length>1){let e=n[0],t=n[1];e.productsinfo&&e.productsInfoCount&&t.productsinfo&&t.productsInfoCount&&(i=e.productsInfoCount>1&&t.productsInfoCount>1)}this.carousel.isUserEligible=i}replaceURLParam(e,t,i){return e.substring(0,e.indexOf(t+"=")+(t+"=").length)+i+e.substring(e.indexOf("&",e.indexOf(t+"=")),e.length)}_populateEndPoint(e="",t=""){let i=this.carousel.dataSource,n=window.AB.userInfo.branchId,r=this.setExcludeBpns(),s=r+($(".product-details-wrapper")&&!r.includes($(".product-details-wrapper").attr("data-bpn"))?(""!==r?",":"")+$(".product-details-wrapper").attr("data-bpn"):""),a=this.carousel.apiPostBody,o=window.innerWidth+","+window.innerHeight,l=encodeURIComponent(window.AB.COMMON.getCookie("_elevaate_session_id")),c=window.AB.COMMON.authorize()&&window.AB.userInfo.clubCard?encodeURIComponent(window.AB.userInfo.clubCard):"",d=window.AB.userInfo.banner,u=window.AB&&window.AB.userInfo&&window.AB.userInfo.houseId?window.AB.userInfo.houseId:"";return i=i.replace("{storeId}",n).replace("{bpnId}",s).replace("{aisleId}",a).replace("{screenWidth}",o).replace("{featuredSessionId}",l).replace("{userId}",c).replace("{banner}",d).replace("{shelfId}",e).replace("{hhid}",u).replace("{dept}",a).replace("{startDate}",t).replace("{channel}",""),i}_checkMostPopular(e){return!("most-popular"!==e.behaviour||!e.dataSource.includes(this.carouselBehaviours["best-sellers"]))}_getBloomreachData(e,t){let i={},n=[];switch(e){case"most-popular":case"best-sellers":i={start:"0",rows:this._searchResultsService.getRowsFromEndpoint(this.carousel.dataSource),request_type:"search",search_type:"keyword",sort:"best_seller desc",facet:"false"},n=["q","fq","pid"];break;case"more-like-this":i={start:"0",rows:this._searchResultsService.getRowsFromEndpoint(this.carousel.dataSource),request_type:"mlt",pid:$(".product-details-wrapper").attr("data-bpn"),facet:"false"},n=["q","search_type","fq"];break;case"most-popular-l2":i={start:"0",rows:this._searchResultsService.getRowsFromEndpoint(this.carousel.dataSource),request_type:"search",search_type:"keyword",sort:"best_seller desc",query:this.carousel.apiPostBody,fq:'departmentName:"'+this.carousel.aisleName+'"',isMostPopularL2:!0,facet:"false"},this._updateAnalyticsDataLayer()}return this._searchResultsService.setBloomreachData(i,n,t),this._searchResultsService.getProductResults(t)}_updateAnalyticsDataLayer(){let e=this.carousel.apiPostBody;this._productInfo({aisleId:e})}checkRecommendations(e){return"recommendations"===e.behaviour}_getAisleLevel2Data(e){if(this.carousel.apiPostBody){let t=window.AB.userInfo.branchId,i="&storeId="+t,n="&aisleId="+this.carousel.apiPostBody,r=this.carousel.dataSource+i+n,s=null!=e&&""!==e?this.protocol+this.carousel.dataSource+"&storeId="+t+n:r;return this._updateAnalyticsDataLayer(),this._http.get(this._appConfigService.generateFinalApiUrl(s))}return fi(null)}_getAisleLevel2xAPIData(e){let t=window.AB.userInfo.branchId;if(this.carousel.apiPostBody&&t){let e=this.carousel.dataSource;e+="&storeid="+t,e+="&category-id="+this.carousel.apiPostBody,e+="&url="+window.location.origin,e+="&pageurl="+window.location.origin,e+="&request-id="+this._getUTCTimeStampRandom(),e+="&search-uid="+encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),e+=`&visitorId=${window.AB.COMMON.getCookie("absVisitorId")}
1`,this.carousel.sellerId||(e+="&dvid=web-4.1aisles"),this._updateAnalyticsDataLayer();let i={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})};return this._http.get(this._appConfigService.generateFinalApiUrl(e),i)}return fi(null)}_getTopCategoryProductsXAPIData(e){let t=window.AB.userInfo.branchId,i=this.carousel.sellerId?window.location.origin+"/"+this.carousel.sellerId:window.location.origin;if(this.carousel.apiPostBody&&t){let e=this.carousel.dataSource;e+="&storeid="+t,e+="&url="+i,e+="&pageurl="+window.location.origin,e+="&request-id="+this._getUTCTimeStampRandom(),e+="&search-uid="+encodeURIComponent(window.AB.COMMON.getCookie("_br_uid_2")),e+=`&visitorId=${window.AB.COMMON.getCookie("absVisitorId")}`,this.carousel.sellerId||(e+="&dvid=web-4.1aisles"),this._updateAnalyticsDataLayer();let n={headers:new jy({"Ocp-Apim-Subscription-Key":this._appConfigService.getFinalSubscriptionKey(window.SWY.CONFIGSERVICE.searchConfig.apimSubscriptionKey)})};return this._http.get(this._appConfigService.generateFinalApiUrl(e),n)}return fi(null)}_getBPNCuratedData(e,t){let i=this.getDataSource(e);return i&&""!==i?this._productCatalogService.getCatalogXapiProductPriceByBpn(i,!this.carousel.isAuthorizedUser,!0,!0,this.carousel.sellerId,null,"wineshop"===this.carousel.sellerType&&this._isWineShopEnabledForStore(),t,this.carousel?.badgePreference,this.carousel?.badgeList):fi({})}_isWineShopEnabledForStore(){let e=window.AB.storeFlagsData;return!!(e&&e.flags&&e.flags.ecomStore&&e.flags.ecomStore.storeFeatures&&1==e.flags.ecomStore.storeFeatures.isWineD2CEnabled)}_getEmbeddedJSONData(){return fi(JSON.parse(this.carousel.dataSource))}_getGenericProductsData(){return fi(JSON.parse(this.carousel.dataSource))}_viewMoreLinkPDP(e){$(".master-product-carousel.section.pdp-carousel .carousel-header-link.mask").attr("href",this.pdpCarousel["view-more-link"]+e).removeClass("mask")}getUserType(){return fi(window.AB.userInfo)}removeMask(e){$(e).parent().removeClass("mask"),$(e).parent().removeClass("no-block-height")}getNewUrl(e,t){let i="{houseHoldId}",n="{bpn}",r="{asileId}",s="{deptL2Id}",a="{aisleL3Id}",o="{shelfL4Id}",l=$(".product-details-wrapper"),c=window.AB,d=c.userInfo.houseId,u=c.userInfo.branchId,p=this.carousel.apiPostBody,h=l&&l.attr("data-bpn"),f=window.location.origin+window.location.pathname,m=window.location.host,g="true"===t.getAttribute("data-carousel-pdp"),b=[],y=String(window.AB.userInfo.preferenceMode).toUpperCase(),v=String(window.AB.userInfo.userType).toUpperCase(),w=this.getUrl(b,u,f,m);if(this._appConfigService.isLSCompatible()&&("C"===v||"R"===v)&&("DUG"===y||"DELIVERY"===y)&&localStorage.getItem("abCart")){let e=this._cartService._get().cartItems;e&&e.length>0&&(b=e.map((e=>e.itemId))),w=this.getUrl(b,u,f,m)}let _=this.carousel.dataSource.replace("{storeId}",u).replace("{pageURL}",this.protocol+e).replace("{host}",this.protocol+e),S=null!=e&&""!==e?_:w,C=t.getAttribute("data-carousel-mboxid");if(this.carousel.sellerId){if(C&&"{sellerId}-mkp-L2-1"===C){let e=C.replace("{sellerId}",this.carousel.sellerId);S=S.replace("mbox=mkp-landing-1","mbox="+e),S=S+"&sellerId="+this.carousel.sellerId}else S=S+"&sellerId="+this.carousel.sellerId;S=S.replace("&url="+window.location.origin,"&url="+window.location.origin+"/"+this.carousel.sellerId)}if(-1!==S.indexOf(i)&&(S=""!==d?S.replace(i,d):S.replace("&thirdPartyId="+i,"")),-1!==S.indexOf(n)&&(S=void 0!==h?S.replace(n,h):S.replace("&entity.id="+n,"")),-1!==S.indexOf(r)&&(S="1_"!==p?S.replace(r,p):S.replace("&entity.categoryId="+r,"")),g){let e=$(".pdpCrumbs-list"),t=e&&e[1]&&e[1].getAttribute("data-l2-id")?e[1].getAttribute("data-l2-id"):"",i=e&&e[2]&&e[2].getAttribute("data-l3-id")?e[2].getAttribute("data-l3-id"):"",n=e&&e[3]&&e[3].getAttribute("data-l4-id")?e[3].getAttribute("data-l4-id"):"";-1!==S.indexOf(s)&&(S=""!==t?S.replace(s,t):S.replace("&departmentId="+s,"")),-1!==S.indexOf(a)&&(S=""!==i?S.replace(a,i):S.replace("&aisleId="+a,"")),-1!==S.indexOf(o)&&(S=""!==n?S.replace(o,n):S.replace("&shelfId="+o,"")),this.carousel.sellerId||(S+="&featured=true")}return S}getUrl(e,t,i,n){if(!this.carousel?.dataSource)return"";let r=this.carousel.dataSource;return e.length>0&&(r=r.replace("{excludedIds}",e.join())),r=r.replace("{bpnId}",this.setExcludeBpns()+($(".product-details-wrapper")&&!this.setExcludeBpns().includes($(".product-details-wrapper").attr("data-bpn"))?(""!==this.setExcludeBpns()?",":"")+$(".product-details-wrapper").attr("data-bpn"):"")).replace("{storeId}",t).replaceAll("{pageURL}",i).replace("{host}",n).replace("{requestId}",this._getUTCTimeStampRandom()).replace("{searchUID}",encodeURIComponent(this._utilService.getCookie("_br_uid_2"))).replace("{visitorId}",this._utilService.getCookie("absVisitorId")).replace("{uuid}",this.uuid).replace("{channel}",window.AB.COMMON.getUserChannel()),r}addAdobeUserContext(e){let t=this.checkAnalyticsSwyObject()?window.analyticsSwy.storedData.ids.paramsForRecs:"";return t&&(e+="&"+t),this.isLoggedIn()&&window.AB.userInfo.customerId&&(e+="&guid="+window.AB.userInfo.customerId,e+="&authState=1"),window.analyticsSwy.storedData.ids.at_property&&(e+="&at_property="+window.analyticsSwy.storedData.ids.at_property),e}isLoggedIn(){return window.AB.COMMON.sessionNotExpired()&&window.AB.COMMON.authorize()}checkAnalyticsSwyObject(){return!(!window.analyticsSwy||!window.analyticsSwy.storedData)&&
1!!window.analyticsSwy.storedData.ids}getUrl_EndPoint(e="",t="",i=""){let n=this._populateEndPoint(e,i);return null!=t&&""!==t?this.protocol+t+n:n}modifyDataCarouselApi(e,t,i){let n=e;if(-1!=e.indexOf("{"+t+"}"))return e.replace("{"+t+"}",i);if(-1===n?.indexOf("&"+t+"=")&&-1===n?.indexOf("?"+t+"=")){let e=n?.includes("?")?"&":"?";return n+e+`${t}=${i}`}return this.updateParamValue(e,t,i)}updateParamValue(e,t,i){let n=t,r=new RegExp(`${n}=[^&]*`);return e?.replace(r,`${n}=${i}`)}_getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Wne),lr(Lge),lr(kne),lr(Rw),lr(hP),lr(xne),lr(QD),lr(uP),lr(Qw),lr(Sw),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();function Gye(e,t){1&e&&(Ef(0),kf(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"div",8),Tf(6,"div",9),xf()()()()(),Df())}function Kye(e,t){if(1&e&&(Ef(0),bm(1),Tf(2,"product-carousel-al-v1",10),Df()),2&e){let e=Yf(2),t="bia-spaCarousel"===e.carousel.behaviour||"dynamic-grid-with-facets"===e.carousel.behaviour?e.carousel.behaviour:null;Vd(2),zh("enableProductDetailsPath",e.enableProductDetailsPath)("carouselProducts",e.products)("carouselProductsOffers",e.offers)("configObj",e.configObj)("carouselP13nData",e.analyticsp13nData)("marketingTile",e.marketingTile)("pageName",e.pageName),gh("data-lazy-component","product-carousel")("data-carousel-type",e.carousel.type)("data-carousel-action",e.carousel.actionButton)("data-carousel-driven",e.carousel.dataDriven)("data-carousel-max-products",e.carousel.maxNoOfProducts)("data-navigation-type","page-by-page")("data-include-offer",e.carousel.includeOffer)("data-seller-type",e.carousel.sellerType)("data-products",e.getCarouselProductsJson(e.products))("data-offers",e.getCarouselOffersJson(e.offers))("data-carousel-behaviour",t)}}function Qye(e,t){if(1&e&&(Ef(0),ph(1,Kye,3,18,"ng-container",1),Df()),2&e){let e=Yf();Vd(),zh("ngIf",e.products&&e.products.length>0)}}function Jye(e,t){if(1&e&&(kf(0,"div",11),am(1),xf()),2&e){let e=Yf();Vd(),cm(" ",e.errorMessage," ")}}function Zye(e,t){1&e&&Tf(0,"modal",12)}var Xye=(()=>{class e{constructor(e,t,i,n,r,s){this.elementRef=e,this._carouselService=t,this._appConfigService=i,this._featureFlagService=n,this._cdRef=r,this._aemService=s,this.isAuthorizedUser=window.AB.COMMON.authorize(),this.products=[],this.error=!1,this.showLoading=!0,this.unAttendDeliveryFlag=!1,this.isWineShopEnabled=!1,this.showBoxtop=!1,this.showCarousel=!0,this.sponsoredCarousel=!1,this.isArEnable=!1,this.isFromBia=!1,this.isMKPEnabled=!1,this.isHomeTargeted=!1,this.subscription=new Ye,this.hideSponsoredOnAdBlock=!1,this.enableProductDetailsPath=!0,this.configObj={appName:null,programType:"abs"},this.pageName="",this.marketingTile=null,this.shouldLoadMarketingTileFromZoneAPI=!0,this.isDynamicGridFlow=!1}ngOnInit(){this.wrapper=this.elementRef.nativeElement.parentNode.parentNode,this.isHomeTargeted=this.wrapper.getAttribute("data-home-targeted"),this.carouselDriven=this.wrapper?.getAttribute("data-carousel-driven"),this.pageName=this.wrapper?.getAttribute("data-page-name"),!this._featureFlagService.getFeatureFlagByNameDisable("isMarketingCardInProductCarouselDisabled")&&this.wrapper?.getAttribute("data-mt-marketingTileJson")&&"true"===this.wrapper?.getAttribute("data-mt-includeMarketingTile")&&(this.shouldLoadMarketingTileFromZoneAPI=!1,this.marketingTile=JSON.parse(this.wrapper?.getAttribute("data-mt-marketingTileJson")),this.marketingTile.hasOwnProperty("webCtaProps")&&(this.marketingTile.webCtaProps=f(h({},this.marketingTile.webCtaProps),{openNewTab:this.marketingTile.webCtaProps.hasOwnProperty("newTab")?this.marketingTile?.webCtaProps.newTab:"false"}))),this.carousel={type:this.wrapper.getAttribute("data-carousel-type"),dataDriven:this.wrapper.getAttribute("data-carousel-driven"),behaviour:this._carouselService.getBehaviour(this.wrapper),sellerId:this.wrapper.getAttribute("data-carousel-seller-id"),title:this.wrapper.getAttribute("data-carousel-title"),userRestrictions:this.wrapper.getAttribute("data-carousel-users"),dataSource:this._carouselService.getDataSource(this.wrapper),apiPostBody:this.wrapper.getAttribute("data-carousel-api-post"),actionButton:this.wrapper.getAttribute("data-carousel-action"),aisleName:this.wrapper.getAttribute("data-carousel-aisle-name"),hostName:this.wrapper.getAttribute("data-carousel-hostName"),maxNoOfProducts:this.wrapper.getAttribute("data-carousel-max-products"),buyItAgainPage:this.wrapper.getAttribute("data-buy-it-again-page"),isRecommended:!1,id:this.createCarouselId(),isAuthorizedUser:this.isAuthorizedUser,pathwaysWidget:{},sellerType:this.wrapper.getAttribute("data-seller-type"),isUserEligible:!0,modelConfigurationId:this.wrapper.getAttribute("data-model-id"),experimentation:this.wrapper.getAttribute("data-experimentation"),widgetId:"curated-search"==this.carouselDriven||"curated-category"==this.carouselDriven?this.wrapper?.getAttribute("data-custom-control-id"):null,isCrossSellCarousel:"searchCrossSell"==this.pageName,isAislesCrossSellCarousel:"aislesCrossSell"==this.pageName,crossSellCarouselProductId:this.wrapper?.getAttribute("data-carousel-searchCrossSell-product-id"),crossSellCarouselCategoryId:this.wrapper?.getAttribute("data-carousel-searchCrossSell-category-id"),isSponsoredDealsCarousel:"dealsSponsoredCarousel"===this.pageName,isHomePageCarousel:"homepage"===this.pageName,searchKeyword:this.wrapper?.getAttribute("data-searchKeyword"),isDisableTracking:this.wrapper?.getAttribute("data-isDisableTracking"),badgePreference:this.wrapper?.getAttribute("data-badge-preferrence"),badgeList:this.wrapper?.getAttribute("data-badge-list")},this.configObj.programType=this.wrapper.getAttribute("data-seller-type"),this.carousel.isRecommended=this._carouselService.checkRecommendations(this.carousel);let e="true"===this.wrapper.getAttribute("data-carousel-pdp");this.hideSponsoredOnAdBlock=e&&null==this.carousel.dataDriven&&"Similar Items"===this.carousel.title,this.isDynamicGridFlow="true"===this.wrapper.getAttribute("data-is-dynamic-grid-flow"),!0===this.isDynamicGridFlow&&(this.configObj={appName:null,programType:"abs",enableLazy
1Impressions:!0});let t=window.AB.storeFlagsData;if("client-side"===this.carousel.experimentation&&(this.carousel.experimentationId=this.wrapper.getAttribute("data-experimentation-id"),this.carousel.experimentationType=this.wrapper.getAttribute("data-experimentation-type")),function(e){return typeof e>"u"||null===e||0===Object.keys(e).length}(t)?$(document).on("storeFlagsLoadComplete",(()=>{this._checkMKPFlag(),$(document).off("storeFlagsLoadComplete")})):this._checkMKPFlag(),"mkp"===this.carousel?.sellerType){this.configObj.programType=this.carousel.sellerType;let e=$("product-detail").attr("data-product-seller-id"),t=$("product-detail").attr("data-product-seller-name");if(e&&(this.carousel.sellerId=e,t)){let e=this.carousel.title.replace("{sellerName}",t);e&&(this.carousel.title=e,this.wrapper.closest(".slick-product-carousel").querySelector(".carousel-header-wrapper .carousel-header-text-wrapper .carousel-header-text").innerHTML=e)}}"wineshop"===this.carousel?.sellerType&&this._carouselService._isWineShopEnabledForStore()&&(this.isWineShopEnabled=!0,this.configObj.programType=this.carousel.sellerType);let i=this.wrapper.getAttribute("data-card-type");i&&(this.cardType=i),"featured-products"===this.carousel.dataDriven?this.sponsoredCarousel=!0:"buy-it-again"===this.carousel.dataDriven&&(this.isFromBia=!0),this.showCarousel=!0,!this.isScheduleAndSaveCarousel()||this.carousel.sellerId&&this.isMarketPlaceDisabled()?(("false"!==this.carousel.userRestrictions&&this.carousel.userRestrictions||"most-popular"===this.carousel.behaviour)&&(this.showCarousel=!1,this._carouselService.getUserType().subscribe((e=>{this.isAuthorizedUser&&this.carousel.userRestrictions.includes("R")?1===this.carousel.userRestrictions.length?"my-last-order"!==this.carousel.behaviour&&"my-last-order-erums"!==this.carousel.behaviour&&"my-last-order-purchase-xapi"!==this.carousel.behaviour||!window.AB.COMMON.checkPendingOrder()?(this._carouselService.removeMask(this.wrapper),this.showCarousel=!0):(this._carouselService.checkCarouselBehaviour("onError",this.carousel,this.wrapper),this.showCarousel=!0):(this._carouselService.removeMask(this.wrapper),this.showCarousel=!0):(this.carousel.userRestrictions.includes(e.userType)||"G"===e.userType&&"most-popular"===this.carousel.behaviour||"most-popular"===this.carousel.behaviour)&&(this._carouselService.removeMask(this.wrapper),this.showCarousel=!0)}))),window.AB.arFlagLoaded?(this.isArEnable=window.AB.arFlag,this._getCarouselProducts()):this._appConfigService.canTriggerProductsCall()?this.subscription.add(Li(document,"arFlagLoaded").subscribe((e=>{this.isArEnable=!!(e&&e.detail&&e.detail.arFlag)&&e.detail.arFlag,this._getCarouselProducts()}))):this._getCarouselProducts()):this._apiCall(),(this.carousel.isCrossSellCarousel||this.carousel.isAislesCrossSellCarousel||"dealsSponsoredCarousel"===this.pageName)&&this._appConfigService.updateSearchCrossSell$.subscribe((e=>{this.products=[],this._cdRef.detectChanges(),this.showLoading=!0,this.error=!1,"dealsSponsoredCarousel"===this.pageName&&"string"==typeof e?(this.carousel.dataSource=this.carousel.dataSource.split("&fq")[0],this.carousel.dataSource+=e):(this.carousel.crossSellCarouselProductId=this.wrapper?.getAttribute("data-carousel-searchCrossSell-product-id"),this.carousel.crossSellCarouselCategoryId=this.wrapper?.getAttribute("data-carousel-searchCrossSell-category-id")),$(this.wrapper)?.closest(".master-product-carousel, .slick-product-carousel")?.removeClass("d-none"),this._apiCall()})),"featured-products"===this.carousel?.dataDriven&&$('[data-pagetype="pdp"]')?.length>0&&this.handleFeaturedItemsAATest()}_checkMKPFlag(){let e=window.AB.storeFlagsData;this.isMKPEnabled=!!(e&&e.flags&&e.flags.ecomStore&&"true"==e.flags.ecomStore.isMKPEnabled)}isMarketPlaceDisabled(){let e=!1;return this.isMKPEnabled||(e=!0),e}_getCarouselProducts(){if(null!=this.carousel.dataSource&&this.showCarousel)if(this.isAuthorizedUser&&this.carousel.userRestrictions.includes("R"))this._appConfigService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&(!this.carousel.sellerId||!this.isMarketPlaceDisabled())&&this._apiCall()}
1));else if("recommendations"===this.carousel.behaviour)if(!0!==window.SWY.CONFIGSERVICE.featureToggleConfig.cookieConsentCheckDisable){let e=window.dataLayer&&window.dataLayer.find((e=>"OneTrustGroupsUpdated"===e.event));e?e?.OnetrustActiveGroups.includes("C0003")&&e?.OnetrustActiveGroups.includes("C0002")?this.doProductRecommendationsCall():this.showError("Product carousel not available."):window.addEventListener("OneTrustGroupsUpdated",(e=>{let t=e&&e.detail;t&&t.includes("C0003")&&t.includes("C0002")?this.doProductRecommendationsCall():this.showError("Product carousel not available.")}),{once:!0})}else this.doProductRecommendationsCall();else(!this.carousel.sellerId||!this.isMarketPlaceDisabled())&&this._apiCall();else this.showError("No data source defined for this carousel.")}doProductRecommendationsCall(){!this.checkTargetContextIds()||this.carousel.sellerId&&this.isMarketPlaceDisabled()?(!this.carousel.sellerId||!this.isMarketPlaceDisabled())&&document.addEventListener("at-identifiers",(()=>{this._apiCall()})):this._apiCall()}checkTargetContextIds(){return!(!this._carouselService.checkAnalyticsSwyObject()||!window.analyticsSwy.storedData.ids.paramsForRecs)}_apiCall(){this._appConfigService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&this._carouselService.getData(this.carousel,this.carousel.hostName,this.wrapper,this.configObj).pipe(Hi(1)).subscribe({next:e=>{if(this._appConfigService.isObjectValid(e)){let t=this;if(e.metadata&&e.metadata.widget&&(t.carousel.pathwaysWidget=e.metadata.widget,window.AB.DATALAYER.pathwayWidgetView(e.metadata.widget)),e.purchases?e.products=e.purchases:e.products=e.products?e.products:e.orderItems?e.orderItems:e.productsinfo?e.productsinfo:e.response?e.response.docs:null,e.offersData=e.offersData?e.offersData:e.response&&e.response.hasOwnProperty("offersData")?e.response.offersData:null,this.addPlacementBeacons(e),this.setDynamicUiElements(e),e&&e.p13nData&&(t.analyticsp13nData=e.p13nData),window.AB?.DATALAYER&&(window.AB.DATALAYER.setP13nExperimentExposure(e),window.AB.DATALAYER.setAMCProductsExposed&&window.AB.DATALAYER.setAMCProductsExposed(e,this.carousel,this.wrapper)),null!=e.products)if(!this._featureFlagService.getFeatureFlagByNameDisable("isMarketingCardInProductCarouselDisabled")&&this.shouldLoadMarketingTileFromZoneAPI&&(t.marketingTile="true"===e?.includeMarketingTile?e?.marketingTile:null),t.isHomeTargeted){t.products=e.products,t.showLoading=!1,null!=e.offersData&&(t.offers=e.offersData);let i=e?.response?.placementBeacons,n=!!(i?.placementOnLoadBeacon||i?.placementOnLoadBeacon_top||i?.placementOnLoadBeacon_bottom);e.modelId&&"650a2c73537e397683690448"==e.modelId&&e.products?.length>0?this._appConfigService.sendSponsoredProductsOnloadEvent(e.products,"productCarouselWrapper",void 0,e?.sponsorshipInfo?.placementBeacons):n&&e.products?.length>0&&this._appConfigService.sendSponsoredProductsOnloadEvent(e.products,"productCarouselWrapper",void 0,i)}else t._carouselService.getUpdatedProducts(e.products,t.carousel,t.carousel.hostName).subscribe((i=>{if(i&&1!=i.ack){t.allowNotAvailable(),t.products=e.products;let n=e?.response?.placementBeacons;this._appConfigService.sendSponsoredProductsOnloadEvent(e.products,"productCarouselWrapper",void 0,n),e.offersData?t.offers=e.offersData:t.offers=i.response&&i.response.hasOwnProperty("offersData")?i.response.offersData:null,e.campaignRecipeName?t.experienceName=e.campaignRecipeName:t.experienceName=i.response&&i.response.hasOwnProperty("campaignRecipeName")?i.response.campaignRecipeName:null,null==e.products&&t._carouselService.checkCarouselBehaviour("onError",t.carousel,t.wrapper),t.showLoading=!1,t._cdRef.detectChanges(),t.hideSponsoredOnAdBlock&&t.hideSponsoredIfAdBlocked()}else{t.showError("This product carousel is not available for Anonymous users.");let i=e?.response?.placementBeacons;this._appConfigService.sendSponsoredProductsOnloadEvent([],"productCarouselWrapper",void 0,i)}}),(e=>t.showError("No products available to update the source.")));else{let i=e?.response?.placementBeacons;i&&this._appConfigService.sendSponsoredProductsOnloadEvent([],"productCarouselWrapper",void 0,i),t.showError("No products available.")}}else this.showError("No products available.")},error:e=>this.showError("No products available for this source.")})}))}
1showError(e){this._carouselService.checkCarouselBehaviour("onError",this.carousel,this.wrapper),this.showLoading=!1,this.errorMessage=e,this.error=!0}addPlacementBeacons(e){if(e?.response?.docs||e?.modelId&&"650a2c73537e397683690448"==e.modelId&&e.products?.length>0){let t=e?.response?.placementBeacons||e?.sponsorshipInfo?.placementBeacons;e.response?.docs?e.response.docs=e.response.docs.map((e=>(e.placementBeacons=t??null,e))):e.products=e.products.map((e=>(e.placementBeacons=t??null,e)))}}checkRestrictedItems(){this.unAttendDeliveryFlag=!0}createCarouselId(){return Math.floor(900*Math.random()+100)}allowNotAvailable(){return this.carousel&&"buy-it-again-landing"===this.carousel.behaviour}ngOnDestroy(){this.subscription.unsubscribe(),clearTimeout(this.adBlockCheckTimer),this.adBlockCheckHandler&&window.removeEventListener("adBlockerLoadChecked",this.adBlockCheckHandler)}hideSponsoredIfAdBlocked(){let e=()=>{let e=this.wrapper?.closest(".slick-product-carousel"),t=this._hasCosmeticallyFilteredSlides(e);if(!(!1===window.googletag?._loaded_||e&&"none"===getComputedStyle(e).display||t))return;if(!this.products?.some((e=>!0===e.featured)))return void(t&&this._removeSponsoredSlidesFromSlick(e));let i=this.products.filter((e=>!0!==e.featured));0!==i.length&&(this.products=i,e?.style.setProperty("display","block","important"),t?this._removeSponsoredSlidesFromSlick(e):this._cdRef.detectChanges())};void 0===window.checkAdBlocker?(this.adBlockCheckHandler=e,window.addEventListener("adBlockerLoadChecked",e,{once:!0})):e(),this.adBlockCheckTimer=setTimeout(e,400)}_hasCosmeticallyFilteredSlides(e){return!!e&&Array.from(e.querySelectorAll(".pc-slick-slide")).some((e=>{let t=e.querySelector(".h-100");if(!t)return!1;let i=t.querySelector("product-carousel-item-al-v2");return!i||"none"===getComputedStyle(i).display}))}_removeSponsoredSlidesFromSlick(e){if(!e)return;let t=Array.from(e.querySelectorAll(".pc-slick-slide")).filter((e=>{let t=e.querySelector(".h-100");if(!t)return!1;let i=t.querySelector("product-carousel-item-al-v2");return!i||"none"===getComputedStyle(i).display})).map((e=>parseInt(e.getAttribute("data-slick-index")??"",10))).filter((e=>!isNaN(e))).sort(((e,t)=>t-e));if(0===t.length)return;let i=$(e).find(".slick-initialized").first();i.length&&t.forEach((e=>{try{i.slick("slickRemove",e)}catch{}}))}setDynamicUiElements(e){e?.hasDynamicTitle&&this.setDynamicCarouselTitle(this.wrapper,this.carousel),e?.hasDynamicCtaLink&&this.setDynamicCarouselCtaLink(this.wrapper,this.carousel),e?.hasDynamicCtaText&&this.setDynamicCarouselCtaText(this.wrapper,this.carousel)}setDynamicCarouselTitle(e,t){console.warn("Setting carousel title dynamically");let i=e.parentElement.getElementsByClassName("carousel-nav__header-title");i?.[0]&&(i[0].innerHTML=t.title)}setDynamicCarouselCtaLink(e,t){console.warn("Setting carousel link dynamically");let i=e.parentElement.getElementsByClassName("link-sm links__action")?.[0];i&&(i.href=t.ctaLink)}setDynamicCarouselCtaText(e,t){console.warn("Setting carousel link text dynamically");let i=e.parentElement.getElementsByClassName("link-sm links__action")?.[0];i&&(i.innerHTML=t.ctaText)}getCarouselProductsJson(e){return e&&e.length>0?JSON.stringify({products:e}):"{}"}getCarouselOffersJson(e){return e?JSON.stringify({offers:e}):"{}"}isScheduleAndSaveCarousel(){return"sns"==this.cardType}handleFeaturedItemsAATest(){return v(this,null,(function*(){if(this._featureFlagService.getFeatureFlagByNameDisable("featureItemsCarouselAATestEnabled")&&window.AB?.experimentation?.getExperimentByID){let e="ACIP505563";try{let t=yield window.AB.experimentation.getExperimentByID(e,!1),i=t?.features?.[0]?.eligible||!1,n=t?.features?.[0]?.group;console?.warn(i&&"A"!==n?i&&"B"===n?"XER Featured Items Carousel group B assigned - hiding carousel":"XER Featured Items Carousel - unable to identify group Id":"XER Featured Items Carousel group A assigned",e,t?.features?.[0]?.featureId)}catch(t){console?.error("XER Featured Items Carousel - Experimentation SDK failed",t,e)}}}))}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Yye),$d(hP),$d(uP),$d(kg),$d(Cw))}}
1static{this.ɵcmp=Qr({type:e,selectors:[["product-carousel-wrapper"]],features:[xm([Yye])],decls:5,vars:4,consts:[["errorTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["data-modal-type","boxtop","data-modal-parent","product-carousel",4,"ngIf"],[1,"carousel-content-loading","d-flex","align-items-center","justify-content-center"],["id","product-carousel-loading-id",1,"otp-auth-loader"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[3,"enableProductDetailsPath","carouselProducts","carouselProductsOffers","configObj","carouselP13nData","marketingTile","pageName"],[1,"carousel-content-loading"],["data-modal-type","boxtop","data-modal-parent","product-carousel"]],template:function(e,t){if(1&e&&ph(0,Gye,7,0,"ng-container",1)(1,Qye,2,1,"ng-container",2)(2,Jye,2,1,"ng-template",null,0,Wm)(4,Zye,1,0,"modal",3),2&e){let e=sm(3);zh("ngIf",t.showLoading),Vd(),zh("ngIf",!t.error)("ngIfElse",e),Vd(3),zh("ngIf",1==t.showBoxtop)}},dependencies:[cy,yE,Sue],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),eve=e=>({"video-container--isLoading":e}),tve=()=>({calledBy:"pdp"});function ive(e,t){if(1&e&&(kf(0,"div",4)(1,"div",5)(2,"span",6),am(3),xf(),kf(4,"span",7),am(5,"Sponsored"),xf()()()),2&e){let e=Yf(2);Vd(3),lm(null==e.videoData?null:e.videoData.videoAdTitle)}}function nve(e,t){if(1&e&&(Ef(0),kf(1,"div",11)(2,"div",12),Tf(3,"product-carousel-al-v1",13),xf()(),Df()),2&e){let e=Yf(3);Vd(3),zh("configObj",e.configObj)("carouselProducts",e.products)("carouselProductsOffers",e.offers)("enableProductDetailsPath",!0),gh("data-lazy-component","product-carousel")}}function rve(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",8)(2,"video-player",9),jf("videoEvent",(function(t){return Wa(e),Ha(Yf(2).onVideoEvent(t))})),xf()(),kf(3,"div",10),ph(4,nve,4,5,"ng-container",0),xf(),Df()}if(2&e){let e=Yf(2);Vd(2),zh("xml",e.videoData.xmlVideoVAST)("title",e.videoData.videoAdTitle)("ctaUrl",e.videoData.video_optional_redirect_url)("configObj",Dm(6,tve)),Vd(),zh("ngClass",e.configObj.isLightWeightProduct?"horizontal-video-grid__products--light":"horizontal-video-grid__products"),Vd(),zh("ngIf",e.products&&e.products.length>0)}}function sve(e,t){if(1&e&&(Ef(0),kf(1,"div",1),ph(2,ive,6,1,"div",2),kf(3,"div",3),ph(4,rve,5,7,"ng-container",0),xf()(),Df()),2&e){let e=Yf();Vd(),gh("data-camp-id",(null==e.videoData?null:e.videoData.campId)||"no-value"),Vd(),zh("ngIf",!e.isVideoLoading),Vd(),zh("ngClass",Om(4,eve,e.showLoading||!e.showLoading&&e.isVideoLoading)),Vd(),zh("ngIf",!e.showLoading)}}var ave=(()=>{class e{constructor(e,t,i,n){this._elementRef=e,this._spVideoService=t,this._appConfigService=i,this.intersectionObsService=n,this.showLoading=!0,this.PAGE_TYPE_VALUES={pdp:"product-details"},this.isVideoLoading=!0,this.hideVideo=!1,this.configObj={appName:null,programType:"abs",isLightWeightProduct:!1,enableLazyImpressions:!0}}ngOnInit(){this.updateConfig(),this._appConfigService._userInfoRefresh.subscribe((e=>{if("initFunc"===e){let e=this._elementRef.nativeElement?.parentNode?.parentNode,t=e.getAttribute("data-page-type"),i=e.getAttribute("data-product-id"),n=e.getAttribute("data-shelf-id");this.handleAdBlockerAndVideo(t,i,n)}}))}handleAdBlockerAndVideo(e,t,i){let n=()=>{!1===window.googletag?._loaded_?(this.hideVideo=!0,this._hideHorizontalVideoCarousel()):e&&t?this._getHorizontalVideoCarouselData(e,t,i):this._hideHorizontalVideoCarousel()};void 0===window.checkAdBlocker?window.addEventListener("adBlockerLoadChecked",n):n()}_getHorizontalVideoCarouselData(e,t,i){let n="true"===this._elementRef.nativeElement?.parentNode?.parentNode?.getAttribute("data-isDisableTracking");this._spVideoService.getVideoAdContent(this.PAGE_TYPE_VALUES[e],1,t,i??"",n).subscribe({next:e=>{null!=e&&!this._appConfigService.isEmpty(e.video)&&!this._appConfigService.isEmpty(e.products)&&e.products.length>=2?(this.showLoading=!1,this.videoData=e.video,this.products=e.products,this.offers=e.offersData||null,this.intersectionObsService.createObserver(this._elementRef.nativeElement,e.placementBeacons)):this._hideHorizontalVideoCarousel()},error:e=>this._hideHorizontalVideoCarousel()})}_hideHorizontalVideoCarousel(){$(this._elementRef.nativeElement.parentElement).addClass("d-none")}onVideoEvent(e){e&&("isLoading"in e&&(this.isVideoLoading=e.isLoading),"hideVideo"in e&&(this.hideVideo=e.hideVideo,this.hideVideo&&this._hideHorizontalVideoCarousel()))}getIsMobile(){return window.innerWidth<768}onResize(){this.updateConfig()}updateConfig(){this.configObj=f(h({},this.configObj),{isLightWeightProduct:this.getIsMobile()})}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Xne),$d(hP),$d(dde))}}static{this.ɵcmp=Qr({type:e,selectors:[["horizontal-video-carousel-wrapper"]],hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}
1),0,od)},decls:1,vars:1,consts:[[4,"ngIf"],["data-video-enterprise","true","data-orientation","horizontal","data-is-sponsored","true","data-row-index","1","data-slot-index","1",1,"video-ad-horizontal"],["class","carousel-nav align-items-start py-2 d-flex",4,"ngIf"],[1,"horizontal-video-grid",3,"ngClass"],[1,"carousel-nav","align-items-start","py-2","d-flex"],[1,"d-flex","flex-column","justify-content-center","align-self-stretch","flex-grow-1"],["role","heading",1,"carousel-nav__header-title","color-neutral-90"],[1,"body-text-xs"],[1,"horizontal-video-grid__player",2,"aspect-ratio","16/9"],[3,"videoEvent","xml","title","ctaUrl","configObj"],[3,"ngClass"],[1,"master-product-carousel","section","static-carousel"],["data-qa","prd-crsl",1,"slick-product-carousel"],["data-carousel-type","apidriven","data-carousel-action","qty-stepper","data-seller-type","abs","data-carousel-behaviour","horizontal-video",3,"configObj","carouselProducts","carouselProductsOffers","enableProductDetailsPath"]],template:function(e,t){1&e&&ph(0,sve,5,6,"ng-container",0),2&e&&zh("ngIf",!t.hideVideo)},dependencies:[sy,cy,Sue,Pue],encapsulation:2})}}return e})();function ove(e,t){if(1&e&&(Ef(0),Tf(1,"coupon-item",14),Df()),2&e){let e=Yf();Vd(),zh("data",e.couponData)("analyticsData",e.analyticsData)("isSplashScreenCoupon",!0)}}function lve(){return window}var cve=(()=>{class e{constructor(e){this.zone=e,lve().splashModal={zone:e,component:this}}ngOnInit(){this.banner=this.fixBannerNameCase()}fixBannerNameCase(){let e=lve().AB.userInfo.banner.toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)}setModalDisplayData(e,t){this.couponData=e,lve().AB.COMMON.showSplashModal(),this.analyticsData={abTestDetails:t?.msgExperiment,modalMessage:"splash-screen-deals-for-you"},this.analyticsEvents("splash-screen-deals-for-you|view","view")}analyticsEvents(e,t){lve().AB.DATALAYER&&lve().AB.DATALAYER.setSplashScreenEvents(e,t,this.analyticsData)}analyticsTopNav(){lve().AB.DATALAYER&&lve().AB.DATALAYER.analyticsCTATracking(`cta:${lve().AB.DATALAYER.pathSections?.join(":")}|link|deals-plus-splash-screen`)}static{this.ɵfac=function(t){return new(t||e)($d(Tl))}}static{this.ɵcmp=Qr({type:e,selectors:[["splash-modal"]],decls:18,vars:4,consts:[["id","splashModal","aria-hidden","true","aria-modal","true","role","dialog","aria-label","Splash Modal",1,"modal","fade","splash-modal","modal-window"],["role","document",1,"modal-dialog","splash-modal-dialog"],[1,"modal-content","splash-modal-content"],[1,"splash-modal-header"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],[1,"svg-clv-modal-close"],["role","heading","aria-level","1",1,"splash-modal-header-text"],[1,"splash-modal-sub-header"],["href","/foru/coupons-deals.html",1,"underlined-text",3,"click"],[1,"splash-modal-body"],[1,"sincerely-foods-burst"],[1,"sincerely-foods-arrow-swirl"],[4,"ngIf"],[1,"splash-modal-footer"],[1,"coupon-grid-offer",3,"data","analyticsData","isSplashScreenCoupon"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4),jf("click",(function(){return t.analyticsEvents("splash-screen-deals-for-you|close")})),Tf(5,"span",5),xf(),kf(6,"div",6),am(7,"We're glad you're back!"),xf()(),kf(8,"div",7)(9,"span"),am(10,"Enjoy this special deal just for you. Find more like it in "),xf(
1),kf(11,"a",8),jf("click",(function(){return t.analyticsTopNav()})),am(12),xf()(),kf(13,"div",9),Tf(14,"div",10)(15,"div",11),ph(16,ove,2,3,"ng-container",12),xf(),Tf(17,"div",13),xf()()()),2&e&&(Vd(11),_h("aria-label","Enjoy this special deal just for you. Find more like it in ",t.banner," for U."),Vd(),cm(" ",t.banner," for U."),Vd(4),zh("ngIf",t.couponData))},dependencies:[cy,f3],encapsulation:2})}}return e})();function dve(e){e||(function(){if(!Es())throw new mn(-203,!1)}(),e=cr(bl));let t=new gt((t=>e.onDestroy(t.next.bind(t))));return e=>e.pipe(un(t))}var uve=function(e){return e.ItemsSelected="ItemsSelected",e.NoItemsSelected="NoItemsSelected",e.Loading="Loading",e.Error="Error",e.SuccessfulAdd="SuccessfulAdd",e}(uve||{}),pve=(()=>{class e{constructor(){this.stateSubject=new Et(1),this.state$=this.stateSubject.asObservable()}setState(e){console.warn("Setting State to",e),this.stateSubject.next(e)}setItemsSelected(){this.setState(uve.ItemsSelected)}setNoItemsSelected(){this.setState(uve.NoItemsSelected)}setLoading(){this.setState(uve.Loading)}
1setError(){this.setState(uve.Error)}setSuccessfulAdd(){this.setState(uve.SuccessfulAdd)}reset(){this.setNoItemsSelected()}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),hve=(()=>{class e{constructor(e,t){this.http=e,this.aemService=t,this.endpoint=t.getBundlesEstimatedTotalEndpoint(),this.subscriptionKey=t.getBundlesEstimatedTotalSubscriptionKey()}generateHttpOptions(){return{headers:new jy({"Content-Type":"application/json","Ocp-Apim-Subscription-Key":this.subscriptionKey})}}getEstimatedTotal(e){return this.http.post(this.endpoint,e,this.generateHttpOptions())}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),fve=(()=>{class e{constructor(e,t,i,n,r){this.ctaStateService=e,this.bundleEstimatedTotalService=t,this.cartV1Service=i,this.cartV2Service=n,this.commonService=r,this.selectedIdsSubject=new Tt(new Set),this.selectedIds$=this.selectedIdsSubject.asObservable(),this.productsInCart=new Map,this.destroyRef=cr(bl),this.addedToCartSubject=new kt,this.successfullyAddedItemToCart$=this.addedToCartSubject.asObservable(),this.previousStableSelectedIds=new Set,this.subtotalRequestInFlight=!1,this.subtotalTrigger$=new kt,this.lastRequest=null,this.previousSelectedIdsAfterAction=null,this.lastRequestType=null,this.subtotal$=this.subtotalTrigger$.pipe(hn((()=>{this.subtotalRequestInFlight||(this.subtotalRequestInFlight=!0),this.ctaStateService.setLoading()})),zi(2e3),dn((e=>this.handleSubtotalCalculation(e))),ln({bufferSize:1,refCount:!0}))}get state$(){return this.ctaStateService.state$}setInitialComponentState(e,t,i){this.ctaStateService.setState(e);let n=this.cartV2Service.getCartName(i);this.commonService.currentCartObj.pipe(bi((e=>this.cartV2Service.fetchCartDetailsFromResponse(e,n))),bi((e=>e?.cartItems??[])),hn((e=>{this.productsInCart.clear();for(let t of e)this.productsInCart.set(String(t.itemId),t)})),dve(this.destroyRef)).subscribe()}onCheckboxToggled(e,t,i){this.ctaStateService.setLoading(),this.selectedIds$.pipe(Hi(1)).subscribe((n=>{this.subtotalRequestInFlight||(this.previousStableSelectedIds=new Set(n),console.warn("NEW PREVIOUS STABLE IDS",this.previousStableSelectedIds));let r=new Set(n);t&&!r.has(e)?r.add(e):r.delete(e),this.selectedIdsSubject.next(r);let s=i.filter((e=>r.has(e.id)));this.previousSelectedIdsAfterAction=s,this.lastRequestType="subtotal",this.lastRequest=()=>this.subtotalTrigger$.next(s),this.subtotalTrigger$.next(s)}))}revertSelectionToPrevious(){this.selectedIdsSubject.next(new Set(this.previousStableSelectedIds))}onAddToCart(e){this.selectedIds$.pipe(Hi(1),bi((t=>e.filter((e=>t.has(e.id))).map((e=>f(h({},e),{itemId:e.id,qty:this.productsInCart.has(e.id)?(this.productsInCart.get(e.id)?.qty||0)+1:1}))))),dn((e=>this.cartV2Service.addOrUpdateProductQuantity(null,null,e,!0,!1,null,null,null,!1,null,null).pipe(bi((t=>({response:t,selectedProducts:e}))))))).subscribe({next:({response:t,selectedProducts:i})=>{this.lastRequest=null,this.lastRequestType=null;let n=e.filter((e=>i.some((t=>t.itemId===e.id))));this.handleSuccessfulProductAdd(t,n)},error:()=>{let t=e;this.lastRequestType="addToCart",this.lastRequest=()=>this.onAddToCart(t),this.handleErrorOnCtaAdd()}})}handleSuccessfulProductAdd(e,t){this.ctaStateService.setSuccessfulAdd(),this.addedToCartSubject.next(!0),this.cartV1Service.refreshCart(e);let i=this.getCartIdFromResponse(e);i?t&&t.length>0&&window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.addAllBundleItemsToCart(t,i):console.error("Cart ID not found")}getCartIdFromResponse(e){return e&&e.cartId?e.cartId:e&&e.cart?.abs?.cartId?e.cart.abs.cartId:null}handleErrorOnCtaAdd(){this.ctaStateService.setError()}computeSubtotal(e){if(0===e.length)return fi(0);let t=this.mapProductsToPayload(e);return this.bundleEstimatedTotalService.getEstimatedTotal(t).pipe(bi((e=>Number(e.estimatedPrice))),hn((()=>this.ctaStateService.setItemsSelected())),$i((e=>this.handleSubtotalError(e))))}handleSubtotalError(e){return this.ctaStateService.setError(),this.revertSelectionToPrevious(),fi(0)}handleSubtotalCalculation(e){return 0===e.length?(this.subtotalRequestInFlight=!1,this.ctaStateService.setNoItemsSelected(),fi(0)):this.computeSubtotal(e).pipe(tn((()=>{this.subtotalRequestInFlight=!1})))}mapProductsToPayload(e){return e.map((e=>({bpn:e.id,price:e.price?.toFixed(2),quantity:1})))}selectAll(e){let t=new Set;for(let i of e)i?.id&&t.add(i.id);this.previousStableSelectedIds=new Set(t),this.selectedIdsSubject.next(t)}sendInitialSubtotalCall(e){this.subtotalRequestInFlight=!0,this.previousSelectedIdsAfterAction=e,this.lastRequestType="subtotal",this.lastRequest=()=>this.subtotalTrigger$.next(e),this.subtotalTrigger$.next(e)}retryLastRequest(){if(this.lastRequest){if("subtotal"===this.lastRequestType&&this.previousSelectedIdsAfterAction){let e=new Set(this.previousSelectedIdsAfterAction.map((e=>e.id)));this.selectedIdsSubject.next(e)}this.ctaStateService.setLoading(),this.lastRequest()}}static{this.ɵfac=function(t){return new(t||e)(lr(pve),lr(hve),lr(Rw),lr(Mw),lr(Bw))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),mve=(()=>{class e{constructor(){this.config={}}withTitle(e){return this.config.title=e,this}withSubtitle(e){return this.config.subtitle=e,this}withBanner(e){return this.config.banner=e,this}
1withIconBackgroundImage(e){return this.config.iconBackgroundImage=e,this}withIconImageAltText(e){return this.config.iconImageAltText=e,this}withProducts(e){return this.config.products=e,this}withBannerImageAltText(e){return this.config.bannerImageAltText=e,this}build(){let e={title:this.config.title??"",subtitle:this.config.subtitle??"",banner:this.config.banner,iconBackgroundImage:this.config.iconBackgroundImage,iconImageAltText:this.config.iconImageAltText,products:this.config.products??[]};return this.reset(),e}reset(){return this.config={},this}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})();function gve(e,t){if(1&e&&(kf(0,"div",13),am(1),qm(2,"currency"),xf(),kf(3,"span",14),am(4),qm(5,"currency"),xf()),2&e){let e=Yf();Vd(),lm(jm(2,2,e.validPrice,"USD")),Vd(3),lm(jm(5,5,e.product.basePrice,"USD"))}}function bve(e,t){if(1&e&&(kf(0,"span",7),am(1),qm(2,"currency"),xf()),2&e){let e=Yf();Vd(),lm(jm(2,1,e.validPrice,"USD"))}}var yve=(()=>{class e{constructor(e,t){this.commonService=e,this.userInfoService=t,this.checked=!1,this.checkboxToggled=new _l,this.mobileSrc="",this.tabletSrc="",this.desktopSrc="",this.hasStrikeThrough=!1,this.validPrice="",this.checkboxId=""}ngOnInit(){let e=this.product.imageUrl??"";e&&(this.mobileSrc=this.appendPreset(e,"bundle-card-mobile"),this.tabletSrc=this.appendPreset(e,"bundle-card-tablet"),this.desktopSrc=e),this.validPrice=this.commonService.getValidProductPrice(this.product),this.commonService.checkStrikeThrough(this.product),this.hasStrikeThrough=!!this.product.showStrikeThrough,this.checkboxId=`checkbox-${this.product.id??crypto.randomUUID()}`}onCheckboxChange(e){e.stopPropagation();let t=e.target,i=t?.checked??!1;if(!this.userInfoService.isAuthorized())return window.AB?.COMMON?.showSignInModal_OTP?.(window.location.href),void(t.checked=this.checked);let n=this.userInfoService.getPreference()?.toLowerCase();if("j4u"===n||"instore"===n)return window.rightDrawerComp?.closeDrawer?.(),window.storeFulfillmentModal?.component?.setModalDisplayData?.(2),void(t.checked=this.checked);this.commonService.validateSession((()=>{this.checkboxToggled.emit({productId:this.product.id,checked:i})}))}appendPreset(e,t){return e?`${e}?${t}`:""}static{this.ɵfac=function(t){return new(t||e)($d(Bw),$d(_w))}}static{this.ɵcmp=Qr({type:e,selectors:[["bundle-card"]],inputs:{product:"product",checked:"checked"},outputs:{checkboxToggled:"checkboxToggled"},standalone:!0,features:[Pm],decls:16,vars:9,consts:[[1,"bundle__card-wrapper","position-relative"],["href","/","aria-label","Product name",1,"bundle__card","d-flex","align-items-center","align-items-md-start","flex-column"],[1,"bundle__card-image-ctnr"],["media","(max-width: 767px)",3,"srcset"],["media","(min-width: 768px) and (max-width: 1024px)",3,"srcset"],["loading","lazy",1,"bundle__card-image","w-100","h-100",3,"src","alt"],[1,"bundle__price-ctnr","d-flex","align-items-baseline"],[1,"pds-accent-tag","pds-accent-tag_regular","bundle__price","heading-s-b","nunito-sans"],[1,"d-flex","pds-checkbox","bundle__select",3,"for"],["type","checkbox",3,"click","id","checked"],[1,"d-flex","align-items-center","justify-content-center","pds-checkbox-checkmark"],[1,"pds-svg-checkbox-checkmark"],[1,"ml-2","pds-checkbox-label","sr-only"],[1,"pds-accent-tag","pds-accent-tag_sale","bundle__price","heading-s-b","nunito-sans"],[1,"bundle__sale-price","text-xs--light"]],template:function(e,t){1&e&&(kf(0,"div",0)(1,"a",1)(2,"div",2)(3,"picture"),Tf(4,"source",3)(5,"source",4)(6,"img",5),xf()(),kf(7,"div",6),ph(8,gve,6,8)(9,bve,3,4,"span",7),xf(),kf(10,"label",8)(11,"input",9),jf("click",(function(e){return t.onCheckboxChange(e)})),xf(),kf(12,"span",10),Tf(13,"span",11),xf(),kf(14,"span",12),am(15),xf()()()()),2&e&&(Vd(4),zh("srcset",t.mobileSrc),Vd(),zh("srcset",t.tabletSrc),Vd(),zh("src",t.desktopSrc,id)("alt",(null==t.product?null:t.product.name)||""),Vd(2),yf(t.hasStrikeThrough?8:9),Vd(2),zh("for",t.checkboxId),Vd(),zh("id",t.checkboxId)("checked",t.checked),Vd(4),cm("Select ",null==t.product?null:t.product.name,""))},dependencies:[By],encapsulation:2})}}return e})(),vve=(e,t)=>
1t.id,wve=(e,t)=>({"pds-btn-filled--primary":e,"pds-btn-transparent--primary":t});function _ve(e,t){if(1&e&&(kf(0,"div",3)(1,"picture"),Tf(2,"img",18),xf()()),2&e){let e=Yf();Vd(2),zh("src",null==e.bundleConfig?null:e.bundleConfig.iconBackgroundImage,id),gh("alt",(null==e.bundleConfig?null:e.bundleConfig.iconImageAltText)||"")}}function Sve(e,t){if(1&e&&(kf(0,"div",7)(1,"picture"),Tf(2,"source",19)(3,"source",20)(4,"img",21),xf()()),2&e){let e=Yf();Vd(2),zh("srcset",e.bannerSrcMobile),Vd(),zh("srcset",e.bannerSrcTablet),Vd(),zh("src",e.bannerSrcDesktop,id),gh("alt",(null==e.bundleConfig?null:e.bundleConfig.bannerImageAltText)||"")}}function Cve(e,t){if(1&e){let e=Mf();kf(0,"bundle-card",22),jf("checkboxToggled",(function(t){Wa(e);let i=Yf();return Ha(i.facade.onCheckboxToggled(t.productId,t.checked,i.products))})),xf()}if(2&e){let e=t.$implicit;Yf();let i=vm(12);zh("product",e)("checked",null==i?null:i.has(e.id))}}function Ive(e,t){1&e&&(kf(0,"span",14),am(1," Est. Subtotal"),xf())}function Ave(e,t){1&e&&am(0," Sorry something went wrong. ")}function kve(e,t){1&e&&am(0," $0.00 ")}function xve(e,t){1&e&&(kf(0,"div",16)(1,"div",23),Tf(2,"div",24)(3,"div",25),xf()())}function Tve(e,t){if(1&e&&(am(0),qm(1,"currency")),2&e){let e;Yf(),cm(" ",jm(1,1,null!==(e=vm(20))&&void 0!==e?e:0,"USD")," ")}}var Pve=(()=>{class e{constructor(e,t,i,n,r,s){this.bundleBuilder=e,this.host=t,this.facade=i,this.toasterService=n,this.userInfoService=r,this.commonService=s,this.bannerSrcMobile="",this.bannerSrcTablet="",this.bannerSrcDesktop="",this.products=[],this.selectedIds$=this.facade.selectedIds$,this.selectedCount$=this.selectedIds$.pipe(bi((e=>e.size))),this.ctaButtonState$=this.facade.state$,this.subtotal$=this.facade.subtotal$,this.ctaButtonId=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`cta-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,this.ctaVm$=ki([this.selectedCount$,this.ctaButtonState$]).pipe(bi((([e,t])=>({disabled:"NoItemsSelected"===t||"Loading"===t||"SuccessfulAdd"===t,text:"Error"===t?"Try Again":0===e?"Select item(s)":`Add ${e} item${e>1?"s":""}`,isFilled:"ItemsSelected"===t||"NoItemsSelected"===t||"Loading"===t||"Error"===t,isTransparent:"SuccessfulAdd"===t}))))}ngOnInit(){let e=this.host.nativeElement.closest("targeted-wrapper");if(!e)return;let t=e.getAttribute("data-bundle-content");if(t){try{let e=JSON.parse(t),i=this.bundleBuilder.reset().withTitle(e.title).withSubtitle(e.subTitle);e.iconBackgroundImage&&i.withIconBackgroundImage(e.iconBackgroundImage),e.iconImageAltText&&i.withIconImageAltText(e.iconImageAltText),e.bundleSpotItems&&e.bundleSpotItems.length>0&&(this.products=(e.bundleSpotItems??[]).map((e=>e.productInfo?.[0])),this.facade.selectAll(this.products)),this.facade.setInitialComponentState(uve.Loading,this.products),e.headerImage&&i.withBanner(e.headerImage),e.headerImageAltText&&i.withBannerImageAltText(e.headerImageAltText),this.bundleConfig=i.build(),this.bundleConfig.banner&&(this.bannerSrcMobile=this.appendPreset(this.bundleConfig.banner,"bundle-brand-main-mobile"),this.bannerSrcTablet=this.appendPreset(this.bundleConfig.banner,"bundle-brand-main-tablet"),this.bannerSrcDesktop=this.appendPreset(this.bundleConfig.banner,"bundle-brand-main-desktop"))}catch(e){console.error("BundleComponent: unable to parse data-bundle-content",e)}this.facade.successfullyAddedItemToCart$.pipe(function(...e){let t=jt(e);return vt(((i,n)=>{let r=e.length,s=new Array(r),a=e.map((()=>!1)),o=!1;for(let t=0;t<r;t++)ai(e[t]).subscribe(wt(n,(e=>{s[t]=e,!o&&!a[t]&&(a[t]=!0,(o=a.every(ft))&&(a=null))}),et));i.subscribe(wt(n,(e=>{if(o){let i=[e,...s];n.next(t?t(...i):i)}})))}))}(this.selectedCount$),bi((([e,t])=>(console.warn("Toast should show:",e,t),{success:e,message:`${t} item${t>1?"s":""} added to your cart.`,type:ere.Success,interactiveElementLink:"/erums/cart",interactiveElement:"View cart",prevIdToFocus:this.ctaButtonId})))).subscribe((({message:e,type:t,interactiveElement:i,interactiveElementLink:n,prevIdToFocus:r})=>{this.toasterService.show({title:"OK",message:e,type:t,autoCloseTime:8e3,interactiveElement:i,interactiveElementLink:n,prevIdToFocus:r},{class:"popup--toaster--right"},(()=>{document.getElementById(this.ctaButtonId)?.focus()}),!0)}))}}ngAfterViewInit(){this.facade.sendInitialSubtotalCall(this.products)}onCtaClick(){if(!this.userInfoService.isAuthorized())return void window.AB?.COMMON?.showSignInModal_OTP?.(window.location.href);let e=this.userInfoService.getPreference()?.toLowerCase();if("j4u"===e||"instore"===e)return window.rightDrawerComp?.closeDrawer?.(),void window.storeFulfillmentModal?.component?.setModalDisplayData?.(2);this.commonService.validateSession((()=>{this.ctaButtonState$.pipe(Hi(1)).subscribe((e=>{"Error"!==e?this.facade.onAddToCart(this.products):this.facade.retryLastRequest()}))}))}trackByProductId(e,t){return t.id}appendPreset(e,t){return e?`${e}?${t}`:""}static{this.ɵfac=function(t){return new(t||e)($d(mve),$d(Vl),$d(fve),$d(xre),$d(_
1w),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["bundle-component"]],features:[xm([pve,fve])],decls:36,vars:26,consts:[[1,"bundle","d-flex","position-relative"],[1,"bundle__tappable-section","d-flex"],[1,"bundle__title-ctnr","d-flex"],[1,"bundle__logo-ctnr"],[1,"bundle__section-header","d-flex","flex-column"],[1,"bundle__title","heading-m"],[1,"bundle__subtitle","text-m--medium"],[1,"bundle__banner"],[1,"bundle__main","d-flex","w-100"],[1,"bundle__card-ctnr","d-flex"],[3,"product","checked"],[1,"bundle__footer","d-flex"],[1,"d-none","subtotal-debug"],[1,"bundle__subtotal","d-flex"],[1,"bundle__subtotal-text","text-l"],[1,"pds-accent-tag__regular","bundle__subtotal-price","text-l-b"],["role","status","aria-label","Loading Estimated Subtotal",1,"pds-loading-spinner"],["type","button",1,"pds-btn","pds-btn-filled--primary","bundle__cta","text-l--sb","d-flex","justify-content-center","align-items-center",3,"click","id","ngClass","disabled"],["loading","lazy","data-qa","prd-pctr",1,"bundle__logo","w-100","h-100",3,"src"],["media","(max-width: 767px)",3,"srcset"],["media","(min-width: 768px) and (max-width: 1023px)",3,"srcset"],["loading","lazy","data-qa","prd-pctr",1,"w-100","h-100","bundle__hero-img",3,"src"],[3,"checkboxToggled","product","checked"],[1,"pds-loading-spinner__progress","pds-loading-spinner__progress--xSmall"],[1,"pds-loading-spinner__track"],[1,"pds-loading-spinner__arc"]],template:function(e,t){if(1&e){let e=Mf();kf(0,"div",0)(1,"div",1)(2,"div",2),ph(3,_ve,3,2,"div",3),kf(4,"div",4)(5,"div",5),am(6),xf(),kf(7,"div",6),am(8),xf()(),ph(9,Sve,5,4,"div",7),xf()(),kf(10,"div",8)(11,"div",9),bm(12),qm(13,"async"),_f(14,Cve,1,2,"bundle-card",10,vve),xf(),bm(16),qm(17,"async"),bm(18),qm(19,"async"),bm(20),qm(21,"async"),bm(22),qm(23,"async"),kf(24,"div",11)(25,"div",12),am(26),xf(),kf(27,"div",13),ph(28,Ive,2,0,"span",14),kf(29,"div",15),ph(30,Ave,1,0)(31,kve,1,0)(32,xve,4,0,"div",16)(33,Tve,2,4),xf()(),kf(34,"button",17),jf("click",(function(){return Wa(e),Ha(t.onCtaClick())})),am(35),xf()()()()}if(2&e){Vd(3),yf(null!=t.bundleConfig&&t.bundleConfig.iconBackgroundImage?3:-1),Vd(3),cm(" ",null==t.bundleConfig?null:t.bundleConfig.title," "),Vd(2),cm(" ",null==t.bundleConfig?null:t.bundleConfig.subtitle," "),Vd(),yf(null!=t.bundleConfig&&t.bundleConfig.banner?9:-1),Vd(3),ym($m(13,11,t.selectedIds$)),Vd(2),Cf(t.products),$m(17,14,t.selectedCount$);let e=$m(19,16,t.ctaButtonState$);Vd(6);let i=ym($m(21,18,t.subtotal$)),n=$m(23,21,t.ctaVm$);Vd(6),cm(" ",i,""),Vd(2),yf("Error"!==e?28:-1),Vd(2),yf("Error"===e?30:"NoItemsSelected"===e?31:"Loading"===e?32:33),Vd(4),zh("id",t.ctaButtonId)("ngClass",Bm(23,wve,null==n?null:n.isFilled,null==n?null:n.isTransparent))("disabled",null==n?null:n.disabled),Vd(),cm(" ",null==n?null:n.text," ")}},dependencies:[sy,yve,_y,By],encapsulation:2})}}return e})(),Eve=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),Dve=["nextRedesignButton"],Ove=["prevRedesignButton"],Bve=e=>({"carousel-header-text--discovery":e}),Mve=e=>({"d-none":e}),Rve=e=>({"svg-btn-slick-prev--disabled":e}),Lve=e=>({"svg-btn-slick-next--disabled":e});function Fve(e,t){if(1&e&&(Ef(0),kf(1,"span",17),am(2),xf(),Df()),2&e){let e=Yf(3);Vd(2),lm(null==e.carouselData||null==e.carouselData.appCtaProps?null:e.carouselData.appCtaProps.ctaText)}}function Nve(e,t){if(1&e&&(kf(0,"span",18),am(1),xf()),2&e){let e=Yf(3);zh("ngClass",null!=e.configObj&&e.configObj.applyDiscoveryStyles?"link-sm links__action ml-2":"carousel-header-link-text"),Vd(),lm(null==e.carouselData||null==e.carouselData.webCtaProps?null:e.carouselData.webCtaProps.ctaText)}}function Uve(e,t){if(1&e){let e=Mf();kf(0,"div",11)(1,"div",12)(2,"h2",13),am(3),xf()(),kf(4,"div",14)(5,"a",15),jf("click",(function(t){return Wa(e),Ha(Yf(2).onClickOfViewAll(t))}))("keyup.enter",(function(){return Wa(e),Ha(Yf(2).onClickOfViewAll())})),ph(6,Fve,3,1,"ng-container",16)(7,Nve,2,2,"ng-template",null,0,Wm),xf()()()}if(2&e){let e=sm(8),t=Yf(2);Vd(2),zh("ngClass",Om(6,Bve,null==t.configObj?null:t.configObj.applyDiscoveryStyles)),Vd(),cm(" ",null==t.carouselData?null:t.carouselData.title," "),Vd(2),gh("href",(null==t.carouselData||null==t.carouselData.webCtaProps?null:t.carouselData.webCtaProps.ctaLink)||null,id)("aria-label",t.ctaAriaLabel),V
1d(),zh("ngIf",(null==t.carouselData||null==t.carouselData.appCtaProps?null:t.carouselData.appCtaProps.ctaText)&&""!==(null==t.carouselData||null==t.carouselData.appCtaProps?null:t.carouselData.appCtaProps.ctaText))("ngIfElse",e)}}function Vve(e,t){if(1&e&&(kf(0,"div"),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",null==e.carouselData?null:e.carouselData.subTitle," ")}}function qve(e,t){if(1&e){let e=Mf();kf(0,"div",19)(1,"div",20)(2,"span",21),am(3),xf(),kf(4,"span",22),am(5),xf()(),kf(6,"div",23)(7,"a",24),jf("click",(function(){return Wa(e),Ha(Yf(2).onClickOfViewAll())})),am(8),xf(),kf(9,"button",25,1),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Previous set of items shown"))}))("click",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Previous set of items shown"))})),Tf(11,"span",26),xf(),kf(12,"button",27,2),jf("keyup.enter",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Next set of items shown"))}))("click",(function(){return Wa(e),Ha(Yf(2).setAdaAnnouncement("Next set of items shown"))})),Tf(14,"span",28),xf()()()}if(2&e){let e=Yf(2);Vd(3),lm(null==e.carouselData?null:e.carouselData.title),Vd(2),lm(null==e.carouselData?null:e.carouselData.subTitle),Vd(2),gh("aria-label",e.ctaAriaLabel),Vd(),cm(" ",null!=e.carouselData&&null!=e.carouselData.appCtaProps&&e.carouselData.appCtaProps.ctaText&&""!==(null==e.carouselData||null==e.carouselData.appCtaProps?null:e.carouselData.appCtaProps.ctaText)?null==e.carouselData||null==e.carouselData.appCtaProps?null:e.carouselData.appCtaProps.ctaText:null==e.carouselData||null==e.carouselData.webCtaProps?null:e.carouselData.webCtaProps.ctaText," "),Vd(),zh("ngClass",Om(10,Mve,!e.showRedesignButtons))("disabled",e.isPrevButtonDisabled),Vd(2),zh("ngClass",Om(12,Rve,e.isPrevButtonDisabled)),Vd(),zh("ngClass",Om(14,Mve,!e.showRedesignButtons))("disabled",e.isNextButtonDisabled),Vd(2),zh("ngClass",Om(16,Lve,e.isNextButtonDisabled))}}function $ve(e,t){if(1&e){let e=Mf();kf(0,"loyalty-card-al-v1",30),jf("refreshTitleEvent",(function(t){return Wa(e),Ha(Yf(3).refreshTitle(t))}))("refreshSlickCarousel",(function(t){return Wa(e),Ha(Yf(3).refreshSlickCarousel(t))}))("openRightFlyoutEvent",(function(t){return Wa(e),Ha(Yf(3).openRightFlyoutEvent(t))})),xf()}if(2&e){let e=Yf(),t=e.$implicit,i=e.index,n=Yf(2);zh("cardType","coupon")("couponDisplayFormat","carousel")("cardData",t)("cardIndex",i)("carouselSection",null==n.carouselData?null:n.carouselData.title)("couponsCarouselItem",n.carouselData)("crsMType","deals-carousel")("logoProps",n.logoProps)("isP13nCoupon",n.isP13nCoupon)("configObj",n.configObj)("isLoyaltyCardCarouselRedesignDisabled",n.isLoyaltyCardCarouselRedesignDisabled)}}function jve(e,t){if(1&e&&(Ef(0),ph(1,$ve,1,11,"loyalty-card-al-v1",29),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",e.offerId||e.couponID)}}function zve(e,t){if(1&e&&(kf(0,"span",31),am(1),xf()),2&e){let e=Yf(2);Vd(),cm(" ",e.adaAnnouncement," ")}}function Wve(e,t){if(1&e&&(kf(0,"div",4),ph(1,Uve,9,8,"div",5)(2,Vve,2,1,"div",6)(3,qve,15,18,"div",7),kf(4,"div",8),ph(5,jve,2,1,"ng-container",9),xf(),ph(6,zve,2,1,"span",10),xf()),2&e){let e=Yf();Vd(),zh("ngIf",e.isLoyaltyCardCarouselRedesignDisabled),Vd(),zh("ngIf",e.isLoyaltyCardCarouselRedesignDisabled),Vd(),zh("ngIf",!e.isLoyaltyCardCarouselRedesignDisabled),Vd(2),zh("ngForOf",e.coupons)("ngForTrackBy",e.trackFn),Vd(),zh("ngIf",e.isAdaAnnouncementEnabled)}}var Hve=(()=>{class e{constructor(e,t,i,n){this.elementRef=e,this._aemService=t,this._carouselService=i,this._commonService=n,this.logoProps={},this.coupons=[],this.carouselBehaviour="",this.configObj={appName:"",programType:"",applyDiscoveryStyles:!1},this.openFlyOutEvent=new _l,this.viewAllClickEvent=new _l,this._childComponentsReady=new Tt(!1),this.disableSlickUnifiedBtnUI=!1,this.isP13nCoupon=!1,this.isLoyaltyCardCarouselRedesignDisabled=!0,this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1,this.showRedesignButtons=!0,this.isNextButtonDisabled=!1,this.isPrevButtonDisabled=!1}ngOnInit(){this.isLoyaltyCardCarouselRedesignDisabled=this._aemService.getFeatureFlagByNameDisable("isLoyaltyCardCarouselRedesignDisabled"),this.wrapper=this.elementRef.nativeElement.parentNode?.parentNode}ngOnChanges(){this.coupons=this.carouselData?.dealsInfo,this.coupons&&this.coupons.length>0&&this._childComponentsReady.next(!0)}ngAfterViewInit(){this._childComponentsReady.subscribe((e=>{!0===e&&0!==this.coupons.length&&(this.couponCardChildComponents.length>0?this.initSlick():this.couponCardChildComponents.changes.subscribe((()=>{this.initSlick()}
1)),window.AB.DATALAYER&&(window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"load"),window.AB.DATALAYER.initSlickArrowTracking(this.wrapper)))}))}initSlick(){let e=this.elementRef.nativeElement,t=1,i=2,n=1,r=2,s=3,a={320:1,660:2,767:2,970:3,1260:4},o=2,l=1,c=2;("FreshPass"===this.configObj?.appName||"weeklyAdDiscoveryPzn"===this.configObj?.appName||"dynamic-grid-with-facets"===this.carouselBehaviour)&&(a[1260]=3);let d,u=[{breakpoint:320,settings:{slidesToShow:t,slidesToScroll:t,dots:!1,arrows:!0}},{breakpoint:695,settings:{slidesToShow:i,slidesToScroll:i,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:n,slidesToScroll:n,dots:!1,arrows:!0}},{breakpoint:920,settings:{slidesToShow:r,slidesToScroll:r,dots:!1,arrows:!0}},{breakpoint:1280,settings:{slidesToShow:s,slidesToScroll:s,dots:!1,arrows:!0}}],p=[{breakpoint:320,settings:{slidesToShow:a[320],slidesToScroll:a[320],dots:!1,arrows:!0}},{breakpoint:660,settings:{slidesToShow:a[660],slidesToScroll:a[660],dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:a[767],slidesToScroll:a[767],dots:!1,arrows:!0}},{breakpoint:970,settings:{slidesToShow:a[970],slidesToScroll:a[970],dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:a[1260],slidesToScroll:a[1260],dots:!1,arrows:!0}}],m=[{breakpoint:660,settings:{slidesToShow:o,slidesToScroll:o,dots:!1,arrows:!0}},{breakpoint:767,settings:{slidesToShow:l,slidesToScroll:l,dots:!1,arrows:!0}},{breakpoint:1260,settings:{slidesToShow:c,slidesToScroll:c,dots:!1,arrows:!0}},{breakpoint:1920,settings:{slidesToShow:c,slidesToScroll:c,dots:!1,arrows:!0}}],g=$("meta[name=template]")?$("meta[name=template]").attr("content"):"";$(e).find("#carousel-coupons").hasClass("slick-initialized")&&($(e).find("#carousel-coupons").slick("unslick"),$(e).find("#carousel-coupons").removeClass("slick-initialized")),$(e).find("#carousel-coupons").not(".slick-initialized").on("init",((e,t)=>{this.isLoyaltyCardCarouselRedesignDisabled||(this.handleShowingRedesignNavButtons(),this._carouselService.slickChanges.next({}))})).slick(f(h(h({lazyLoad:"ondemand",tail:!0,dots:!1,infinite:!1,cssEase:"linear",speed:300,centerMode:!1,variableWidth:!0,variableHeight:!0,mobileFirst:!0,accessibility:!0,swipe:!0,swipeToSlide:!1},!1===this.disableSlickUnifiedBtnUI&&{nextArrow:this.isLoyaltyCardCarouselRedesignDisabled?'<button type="button" aria-label="Go to the next slide" class="slick-next coupons-carousel-module__next-btn"></button>':this.nextRedesignButtonRef.nativeElement}),!1===this.disableSlickUnifiedBtnUI&&{prevArrow:this.isLoyaltyCardCarouselRedesignDisabled?'<button type="button" aria-label="Go to the previous slide" class="slick-prev coupons-carousel-module__prev-btn"></button>':this.prevRedesignButtonRef.nativeElement}),{responsive:"unified-dynamic-l2-page"===g?u:["unified-productdetails-page","nextgen-pdp","product-detail-page"].indexOf(g)>-1?m:p})).on("beforeChange",(function(t,i,n,r){if(0!==r?$("#carousel-coupons .slick-prev").removeClass("mask"):$("#carousel-coupons .slick-prev").addClass("mask"),this.isCarouselRedesignDisabled)if(n<r){let t=Number($(".slick-active",$(e)).last().attr("data-slick-index"))+1,i=$('.slick-list .slick-slide[data-slick-index="'+t+'"] .coupon-carousel-title',$(e));i&&setTimeout((function(){i.eq(0).html(i.eq(0).html()).focus()}),300),d="next"}else{let t=Number($(".slick-active",$(e)).first().attr("data-slick-index"))-1,i=$('.slick-list .slick-slide[data-slick-index="'+t+'"] .coupon-carousel-title',$(e));i&&setTimeout((function(){i.eq(0).html(i.eq(0).html()).focus()}),300),d="prev"}else d=n<r?"next":"prev"})).on("afterChange",(()=>{this.isLoyaltyCardCarouselRedesignDisabled||(this.handleShowingRedesignNavButtons(),this._carouselService.slickChanges.next({})),setTimeout((()=>{switch(d){case"next":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"forward");break;case"prev":window.AB.DATALAYER&&window.AB.DATALAYER.trackP13nCarousel(this.wrapper,this.coupons,"back")}}),0)})),$("#carousel-coupons .slick-prev").addClass("mask")}setAdaAnnouncement(e){clearTimeout(this.announcementTimeout),this.isAdaAnnouncementEnabled=!0,setTimeout((()=>{this.adaAnnouncement=e}),100),this.announcementTimeout=setTimeout((()=>{this.adaAnnouncement="",this.isAdaAnnouncementEnabled=!1}),500)}handleShowingRedesignNavButtons(){this.showRedesignButtons=window.innerWidth>=768,this.isNextButtonDisabled=this.nextRedesignButtonRef.nativeElement.classList.contains("slick-disabled"),this.isPrevButtonDisabled=this.prevRedesignButtonRef.nativeElement.classList.contains("slick-disabled")}refreshSlickCarousel(e){}trackFn(e,t){return e}refreshTitle(e){}
1openRightFlyoutEvent(e){this.openFlyOutEvent.emit(e)}onClickOfViewAll(e){return v(this,null,(function*(){if(e&&e.preventDefault(),"weeklyAdPzn"===this.configObj.appName)this.viewAllClickEvent.emit();else if(("deals-carousel-targetted"==this.carouselData?.appName||"dealsCarousel"==this.carouselData?.designType)&&this.carouselData?.webCtaProps?.ctaLink){if("deals-carousel-targetted"==this.carouselData?.appName){let e=yield this._commonService.updateViewAllExperimentRoute();this.carouselData.webCtaProps.ctaLink=e||this.carouselData.webCtaProps.ctaLink}window.AB?.DATALAYER?.analyticsCTATracking("cta:"+window.AB?.DATALAYER?.initPathSections(!0).join(":")+"|link|"+this.carouselData?.webCtaProps?.ctaLink),"true"==this.carouselData?.webCtaProps?.openNewTab?window.open(this.carouselData?.webCtaProps?.ctaLink,"_blank"):window.location.href=this.carouselData?.webCtaProps?.ctaLink}}))}get ctaAriaLabel(){let e=this.carouselData?.appCtaProps?.ctaText,t=this.carouselData?.webCtaProps?.ctaText,i=(e||t||"").trim()||"View all",n=(this.carouselData?.title||"").trim();return n?`${i} ${n}`:`${i} coupons and deals`}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Cw),$d(Gw),$d(Bw))}}static{this.ɵcmp=Qr({type:e,selectors:[["deals-carousel"]],viewQuery:function(e,t){if(1&e&&(tm(Dve,5,Vl),tm(Ove,5,Vl),tm(a2,5)),2&e){let e;im(e=nm())&&(t.nextRedesignButtonRef=e.first),im(e=nm())&&(t.prevRedesignButtonRef=e.first),im(e=nm())&&(t.couponCardChildComponents=e)}},inputs:{carouselData:"carouselData",logoProps:"logoProps",carouselBehaviour:"carouselBehaviour",configObj:"configObj"},outputs:{openFlyOutEvent:"openFlyOutEvent",viewAllClickEvent:"viewAllClickEvent"},features:[ga],decls:1,vars:1,consts:[["webCta",""],["prevRedesignButton",""],["nextRedesignButton",""],["class","slick-coupon-carousel carousel-container coupons-carousel slick-coupon-carousel-v2",4,"ngIf"],[1,"slick-coupon-carousel","carousel-container","coupons-carousel","slick-coupon-carousel-v2"],["class","carousel-header-wrapper",4,"ngIf"],[4,"ngIf"],["class","carousel-nav d-flex align-items-start py-2",4,"ngIf"],["id","carousel-coupons",1,"coupons"],[4,"ngFor","ngForOf","ngForTrackBy"],["role","status","aria-atomic","true","aria-live","assertive","class","sr-only",4,"ngIf"],[1,"carousel-header-wrapper"],[1,"carousel-header-text-wrapper"],[1,"carousel-header-text","m0",3,"ngClass"],[1,"carousel-headers-link-wrapper"],[1,"carousel-header-link",3,"click","keyup.enter"],[4,"ngIf","ngIfElse"],["aria-hidden","true",1,"carousel-header-link-text"],["aria-hidden","true",3,"ngClass"],[1,"carousel-nav","d-flex","align-items-start","py-2"],[1,"d-flex","flex-column","justify-content-center","align-self-stretch","flex-grow-1"],["role","heading",1,"carousel-nav__header-title","color-neutral-90"],[1,"body-text-xs"],[1,"d-flex","carousel-nav__controls-wrapper","align-items-center"],[1,"link-sm","links__action",3,"click"],["type","button","aria-label","View previous items",1,"btn","slick-redesign-prev","btn-secondary","btn-circle--md","ml-3","mr-3",3,"keyup.enter","click","ngClass","disabled"],[1,"svg-icon","svg-btn-slick-prev",3,"ngClass"],["type","button","aria-label","View next items",1,"btn","slick-redesign-next","btn-secondary","btn-circle--md",3,"keyup.enter","click","ngClass","disabled"],[1,"svg-icon","svg-btn-slick-next",3,"ngClass"],["class","carousel-coupon-card",3,"cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","crsMType","logoProps","isP13nCoupon","configObj","isLoyaltyCardCarouselRedesignDisabled","refreshTitleEvent","refreshSlickCarousel","openRightFlyoutEvent",4,"ngIf"],[1,"carousel-coupon-card",3,"refreshTitleEvent","refreshSlickCarousel","openRightFlyoutEvent","cardType","couponDisplayFormat","cardData","cardIndex","filterSource","carouselSection","couponsCarouselItem","crsMType","logoProps","isP13nCoupon","configObj","isLoyaltyCardCarouselRedesignDisabled"],["role","status","aria-atomic","true","aria-live","assertive",1,"sr-only"]],template:function(e,t){1&e&&ph(0,Wve,7,6,"div",3),2&e&&zh("ngIf",(null==t.coupons?null:t.coupons.length)>0)},dependencies:[sy,oy,cy,a2],styles:[".carousel-header-text--discovery[_ngcontent-%COMP%]{font-family:Poppins,sans-serif;font-weight:500;font-style:normal;font-size:28px!important;line-height:130%;letter-spacing:0%;vertical-align:middle}"]})}}return e})(),Yve=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,o2]})}}return e})(),Gve=(()=>{class e{constructor(e,t,i,n,r){this.j4uv1Service=e,this.elementRef=t,this.featureFlagService=i,this.environmentInjector=n,this.appRef=r,this.targetedComponent="deals-carousel",this.carouselData={},this.carouselDataArr={},this.logoProps={},this.carouselBehaviour=null,this.marketingTile=null,this.displayRightDrawerEvent=ne
1w _l(!1),this.marketingCardObserver=null,this.marketingCardSlideObserver=null,this.marketingCardInjected=!1,this.marketingCardRef=null}ngOnInit(){this.wrapper=this.elementRef.nativeElement.parentNode.parentNode;let e=this.featureFlagService.enableMarketingCardInDealsCarousel();this.j4uv1Service.getLogoList().subscribe((t=>{if(this.logoProps=t,this.wrapper){this.wrapper=this.wrapper;let t=this.wrapper.getAttribute("data-deals-carousel-content");if(t)try{this.carouselData=JSON.parse(t),this.carouselData.appName="deals-carousel-targetted",this.marketingTile=e?Sz(this.wrapper)||function(e,t){return function(e){return"true"===e}(t)?_z(e??null):null}(this.carouselData?.marketingTile,this.carouselData?.includeMarketingTile):null}catch(e){console.error("Error parsing JSON data:",e),this.carouselData=[]}else console.warn("Attribute data-deals-carousel-content not found."),this.carouselData=[]}else console.warn("Parent nodes not found.");this.carouselBehaviour=this.wrapper.getAttribute("data-carousel-behaviour"),this.tryInjectMarketingCard()}))}ngAfterViewInit(){this.marketingCardObserver=new MutationObserver((()=>this.tryInjectMarketingCard())),this.marketingCardObserver.observe(this.elementRef.nativeElement,{childList:!0,subtree:!0})}ngOnDestroy(){this.marketingCardObserver?.disconnect(),this.marketingCardSlideObserver?.disconnect(),this.destroyMarketingCard()}openRightFlyout(e){this.displayRightDrawerEvent.emit(!0)}tryInjectMarketingCard(){if(this.marketingCardInjected||!Cz(this.marketingTile))return;let e=this.elementRef.nativeElement.querySelector("#carousel-coupons");if(!e||!$(e).hasClass("slick-initialized"))return;let t=this.createMarketingCardElement(this.marketingTile);$(e).slick("slickAdd",t,0,!0),Dz(e),this.marketingCardSlideObserver?.disconnect(),this.marketingCardSlideObserver=Bz(e),this.marketingCardInjected=!0,this.marketingCardObserver?.disconnect()}createMarketingCardElement(e){let t=function(e,t){let i=ns(e),n=t.elementInjector||Ss();return new mp(i).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}(Hz,{environmentInjector:this.environmentInjector});t.setInput("marketingTile",e),this.appRef.attachView(t.hostView),t.changeDetectorRef.detectChanges();let i=t.location.nativeElement;return i.classList.add("carousel-coupon-card","carousel-coupon-card--marketing"),this.marketingCardRef=t,i}destroyMarketingCard(){this.marketingCardRef&&(this.appRef.detachView(this.marketingCardRef.hostView),this.marketingCardRef.destroy(),this.marketingCardRef=null)}static{this.ɵfac=function(t){return new(t||e)($d(Yw),$d(Vl),$d(uP),$d(Cs),$d(sg))}}static{this.ɵcmp=Qr({type:e,selectors:[["deals-carousel-wrapper"]],outputs:{displayRightDrawerEvent:"displayRightDrawerEvent"},decls:1,vars:3,consts:[[3,"openRightFlyout","carouselData","logoProps","carouselBehaviour"]],template:function(e,t){1&e&&(kf(0,"deals-carousel",0),jf("openRightFlyout",(function(e){return t.openRightFlyout(e)})),xf()),2&e&&zh("carouselData",t.carouselData)("logoProps",t.logoProps)("carouselBehaviour",t.carouselBehaviour)},dependencies:[Hve],encapsulation:2})}}return e})();function Kve(e,t){1&e&&(kf(0,"div"),Tf(1,"product-carousel-wrapper"),xf())}function Qve(e,t){1&e&&(kf(0,"div"),Tf(1,"meals-carousel-wrapper"),xf())}function Jve(e,t){1&e&&(kf(0,"div"),Tf(1,"deals-carousel-wrapper"),xf())}function Zve(e,t){1&e&&(kf(0,"div"),Tf(1,"instant-grocery-basket"),xf())}function Xve(e,t){1&e&&(kf(0,"div"),Tf(1,"me-dashboard-profile-wrapper"),xf())}function ewe(e,t){1&e&&(kf(0,"div"),Tf(1,"bundle-component"),xf())}var twe=(()=>{class e{constructor(e){this.elementRef=e,this.targetedComponent="",this.carouselTitle="",this.wrapper=this.elementRef.nativeElement,this.targetedComponent=this.wrapper.getAttribute("data-targeted-component"),this.carouselTitle=this.wrapper.getAttribute("data-carousel-title")}ngOnInit(){}static{this.ɵfac=function(t){return new(t||e)($d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["targeted-wrapper"]],decls:7,vars:7,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"]],template:function(e,t){1&e&&(Ef(0,0),ph(1,Kve,2,0,"div",1)(2,Qve,2,0,"div",1)(3,Jve,2,0,"div",1)(4,Zve,2,0,"div",1)(5,Xve,2,0,"div",1)(6,ewe,2,0,"div",1),Df()),2&e&&(zh("ngSwitch",t.targetedComponent),Vd(),zh("ngSwitchCase","product-carou
1sel"),Vd(),zh("ngSwitchCase","meal-carousel"),Vd(),zh("ngSwitchCase","deals-carousel"),Vd(),zh("ngSwitchCase","instant-grocery-basket"),Vd(),zh("ngSwitchCase","me-dashboard-profile"),Vd(),zh("ngSwitchCase","bundle"))},dependencies:[hy,fy,dz,Pve,Pye,Dhe,Xye,Gve],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),iwe=e=>({"pl-4 pr-4":e}),nwe=e=>({"offer-terms-condition":!0,collapsed:e}),rwe=e=>({collapse:!0,show:e}),swe=e=>({"in-store-price-visible":e}),awe=e=>({btn:!0,"btn-default":!0,"loading-offer-detail":e});function owe(e,t){1&e&&(kf(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),Tf(4,"div",6),xf()()()())}function lwe(e,t){if(1&e){let e=Mf();kf(0,"div",11),jf("keydown.enter",(function(){return Wa(e),Ha(Yf(2).backtoComponent())}))("click",(function(){return Wa(e),Ha(Yf(2).backtoComponent())})),Tf(1,"span",12),kf(2,"span",13),am(3,"back"),xf()()}}function cwe(e,t){if(1&e){let e=Mf();kf(0,"div",14),jf("keydown.enter",(function(){return Wa(e),Ha(Yf(2).backtoComponent())}))("click",(function(){return Wa(e),Ha(Yf(2).backtoComponent())})),kf(1,"span",15),am(2,"Ã"),xf()()}}function dwe(e,t){if(1&e&&(Ef(0),kf(1,"div",17)(2,"div"),Tf(3,"img",18),xf(),kf(4,"div",19)(5,"div",20),am(6),xf(),kf(7,"div",21),am(8),xf()()(),Df()),2&e){let e=Yf(4);Vd(3),Jf("src",e.offer.imageUrl,id),Jf("alt",e.offer.name),Vd(3),um("",e.offer.prePriceText," ",e.offer.priceText," ",e.offer.postPriceText,""),Vd(2),lm(e.offer.name)}}function uwe(e,t){if(1&e&&(kf(0,"div",24)(1,"div",25)(2,"div",26),So(),kf(3,"svg",27),Tf(4,"path",28),xf()(),Co(),kf(5,"p",29),am(6,"clipped"),xf()(),kf(7,"div",30)(8,"p",31),am(9),xf(),kf(10,"p",32),am(11),kf(12,"span",33),am(13,"Exp."),xf(),kf(14,"span",34),am(15),qm(16,"date"),xf(),kf(17,"span",33),am(18),qm(19,"date"),xf()()()()),2&e){let e=Yf(5);Vd(9),lm(e.offer.ecomDescription),Vd(2),cm("",e.offerText," | "),Vd(4),cm("Expiration ",jm(16,4,e.offer.endDate,"MMMM dd"),""),Vd(3),lm(jm(19,7,e.offer.endDate,"M/d"))}}function pwe(e,t){if(1&e&&(kf(0,"div",35)(1,"div",36),So(),kf(2,"svg",37)(3,"g",38)(4,"g",39),Tf(5,"polygon",40),xf()()()(),Co(),kf(6,"div",30)(7,"p",31),am(8),xf(),Tf(9,"img",41),kf(10,"span",42),am(11,"Offer Complete!"),xf()()()),2&e){let e=Yf(5);Vd(8),lm(e.offer.ecomDescription)}}function hwe(e,t){if(1&e&&(Ef(0),ph(1,uwe,20,10,"div",22)(2,pwe,12,1,"div",23),Df()),2&e){let e=Yf(4);Vd(),zh("ngIf",!1===e.offer.offerComplete),Vd(),zh("ngIf",!0===e.offer.offerComplete)}}function fwe(e,t){if(1&e&&(Ef(0),kf(1,"div",16),ph(2,dwe,9,6,"ng-container",1)(3,hwe,3,2,"ng-container",1),xf(),Df()),2&e){let e=Yf(3);Vd(2),zh("ngIf",e.offer.itemType&&"product"===e.offer.itemType),Vd(),zh("ngIf",!e.offer.itemType)}}function mwe(e,t){if(1&e){let e=Mf();kf(0,"div",44)(1,"button",45),jf("click",(function(){return Wa(e),Ha(Yf(4).clipCoupon())})),xf(),kf(2,"div",30)(3,"p",31),am(4),xf(),kf(5,"p",46),am(6),kf(7,"span",33),am(8,"Exp."),xf(),kf(9,"span",47),am(10,"Expiration"),xf(),kf(11,"span"),qm(12,"date"),am(13),qm(14,"date"),xf()()()()}if(2&e){let e=Yf(4);Vd(),gh("aria-label","Clip coupon for "+e.offer.ecomDescription)("aria-describedby","offer-exp"+e.offer.offerId),Vd(3),lm(e.offer.ecomDescription),Vd(),Jf("id","offer-exp"+e.offer.offerId),Vd(),cm("",e.offerText," - "),Vd(5),gh("aria-label",jm(12,7,e.offer.endDate,"MMMM dd")),Vd(2),lm(jm(14,10,e.offer.endDate,"M/d"))}}function gwe(e,t){if(1&e&&(kf(0,"div",24)(1,"div",25)(2,"div",26),So(),kf(3,"svg",27),Tf(4,"path",28),xf()(),Co(),kf(5,"p",29),am(6,"clipped"),xf()(),kf(7,"div",30)(8,"p",31),am(9),xf(),kf(10,"p",32),am(11),kf(12,"span",48),am(13,"Exp."),xf(),kf(14,"span",34),am(15),qm(16,"date"),xf(),kf(17,"span",33),am(18),qm(19,"date"),xf()()()()),2&e){let e=Yf(4);Vd(9),lm(e.offer.ecomDescription),Vd(2),cm("",e.offerText," | "),Vd(4),cm("Expiration ",jm(16,4,e.offer.endDate,"MMMM dd"),""),Vd(3),lm(jm(19,7,e.offer.endDate,"M/d"))}}function bwe(e,t){if(1&e&&(kf(0,"div",35)(1,"div",36),So(),kf(2,"svg",37)(3,"g",38)(4,"g",39),Tf(5,"polygon",40),xf()()()(),Co(),kf(6,"div",30)(7,"p",31),am(8),xf(),Tf(9,"img",41),kf(10,"span",42),am(11,"Offer Complete!"),xf()()()),2&e){let e=Yf(4);Vd(8),lm(e.offer.ecomDescription)}}function ywe(e,t){if(1&e&&(Ef(0),kf(1,"div",16),ph(2,mwe,15,13,"div",43)(3,gwe,20,10,"div",22)(4,bwe,12,1,"div",23),xf(),Df()),2&e){let e=Yf(3);Vd(2),zh("ngIf","U"===e.offer.status||!0===e.offer.deleted),Vd(),zh("ngIf","C"===e.offer.status&&!1===e.offer.deleted&&!e.offer.offerComplete),Vd(),zh("ngIf","C"===e.offer.status&&!1===e.offer.deleted&&e.offer.offerComplete)}}function vwe(e,t){if(1&e&&(Ef(0),ph(1,fwe,4,2,"ng-container",1)(2,ywe,5,3,"ng-container",1),Df()),2&e){let e=Yf(2);
1Vd(),zh("ngIf",!e.offer.isClippable),Vd(),zh("ngIf",e.offer.isClippable)}}function wwe(e,t){if(1&e&&(Ef(0),kf(1,"div",25)(2,"div",26),So(),kf(3,"svg",27),Tf(4,"path",28),xf()()(),Co(),kf(5,"div",50)(6,"p",51),am(7),xf(),kf(8,"p",52),am(9),kf(10,"span",33),am(11,"Exp."),xf(),kf(12,"span",53),am(13,"Expiration"),xf(),am(14),qm(15,"date"),xf()(),Df()),2&e){let e=Yf(3);Vd(7),lm(e.bogoText),Vd(2),cm("",e.bogoTextDetail," | "),Vd(5),cm(" ",jm(15,3,e.product.promoEndDate,"M/d"),"")}}function _we(e,t){if(1&e&&(Ef(0),kf(1,"div",36),So(),kf(2,"svg",37)(3,"g",38)(4,"g",39),Tf(5,"polygon",40),xf()()()(),Co(),kf(6,"div",50)(7,"p",51),am(8),xf(),Tf(9,"img",54),kf(10,"span",55),am(11,"Offer Complete!"),xf()(),Df()),2&e){let e=Yf(3);Vd(8),lm(e.bogoText)}}function Swe(e,t){if(1&e&&(Ef(0),kf(1,"div",49),ph(2,wwe,16,6,"ng-container",1)(3,_we,12,1,"ng-container",1),xf(),Df()),2&e){let e=Yf(2);Vd(2),zh("ngIf",!1===e.product.offerComplete),Vd(),zh("ngIf",!0===e.product.offerComplete)}}function Cwe(e,t){if(1&e){let e=Mf();kf(0,"div",56)(1,"div",57)(2,"a",58),jf("click",(function(){return Wa(e),Ha(Yf(2).toggleAccordion())})),kf(3,"span",59),am(4,"Offer Terms and Conditions"),xf(),Tf(5,"span",60),xf()(),kf(6,"div",61)(7,"div",62)(8,"div",63),am(9),xf(),kf(10,"div",64)(11,"span",65),am(12,"Disclaimer: "),xf()()()()()}if(2&e){let e=Yf(2);Vd(2),zh("ngClass",Om(4,nwe,!1===e.showAccordion)),gh("aria-expanded",e.showAccordion),Vd(4),zh("ngClass",Om(6,rwe,!0===e.showAccordion)),Vd(3),lm(e.detail)}}function Iwe(e,t){if(1&e&&(Ef(0),kf(1,"div",7),ph(2,lwe,4,0,"div",8)(3,cwe,3,0,"div",9)(4,vwe,3,2,"ng-container",1)(5,Swe,4,2,"ng-container",1)(6,Cwe,13,8,"div",10),xf(),Df()),2&e){let e=Yf();Vd(),zh("ngClass",Om(6,iwe,e.isBXGYEligibleOffer)),Vd(),zh("ngIf",!("coupon-list"!==e.TriggerElement&&"mini-cart"!==e.TriggerElement||""!==(null==e.configObj?null:e.configObj.appName)&&"cart"===(null==e.configObj?null:e.configObj.appName))),Vd(),zh("ngIf","cart"===(null==e.configObj?null:e.configObj.appName)),Vd(),zh("ngIf",e.offer),Vd(),zh("ngIf",void 0===e.offer&&e.product&&("M"===e.product.promoType||"B"===e.product.promoType)),Vd(),zh("ngIf",e.offer&&e.offer.isClippable)}}function Awe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"button",93),jf("click",(function(){return Wa(e),Ha(Yf(3).clipCoupon())})),am(2),kf(3,"span",34),am(4),xf()(),Df()}if(2&e){let e=Yf(3);Vd(),Zf("id","offerDetailButton",e.offerDataForOfferDetailsPage.offerId,""),zh("ngClass",Om(6,awe,e.showLoadingCoupon))("disabled",e.showLoadingCoupon),Vd(),cm(" ",e.offerDataForOfferDetailsPage.deleted?"Add to My List":e.clipCouponLabel," "),Vd(2),lm(e.couponType[e.offerDataForOfferDetailsPage.offerPgm]+" "+e.offerDataForOfferDetailsPage.savings+" "+e.offerDataForOfferDetailsPage.title)}}function kwe(e,t){if(1&e&&(Ef(0),kf(1,"div",94),So(),kf(2,"svg",95)(3,"g",38)(4,"g",39),Tf(5,"polygon",96),xf()()(),Co(),kf(6,"span",97),am(7),xf(),kf(8,"span",34),am(9,"You clipped this coupon"),xf()(),Df()),2&e){let e=Yf(3);Vd(),gh("alt",e.offerDataForOfferDetailsPage.savings),Vd(6),lm(e.clippedLabel)}}function xwe(e,t){if(1&e&&(kf(0,"div",92),ph(1,Awe,5,8,"ng-container",1)(2,kwe,10,2,"ng-container",1),xf()),2&e){let e=Yf(2);Vd(),zh("ngIf","U"===e.offerDataForOfferDetailsPage.status),Vd(),zh("ngIf","C"===e.offerDataForOfferDetailsPage.status)}}function Twe(e,t){if(1&e&&(kf(0,"div",98)(1,"span",99),am(2,"Offer detail:Â "),xf(),Tf(3,"span",100),xf()),2&e){let e=Yf(2);Vd(3),zh("innerHTML",e.offerDataForOfferDetailsPage.detail,ed)}}function Pwe(e,t){if(1&e&&(kf(0,"div",101)(1,"span",99),am(2,"Disclaimer"),xf(
1),am(3),xf()),2&e){let e=Yf(2);Vd(3),cm(": ",e.offerDataForOfferDetailsPage.disclaimer," ")}}function Ewe(e,t){if(1&e&&(Ef(0),kf(1,"div",66)(2,"div",67)(3,"div",68),Tf(4,"div",69),kf(5,"div",70)(6,"span",71)(7,"div",72)(8,"div",73)(9,"div",74)(10,"span",75),am(11),xf()(),kf(12,"span",74)(13,"span",76),am(14),xf()(),kf(15,"div",77)(16,"div",78),am(17),xf(),kf(18,"div",79),am(19),xf(),kf(20,"div",80)(21,"span",81),am(22),xf(),kf(23,"span",82),am(24),xf(),kf(25,"span",83),am(26,"."),xf(),kf(27,"span",84),am(28),qm(29,"date"),xf()()(),ph(30,xwe,3,2,"div",85)(31,Twe,4,1,"div",86),xf(),kf(32,"div",87)(33,"div",88)(34,"picture"),Tf(35,"source",89)(36,"source",89)(37,"img",90),xf()()()(),ph(38,Pwe,4,1,"div",91),xf()()()()(),Df()),2&e){let e=Yf();Vd(11),lm(e.offerDataForOfferDetailsPage.savings),Vd(2),zh("ngClass",Om(21,swe,e.offerDataForOfferDetailsPage.regularPrice&&""!==e.offerDataForOfferDetailsPage.regularPrice)),Vd(),cm("In-store: $",e.offerDataForOfferDetailsPage.regularPrice," "),Vd(3),cm(" ",e.offerDataForOfferDetailsPage.title," "),Vd(2),cm(" ",e.offerDataForOfferDetailsPage.description," "),Vd(3),cm(" ",e.couponType[e.offerDataForOfferDetailsPage.offerPgm],": "),Vd(2),cm(" ",e.offerDataForOfferDetailsPage.offerType," "),Vd(4),cm(" Expires ",jm(29,18,e.offerDataForOfferDetailsPage.endDate,"MM/dd/yy")," "),Vd(2),zh("ngIf","TR"!==e.offerDataForOfferDetailsPage.offerPgm&&"GR"!==e.offerDataForOfferDetailsPage.offerPgm),Vd(),zh("ngIf",e.offerDataForOfferDetailsPage.detail),Vd(4),Zf("media","(min-width: ",e.md,")"),Jf("srcset",e.getImageUrl("desktop")),Vd(),Zf("media","(min-width: ",e.sm,")"),Jf("srcset",e.getImageUrl("tablet")),Vd(),Jf("src",e.getImageUrl("mobile"),id),Vd(),zh("ngIf",e.offerDataForOfferDetailsPage.disclaimer)}}var Dwe=(()=>{class e{constructor(e,t,i,n,r,s,a,o,l,c){this._offerDetailService=e,this.cartService=t,this._productCouponService=i,this._userInfoService=n,this._utilService=r,this._productUtilService=s,this._commonService=a,this.cartV2Service=o,this._j4uV1Service=l,this._elementRef=c,this.backtoTriggeredComponent=new _l,this.isBXGYEligibleOffer=!1,this.showAccordion=!1,this.offerText="",this.isDisclaimerLoaded=!1,this.bogoText="Buy 1 Get 1 Free",this.bogoTextDetail="Add 2 Total for Offer",this.showSpinner=!1,this.offerDataForOfferDetailsPage={},this.sm="575px",this.md="768px",this.imagePath=window.AB.dMTProductCard,this.showLoadingCoupon=!1,this.config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment(),this.couponType=this.config[this.currentEnv].nimbusConfig.couponTypes,this.clipCouponLabel=this.config[this.currentEnv].nimbusConfig.couponActionTypes.CLC,this.clippedLabel=this.config[this.currentEnv].nimbusConfig.couponActionTypes.CLD}ngOnInit(){try{let e=this._elementRef.nativeElement.getAttribute("data-configObj");if(!this._commonService.isEmpty(e)&&(this.configObj=JSON.parse(e),"1P_SNS"===this.configObj?.programType||"1P_OA"===this.configObj.appName)){let e=this._elementRef.nativeElement.getAttribute("data-offer");this.offer=JSON.parse(e)}}catch(e){console.error("Error parsing data attributes:",e)}this._commonService.shopCouponRefreshSource.subscribe((e=>{e&&"object"==typeof e&&"id"in e&&"status"in e&&this.offer&&this.offer.offerId===e.id&&(this.offer.status=e.status,this.offer.deleted=e.deleted,this.offerDataForOfferDetailsPage&&this.offerDataForOfferDetailsPage.offerId===e.id&&(this.offerDataForOfferDetailsPage.status=e.status,this.offerDataForOfferDetailsPage.deleted=e.deleted))})),this.offer&&(this.showSpinner=!0,this.offer.offerId=this.getOfferIdentifier(this.offer),this.offer.offerPgm=this.getOfferProgram(this.offer),"coupon-carousel"===this.TriggerElement||this.configObj&&this.configObj.appName&&"weeklyAd"===this.configObj.appName?this.offerText=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[this.offer.usageType]:this.offerText=`Add ${this.offer.minPurchaseQty} Total for Offer`,this.offerDisclaimerExFrgPath=this.config.offerDisclaimerPath,this.offer.itemType&&"product"===this.offer.itemType?this._offerDetailService.getCMSOfferData(this.offer.custom3,this.configObj).subscribe((e=>{this.showSpinner=!1}),(e=>{})):(this._offerDetailService.getOfferDetailData(this.offer.offerId,this.offer.offerPgm,this.configObj).subscribe((e=>{this._commonService.isEmpty(e)||(this.detail=e.offerDetail&&e.offerDetail.details?e.offerDetail.details:"",this.offer.ecomDescription=e.offerDetail&&e.offerDetail.ecomDescription?e.offerDetail.ecomDescription:"",this.offer.isClippable=!!e.offerDetail?.isClippable,this.showSpinner=!1,this.configObj&&this.configObj.appName&&"weeklyAd"===this.configObj.appName&&(this.offerText=window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[e.usageType],this.offer.endDate=e.offerEndDate,this.offer.status=e.status?e.status:"U",this.offer.deleted=e.deleted||!1),this.configObj&&this.configObj.appName&&("b4u"===this.configObj.appName||"1P_OA"===this.configObj.appName)&&(this.transformDataForOfferDetailsPage(e),this.isDisclaimerLoaded||this._offerDetailService.getOfferDisclaimerTemplate(this.offerDisclaimerExFrgPath,this.configObj).subscribe((e=>{e&&(this.offerDataForOfferDetailsPage.disclaimer=e.replace(/<(?:.|\n)*?>/gm," "),this.isDisclaimerLoaded=!0)}))))}),(e=>{})),this.offer.status||(this.offer.status="U"))),this.product&&this._commonService.currentCartObj.subscribe((e=>{if(e){let t=this.cartV2Service.fetchCartDetailsFromResponse(e,this.cartV2Service.getCartName(this.configObj.programType));if(this.offer){let e=[];e.push(this.offer),this.cartService.processOfferComplete(t,e,this.product)}else this.cartService.processBOGOComplete(t,this.product)}})),this.setBogoText()}transformDataForOfferDetailsPage(e){let t=e.offerDetail.offerPrice?e.offerDetail.offerPrice:"";this.offerDataForOfferDetailsPage.savings=e.priceTitle&&""!==e.priceTitle&&-1===t.indexOf(e.priceTitle)?`${e.priceTitle} ${t}`:t,this.offerDataForOfferDetailsPage.savings=""!==this.offerDataForOfferDetailsPage.savings?this.offerDataForOfferDetailsPage.savings:e.offerDetail.forUDescription,this.offerDataForOfferDetailsPage.regularPrice=e.regularPrice?e.regularPrice:"",this.offerDataForOfferDetailsPage.description=e.offerDetail.description,this.offerDataForOfferDetailsPage.title=e.offerDetail.name,this.offerDataForOfferDetailsPage.offerSubPgm=e.offerSubPgm,this.offerDataForOfferDetailsPage.status=e.deleted?"U":e.status?e.status:"U",this.offerDataForOfferDetailsPage.deleted=e.deleted,this.offerDataForOfferDetailsPage.offerId=e.offerId,this.offerDataForOfferDetailsPage.offerPgm=e.offerPgm,this.offerDataForOfferDetailsPage.endDate=e.offerEndDate,this.offerDataForOfferDetailsPage.imageId=e.imageId,this.offerDataForOfferDetailsPage.offerProtoType=e.offerProtoType,this.offerDataForOfferDetailsPage.continuity=e.continuity,this.offerDataForOfferDetailsPage.offerType="TR"===e.offerPgm&&"U"===e.usageType&&void 0!==e.quantity?`${e.quantity} use${parseInt(e.quantity)>1?"s":""} available`:window.SWY.CONFIGSERVICE.nimbusConfig.offerTypes[e.usageType],this.offerDataForOfferDetailsPage.detail=e.offerDetail.details?e.offerDetail.details:""}toggleAccordion(){this.isDisclaimerLoaded?this.showAccordion=!this.showAccordion:this._offerDetailService.getOfferDisclaimerTemplate(this.offerDisclaimerExFrgPath,this.configObj).subscribe((e=>{e&&($(".offer-detail-v2 .offer-disclaimer").append(e),this.showAccordion=!0,this.isDisclaimerLoaded=!0)}))}setBogoText(){this.bogoText=this.product?.promoDescription?`${this.product.promoDescription}`:"",this.bogoTextDetail=this.product?.promoText?this.product.promoText:""}clipCoupon(){if(this.showLoadingCoupon=!0,this._isRegistered()){let e=this._userInfoService.getShopStoreId(),t={nativeElement:this._elementRef.nativeElement};this._j4uV1Service.clipCoupon(this.offer,e,this.configObj,!1,t).subscribe((e=>
1{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.showLoadingCoupon=!1,this.offer.status="C",this.offerDataForOfferDetailsPage.status="C")}))}else if(this.showLoadingCoupon=!1,this.configObj&&this.configObj.appName&&"weeklyAd"===this.configObj.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj);window.location.assign(e+window.AB.signInLinkPath)}else window.rightDrawerComp.closeDrawer(),window.AB.COMMON.showSignInModal_OTP(window.location.href)}backtoComponent(){let e=this.offer?this.offer:null;this.backtoTriggeredComponent.emit(e)}_isRegistered(){return this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()}getImageUrl(e){let t=this.imagePath||"//images.albertsons-media.com/is/image/ABS/${product.id}?$ecom-product-card-${viewport}-jpg$&defaultImage=Not_Available";return t?t.replace("${product.id}",this.offerDataForOfferDetailsPage.imageId).replace("${viewport}",e):""}getOfferIdentifier(e){return e&&(e.offerId||e.omsOfferId||e.couponID||e.couponId||e.id)||""}getOfferProgram(e){return e&&(e.offerPgm||e.offerProgram||e.offerType||e.offerProgramType)||""}static{this.ɵfac=function(t){return new(t||e)($d(Fw),$d(Rw),$d(Lw),$d(_w),$d(Sw),$d(Dw),$d(Bw),$d(Mw),$d(Yw),$d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["offer-detail-al-v1"]],inputs:{offer:"offer",product:"product",TriggerElement:"TriggerElement",configObj:"configObj",isBXGYEligibleOffer:"isBXGYEligibleOffer"},outputs:{backtoTriggeredComponent:"backtoTriggeredComponent"},decls:3,vars:3,consts:[["id","loadingConSmall","class","loading-div-small",4,"ngIf"],[4,"ngIf"],["id","loadingConSmall",1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"offer-detail-v2",3,"ngClass"],["class","back-btn-container","tabindex","0","role","button","data-qa","bck-btn",3,"keydown.enter","click",4,"ngIf"],["class","close-btn-container","tabindex","0","role","button","data-qa","cls-btn",3,"keydown.enter","click",4,"ngIf"],["class","card",4,"ngIf"],["tabindex","0","role","button","data-qa","bck-btn",1,"back-btn-container",3,"keydown.enter","click"],["aria-hidden","true","role","img","data-qa","bck-arrow",1,"back-arrow"],["data-qa","back-btn",1,"back-btn"],["tabindex","0","role","button","data-qa","cls-btn",1,"close-btn-container",3,"keydown.enter","click"],["id","subs-close-btn","tabindex","0","role","button","aria-label","close substitution modal","data-dismiss","modal",1,"offer-modal-close-btn"],[1,"offer-info-container"],[1,"d-flex","mb-3","offer-non-digital"],["width","100","height","100",1,"offer-image",3,"src","alt"],[1,"offer-details","my-auto","d-flex","flex-column","p-3"],["role","heading","aria-level","1","data-qa","offr-dscptn",1,"offer-price"],["data-qa","offr-exp",1,"offer-name"],["class","offer-clipped",4,"ngIf"],["class","offer-completed",4,"ngIf"],[1,"offer-clipped"],[1,"status-container"],[1,"deal-icon-container"],["xmlns","http://www.w3.org/2000/svg","stroke","#000","viewBox","0 0 13 13","aria-hidden","true","data-qa","svg-icn-deal",1,"svg-icon","svg-deal-icon","fl"],["fill-rule","evenodd","d","M8.627 2.551c-.193.186-.293.413-.293.67 0 .251.105.49.296.675.196.19.431.285.698.285.26 0 .507-.101.698-.285.196-.19.296-.417.296-.674 0-.25-.105-.49-.296-.674-.196-.19-.431-.286-.698-.286-.287 0-.517.095-.701.289zM6.816.856C7.174.71 7.497.64 7.803.64h2.834c.347 0 .677.133.953.386.255.233.395.558.395.915v2.752c0 .296-.073.608-.222.954-.153.353-.33.618-.542.81L6.319 11.22c-.253.244-.573.368-.95.368-.362 0-.685-.127-.935-.369L1.061 7.963c-.254-.245-.382-.554-.382-.918-.012-.34.108-.654.353-.92L5.96 1.382c.218-.21.498-.383.857-.526z"],[1,"clipped-status"],[1,"offer-details"],["role","heading","aria-level","1","data-qa","offr-dscptn",1,"offer-description"],["data-qa","offr-exp",1,"offer-exp"],["aria-hidden","true"],[1,"sr-only"],[1,"offer-completed"],[1,"svg-check-mark-container"],["aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark","fl"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray","fill","#757575"],["id","GrayCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236","data-qa","gry-chk"],["src","/etc/designs/wcax-commons/images/icons/partypopper.png","alt","","data-qa","prty-icn",1,"party-icon"],["data-qa","offr-cmplt-txt",1,"offer-complete-text"],["class","offer-unclipped",4,"ngIf"],[1,"offer-unclipped"],["role","button",1,"clip-btn",3,"click"],["data-qa","offr-exp",1,"offer-exp",3,"id"],["data-qa","exp-dt",1,"sr-only"],["aria-hidden","true","data-qa","exp-dt"],[1,"bogo-info-container"],[1,"bogo-detail
1s"],["role","heading","aria-level","1","data-qa","bgo-dscptn",1,"bogo-description"],["data-qa","bgo-exp",1,"bogo-exp"],["data-qa","bgo-exp-date",1,"sr-only"],["src","/etc/designs/wcax-commons/images/icons/partypopper.png","alt","","data-qa","bgo-prty-icn",1,"party-icon"],["data-qa","bgo-offr-cmplt-txt",1,"offer-complete-text"],[1,"card"],["id","offerTermsHeader",1,"card-header"],["role","button","href","javascript:void(0);","aria-controls","offerTermsBody",3,"click","ngClass"],["role","heading","aria-level","2","data-qa","offr-trms-txt",1,"offer-terms-text"],["aria-hidden","true","role","img","data-qa","svg-icn-arrow-dwn",1,"svg-icon","svg-icon-Arrow_down_black"],["id","offerTermsBody","aria-labelledby","offerTermsHeader",3,"ngClass"],[1,"card-body"],[1,"offer-terms-text"],[1,"offer-disclaimer"],[1,"disclaimer-heading"],[1,"container-fluid"],[1,"row","abs-no-gutters"],[1,"remove-rl-padding","col-12","col-sm-12","col-md-12","col-lg-12","col-xl-12"],[1,"breadcrumb","section"],[1,"just-for-you-offer-detail","section","offer-details-nextgen-container"],[1,"offer-details-wrapper"],[1,"row","offer-data"],[1,"col-lg-7","col-md-7"],[1,"offer-details-heading"],["id","offerDetailHeadingSavings",1,"heading-savings"],[1,"heading-offer-price","in-store-price",3,"ngClass"],[1,"offer-details-description"],["id","offerDetailTitleId",1,"offer-details-title"],["id","offerDetailDescriptionId",1,"offer-details-description"],[1,"offer-type-details"],["id","offerDetailCouponTypeId",1,"offer-details-coupon-type"],[1,"offer-details-offer-type"],[1,"offer-dot"],[1,"offer-details-end-date"],["class","offer-details-clip","aria-live","polite",4,"ngIf"],["class","offer-details-detail",4,"ngIf"],[1,"col-lg-5","col-md-5"],[1,"offer-details-description-image-wrapper"],[3,"media","srcset"],["loading","lazy","alt","presentation","role","presentation",1,"offer-details-description-image",3,"src"],["class","offer-details-disclaimer",4,"ngIf"],["aria-live","polite",1,"offer-details-clip"],[3,"click","id","ngClass","disabled"],[1,"coupon-clipped-container"],["width","18px","height","18px","aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark"],["id","GreenCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236"],[1,"coupon-clipped-txt"],[1,"offer-details-detail"],[1,"text-bold"],[3,"innerHTML"],[1,"offer-details-disclaimer"]],template:function(e,t){1&e&&ph(0,owe,5,0,"div",0)(1,Iwe,7,8,"ng-container",1)(2,Ewe,39,23,"ng-container",1),2&e&&(zh("ngIf",t.showSpinner),Vd(),zh("ngIf",!t.showSpinner&&(t.configObj&&("b4u"!==t.configObj.appName&&"1P_OA"!==t.configObj.appName||!t.configObj.appName)||!t.configObj)),Vd(),zh("ngIf",!t.showSpinner&&t.configObj&&t.configObj.appName&&("b4u"===t.configObj.appName||"1P_OA"===t.configObj.appName)))},dependencies:[sy,cy,Ty],encapsulation:2})}}return e})(),Owe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[Dwe],imports:[Ly]})}}return e})(),Bwe=["couponContainer"];function Mwe(e,t){if(1&e&&(kf(0,"h2",8),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.offerCounter," ",e.getCouponText()," Available")}}function Rwe(e,t){if(1&e&&(kf(0,"h2",9),am(1),xf()),2&e){let e=Yf(2);Vd(),um("",e.offersClipped," of ",e.offerCounter," ",e.getCouponText()," Clipped")}}function Lwe(e,t){if(1&e&&(kf(0,"h2",10),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.offersCompleted," of ",e.offerCounter," Offers Completed")}}function Fwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(1,"Shop Deal"),xf()}if(2&e){gh("aria-label","Shop Deal for "+Yf(3).$implicit.ecomDescription)}}function Nwe(e,t){if(1&e&&(kf(0,"div",20)(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",24),am(5),xf(),ph(6,Fwe,2,1,"a",25),xf()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(5),dm("",t.clippedLabel," : Add ",e.minPurchaseQty," Total for Offer"),Vd(),zh("ngIf",!t.isSnsOneTime)}}function Uwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))}
1)),am(1,"Shop Deal"),xf()}if(2&e){gh("aria-label","Shop Deal for "+Yf(3).$implicit.ecomDescription)}}function Vwe(e,t){if(1&e&&(kf(0,"div",27)(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"p",33),am(7,"Offer Complete!"),xf(),ph(8,Uwe,2,1,"a",25),xf()),2&e){let e=Yf(5);Vd(8),zh("ngIf",!e.isSnsOneTime)}}function qwe(e,t){if(1&e&&(Ef(0),kf(1,"div",12,0)(3,"div",13)(4,"a",14),Tf(5,"img",15),xf(),kf(6,"div",16)(7,"p"),am(8),xf()()(),kf(9,"div",17),ph(10,Nwe,7,3,"div",18)(11,Vwe,9,1,"div",19),xf()(),Df()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(5),Jf("src",t.getImageUrl(t.couponListData.product.id,"desktop"),id),Vd(3),lm(e.ecomDescription),Vd(2),zh("ngIf",!1===e.offerComplete),Vd(),zh("ngIf",!0===e.offerComplete)}}function $we(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(1,"Shop Deal"),xf()}if(2&e){gh("aria-label","Shop Deal for "+Yf(3).$implicit.ecomDescription)}}function jwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).dispatchOneTimeEvent(t))})),am(1,"View Details"),xf()}if(2&e){gh("aria-label","View Details for "+Yf(3).$implicit.ecomDescription)}}function zwe(e,t){if(1&e&&(kf(0,"div",20)(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",24),am(5),xf(),ph(6,$we,2,1,"a",25)(7,jwe,2,1,"a",25),xf()),2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(5),dm("",t.clippedLabel," : Add ",e.minPurchaseQty," Total for Offer"),Vd(),zh("ngIf",!t.isSnsOneTime),Vd(),zh("ngIf",t.isSnsOneTime)}}function Wwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(1,"Shop Deal"),xf()}if(2&e){gh("aria-label","Shop Deal for "+Yf(3).$implicit.ecomDescription)}}function Hwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).dispatchOneTimeEvent(t))})),am(1,"View Details"),xf()}if(2&e){gh("aria-label","View Details for "+Yf(3).$implicit.ecomDescription)}}function Ywe(e,t){if(1&e){let e=Mf();kf(0,"div",35)(1,"button",36),jf("click",(function(){Wa(e);let t=Yf(2).$implicit;return Ha(Yf(3).clipCoupon(t))})),am(2,"Clip Deal"),xf(),ph(3,Wwe,2,1,"a",25)(4,Hwe,2,1,"a",25),xf()}if(2&e){let e=Yf(2).$implicit,t=Yf(3);Vd(),gh("aria-label","Clip Deal for "+e.ecomDescription),Vd(2),zh("ngIf",!t.isSnsOneTime),Vd(),zh("ngIf",t.isSnsOneTime)}}function Gwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(1,"Shop Deal"),xf()}if(2&e){gh("aria-label","Shop Deal for "+Yf(3).$implicit.ecomDescription)}}function Kwe(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){Wa(e);let t=Yf(3).$implicit;return Ha(Yf(3).dispatchOneTimeEvent(t))})),am(1,"View Details"),xf()}if(2&e){gh("aria-label","View Details for "+Yf(3).$implicit.ecomDescription)}}function Qwe(e,t){if(1&e&&(kf(0,"div",27)(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"p",33),am(7,"Offer Complete!"),xf(),ph(8,Gwe,2,1,"a",25)(9,Kwe,2,1,"a",25),xf()),2&e){let e=Yf(5);Vd(8),zh("ngIf",!e.isSnsOneTime),Vd(),zh("ngIf",e.isSnsOneTime)}}function Jwe(e,t){if(1&e&&(Ef(0),kf(1,"div",12,0)(3,"div",13)(4,"a",14),Tf(5,"img",15),xf(),kf(6,"div",16)(7,"p"),am(8),xf()()(),kf(9,"div",17),ph(10,zwe,8,4,"div",18)(11,Ywe,5,3,"div",34)(12,Qwe,10,2,"div",19),xf()(),Df()),2&e){let e=Yf().$implicit,t=Yf(3);Vd(5),Jf("src",t.getImageUrl(e.imageId+"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available"),id),Vd(3),lm(e.ecomDescription),Vd(2),zh("ngIf","C"===e.status&&!1===e.deleted&&!1===e.offerComplete),Vd(),zh("ngIf","U"===e.status||!0===e.deleted),Vd(),zh("ngIf","C"===e.status&&!1===e.deleted&&!0===e.offerComplete)}}function Zwe(e,t){if(1&e&&(Ef(0),ph(1,qwe,12,4,"ng-container",1)(2,Jwe,13,5,"ng-container",1),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",!e.isClippable&&e.ecomDescription),Vd(),zh("ngIf",e.isClippable)}}function Xwe(e,t){if(1&e&&(Ef(0),ph(1,Zwe,3,2,"ng-container",11),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.couponListData.coupons)}}function e_e(e,t){if(1&e&&(Ef(0),kf(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",39),am(5),xf(),Df()),2&e){let e=Yf(3);Vd(5),lm(e.couponListData.product.promoText)}}function t_e(e,t){1&e&&(Ef(0),kf(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"p",40),am(7,"Offer Complete!"),xf(),Df())}function i_e(e,t){if(1&e){let e=Mf();kf(0,"a",26),jf("click",(function(){return Wa(e),Ha(Yf(3).openDetailsDrawer("bogo-detail"))}
1)),am(1,"Shop Deal"),xf()}}function n_e(e,t){if(1&e&&(Ef(0),kf(1,"div",12)(2,"div",13)(3,"a",14),Tf(4,"img",15),xf(),kf(5,"div",16)(6,"p"),am(7),xf()()(),kf(8,"div",37)(9,"div",38),ph(10,e_e,6,1,"ng-container",1)(11,t_e,8,0,"ng-container",1)(12,i_e,2,0,"a",25),xf()()(),Df()),2&e){let e=Yf(2);Vd(4),Jf("src",e.getImageUrl(e.couponListData.product.id,"desktop"),id),Vd(3),lm(e.couponListData.product.promoDescription),Vd(3),zh("ngIf",!1===e.couponListData.product.offerComplete),Vd(),zh("ngIf",!0===e.couponListData.product.offerComplete),Vd(),zh("ngIf",!e.isSnsOneTime)}}function r_e(e,t){1&e&&(Ef(0),kf(1,"div",12)(2,"h3",41),am(3,"No offers available"),xf()(),Df())}function s_e(e,t){1&e&&(Ef(0),kf(1,"div",42)(2,"div",43)(3,"div",44)(4,"div",45),Tf(5,"div",46),xf()()()(),Df())}function a_e(e,t){if(1&e&&(Ef(0),kf(1,"div",2)(2,"div",3),ph(3,Mwe,2,2,"h2",4)(4,Rwe,2,3,"h2",5)(5,Lwe,2,2,"h2",6),xf(),kf(6,"div",7),ph(7,Xwe,2,1,"ng-container",1)(8,n_e,13,5,"ng-container",1)(9,r_e,4,0,"ng-container",1)(10,s_e,6,0,"ng-container",1),xf()(),Df()),2&e){let e=Yf();Vd(3),zh("ngIf",0===e.offersCompleted&&0===e.offersClipped),Vd(),zh("ngIf",0===e.offersCompleted&&e.offersClipped>0),Vd(),zh("ngIf",e.offersCompleted>0),Vd(2),zh("ngIf",e.couponListData.coupons.length>0),Vd(),zh("ngIf",e.isBogoProduct),Vd(),zh("ngIf",0===e.couponListData.coupons.length&&!e.isBogoProduct&&!e.isLoading),Vd(),zh("ngIf",0===e.couponListData.coupons.length&&!e.isBogoProduct&&e.isLoading)}}function o_e(e,t){if(1&e&&(kf(0,"h2",8),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.offerCounter," ",e.getCouponText()," Available")}}function l_e(e,t){if(1&e&&(kf(0,"h2",9),am(1),xf()),2&e){let e=Yf(2);Vd(),um("",e.offersClipped," of ",e.offerCounter," ",e.getCouponText()," Clipped")}}function c_e(e,t){if(1&e&&(kf(0,"h2",10),am(1),xf()),2&e){let e=Yf(2);Vd(),dm("",e.offersCompleted," of ",e.offerCounter," Offers Completed")}}function d_e(e,t){if(1&e){let e=Mf();kf(0,"div",20)(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",24),am(5),xf(),kf(6,"a",26),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(7,"Shop Deal"),xf()()}if(2&e){let e=Yf().$implicit,t=Yf(3);Vd(5),dm("",t.clippedLabel," : Add ",e.minPurchaseQty," Total for Offer"),Vd(),gh("aria-label","Shop Deal for "+e.description)}}function u_e(e,t){if(1&e){let e=Mf();kf(0,"div",35)(1,"button",36),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).clipCoupon(t))})),am(2,"Clip Deal"),xf(),kf(3,"a",26),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(4,"Shop Deal"),xf()()}if(2&e){let e=Yf().$implicit;Vd(),gh("aria-label","Clip Deal for "+e.description),Vd(2),gh("aria-label","Shop Deal for "+e.description)}}function p_e(e,t){if(1&e){let e=Mf();kf(0,"div",27)(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"p",33),am(7,"Offer Complete!"),xf(),kf(8,"a",26),jf("click",(function(){Wa(e);let t=Yf().$implicit;return Ha(Yf(3).openDetailsDrawer("offer-detail",t))})),am(9,"Shop Deal"),xf()()}if(2&e){let e=Yf().$implicit;Vd(8),gh("aria-label","Shop Deal for "+e.description)}}function h_e(e,t){if(1&e&&(Ef(0),kf(1,"div",12,0)(3,"div",13)(4,"a",14),Tf(5,"img",15),xf(),kf(6,"div",16)(7,"p"),am(8),xf()()(),kf(9,"div",17),ph(10,d_e,8,3,"div",18)(11,u_e,5,2,"div",34)(12,p_e,10,1,"div",19),xf()(),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(5),Jf("src",i.getImageUrl(e.imageId+"?$ecom-product-card-desktop-jpg$&defaultImage=Not_Available"),id),Vd(3),lm(e.description),Vd(2),zh("ngIf","C"===e.status&&!1===e.deleted&&!1===e.offerComplete),Vd(),zh("ngIf","U"===e.status||!0===e.deleted),Vd(),zh("ngIf","C"===e.status&&!1===e.deleted&&!0===e.offerComplete)}}function f_e(e,t){if(1&e&&(Ef(0),ph(1,h_e,13,5,"ng-container",11),Df()),2&e){let e=Yf(2);Vd(),zh("ngForOf",e.couponListData.coupons)}}function m_e(e,t){if(1&e&&(Ef(0),kf(1,"div",21),So(),kf(2,"svg",22),Tf(3,"path",23),xf()(),Co(),kf(4,"p",39),am(5),xf(),Df()),2&e){let e=Yf(3);Vd(5),lm(e.couponListData.product.promoText)}}function g_e(e,t){1&e&&(Ef(0),kf(1,"div",28),So(),kf(2,"svg",29)(3,"g",30)(4,"g",31),Tf(5,"polygon",32),xf()()()(),Co(),kf(6,"p",40),am(7,"Offer Complete!"),xf(),Df())}function b_e(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",12)(2,"div",13)(3,"a",14),Tf(4,"img",15),xf(),kf(5,"div",16)(6,"p"),am(7),xf()()(),kf(8,"div",37)(9,"div",38),ph(10,m_e,6,1,"ng-container",1)(11,g_e,8,0,"ng-container",1),kf
1(12,"a",26),jf("click",(function(){return Wa(e),Ha(Yf(2).openDetailsDrawer("bogo-detail"))})),am(13,"Shop Deal"),xf()()()(),Df()}if(2&e){let e=Yf(2);Vd(4),Jf("src",e.getImageUrl(e.couponListData.product.id,"desktop"),id),Vd(3),lm(e.couponListData.product.promoDescription),Vd(3),zh("ngIf",!1===e.couponListData.product.offerComplete),Vd(),zh("ngIf",!0===e.couponListData.product.offerComplete)}}function y_e(e,t){if(1&e&&(Ef(0),kf(1,"div",2)(2,"div",3),ph(3,o_e,2,2,"h2",4)(4,l_e,2,3,"h2",5)(5,c_e,2,2,"h2",6),xf(),kf(6,"div",7),ph(7,f_e,2,1,"ng-container",1)(8,b_e,14,4,"ng-container",1),xf()(),Df()),2&e){let e=Yf();Vd(3),zh("ngIf",0===e.offersCompleted&&0===e.offersClipped),Vd(),zh("ngIf",0===e.offersCompleted&&e.offersClipped>0),Vd(),zh("ngIf",e.offersCompleted>0),Vd(2),zh("ngIf",e.couponListData.coupons.length>0),Vd(),zh("ngIf",e.isBogoProduct)}}var v_e=(()=>{class e{constructor(e,t,i,n,r,s,a,o){this._productCouponService=e,this.cartService=t,this._couponListService=i,this._userInfoService=n,this._commonService=r,this._utilService=s,this._productUtilService=a,this._elementRef=o,this.couponListData={product:{},coupons:[]},this.configObj={},this.clippedLabel="Clipped",this.currentEnv="",this.config=Iw,this.offerCounter=0,this.offersClipped=0,this.offersCompleted=0,this.isBogoProduct=!1,this.imagePath="",this.isSnsOneTime=!1,this.isLoading=!0,this.couponFocusIndex=0,window?.AB?.userInfo&&!this._userInfoService.getUserSession()&&this._userInfoService.initUserSession(),this.imagePath="",this.disableNDC=!1,this.currentEnv=this._commonService.getCurrentEnviorment()}ngAfterViewInit(){this.couponContainer.changes.subscribe((()=>{this.setFocus()}))}ngOnInit(){let e=this._elementRef.nativeElement.getAttribute("data-configObj");e&&(this.configObj=JSON.parse(e)),this.isBogoProduct=!!(this.couponListData.product&&this._commonService.isProductPromoActive(this.couponListData.product)&&this.couponListData.product.promoType)&&("M"===this.couponListData.product.promoType||"B"===this.couponListData.product.promoType),"1P_SNS"===this.configObj.programType||"1P_OA"===this.configObj.appName?this.setSnsOneTimeData():this.initializeCouponListData(),this._commonService.currentCartObj.subscribe((e=>{e&&this.couponListData.product&&(this.cartService.processOfferComplete(e,this.couponListData.coupons,this.couponListData.product),this.cartService.processBOGOComplete(e,this.couponListData.product),this.offersCompleted=this._couponListService.getTotalOffersCompleted(this.couponListData.coupons,this.couponListData.product))})),this._commonService.shopCouponRefreshSource.subscribe((e=>{e&&"object"==typeof e&&"id"in e&&"deleted"in e&&"status"in e&&this.setOfferClippedCouponsCounter()}))}setOfferClippedCouponsCounter(){this.offersClipped=this.offerCounter>0?this._productCouponService.getOffersClipped(this.couponListData.coupons):0,this.isBogoProduct&&(this.offersClipped+=1)}initializeCouponListData(){this.offerCounter=this.couponListData.coupons?this.couponListData.coupons.length:0,this.setOfferClippedCouponsCounter(),this.isBogoProduct&&(this.offerCounter+=1)}getImageUrl(e,t){return t?this.imagePath.replace("${product.id}",e).replace("${viewport}",t):this.config[this.currentEnv].nimbusConfig["coupon.image.base.url"]+e}clipCoupon(e){if(this._isRegistered()){let t=this._userInfoService.getShopStoreId();window&&window.digitalData&&(window.digitalData.coupon={carouselSection:"offer-drawer"});let i={nativeElement:this._elementRef.nativeElement};this._productCouponService.clipCoupon(e,t,this.configObj,i).subscribe((t=>{t&&t.items&&t.items[0]&&1===t.items[0].status&&(this.couponFocusIndex=this.couponListData.coupons.findIndex((t=>t.offerId==e.offerId)),this.setOfferClippedCouponsCounter(),this.offersCompleted=this._couponListService.getTotalOffersCompleted(this.couponListData.coupons,this.couponListData.product))}))}else if(this.configObj&&this.configObj.appName&&"weeklyAd"===this.configObj.appName){let e=this._productUtilService.getBannerDomainUrl(this.configObj);window.location.assign(e+window.AB.signInLinkPath)}else window.rightDrawerComp.closeDrawer(),window.AB.COMMON.showSignInModal_OTP(window.location.href)}setFocus(){if(this.couponContainer.length>0){let e=this.couponContainer.toArray();e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-clipped-add-more-text")&&e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-clipped-add-more-text").focus(),e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-offer-complete-text")&&e[this.couponFocusIndex].nativeElement.querySelector(".coupon-list-offer-complete-text").focus()}}openDetailsDrawer(e,t){let i={};
1"offer-detail"===e?(i={type:e,coupon:t,product:this.couponListData.product,triggeredElement:"coupon-list"},this._updateAnalyticsLinkClick("offer-drawer-j4u-multiple")):"bogo-detail"===e&&(i={type:e,product:this.couponListData.product,triggeredElement:"coupon-list"},this._updateAnalyticsLinkClick("offer-drawer-bogo-multiple")),this._commonService.rightDrawerSource.next(i)}dispatchOneTimeEvent(e){let t="1P_OA"===this.configObj?.appName?"productCardComponentUpdate":"snsOneTime";this._commonService.dispatchCustomOneTimeEvent(t,"singleCoupon",{coupons:e})}setSnsOneTimeData(){this.couponListData={product:{},coupons:[]},this.isSnsOneTime=!0;let e=this._elementRef.nativeElement.getAttribute("data-product");e&&(this.couponListData.product=JSON.parse(e)),this._couponListService.getOffersByUpc(this.couponListData.product.upc).subscribe((e=>{let t=0;for(let i in e[this.couponListData.product?.upc].offers)this.couponListData.coupons.push(e[this.couponListData.product.upc]?.offers[i]),this.couponListData.coupons[t].offerComplete=!1,t++;this.initializeCouponListData(),this.isLoading=!1}),(e=>{this.couponListData.coupons=[],this.isLoading=!1}))}_isRegistered(){return this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()}_updateAnalyticsLinkClick(e){let t="";0===this.offersClipped?(t=this.offerCounter+" Coupons Available",window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):this.offersClipped>0?(t=this.offersClipped+" of "+this.offerCounter+" Coupons Clipped",window.AB.DATALAYER.setLinkClickOfferDrawer(e,t,this._elementRef.nativeElement)):window.AB.DATALAYER.setLinkClickEvents(e)}getCouponText(){return 1===this.offerCounter?"Coupon":"Coupons"}static{this.ɵfac=function(t){return new(t||e)($d(Lw),$d(Rw),$d(Nw),$d(_w),$d(Bw),$d(Sw),$d(Dw),$d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["coupon-list-al-v1"]],viewQuery:function(e,t){if(1&e&&tm(Bwe,5),2&e){let e;im(e=nm())&&(t.couponContainer=e)}},inputs:{couponListData:"couponListData",configObj:"configObj"},decls:2,vars:2,consts:[["couponContainer",""],[4,"ngIf"],["id","couponList",1,"coupon-list"],[1,"coupon-list-status-text"],["class","available",4,"ngIf"],["class","some-clipped",4,"ngIf"],["class","completed",4,"ngIf"],[1,"coupon-list-container-wrapper"],[1,"available"],[1,"some-clipped"],[1,"completed"],[4,"ngFor","ngForOf"],[1,"coupon-list-container"],[1,"coupon-list-details","col-9","col-sm-8","col-md-8","col-lg-9","col-xl-9"],[1,"coupon-list-image"],["alt","image","onError","this.style.display = 'none'",3,"src"],[1,"coupon-list-description"],["aria-live","polite",1,"coupon-list-status","col-3","col-sm-4","col-md-4","col-lg-3","col-xl-3"],["class","coupon-list-clipped-add-more",4,"ngIf"],["class","coupon-list-offer-completed",4,"ngIf"],[1,"coupon-list-clipped-add-more"],[1,"svg-deal-icon-container"],["xmlns","http://www.w3.org/2000/svg","stroke","#000","viewBox","0 0 13 13","aria-hidden","true","data-qa","svg-icn-deal",1,"svg-icon","svg-deal-icon","fl"],["fill-rule","evenodd","d","M8.627 2.551c-.193.186-.293.413-.293.67 0 .251.105.49.296.675.196.19.431.285.698.285.26 0 .507-.101.698-.285.196-.19.296-.417.296-.674 0-.25-.105-.49-.296-.674-.196-.19-.431-.286-.698-.286-.287 0-.517.095-.701.289zM6.816.856C7.174.71 7.497.64 7.803.64h2.834c.347 0 .677.133.953.386.255.233.395.558.395.915v2.752c0 .296-.073.608-.222.954-.153.353-.33.618-.542.81L6.319 11.22c-.253.244-.573.368-.95.368-.362 0-.685-.127-.935-.369L1.061 7.963c-.254-.245-.382-.554-.382-.918-.012-.34.108-.654.353-.92L5.96 1.382c.218-.21.498-.383.857-.526z"],["tabindex","-1",1,"coupon-list-clipped-add-more-text"],["class","coupon-list-shop-deal","href","javascript:void(0);","role","button",3,"click",4,"ngIf"],["href","javascript:void(0);","role","button",1,"coupon-list-shop-deal",3,"click"],[1,"coupon-list-offer-completed"],[1,"svg-check-mark-container"],["aria-hidden","true","viewBox","0 0 24 24","version","1.1","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink",1,"svg-icon","svg-icon-coupon-carousel-tick-mark","fl"],["id","Symbols","stroke-width","1","fill-rule","evenodd"],["id","Icons-/-Universal-/-Check-/-Gray","fill","#757575"],["id","GrayCheck","points","19.6926976 5 21.1720549 6.34592056 9.50596091 19.1686094 3 12.9800394 4.37842439 11.5309203 9.40273692 16.3101236","data-qa","gry-chk"],["tabindex","-1",1,"coupon-list-offer-complete-text"],["class","coupon-list-unclipped",4,"ngIf"],[1,"coupon-list-unclipped"],["role","button",1,"clip-deal-btn",3,"click"],[1,"coupon-list-status","col-3","col-sm-4","col-md-4","col-lg-3","col-xl-3"],[1,"coupon-list-bogo"],[1,"coupon-list-bogo-text"],[1,"coupon-list-bogo-complete-text"],["id","no-coupons-available-txt"],["id","your-loading-id",1,"otp-auth-loader"],[1,"loading-spinner"],["alt","Loading...",1,"small","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&ph(0,a_e,11,7,"ng-container",1)(1,y_e,9,5,"ng-container",1),2&e&&(zh("ngIf",!t.disableNDC),Vd(),zh("ngIf",t.disableNDC))},dependencies:[oy,cy],encapsulation:2})}}return e})(),w_e=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[v_e],imports:[Ly]})}}return e})(),__e=["qualifiedProductsContainer"],S_e=["productGridTemplate"];function C_e(e,t){if(1&e&&Tf(0,"product-generic-grid-al-v1",3),2&e){let e=Yf();zh("objGridData",e.objGridData)("dataValue",e.dataValue)("calledBy",e.triggerBy)("qualifiedProducts",e.JSONqualifiedProductsResponse)("configObj",e.configObj)("offersFromDynamicGrid",e.offers)}}function I_e(e,t){if(1&e&&Tf(0,"product-generic-grid-al-v1",3),2&e){let e=Yf();zh("objGridData",e.objGridData)("dataValue",e.dataValue)("calledBy",e.triggerBy)("qualifiedProducts",e.JSONqualifiedProductsResponse)("configObj",e.configObj)("offersFromDynamicGrid",e.offers)}}function A_e(e,t){if(1&e){let e=Mf();kf(0,"ul",12)(1,"li",13)(2,"a",14),jf("click",(function(t){return Wa(e),Ha(Yf(2).handleTab(!1,t))})),am(3),xf()(),kf(4,"li",13)(5,"a",15),jf("click",(function(t){return Wa(e),Ha(Yf(2).handleTab(!0,t))})),am(6),xf()()()}if(2&e){let e=Yf(2);Vd(2),_h("aria-label","Eligible to buy (",e.upcList.length,") product"),Vd(),cm(" Eligible to buy (",e.upcList.length,") "),Vd(2),_h("aria-label","Eligible to get (",e.eligibleUpcList.length,") product"),Vd(),cm(" Eligible to get (",e.eligibleUpcList.length,") ")}}function k_e(e,t){if(1&e&&Tf(0,"product-generic-grid-al-v1",16),2&e){let e=Yf(2);zh("objGridData",e.objGridData)("dataValue",e.dataValue)("calledBy",e.triggerBy)("qualifiedProducts",e.JSONqualifiedProductsResponse)("configObj",e.configObj)}}function x_e(e,t){if(1&e&&Tf(0,"product-generic-grid-al-v1",16),2&e){let e=Yf(2);zh("objGridData",e.objGridData)("dataValue",e.dataValue)("calledBy",e.triggerBy)("qualifiedProducts",e.eligibleJSONqualifiedProductsResponse)("configObj",e.configObj)}}function T_e(e,t){if(1&e&&(Ef(0),kf(1,"div",4)(2,"div",5),ph(3,A_e,7,6,"ul",6),Tf(4,"div",7),kf(5,"div",8)(6,"div",9),ph(7,k_e,1,5,"product-generic-grid-al-v1",10),xf(),kf(8,"div",11),ph(9,x_e,1,5,"product-generic-grid-al-v1",10),xf()()()(),Df()),2&e){let e=Yf();Vd(3),zh("ngIf",e.upcList.length&&e.eligibleUpcList.length),Vd(4),zh("ngIf",e.showGrid),Vd(2),zh("ngIf",e.showGrid&&e.eligibleJSONqualifiedProductsResponse.length)}}var P_e=(()=>{class e{constructor(e,t,i,n,r){this._productGridService=e,this.elementRef=t,this._commonService=i,this._userInfoService=n,this._cartService=r,this.offer={},this.isBXGYEligibleOffer=!1,this.config=Iw,this.ack=!0,this.objGridData={drivenType:"",apiUrl:"",apiType:"",sorts:"",defaultSort:"",value:{},products:[],widgetId:"",load_type:"",infinite_type:"",doGenericFlow:!1,modelConfigurationId:""},this.triggerBy="",this.eligibleJSONqualifiedProductsResponse=[],this.upcList=[],this.eligibleUpcList=[],this.isEligibleUpcListTabSelected=!1;let s=this.elementRef.nativeElement,a=s&&s.attributes;this.productGridPage=a["data-driven"]?a["data-driven"].value:"catalog";let o=a["data-default-sorts"]?a["data-default-sorts"].value:void 0,l=a["data-api-type"]?a["data-api-type"].value:"c-products-by-upc-drawer";if(this.objGridData={drivenType:"s-bogo"==l?"static":this.productGridPage,apiUrl:a["data-api-url"]&&a["data-api-url"].value,apiType:l,sorts:a["data-sorts"]&&a["data-sorts"].value,defaultSort:o,value:{},products:[],widgetId:a["data-widget-id"]&&a["data-widget-id"].value,load_type:a["data-load-type"]?a["data-load-type"].value:"loadmore",infinite_type:a["data-infinite-scroll-type"]?a["data-infinite-scroll-type"].value:"client",doGenericFlow:!!a["data-dogeneric-flow"]&&"true"==a["data-dogeneric-flow"].value,badgePreference:a["data-badge-preferrence"]?a["data-badge-preferrence"].value:"",badgeList:a["data-badge-list"]?a["data-badge-list"]?.value:""},this.objGridData.doGenericFlow&&"generic"==this.objGridData.drivenType){this.objGridData.modelConfigurationId=this.getModelConfigIdFromUrl();let e=document.getElementById("genericGridTitle"),t=new URLSearchParams(window.location.search).get("title");e&&t&&(e.innerHTML=t)}this.triggerBy=this.productGridPage,("purchase"===this.productGridPage||"catalog"===this.productGridPage||"static"===this.productGridPage)&&(this.triggerBy=this.objGridData.apiType);try{let e=this.dataValue;void 0===this.dataValue&&(e=this.elementRef.nativeElement.getAttribute("data-value")),e=e.replace(/'/g,'"'),this.objGridData.value=JSON.parse(e)}catch{}"c-products-by-upc-drawer"===this.objGridData.apiType&&this.setProductByUpcApiUrl(),"static"===this.productGridPage&&(this.objGridData.products=this.staticProducts),this.showGrid=!1}ngOnInit(){this.configObj||(this.configObj={programType:"abs"}),this.configObj&&"b4u-offerDetails"==this.configObj.appName&&this.setProductByUpcApiUrl();try{let e=this.dataValue;void 0===this.dataValue&&(e=this.elementRef.nativeElement.getAttribute("data-value")),e=e.replace(/'/g,'"'),this.objGridData.value=JSON.parse(e)}catch{}this._commonService._userInfoRefresh.subscribe((e=>{"initFunc"===e&&(this.configObj&&this.configObj.bannerDomain&&(this.objGridData.apiUrl=this.configObj.bannerDomain+this.objGridData.apiUrl),this._productGridService.objGridData=this.objGridData,"static"===this.productGridPage&&(this.objGridData.products=this.staticProducts),this.getProduct(),this.setProgramTypeFromBannerTypeMetaTag(),this._cartService.rightDrawerEvent.next({event:"openOfferDetails",data:[]}))})),this._commonService.$bxgyOffer.subscribe((e=>{this.upcList=e?.upcList||[],this.eligibleUpcList=e?.eligibleUpcList||[]}))}setProductByUpcApiUrl(){this.currentEnv=this._commonService.getCurrentEnviorment();let e=this.config[this.currentEnv].catalogConfig;this.objGridData.apiUrl=e["apim.api.catalog.path"]+e["apim.api.catalog.product.upc.endpoint"]}getProduct(){this._productGridService.getData().subscribe((e=>{"static"!==this.productGridPage&&"generic"!==this.objGridData.drivenType&&(e.products=this.configObj&&this.configObj.appName&&"weeklyAd"===this.configObj.appName&&e.response&&e.response.docs&&e.response.docs.length>0?e.response.docs.filter((e=>!e.isMtoProduct)):e.response.docs),e.ack=!1,this.offers=e?.response?.offersData??e?.offersData??{}
1,this.qualifiedProductsResponse=e,this.isEligibleUpcListTabSelected?this.eligibleJSONqualifiedProductsResponse=this.getQualifiedProductsJson(this.qualifiedProductsResponse):this.JSONqualifiedProductsResponse=this.getQualifiedProductsJson(this.qualifiedProductsResponse),this.showGrid=!0}),(e=>{}))}getQualifiedProductsJson(e){let t="{}";return e&&e.products&&(t=JSON.stringify(e)),t}setProgramTypeFromBannerTypeMetaTag(){if("B"===this._userInfoService?.getSiteType()){let e=$("meta[name='bannerType']").attr("content");this.configObj.programType=e}}getModelConfigIdFromUrl(){try{return window.location.pathname.substring(1).split("/")[2]}catch{return""}}handleTab(e,t){t.preventDefault(),this.isEligibleUpcListTabSelected=e,e&&!this.eligibleJSONqualifiedProductsResponse.length&&(this.getProduct(),this._commonService.upcs.next(this.eligibleUpcList))}static{this.ɵfac=function(t){return new(t||e)($d(jme),$d(Vl),$d(Bw),$d(_w),$d(Rw))}}static{this.ɵcmp=Qr({type:e,selectors:[["offer-qualified-products-al-v1"]],viewQuery:function(e,t){if(1&e&&(tm(__e,7,yp),tm(S_e,7,Yu)),2&e){let e;im(e=nm())&&(t.qualifiedProductsContainer=e.first),im(e=nm())&&(t.productGridTemplate=e.first)}},inputs:{dataValue:"dataValue",staticProducts:"staticProducts",configObj:"configObj",offer:"offer",isBXGYEligibleOffer:"isBXGYEligibleOffer"},decls:5,vars:3,consts:[["qualifiedProductsContainer",""],["data-infinite-scroll-type","client","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10",3,"objGridData","dataValue","calledBy","qualifiedProducts","configObj","offersFromDynamicGrid",4,"ngIf"],[4,"ngIf"],["data-infinite-scroll-type","client","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10",3,"objGridData","dataValue","calledBy","qualifiedProducts","configObj","offersFromDynamicGrid"],[1,"product-wrapper-v2","product-wrapper-v2--details","section","mt-0"],["role","region","aria-label","Section for Eligible to buy, Eligible to get",1,"product-tabs","mt-0","w-100"],["class","nav product-tabs__nav","role","tablist","aria-orientation","horizontal",4,"ngIf"],[1,"product-tabs__bar"],[1,"tab-content","product-tabs__content"],["id","eligibleToBuy","tabindex","0",1,"tab-pane","fade","show","active","body-text"],["data-infinite-scroll-type","client","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10",3,"objGridData","dataValue","calledBy","qualifiedProducts","configObj",4,"ngIf"],["id","eligibleToGet","tabindex","0",1,"tab-pane","fade","body-text"],["role","tablist","aria-orientation","horizontal",1,"nav","product-tabs__nav"],["role","presentation",1,"product-tabs__nav__item","text-center","w-50","p-0","pt-3","pb-3"],["href","#eligibleToBuy","data-toggle","tab","role","tab","aria-controls","eligibleToBuy",1,"title-xs","active",3,"click"],["href","#eligibleToGet","data-toggle","tab","role","tab","aria-controls","eligibleToGet",1,"title-xs",3,"click"],["data-infinite-scroll-type","client","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10",3,"objGridData","dataValue","calledBy","qualifiedProducts","configObj"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,C_e,1,6,"product-generic-grid-al-v1",1)(3,I_e,1,6,"product-generic-grid-al-v1",1)(4,T_e,10,3,"ng-container",2)),2&e&&(Vd(2),zh("ngIf",t.showGrid&&"s-bogo"!==t.objGridData.apiType&&!t.isBXGYEligibleOffer),Vd(),zh("ngIf",t.showGrid&&"s-bogo"===t.objGridData.apiType&&!t.isBXGYEligibleOffer),Vd(),zh("ngIf",t.isBXGYEligibleOffer))},dependencies:[cy,sge],encapsulation:2})}}return e})(),E_e=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[P_e],imports:[Ly,age]})}}return e})(),D_e=e=>({"offer-terms-condition-pzn":!0,collapsed:e}),O_e=e=>({collapse:e});function B_e(e,t){1&e&&(kf(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),Tf(4,"div",6),xf()()()())}function M_e(e,t){if(1&e){let e=Mf();kf(0,"button",21),jf("click",(function(){return Wa(e),Ha(Yf(2).addToList())})),am(1,"Add to list"),xf()}}
1function R_e(e,t){if(1&e){let e=Mf();kf(0,"button",22),jf("click",(function(){return Wa(e),Ha(Yf(2).removeFromList())})),am(1,"Remove from list"),xf()}}function L_e(e,t){if(1&e){let e=Mf();kf(0,"div",7)(1,"div",8)(2,"div"),Tf(3,"img",9),xf(),kf(4,"div",10)(5,"div",7)(6,"div",11),am(7),xf(),kf(8,"div",12),am(9),xf(),kf(10,"div",13),am(11),xf(),kf(12,"div",13),am(13),xf()()()(),kf(14,"div"),ph(15,M_e,2,0,"button",14)(16,R_e,2,0,"button",15),xf(),Tf(17,"hr"),kf(18,"div",16),jf("click",(function(){return Wa(e),Ha(Yf().toggleAccordion())})),kf(19,"div",17)(20,"span",18),am(21,"Offer Details"),xf(),Tf(22,"span",19),xf(),Tf(23,"div",20),xf(),Tf(24,"hr"),xf()}if(2&e){let e=Yf();Vd(3),Zf("src","http://s7d2.scene7.com/is/image/ABS/",null==e.offerDetailsPznData?null:e.offerDetailsPznData.imageId,"?$ecom-product-card-desktop$&defaultImage=Not_Available",id),Jf("alt",null==e.offerDetailsPznData?null:e.offerDetailsPznData.offerId),Vd(4),lm(null==e.offerDetailsPznData?null:e.offerDetailsPznData.forUDescription),Vd(2),lm(null==e.offerDetailsPznData?null:e.offerDetailsPznData.brand),Vd(2),lm(null==e.offerDetailsPznData?null:e.offerDetailsPznData.ecomDescription),Vd(2),lm(e.dateString),Vd(2),zh("ngIf","U"===(null==e.offerDetailsPznData?null:e.offerDetailsPznData.status)||(null==e.offerDetailsPznData?null:e.offerDetailsPznData.deleted)),Vd(),zh("ngIf","C"===(null==e.offerDetailsPznData?null:e.offerDetailsPznData.status)&&!(null!=e.offerDetailsPznData&&e.offerDetailsPznData.deleted)),Vd(2),zh("ngClass",Om(12,D_e,!e.showAccordion)),gh("aria-expanded",e.showAccordion),Vd(5),zh("ngClass",Om(14,O_e,!e.showAccordion))}}var F_e=(()=>{class e{constructor(e,t,i,n,r,s){this._offerDetailService=e,this._userInfoService=t,this._utilService=i,this._productUtilService=n,this.myListService=r,this.elementRef=s,this.myListItems=[],this.showSpinner=!1,this.config=Iw,this.currentEnv="",this.dateString="",this.showAccordion=!1,this.isDisclaimerLoaded=!1}ngOnInit(){this.offer&&(this.showSpinner=!0,this.offerDisclaimerExFrgPath=this.config.offerDisclaimerPath,this.offer.myListItems&&this.offer.myListItems.length&&(this.myListItems=[...this.offer.myListItems]),this.offer&&this.offer.isWeeklyAdPzn)&&this._offerDetailService.getOfferDetailsDataPzn(this.offer.offerId,this.offer.storeId,this.offer.includeUpc,this.offer.source).subscribe((e=>{e&&(this.offerDetailsPznData=e,this.dateString=this.createDateString()),this.showSpinner=!1}))}createDateString(){let e=new Date(Number(this.offerDetailsPznData.startDate)),t=new Date(Number(this.offerDetailsPznData.endDate)),i={month:"numeric",day:"numeric"};return`${e.toLocaleDateString("en-US",i)} - ${t.toLocaleDateString("en-US",i)}`}toggleAccordion(){this.isDisclaimerLoaded?this.showAccordion=!this.showAccordion:this._offerDetailService.getOfferDisclaimerTemplate(this.offerDisclaimerExFrgPath,this.configObj).subscribe((e=>{e&&($(".offer-terms-condition-pzn .cms-offer-terms-conditions").append(e),this.showAccordion=!0,this.isDisclaimerLoaded=!0)}))}addToList(){if(this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()){let e={items:[{clipType:"L",itemId:this.offerDetailsPznData.offerId,itemType:this.offerDetailsPznData.offerPgm,wsSource:this.offerDetailsPznData.source}]};this._offerDetailService.addToList(e).subscribe((e=>{e&&e.items&&e.items[0]&&1===e.items[0].status&&(this.offerDetailsPznData.status="C",this.offerDetailsPznData.deleted=!1,this.myListService.getMyList(window.AB.userInfo.branchId,!0).subscribe((e=>{e&&e.shoppingLists&&e.shoppingLists[0]&&e.shoppingLists[0].items&&(this.myListItems=[...e.shoppingLists[0].items])})),this._offerDetailService.couponUpdated.next(f(h({},this.offerDetailsPznData),{status:"C",deleted:!1})))})),this.trackAnalyticsClicks("add-to-list")}else{let e=this._productUtilService.getBannerDomainUrl(this.configObj)+window.AB.signInLinkPath,t=window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.trackWeeklyAdIcmpid&&window.AB.DATALAYER.trackWeeklyAdIcmpid("add-to-list",e)||"";window.location.assign(e+`${t}`)}}removeFromList(){if(this._utilService.isTokenActive()&&this._userInfoService.isAuthorized()){let e=[];
1null!=this.myListItems&&this.myListItems.forEach((t=>{t.referenceId==this.offerDetailsPznData.offerId&&e.push({id:t.id})}));let t={items:e};this._offerDetailService.removeFromList(t).subscribe((e=>{e&&e.items&&e.items[0]&&(this.offerDetailsPznData.deleted=!0,this._offerDetailService.couponUpdated.next(f(h({},this.offerDetailsPznData),{status:"C",deleted:!0})))})),this.trackAnalyticsClicks("remove-from-list")}else{let e=this._productUtilService.getBannerDomainUrl(this.configObj);window.location.assign(e+window.AB.signInLinkPath)}}trackAnalyticsClicks(e){if(window.AB&&window.AB.DATALAYER){let t=window.AB.DATALAYER.sanitizeAnalyticsText(window.AB.DATALAYER.getAnalyticsCarouselTitle(this.elementRef.nativeElement));window.AB.DATALAYER.setLinkClickEvents(`weekly-ad${"eligible-items"===e||"offer-details"===e?`:${t}`:""}${e?`|${e}`:""}`,!1,""+("add-to-list"===e?`weekly-ad:${t}`:""))}}static{this.ɵfac=function(t){return new(t||e)($d(Fw),$d(_w),$d(Sw),$d(Dw),$d(Jw),$d(Vl))}}static{this.ɵcmp=Qr({type:e,selectors:[["ndc-offer-detail-al-v1"]],inputs:{offer:"offer",TriggerElement:"TriggerElement",configObj:"configObj",myListItems:"myListItems"},decls:2,vars:2,consts:[["id","loadingConSmall","class","loading-div-small",4,"ngIf"],["class","d-flex flex-column",4,"ngIf"],["id","loadingConSmall",1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"],[1,"d-flex","flex-column"],[1,"d-flex","mt-3"],["width","128","height","128",1,"img-responsive",3,"src","alt"],[1,"ml-3"],[1,"price-lg"],[1,"title-xs"],[1,"body-text"],["class","btn btn-lg pds-btn-filled--primary w-100","aria-label","Add to list",3,"click",4,"ngIf"],["class","btn btn-lg pds-btn-filled--primary w-100","aria-label","Remove from list",3,"click",4,"ngIf"],["id","offerTermsBody","aria-labelledby","offerTermsHeader","aria-controls","offerTermsBody",3,"click","ngClass"],["type","button",1,"d-flex","justify-content-between"],["role","heading","aria-level","2","data-qa","offr-trms-txt",1,"offer-terms-text"],["aria-hidden","true","role","img","data-qa","svg-icn-arrow-dwn",1,"svg-caret-down"],[1,"cms-offer-terms-conditions",3,"ngClass"],["aria-label","Add to list",1,"btn","btn-lg","pds-btn-filled--primary","w-100",3,"click"],["aria-label","Remove from list",1,"btn","btn-lg","pds-btn-filled--primary","w-100",3,"click"]],template:function(e,t){1&e&&ph(0,B_e,5,0,"div",0)(1,L_e,25,16,"div",1),2&e&&(zh("ngIf",t.showSpinner),Vd(),zh("ngIf",!t.showSpinner))},dependencies:[sy,cy]})}}return e})(),N_e=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly]})}}return e})(),U_e=(()=>{class e{constructor(e,t,i,n){this.http=e,this._aemService=t,this._commonService=i,this._userInfoService=n,this.config=Iw,this.currentEnv="",this.currentEnv=this._commonService.getCurrentEnviorment(),this.isCateringEnabled=!this._aemService.getFeatureFlagByNameDisable("isCateringDisabled")}getEstimatedTotal(e){let t={headers:new jy({"ocp-apim-subscription-key":this._aemService.getWcaxXapiApimKey()})};return this.http.post(`${this.config?.[this.currentEnv]?.catalogConfig?.["apim.api.catalog.path"]}/product/estimatedTotal`,e,t).pipe($i((e=>mi((()=>e)))))}getAllModifierSelectedOptions(e){if(!e)return[];let t=[];return Object.keys(e)?.forEach((i=>{(e[i]||[])?.forEach((e=>{if(this.isCateringEnabled){let i=h({},e);"number"!=typeof e?.qty&&delete i.qty,t.push(i)}else t.push(e)}))})),t}isOutOfStock(e){let t=this._userInfoService.getUserChannel();return!this._commonService.checkItemAvailability_v2(e,t,!1)}getInitialSelectedModifierAndOptions(e){let t={};return e?.forEach((e=>{let i=e?.options||[];if(i.forEach((i=>{i.isSelected=!1,i.isOOS=this.isOutOfStock(i),i.isDefault&&!i.isOOS&&(i.isSelected=!0,this.isCateringEnabled&&e?.stepperEnabled&&"number"!=typeof i.qty&&(i.qty=1),(t[e.name]||=[]).push(i))})),2===i.length){let n=i.filter((e=>e.isDefault));if(n.length>0&&n.every((e=>e.isOOS))){let n=i.find((e=>!e.isDefault&&!e.isOOS));n&&(n.isSelected=!0,this.isCateringEnabled&&e?.stepperEnabled&&"number"!=typeof n.qty&&(n.qty=1),t[e.name]=[n])}}})),t}isValidSelections(e,t){return e?.every((e=>{let i=t[e.name]||[];return this.isCateringEnabled&&e?.stepperEnabled?this._commonService.isMinSelectSatisfied(e,i):i?.length>=e.minSelect}))}isLBProduct(e){return"3"===e?.displayType&&("W"===e?.sellByWeight||"P"===e?.sellByWeight)}getItemPrice(e,t){return this.isLBProduct(e)&&e?.incrementPriceList?.find((e=>+e.weight==+t))?.price||this._commonService.getValidProductPrice(e)?.toString()}getPreSelectedModifierAndOptions(e,t=[]){let i={};if(!Array.isArray(e))return i;let n=Array.isArray(t)&&t.length>0?"string"==typeof t[0]?t.map((e=>({upcId:e}))):t:[],r=n.length>0;return e?.forEach((e=>{let t=i[e.name]||[];
1(e?.options||[]).forEach((i=>{i.isSelected=!1,i.isOOS=this.isOutOfStock(i);let s=r?n.find((e=>e.upcId===i.upcId)):null,a=!!s,o=this.isCateringEnabled&&e.stepperEnabled&&!!s?.qty&&s.qty>0;!a&&!o||i.isOOS?!r&&i.isDefault&&!i.isOOS&&(i.isSelected=!0,this.isCateringEnabled&&e?.stepperEnabled&&"number"!=typeof i.qty?i.qty=1:!this.isCateringEnabled&&i.qty&&delete i.qty,t.push(i)):(i.isSelected=!0,this.isCateringEnabled&&e?.stepperEnabled?i.qty="number"==typeof s?.qty&&s.qty>0?s.qty:1:i.qty&&delete i.qty,t.push(i))})),t.length>0&&(i[e.name]=t)})),i}static{this.ɵfac=function(t){return new(t||e)(lr(ov),lr(Cw),lr(Bw),lr(_w))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac,providedIn:"root"})}}return e})(),V_e=e=>({"pds-input-field-group--label__error":e}),q_e=e=>({"mt-0":e}),$_e=(e,t)=>({"customize-selection__require-text":e,"customize-selection__require-text--success":t}),j_e=(e,t,i)=>({modifier:e,option:t,index:i}),z_e=e=>({"mr-3":e}),W_e=e=>({"customize-selection__options__opt--oos":e});function H_e(e,t){1&e&&Tf(0,"span",44)}function Y_e(e,t){1&e&&Tf(0,"span",45)}function G_e(e,t){if(1&e&&(kf(0,"span",46),am(1," Required "),xf()),2&e){let e=Yf(2).$implicit,t=Yf(2);zh("ngClass",Bm(1,$_e,e.minSelect>=1&&!t.isMinSelectSatisfied(e),e.minSelect>=1&&t.isMinSelectSatisfied(e)))}}function K_e(e,t){1&e&&(kf(0,"span",41),am(1,"Optional"),xf())}function Q_e(e,t){1&e&&Tf(0,"span",47)}function J_e(e,t){if(1&e&&(kf(0,"span"),am(1,"Select "),kf(2,"span",48),am(3),xf()()),2&e){let e=Yf(2).$implicit;Vd(3),cm(" ",e.minSelect,"")}}function Z_e(e,t){1&e&&(kf(0,"span"),am(1,", max"),xf())}function X_e(e,t){if(1&e&&(kf(0,"span",50),am(1),xf()),2&e){let e=Yf(3).$implicit;Vd(),cm(" ",e.maxSelect,"")}}function eSe(e,t){if(1&e&&(kf(0,"span"),am(1,"Select at least "),kf(2,"span",48),am(3),xf(),ph(4,Z_e,2,0,"span",2)(5,X_e,2,1,"span",49),xf()),2&e){let e=Yf(2).$implicit;Vd(3),lm(e.minSelect),Vd(),zh("ngIf",!(1===e.minSelect&&!e.maxSelect)),Vd(),zh("ngIf",!(1===e.minSelect&&!e.maxSelect))}}function tSe(e,t){if(1&e&&(kf(0,"span"),am(1,"Select up to "),kf(2,"span",50),am(3),xf()()),2&e){let e=Yf(2).$implicit;Vd(3),cm(" ",e.maxSelect,"")}}function iSe(e,t){1&e&&(kf(0,"span"),am(1,"Selected."),xf())}function nSe(e,t){1&e&&(kf(0,"span"),am(1,"Caution."),xf())}function rSe(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm(" Required. Select ",e.maxSelect," ")}}function sSe(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),dm(" Required. Select at least ",e.minSelect,", maximum ",e.maxSelect," ")}}function aSe(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm(" Optional. Select up to ",e.maxSelect," ")}}function oSe(e,t){if(1&e&&(kf(0,"span"),am(1),xf()),2&e){let e=Yf(2).$implicit;Vd(),cm(" Required. Select at least ",e.minSelect," ")}}function lSe(e,t){1&e&&(kf(0,"span"),am(1," Optional "),xf())}function cSe(e,t){1&e&&Of(0)}function dSe(e,t){if(1&e&&(Ef(0),ph(1,cSe,1,0,"ng-container",51),Df()),2&e){let e=t.$implicit,i=t.index,n=Yf(2).$implicit;Yf(2);let r=sm(2);Vd(),zh("ngTemplateOutlet",r)("ngTemplateOutletContext",Mm(2,j_e,n,e,i))}}function uSe(e,t){if(1&e&&(kf(0,"div",33)(1,"div",34),am(2),xf(),kf(3,"div",18)(4,"div",35),ph(5,H_e,1,0,"span",36)(6,Y_e,1,0,"span",37)(7,G_e,2,4,"span",38)(8,K_e,2,0,"span",39)(9,Q_e,1,0,"span",40),kf(10,"span",41),ph(11,J_e,4,1,"span",2)(12,eSe,6,3,"span",2)(13,tSe,4,1,"span",2),xf(),kf(14,"span",42),ph(15,iSe,2,0,"span",2)(16,nSe,2,0,"span",2)(17,rSe,2,1,"span",2)(18,sSe,2,2,"span",2)(19,aSe,2,1,"span",2)(20,oSe,2,1,"span",2)(21,lSe,2,0,"span",2),xf()()(),kf(22,"div",43),ph(23,dSe,2,6,"ng-container",15),xf()()),2&e){let e=Yf(),t=e.$implicit,i=e.index,n=Yf(2);zh("ngClass",Om(20,q_e,0===i)),Vd(),Jf("id",t.name+"Options"),Vd(),lm(t.name),Vd(3),zh("ngIf",t.minSelect>=1&&n.isMinSelectSatisfied(t)),Vd(),zh("ngIf",t.minSelect>=1&&!n.isMinSelectSatisfied(t)),Vd(),zh("ngIf",t.minSelect&&t.maxSelect&&t.minSelect>0&&t.maxSelect>0&&t.minSelect===t.maxSelect||t.minSelect&&t.maxSelect&&t.minSelect!==t.maxSelect&&t.minSelect>=1&&t.maxSelect>1||1===t.minSelect&&!t.maxSelect),Vd(),zh("ngIf",!t.minSelect&&!t.maxSelect||(!t.minSelect||0===t.minSelect)&&t.maxSelect>=1),Vd(),zh("ngIf",!(!t.minSelect&&!t.maxSelect)),Vd(2),zh("ngIf",t.minSelect&&t.maxSelect&&t.minSelect>0&&t.maxSelect>0&&t.minSelect===t.maxSelect),Vd(),zh("ngIf",t.minSelect&&t.maxSelect&&t.minSelect!==t.maxSelect&&t.minSelect>=1&&t.maxSelect>1||1===t.minSelect&&!t.maxSelect),Vd(),zh("ngIf",(!t.minSelect||0===t.minSelect)&&t.maxSelect>=1),Vd(2),zh("ngIf",t.minSelect>=1&&n.isMinSelectSatisfied(t)),Vd(),zh("ngIf",t.minSelect>=1&&!n.isMinSelectSatisfied(t)),Vd(),zh("ngIf",t.minSelect&&t.maxSelect&&t.minSelect>0&&t.maxSelect>0&&t.minSelect===t.maxSelect),Vd(),zh("ngIf",t.minSelect&&t.maxSelect&&t.minSelect!==t.maxSelect&&t.minSelect>=1&&t.maxSelect>1),Vd(),zh("ngIf",(!t.minSelect||0===t.minSelect)&&t.maxSelect>=1),Vd(),zh("ngIf",1===t.minSelect&&!t.maxSelect),Vd(),zh("ngIf",!t.minSelect&&!t.maxSelect||0===t.minSelect&&0===t.maxSelect),Vd(),gh("aria-labelledby",t.name+"Options"),V
1d(),zh("ngForOf",t.options)}}function pSe(e,t){if(1&e&&(Ef(0),ph(1,uSe,24,22,"div",32),Df()),2&e){let e=t.$implicit;Vd(),zh("ngIf",null==e||null==e.options?null:e.options.length)}}function hSe(e,t){1&e&&(kf(0,"div",52),Tf(1,"span",53),kf(2,"span",54),am(3,"Maximum character limit reached"),xf()())}function fSe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"div",7),am(6,"Customize"),xf()(),kf(7,"div",8)(8,"div",9),Tf(9,"img",10),xf(),kf(10,"div",11)(11,"div",12),am(12),xf(),kf(13,"p",13),am(14),xf()()(),Tf(15,"hr",14),ph(16,pSe,2,1,"ng-container",15),kf(17,"div",16)(18,"div",17),am(19,"Preferences"),xf(),kf(20,"div",18)(21,"label",19),am(22,"Optional"),xf()(),kf(23,"div",20)(24,"textarea",21,1),jf("input",(function(){Wa(e);let t=sm(25);return Ha(Yf().updateChar(t.value))})),xf(),kf(26,"label",22),am(27,"Add note here"),xf(),ph(28,hSe,4,0,"div",23),kf(29,"span",24),am(30),xf(),kf(31,"span",25),am(32),xf()()()(),kf(33,"div",26)(34,"div")(35,"span",27),am(36,"Estimated total"),xf(),kf(37,"span",28),am(38),qm(39,"currency"),xf()(),kf(40,"div",29)(41,"quantity-stepper-al-v2",30),jf("qtyStepperExpandEmitter",(function(t){return Wa(e),Ha(Yf().getUpdatedQty(t))})),xf(),kf(42,"quantity-stepper-al-v2",31),jf("qtyStepperInfoEmitter",(function(){return Wa(e),Ha(Yf().scrollToFirstMissingCustomization())})),xf()()()()(),Df()}if(2&e){let e=Yf();Vd(9),Jf("alt",e.product.name),gh("src",e.product.imageUrl+"?$grid-product-card-mobile$&defaultImage=Not_Available",id),Vd(3),lm(e.product.name),Vd(2),lm(e.productDescription),Vd(2),zh("ngForOf",e.product.modifiers),Vd(8),zh("value",e.preferencesText),Vd(2),zh("ngClass",Om(22,V_e,120===e.preferencesText.length)),Vd(2),zh("ngIf",120===e.preferencesText.length),Vd(2),cm(" ",e.preferencesText.length,"/120 "),Vd(2),cm(" ",e.preferencesText.length," out of 120 characters used "),Vd(6),lm(jm(39,19,e.estimatedPrice,"USD")),Vd(3),zh("product",e.clonedProduct)("configObj",e.configObj)("calledBy","qtyStepperExpand")("qtyStepperOptions",e.qtyStepperOptions),Vd(),zh("product",e.product)("c
1onfigObj",e.configObj)("calledBy","customize-drawer")("qtyStepperOptions",e.qtyStepperOptions)}}function mSe(e,t){if(1&e&&(kf(0,"span",63),am(1),xf()),2&e){let e=Yf().option;Vd(),cm("",e.baseCalories," cal")}}function gSe(e,t){1&e&&(kf(0,"span",64),am(1,"(not SNAP eligible)"),xf())}function bSe(e,t){if(1&e){let e=Mf();kf(0,"span")(1,"quantity-stepper-simple-al-v1",65),jf("qtyStepperInfoEmitter",(function(t){Wa(e);let i=Yf(),n=i.modifier,r=i.option;return Ha(Yf().handleQuantityChange(n,r,t))})),xf()()}if(2&e){let e=Yf(),t=e.modifier,i=e.option;Vd(),zh("modifier",t)("option",i)}}function ySe(e,t){1&e&&(kf(0,"span",66),am(1,"Out of stock"),xf())}function vSe(e,t){if(1&e&&(kf(0,"span",67),am(1),xf()),2&e){let e=Yf().option,t=Yf();Vd(),cm(" +",t.getOptionPriceDisplay(e)," ")}}function wSe(e,t){if(1&e){let e=Mf();kf(0,"label",55)(1,"input",56),jf("change",(function(t){let i=Wa(e),n=i.modifier,r=i.option;return Ha(Yf().onOptionSelect(n,r,t))})),xf(),kf(2,"span",57)(3,"span",58),am(4),xf(),ph(5,mSe,2,1,"span",59)(6,gSe,2,0,"span",60)(7,bSe,2,2,"span",2)(8,ySe,2,0,"span",61)(9,vSe,2,1,"span",62),xf()()}if(2&e){let e=t.option.isOOS,i=t.modifier,n=t.option,r=t.index,s=Yf();zh("ngClass",Om(17,z_e,r%2==0)),gh("for",i.name+"Option"+r),Vd(),Jf("type","radio"===i.controlType?"radio":"checkbox"),zh("disabled",e||"radio"!==i.controlType&&i.maxSelect&&!n.isSelected&&s.getTotalSelectedQtyForModifier(i))("checked",n.isSelected),gh("aria-checked",n.isSelected)("name",i.name+"Options")("id",i.name+"Option"+r)("data-upc-id",n.upcId)("aria-label",s.getOptionAriaLabel(i,n,r,e)),Vd(),zh("ngClass",Om(19,W_e,e||"radio"!==i.controlType&&i.maxSelect&&!n.isSelected&&s.getTotalSelectedQtyForModifier(i))),Vd(2),lm(n.name),Vd(),zh("ngIf",n.baseCalories),Vd(),zh("ngIf","hot"===(null==n.temperature?null:n.temperature.toLowerCase())),Vd(),zh("ngIf",i.stepperEnabled&&n.isSelected&&s.isCateringEnabled&&1!==i.maxSelect&&!(null!=n.name&&n.name.startsWith("No"))),Vd(),zh("ngIf",e),Vd(),zh("ngIf",n.price)}}var _Se=(()=>{class e{constructor(e,t,i,n,r,s){this.elementRef=e,this.commonService=t,this.cutomizeAlV1service=i,this.cartService=n,this.cartV2Service=r,this._aemService=s,this.productDescription="",this.productQty=1,this.selectedModifierAndOptions={},this.preferencesText="",this.qtyStepperOptions={ctaLabel:"Add to cart",quantity:1,modifierOptionUPCs:{isValid:!1,upcs:[]},isCustomizationEditFlow:!1,customizationEditSource:"",comments:"",isValid:!1,options:[]},this.isCartEditFlow=!1,this.cartDataProcessed=!1,this.debounceUpdateEstimation=this.commonService.debounce(this.updateEstimation,600).bind(this)}ngOnInit(){this.isCateringEnabled=!this._aemService.getFeatureFlagByNameDisable("isCateringDisabled"),this.clonedProduct=this.commonService.cloneDeep(this.product),this.product?.productDetail?.details?.length>0&&this.product?.productDetail?.details.forEach((e=>{e.header.includes("Details")&&(this.productDescription=e.value)})),this.analyticsTrackCustomize(),this.estimatedPrice=this.commonService.getValidProductPrice(this.product),this.product.modifiers=this.product?.modifiers?.sort(((e,t)=>e.sortId-t.sortId)),this.initSelectedModifierAndOptions(),this.updateCustomizationDataFromLocalIfExists()}initSelectedModifierAndOptions(){if("edit"===this.customizationDetails?.flowType)if("BIA"===this.customizationDetails?.src){let e=[];e=this.isCateringEnabled&&this.product?.previousCustomizations?.length>0?this.product.previousCustomizations.map((e=>({upcId:e.option,qty:e.quantity}))):this.product?.selectedCustomizations?.length>0?this.product.selectedCustomizations:[],e.length>0&&!this.commonService.customizationData().isUpdated&&this.commonService.updateCustomizationData({productId:this.product.id,selectedOptions:e,comments:this.product?.preferences})}else{let e=this.cartV2Service.getCartName(this.configObj?.programType),t=this.commonService.currentCartObj;t=t.pipe(bi((t=>this.cartV2Service.fetchCartDetailsFromResponse(t,e)))),this.isCartEditFlow=!0,t.subscribe((e=>{if(!this.cartDataProcessed&&!this.commonService.isEmpty(e)){this.cartDataProcessed=!0;let t=e.cartItems?.find((e=>
1e.itemId==this.product.id&&e.entryId==this.customizationDetails?.entryId));if(!this.commonService.isEmpty(t)){this.qtyStepperOptions.ctaLabel="Update",this.qtyStepperOptions.isCustomizationEditFlow=!0,this.qtyStepperOptions.customizationEditSource=this.customizationDetails?.src,this.qtyStepperOptions.entryId=t?.entryId;let e=this.isCateringEnabled?t?.options?.map((e=>{let t=this.getModifierByOptionUpcId(e.upcId)?"number"==typeof e.qty?e.qty:e.isSelected?1:0:0;return{upcId:e.upcId||"",qty:t}})):t?.options?.map((e=>e.upcId||this.setInitialSelectedModifierAndOptions()));this.commonService.updateCustomizationData({productId:this.product.id,selectedOptions:e,selectedQuantity:this.cutomizeAlV1service.isLBProduct(this.product)?t?.selectedWeight:t?.qty??t?.quantity,comments:t?.comments}),this.updateCustomizationDataFromLocalIfExists()}}}))}}updateCustomizationDataFromLocalIfExists(){this.isCartEditFlow&&!this.cartDataProcessed||(this.commonService.customizationData().isUpdated&&this.commonService.customizationData().productId===this.product.id?(this.commonService.customizationData().selectedOptions?.length?this.selectedModifierAndOptions=this.cutomizeAlV1service.getPreSelectedModifierAndOptions(this.product?.modifiers,this.commonService.customizationData().selectedOptions):this.setInitialSelectedModifierAndOptions(),this.commonService.customizationData().selectedQuantity?this.setProductQty(this.commonService.customizationData().selectedQuantity):this.setProductQty(this.cutomizeAlV1service.isLBProduct(this.product)?this.product.incrementPriceList?.[0]?.weight:1),this.commonService.customizationData().comments&&this.setPreferencesText(this.commonService.customizationData().comments)):(this.setInitialSelectedModifierAndOptions(),this.setProductQty(this.cutomizeAlV1service.isLBProduct(this.product)?this.product.incrementPriceList?.[0]?.weight:1)),this.updateQtySteppermodifierOptionUPCs(),this.updateEstimation())}updateEstimation(){let e=(this.cutomizeAlV1service.getAllModifierSelectedOptions(this.selectedModifierAndOptions)||[]).map((e=>{let t=this.getModifierByOptionUpcId(e.upcId),i="number"==typeof e.qty?e.qty:1,n={id:e.upcId??"",price:(e.price??0).toString()};return this.isCateringEnabled&&t&&t.stepperEnabled&&i>0&&(n.quantity=i),n})),t={bpn:this.product.id,price:this.cutomizeAlV1service.getItemPrice(this.product,this.productQty),quantity:this.getProductQtyForPriceEstimation(),selectedModifiers:e};this.cutomizeAlV1service.getEstimatedTotal(t).subscribe({next:e=>{this.estimatedPrice=e.estimatedPrice},error:e=>{this.calculateClientSideEstimation()}})}getProductQtyForPriceEstimation(){return this.cutomizeAlV1service.isLBProduct(this.product)?1:this.productQty}getUpdatedQty(e){this.commonService.updateCustomizationData({productId:this.product.id,selectedQuantity:e}),this.setProductQty(e),this.debounceUpdateEstimation()}setProductQty(e){this.productQty=e,this.qtyStepperOptions.quantity=e}calculateClientSideEstimation(){let e=this.cutomizeAlV1service.getAllModifierSelectedOptions(this.selectedModifierAndOptions)||[],t=0;t=this.isCateringEnabled?e.reduce(((e,t)=>{this.getModifierByOptionUpcId(t.upcId);let i="number"==typeof t.qty?t.qty:1;return e+(t.price||0)*i}),0):e.reduce(((e,t)=>e+(t.price||0)),0),this.estimatedPrice=this.getProductQtyForPriceEstimation()*(+this.cutomizeAlV1service.getItemPrice(this.product,this.productQty)+t)}updateChar(e){this.commonService.updateCustomizationData({productId:this.product.id,comments:e}),this.setPreferencesText(e)}setPreferencesText(e){this.preferencesText=e,this.qtyStepperOptions.comments=e}scrollToFirstMissingCustomization(){let e=this.elementRef.nativeElement.querySelectorAll(".svg-caution")[0]?.closest(".customize-selection");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}getModifierSelectionType(e){if(!this.commonService.isEmpty(e))switch(!0){case 1===e.minSelect&&1===e.maxSelect:return"single";case!e.minSelect&&!e.maxSelect||0===e.minSelect&&0===e.maxSelect:return"optional";default:return"multi"}return""}onOptionSelect(e,t,i){let n=this.isCateringEnabled&&e?.stepperEnabled;t?.deSelect&&(delete t.deSelect,t.isSelected=!1,n&&(t.qty=0)),t.isSelected=!t.isSelected,n&&(t.qty=t.isSelected?1:0);let r="single"===this.getModifierSelectionType(e),s="multi"===this.getModifierSelectionType(e),a="optional"===this.getModifierSelectionType(e),o=t.name?.startsWith("No"),l=this.selectedModifierAndOptions[e.name]||[];if(o)l.forEach((e=>{e.upcId!==t.upcId&&(e.isSelected=!1,n&&(e.qty=0))})),t.isSelected?(this.selectedModifierAndOptions[e.name]=[t],n&&(t.qty=0),this.updateSelectedOptionsAndSync(e,t,0)):(this.selectedModifierAndOptions[e.name]=[],this.updateSelectedOptionsAndSync(e,t,0)),l.some((e=>e.price>0))&&this.debounceUpdateEstimation();else{if(r)l[0]&&(l[0].isSelected=!1,n&&(l[0].qty=0)),delete this.selectedModifierAndOptions[e.name],this.updateSelectedOptionsAndSync(e,t,1);else if(s||a){let r=l.findIndex((e=>e.upcId===t.upcId)),s=i.target.checked;if(s&&-1===r){let r=0;for(let e of l)r+="number"==typeof e.qty?e.qty:e.isSelected?1:0;if(a||!e.maxSelect||(n?r:l.length)<e.maxSelect)this.updateSelectedOptionsAndSync(e,t,1);else if(i.target.checked=!1,t.isSelected=!1,t.price>0)return}else!s&&-1!==r&&this.updateSelectedOptionsAndSync(e,t,0);let o=this.selectedModifierAndOptions?.[e.name]?.findIndex((e=>e?.name?.startsWith("No")));if(-1!==o){let t=this.selectedModifierAndOptions[e.name][o];t.isSelected=!1,n&&(t.qty=0),this.selectedModifierAndOptions[e.name].splice(o,1)}}(t?.price>0||r&&l.some((e=>e.price>0)))&&this.debounceUpdateEstimation()}}updateSelectedOptionsAndSync(e,t,i){let n=this.isCateringEnabled&&e?.stepperEnabled,r=this.selectedModifierAndOptions[e.name]||[],s=r.findIndex((e=>e.upcId===t.upcId)),a=t.name?.startsWith("No");i<=0?(t.isSelected=!1,n&&(t.qty=0),s>-1&&(a?(t.isSelected=!0,n&&(t.qty=0),r[s]=t):r.splice(s,1),0===r.length?delete this.selectedModifierAndOptions[e.name]:this.selectedModifierAndOptions[e.name]=r)):(t.isSelected=!0,n?(t.qty=i,s>-1?r[s].qty=i:r.push(t)):r.push(t),this.selectedModifierAndOptions[e.name]=r),this.updateQtySteppermodifierOptionUPCs(),t.price>0&&this.debounceUpdateEstimation();let o=this.cutomizeAlV1service.getAllModifierSelectedOptions(this.selectedModifierAndOptions),l=this.isCateringEnabled?o.map((e=>{let t=this.getModifierByOptionUpcId(e.upcId)?"number"==typeof e.qty?e.qty:e.isSelected?1:0:0;return{upcId:e.upcId||"",qty:t}})):o.map((e=>e.upcId||""));this.commonService.updateCustomizationData({productId:this.product.id,selectedOptions:l})}setInitialSelectedModifierAndOptions(){if(this.selectedModifierAndOptions=this.cutomizeAlV1service.getInitialSelectedModifierAndOptions(this.product?.modifiers),!this.commonService.customizationData().isUpdated){let e=this.cutomizeAlV1service.getAllModifierSelectedOptions(this.selectedModifierAndOptions),t=this.isCateringEnabled?e.map((e=>{let t=this.getModifierByOptionUpcId(e.upcId)?"number"==typeof e.qty?e.qty:e.isSelected?1:0:0;return{upcId:e.upcId||"",qty:t}})):e.map((e=>e.upcId||""));this.commonService.updateCustomizationData({productId:this.product.id,selectedOptions:t})}}updateQtySteppermodifierOptionUPCs(){let e=this.cutomizeAlV1service.getAllModifierSelectedOptions(this.selectedModifierAndOptions);this.isCateringEnabled?(this.qtyStepperOptions.options=e.map((e=>e.qty>0?{upcId:e.upcId||"",qty:e.qty}:{upcId:e.upcId||""})),this.qtyStepperOptions.isValid=this.cutomizeAlV1service.isValidSelections(this.product?.modifiers,this.selectedModifierAndOptions)):this.qtyStepperOptions.modifierOptionUPCs={isValid:this.cutomizeAlV1service.isValidSelections(this.product?.modifiers,this.selectedModifierAndOptions),upcs:e.map((e=>e.upcId||""))}}analyticsTrackCustomize(){window.AB?.DATALAYER&&(window.AB.DATALAYER.productInfo(this.product),window.AB.DATALAYER.setModalViewEvents("deli:customize-item|view"))}handleQuantityChange(e,t,i){this.isCateringEnabled&&this.updateSelectedOptionsAndSync(e,t,i)}getModifierByOptionUpcId(e){return this.product?.modifiers?this.product.modifiers.find((t=>t.options?.some((t=>t.upcId===e)))):null}getOptionPriceDisplay(e){return e?this.isCateringEnabled&&e.qty>
10?(e.price*e.qty).toLocaleString("en-US",{style:"currency",currency:"USD"}):e.price.toLocaleString("en-US",{style:"currency",currency:"USD"}):""}getOptionAriaLabel(e,t,i,n){return this.isCateringEnabled&&e.stepperEnabled?t.qty&&t.qty>0||t.isSelected?t.qty+" "+(1===t.qty?"unit of ":"units of ")+(t?.name||"")+" "+("hot"===t?.temperature?.toLowerCase()?" (not SNAP eligible) ":"")+(t.baseCalories?t.baseCalories+" Calories ":"")+(t.price?(t.price*t.qty).toLocaleString("en-US",{style:"currency",currency:"USD"})+" More for each topping ":"")+(i+1)+" of "+(e?.options?.length||0)+(n?" Out of stock":""):(t?.name||"")+" "+("hot"===t?.temperature?.toLowerCase()?" (not SNAP eligible) ":"")+(t.baseCalories?t.baseCalories+" Calories ":"")+(t.price?t.price.toLocaleString("en-US",{style:"currency",currency:"USD"})+" More for each topping ":"")+(i+1)+" of "+(e?.options?.length||0)+" items"+(n?" Out of stock":""):(t?.name||"")+" "+("hot"===t?.temperature?.toLowerCase()?" (not SNAP eligible) ":"")+(t.baseCalories?t.baseCalories+" Calories ":"")+(t.price?t.price.toLocaleString("en-US",{style:"currency",currency:"USD"})+" More for each topping ":"")+(n?" Out of stock":"")}getTotalSelectedQtyForModifier(e){if(!e?.options)return!1;let t=this.commonService.customizationData();return this.commonService.isMaxQuantityReachedForModifier(e,t.selectedOptions)}isMinSelectSatisfied(e){return this.isCateringEnabled&&e.stepperEnabled?this.commonService.isMinSelectSatisfied(e,this.commonService.customizationData().selectedOptions):this.selectedModifierAndOptions[e.name]?.length>=e.minSelect}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Bw),$d(U_e),$d(Rw),$d(Mw),$d(Cw))}}static{this.ɵcmp=Qr({type:e,selectors:[["customize-product-al-v1"]],inputs:{product:"product",configObj:"configObj",customizationDetails:"customizationDetails"},decls:3,vars:1,consts:[["optionTemplate",""],["preferencesTextArea",""],[4,"ngIf"],["tabindex","-1",1,"rd","rd-customization","fixed-top","collapse","h-100","show"],[1,"rd__cont","rd__cont--customization","background-color-neutral-100","h-100"],[1,"rd__cont--customization__body","pt-4"],[1,"d-flex"],["role","heading","aria-level","1",1,"heading-s-b","rd__cont--customization__title"],[1,"customize-product","d-flex","flex-column","flex-sm-row"],[1,"align-self-center","mb-3","mb-sm-0"],[1,"customize-product__img",3,"alt"],[1,"customize-product__info-section"],["role","heading","aria-level","2",1,"heading-s","mb-2"],[1,"text-m","customize-product__info-section__desc","mb-0"],[1,"rd__cont--customization__divider"],[4,"ngFor","ngForOf"],[1,"customize-selection"],["role","heading","aria-level","2",1,"title-sm","font-weight-bold"],[1,"mt-2","mb-0"],["for","specialInstructions",1,"body-text-sm","align-middle","customize-selection__select-text"],[1,"pds-input-field-group","mt-4","m-0"],["id","specialInstructions","maxlength","120","placeholder","Add note here","aria-label","Preferences, optional multiline",1,"pds-input-field-form-control","pds-input-field-textarea",3,"input","value"],["for","specialInstructions",1,"text-l","pds-input-field-group--label","pds-input-field-textarea",3,"ngClass"],["class","pds-input-field-error-group d-flex mt-1",4,"ngIf"],["aria-hidden","true",1,"pds-input-field-counter","float-right","mt-1","mr-3","text-s"],["aria-live","polite",1,"sr-only"],[1,"pt-3","pb-4","px-4","rd__cont--customization__footer"],[1,"body-text","rd__cont--customization__footer__est-text"],[1,"body-text","font-weight-bold","float-right","rd__cont--customization__footer__price"],[1,"d-flex","justify-content-between","mt-3","rd__cont--customization__footer__btn-container"],[1,"w-100",3,"qtyStepperExpandEmitter","product","configObj","calledBy","qtyStepperOptions"],[1,"w-100",3,"qtyStepperInfoEmitter","product","configObj","calledBy","qtyStepperOptions"],["class","customize-selection",3,"ngClass",4,"ngIf"],[1,"customize-selection",3,"ngClass"],["role","heading","aria-level","2",1,"title-sm","font-weight-bold",3,"id"],[1,"d-flex","align-items-center"],["aria-hidden","true","class","svg-icon svg-checkedSucces customize-selection__icon--success mr-1",4,"ngIf"],["aria-hidden","true","class","svg-icon svg-caution customize-selection__icon mr-1",4,"ngIf"],["aria-hidden","true","class","body-text-sm",3,"ngClass",4,"ngIf"],["class","body-text-sm customize-selection__select-text","aria-hidden","true",4,"ngIf"],["aria-hidden","true","class","svg-icon svg-bullet-dot customize-selection__bullet-dot",4,"ngIf"],["aria-hidden","true",1,"body-text-sm","customize-selection__select-text"],["aria-hidden","false",1,"sr-only"],["role","group",1,"customize-selection__options","mt-4","m-0","row","m-0","mb-3"],["aria-hidden","true",1,"svg-icon","svg-checkedSucces","customize-selection__icon--success","mr-1"],["aria-hidden","true",1,"svg-icon","svg-caution","customize-selection__icon","mr-1"],["aria-hidden","true",1,"body-text-sm",3,"ngClass"],["aria-hidden","true",1,"svg-icon","svg-bullet-dot","customize-selection__bullet-dot"],["data-qa","cstm_slct_min_cnt"],["data-qa","cstm_slct_max_cnt",4,"ngIf"],["data-qa","cstm_slct_max_cnt"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pds-input-field-error-group","d-flex","mt-1"],[1,"pds-svg-error-icon","float-left","ml-3","mr-1"],[1,"text-s","pds-input-field-error-message"],[1,"col-12","col-md-6","mb-0","d-block","p-0","customize-selection__options__label",3,"ngClass"],[1,"m-0","p-0",3,"change","disabled","checked","type"],[1,"customize-selection__options__opt","d-flex","align-items-center",3,"ngClass"],["aria-hidden","true",1,"text-l","customize-selection__options__opt__value"],["class","text-s ml-2 customize-selection__options__opt__cal","aria-hidden","true",4,"ngIf"],["class","text-l-sb--info ml-2","aria-hidden","true",4,"ngIf"],["class","text-s-sb ml-2 customize-selection__options__opt__oos-msg","aria-hidden","true",4,"ngIf"],["class","body-text ml-auto pl-2 customize-selection__options__opt__price","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"text-s","ml-2","customize-selection__options__opt__cal"],["aria-hidden","true",1,"text-l-sb--info","ml-2"],[1,"ml-auto",3,"qtyStepperInfoEmitter","modifier","option"],["aria-hidden","true",1,"text-s-sb","ml-2","customize-selection__options__opt__oos-msg"],["aria-hidden","true",1,"body-text","ml-auto","pl-2","customize-selection__options__opt__price"]],template:function(e,t){1&e&&ph(0,fSe,43,24,"ng-container",2)(1,wSe,10,21,"ng-template",null,0,Wm),2&e&&zh("ngIf",t.product)},dependencies:[sy,oy,cy,by,Noe,Voe,By],encapsulation:2})}}return e})(),SSe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[_Se,U_e],imports:[Ly,qoe]})}}return e}
1)(),CSe=["rightDrawerContainer"],ISe=["miniCartV2"],ASe=["offerDetailV2"],kSe=["couponList"],xSe=["bogoDetail"],TSe=["substitutionList"],PSe=["ndcOfferDetail"],ESe=["customizeDrawer"],DSe=["prebookSlot"],OSe=e=>({"p-0":e});function BSe(e,t){1&e&&(kf(0,"p",13),am(1,"Qualifying Product(s)"),xf())}function MSe(e,t){if(1&e){let e=Mf();kf(0,"div",8)(1,"offer-detail-al-v1",9),jf("backtoTriggeredComponent",(function(t){return Wa(e),Ha(Yf().loadTriggeredComponent(t))})),xf(),kf(2,"div",10),ph(3,BSe,2,0,"p",11),Tf(4,"offer-qualified-products-al-v1",12),xf()()}if(2&e){let e=Yf();zh("ngClass",Om(11,OSe,e.isBXGYEligibleOffer)),Vd(),zh("offer",e.coupon)("product",e.product)("TriggerElement",e.detailsDrawerTriggeredComponent)("configObj",e.configObj)("isBXGYEligibleOffer",e.isBXGYEligibleOffer),Vd(2),zh("ngIf",!e.isBXGYEligibleOffer||!e.upcList.length||!e.eligibleUpcList.length),Vd(),zh("dataValue",e.dataValue)("offer",e.coupon)("isBXGYEligibleOffer",e.isBXGYEligibleOffer)("configObj",e.configObj)}}function RSe(e,t){if(1&e&&Tf(0,"coupon-list-al-v1",14),2&e){let e=Yf();zh("couponListData",e.couponListData)("configObj",e.configObj)}}function LSe(e,t){if(1&e){let e=Mf();kf(0,"div",15)(1,"offer-detail-al-v1",16),jf("backtoTriggeredComponent",(function(t){return Wa(e),Ha(Yf().loadTriggeredComponent(t))})),xf(),kf(2,"div",10)(3,"p",17),am(4,"Qualifying Product(s)"),xf(),Tf(5,"offer-qualified-products-al-v1",18),xf()()}if(2&e){let e=Yf();Vd(),zh("product",e.product)("TriggerElement",e.detailsDrawerTriggeredComponent)("configObj",e.configObj),Vd(4),zh("dataValue",e.dataValue)("configObj",e.configObj)("staticProducts",e.productList)}}function FSe(e,t){if(1&e&&(kf(0,"div",15),Tf(1,"ndc-offer-detail-al-v1",19),kf(2,"div",10)(3,"p",17),am(4,"Eligible Items"),xf(),Tf(5,"offer-qualified-products-al-v1",20),xf()()),2&e){let e=Yf();Vd(),zh("offer",e.coupon)("TriggerElement",e.detailsDrawerTriggeredComponent),Vd(4),zh("dataValue",e.dataValue)("configObj",e.configObj)}}function NSe(e,t){if(1&e&&Tf(0,"customize-product-al-v1",21),2&e){let e=Yf();
1zh("product",e.product)("configObj",e.configObj)("customizationDetails",e.customizationDetails)}}function USe(e,t){if(1&e&&Tf(0,"quantity-stepper-al-v2",22),2&e){let e=Yf();zh("product",e.product)("hideCTA",!0)("calledBy","prebook-slot-drawer")("configObj",e.configObj)("qtyStepperOptions",e.qtyStepperOptions)}}function VSe(e,t){1&e&&(kf(0,"div",23)(1,"div",24)(2,"div",25)(3,"div",26),Tf(4,"div",27),xf()()()())}var qSe=(()=>{class e{constructor(e,t,i,n,r,s,a){this.zone=e,this._commonService=t,this.elementRef=i,this.renderer=n,this._aemService=r,this._userInfoService=s,this._cartService=a,this.calledBy="right-drawer",this.couponListData={},this.dataValue="",this.gridSource="drawer",this.renderingComponent="",this.productList=[],this.coupon={},this.showSpinner=!1,this.isBXGYEligibleOffer=!1,this.upcList=[],this.eligibleUpcList=[],this.detailsDrawerTriggeredComponent="",this.customizationDetails={},this.closeDrawer=function(){let e=this;e.sidebar.removeClass(e.sidebarToggleClass),e.sidebar.removeClass("sidebar__ada-flag"),e.sidebar.hasClass(e.rightDrawerClass)&&e.sidebar.removeClass(e.rightDrawerClass),e.backdrop.is(":visible")&&e.backdrop.hide(),e.signInLabelCaretDown.hasClass(e.signInLabelCaretUp)&&e.signInLabelCaretDown.removeClass(e.signInLabelCaretUp),1==e.mobileHamBtn.hasClass("activeMenu")&&e.mobileHamBtn.removeClass("activeMenu"),setTimeout((()=>{e.sidebarWrapper.hide()}),300),$("body").hasClass("modal-open")&&$("body").removeClass("modal-open"),$(e.myAccountLinkButton).attr("aria-expanded","false")},this.openRightFlyout=function(e,t,i){let n=$(".sidebar-right-drawer .mini-cart"),r=document.activeElement,s=this,a=function(){s.sidebarWrapper.show(),s.myaccount.hide(),s.rightDrawer.show(),s.sidebar.addClass(s.sidebarToggleClass),s.sidebar.addClass(s.rightDrawerClass),s.handleFocusADA()};switch(function(){let e=$(".myAccount-flyout-backdrop, .sidebar__user-welcome__close, .sidebar__user-signInLinks__close, .right-drawer__close, .substitution-list__close, .menu-nav__mobile-menu-trigger .menu-nav__icon-container");null!==e&&e.length>0&&e.on("click",(function(e){s.sidebar.removeClass(s.sidebarToggleClass),s.sidebar.removeClass("sidebar__ada-flag"),s.sidebar.hasClass(s.rightDrawerClass)&&s.sidebar.removeClass(s.rightDrawerClass),s.backdrop.is(":visible")&&s.backdrop.hide(),s.signInLabelCaretDown.hasClass(s.signInLabelCaretUp)&&s.signInLabelCaretDown.removeClass(s.signInLabelCaretUp),1==s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.removeClass("activeMenu"),setTimeout((()=>{s.sidebarWrapper.hide()}),300),$("body").hasClass("modal-open")&&$("body").removeClass("modal-open"),$(s.myAccountLinkButton).attr("aria-expanded","false"),s.sidebar.attr("aria-label",""),null!=r&&r?.focus(),$(".root").children().children().not(":first").removeAttr("aria-hidden"),$(".reserve-nav").removeAttr("aria-hidden")}))}(),e){case"my-account":s.sidebar.hasClass(s.sidebarToggleClass)&&1==s.rightDrawer.is(":visible")?(s.rightDrawer.hide(),s.myaccount.show(),s.backdrop.show(),s.sidebar.removeClass(s.rightDrawerClass),s.signInLabelCaretDown.addClass(s.signInLabelCaretUp),s.sidebar.attr("aria-label","Account options"),s.mobileHamBtn.attr("aria-label","close account menu"),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setB2BModalEvent("modalView","account_rightnavigation|view")):s.sidebar.hasClass(s.sidebarToggleClass)&&0==s.rightDrawer.is(":visible")?(s.sidebar.removeClass(s.sidebarToggleClass),setTimeout((()=>{s.sidebarWrapper.hide()}),300),s.backdrop.hide(),s.mobileHamBtn.removeClass("activeMenu"),s.signInLabelCaretDown.removeClass(s.signInLabelCaretUp),s.sidebar.attr("aria-label","")):(s.sidebarWrapper.show(),s.rightDrawer.hide(),s.myaccount.show(),s.backdrop.show(),s.sidebar.addClass(s.sidebarToggleClass),s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.signInLabelCaretDown.addClass(s.signInLabelCaretUp),s.sidebar.attr("aria-label","Account options"),s.mobileHamBtn.attr("aria-label","close account menu"),window.AB&&window.AB.DATALAYER&&window.AB.DATALAYER.setB2BModalEvent("modalView","account_rightnavigation|view"));break;case"mini-cart":!s.sidebar.hasClass(s.sidebarToggleClass)||1!=s.myaccount.is(":visible")&&null!==n?s.sidebar.hasClass(s.sidebarToggleClass)&&null!==n?(s.closeDrawer(),s.backdrop.hide(),s.mobileHamBtn.removeClass(s.mobileHamCloseBtnClass),s.sidebar.attr("aria-label",""),s.mobileHamBtn.attr("aria-label","Navigation menu")):(s.callAngMinicartComp(),s.openDrawer(),s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.sidebar.attr("aria-label","Shopping cart"),s.sidebarShoppingCartClose.attr("aria-label","close Shopping cart"),s.mobileHamBtn.attr("aria-label","close Shopping cart"),s._modalShowADA()):(s.
1callAngMinicartComp(),s.myaccount.hide(),s.rightDrawer.show(),s.sidebar.addClass(s.rightDrawerClass),s.backdrop.hide(),s.handleFocus(),s.signInLabelCaretDown.removeClass(s.signInLabelCaretUp),s.sidebar.attr("aria-label","Shopping cart"),s.sidebarShoppingCartClose.attr("aria-label","close Shopping cart"),s.mobileHamBtn.attr("aria-label","close Shopping cart"),s._modalShowADA());break;case"multiple-coupon":s.sidebar.hasClass(s.sidebarToggleClass)||a(),!1===s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.sidebar.attr("aria-label","coupons list"),s.handleFocusADA(),s.sidebarShoppingCartClose.attr("aria-label","close coupons list"),s.mobileHamBtn.attr("aria-label","close coupons list"),this.modalShowADA();break;case"single-coupon":s.sidebar.hasClass(s.sidebarToggleClass)||a(),0==s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.handleFocusADA(),s.sidebar.attr("aria-label","offer details"),s.sidebarShoppingCartClose.attr("aria-label","close offer details"),s.mobileHamBtn.attr("aria-label","close offer details"),s.modalShowADA();break;case"coupon-list":s.callAngCouponComp(e,t,i),s.sidebar.hasClass(s.sidebarToggleClass)||a(),0==s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.sidebar.attr("aria-label","coupons list"),s.handleFocusADA(),s.sidebarShoppingCartClose.attr("aria-label","close coupons list"),s.mobileHamBtn.attr("aria-label","close coupons list"),s.modalShowADA();break;case"offer-detail":case"bogo-detail":s.callAngCouponComp(e,t,i),s.sidebar.hasClass(s.sidebarToggleClass)||a(),!1===s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.handleFocus(),s.sidebar.attr("aria-label","offer details"),s.sidebarShoppingCartClose.attr("aria-label","close offer details"),s.mobileHamBtn.attr("aria-label","close offer details"),s.modalShowADA();break;case"substitution-list":s.sidebar.hasClass(s.sidebarToggleClass)||a(),!1===s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.handleFocus(),s.sidebar.attr("aria-label","substitution list"),s.sidebarShoppingCartClose.attr("aria-label","close substitution list"),s.mobileHamBtn.attr("aria-label","close substitution list");break;case"customize-drawer":case"prebook-slot":s.sidebar.hasClass(s.sidebarToggleClass)||a(),!1===s.mobileHamBtn.hasClass("activeMenu")&&s.mobileHamBtn.addClass(s.mobileHamCloseBtnClass),s.sidebar.attr("aria-label","customize"),s.sidebarShoppingCartClose.attr("aria-label","close customize"),s.mobileHamBtn.attr("aria-label","close customize"),s.modalShowADA()}},this.modalShowADA=function(){if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){let e=".menu-nav__mobile-menu-trigger",t="aria-hidden",i=".unified-header-v2",n=".header-version-2,.header-version-4",r=".menu-nav",s=$("secondary-bar")?".s_nav_fulfillment":".menu-nav__wrapper",a=".menu-nav__content",o=".myaccount-flyout-wrapper",l=".sidebar__right-drawer",c=".sidebar-right-drawer",d="global-header",u=".secondary-bar-proxy",p=".experiencefragment";$(i).siblings().attr(t,!0),$(n).siblings().attr(t,!0),$(r).siblings().attr(t,!0),$(s).siblings().attr(t,!0),$(a).siblings().attr(t,!0),$(o).siblings().not(e).attr(t,!0),$(l).siblings().attr(t,!0),$(c).siblings().attr(t,!0),$(d).closest(p).siblings().attr(t,!0),$(u).siblings().attr(t,!0),$(".menu-nav__mobile-menu-trigger,global-header .right-drawer__close").on("click",(()=>{$(i).siblings().removeAttr(t),$(n).siblings().removeAttr(t),$(r).siblings().removeAttr(t),$(s).siblings().removeAttr(t),$(a).siblings().removeAttr(t),$(o).siblings().removeAttr(t),$(l).siblings().removeAttr(t),$(c).siblings().removeAttr(t),$(d).closest(p).siblings().removeAttr(t),$(u).siblings().removeAttr(t)}))}},this.handleFocusADA=function(){setTimeout((()=>{this.sidebar.addClass("sidebar__ada-flag")}),500),this.sidebarShoppingCartClose.focus()},window.rightdrawerCompAlRef={zone:e,component:this}}ngOnInit(){this._commonService.$rightDrawerSource.subscribe((e=>{this.openRightDrawer(e)})),this.sidebar=$(".myaccount-flyout-wrapper div.sidebar"),this.sidebarWrapper=$(".myaccount-flyout-wrapper"),this.rightDrawer=$(".sidebar-right-drawer"),this.myaccount=$(".sidebar-myaccount-flyout"),this.backdrop=$(".myAccount-flyout-backdrop"),this.signInLabelCaretDown=$(".button__item.menu-nav__red-caret-down"),this.sidebarShoppingCartClose=$(".right-drawer__close"),this.mobileHamBtn=$(".menu-nav__mobile-menu-trigger .menu-nav__icon-container"),this.rightDrawerClass="sidebar__right-drawer",this.mobileHamCloseBtnClass="activeMenu",this.signInLabelCaretUp="menu-nav__red-caret-up",this.sidebarToggleClass="sidebar--effect",this.myAccountLinkButton=".menu-nav__profile-button",this.setupADAFocus(),this._commonService.$bxgyOffer.subscribe((e=>{this.isBXGYEligibleOffer=this._commonService.getIsOfferEligibleBXGY(e)&&(this._commonService.isEmpty(this.configObj?.programType)||"abs"===this.configObj?.programType),this.upcList=e?.upcList||[],this.eligibleUpcList=e?.eligibleUpcList||[]}))}onResize(){this.adjustRightDrawerPosition()}openRightDrawer(e,t,i){switch(t&&this._userInfoService.setUserSession(t),e.hasOwnProperty("type")&&(this.renderingComponent=e.type),!0){case e.hasOwnProperty("couponList")&&e.hasOwnProperty("product"):case e.hasOwnProperty("couponList")&&"coupon-list"===this.renderingComponent:this.couponListData.coupons=e.couponList,this.couponListData.product=e.product,this.openRightFlyout("multiple-coupon");break;case e.hasOwnProperty("coupon")&&e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement"):this.coupon=this.normalizeCoupon(e.coupon),this.dataValue=`{'c-products-by-upc-drawer': {'offerId': '${this.coupon.offerId}' }}`,this.product=h({},e.product),this.detailsDrawerTriggeredComponent=e.triggeredElement,this.openRightFlyout("single-coupon");break;case e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement")&&"customize-drawer"===e?.type:this.product=h({},e.product),this.detailsDrawerTriggeredComponent=e.triggeredElement,this.customizationDetail
1s=e.customizationDetails,this.openRightFlyout("customize-drawer");break;case e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement")&&"prebook-slot"===e?.type:this.qtyStepperOptions=h({},e.qtyStepperOptions),this.product=h({},e.product),this.detailsDrawerTriggeredComponent=e.triggeredElement,this.openRightFlyout(e?.type);break;case e.hasOwnProperty("product")&&e.hasOwnProperty("triggeredElement"):this.product=h({},e.product),this.productList=[h({},e.product)],this.detailsDrawerTriggeredComponent=e.triggeredElement,this.openRightFlyout("single-coupon")}this.configObj=i||e?.configObj||this.configObj,this.product&&(this.product.id=null!=this.product?.id?String(this.product.id):"",this.product.itemId=null!=this.product?.itemId?String(this.product.itemId):"","cart"===this.configObj?.appName&&this.product.itemId?this.product.id=this.product.itemId:!this.product.itemId&&this.product.id&&(this.product.itemId=this.product.id)),this.loadComponents()}renderCouponComponents(e,t,i){this.renderingComponent=e,"coupon-list"===e?(this.couponListData.coupons=t,this.couponListData.product=i):"offer-detail"===e?(this.coupon=this.normalizeCoupon(t),this.dataValue=`{'c-products-by-upc-drawer': {'offerId': '${this.coupon.offerId}' }}`,this.product=h({},i)):"bogo-detail"===e&&(this.product=h({},i),this.productList=[h({},i)]),this.loadComponents()}loadComponents(e){switch(e&&(this.renderingComponent=e),$("right-drawer").addClass("d-none"),this.renderer.removeClass(this.elementRef.nativeElement,"d-none"),this.renderingComponent){case"mini-cart":case"default":this.removeExistingEmbeddedView(),this.rightDrawerContainer.createEmbeddedView(this.miniCartV2);break;case"coupon-list":this.renderComponent(this.couponList);break;case"offer-detail":this.renderComponent(this.offerDetailV2);break;case"bogo-detail":this.renderComponent(this.bogoDetail);break;case"substitution-list":this.renderComponent(this.substitutionList);break;case"ndc-offer-detail":this.renderComponent(this.ndcOfferDetail);break;case"customize-drawer":this.renderComponent(this.customizeDrawer),setTimeout((()=>{this.sidebar.css({width:"768px"})}));break;case"prebook-slot":this.renderComponent(this.prebookSlot),setTimeout((()=>{this.sidebar.css({width:"456px"})}))}this.updateCloseButton()}updateCloseButton(){let e=$(".sidebar-right-drawer .right-drawer__close");e.addClass("mini-cart-v2-close-button"),!window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled&&(e.removeClass("d-none"),e.removeClass("d-lg-block"),setTimeout((()=>e.focus()),0),this.adjustRightDrawerPosition())}adjustRightDrawerPosition(){window.SWY?.CONFIGSERVICE?.featureToggleConfig?.isNavigationEngineDisabled||(window.innerWidth<992?(setTimeout((()=>$(this.elementRef.nativeElement).children().find(".offer-detail-v2").css({"margin-right":"26px"})),0),this.sidebar.css({top:0,width:"100%",height:"100%"}),$("rd-customization").css({top:0,width:"100%",height:"100%"})):this.sidebar.removeAttr("style"))}renderComponent(e){this.removeExistingEmbeddedView(),this.showSpinner=!0,this.rightDrawerContainer.createEmbeddedView(e),this.showSpinner=!1}removeExistingEmbeddedView(){this.rightDrawerContainer.length>0&&this.rightDrawerContainer.remove()}normalizeCoupon(e){let t=h({},e||{});return t.offerId=t.offerId||t.omsOfferId||t.couponID||t.couponId||t.id||"",t.offerPgm=t.offerPgm||t.offerProgram||t.offerType||t.offerProgramType||"",t}loadTriggeredComponent(e){switch(this._cartService.rightDrawerEvent.next({event:"closeCartDrawer",data:[]}),this.detailsDrawerTriggeredComponent){case"mini-cart":$("right-drawer").removeClass("d-none"),this.renderer.addClass(this.elementRef.nativeElement,"d-none"),window.rightdrawerCompRef.component.detailsDrawerTriggeredComponent="mini-cart",window.rightdrawerCompRef.component.loadTriggeredComponent();break;case"coupon-list":if(e){let t=this.couponListData.coupons.findIndex((t=>t.offerId==e.offerId));this.couponListData.coupons[t].status=e.status,this.couponListData.coupons[t].deleted=e.deleted}this.renderComponent(this.couponList),this.handleADA()}}handleADA(){let e=$(".right-drawer__close"),t=$(".menu-nav__mobile-menu-trigger .menu-nav__icon-container");switch(this.detailsDrawerTriggeredComponent){case"mini-cart":e.attr("aria-label","close shopping cart"),t.attr("aria-label","close shopping cart");break;case"coupon-list":e.attr("aria-label","close coupons list"),t.attr("aria-label","close coupons list")}
1window.innerWidth<992?t.focus():e.focus()}setupADAFocus(){$("body").on("keydown",(function(t){27===t.which&&$(".myaccount-flyout-wrapper").is(":visible")&&e.closeDrawer()})),$(".myaccount-flyout-wrapper div.sidebar").on("keydown",(function(e){if(9===e.which){let t=$(".myaccount-flyout-wrapper div.sidebar").find('a[href]:visible, button:visible:enabled, textarea:not([disabled]), div[tabindex="0"], input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled]),[tabindex]:not([tabindex="-1"])'),i=t.first()[0],n=t.last()[0];e.shiftKey?document.activeElement===i&&(n.focus(),e.preventDefault()):document.activeElement===n&&(i.focus(),e.preventDefault())}}));let e=this;$(document).on("click",(function(t){let i=["details-link","coupon-available","coupon-some-clipped","coupon-available analytics-enabled","coupon-some-clipped analytics-enabled","coupon-clipped analytics-enabled","coupon-list-shop-deal","coupon-detail-link","menu-nav__profile-button","single-coupon__details-text__link","multiple-coupon__text","bogo-coupon__details-text__link","button__item svg-icon svg-icon-Account","account-icon","button__item menu-nav__red-caret-down d-none d-lg-inline-block menu-nav__red-caret-up","menu-nav__red-caret-up","button__item menu-nav__profile-button-sign-in-up d-none d-lg-inline-block","button__item menu-nav__red-caret-down d-none d-lg-inline-block","cart-count-text","cart-price-text","mini-cart-icon","menu-nav__cart button__item","ab-cart menu-nav__sub-item-container","svg-icon svg-icon-Cart-red","icon button__item menu-nav__red-caret-down svg-caret-down text-primary d-none d-lg-inline-block","icon button__item menu-nav__red-caret-down svg-caret-down text-primary d-none d-lg-inline-block menu-nav__red-caret-up","icon svg-user text-primary","icon svg-cart text-primary","offer-details dst-offer-details-link","icon svg-cart text-primary dst__svg-cart","coupon-card-offer-details offer-details","back-btn-container","back-arrow","back-btn","body-text-xs word-underline product-coupon__info__text text-wrap text-left color-neutral-90","body-text-xs word-underline border-0 product-coupon__info color-neutral-90 sunshine50 px-2 py-1"],n=t.target,r=n.className.baseVal?n.className.baseVal:n.className?n.className:$(n).parent()[0].className,s=$("#menu").position();if($("#menu").is(":visible")&&(t.clientX>0||t.clientY>0)&&(t.clientX<s.left||t.clientY<s.top)){if(i.indexOf(r)>-1||!$("#menu").hasClass("sidebar__ada-flag"))return;$(".myaccount-flyout-wrapper div.sidebar").hasClass("sidebar--effect")&&e.closeDrawer()}}))}static{this.ɵfac=function(t){return new(t||e)($d(Tl),$d(Bw),$d(Vl),$d(dp),$d(Cw),$d(_w),$d(Rw))}}static{this.ɵcmp=Qr({type:e,selectors:[["right-drawer-al-v1"]],viewQuery:function(e,t){if(1&e&&(tm(CSe,7,yp),tm(ISe,7,Yu),tm(ASe,7,Yu),tm(kSe,7,Yu),tm(xSe,7,Yu),tm(TSe,7,Yu),tm(PSe,7,Yu),tm(ESe,7,Yu),tm(DSe,7,Yu)),2&e){let e;im(e=nm())&&(t.rightDrawerContainer=e.first),im(e=nm())&&(t.miniCartV2=e.first),im(e=nm())&&(t.offerDetailV2=e.first),im(e=nm())&&(t.couponList=e.first),im(e=nm())&&(t.bogoDetail=e.first),im(e=nm())&&(t.substitutionList=e.first),im(e=nm())&&(t.ndcOfferDetail=e.first),im(e=nm())&&(t.customizeDrawer=e.first),im(e=nm())&&(t.prebookSlot=e.first)}},hostBindings:function(e,t){1&e&&jf("resize",(function(e){return t.onResize(e)}),0,od)},inputs:{configObj:"configObj"},decls:15,vars:1,consts:[["rightDrawerContainer",""],["offerDetailV2",""],["couponList",""],["bogoDetail",""],["ndcOfferDetail",""],["customizeDrawer",""],["prebookSlot",""],["id","loadingConSmall","class","loading-div-small",4,"ngIf"],[1,"offer-detail-v2-wrapper",3,"ngClass"],[3,"backtoTriggeredComponent","offer","product","TriggerElement","configObj","isBXGYEligibleOffer"],[1,"product-grid-container"],["role","heading","aria-level","2","class","pl-4 pr-4 qualifying-products-text","data-qa","qlfy-prd-txt",4,"ngIf"],["data-infinite-scroll-type","client","data-driven","catalog","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10","data-api-type","c-products-by-upc-drawer",3,"dataValue","offer","isBXGYEligibleOffer","configObj"],["role","heading","aria-level","2","data-qa","qlfy-prd-txt",1,"pl-4","pr-4","qualifying-products-text"],[3,"couponListData","configObj"],[1,"offer-detail-v2-wrapper"],[3,"backtoTriggeredComponent","product","TriggerElement","configObj"],["role","heading","aria-level","2","data-qa","qlfy-prd-txt",1,"qualifying-products-text"],["data-infinite-scroll-type","client","data-driven","static","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10","data-api-type","s-bogo",3,"dataValue","configObj","staticProducts"],[3,"offer","TriggerElement"],["data-infinite-scroll-type","client","data-driven","catalog","data-load-type","loadmore","data-load-more-mobile-items","10","data-load-more-tablet-items","10","data-load-more-desktop-items","10","data-api-type","c-products-by-upc-drawer",3,"dataValue","configObj"],[3,"product","configObj","customizationDetail
1s"],[3,"product","hideCTA","calledBy","configObj","qtyStepperOptions"],["id","loadingConSmall",1,"loading-div-small"],[1,"loading-spinner"],["alt","Loading...",1,"large","progress"],[1,"prog1"],[1,"prog2"]],template:function(e,t){1&e&&(Of(0,null,0),ph(2,MSe,5,13,"ng-template",null,1,Wm)(4,RSe,1,2,"ng-template",null,2,Wm)(6,LSe,6,6,"ng-template",null,3,Wm)(8,FSe,6,4,"ng-template",null,4,Wm)(10,NSe,1,3,"ng-template",null,5,Wm)(12,USe,1,5,"ng-template",null,6,Wm)(14,VSe,5,0,"div",7)),2&e&&(Vd(14),zh("ngIf",t.showSpinner))},dependencies:[sy,cy,Dwe,v_e,P_e,F_e,_Se,Noe]})}}return e})(),$Se=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[qSe],imports:[Ly,Owe,w_e,age,E_e,N_e,SSe,qoe]})}}return e})(),jSe=["streetAddress"],zSe=["closeNotificationBtn"];function WSe(e,t){if(1&e){let e=Mf();kf(0,"div",37)(1,"div",38)(2,"div",39)(3,"div",40),Tf(4,"span",41),xf(),kf(5,"div",42)(6,"h4",43),am(7,"Letâs keep your delivery on track"),xf(),kf(8,"p",44),am(9),xf()(),kf(10,"button",45,2),jf("click",(function(){return Wa(e),Ha(Yf(2).showApartmentInfoWarning=!1)})),Tf(12,"span",46),xf()()()()}if(2&e){let e=Yf(2);Vd(9),lm(e.apartmentWarningMessage)}}function HSe(e,t){if(1&e&&(kf(0,"span",47),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.guestPartialDeliveryMsg)}}function YSe(e,t){if(1&e&&(kf(0,"span",47),am(1),xf()),2&e){let e=Yf(2);Vd(),lm(e.registerPartialDeliveryMsg)}}function GSe(e,t){if(1&e&&(kf(0,"div",50),Tf(1,"div",51),kf(2,"div",52),am(3),xf()()),2&e){let e=Yf(3);Vd(3),lm(e.errorMessages.businessName[0].message)}}function KSe(e,t){if(1&e&&(Ef(0),kf(1,"div",20)(2,"label",21),Tf(3,"input",48),kf(4,"span"),am(5,"Business name"),xf()(),ph(6,GSe,4,1,"div",49),xf(),Df()),2&e){let e=Yf(2);Vd(6),zh("ngIf",e.addressForm.get("businessName").invalid&&(e.addressForm.get("businessName").dirty||e.addressForm.get("businessName").touched))}}function QSe(e,t){if(1&e&&(kf(0,"div",56),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function JSe(e,t){if(1&e&&(Ef(0),ph(1,QSe,2,1,"div",55),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngIf",i.addressForm.get("firstName").hasError(e.type))}}function ZSe(e,t){if(1&e&&(kf(0,"div",53),Tf(1,"div",51),ph(2,JSe,2,1,"ng-container",54),xf()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",e.errorMessages.firstName)}}function XSe(e,t){if(1&e&&(kf(0,"div",59),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function eCe(e,t){if(1&e&&(Ef(0),ph(1,XSe,2,1,"div",58),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngIf",i.addressForm.get("lastName").hasError(e.type))}}function tCe(e,t){if(1&e&&(kf(0,"div",57),Tf(1,"div",51),ph(2,eCe,2,1,"ng-container",54),xf()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",e.errorMessages.lastName)}}function iCe(e,t){if(1&e&&(kf(0,"div",60),Tf(1,"div",51),kf(2,"div",61),am(3),xf()()),2&e){let e=Yf(2);Vd(3),lm(e.errorMessages.streetAddress[0].message)}}function nCe(e,t){if(1&e&&(kf(0,"div",64),am(1),xf()),2&e){let e=Yf().$implicit;Vd(),lm(e.message)}}function rCe(e,t){if(1&e&&(Ef(0),ph(1,nCe,2,1,"div",63),Df()),2&e){let e=t.$implicit,i=Yf(3);Vd(),zh("ngIf",i.addressForm.get("zipCode").hasError(e.type))}}function sCe(e,t){if(1&e&&(kf(0,"div",62),Tf(1,"div",51),ph(2,rCe,2,1,"ng-container",54),xf()),2&e){let e=Yf(2);Vd(2),zh("ngForOf",e.errorMessages.zipCode)}}function aCe(e,t){if(1&e&&(kf(0,"div",65),Tf(1,"div",51),kf(2,"div",66),am(3),xf()()),2&e){let e=Yf(2);Vd(3),lm(e.errorMessages.state[0].message)}}function oCe(e,t){if(1&e&&(kf(0,"div",67),Tf(1,"div",51),kf(2,"div",68),am(3),xf()()),2&e){let e=Yf(2);Vd(3),lm(e.errorMessages.city[0].message)}}function lCe(e,t){1&e&&(kf(0,"div",76),Tf(1,"div",51),kf(2,"div",77),am(3,"Cannot save this address as default. Please deselect the checkbox to continue."),xf()())}function cCe(e,t){if(1&e){let e=Mf();kf(0,"div",20)(1,"div",69)(2,"label",70)(3,"span",71),am(4,"Set address as default"),xf(),kf(5,"input",72),jf("change",(function(){return Wa(e),Ha(Yf(2).onDefaultAddressChange())})),xf(),kf(6,"span",73),Tf(7,"span",74),xf()()(),ph(8,lCe,4,0,"div",75),xf()}if(2&e){let e=Yf(2);Vd(8),zh("ngIf",e.isDefaultError)}}function dCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",83),am(2," Sorry, but delivery service is not available for your address. Try our pickup service to get your items. "),kf(3,"a",84),jf("click",(function(){return Wa(e),Ha(Yf(3).goToPickUp())})),am(4,"Go to pick up"),xf()(),Df()}}function uCe(e,t){if(1&e&&(Ef(0),kf(1,"div",83),am(2),xf(),Df()),2&e){let e=Yf(3);
1Vd(2),cm(" ",e.addressErrorMessage," ")}}function pCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",78)(2,"div",79),Tf(3,"span",51),xf(),ph(4,dCe,5,0,"ng-container",18)(5,uCe,3,1,"ng-container",18),kf(6,"div",80)(7,"a",81),jf("click",(function(){return Wa(e),Ha(Yf(2).closeError())})),Tf(8,"span",82),xf()()(),Df()}if(2&e){let e=Yf(2);Vd(4),zh("ngIf",e.isAddressValid),Vd(),zh("ngIf",!e.isAddressValid)}}function hCe(e,t){if(1&e){let e=Mf();kf(0,"div",5)(1,"div",6),ph(2,WSe,13,1,"div",7)(3,HSe,2,1,"span",8)(4,YSe,2,1,"span",8),kf(5,"span",9),am(6,"Address Type"),xf(),kf(7,"form",10),jf("ngSubmit",(function(){Wa(e);let t=Yf();return Ha(t.callStoreByAddressApi(t.addressForm))})),kf(8,"div",11)(9,"div")(10,"input",12),jf("change",(function(t){return Wa(e),Ha(Yf().addressTypeValidator(t))})),xf(),kf(11,"label",13),am(12,"Residential"),xf()(),kf(13,"div")(14,"input",14),jf("change",(function(t){return Wa(e),Ha(Yf().addressTypeValidator(t))})),xf(),kf(15,"label",15),am(16,"Business"),xf()()(),kf(17,"span",16),am(18,"All fields are required unless marked optional."),xf(),kf(19,"div",17),ph(20,KSe,7,1,"ng-container",18),kf(21,"div",19)(22,"div",20)(23,"label",21),Tf(24,"input",22),kf(25,"span"),am(26,"First Name"),xf()(),ph(27,ZSe,3,1,"div",23),xf(),kf(28,"div",20)(29,"label",21),Tf(30,"input",24),kf(31,"span"),am(32,"Last Name"),xf()(),ph(33,tCe,3,1,"div",25),xf()(),kf(34,"div",20)(35,"label",21),Tf(36,"input",26,0),kf(38,"span"),am(39,"Street address"),xf()(),ph(40,iCe,4,1,"div",27),xf(),kf(41,"div",19)(42,"div",20)(43,"label",21),Tf(44,"input",28,1),kf(46,"span"),am(47,"Apt. Suite, etc (optional)"),xf()()(),kf(48,"div",20)(49,"label",21)(50,"input",29),jf("input",(function(t){return Wa(e),Ha(Yf().validateZipcode(t))})),xf(),kf(51,"span"),am(52,"ZIP code"),xf()(),ph(53,sCe,3,1,"div",30),xf()(),kf(54,"div",19)(55,"div",20)(56,"label",21),Tf(57,"input",31),kf(58,"span"),am(59,"State"),xf()(),ph(60,aCe,4,1,"div",32),xf(),kf(61,"div",20)(62,"label",21),Tf(63,"input",33),kf(64,"span"),am(65,"City"),xf()(),ph(66,oCe,4,1,"div",34),xf()(),ph(67,cCe,9,1,"div",35)(68,pCe,9,2,"ng-container",18),kf(69,"button",36),am(70," Continue "),xf()()()()()}if(2&e){let e=Yf();Vd(2),zh("ngIf",e.enableAddressOverwrite&&e.showApartmentInfoWarning),Vd(),zh("ngIf",e.guestPartialDeliveryMsg),Vd(),zh("ngIf",e.registerPartialDeliveryMsg),Vd(3),zh("formGroup",e.addressForm),Vd(3),zh("checked","residential"==e.addressTypeValue),Vd(4),zh("checked","business"==e.addressTypeValue),Vd(6),zh("ngIf","business"===e.addressForm.get("addressType").value),Vd(3),Yh("input-field__float-label--error",e.addressForm.get("firstName").invalid&&(e.addressForm.get("firstName").dirty||e.addressForm.get("firstName").touched)),Vd(4),zh("ngIf",e.addressForm.get("firstName").invalid&&(e.addressForm.get("firstName").dirty||e.addressForm.get("firstName").touched)),Vd(2),Yh("input-field__float-label--error",e.addressForm.get("lastName").invalid&&(e.addressForm.get("lastName").dirty||e.addressForm.get("lastName").touched)),Vd(4),zh("ngIf",e.addressForm.get("lastName").invalid&&(e.addressForm.get("lastName").dirty||e.addressForm.get("lastName").touched)),Vd(2),Yh("input-field__float-label--error",e.addressForm.get("streetAddress").invalid&&(e.addressForm.get("streetAddress").dirty||e.addressForm.get("streetAddress").touched)),Vd(5),zh("ngIf",e.addressForm.get("streetAddress").invalid&&(e.addressForm.get("streetAddress").dirty||e.addressForm.get("streetAddress").touched)),Vd(9),Yh("input-field__float-label--error",e.addressForm.get("zipCode").invalid&&(e.addressForm.get("zipCode").dirty||e.addressForm.get("zipCode").touched)),Vd(4),zh("ngIf",e.addressForm.get("zipCode").invalid&&(e.addressForm.get("zipCode").dirty||e.addressForm.get("zipCode").touched)),Vd(3),Yh("input-field__float-label--error",e.addressForm.get("state").invalid&&(e.addressForm.get("state").dirty||e.addressForm.get("state").touched)),Vd(4),zh("ngIf",e.addressForm.get("state").invalid&&(e.addressForm.get("state").dirty||e.addressForm.get("state").touched)),Vd(2),Yh("input-field__float-label--error",e.addressForm.get("city").invalid&&(e.addressForm.get("city").dirty||e.addressForm.get("city").touched)),Vd(4),zh("ngIf",e.addressForm.get("city").invalid&&(e.addressForm.get("city").dirty||e.addressForm.get("city").touched)),Vd(),zh("ngIf",!e.enableStoreSelectionWrapper),Vd(),zh("ngIf",e.isStoreByAddressValidated),Vd(),zh("disabled",e.addressForm.invali
1d||e.isAddrFormSubmitted)}}function fCe(){return window}var mCe=(()=>{class e{constructor(e,t){this.storeFulfillmentService=e,this._featureFlagService=t,this.addressForm=new oS({addressType:new xS("residential"),businessName:new xS("",this.businessNameValidator()),streetAddress:new xS("",[g_.required,g_.minLength(2)]),apartment:new xS(""),zipCode:new xS("",[g_.required,e=>{let t=e.value,i=g_.minLength(5)(e),n=g_.pattern("^[0-9]*$")(e);if(!i&&!n)return null;if(t&&5===t.length)return n;if(i&&n)return i},g_.minLength(5)]),state:new xS("",[g_.required,g_.minLength(2),e=>{let t=e.value;return t&&/\d/.test(t)?{numeric:!0}:null}]),city:new xS("",[g_.required,g_.minLength(2)]),lastName:new xS("",[this.validateName()]),firstName:new xS("",[this.validateName()]),defaultAddress:new xS(!1)}),this.errorMessages={businessName:[{type:"required",message:"Please enter the name of your business."},{type:"minlength",message:"Please enter the name of your business."}],streetAddress:[{type:"minlength",message:"Please enter your street address."}],zipCode:[{type:"required",message:"Please enter your zip code."}
1,{type:"pattern",message:"Please enter a ZIP Code that contains only numbers."},{type:"minlength",message:"Please enter 5 numbers."},{type:"zipCodeInvalid",message:"Please enter a valid ZIP code"}],state:[{type:"required",message:"Please enter your state name."}],city:[{type:"required",message:"Please enter your city name."}],firstName:[{type:"required",message:"Please enter your First name."},{type:"minlength",message:"Please enter a first name that is between 2-30 characters."},{type:"specialChars",message:"Names are limited to letters, apostrophes, periods and hyphens"}],lastName:[{type:"required",message:"Please enter your last name."},{type:"minlength",message:"Please enter a laast name that is between 2-30 characters."},{type:"specialChars",message:"Names are limited to letters, apostrophes, periods and hyphens"}]},this.addressErrorMessage="",this.isStoreByAddressValidated=!1,this.isAddressValid=!1,this.isStoreAvailableWithUserAddr=!1,this.isAddrFormSubmitted=!1,this.isDefaultError=!1,this.enableAddressOverwrite=!1,this.showApartmentInfoWarning=!1,this.hasPendingApartmentWarning=!1,this.apartmentWarningMessage="",this.storeByAddressApiResponse={},this.setStoreData=new _l,this.parseStoreAddressResponse=e=>{if(e&&e?.stores?.length>0){if(this.enableAddressOverwrite&&!this.hasPendingApartmentWarning&&e?.validationStatuses?.length>0){let t=e.validationStatuses.find((e=>"CCVS5039"===e.code&&"PENDING"===e.type));if(t)return this.apartmentWarningMessage=t.message||"",this.showApartmentInfoWarning=!0,this.hasPendingApartmentWarning=!0,this.storeByAddressApiResponse=e,void setTimeout((()=>{this.closeNotificationBtn?.nativeElement?.focus()}),100)}fCe().AB.COMMON.authorize()?this.saveUserAddress(e):this.emitStoreData(e)}else{if(e?.errors&&e?.errors.length>0)return this.focusErrorCloseBtn(),this.addressErrorMessage=e?.errors[0]?.message||KD,void(this.isStoreByAddressValidated=!0);if(e?.validationStatuses?.length>0)for(let t=0;t<e?.validationStatuses?.length;t++){this.focusErrorCloseBtn();let i=e?.validationStatuses;if("CCVS1001"===i[t]?.code)this.isStoreByAddressValidated=!0,this.isAddressValid=!0,this.emitStoreData({},"delivery");else if("FAILURE"===i[t]?.type){this.addressErrorMessage=i[t]?.message||"Address could not be verified. Please try again",this.isStoreByAddressValidated=!0,this.isAddressValid=!1;break}}}},this.enableAddressOverwrite=this._featureFlagService.getFeatureFlagBase()?.enableAddressOverwrite}ngOnInit(){this.isEditStoreAddress&&this.storeFulfillmentService.userResolvedAddress.subscribe((e=>{e&&this.setAddressFormValue(e)})),this.addressForm.valueChanges.subscribe((()=>{this.onFormChange()}))}addressTypeValidator(e){"residential"===e?.target?.value?this.addressForm.get("businessName").clearValidators():this.addressForm.get("businessName").setValidators([g_.required,g_.minLength(2)]),this.addressForm.get("businessName").updateValueAndValidity(),this.addressForm.updateValueAndValidity()}businessNameValidator(){return e=>this.addressForm&&"business"===this.addressForm.get("addressType").value?g_.compose([g_.required,g_.minLength(2)])(e):null}validateZipcode(e){let t=e.target.value;5==t.length&&this.storeFulfillmentService.getZipcodeValidity(t).subscribe((e=>{e&&e?.geo&&!e?.geo?.errors?this.addressForm.patchValue({zipCode:e.geo.postalCode,state:e.geo.region,city:e.geo.address2}):e?.geo?.errors&&this.setZipcodeError()}),(e=>{(404===e.status||406===e.status)&&this.setZipcodeError()}))}setZipcodeError(){this.addressForm.controls.zipCode.setErrors({zipCodeInvalid:!0})}setAddressFormValue(e){this.addressForm.patchValue({addressType:e.type,streetAddress:e.addressLine1,apartment:e.addressLine2?e.addressLine2:"",zipCode:this.storeFulfillmentService.normalizePostalCode(e.postalCode),state:e.stateCode,city:e.city,businessName:e.bName,firstName:e.firstName,lastName:e.lastName})}goToPickUp(){this.emitStoreData({},"pickup"),$("#modal-tab-pickup-btn").focus()}callStoreByAddressApi(e){if(this.showApartmentInfoWarning=!1,this.enableAddressOverwrite&&this.hasPendingApartmentWarning)return void this.parseStoreAddressResponse(this.storeByAddressApiResponse);this.isAddrFormSubmitted=!0;let t={address:{addressLine1:e.value.streetAddress?e.value.streetAddress:null,addressLine2:e.value.a
1partment?e.value.apartment:null,city:e.value.city?e.value.city:null,countryCode:null,postalCode:e.value.zipCode?e.value.zipCode:null,stateCode:e.value.state?e.value.state:null}};"business"===e.value.addressType&&(t.address.addressName=e.value.businessName?e.value.businessName:null),this.storeFulfillmentService.getAddressAvailability(t).subscribe((e=>{this.isAddrFormSubmitted=!1,e&&this.parseStoreAddressResponse(e)}),(e=>{this.focusErrorCloseBtn(),this.isAddrFormSubmitted=!1,this.addressErrorMessage=KD,this.isStoreByAddressValidated=!0}))}saveUserAddress(e){let{addressLine1:t,addressLine2:i,city:n,postalCode:r,stateCode:s,addressRef:a,longitude:o,latitude:l}=e?.address,c=null,d={address:{address1:`${t}`?.trim(),address2:`${i||""}`?.trim(),city:n,stateCode:s,postalCode:r?.split("-")?.[0],postalCodeExtn:r?.split("-")?.[1],addressTypes:[{type:"residential"===this.addressForm.value.addressType?1:"business"===this.addressForm.value.addressType?2:null}],purposes:[{name:"DELIVERY"}],isSelectedAddress:!0,selectedAddressBanner:fCe().SWY.CONFIGSERVICE.getResolvedBanner(),selectedAddressPurposes:[{name:"DELIVERY"}],addressHash:a,geoCodes:{latitude:l,longitude:o},statuses:[]}};if("business"===this.addressForm.value.addressType&&(d.address.addressName=this.addressForm.value.businessName?this.addressForm.value.businessName:null),e?.validationStatuses&&(d.address.statuses=e?.validationStatuses),e?.stores&&e?.stores.length>0&&(d.address.deliveryStores=[],e?.stores.forEach((e=>{e.polarisBannerName===fCe().SWY.CONFIGSERVICE.getResolvedBanner()&&(c=e.polarisBannerName),d.address.deliveryStores.push({storeId:e.locationId,banner:e.polarisBannerName})}))),d.address.name={firstName:this.addressForm.get("firstName").value,lastName:this.addressForm.get("lastName").value},this.addressForm.get("defaultAddress").value&&c)d.address.isDefaultAddress=!0,d.address.defaultAddressBanner=fCe().SWY.CONFIGSERVICE.getResolvedBanner(),d.address.defaultAddressPurpose="DELIVERY";else{if(this.addressForm.get("defaultAddress").value)return this.isDefaultError=!0,this.focusOnDefaultAddress(),!1;d.address.isDefaultAddress=!1}this.storeFulfillmentService.addUserAddressV2(d).subscribe((t=>{if(t?.selectedAddresses)for(let i of t.selectedAddresses)i?.banner.toLowerCase()===fCe().SWY.CONFIGSERVICE.getResolvedBanner()&&(e.address.addressId=i?.addressId);sessionStorage.getItem("profileCompletionData")&&sessionStorage.removeItem("profileCompletionData"),this.emitStoreData(e)}),(e=>{"IAUC0334"===e?.error?.errors?.[0]?.code?(this.focusOnDefaultAddress(),this.isDefaultError=!0):"IAUC0057"===e?.error?.errors?.[0]?.code?(this.focusErrorCloseBtn(),this.isStoreByAddressValidated=!0,this.isAddressValid=!0):(this.focusErrorCloseBtn(),this.addressErrorMessage=e?.error?.errors?.[0]?.message||KD,this.isStoreByAddressValidated=!0)}))}closeError(){this.isStoreByAddressValidated=!1,this.isAddressValid=!1,this.streetAddress?.nativeElement?.focus()}emitStoreData(e,t){let i=this.addressForm.get("addressType").value,n="business"===i?this.addressForm.get("businessName").value:null,r=this.addressForm.get("zipCode").value,s=this.zipCode!==r;e.type=i,e.firstName=this.addressForm.get("firstName").value,e.lastName=this.addressForm.get("lastName").value,"business"===i&&(e.bName=n),t?(e={zipCode:r,intent:t},s="pickup"!==t):(this.isEditStoreAddress=!1,this.isStoreAvailableWithUserAddr=!0),e.refreshDelivery=s,this.setStoreData.emit(e)}validateName(){let e=new RegExp("^[a-zA-Z][ a-zA-Z-]*$");return t=>{let i={required:!1,minlength:!1,specialChars:!1};return 0==t.value.length?(i.required=!0,i):t.value.length<2||t.value.length>30?(i.minlength=!0,i):e.test(t.value)?void 0:(i.specialChars=!0,i)}}onDefaultAddressChange(){this.isDefaultError=!1}onFormChange(){this.isDefaultError&&(this.isDefaultError=!1),this.enableAddressOverwrite&&this.hasPendingApartmentWarning&&(this.showApartmentInfoWarning=!1,this.storeByAddressApiResponse={},this.apartmentWarningMessage="",this.hasPendingApartmentWarning=!1)}focusOnDefaultAddress(){$("#defaultAddress")[0].focus()}focusErrorCloseBtn(){setTimeout((()=>{$("#addressErrorCloseBtn")[0].focus()}),3e3)}static{this.ɵfac=function(t){return new(t||e)($d(HD),$d(uP))}}
vendor: 4,390 bytes, line 1
1static{this.ɵcmp=Qr({type:e,selectors:[["store-address-form"]],viewQuery:function(e,t){if(1&e&&(tm(jSe,5),tm(zSe,5)),2&e){let e;im(e=nm())&&(t.streetAddress=e.first),im(e=nm())&&(t.closeNotificationBtn=e.first)}},inputs:{guestPartialDeliveryMsg:"guestPartialDeliveryMsg",registerPartialDeliveryMsg:"registerPartialDeliveryMsg",isEditStoreAddress:"isEditStoreAddress",zipCode:"zipCode",enableStoreSelectionWrapper:"enableStoreSelectionWrapper"},outputs:{setStoreData:"setStoreData"},decls:2,vars:1,consts:[["streetAddress",""],["apartmentInput",""],["closeNotificationBtn",""],[1,"store-fulfillment-address-form-container"],["class","store-fulfillment_enter-address",4,"ngIf"],[1,"store-fulfillment_enter-address"],[1,"enter-address-wrapper","px-md-2","pb-md-2"],["class","mb-4",4,"ngIf"],["class","title-sm enter-address-type-description","data-qa","G_ff_dlvry_text",4,"ngIf"],["id","adddType","aria-label","select address type",1,"enter-address-type-title"],[1,"address-form",3,"ngSubmit","formGroup"],["role","radiogroup","aria-labelledby","adddType",1,"enter-address-type"],["type","radio","name","addrType","value","residential","id","residential","formControlName","addressType",1,"enter-address-type-radio","form-check-input","radioButton__input","radioButton--input","d-block",3,"change","checked"],["for","residential","data-qa","G_ff_dlvry_add_rs_rd",1,"form-check-label"],["type","radio","name","addrType","value","business","id","business","formControlName","addressType",1,"enter-address-type-radio","form-check-input","radioButton__input","radioButton--input","d-block",3,"change","checked"],["for","business","data-qa","G_ff_dlvry_add_bs_rd",1,"form-check-label"],[1,"fields-required"],[1,"enter-address-input"],[4,"ngIf"],[1,"input-field__wrapper--half"],[1,"input-field__wrapper"],[1,"input-field__float-label"],["type","text","placeholder","","aria-label","First Name","aria-describedby","userFirstName","formControlName","firstName","data-qa","G_ff_dlvry_add_bs_fn"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","userFirstName","aria-live","assertive",4,"ngIf"],["type","text","placeholder","","aria-label","Last Name","aria-describedby","userLastName","formControlName","lastName","data-qa","G_ff_dlvry_add_bs_ln"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","userLastName","aria-live","assertive",4,"ngIf"],["type","text","placeholder","","aria-label","street address","aria-describedby","streetAddr","formControlName","streetAddress","data-qa","G_ff_dlvry_add_bs_str"],["id","streetAddr","aria-live","polite","class","fulfillment-content__input-field--error input-field__help-text body-text-xs",4,"ngIf"],["type","text","placeholder","","aria-label","Apartment, suite, etc (optional)","formControlName","apartment","data-qa","G_ff_dlvry_add_bs_pt","maxlength","19"],["type","text","placeholder","","aria-label","zipcode","aria-describedby","postalCode","formControlName","zipCode","data-qa","G_ff_dlvry_add_bs_zp","maxlength","5",3,"input"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","postalCode","aria-live","polite",4,"ngIf"],["type","text","placeholder","","aria-label","state","aria-describedby","userState","formControlName","state","data-qa","G_ff_dlvry_add_bs_stt","maxlength","2"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","userState","aria-live","polite",4,"ngIf"],["type","text","placeholder","","aria-label","city","aria-describedby","userCity","formControlName","city","data-qa","G_ff_dlvry_add_bs_cty"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","userCity","aria-live","polite",4,"ngIf"],["class","input-field__wrapper",4,"ngIf"],["data-target","#errorStateModal1","type","submit","aria-label","Continue","data-toggle","modal","data-backdrop","static",1,"btn","btn-xl","btn-primary","submit-btn",3,"disabled"],[1,"mb-4"],["role","alert","aria-live","assertive",1,"pds-message-bar","pds-message-bar__card","pds-message-bar--warning"],[1,"d-flex"],[1,"mr-2"],["aria-hidden","true",1,"pds-svg-warning-icon"],[1,"pds-message-bar__body","d-flex","flex-column"],[1,"text-l-b","mb-1"],[1,"text-m","m-0"],["aria-label","Close Notification","data-dismiss","",1,"pds-icon-btn","pds-icon-btn-size_small","pds-icon-btn-trans
1parent--neutral","d-flex","align-items-center","justify-content-center","ml-auto","pds-message-bar__close",3,"click"],["aria-hidden","true",1,"pds-svg-close","pds-icon-btn-transparent--neutral__icon"],["data-qa","G_ff_dlvry_text",1,"title-sm","enter-address-type-description"],["type","text","placeholder","","aria-label","Business name","aria-describedby","businessDetail","formControlName","businessName","data-qa","G_ff_dlvry_add_bs_nm"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs","id","businessDetail","aria-live","polite",4,"ngIf"],["id","businessDetail","aria-live","polite",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["aria-label","Error",1,"svg-hyphen-outline"],["data-qa","G_ff_dlvry_add_bs_nm_rr",1,"input-field__help-text--error"],["id","userFirstName","aria-live","assertive",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],[4,"ngFor","ngForOf"],["class","input-field__help-text--error ","data-qa","G_ff_dlvry_add_bs_fn_rr",4,"ngIf"],["data-qa","G_ff_dlvry_add_bs_fn_rr",1,"input-field__help-text--error"],["id","userLastName","aria-live","assertive",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["class","input-field__help-text--error ","data-qa","G_ff_dlvry_add_bs_ln_rr",4,"ngIf"],["data-qa","G_ff_dlvry_add_bs_ln_rr",1,"input-field__help-text--error"],["id","streetAddr","aria-live","polite",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["data-qa","G_ff_dlvry_add_bs_str_rr",1,"input-field__help-text--error"],["id","postalCode","aria-live","polite",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["class","input-field__help-text--error ","data-qa","G_ff_dlvry_add_bs_zp_rr",4,"ngIf"],["data-qa","G_ff_dlvry_add_bs_zp_rr",1,"input-field__help-text--error"],["id","userState","aria-live","polite",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["data-qa","G_ff_dlvry_add_bs_stt_rr",1,"input-field__help-text--error"],["id","userCity","aria-live","polite",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs"],["data-qa","G_ff_dlvry_add_bs_cty_rr",1,"input-field__help-text--error"],[1,"checkbox","col","col-md-6","p-0"],["for","defaultAddress","aria-label","Set address as default",1,"checkbox__group"],["aria-hidden","true",1,"checkbox__label","checkbox__label--lg","checkbox__label--dark"],["type","checkbox","aria-checked","false","id","defaultAddress","formControlName","defaultAddress","data-qa","G_ff_dlvry_add_bs_dflt",1,"checkbox__input",3,"change"],[1,"checkbox__checkmark"],[1,"svg-checkmark"],["class","fulfillment-content__input-field--error input-field__help-text body-text-xs col col-md-6","id","defaultAddress_error",4,"ngIf"],["id","defaultAddress_error",1,"fulfillment-content__input-field--error","input-field__help-text","body-text-xs","col","col-md-6"],["data-qa","G_ff_dlvry_add_bs_dflt_rr","role","alert",1,"input-field__help-text--error"],[1,"error-div","d-flex"],[1,"error-div-minus"],[1,"error-div-delete"],["role","button","href","javascript:void(0);","id","addressErrorCloseBtn","aria-label","Close error","tabindex","0","aria-hidden","true",3,"click"],[1,"svg-close"],["role","alert",1,"error-div-content"],["href","javascript:void(0);",3,"click"]],template:function(e,t){1&e&&(kf(0,"div",3),ph(1,hCe,71,28,"div",4),xf()),2&e&&(Vd(),zh("ngIf",!t.isStoreAvailableWithUserAddr||t.isEditStoreAddress))},dependencies:[oy,cy,DS,d_,o_,LS,$_,j_,sC,US,qS],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})();var gCe=(()=>{class e{constructor(e){this._http=e}getDealsData(e,t=0){return this.getRealDealsData(e,t).pipe($i((()=>fi({offers:[],numFound:0}))))}getRealDealsData(e,t=0){let i=window.AB.userInfo.branchId,n=new URL(window.location.href),r=n.searchParams.has("q")?encodeURIComponent(n.searchParams.get("q")):"*",s=window.AB.COMMON.getCookie("absVisitorId"),a=window.AB.userInfo.UUID?window.AB.userInfo.UUID:window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO")?JSON.parse(window.AB.COMMON.getCookie("SWY_SHARED_PII_SESSION_INFO"))?.uuid:null,o=window.SWY.CONFIGSERVICE.getResolvedBanner(),l=e.api.replace("{q}",r).replace("{storeId}",i).replace("start=0",`start=${t}`);l+=`&visitorId=${s}&uuid=${a}&banner=${o}&showDiagnostics=true&request-id=${this.getUTCTimeStampRandom()}`,l+="&dvid=web-4.1search";let c=(new jy).set("Ocp-Apim-Subscription-Key",e.subscriptionKey).set("Content-Type","application/json").set("Accept","application/json").set("platform","web");return window.AB?.userInfo?.SWY_SHOP_TOKEN&&(c=c.set("Authorization",`Bearer ${window.AB.userInfo.SWY_SHOP_TOKEN}`)),this._http.get(l,{headers:c}).pipe(bi((e=>this.mapOffers(e))))}getUTCTimeStampRandom(){return Math.floor(900*Math.random()+100).toString()+Date.now()+Math.floor(900*Math.random()+100).toString()}mapOffers(e){let t=(e?.offers??e?.response?.docs??e?.docs??[]).map((e=>new jne(e)));return{offers:t,numFound:e?.numFound??t.length}}static{this.ɵfac=function(t){return new(t||e)(lr(ov))}}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),bCe=(()=>{class e{static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[xne,Pne,C2,Ene,Wne,Yne,vbe,Hne,Ane,Rw,Mw,Bw,Gne,Kne,Lge,kne,HD,zD,Ope,ek,Mge,Bpe,L3,Rge,QD,dde,Qne,lde,zye,Mpe,gCe,Rpe,Iue,Wye,Xne,Aue,Ev(Ov())],imports:[uw,uC,Yz,O4,JT,Cne,Cue,qme,ode,Rhe,cce,i_,$Se,PV,s$.forRoot(),qoe,E_e,nle,D4,pC,Yve,vge,age,oge,o2,Eve]})}}return e})();Em(LB,(function(){return[sy,oy,cy,by,d_,$_,sC,ES,Dpe,mCe]}),(function(){return[_y,Sy,Iy]}
1));var yCe=(()=>{class e{static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[bP,rP,sP,hP,uP,$be,Ev(Ov())],imports:[uw,uC]})}}return e})(),vCe=(()=>{class e{constructor(e,t,i){this._element=e,this._zone=t,this.platformId=i,this.seoPreRendering=!0,this.backwardsCompatible=!0,this.removeListenersAfterLoad=!0,this.lazyLoad=new _l,this._options={rootMargin:"50px"},this.checkForIntersection=e=>{e.forEach((e=>{this.isIntersecting(e)&&(this.load(),this._intersectionObserver&&this._element.nativeElement&&this._intersectionObserver.unobserve(this._element.nativeElement))}))},this.onScroll=()=>{this.isVisible()&&this._zone.run((()=>this.load()))}}ngOnInit(){(Uy(this.platformId)&&!0===this.seoPreRendering||Ny(this.platformId)&&!1===this.backwardsCompatible&&!this.hasCompatibleBrowser())&&this.load()}ngAfterViewInit(){Ny(this.platformId)&&(this.hasCompatibleBrowser()?(this.registerIntersectionObserver(),this._intersectionObserver&&this._element.nativeElement&&this._intersectionObserver.observe(this._element.nativeElement)):!0===this.backwardsCompatible&&this.addScrollListeners())}hasCompatibleBrowser(){let e="IntersectionObserver"in window,t=window.navigator.userAgent.match(/Edge\/(\d*)\./i),i=!!t&&t.length>1,n=i&&!!t&&parseInt(t[1],10)>15;return e&&(!i||n)}ngOnDestroy(){this.removeListeners()}registerIntersectionObserver(){this._intersectionObserver||(this._intersectionObserver=new IntersectionObserver((e=>this.checkForIntersection(e)),this._options))}isIntersecting(e){return e&&e.time?e.isIntersecting&&e.target===this._element.nativeElement:this.isVisible()}load(){this.removeListenersAfterLoad&&this.removeListeners(),this.lazyLoad.emit()}addScrollListeners(){this.isVisible()?this.load():this._zone.runOutsideAngular((()=>{this._scrollSubscription=Li(window,"scroll").pipe(zi(50)).subscribe(this.onScroll)}))}removeListeners(){this._scrollSubscription&&this._scrollSubscription.unsubscribe(),this._intersectionObserver&&this._intersectionObserver.disconnect()}getScrollPosition(){return(window.scrollY||window.pageYOffset)+(document.documentElement.clientHeight||document.body.clientHeight)}isVisible(){let e=this.getScrollPosition();return this._element.nativeElement.getBoundingClientRect().top+(window.scrollY||window.pageYOffset)<=e}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(Tl),$d(rc))}}static{this.ɵdir=ts({type:e,selectors:[["","lazyLoad",""]],inputs:{seoPreRendering:"seoPreRendering",backwardsCompatible:"backwardsCompatible",removeListenersAfterLoad:"removeListenersAfterLoad"},outputs:{lazyLoad:"lazyLoad"}})}}return e})();function wCe(e,t){1&e&&Tf(0,"product-carousel-wrapper")}function _Ce(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyProductCarousel=!0)})),ph(2,wCe,1,0,"product-carousel-wrapper",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyProductCarousel)}}function SCe(e,t){1&e&&Tf(0,"horizontal-video-carousel-wrapper")}function CCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyHorizontalVideoCarousel=!0)})),ph(2,SCe,1,0,"horizontal-video-carousel-wrapper",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyHorizontalVideoCarousel)}}function ICe(e,t){1&e&&Tf(0,"coupon-carousel")}function ACe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyCouponCarousel=!0)})),ph(2,ICe,1,0,"coupon-carousel",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyCouponCarousel)}}function kCe(e,t){1&e&&Tf(0,"loyalty-card-carousel-al-v1")}function xCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyCouponCarousel=!0)})),ph(2,kCe,1,0,"loyalty-card-carousel-al-v1",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyCouponCarousel)}}function TCe(e,t){1&e&&Tf(0,"meals-carousel-wrapper")}function PCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyMealsCarousel=!0)})),ph(2,TCe,1,0,"meals-carousel-wrapper",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyMealsCarousel)}}function ECe(e,t){1&e&&Tf(0,"utility-bar-wrapper")}function DCe(e,t){if(1&e){let e=Mf();Ef(0),kf(1,"div",1),jf("lazyLoad",(function(){return Wa(e),Ha(Yf().showLazyUtilityBarWrapper=!0)})),ph(2,ECe,1,0,"utility-bar-wrapper",0),xf(),Df()}if(2&e){let e=Yf();Vd(2),zh("ngIf",!0===e.showLazyUtilityBarWrapper)}}var OCe=(()=>{class e{constructor(e,t){this.elementRef=e,this._featureFlagService=t,this.carouselTitle="",this.enableLoyaltyCardCarousel=!0,this.wrapper=this.elementRef.nativeElement,this.lazyLoadingComponent=this.wrapper.getAttribute("data-lazy-component"),this.carouselTitle=this.wrapper.getAttribute("data-carousel-title"),this.enableLoyaltyCardCarousel=this._featureFlagService.enableLoyaltyCardCarousel()}ngOnInit(){}ngAfterViewInit(){}static{this.ɵfac=function(t){return new(t||e)($d(Vl),$d(uP))}}static{this.ɵcmp=Qr({type:e,selectors:[["lazy-wrapper"]],decls:6,vars:6,consts:[[4,"ngIf"],[3,"lazyLoad"]],template:function(e,t){1&e&&ph(0,_Ce,3,1,"ng-container",0)(1,CCe,3,1,"ng-container",0)(2,ACe,3,1,"ng-container",0)(3,xCe,3,1,"ng-container",0)(4,PCe,3,1,"ng-container",0)(5,DCe,3,1,"ng-container",0),2&e&&(zh("ngIf","product-carou
1sel"==t.lazyLoadingComponent),Vd(),zh("ngIf","horizontal-video-carousel"==t.lazyLoadingComponent),Vd(),zh("ngIf","coupon-carousel"==t.lazyLoadingComponent&&!t.enableLoyaltyCardCarousel),Vd(),zh("ngIf","coupon-carousel"==t.lazyLoadingComponent&&t.enableLoyaltyCardCarousel),Vd(),zh("ngIf","meal-carousel"==t.lazyLoadingComponent),Vd(),zh("ngIf","utility-bar-wrapper"==t.lazyLoadingComponent))},dependencies:[cy,Dhe,Xye,ave,_2,cz,E4,vCe],encapsulation:2})}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}}return e})(),BCe=(()=>{class e{static{this.ɵfac=function(t){return new(t||e)}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({imports:[Ly,bCe,O4,Yz,x$,D4]})}}return e})(),MCe=[Ine,aP,yE,hD,GB,LB,jye,_2,E0,I3,Dpe,Oye,Nbe,Ube,OCe,twe,ek,Dhe,phe,che,EV,Xye,qSe,mse,Lse,Hle,ile,cve,Pye,ij,k$,cz,w$,lz,J$],RCe=[uw,uC,O4,Yz,bCe,yCe,BCe,JT,Cne,PV,Cue,$Se,qme,qoe,cce,nle],LCe={lazyWrapper:[OCe],targetedWrapper:[twe],popupWrapper:[ij],specialOccasions:[w$],profileCompletion:[lz],postAuthNotification:[J$],utilityBarWrapper:[cz]},FCe=(()=>{class e{constructor(e,t,i,n,r,s){this._appConfigService=t,this.cartService=i,this._injector=n,this._commonService=r,this._userInfoService=s,this.initialize=!0,this.isInitialized=!1,this.factoryResolver=e,t.getHiddenInputs()}ngDoBootstrap(e){"webcache.googleusercontent.com"!==window.location.hostname?(this.objAppRef=e,this.initialize=this.initialize&&window.AB.userInfo.earlyInitialize,this.initialize?(0==this.isInitialized&&this._initAngular(e),this._appConfigService.userInfoRefresh.subscribe((e=>{"initAngular"===e&&(this._appConfigService.postUserInfoSource.next("initFunc"),this._appConfigService._postUserInfoSource.next("initFunc"),this.setUserInfoToNgLibrary())}))):this._appConfigService.userInfoRefresh.subscribe((t=>{"initAngular"===t&&(0==this.isInitialized&&this._initAngular(e),this._appConfigService.postUserInfoSource.next("initFunc"),this._appConfigService._postUserInfoSource.next("initFunc"),this.setUserInfoToNgLibrary())})),this._appConfigService.manualBootstrap.subscribe((e=>{let t=e.manualComponentId;Object.keys(LCe).length>0?(e.components=LCe[t],this._appConfigService.getHiddenInputs(),this._manualBootstrap(e),this._appConfigService.postUserInfoSource.next("manualFunc")):console.warn(`manual bootstrap for ${t} didn't happen`)}))):console.warn("disabling ngDoBootstrap")}_initAngular(e){this.isInitialized=!0,MCe.forEach((t=>{let i=this.factoryResolver.resolveComponentFactory(t),n=Array.prototype.slice.call(document.getElementsByTagName(i.selector)),r=i.selector;0!==n.length&&n.forEach(((t,n)=>{t.id=r+"_"+n,i.selector=i.selector="#"+t.id,e.bootstrap(i)}))}))}_manualBootstrap(e){try{e.components.forEach((e=>{let t=e?.ɵcmp?.selectors?.[0];if(t&&Array.isArray(t)&&(t=t[0]),t){let i=nP(e,{injector:this._injector});customElements.define(t,i)}else console.error("_manualBootstrap: selector is either empty or null")}))}catch(e){console.error("_manualBootstrap: unexpected selector format",e)}}setUserInfoToNgLibrary(){let{branchId:e,preferenceMode:t,j4u:i,zipcode:n,clubCard:r}=window.AB.userInfo,s=f(h({},window.AB.userInfo),{shopStoreId:e,shopZipcode:n,preference:t,clubCardNumber:r,j4uStoreId:i.storeId,j4uZipcode:i.zipcode});this._userInfoService.setUserSession(s),this._commonService.postUserInfoSource.next("initFunc"),this._commonService._postUserInfoSource.next("initFunc")}static{this.ɵprov=Tn({token:e,factory:e.ɵfac})}static{this.ɵfac=function(t){return new(t||e)(lr(lp),lr(hP),lr(Rw),lr(fl),lr(Bw),lr(_w))}}static{this.ɵmod=Xr({type:e})}static{this.ɵinj=Pn({providers:[ek,Ev(Ov())],imports:[RCe,i_.forRoot({})]})}}return e})();ow().bootstrapModule(FCe).catch((e=>console.error("critical bootstrap error: ",e)))}(); 2!function(){"use strict";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,a=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(a,l,s)=>(s=null!=a?e(o(a)):{},((e,o,a,l)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let s of r(o))!i.call(e,s)&&s!==a&&t(e,s,{get:()=>o[s],enumerable:!(l=n(o,s))||l.enumerable});return e})(!l&&a&&a.__esModule?s:t(s,"default",{value:a,enumerable:!0}),a)),s=a(((e,t)=>{var n=t.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)})),c=a(((e,t)=>{var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)})),u=a(((e,t)=>{t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}})),f=a(((e,t)=>{var n=u();t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}})),h=a(((e,t)=>{t.exports=function(e){try{return!!e()}catch{return!0}}})),p=a(((e,t)=>{t.exports=!h()((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))})),d=a(((e,t)=>{var n=u(),r=s().document,o=n(r)&&n(r.createElement);t.exports=function(e){return o?r.createElement(e):{}}})),_=a(((e,t)=>{t.exports=!p()&&!h()((function(){return 7!=Object.defineProperty(d()("div"),"a",{get:function(){return 7}}).a}))})),v=a(((e,t)=>{var n=u();t.exports=function(e,t){if(!n(e))return e;var r,o;
2if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e))||"function"==typeof(r=e.valueOf)&&!n(o=r.call(e))||!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}})),g=a((e=>{var t=f(),n=_(),r=v(),o=Object.defineProperty;e.f=p()?Object.defineProperty:function(e,i,a){if(t(e),i=r(i,!0),t(a),n)try{return o(e,i,a)}catch{}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(e[i]=a.value),e}})),y=a(((e,t)=>{t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}})),k=a(((e,t)=>{var n=g(),r=y();t.exports=p()?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,n){return e[t]=n,e}})),m=a(((e,t)=>{var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}})),b=a(((e,t)=>{var n=0,r=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}})),T=a(((e,t)=>{t.exports=!1})),w=a(((e,t)=>{var n=c(),r=s(),o="__core-js_shared__",i=r[o]||(r[o]={});(t.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:n.version,mode:T()?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),E=a(((e,t)=>{t.exports=w()("native-function-to-string",Function.toString)})),S=a(((e,t)=>{var n=s(),r=k(),o=m(),i=b()("src"),a=E(),l="toString",u=(""+a).split(l);c().inspectSource=function(e){return a.call(e)},(t.exports=function(e,t,a,l){var s="function"==typeof a;s&&(o(a,"name")||r(a,"name",t)),e[t]!==a&&(s&&(o(a,i)||r(a,i,e[t]?""+e[t]:u.join(String(t)))),e===n?e[t]=a:l?e[t]?e[t]=a:r(e,t,a):(delete e[t],r(e,t,a)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[i]||a.call(this)}))})),O=a(((e,t)=>{t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}})),P=a(((e,t)=>{var n=O();t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}})),j=a(((e,t)=>{var n=s(),r=c(),o=k(),i=S(),a=P(),l="prototype",u=function(e,t,s){var c,f,h,p,d=e&u.F,_=e&u.G,v=e&u.S,g=e&u.P,y=e&u.B,k=_?n:v?n[t]||(n[t]={}):(n[t]||{})[l],m=_?r:r[t]||(r[t]={}),b=m[l]||(m[l]={});for(c in _&&(s=t),s)h=((f=!d&&k&&void 0!==k[c])?k:s)[c],p=y&&f?a(h,n):g&&"function"==typeof h?a(Function.call,h):h,k&&i(k,c,h,e&u.U),m[c]!=h&&o(m,c,p),g&&b[c]!=h&&(b[c]=h)};n.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u})),D=a((()=>{var e=j(),t=O(),n=f(),r=(s().Reflect||{}).apply,o=Function.apply;e(e.S+e.F*!h()((function(){r((function(){}))})),"Reflect",{apply:function(e,i,a){var l=t(e),s=n(a);return r?r(l,i,s):o.call(l,i,s)}})})),Z=a(((e,t)=>{var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}})),x=a(((e,t)=>{var n=Z();t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}})),C=a(((e,t)=>{t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}})),R=a(((e,t)=>{var n=x(),r=C();t.exports=function(e){return n(r(e))}})),z=a(((e,t)=>{var n=Math.ceil,r=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}})),M=a(((e,t)=>{var n=z(),r=Math.min;t.exports=function(e){return e>0?r(n(e),9007199254740991):0}})),I=a(((e,t)=>{var n=z(),r=Math.max,o=Math.min;t.exports=function(e,t){return(e=n(e))<0?r(e+t,0):o(e,t)}})),A=a(((e,t)=>{var n=R(),r=M(),o=I();t.exports=function(e){return function(t,i,a){var l,s=n(t),c=r(s.length),u=o(a,c);if(e&&i!=i){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===i)return e||u||0;return!e&&-1}}})),L=a(((e,t)=>{var n=w()("keys"),r=b();t.exports=function(e){return n[e]||(n[e]=r(e))}})),N=a(((e,t)=>{var n=m(),r=R(),o=A()(!1),i=L()("IE_PROTO");t.exports=function(e,t){var a,l=r(e),s=0,c=[];for(a in l)a!=i&&n(l,a)&&c.push(a);for(;t.length>s;)n(l,a=t[s++])&&(~o(c,a)||c.push(a));return c}})),F=a(((e,t)=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleStr
2ing,toString,valueOf".split(",")})),H=a(((e,t)=>{var n=N(),r=F();t.exports=Object.keys||function(e){return n(e,r)}})),G=a(((e,t)=>{var n=g(),r=f(),o=H();t.exports=p()?Object.defineProperties:function(e,t){r(e);for(var i,a=o(t),l=a.length,s=0;l>s;)n.f(e,i=a[s++],t[i]);return e}})),W=a(((e,t)=>{var n=s().document;t.exports=n&&n.documentElement})),q=a(((e,t)=>{var n=f(),r=G(),o=F(),i=L()("IE_PROTO"),a=function(){},l="prototype",s=function(){var e,t=d()("iframe"),n=o.length;for(t.style.display="none",W().appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),s=e.F;n--;)delete s[l][o[n]];return s()};t.exports=Object.create||function(e,t){var o;return null!==e?(a[l]=n(e),o=new a,a[l]=null,o[i]=e):o=s(),void 0===t?o:r(o,t)}})),B=a(((e,t)=>{t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}})),U=a(((e,t)=>{var n=O(),r=u(),o=B(),i=[].slice,a={};t.exports=Function.bind||function(e){var t=n(this),l=i.call(arguments,1),s=function(){var n=l.concat(i.call(arguments));return this instanceof s?function(e,t,n){if(!(t in a)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";a[t]=Function("F,a","return new F("+r.join(",")+")")}return a[t](e,n)}(t,n.length,n):o(t,n,e)};return r(t.prototype)&&(s.prototype=t.prototype),s}})),V=a((()=>{var e=j(),t=q(),n=O(),r=f(),o=u(),i=h(),a=U(),l=(s().Reflect||{}).construct,c=i((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),p=!i((function(){l((function(){}))}));e(e.S+e.F*(c||p),"Reflect",{construct:function(e,i){n(e),r(i);var s=arguments.length<3?e:n(arguments[2]);if(p&&!c)return l(e,i,s);if(e==s){switch(i.length){case 0:return new e;case 1:return new e(i[0]);case 2:return new e(i[0],i[1]);case 3:return new e(i[0],i[1],i[2]);case 4:return new e(i[0],i[1],i[2],i[3])}var u=[null];return u.push.apply(u,i),new(a.apply(e,u))}var f=s.prototype,h=t(o(f)?f:Object.prototype),d=Function.apply.call(e,h,i);return o(d)?d:h}})})),$=a((()=>{var e=g(),t=j(),n=f(),r=v();t(t.S+t.F*h()((function(){Reflect.defineProperty(e.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,o,i){n(t),o=r(o,!0),n(i);try{return e.f(t,o,i),!0}catch{return!1}}})})),X=a((e=>{e.f={}.propertyIsEnumerable})),Y=a((e=>{var t=X(),n=y(),r=R(),o=v(),i=m(),a=_(),l=Object.getOwnPropertyDescriptor;e.f=p()?l:function(e,s){if(e=r(e),s=o(s,!0),a)try{return l(e,s)}catch{}if(i(e,s))return n(!t.f.call(e,s),e[s])}})),K=a((()=>{var e=j(),t=Y().f,n=f();e(e.S,"Reflect",{deleteProperty:function(e,r){var o=t(n(e),r);return!(o&&!o.configurable)&&delete e[r]}})})),J=a(((e,t)=>{var n=w()("wks"),r=b(),o=s().Symbol,i="function"==typeof o;(t.exports=function(e){return n[e]||(n[e]=i&&o[e]||(i?o:r)("Symbol."+e))}).store=n})),Q=a(((e,t)=>{var n=g().f,r=m(),o=J()("toStringTag");t.exports=function(e,t,i){e&&!r(e=i?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}})),ee=a(((e,t)=>{var n=q(),r=y(),o=Q(),i={};k()(i,J()("iterator"),(function(){return this})),t.exports=function(e,t,a){e.prototype=n(i,{next:r(1,a)}),o(e,t+" Iterator")}})),te=a((()=>{var e=j(),t=f(),n=function(e){this._t=t(e),this._i=0;var n,r=this._k=[];for(n in e)r.push(n)};ee()(n,"Object",(function(){var e,t=this,n=t._k;do{if(t._i>=n.length)return{value:void 0,done:!0}}while(!((e=n[t._i++])in t._t));return{value:e,done:!1}})),e(e.S,"Reflect",{enumerate:function(e){return new n(e)}})})),ne=a(((e,t)=>{var n=C();t.exports=function(e){return Object(n(e))}})),re=a(((e,t)=>{var n=m(),r=ne(),o=L()("IE_PROTO"),i=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=r(e),n(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}})),oe=a((()=>{var e=Y(),t=re(),n=m(),r=j(),o=u(),i=f();r(r.S,"Reflect",{get:function r(a,l){var s,c,u=arguments.length<3?a:arguments[2];return i(a)===u?a[l]:(s=e.f(a,l))?n(s,"value")?s.value:void 0!==s.get?s.get.call(u):void 0:o(c=t(a))?r(c,l,u):void 0}})})),ie=a((()=>{var e=Y(),t=j(),n=f();t(t.S,"Reflect",{getOwnPropertyDescriptor:function(t,r){return e.f(n(t),r)}})})),ae=a((()=>{var e=j(),t=re(),n=f();e(e.S,"Reflect",{getPrototypeOf:function(e){return t(n(e))}})})),le=a((()=>{var e=j();e(e.S,"Reflect",{has:function(e,t){return t in e}})})),se=a((()=>{var e=j(),t=f(),n=Object.isExtensible;e(e.S,"Reflect",{isExtensible:function(e){return t(e),!n||n(e)}})})),ce=a((e=>{var t=N(),n=F().concat("length","prototype");e.f=Object.getOwnPropertyNames||function(e){return t(e,n)}})),ue=a((e=>{e.f=Object.getOwnPropertySymbols})),fe=a(((e,t)=>{var n=ce(),r=ue(),o=f(),i=s().Reflect;t.exports=i&&i.ownKeys||function(e){var t=n.f(o(e)),i=r.f;return i?t.concat(i(e)):t}})),he=a((()=>{var e=j();e(e.S,"Reflect",{ownKeys:fe()})})),pe=a((()=>{var e=j(),t=f(),n=Object.preventExtensions;e(e.S,"Reflect",{preventExtensions:function(e){t(e);try{return n&&n(e),!0}catch{return!1}}})})),de=a((()=>{var e=g(),t=Y(),n=re(),r=m(),o=j(),i=y(),a=f(),l=u();o(o.S,"Reflect",{set:function o(s,c,u){var f,h,p=arguments.length<4?s:arguments[3],d=t.f(a(s),c);
2if(!d){if(l(h=n(s)))return o(h,c,u,p);d=i(0)}if(r(d,"value")){if(!1===d.writable||!l(p))return!1;if(f=t.f(p,c)){if(f.get||f.set||!1===f.writable)return!1;f.value=u,e.f(p,c,f)}else e.f(p,c,i(0,u));return!0}return void 0!==d.set&&(d.set.call(p,u),!0)}})})),_e=a(((e,t)=>{var n=u(),r=f(),o=function(e,t){if(r(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{(n=P()(Function.call,Y().f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch{t=!0}return function(e,r){return o(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:o}})),ve=a((()=>{var e=j(),t=_e();t&&e(e.S,"Reflect",{setPrototypeOf:function(e,n){t.check(e,n);try{return t.set(e,n),!0}catch{return!1}}})})),ge=a(((e,t)=>{D(),V(),$(),K(),te(),oe(),ie(),ae(),le(),se(),he(),pe(),de(),ve(),t.exports=c().Reflect})),ye=a(((e,t)=>{var n=g(),r=y();t.exports=function(e,t,o){t in e?n.f(e,t,r(0,o)):e[t]=o}})),ke=a((()=>{var e=j(),t=fe(),n=R(),r=Y(),o=ye();e(e.S,"Object",{getOwnPropertyDescriptors:function(e){for(var i,a,l=n(e),s=r.f,c=t(l),u={},f=0;c.length>f;)void 0!==(a=s(l,i=c[f++]))&&o(u,i,a);return u}})})),me=a(((e,t)=>{var n=p(),r=H(),o=R(),i=X().f;t.exports=function(e){return function(t){for(var a,l=o(t),s=r(l),c=s.length,u=0,f=[];c>u;)a=s[u++],(!n||i.call(l,a))&&f.push(e?[a,l[a]]:l[a]);return f}}})),be=a((()=>{var e=j(),t=me()(!1);e(e.S,"Object",{values:function(e){return t(e)}})})),Te=a((()=>{var e=j(),t=me()(!0);e(e.S,"Object",{entries:function(e){return t(e)}})})),we=a(((e,t)=>{t.exports=T()||!h()((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete s()[e]}))})),Ee=a((()=>{var e=j(),t=ne(),n=O(),r=g();p()&&e(e.P+we(),"Object",{__defineGetter__:function(e,o){r.f(t(this),e,{get:n(o),enumerable:!0,configurable:!0})}})})),Se=a((()=>{var e=j(),t=ne(),n=O(),r=g();p()&&e(e.P+we(),"Object",{__defineSetter__:function(e,o){r.f(t(this),e,{set:n(o),enumerable:!0,configurable:!0})}})})),Oe=a((()=>{var e=j(),t=ne(),n=v(),r=re(),o=Y().f;p()&&e(e.P+we(),"Object",{__lookupGetter__:function(e){var i,a=t(this),l=n(e,!0);do{if(i=o(a,l))return i.get}while(a=r(a))}})})),Pe=a((()=>{var e=j(),t=ne(),n=v(),r=re(),o=Y().f;p()&&e(e.P+we(),"Object",{__lookupSetter__:function(e){var i,a=t(this),l=n(e,!0);do{if(i=o(a,l))return i.set}while(a=r(a))}})})),je=a(((e,t)=>{ke(),be(),Te(),Ee(),Se(),Oe(),Pe(),t.exports=c().Object})),De=a(((e,t)=>{var n=J()("unscopables"),r=Array.prototype;null==r[n]&&k()(r,n,{}),t.exports=function(e){r[n][e]=!0}})),Ze=a((()=>{var e=j(),t=A()(!0);e(e.P,"Array",{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),De()("includes")})),xe=a(((e,t)=>{var n=Z();t.exports=Array.isArray||function(e){return"Array"==n(e)}})),Ce=a(((e,t)=>{var n=xe(),r=u(),o=M(),i=P(),a=J()("isConcatSpreadable");t.exports=function e(t,l,s,c,u,f,h,p){for(var d,_,v=u,g=0,y=!!h&&i(h,p,3);g<c;){if(g in s){if(d=y?y(s[g],g,l):s[g],_=!1,r(d)&&(_=void 0!==(_=d[a])?!!_:n(d)),_&&f>0)v=e(t,l,d,o(d.length),v,f-1)-1;else{if(v>=9007199254740991)throw TypeError();t[v]=d}v++}g++}return v}})),Re=a(((e,t)=>{var n=u(),r=xe(),o=J()("species");t.exports=function(e){var t;return r(e)&&("function"==typeof(t=e.constructor)&&(t===Array||r(t.prototype))&&(t=void 0),n(t)&&(null===(t=t[o])&&(t=void 0))),void 0===t?Array:t}})),ze=a(((e,t)=>{var n=Re();t.exports=function(e,t){return new(n(e))(t)}})),Me=a((()=>{var e=j(),t=Ce(),n=ne(),r=M(),o=O(),i=ze();e(e.P,"Array",{flatMap:function(e){var a,l,s=n(this);return o(e),a=r(s.length),l=i(s,0),t(l,s,s,a,0,1,e,arguments[1]),l}}),De()("flatMap")})),Ie=a((()=>{var e=j(),t=Ce(),n=ne(),r=M(),o=z(),i=ze();e(e.P,"Array",{flatten:function(){var e=arguments[0],a=n(this),l=r(a.length),s=i(a,0);return t(s,a,a,l,0,void 0===e?1:o(e)),s}}),De()("flatten")})),Ae=a(((e,t)=>{Ze(),Me(),Ie(),t.exports=c().Array})),Le=globalThis;function Ne(e){return(Le.__Zone_symbol_prefix||"__zone_symbol__")+e}var Fe=Object.getOwnPropertyDescriptor,He=Object.defineProperty,Ge=Object.getPrototypeOf,We=Object.create,qe=Array.prototype.slice,Be="addEventListener",Ue="removeEventListener",Ve=Ne(Be),$e=Ne(Ue),Xe="true",Ye="false",Ke=Ne("");function Je(e,t){return Zone.current.wrap(e,t)}function Qe(e,t,n,r,o){return Zone.current.scheduleMacroTask(e,t,n,r,o)}var et=Ne,tt=typeof window<"u",nt=tt?window:void 0,rt=tt&&nt||globalThis,ot="removeAttribute";function it(e,t){for(let n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=Je(e[n],t+"_"+n));return e}function at(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}var lt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,st=!("nw"in rt)&&typeof rt.process<"u"&&"[object process]"===rt.process.toString(),ct=!st&&!lt&&!(!tt||!nt.HTMLElement),ut=typeof rt.process<"u"&&"[object process]"===rt.process.toString()&&!lt&&!(!tt||!nt.HTMLElement),ft={},ht=et("enable_beforeunload"),pt=function(e){if(!(e=e||rt.event))return;let t=ft[e.type];t||(t=ft[e.type]=et("ON_PROPERTY"+e.type));let n,r=this||e.target||rt,o=r[t];if(ct&&r===nt&&"error"===e.type){let t=e;n=o&&o.call(this,t.message,t.filename,t.lineno,t.colno,t.error),!0===n&&e.preventDefault()}else n=o&&o.apply(this,arguments),"beforeunload"===e.type&&rt[ht]&&"string"==typeof n?e.returnValue=n:null!=n&&!n&&e.preventDefault();return n};function dt(e,t,n){let r=Fe(e,t);if(!r&&n&&Fe(n,t)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;let o=et("on"+t+"patched");if(e.hasOwnProperty(o)&&e[o])return;delete r.writable,delete r.value;let i=r.get,a=r.set,l=t.slice(2),s=ft[l];s||(s=ft[l]=et("ON_PROPERTY"+l)),r.set=function(t){let n=this;!n&&e===rt&&(n=rt),n&&("function"==typeof n[s]&&n.removeEventListener(l,pt),a&&a.call(n,null),n[s]=t,"function"==typeof t&&n.addEventListener(l,pt,!1))},r.get=function(){let n=this;if(!n&&e===rt&&(n=rt),!n)return null;let o=n[s];if(o)return o;if(i){let e=i.call(this);if(e)return r.set.call(this,e),"function"==typeof n[ot]&&n.removeAttribute(t),e}return null},He(e,t,r),e[o]=!0}function _t(e,t,n){if(t)for(let r=0;r<t.length;r++)dt(e,"on"+t[r],n);else{let t=[];for(let n in e)"on"==n.slice(0,2)&&t.push(n);for(let r=0;r<t.length;r++)dt(e,t[r],n)}}var vt=et("originalInstance");function gt(e){let t=rt[e];if(!t)return;rt[et(e)]=t,rt[e]=function(){let n=it(arguments,e);switch(n.length){case 0:this[vt]=new t;break;case 1:this[vt]=new t(n[0]);break;case 2:this[vt]=new t(n[0],n[1]);break;case 3:this[vt]=new t(n[0],n[1],n[2]);break;case 4:this[vt]=new t(n[0],n[1],n[2],n[3]);break;default:throw new Error("Arg list too long.")}},mt(rt[e],t);let n,r=new t((function(){}));for(n in r)"XMLHttpRequest"===e&&"responseBlob"===n||function(t){"function"==typeof r[t]?rt[e].prototype[t]=function(){return this[vt][t].apply(this[vt],arguments)}
2:He(rt[e].prototype,t,{set:function(n){"function"==typeof n?(this[vt][t]=Je(n,e+"."+t),mt(this[vt][t],n)):this[vt][t]=n},get:function(){return this[vt][t]}})}(n);for(n in t)"prototype"!==n&&t.hasOwnProperty(n)&&(rt[e][n]=t[n])}function yt(e,t,n){let r=e;for(;r&&!r.hasOwnProperty(t);)r=Ge(r);!r&&e[t]&&(r=e);let o=et(t),i=null;if(r&&(!(i=r[o])||!r.hasOwnProperty(o))){if(i=r[o]=r[t],at(r&&Fe(r,t))){let e=n(i,o,t);r[t]=function(){return e(this,arguments)},mt(r[t],i)}}return i}function kt(e,t,n){let r=null;function o(e){let t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},r.apply(t.target,t.args),e}r=yt(e,t,(e=>function(t,r){let i=n(t,r);return i.cbIdx>=0&&"function"==typeof r[i.cbIdx]?Qe(i.name,r[i.cbIdx],i,o):e.apply(t,r)}))}function mt(e,t){e[et("OriginalDelegate")]=t}var bt=!1,Tt=!1;function wt(){if(bt)return Tt;bt=!0;try{let e=nt.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(Tt=!0)}catch{}return Tt}function Et(e){return"function"==typeof e}function St(e){return"number"==typeof e}var Ot=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){Ot=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{Ot=!1}var Pt={useG:!0},jt={},Dt={},Zt=new RegExp("^"+Ke+"(\\w+)(true|false)$"),xt=et("propagationStopped");function Ct(e,t){let n=(t?t(e):e)+Ye,r=(t?t(e):e)+Xe,o=Ke+n,i=Ke+r;jt[e]={},jt[e][Ye]=o,jt[e][Xe]=i}function Rt(e,t,n,r){let o=r&&r.add||Be,i=r&&r.rm||Ue,a=r&&r.listeners||"eventListeners",l=r&&r.rmAll||"removeAllListeners",s=et(o),c="."+o+":",u="prependListener",f="."+u+":",h=function(e,t,n){if(e.isRemoved)return;let r,o=e.callback;"object"==typeof o&&o.handleEvent&&(e.callback=e=>o.handleEvent(e),e.originalDelegate=o);try{e.invoke(e,t,[n])}catch(e){r=e}let a=e.options;if(a&&"object"==typeof a&&a.once){let r=e.originalDelegate?e.originalDelegate:e.callback;t[i].call(t,n.type,r,a)}return r};function p(n,r,o){if(!(r=r||e.event))return;let i=n||r.target||e,a=i[jt[r.type][o?Xe:Ye]];if(a){let e=[];
2if(1===a.length){let t=h(a[0],i,r);t&&e.push(t)}else{let t=a.slice();for(let n=0;n<t.length&&(!r||!0!==r[xt]);n++){let o=h(t[n],i,r);o&&e.push(o)}}if(1===e.length)throw e[0];for(let n=0;n<e.length;n++){let r=e[n];t.nativeScheduleMicroTask((()=>{throw r}))}}}let d=function(e){return p(this,e,!1)},_=function(e){return p(this,e,!0)};function v(t,n){if(!t)return!1;let r=!0;n&&void 0!==n.useG&&(r=n.useG);let h=n&&n.vh,p=!0;n&&void 0!==n.chkDup&&(p=n.chkDup);let v=!1;n&&void 0!==n.rt&&(v=n.rt);let g=t;for(;g&&!g.hasOwnProperty(o);)g=Ge(g);if(!g&&t[o]&&(g=t),!g||g[s])return!1;let y,k=n&&n.eventNameToString,m={},b=g[s]=g[o],T=g[et(i)]=g[i],w=g[et(a)]=g[a],E=g[et(l)]=g[l];n&&n.prepend&&(y=g[et(n.prepend)]=g[n.prepend]);let S=r?function(e){if(!m.isExisting)return b.call(m.target,m.eventName,m.capture?_:d,m.options)}:function(e){return b.call(m.target,m.eventName,e.invoke,m.options)},O=r?function(e){if(!e.isRemoved){let t,n=jt[e.eventName];n&&(t=n[e.capture?Xe:Ye]);let r=t&&e.target[t];if(r)for(let n=0;n<r.length;n++)if(r[n]===e){r.splice(n,1),e.isRemoved=!0,e.removeAbortListener&&(e.removeAbortListener(),e.removeAbortListener=null),0===r.length&&(e.allRemoved=!0,e.target[t]=null);break}}if(e.allRemoved)return T.call(e.target,e.eventName,e.capture?_:d,e.options)}:function(e){return T.call(e.target,e.eventName,e.invoke,e.options)},P=n&&n.diff?n.diff:function(e,t){let n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},j=Zone[et("UNPATCHED_EVENTS")],D=e[et("PASSIVE_EVENTS")];let Z=function(t,o,i,a,l=!1,s=!1){return function(){let c=this||e,u=arguments[0];n&&n.transferEventName&&(u=n.transferEventName(u));let f=arguments[1];if(!f)return t.apply(this,arguments);if(st&&"uncaughtException"===u)return t.apply(this,arguments);let d=!1;if("function"!=typeof f){if(!f.handleEvent)return t.apply(this,arguments);d=!0}if(h&&!h(t,f,c,arguments))return;let _=Ot&&!!D&&-1!==D.indexOf(u),v=function(e){if("object"==typeof e&&null!==e){let t={...e};return e.signal&&(t.signal=e.signal),t}return e}(function(e,t){return!Ot&&"object"==typeof e&&e?!!e.capture:Ot&&t?"boolean"==typeof e?{capture:e,passive:!0}:e?"object"==typeof e&&!1!==e.passive?{...e,passive:!0}:e:{passive:!0}:e}(arguments[2],_)),g=v?.signal;if(g?.aborted)return;if(j)for(let e=0;e<j.length;e++)if(u===j[e])return _?t.call(c,u,f,v):t.apply(this,arguments);let y=!!v&&("boolean"==typeof v||v.capture),b=!(!v||"object"!=typeof v)&&v.once,T=Zone.current,w=jt[u];w||(Ct(u,k),w=jt[u]);let E=w[y?Xe:Ye],S=c[E],O=!1;if(S){if(O=!0,p)for(let e=0;e<S.length;e++)if(P(S[e],f))return}else S=c[E]=[];let Z,x=c.constructor.name,C=Dt[x];C&&(Z=C[u]),Z||(Z=x+o+(k?k(u):u)),m.options=v,b&&(m.options.once=!1),m.target=c,m.capture=y,m.eventName=u,m.isExisting=O;let R=r?Pt:void 0;R&&(R.taskData=m),g&&(m.options.signal=void 0);let z=T.scheduleEventTask(Z,f,R,i,a);if(g){m.options.signal=g;let e=()=>z.zone.cancelTask(z);t.call(g,"abort",e,{once:!0}),z.removeAbortListener=()=>g.removeEventListener("abort",e)}return m.target=null,R&&(R.taskData=null),b&&(m.options.once=!0),!Ot&&"boolean"==typeof z.options||(z.options=v),z.target=c,z.capture=y,z.eventName=u,d&&(z.originalDelegate=f),s?S.unshift(z):S.push(z),l?c:void 0}};return g[o]=Z(b,c,S,O,v),y&&(g[u]=Z(y,f,(function(e){return y.call(m.target,m.eventName,e.invoke,m.options)}),O,v,!0)),g[i]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let o=arguments[2],i=!!o&&("boolean"==typeof o||o.capture),a=arguments[1];if(!a)return T.apply(this,arguments);if(h&&!h(T,a,t,arguments))return;let l,s=jt[r];s&&(l=s[i?Xe:Ye]);let c=l&&t[l];if(c)for(let e=0;e<c.length;e++){let n=c[e];if(P(n,a)){if(c.splice(e,1),n.isRemoved=!0,0===c.length&&(n.allRemoved=!0,t[l]=null,!i&&"string"==typeof r)){t[Ke+"ON_PROPERTY"+r]=null}return n.zone.cancelTask(n),v?t:void 0}}return T.apply(this,arguments)},g[a]=function(){let t=this||e,r=arguments[0];n&&n.transferEventName&&(r=n.transferEventName(r));let o=[],i=zt(t,k?k(r):r);for(let e=0;e<i.length;e++){let t=i[e],n=t.originalDelegate?t.originalDelegate:t.callback;o.push(n)}return o},g[l]=function(){let t=this||e,r=arguments[0];if(r){n&&n.transferEventName&&(r=n.transferEventName(r));let e=jt[r];
2if(e){let n=e[Ye],o=e[Xe],a=t[n],l=t[o];if(a){let e=a.slice();for(let t=0;t<e.length;t++){let n=e[t],o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}if(l){let e=l.slice();for(let t=0;t<e.length;t++){let n=e[t],o=n.originalDelegate?n.originalDelegate:n.callback;this[i].call(this,r,o,n.options)}}}}else{let e=Object.keys(t);for(let t=0;t<e.length;t++){let n=e[t],r=Zt.exec(n),o=r&&r[1];o&&"removeListener"!==o&&this[l].call(this,o)}this[l].call(this,"removeListener")}if(v)return this},mt(g[o],b),mt(g[i],T),E&&mt(g[l],E),w&&mt(g[a],w),!0}let g=[];for(let e=0;e<n.length;e++)g[e]=v(n[e],r);return g}function zt(e,t){if(!t){let n=[];for(let r in e){let o=Zt.exec(r),i=o&&o[1];if(i&&(!t||i===t)){let t=e[r];if(t)for(let e=0;e<t.length;e++)n.push(t[e])}}return n}let n=jt[t];n||(Ct(t),n=jt[t]);let r=e[n[Ye]],o=e[n[Xe]];return r?o?r.concat(o):r.slice():o?o.slice():[]}function Mt(e,t){let n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",(e=>function(t,n){t[xt]=!0,e&&e.apply(t,n)}))}var It=et("zoneTask");function At(e,t,n,r){let o=null,i=null;n+=r;let a={};function l(t){let n=t.data;n.args[0]=function(){return t.invoke.apply(this,arguments)};let r=o.apply(e,n.args);return St(r)?n.handleId=r:(n.handle=r,n.isRefreshable=Et(r.refresh)),t}function s(t){let{handle:n,handleId:r}=t.data;return i.call(e,n??r)}o=yt(e,t+=r,(n=>
2function(o,i){if(Et(i[0])){let e={isRefreshable:!1,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:void 0,args:i},n=i[0];i[0]=function(){try{return n.apply(this,arguments)}finally{let{handle:t,handleId:n,isPeriodic:r,isRefreshable:o}=e;!r&&!o&&(n?delete a[n]:t&&(t[It]=null))}};let o=Qe(t,i[0],e,l,s);if(!o)return o;let{handleId:c,handle:u,isRefreshable:f,isPeriodic:h}=o.data;if(c)a[c]=o;else if(u&&(u[It]=o,f&&!h)){let e=u.refresh;u.refresh=function(){let{zone:t,state:n}=o;return"notScheduled"===n?(o._state="scheduled",t._updateTaskCount(o,1)):"running"===n&&(o._state="scheduling"),e.call(this)}}return u??c??o}return n.apply(e,i)})),i=yt(e,n,(t=>function(n,r){let o,i=r[0];St(i)?(o=a[i],delete a[i]):(o=i?.[It],o?i[It]=null:o=i),o?.type?o.cancelFn&&o.zone.cancelTask(o):t.apply(e,r)}))}function Lt(e,t,n){if(!n||0===n.length)return t;let r=n.filter((t=>t.target===e));if(!r||0===r.length)return t;let o=r[0].ignoreProperties;return t.filter((e=>-1===o.indexOf(e)))}function Nt(e,t,n,r){if(!e)return;_t(e,Lt(e,t,n),r)}function Ft(e){return Object.getOwnPropertyNames(e).filter((e=>e.startsWith("on")&&e.length>2)).map((e=>e.substring(2)))}function Ht(e,t){if(st&&!ut||Zone[e.symbol("patchEvents")])return;let n=t.__Zone_ignore_on_properties,r=[];if(ct){let e=window;r=r.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let t=function(){try{let e=nt.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:e,ignoreProperties:["error"]}]:[];Nt(e,Ft(e),n&&n.concat(t),Ge(e))}r=r.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let e=0;e<r.length;e++){let o=t[r[e]];o&&o.prototype&&Nt(o.prototype,Ft(o.prototype),n)}}
2function Gt(e){e.__load_patch("ZoneAwarePromise",((e,t,n)=>{let r=Object.getOwnPropertyDescriptor,o=Object.defineProperty;let i=n.symbol,a=[],l=!1!==e[i("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],s=i("Promise"),c=i("then"),u="__creationTrace__";n.onUnhandledError=e=>{if(n.showUncaughtError()){let t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=()=>{for(;a.length;){let e=a.shift();try{e.zone.runGuarded((()=>{throw e.throwOriginal?e.rejection:e}))}catch(e){h(e)}}};let f=i("unhandledPromiseRejectionHandler");function h(e){n.onUnhandledError(e);try{let n=t[f];"function"==typeof n&&n.call(this,e)}catch{}}function p(e){return e&&e.then}function d(e){return e}function _(e){return I.reject(e)}let v=i("state"),g=i("value"),y=i("finally"),k=i("parentPromiseValue"),m=i("parentPromiseState"),b="Promise.then",T=null,w=!0,E=!1,S=0;function O(e,t){return n=>{try{Z(e,t,n)}catch(t){Z(e,!1,t)}}}let P=function(){let e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},j="Promise resolved with itself",D=i("currentTaskTrace");function Z(e,r,i){let s=P();if(e===i)throw new TypeError(j);if(e[v]===T){let c=null;try{("object"==typeof i||"function"==typeof i)&&(c=i&&i.then)}catch(t){return s((()=>{Z(e,!1,t)}))(),e}if(r!==E&&i instanceof I&&i.hasOwnProperty(v)&&i.hasOwnProperty(g)&&i[v]!==T)C(i),Z(e,i[v],i[g]);else if(r!==E&&"function"==typeof c)try{c.call(i,s(O(e,r)),s(O(e,!1)))}catch(t){s((()=>{Z(e,!1,t)}))()}else{e[v]=r;let s=e[g];if(e[g]=i,e[y]===y&&r===w&&(e[v]=e[m],e[g]=e[k]),r===E&&i instanceof Error){let e=t.currentTask&&t.currentTask.data&&t.currentTask.data[u];e&&o(i,D,{configurable:!0,enumerable:!1,writable:!0,value:e})}for(let t=0;t<s.length;)R(e,s[t++],s[t++],s[t++],s[t++]);if(0==s.length&&r==E){e[v]=S;let r=i;try{throw new Error("Uncaught (in promise): "+function(e){if(e&&e.toString===Object.prototype.toString)return(e.constructor&&e.constructor.name||"")+": "+JSON.stringify(e);return e?e.toString():Object.prototype.toString.call(e)}(i)+(i&&i.stack?"\n"+i.stack:""))}catch(e){r=e}
2l&&(r.throwOriginal=!0),r.rejection=i,r.promise=e,r.zone=t.current,r.task=t.currentTask,a.push(r),n.scheduleMicroTask()}}}return e}let x=i("rejectionHandledHandler");function C(e){if(e[v]===S){try{let n=t[x];n&&"function"==typeof n&&n.call(this,{rejection:e[g],promise:e})}catch{}e[v]=E;for(let t=0;t<a.length;t++)e===a[t].promise&&a.splice(t,1)}}function R(e,t,n,r,o){C(e);let i=e[v],a=i?"function"==typeof r?r:d:"function"==typeof o?o:_;t.scheduleMicroTask(b,(()=>{try{let r=e[g],o=!!n&&y===n[y];o&&(n[k]=r,n[m]=i);let l=t.run(a,void 0,o&&a!==_&&a!==d?[]:[r]);Z(n,!0,l)}catch(e){Z(n,!1,e)}}),n)}let z=function(){},M=e.AggregateError;class I{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(e){return e instanceof I?e:Z(new this(null),w,e)}static reject(e){return Z(new this(null),E,e)}static withResolvers(){let e={};return e.promise=new I(((t,n)=>{e.resolve=t,e.reject=n})),e}static any(e){if(!e||"function"!=typeof e[Symbol.iterator])return Promise.reject(new M([],"All promises were rejected"));let t=[],n=0;try{for(let r of e)n++,t.push(I.resolve(r))}catch{return Promise.reject(new M([],"All promises were rejected"))}if(0===n)return Promise.reject(new M([],"All promises were rejected"));let r=!1,o=[];return new I(((e,i)=>{for(let a=0;a<t.length;a++)t[a].then((t=>{r||(r=!0,e(t))}),(e=>{o.push(e),n--,0===n&&(r=!0,i(new M(o,"All promises were rejected")))}))}))}static race(e){let t,n,r=new this(((e,r)=>{t=e,n=r}));function o(e){t(e)}function i(e){n(e)}for(let t of e)p(t)||(t=this.resolve(t)),t.then(o,i);return r}static all(e){return I.allWithCallback(e)}static allSettled(e){return(this&&this.prototype instanceof I?this:I).allWithCallback(e,{thenCallback:e=>({status:"fulfilled",value:e}),errorCallback:e=>({status:"rejected",reason:e})})}static allWithCallback(e,t){let n,r,o=new this(((e,t)=>{n=e,r=t})),i=2,a=0,l=[];for(let o of e){p(o)||(o=this.resolve(o));let e=a;try{o.then((r=>{l[e]=t?t.thenCallback(r):r,i--,0===i&&n(l)}),(o=>{t?(l[e]=t.errorCallback(o),i--,0===i&&n(l)):r(o)}))}catch(e){r(e)}i++,a++}return i-=2,0===i&&n(l),o}constructor(e){let t=this;
2if(!(t instanceof I))throw new Error("Must be an instanceof Promise.");t[v]=T,t[g]=[];try{let n=P();e&&e(n(O(t,w)),n(O(t,E)))}catch(e){Z(t,!1,e)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return I}then(e,n){let r=this.constructor?.[Symbol.species];(!r||"function"!=typeof r)&&(r=this.constructor||I);let o=new r(z),i=t.current;return this[v]==T?this[g].push(i,o,e,n):R(this,i,o,e,n),o}catch(e){return this.then(null,e)}finally(e){let n=this.constructor?.[Symbol.species];(!n||"function"!=typeof n)&&(n=I);let r=new n(z);r[y]=y;let o=t.current;return this[v]==T?this[g].push(o,r,e,e):R(this,o,r,e,e),r}}I.resolve=I.resolve,I.reject=I.reject,I.race=I.race,I.all=I.all;let A=e[s]=e.Promise;e.Promise=I;let L=i("thenPatched");function N(e){let t=e.prototype,n=r(t,"then");if(n&&(!1===n.writable||!n.configurable))return;let o=t.then;t[c]=o,e.prototype.then=function(e,t){return new I(((e,t)=>{o.call(this,e,t)})).then(e,t)},e[L]=!0}return n.patchThen=N,A&&(N(A),yt(e,"fetch",(e=>function(e){return function(t,n){let r=e.apply(t,n);if(r instanceof I)return r;let o=r.constructor;return o[L]||N(o),r}}(e)))),Promise[t.__symbol__("uncaughtPromiseErrors")]=a,I}))}function Wt(e,t,n,r,o){let i=Zone.__symbol__(r);if(t[i])return;let a=t[i]=t[r];t[r]=function(i,l,s){return l&&l.prototype&&o.forEach((function(t){let o=`${n}.${r}::`+t,i=l.prototype;try{if(i.hasOwnProperty(t)){let n=e.ObjectGetOwnPropertyDescriptor(i,t);n&&n.value?(n.value=e.wrapWithCurrentZone(n.value,o),e._redefineProperty(l.prototype,t,n)):i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}else i[t]&&(i[t]=e.wrapWithCurrentZone(i[t],o))}catch{}})),a.call(t,i,l,s)},e.attachOriginToPatched(t[r],a)}var qt,Bt=function(){let e=globalThis,t=!0===e[Ne("forceDuplicateZoneCheck")];if(e.Zone&&(t||"function"!=typeof e.Zone.__symbol__))throw new Error("Zone already loaded.");return e.Zone??=function(){let e=Le.performance;function t(t){e&&e.mark&&e.mark(t)}function n(t,n){e&&e.measure&&e.measure(t,n)}t("Zone");let r=(()=>{class e{static{this.__symbol__=Ne}static assertZonePatched(){if(Le.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=e.current;for(;t.parent;)t=t.parent;return t}static get current(){return j.zone}static get currentTask(){return D}static __load_patch(r,o,i=!1){if(O.hasOwnProperty(r)){let e=!0===Le[Ne("forceDuplicateZoneCheck")];if(!i&&e)throw Error("Already loaded patch: "+r)}else if(!Le["__Zone_disable_"+r]){let i="Zone:"+r;t(i),O[r]=o(Le,e,P),n(i,i)}}get parent(){return this._parent}get name(){return this._name}constructor(e,t){this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new i(this,this._parent&&this._parent._zoneDelegate,t)}get(e){let t=this.getZoneWith(e);if(t)return t._properties[e]}getZoneWith(e){let t=this;for(;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null}fork(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)}wrap(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);let n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}}run(e,t,n,r){j={parent:j,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{j=j.parent}}runGuarded(e,t=null,n,r){j={parent:j,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{j=j.parent}}runTask(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||v).name+"; Execution: "+this.name+")");let r=e,{type:o,data:{isPeriodic:i=!1,isRefreshable:a=!1}={}}=e;if(e.state===g&&(o===S||o===E))return;let l=e.state!=m;l&&r._transitionTo(m,k);let s=D;D=r,j={parent:j,zone:this};try{o==E&&e.data&&!i&&!a&&(e.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,r,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{let t=e.state;if(t!==g&&t!==T)if(o==S||i||a&&t===y)l&&r._transitionTo(k,m,y);else{let e=r._zoneDelegates;this._updateTaskCount(r,-1),l&&r._transitionTo(g,m,g),a&&(r._zoneDelegates=e)}j=j.parent,D=s}}scheduleTask(e){if(e.zone&&e.zone!==this){let t=this;for(;t;){if(t===e.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${e.zone.name}`);t=t.parent}}e._transitionTo(y,g);let t=[];e._zoneDelegates=t,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(T,y,g),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===t&&this._updateTaskCount(e,1),e.state==y&&e._transitionTo(k,y),e}scheduleMicroTask(e,t,n,r){return this.scheduleTask(new a(w,e,t,n,r,void 0))}scheduleMacroTask(e,t,n,r,o){return this.scheduleTask(new a(E,e,t,n,r,o))}scheduleEventTask(e,t,n,r,o){return this.scheduleTask(new a(S,e,t,n,r,o))}cancelTask(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||v).name+"; Execution: "+this.name+")");if(e.state===k||e.state===m){e._transitionTo(b,k,m);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(g,b),e.runCount=-1,e}}_updateTaskCount(e,t){let n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(let r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)}}return e})(),o={name:"",onHasTask:(e,t,n,r)=>e.hasTask(n,r),onScheduleTask:(e,t,n,r)=>e.scheduleTask(n,r),onInvokeTask:(e,t,n,r,o,i)=>e.invokeTask(n,r,o,i),onCancelTask:(e,t,n,r)=>e.cancelTask(n,r)};class i{get zone(){return this._zone}constructor(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this._zone:t._forkCurrZone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this._zone:t._interceptCurrZone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this._zone:t._invokeCurrZone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this._zone:t._handleErrorCurrZone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this._zone:t._scheduleTaskCurrZone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this._zone:t._invokeTaskCurrZone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this._zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let r=n&&n.onHasTask,i=t&&t._hasTaskZS;(r||i)&&(this._hasTaskZS=r?n:o,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,n.onScheduleTask||(this._scheduleTaskZS=o,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this._zone),n.onInvokeTask||(this._invokeTaskZS=o,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this._zone),n.onCancelTask||(this._cancelTaskZS=o,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this._zone))}fork(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new r(e,t)}intercept(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t}invoke(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,o):t.apply(n,r)}handleError(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)}scheduleTask(e,t){let n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t),n||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=w)throw new Error("Task is missing scheduleFn.");d(t)}return n}invokeTask(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)}cancelTask(e,t){let n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n}hasTask(e,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}}_updateTaskCount(e,t){let n=this._taskCounts,r=n[e],o=n[e]=r+t;if(o<0)throw new Error("More tasks executed then were scheduled.");
2if(0==r||0==o){let t={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};this.hasTask(this._zone,t)}}}class a{constructor(e,t,n,r,o,i){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=e,this.source=t,this.data=r,this.scheduleFn=o,this.cancelFn=i,!n)throw new Error("callback is not defined");this.callback=n;let l=this;e===S&&r&&r.useG?this.invoke=a.invokeTask:this.invoke=function(){return a.invokeTask.call(Le,l,this,arguments)}}static invokeTask(e,t,n){e||(e=this),Z++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==Z&&_(),Z--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(g,y)}_transitionTo(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(`${this.type} '${this.source}': can not transition to '${e}', expecting state '${t}'${n?" or '"+n+"'":""}, was '${this._state}'.`);this._state=e,e==g&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let l,s=Ne("setTimeout"),c=Ne("Promise"),u=Ne("then"),f=[],h=!1;function p(e){if(l||Le[c]&&(l=Le[c].resolve(0)),l){let t=l[u];t||(t=l.then),t.call(l,e)}else Le[s](e,0)}function d(e){0===Z&&0===f.length&&p(_),e&&f.push(e)}function _(){if(!h){for(h=!0;f.length;){let e=f;f=[];for(let t=0;t<e.length;t++){let n=e[t];try{n.zone.runTask(n,null,null)}catch(e){P.onUnhandledError(e)}}}P.microtaskDrainDone(),h=!1}}let v={name:"NO ZONE"},g="notScheduled",y="scheduling",k="scheduled",m="running",b="canceling",T="unknown",w="microTask",E="macroTask",S="eventTask",O={},P={symbol:Ne,currentZoneFrame:()=>j,onUnhandledError:x,microtaskDrainDone:x,scheduleMicroTask:d,showUncaughtError:()=>!r[Ne("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:x,patchMethod:()=>x,bindArguments:()=>[],patchThen:()=>x,patchMacroTask:()=>x,patchEventPrototype:()=>x,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>x,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>x,wrapWithCurrentZone:()=>x,filterProperties:()=>[],attachOriginToPatched:()=>x,_redefineProperty:()=>x,patchCallbacks:()=>x,nativeScheduleMicroTask:p},j={parent:null,zone:new r(null,null)},D=null,Z=0;function x(){}return n("Zone","Zone"),r}(),e.Zone}();Gt(qt=Bt),function(e){e.__load_patch("toString",(e=>{let t=Function.prototype.toString,n=et("OriginalDelegate"),r=et("Promise"),o=et("Error"),i=function(){if("function"==typeof this){let i=this[n];if(i)return"function"==typeof i?t.call(i):Object.prototype.toString.call(i);if(this===Promise){let n=e[r];if(n)return t.call(n)}if(this===Error){let n=e[o];if(n)return t.call(n)}}return t.call(this)};i[n]=t,Function.prototype.toString=i;let a=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":a.call(this)}}))}(qt),function(e){e.__load_patch("util",((e,t,n)=>{let r=Ft(e);n.patchOnProperties=_t,n.patchMethod=yt,n.bindArguments=it,n.patchMacroTask=kt;let o=t.__symbol__("BLACK_LISTED_EVENTS"),i=t.__symbol__("UNPATCHED_EVENTS");e[i]&&(e[o]=e[i]),e[o]&&(t[o]=t[i]=e[o]),n.patchEventPrototype=Mt,n.patchEventTarget=Rt,n.isIEOrEdge=wt,n.ObjectDefineProperty=He,n.ObjectGetOwnPropertyDescriptor=Fe,n.ObjectCreate=We,n.ArraySlice=qe,n.patchClass=gt,n.wrapWithCurrentZone=Je,n.filterProperties=Lt,n.attachOriginToPatched=mt,n._redefineProperty=Object.defineProperty,n.patchCallbacks=Wt,n.getGlobalObjects=()=>({globalSources:Dt,zoneSymbolEventNames:jt,eventNames:r,isBrowser:ct,isMix:ut,isNode:st,TRUE_STR:Xe,FALSE_STR:Ye,ZONE_SYMBOL_PREFIX:Ke,ADD_EVENT_LISTENER_STR:Be,REMOVE_EVENT_LISTENER_STR:Ue})}))}(qt),function(e){e.__load_patch("legacy",(t=>{let n=t[e.__symbol__("legacyPatch")];n&&n()})),e.__load_patch("timers",(e=>{let t="set",n="clear";At(e,t,n,"Timeout"),At(e,t,n,"Interval"),At(e,t,n,"Immediate")})),e.__load_patch("requestAnimationFrame",(e=>{At(e,"request","cancel","AnimationFrame"),At(e,"mozRequest","mozCancel","AnimationFrame"),At(e,"webkitRequest","webkitCancel","AnimationFrame")})),e.__load_patch("blocking",((e,t)=>
2{let n=["alert","prompt","confirm"];for(let r=0;r<n.length;r++){yt(e,n[r],((n,r,o)=>function(r,i){return t.current.run(n,e,i,o)}))}})),e.__load_patch("EventTarget",((e,t,n)=>{(function(e,t){t.patchEventPrototype(e,t)})(e,n),function(e,t){if(Zone[t.symbol("patchEventTarget")])return;let{eventNames:n,zoneSymbolEventNames:r,TRUE_STR:o,FALSE_STR:i,ZONE_SYMBOL_PREFIX:a}=t.getGlobalObjects();for(let e=0;e<n.length;e++){let t=n[e],l=a+(t+i),s=a+(t+o);r[t]={},r[t][i]=l,r[t][o]=s}let l=e.EventTarget;l&&l.prototype&&t.patchEventTarget(e,t,[l&&l.prototype])}(e,n);let r=e.XMLHttpRequestEventTarget;r&&r.prototype&&n.patchEventTarget(e,n,[r.prototype])})),e.__load_patch("MutationObserver",((e,t,n)=>{gt("MutationObserver"),gt("WebKitMutationObserver")})),e.__load_patch("IntersectionObserver",((e,t,n)=>{gt("IntersectionObserver")})),e.__load_patch("FileReader",((e,t,n)=>{gt("FileReader")})),e.__load_patch("on_property",((e,t,n)=>{Ht(n,e)})),e.__load_patch("customElements",((e,t,n)=>{!function(e,t){let{isBrowser:n,isMix:r}=t.getGlobalObjects();if(!n&&!r||!e.customElements||!("customElements"in e))return;t.patchCallbacks(t,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"])}(e,n)})),e.__load_patch("XHR",((e,t)=>{!function(e){let s=e.XMLHttpRequest;if(!s)return;let c=s.prototype;let u=c[Ve],f=c[$e];if(!u){let t=e.XMLHttpRequestEventTarget;if(t){let e=t.prototype;u=e[Ve],f=e[$e]}}let h="readystatechange",p="scheduled";function d(e){let r=e.data,a=r.target;a[i]=!1,a[l]=!1;let s=a[o];u||(u=a[Ve],f=a[$e]),s&&f.call(a,h,s);let c=a[o]=()=>{if(a.readyState===a.DONE)if(!r.aborted&&a[i]&&e.state===p){let n=a[t.__symbol__("loadfalse")];if(0!==a.status&&n&&n.length>0){let o=e.invoke;e.invoke=function(){let n=a[t.__symbol__("loadfalse")];for(let t=0;t<n.length;t++)n[t]===e&&n.splice(t,1);!r.aborted&&e.state===p&&o.call(e)},n.push(e)}else e.invoke()}else!r.aborted&&!1===a[i]&&(a[l]=!0)};return u.call(a,h,c),a[n]||(a[n]=e),m.apply(a,r.args),a[i]=!0,e}function _(){}function v(e){let t=e.data;return t.aborted=!0,b.apply(t.target,t.args)}let g=yt(c,"open",(()=>function(e,t){return e[r]=0==t[2],e[a]=t[1],g.apply(e,t)})),y=et("fetchTaskAborting"),k=et("fetchTaskScheduling"),m=yt(c,"send",(()=>function(e,n){if(!0===t.current[k]||e[r])return m.apply(e,n);{let t={target:e,url:e[a],isPeriodic:!1,args:n,aborted:!1},r=Qe("XMLHttpRequest.send",_,t,d,v);e&&!0===e[l]&&!t.aborted&&r.state===p&&r.invoke()}})),b=yt(c,"abort",(()=>function(e,r){let o=function(e){return e[n]}(e);if(o&&"string"==typeof o.type){if(null==o.cancelFn||o.data&&o.data.aborted)return;o.zone.cancelTask(o)}else if(!0===t.current[y])return b.apply(e,r)}))}(e);let n=et("xhrTask"),r=et("xhrSync"),o=et("xhrListener"),i=et("xhrScheduled"),a=et("xhrURL"),l=et("xhrErrorBeforeScheduled")})),e.__load_patch("geolocation",(e=>{e.navigator&&e.navigator.geolocation&&function(e,t){let n=e.constructor.name;for(let r=0;r<t.length;r++){let o=t[r],i=e[o];if(i){if(!at(Fe(e,o)))continue;e[o]=(e=>{let t=function(){return e.apply(this,it(arguments,n+"."+o))};return mt(t,e),t})(i)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])})),e.__load_patch("PromiseRejectionEvent",((e,t)=>{function n(t){return function(n){zt(e,t).forEach((r=>{let o=e.PromiseRejectionEvent;if(o){let e=new o(t,{promise:n.promise,reason:n.rejection});r.invoke(e)}}))}}e.PromiseRejectionEvent&&(t[et("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[et("rejectionHandledHandler")]=n("rejectionhandled"))})),e.__load_patch("queueMicrotask",((e,t,n)=>{!function(e,t){t.patchMethod(e,"queueMicrotask",(e=>function(e,t){Zone.current.scheduleMicroTask("queueMicrotask",t[0])}))}(e,n)}))}(Bt);l(ge()),l(je()),l(Ae());!function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;let e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}(),window.global=window}(); 3!function(){"use strict"; 4/*! (C) Andrea Giammarchi - @WebReflection - ISC Style License */!function(e,t){function n(){var e=C.splice(0,C.length);for(nt=0;e.length;)e.shift().call(null,e.shift())}function r(e,t){for(var n=0,r=e.length;n<r;n++)p(e[n],t)}function o(e){return function(t){qe(t)&&(p(t,e),se.length&&r(t.querySelectorAll(se),e))}}function l(e){var t=Ke.call(e,"is"),n=e.nodeName.toUpperCase(),r=fe.call(ue,t?le+t.toUpperCase():oe+n);return t&&-1<r&&!a(n,t)?-1:r}function a(e,t){return-1<se.indexOf(e+'[is="'+t+'"]')}function i(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[J]||2,a=e[ee]||3;!ut||o&&o!==t||!t[K]||"style"===r||e.prevValue===e.newValue&&(""!==e.newValue||n!==l&&n!==a)||t[K](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function u(e){var t=o(e);return function(e){C.push(t,e.target),nt&&clearTimeout(nt),nt=setTimeout(n,1)}}function c(e){it&&(it=!1,e.currentTarget.removeEventListener(ne,c)),se.length&&r((e.target||g).querySelectorAll(se),e.detail===G?G:Z),ke&&function(){for(var e,t=0,n=Be.length;t<n;t++)e=Be[t],me.contains(e)||(n--,Be.splice(t--,1),p(e,G))}()}function s(e,t){var n=this;Qe.call(n,e,t),w.call(n,{target:n})}function m(e,t,n){var r=t.apply(e,n),o=l(r);return-1<o&&F(r,ce[o]),n.pop()&&se.length&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],F(t,ce[l(t)])}(r.querySelectorAll(se)),r}function f(e,t){Pe(e,t),N?N.observe(e,et):(at&&(e.setAttribute=s,e[q]=O(e),e[B](re,w)),e[B](te,i)),e[W]&&ut&&(e.created=!0,e[W](),e.created=!1)}function d(e){throw new Error("A "+e+" type is already registered")}function p(e,t){var n,r,o=l(e);-1<o&&!Ge.call(e,"TEMPLATE")&&(I(e,ce[o]),o=0,t!==Z||e[Z]?t!==G||e[G]||(e[Z]=!1,e[G]=!0,r="disconnected",o=1):(e[G]=!1,e[Z]=!0,r="connected",o=1,ke&&fe.call(Be,e)<0&&Be.push(e)),o&&(n=e[t+j]||e[r+j])&&n.call(e))}function h(){}function T(e,t,n){var r=n&&n[z]||"",o=t.prototype,l=Ve(o),a=t.observedAttributes||Le,i={prototype:l};xe(l,W,{value:function(){if(Ne)Ne=!1;else if(!this[be]){this[be]=!0,new t(this),o[W]&&o[W].call(this);var e=De[Fe.get(t)];(!Ce||e.create.length>1)&&E(this)}}}),xe(l,K,{value:function(e){-1<fe.call(a,e)&&o[K]&&o[K].apply(this,arguments)}}),o[$]&&xe(l,X,{value:o[$]}
vendor: 10,207 bytes, line 4
4),o[Q]&&xe(l,Y,{value:o[Q]}),r&&(i[z]=r),e=e.toUpperCase(),De[e]={constructor:t,create:r?[r,Se(e)]:[e]},Fe.set(t,e),g[k](e.toLowerCase(),i),v(e),Ie[e].r()}function L(e){var t=De[e.toUpperCase()];return t&&t.constructor}function M(e){return"string"==typeof e?e:e&&e.is||""}function E(e){for(var t,n=e[K],r=n?e.attributes:Le,o=r.length;o--;)t=r[o],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function v(e){return(e=e.toUpperCase())in Ie||(Ie[e]={},Ie[e].p=new Oe((function(t){Ie[e].r=t}))),Ie[e].p}function H(){ye&&delete e.customElements,Te(e,"customElements",{configurable:!0,value:new h}),Te(e,"CustomElementRegistry",{configurable:!0,value:h});for(var t=y.get(/^HTML[A-Z]*[a-z]/),n=t.length;n--;function(t){var n=e[t];if(n){e[t]=function(e){var t,r;return e||(e=this),e[be]||(Ne=!0,t=De[Fe.get(e.constructor)],(e=(r=Ce&&1===t.create.length)?Reflect.construct(n,Le,t.constructor):g.createElement.apply(g,t.create))[be]=!0,Ne=!1,r||E(e)),e},e[t].prototype=n.prototype;try{n.prototype.constructor=e[t]}catch{Te(n,be,{value:e[t]})}}}(t[n]));g.createElement=function(e,t){var n=M(t);return n?Je.call(this,e,Se(n)):Je.call(this,e)},rt||(lt=!0,g[k](""))}var g=e.document,b=e.Object,y=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(e,t){(t=t.toLowerCase())in i||(i[e]=(i[e]||[]).concat(t),i[t]=i[t.toUpperCase()]=e)},i=(b.create||b)(null),u={};for(n in e)for(o in e[n])for(r=e[n][o],i[o]=r,t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return u.get=function(e){return"string"==typeof e?i[e]||(l.test(e)?[]:""):function(e){var t,n=[];for(t in i)e.test(t)&&n.push(t);return n}(e)},u.set=function(e,t){return l.test(e)?a(e,t):a(t,e),u},u}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});"object"!=typeof t&&(t={type:t||"auto"});var C,w,A,O,N,D,I,F,S,V,P,R,U,_,k="registerElement",x=1e5*e.Math.random()|0,q="__"+k+x,B="addEventListener",Z="attached",j="Callback",G="detached",z="extends",K="attributeChanged"+j,X=Z+j,$="connected"+j,Q="disconnected"+j,W="created"+j,Y=G+j,J="ADDITION",ee="REMOVAL",te="DOMAttrModified",ne="DOMContentLoaded",re="DOMSubtreeModified",oe="<",le="=",ae=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ie=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],ue=[],ce=[],se="",me=g.documentElement,fe=ue.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},de=b.prototype,pe=de.hasOwnProperty,he=de.isPrototypeOf,Te=b.defineProperty,Le=[],Me=b.getOwnPropertyDescriptor,Ee=b.getOwnPropertyNames,ve=b.getPrototypeOf,He=b.setPrototypeOf,ge=!!b.__proto__,be="__dreCEv1",ye=e.customElements,Ce=!/^force/.test(t.type)&&!!(ye&&ye.define&&ye.get&&ye.whenDefined),we=b.create||b,Ae=e.Map||function(){var e,t=[],n=[];return{get:function(e){return n[fe.call(t,e)]},set:function(r,o){(e=fe.call(t,r))<0?n[t.push(r)-1]=o:n[e]=o}}},Oe=e.Promise||function(e){function t(e){for(r=!0;n.length;)n.shift()(e)}var n=[],r=!1,o={catch:function(){return o},then:function(e){return n.push(e),r&&setTimeout(t,1),o}};return e(t),o},Ne=!1,De=we(null),Ie=we(null),Fe=new Ae,Se=function(e){return e.toLowerCase()},Ve=b.create||function e(t){return t?(e.prototype=t,new e):this},Pe=He||(ge?function(e,t){return e.__proto__=t,e}:Ee&&Me?function(){function e(e,t){for(var n,r=Ee(t),o=0,l=r.length;o<l;o++)n=r[o],pe.call(e,n)||Te(e,n,Me(t,n))}return function(t,n){do{e(t,n)}while((n=ve(n))&&!he.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),Re=e.MutationObserver||e.WebKitMutationObserver,Ue=e.HTMLAnchorElement,_e=(e.HTMLElement||e.Element||e.Node).prototype,ke=!he.call(_e,me),xe=ke?function(e,t,n){return e[t]=n.value,e}:Te,qe=ke?function(e){return 1===e.nodeType}:function(e){return he.call(_e,e)},Be=ke&&[],Ze=_e.attachShadow,je=_e.cloneNode,Ge=_e.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},ze=_e.dispatchEvent,Ke=_e.getAttribute,Xe=_e.hasAttribute,$e=_e.removeAttribute,Qe=_e.setAttribute,We=g.createElement,Ye=g.importNode,Je=We,et=Re&&{attributes:!0,characterData:!0,attributeOldValue:!0},tt=Re||function(e){at=!1,me.removeEventListener(te,tt)},nt=0,rt=k in g&&!/^force-all/.test(t.type),ot=!0,lt=!1,at=!0,it=!0,ut=!0;if(Re&&((S=g.createElement("div")).innerHTML="<div><div></div></div>",new Re((function(e,t){if(e[0]&&"childList"==e[0].type&&!e[0].removedNodes[0].childNodes.length){var n=(S=Me(_e,"innerHTML"))&&S.set;n&&Te(_e,"innerHTML",{set:function(e){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,e)}})}t.disconnect(),S=null})).observe(S,{childList:!0,subtree:!0}),S.innerHTML=""),rt||(He||ge?(I=function(e,t){he.call(t,e)||f(e,t)},F=f):(I=function(e,t){e[q]||(e[q]=b(!0),f(e,t))},F=I),ke?(at=!1,V=Me(_e,B),P=V.value,R=function(e){var t=new CustomEvent(te,{bubbles:!0});t.attrName=e,t.prevValue=Ke.call(this,e),t.newValue=null,t[ee]=t.attrChange=2,$e.call(this,e),ze.call(this,t)},U=function(e,t){var n=Xe.call(this,e),r=n&&Ke.call(this,e),o=new CustomEvent(te,{bubbles:!0});Qe.call(this,e,t),o.attrName=e,o.prevValue=n?r:null,o.newValue=t,n?o.MODIFICATION=o.attrChange=1:o[J]=o.attrChange=0,ze.call(this,o)},_=function(e){var t,n=e.currentTarget,r=n[q],o=e.propertyName;r.hasOwnProperty(o)&&(r=r[o],(t=new CustomEvent(te,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[o]||null,null==t.prevValue?t[J]=t.attrChange=0:t.MODIFICATION=t.attrChange=1,ze.call(n,t))},V.value=function(e,t,n){e===te&&this[K]&&this.setAttribute!==U&&(this[q]={className:{name:"class",value:this.className}},this.setAttribute=U,this.removeAttribute=R,P.call(this,"propertychange",_)),P.call(this,e,t,n)},Te(_e,B,V)):Re||(me[B](te,tt),me.setAttribute(q,1),me.removeAttribute(q),at&&(w=function(e){var t,n,r,o=this;if(o===e.target){for(r in t=o[q],o[q]=n=O(o),n){if(!(r in t))return A(0,o,r,t[r],n[r],J);if(n[r]!==t[r])return A(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return A(2,o,r,t[r],n[r],ee)}},A=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,i(a)},O=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)"setAttribute"!==(n=(t=o[l]).name)&&(r[n]=t.value);return r})),g[k]=function(e,t){if(n=e.toUpperCase(),ot&&(ot=!1,Re?(N=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new Re((function(r){for(var o,l,a,i=0,u=r.length;i<u;i++)"childList"===(o=r[i]).type?(n(o.addedNodes,e),n(o.removedNodes,t)):(l=o.target,ut&&l[K]&&"style"!==o.attributeName&&(a=Ke.call(l,o.attributeName))!==o.oldValue&&l[K](o.attributeName,o.oldValue,a))}))}(o(Z),o(G)),(D=function(e){return N.observe(e,{childList:!0,subtree:!0}),e})(g),Ze&&(_e.attachShadow=function(){return D(Ze.apply(this,arguments))})):(C=[],g[B]("DOMNodeInserted",u(Z)),g[B]("DOMNodeRemoved",u(G))),g[B](ne,c),g[B]("readystatechange",c),g.importNode=function(e,t){switch(e.nodeType){case 1:return m(g,Ye,[e,!!t]);case 11:for(var n=g.createDocumentFragment(),r=e.childNodes,o=r.length,l=0;l<o;l++)n.appendChild(g.importNode(r[l],!!t));return n;default:return je.call(e,!!t)}},_e.cloneNode=function(e){return m(this,je,[!!e])}),lt)return lt=!1;if(-2<fe.call(ue,le+n)+fe.call(ue,oe+n)&&d(e),!ae.test(n)||-1<fe.call(ie,n))throw new Error("The type "+e+" is invali
4d");var n,l,a=function(){return s?g.createElement(f,n):g.createElement(f)},i=t||de,s=pe.call(i,z),f=s?t[z].toUpperCase():n;return s&&-1<fe.call(ue,oe+f)&&d(f),l=ue.push((s?le:oe)+n)-1,se=se.concat(se.length?",":"",s?f+'[is="'+e.toLowerCase()+'"]':f),a.prototype=ce[l]=pe.call(i,"prototype")?i.prototype:Ve(_e),se.length&&r(g.querySelectorAll(se),Z),a},g.createElement=Je=function(e,t){var n=M(t),r=n?We.call(g,e,Se(n)):We.call(g,e),o=""+e,l=fe.call(ue,(n?le:oe)+(n||o).toUpperCase()),i=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),i&&(i=a(o.toUpperCase(),n))),ut=!g.createElement.innerHTMLHelper,i&&F(r,ce[l]),r}),addEventListener("beforeunload",(function(){delete g.createElement,delete g.importNode,delete g[k]}),!1),h.prototype={constructor:h,define:Ce?function(e,t,n){if(n)T(e,t,n);else{var r=e.toUpperCase();De[r]={constructor:t,create:[r]},Fe.set(t,r),ye.define(e,t)}}:T,get:Ce?function(e){return ye.get(e)||L(e)}:L,whenDefined:Ce?function(e){return Oe.race([ye.whenDefined(e),v(e)])}:v},!ye||/^force/.test(t.type))H();else if(!t.noBuiltIn)try{!function(t,n,r){var o=new RegExp("^<a\\s+is=('|\")"+r+"\\1></a>$");if(n[z]="a",(t.prototype=Ve(Ue.prototype)).constructor=t,e.customElements.define(r,t,n),!o.test(g.createElement("a",{is:r}).outerHTML)||!o.test((new t).outerHTML))throw n}((function e(){return Reflect.construct(Ue,[],e)}),{},"document-register-element-a"+x)}catch{H()}if(!t.noBuiltIn)try{if(We.call(g,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{Se=function(e){return{is:e.toLowerCase()}}}}(window)}();
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.