1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[680],{106:(e,t,r)=>{r.d(t,{A:()=>i});class i extends Error{constructor({_requestId:e,_canceled:t,...r}){super("Request canceled"),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="AbortError",this.response=r}getResponse(){return this.response}}},1055:e=>{e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=void 0,s=void 0,n=void 0,a=[];return function(){var l,u,c="function"==typeof(l=t)?l():l,h=new Date().getTime(),d=!i||h-i>c;i=h;for(var p=arguments.length,f=Array(p),y=0;y<p;y++)f[y]=arguments[y];if(d&&r.leading)return r.accumulate?Promise.resolve(e.call(this,[f])).then(function(e){return e[0]}):Promise.resolve(e.call.apply(e,[this].concat(f)));if(s?clearTimeout(n):((u={}).promise=new Promise(function(e,t){u.resolve=e,u.reject=t}),s=u),a.push(f),n=setTimeout(o.bind(this),c),r.accumulate){var m=a.length-1;return s.promise.then(function(e){return e[m]})}return s.promise};function o(){var t=s;clearTimeout(n),Promise.resolve(r.accumulate?e.call(this,a):e.apply(this,a[a.length-1])).then(t.resolve,t.reject),a=[],s=null}}},1860:(e,t,r)=>{r.d(t,{m:()=>a});var i=r(29382),s=r(15154);class n extends i.Q{constructor(){super(),this.setup=e=>{if(!s.S$&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}}let a=new n},2550:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(40052),s=r(73911),n=r(79885),a=r(80942),o=r(70086);let l=function(e){let{rfkId:t,dispatch:r}=(0,i.A)(),l=(0,n.A)();l.isInitialized()||l.initialize(e||{});let{query:u,options:c,actions:h}=l,d=(0,o.A)(),p=(0,s.A)(u);return{widgetRef:(0,a.A)(),rfkId:t,state:d,queryResult:p,actions:h,options:c,dispatch:r,query:u}}},3773:(e,t,r)=>{r.d(t,{A:()=>a});var i=r(14232),s=r(26109),n=r(2550);let a=()=>{let{queryResult:{data:{appearance:{templates:{html:{devices:{[s.Yl.DESKTOP]:{content:e=null}={}}={}}={}}={}}={}}={}}}=(0,n.A)();return(0,i.useLayoutEffect)(()=>{e&&document.head.insertAdjacentHTML("afterbegin",e)},[e]),null}},5873:(e,t,r)=>{r.d(t,{w:()=>n});var i=r(49218),s=r(70454);class n{constructor(){Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1})}register(e){s.A.subscribe(e)}unregister(e){s.A.unsubscribe(e)}getDispatcher(){return s.A}initialize(){this.initialized=!0,s.A.dispatch({type:i.A.INITIALIZED,payload:{}})}}},7060:(e,t,r)=>{r.d(t,{Ay:()=>P,eo:()=>I});var i=r(50316),s=r(25482),n=r(22229);let a=(0,s.k)(n.A);class o extends a{constructor(e){super(),this.setRfkId(e)}setSearchFilter(e){return this.setValue("search.filter",e.toJson()),this}}let l=e=>{let t=new o(e);return t.setAppearance({}),t.setAppearanceTemplates({}),t.setAppearanceVariables({}),t};class u extends o{constructor(){super(...arguments),Object.defineProperty(this,"facetTypeFiltersType",{enumerable:!0,configurable:!0,writable:!0,value:"or"})}buildFacetTypeFilters(e,t="or"){if(0!==e.length)return{type:t,values:e}}setSearchFacetTypeFilterType(e){return this.facetTypeFiltersType=e,this}getSearchFacetTypeFilterType(){return this.facetTypeFiltersType}setSearchFacetType(e,t){let r=this.getSearchFacetTypes()||[];return r.find(({name:t})=>t===e)?this.setSearchFacetTypes(r.map(r=>r.name===e?{...t,name:e}:r)):this.setSearchFacetTypes([...r,{...t,name:e}]),this}updateSearchFacetType(e,t){let r=this.getSearchFacetTypes()||[];return this.setSearchFacetType(e,{...r.find(({name:t})=>t===e),...t}),this}addSearchFacetTypeFilter(e,t,r="or"){let i=this.getSearchFacetTypes()||[],s=i.find(({name:t})=>t===e)?.filter?.values||[];return this.updateSearchFacetType(e,{filter:this.buildFacetTypeFilters([...s,t],r)}),this}resetSearchFacetTypeFilter(e){return this.updateSearchFacetType(e,{filter:void 0}),this}removeSearchFacetTypeFilter(e,t){let r=this.getSearchFacetTypes()||[],i=r.find(({name:t})=>t===e)?.filter?.values||[];return this.updateSearchFacetType(e,{filter:this.buildFacetTypeFilters(i.filter(e=>!function e(t,r){if(typeof t!=typeof r)return!1;if("object"==typeof t)if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(let i=0;i<t.length;i++)if(!e(t[i],r[i]))return!1;return!0}else{let i=Object.keys(t),s=Object.keys(r);if(i.length!==s.length)return!1;for(let s of i)if(!e(t[s],r[s]))return!1;return!0}return t===r}(e,t)))}),this}resetSearchFacetTypeFilters(){return(this.getSearchFacetTypes()||[]).forEac
1h(({name:e})=>{this.updateSearchFacetType(e,{filter:void 0})}),this}}let c={[i.b.RECOMMENDATION]:e=>{let t=new o(e);return t.setRecommendationsContent({}),t},[i.b.SEARCH_RESULTS]:e=>{let t=new u(e);return t.setSearchContent({}),t.setSearchFacetAll(!0),t.setSearchOffset(0),t.setSearchSortChoices(!0),t},[i.b.PREVIEW_SEARCH]:e=>{let t=new o(e);return t.setSearchContent({}),t},[i.b.QUESTIONS]:e=>{let t=new u(e);return t.setQuestionsRelatedQuestionsLimit(5),t.setQuestionsExactAnswer({}),t},[i.b.CONTENT_BLOCK]:l,[i.b.HTML_BLOCK]:l,[i.b.SEO]:l,[i.b.BANNER]:l};var h=r(81969),d=r(77376),p=r(91811),f=r(23913),y=r(83325),m=r(23399),g=r(80187);let v=async(e,{items:t,actionSubtype:r="conversion"})=>A(e,"cart",{actionSubtype:r,items:t}),b=async(e,t)=>A(e,"wishlist",t),E=async(e,t)=>{let{orderId:r,orderTotal:i,orderSubtotal:s,coupon:n,items:a,actionSubtype:o="conversion",store:l}=t;return(0,g.Fm)(r)?A(e,"order_confirm",{items:a,transaction:(0,g.M8)(r,i,s,n,l),actionSubtype:o}):void f.Vy.warn("trackEvent :::","Transaction orderId is not defined")},A=async(e,t,{review:r,transaction:i,items:s,customAttributes:n,actionSubtype:a})=>{if(!t)return void f.Vy.warn("trackEvent :::","Event name is not defined");let o=[];e&&s&&(o=(0,g.G$)(e,s));let l={name:t,action:"add",action_sub_type:a,value:{entities:o,transaction:i,review:r,custom_attributes:n,context:h.A.toJson()}};return(0,g.u4)(l)},C=async(e,{items:t,actionSubtype:r})=>{let i=[];if(e&&t&&(i=(0,g.G$)(e,t))&&!(0,g.kz)(i))return void f.Vy.warn("trackEvent :::","A field is missing on one or more of the items provided");let s={action:"view",name:"cart",action_sub_type:r,value:{entities:i,context:h.A.toJson()}};return(0,g.u4)(s)},S=async(e,t)=>{if(!e||(0,y.vB)(e))return void f.Vy.warn("trackEvent :::","User information is empty or not complete");let r=(0,m.D)(h.A.toJson(),{user:{...e.id?{cuid:e.id}:{},...e.eid?{eid:e.eid}:{},...e.email?{email:e.email}:{},...e.fbid?{fbid:e.fbid}:{},...e.address?{address:e.address}:{}}});return(0,g.u4)({action:"identify",name:"login",action_sub_type:t,value:{context:r}})};var _=r(70875),O=r(49218),T=r(70454),R=r(79738),w=r(5873);let I=e=>{let{type:t,options:{setupRequest:r=()=>{}}={}}=R.A.get(e)||{},i=t?((e,t)=>{if(c[e])return c[e](t);throw Error(`Invalid widget type: "${e}"`)})(t,e):new o(e);return i.setRfkId(e),r(i),i};class D extends w.w{constructor(){super(),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(h.A.get()),T.A.subscribe(this)}getContext(){return this.context}setContext(e){this.context=e,this.context.addListener(this)}toggleTrackConsent(e){let t=(0,d.F6)();e?t.user_id?this.context.setUserId(t?.user_id):this.context.setUserUuid((0,d.F6)().uuid):((0,d.a3)(),(0,p.Wc)(!1),t?.user_id&&this.context.setUserId(t?.user_id))}handleAction(e){switch(e.type){case O.A.INITIALIZE:this.initialize();break;case O.A.ADD_TO_CART:{let{entity:t,items:r}=e.payload;v(t,{items:r});break}case O.A.ADD_TO_WISHLIST:{let{entity:t,items:r}=e.payload;b(t,{items:r});break}case O.A.USER_LOGIN:{let{id:t,email:r}=e.payload;S({id:t,email:r});break}case O.A.CART_STATUS:{let{entity:t,items:r}=e.payload;C(t,{items:r});break}case O.A.ORDER_CONFIRM:{let{entity:t,items:r,orderId:i,orderTotal:s,orderSubtotal:n,coupon:a}=e.payload;E(t,{orderId:i,orderTotal:s,orderSubtotal:n,coupon:a,items:r});break}case O.A.WIDGET_APPEAR:{let{rfkId:t,entity:r,items:i,request:s}=e.payload;(0,_.vC)(t,r,{...i.length>0?{items:i}:void 0,request:s})}}}onChange(e,t,r){this.initialized&&T.A.dispatch({type:O.A.PAGE_CONTEXT_CHANGED,payload:{context:this.context}})}}let P=new D},7820:(e,t,r)=>{r.d(t,{A:()=>a});var i=r(14232),s=r(26109),n=r(2550);let a=({initializer:e})=>{let{rfkId:t,widgetRef:r,queryResult:{data:{appearance:{css_names:a=[],templates:{html:{devices:{[s.Yl.DESKTOP]:{content:o=null}={}}={}}={},css:{devices:{[s.Yl.DESKTOP]:{content:l=null}={}}={}}={}}={}}={}}={}}}=(0,n.A)({query:e||(()=>{})}),u=(0,i.useRef)(null);return(0,i.useLayoutEffect)(()=>(u.current&&l&&function(e,t,r){let i=document.querySelector(`[data-rfk-id-style=${e}]`);i||((i=document.createElement("style")).setAttribute("type","text/css"),i.dataset.rfkI
1dStyle=e,t.parentNode?.appendChild(i)),i.innerHTML=r}(t,u.current,l),()=>{!function(e){let t=document.querySelector(`[data-rfk-id-style=${e}]`);t&&t.remove()}(t)}),[t,l]),(0,i.useLayoutEffect)(()=>{u.current&&o&&(u.current.innerHTML=o)},[o]),(0,i.createElement)("div",{ref:r,"data-rfkid":t,className:a.join(" ")},(0,i.createElement)("div",{ref:u}))}},9869:(e,t,r)=>{r.d(t,{G:()=>i,f:()=>s});let i=e=>e&&"object"==typeof e&&!Array.isArray(e),s=()=>"undefined"==typeof document||!document.createElement},13176:(e,t,r)=>{r.d(t,{A:()=>a});var i=r(25482),s=r(71157);let n=(0,i.k)(s.A);class a extends n{}},15154:(e,t,r)=>{r.d(t,{Cp:()=>f,F$:()=>d,G6:()=>C,MK:()=>c,Od:()=>p,S$:()=>i,Zw:()=>n,b_:()=>u,f8:()=>m,gn:()=>a,j3:()=>o,jY:()=>S,lQ:()=>s,nJ:()=>h,pl:()=>_,vh:()=>l,yy:()=>A});let i="undefined"==typeof window||"Deno"in window;function s(){}function n(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function o(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,r){return E(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function u(e,t,r){return E(e)?[{...t,queryKey:e},r]:[e||{},t]}function c(e,t){let{type:r="all",exact:i,fetchStatus:s,predicate:n,queryKey:a,stale:o}=e;if(E(a))if(i){if(t.queryHash!==d(a,t.options))return!1}else{var l;if(l=t.queryKey,!y(l,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(void 0===s||s===t.state.fetchStatus)&&(!n||!!n(t))}function h(e,t){let{exact:r,fetching:i,predicate:s,mutationKey:n}=e;if(E(n)){if(!t.options.mutationKey)return!1;if(r){if(p(t.options.mutationKey)!==p(n))return!1}else{var a;if(a=t.options.mutationKey,!y(a,n))return!1}}return("boolean"!=typeof i||"loading"===t.state.status===i)&&(!s||!!s(t))}function d(e,t){return((null==t?void 0:t.queryKeyHashFn)||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>v(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function f(e,t){return y(e,t)}function y(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!y(e[r],t[r]))}function m(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function g(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e){if(!b(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!b(r)&&!!r.hasOwnProperty("isPrototypeOf")}function b(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){return Array.isArray(e)}function A(e){return new Promise(t=>{setTimeout(t,e)})}function C(e){A(0).then(e)}function S(){if("function"==typeof AbortController)return new AbortController}function _(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let i=g(t)&&g(r);if(i||v(t)&&v(r)){let s=i?t.length:Object.keys(t).length,n=i?r:Object.keys(r),a=n.length,o=i?[]:{},l=0;for(let s=0;s<a;s++){let a=i?s:n[s];o[a]=e(t[a],r[a]),o[a]===t[a]&&l++}return s===a&&l===s?t:o}return r}(e,t):t}},20310:(e,t,r)=>{r.d(t,{BJ:()=>h,UU:()=>u,oq:()=>c});let i=e=>{let t=typeof e;return null!==e&&("object"===t||"function"===t)},s=new Set(["__proto__","prototype","constructor"]),n=new Set("0123456789");function a(e){let t=[],r="",i="start",a=!1;for(let o of e)switch(o){case"\\":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");a&&(r+=o),i="property",a=!a;break;case".":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="property";break}if(a){a=!1,r+=o;break}if(s.has(r))return[];t.push(r),r="",i="property";break;case"[":if("index"===i)throw Error("Invalid character in an index");if("indexEnd"===i){i="index";break}if(a){a=!1,r+=o;break}if("property"===i){if(s.has(r))return[];t.push(r),r=""}i="index";break;case"]":if("index"===i){t.push(Number.parseInt(r,10)),r="",i="indexEnd";break}if("indexEnd"===i)throw Error("Invalid character after an index");default:if("index"===i&&!n.has(o))throw Error("Invalid character in an index");if("indexEnd"===i)throw Error("Invalid character after an index");"start"===i&&(i="property"),a&&(a=!1,r+="\\"),r+=o}switch(a&&(r+="\\"),i){case"property":if(s.has(r))return[];t.push(r);break;case"index":throw Error("Index was not closed");case"start":t.push("")}return t}function o(e,t){if("number"!=typeof t&&Array.isArray(e)){let r=Number.parseInt(t,10);return Number.isInteger(r)&&e[r]===e[t]}return!1}function l(e,t){if(o(e,t))throw Error("Cannot use string index")}function u(e,t,r){if(!i(e)||"string"!=typeof t)return void 0===r?e:r;let s=a(t);if(0===s.length)return r;for(let t=0;t<s.length;t++){let i=s[t];if(null==(e=o(e,i)?t===s.length-1?void 0:null:e[i])){if(t!==s.length-1)return r;break}}return void 0===e?r:e}function c(e,t,r){if(!i(e)||"string"!=typeof t)return e;let s=e,n=a(t);for(let t=0;t<n.length;t++){let s=n[t];
1l(e,s),t===n.length-1?e[s]=r:i(e[s])||(e[s]="number"==typeof n[t+1]?[]:{}),e=e[s]}return s}function h(e,t){if(!i(e)||"string"!=typeof t)return!1;let r=a(t);for(let t=0;t<r.length;t++){let s=r[t];if(l(e,s),t===r.length-1)return delete e[s],!0;if(!i(e=e[s]))return!1}}},20722:(e,t,r)=>{r.d(t,{$:()=>s,A:()=>n});var i=r(14232);let s=(0,i.createContext)({}),n=(0,i.createContext)({})},22229:(e,t,r)=>{var i;r.d(t,{A:()=>h});let s={name:"Appearance",properties:{templates:{type:"model",model:{name:"Templates",properties:{sections:{type:"array"},devices:{type:"array"},keep_variables:{},keep_original_css:{}}}},variables:{type:"model",model:{name:"Variables",properties:{sections:{type:"array"}}}}}},n={name:"Questions",properties:{keyphrase:{},exact_answer:{type:"model",model:{name:"ExactAnswer",properties:{query_types:{type:"array"}}}},related_questions:{type:"model",model:{name:"RelatedQuestions",properties:{limit:{},offset:{}}}}}},a={name:"Content",properties:{fields:{type:"array"}}},o={name:"SearchFilter",properties:{type:{},name:{required:!0},values:{type:"array",required:!0}}},l={name:"Rule",properties:{behaviors:{}
1,blacklist:{type:"model",model:{name:"Blacklist",properties:{filter:{type:"model",model:o,required:!0}}}},boost:{type:"array",model:{name:"Boost",properties:{filter:{type:"model",model:o,required:!0},slots:{type:"array",required:!0}}}},bury:{type:"model",model:{name:"Bury",properties:{filter:{type:"model",model:o,required:!0}}}},include:{type:"array",model:{name:"Include",properties:{filter:{type:"model",model:o,required:!0},slots:{type:"array",required:!0}}}},pin:{type:"array",model:{name:"Pin",properties:{id:{required:!0},slot:{type:"array",required:!0}}}}}},u={name:"FacetSort",properties:{name:{required:!0},order:{required:!0}}};!function(e){e.HARD_FILTERS="hard_filters",e.OTHER_FACET_VALUES="other_facet_values",e.OWN_VALUES="own_values"}(i=i||(i={}));let c={name:"Search",properties:{sort:{type:"model",model:{name:"Sort",properties:{choices:{},value:{type:"model",model:{name:"SortItem",properties:{name:{required:!0},order:{}}},exportKey:["value[0]"],name:"criteria"}}}},content:{type:"model",model:a},facet:{type:"model",model:{name:"Facet",properties:{all:{},max:{},sort:{type:"model",model:u},types:{type:"array",model:{name:"FacetType",properties:{after:{},exclude:{type:"array"},filter:{},filtering_options:{type:"array"},keyphrase:{},max:{},min_count:{},name:{required:!0},sort:{type:"array",model:u}}}}}}},filter:{},group_by:{},limit:{},offset:{},personalization:{type:"model",model:{name:"Personalization",properties:{algorithm:{},fields:{type:"array"},ids:{type:"array"}}}},query:{type:"model",model:{name:"Query",properties:{highlight:{type:"model",model:{name:"Highlight",properties:{fields:{type:"array",required:!0},fragment_size:{},post_tag:{type:"string"},pre_tag:{type:"string"}}}},keyphrase:{required:!0},operator:{},relevance:{type:"array",model:{name:"Relevance",properties:{analyzer:{required:!0},name:{required:!0},weight:{}}}}}}},ranking:{type:"array",model:{name:"Ranking",properties:{name:{required:!0},weight:{}}}},response_context:{type:"model",model:{name:"ResponseContext",properties:{}},merge:!0},rule:{type:"model",model:l},suggestion:{type:"array",model:{name:"Suggestion",properties:{exclude:{},keyphrase_fallback:{},max:{},name:{required:!0}}}},swatch:{type:"model",model:{name:"Swatch",properties:{fields:{type:"array"},group_by:{},max:{}}}}}},h={name:"WidgetItem",buildInterface:!0,properties:{entity:{required:!0},rfk_id:{required:!0,name:"rfkId"},recommendations:{type:"model",model:{name:"Recommendations",properties:{content:{type:"model",model:a},filter:{type:"model",model:o},recipe:{type:"model",model:{name:"RecommendationsRecipe",properties:{id:{},version:{}}}},limit:{},rule:{type:"model",model:l}}}},questions:{type:"model",model:n},rfk_flags:{type:"array",name:"rfkFlags"},search:{type:"model",model:c},sources:{type:"array"},appearance:{type:"model",model:s}}}},23015:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(14232);let s=(e,t)=>{let r=(0,i.useRef)(t),s=(0,i.useRef)(e);return r.current!==t&&(r.current.length!==t.length||r.current.some((e,r)=>e!==t[r]))&&(r.current=t,s.current=e),s}},23399:(e,t,r)=>{r.d(t,{D:()=>function e(t,r,{mutate:s=!1}={}){let n=s?t:Object.assign({},t);return(0,i.G)(t)&&(0,i.G)(r)&&Object.keys(r).forEach(s=>{(0,i.G)(r[s])&&s in t?n[s]=e(t[s],r[s]):Object.assign(n,{[s]:r[s]})}),n}});var i=r(9869)},23913:(e,t,r)=>{var i;r.d(t,{Vy:()=>o}),function(e){e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(i=i||(i={}));let s={none:i.NONE,error:i.ERROR,warn:i.WARN,info:i.INFO,debug:i.DEBUG,trace:i.TRACE},n="Sitecore Search SDK";class a{constructor(e,t=i.NONE,r=n){Object.defineProperty(this,"NONE",{enumerable:!0,configurable:!0,writable:!0,value:i.NONE}),Object.defineProperty(this,"ERROR",{enumerable:!0,configurable:!0,writable:!0,value:i.ERROR}),Object.defineProperty(this,"WARN",{enumerable:!0,configurable:!0,writable:!0,value:i.WARN}),Object.defineProperty(this,"INFO",{enumerable:!0,configurable:!0,writable:!0,value:i.INFO}),Object.defineProperty(this,"DEBUG",{enumerable:!0,configurable:!0,writable:!0,value:i.DEBUG}),Object.defineProperty(this,"TRACE",{enumerable:!0,configurable:!0,writable:!0,value:i.TRACE}),Object.defineProperty(this,"transports",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"logLevel",{enumerable:!0,configurable:!0,writable:!0,value:i.NONE}),Object.defineProperty(this,"namespace",{enumerable:!0,configurable:!0,writable:!0,value:n}),this.transports=e,this.namespace=r,this.setLogLevel(t)}
1setLogLevel(e){if("string"!=typeof e)this.logLevel=e;else if(s[e])this.logLevel=s[e];else throw Error(`Logger :: Invalid logLevel (${e})`)}send(e,t,...r){try{this.logLevel>=e&&this.transports.forEach(e=>{e[t](this.namespace," ::: ",...r)})}catch(e){console.error(e)}}error(...e){return this.send(i.ERROR,"error",...e)}warn(...e){return this.send(i.WARN,"warn",...e)}info(...e){return this.send(i.INFO,"info",...e)}debug(...e){return this.send(i.DEBUG,"debug",...e)}trace(...e){return this.send(i.TRACE,"log",...e)}}let o=new a([console])},25482:(e,t,r)=>{r.d(t,{k:()=>g});let i=(e,t,r="")=>{let i=(e=>{let t=e.split("_");return`${t[0]}${t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}`})(t);return`${e}${i[0].toUpperCase()+i.slice(1)}${r}`};var s=r(20310);function n(e,t){let r={};if(Array.isArray(t))for(let i of t){let t=Object.getOwnPropertyDescriptor(e,i);t?.enumerable&&Object.defineProperty(r,i,t)}else for(let i of Reflect.ownKeys(e)){let s=Object.getOwnPropertyDescriptor(e,i);if(s.enumerable){let n=e[i];t(i,n,e)&&Object.defineProperty(r,i,s)}}return r}var a=r(23399);let o=e=>{if("object"!=typeof e||null===e)return e;let t=Array.isArray(e)?[]:{};for(let r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=o(e[r]));return t};var l=r(46441);class u{constructor(){Object.defineProperty(this,"listeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"props",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"dataSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:{}})}takeSnapshot(){return this.dataSnapshot=JSON.parse(JSON.stringify(this.data)),this}restoreSnapshot(){return this.data=JSON.parse(JSON.stringify(this.dataSnapshot)),this.onChange("@restore-snapshot",null),this}set(e,t,r){if(e in this.props){let i=this.getPropExportKey(e,r);if(this.get(e,void 0)!==t){let r=this.props[e];void 0===t?this.removeKey(r.parent?.key,r.keyPath[0]):(0,s.oq)(this.data,i,t),this.onChange(e,t)}}return this}get(e,t,r){return e in this.props?(0,s.UU)(this.data,this.getPropExportKey(e,r),t):t}resetValue(e,t){if(e in this.props){let r=this.props[e],i=r.initialValue?r.initialValue():void 0;return void 0===i&&t&&r.parent&&"map"===r.parent.type?this.removeKey(r.parent.key,t):this.set(e,i,t)}return this}getMapExportKey(e,t){return e.map(e=>"#KEY#"===e?t:e)}getPropExportKey(e,t){if(e in this.props){let r=this.props[e].exportKey;return t?this.getMapExportKey(r,t).join("."):r.join(".")}return""}getValue(e,t,r){return e in this.props?this.get(e,t,r):t}setValue(e,t,r){return e in this.props?"array"===this.props[e].type&&0===t.length?this.resetValue(e,r):this.set(e,t,r):this}removeKey(e,t){if(!e)return this.data=function(e,t){if(Array.isArray(t)){let r=new Set(t);return n(e,e=>!r.has(e))}return n(e,(e,r,i)=>!t(e,r,i))}(this.data,[t]),this;let r=this.getValue(e,{});return(0,s.BJ)(r,"string"==typeof t?t:`[${t}]`),0===Object.keys(r).length&&(r=void 0),this.setValue(e,r)}updateValue(e,t,r){return this.setValue(e,(0,a.D)(this.getValue(e,{},r),t),r)}addValue(e,t,r){return e in this.props&&"array"===this.props[e].type?this.setValue(e,this.getValue(e,[],r).concat(t),r):this}removeValue(e,t,r=e=>e!==t,i){return e in this.props&&"array"===this.props[e].type&&this.setValue(e,this.getValue(e,[],i).filter(e=>r(e,t)),i),this}load(e,t=!1){return this.data=e.toJson(),t&&this.onChange("load","load"),this}transformJson(e){return e}toJson(...e){return 0===Object.keys(this.data).length?this.transformJson(void 0):0===e.length?this.transformJson(o(this.data)):this.transformJson(l(o(this.data),e))}onChange(e,t){this.listeners.forEach(r=>{r.onChange(this,e,t)})}addListeners(e){e.forEach(e=>this.addListener(e))}addListener(e){this.listeners.find(t=>t===e)||this.listeners.push(e)}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}let f=(e,t,r)=>{let{name:i=e}=t;
1return r?`${r.key}.${i}`:i},y=(e,{parent:t},r,i=0)=>{if(t?.type==="map"){if(e.length<r-i+1)throw Error("Invalid number of arguments");if("string"!=typeof e[0])throw Error(`Invalid map key argument: ${e[0]}`);let t=e.slice(1);return[...Array(r).fill(void 0).map((e,r)=>t[r]),e[0]]}return e},m=(e,t,r,n,a)=>{let o={};return Object.keys(t).forEach(l=>{let{key:u,methodKey:c,config:h,config:{accessProp:d,exportKey:p,setter:g,getter:v,type:b,model:E,initialValue:A}}=((e,t,r)=>{let{exportKey:s=[e],getter:n,setter:a}=r,o=t?.type==="map",l=f(e,r,t),u=t?`${t.accessProp}.${e}`:e,c=[...o?["#KEY#"]:[],..."__constructor__"===e?[]:s],h=t?.exportKey?.concat(...c)||c,d=((e,t,r,i)=>("__constructor__"===t&&(e=f(t,i,r?.parent||null)),e.replace(/\./g,"_")))(l,e,t,r),p=n||i("get",d),y=a||i("set",d);return{config:{...r,key:l,accessProp:u,exportKey:h,keyPath:c,getter:p,setter:y,parent:t},key:l,methodKey:d}})(l,e,t[l]),C={type:b,...a};o[u]=h;let S=A?A():void 0;if(void 0===S||u.includes("#KEY#")||(0,s.oq)(r,p.join("."),S),n.push({typeOptions:C,prop:d,key:v,value:function(...e){return this.getValue(u,...y(e,C,1,1))}}),n.push({typeOptions:C,prop:d,key:g,value:function(...e){return this.setValue(u,...y(e,C,1))}}),n.push({typeOptions:C,prop:d,key:i("reset",c),value:function(...e){return this.resetValue(u,...y(e,C,0))}}),"array"===b){let e=c.replace(/s$/,"").replace(/ie$/,"y");n.push({typeOptions:C,prop:d,key:i("add",e),value:function(...e){return this.addValue(u,...y(e,C,1))}}),n.push({typeOptions:C,prop:d,key:i("remove",e),value:function(...e){return this.removeValue(u,...y(e,C,2,1))}})}else"model"===b&&E?(Object.assign(o,m(h,E.properties,r,n,a)),n.push({typeOptions:C,prop:d,key:i("update",c),value:function(...e){return this.updateValue(u,...y(e,C,1))}})):"map"===b&&E&&Object.assign(o,m(h,E.properties,r,n,{parent:h,...a}))}),o},g=e=>{let{name:t,properties:r={}}=e,i={},s=[],n=m(null,r,i,s);!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(o,u);let a=function(e){let t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){let r,i=h(e);r=t?Reflect.construct(i,arguments,h(this).constructor):i.apply(this,arguments);if(r&&("object"===d(r)||"function"==typeof r))return r;if(void 0!==r)throw TypeError("Derived constructors may only return object or undefined");if(void 0===this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return this}}(o);function o(...e){let t=a.call.apply(a,[this].concat(e));return p(t,"listeners",[]),p(t,"props",n),p(t,"data",JSON.parse(JSON.stringify(i))),t}return!function(e,t,r){t&&function(e,t){for(let r=0;r<t.length;r++){let i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t)}(o,s),Object.defineProperty(o,"name",{value:t}),o}},26109:(e,t,r)=>{var i,s,n;r.d(t,{Yl:()=>i}),function(e){e.DESKTOP="pc",e.MOBILE="mobile",e.TABLET="tablet"}(i=i||(i={})),function(e){e.JS="js",e.HTML="html",e.CSS="css"}(s=s||(s={})),function(e){e.PAGE="page",e.COMMON_ACROSS_PAGES="common_across_pages",e.DIALOG="dialog"}(n=n||(n={}))},28076:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(14232),s=r(49218),n=r(7060),a=r(40052),o=r(79885),l=r(23015);let u=(e,t)=>{let r=(0,o.A)(),{rfkId:u,instanceId:c}=(0,a.A)(),h=(0,l.n)(e,t);(0,i.useEffect)(()=>{let e={handleAction(e){let{rfkId:t,instanceId:i=null}=e.payload;if(t===u&&c===i){let t=h.current(((e,t)=>{switch(t.type){case s.A.WIDGET_DATA_REQUEST_SUCCESS:{let{response:r}=t.payload;return{...e,response:r}}case s.A.WIDGET_DATA_REQUEST:{let{request:r}=t.payload;return{...e,request:r}}default:return e}})(r.state,e),e);t!==r.state&&r.updateState(t)}}};return n.Ay.register(e),()=>n.Ay.unregister(e)},[u,c,r,h])}},29382:(e,t,r)=>{r.d(t,{Q:()=>i});class i{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},29429:(e,t,r)=>{var i=r(14232),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=i.useState,a=i.useEffect,o=i.useLayoutEffect,l=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),i=n({inst:{value:r,getSnapshot:t}}),s=i[0].inst,c=i[1];return o(function(){s.value=r,s.getSnapshot=t,u(s)&&c({inst:s})},[e,r,t]),a(function(){return u(s)&&c({inst:s}),e(function(){u(s)&&c({inst:s})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},38721:(e,t,r)=>{r.d(t,{HL:()=>J});
1var i=r(23913),s=r(50316),n=r(14232),a=r(70454),o=r(20722),l=r(40052);let u=({rfkId:e,entity:t,children:r})=>{let i=(0,n.useMemo)(()=>Math.random().toString(36).substring(2,9),[]),s=(0,n.useCallback)(r=>a.A.dispatch({...r,payload:{rfkId:e,instanceId:i,entity:t,...r.payload}}),[e,t,i]),l=(0,n.useMemo)(()=>({rfkId:e,instanceId:i,dispatch:s,entity:t}),[e,s,t,i]);return(0,n.createElement)(o.$.Provider,{value:l},r)},c=e=>{let{children:t}=e,r=(0,l.A)();return r?.rfkId===e.rfkId?(0,n.createElement)(n.Fragment,{},t||null):(0,n.createElement)(u,e,t)};var h=r(23399),d=r(7060),p=r(79738),f=r(49218);let y={visibility:{threshold:.2,triggerOnce:!0}};var m=r(25482);let g={name:"Ordercloud",buildInterface:!0,file:"ocContext",properties:{sellerId:{type:"string"},requiredInventoryLocations:{type:"array",name:"requiredInventoryLocations"}}},v=(0,m.k)(g);class b extends v{}var E=r(5873);class A extends E.w{constructor(){super(),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.setContext(new b),a.A.subscribe(this)}setContext(e){this.ocContext=e,this.ocContext.addListener(this)}getContext(){return this.ocContext}handleAction(e){switch(e.type){case f.A.OC_CONTEXT_CHANGED:i.Vy.info("OC Context changed");break;case f.A.INITIALIZE:this.initialize()}}onChange(e,t,r){this.initialized&&a.A.dispatch({type:f.A.OC_CONTEXT_CHANGED,payload:{context:this.ocContext}})}}let C=new A;var S=r(1055),_=r(91811),O=r(106);let T=(e,t)=>(e.cancel=()=>{t.abort()},e);var R=r(75243);let w={async getData(e,t){let r=new AbortController,i={...t,signal:r.signal,abortController:r};return T(this.fetch(e.toJson(),i),r)},async fetch(e,t){let r=String(Date.now().toString(32)+Math.random().toString(16)).replace(/\./g,""),i=d.Ay.getContext(),s=(0,h.D)({context:i.toJson()},e);a.A.dispatch({type:f.A.REQUEST,payload:{requestId:r,request:e,pageContext:i,payload:s}});try{let n=await R.A.get(s,{signal:t?.signal});return a.A.dispatch({type:f.A.REQUEST_SUCCESS,payload:{requestId:r,request:e,pageContext:i,payload:s,response:n}}),{_requestId:r,...n}}catch(t){return a.A.dispatch({type:f.A.REQUEST_FAIL,payload:{error:t,requestId:r,request:e,pageContext:i,payload:s}}),Promise.reject(t)}}};var I=r(71157);let D={name:"Widget",properties:{items:{type:"array",model:r(22229).A}}},P={context:{type:"model",model:I.A},rfk_flags:{type:"array",name:"rfkFlags"},widget:{type:"model",model:D}},x={name:"OCSearchRequest",file:"OCSearchRequest",buildInterface:!0,properties:{...P,ordercloud:{type:"model",model:g,setter:"setOrderCloudContext",getter:"getOrderCloudContext"}}},k=(0,m.k)(x);class N extends k{getWidgetInfo(e){return this.getWidgetItems()?.find(t=>t.rfk_id&&t.rfk_id===e)}addWidgets(e){return e.forEach(e=>this.addWidgetItem(e)),this}}let L={name:"SearchRequest",file:"SearchRequest",buildInterface:!0,properties:{...P}},j=(0,m.k)(L);class q extends j{getWidgetInfo(e){return this.getWidgetItems()?.find(t=>t.rfk_id&&t.rfk_id===e)}addWidgets(e){return e.forEach(e=>this.addWidgetItem(e)),this}}let F=()=>{let{connector:e}=(0,_.Gc)();if("oc"!==e)return i.Vy.info("Using default Request"),new q;{i.Vy.info("Using OC Request");let e=new N;return e.setOrderCloudContext(C.getContext().toJson()),e}},G=async e=>{let t=F(),r=Array.from((e=>{let t=new Map;return e.slice().reverse().forEach(([e,r])=>{let{rfkId:i,instanceId:s,payload:n}=e,a=(({rfkId:e,entity:t})=>`${e}@${t}`)(e);t.get(a)?.get(s||"")?r.abortController.abort():((e,t,r,i)=>{e.has(t)||e.set(t,new Map([[r,{}]])),e.get(t).set(r,i)})(t,a,s||"",{...n,rfk_id:i})}),t})(e.filter(([,e])=>!e.signal.aborted)).values()).map(e=>Array.from(e.values())).flat();t.addWidgets(r),e[0][0].context&&t.setContext(e[0][0].context.toJson());let{requestMiddleware:i}=(0,_.Gc)();i&&await i();let s=await w.fetch(t.toJson());return e.map(([,{abortController:e}])=>e.signal.aborted?Object.assign({},s,{_canceled:!0}):s)},U={},Q={async getWidgetData(e,t){let{rfkId:r,entity:i,request:s}=e,n=d.Ay.getContext(),o=s.toJson();a.A.dispatch({type:f.A.WIDGET_DATA_REQUEST,payload:{...e,pageContext:n,payload:o}});try{let s=await this.fetchWidgetData({...e,payload:o},t);
1if(!s||s._canceled)return a.A.dispatch({type:f.A.WIDGET_DATA_REQUEST_CANCELED,payload:{...e,pageContext:n,payload:o}}),Promise.reject(new O.A(s));let{_requestId:l,...u}=s,{widgets:c=[]}=u,h=c.find(({rfk_id:e,entity:t})=>e===r&&t===i);if(!h)throw Error(`Response processing error: could not find ${r} in response`);return a.A.dispatch({type:f.A.WIDGET_DATA_REQUEST_SUCCESS,payload:{...e,pageContext:n,response:h,payload:o,requestId:l}}),h}catch(t){return a.A.dispatch({type:f.A.WIDGET_DATA_REQUEST_FAIL,payload:{error:t,...e,pageContext:n,payload:o}}),Promise.reject(t)}},fetchWidgetData(e,t){let r,i=new AbortController,s={...t,signal:i.signal,abortController:i,groupBy:((e,t)=>{if(t?.debounceBy)return`debounceBy@${t.debounceBy}`;let r=e.context?.toJson();return r?JSON.stringify(r):"default"})(e,t)};return t?.signal?.addEventListener("abort",()=>{i.abort()}),T(t?.debounce?(U[r=s.groupBy]||(U[r]=S(G,250,{accumulate:!0})),U[r])(e,s).then(e=>e):((e,t)=>{let{payload:r}=e,i=F();return i.addWidgetItem(r),e.context&&i.setContext(e.context.toJson()),w.fetch(i.toJson(),t)})(e,s),i)}};var M=r(13176);class K{constructor(e,t){Object.defineProperty(this,"instanceId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"context",{enumerable:!0,configurable:!0,writable:!0,value:new M.A}),Object.defineProperty(this,"ocContext",{enumerable:!0,configurable:!0,writable:!0,value:new b}),Object.defineProperty(this,"initialized",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"debounced",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"debounceBy",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"widgetRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"lastResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"enabledChangeListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"destroyListeners",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.widgetRequest=t,this.instanceId=e}onUpdate(e){var t,r;let i,s=(t=()=>{e()},function(...e){let s=this;clearTimeout(i),i=setTimeout(function(){i=null,r||t.apply(s,e)},50)}),n={handleAction(e){switch(e.type){case f.A.OC_CONTEXT_CHANGED:case f.A.PAGE_CONTEXT_CHANGED:s()}}};d.Ay.register(n);let a={onChange(e,t,r){s()}};this.getRequest().addListener(a),this.getContext().addListener(a),this.getOCContext().addListener(a);let o=e=>{e&&s()};this.enabledChangeListeners.push(o),this.destroyListeners.push(()=>{d.Ay.unregister(n),this.getRequest().removeListener(a),this.getContext().removeListener(a),this.getOCContext().removeListener(a),this.enabledChangeListeners=this.enabledChangeListeners.filter(e=>e!==o)})}destroy(){this.destroyListeners.forEach(e=>{e()}),this.destroyListeners=[]}getContext(){return this.context}getOCContext(){return this.ocContext}getRequest(){return this.widgetRequest}getKey(){return((e,t,...r)=>[t.getRfkId(),e,d.Ay.getContext().toJson(),t.toJson(),C.getContext().toJson(),...r])(this.instanceId,this.widgetRequest,this.context.toJson())}getLastResponse(){return this.lastResponse}getRequestContext(){return(0,h.D)(d.Ay.getContext().toJson(),this.context.toJson())}getRequestOCContext(){return(0,h.D)(C.getContext().toJson(),this.ocContext.toJson())}setDebounced(e){this.debounced=e}isDebounced(){return this.debounced}setDebounceBy(...e){this.debounceBy=e.join("#")}getDebounceBy(){return this.debounceBy}fetch(e={}){return this.run(e)}run(e={}){let t=this.getRequest().getRfkId(),r={rfkId:t,entity:this.getRequest().getEntity(),instanceId:this.instanceId,request:this.getRequest(),context:this.getContext(),ocContext:this.getOCContext()};return Q.getWidgetData(r,{debounceBy:this.getDebounceBy(),debounce:this.isDebounced(),...e}).then(e=>(this.lastResponse=e,e))}setEnabled(e){e!==this.enabled&&(this.enabled=e,this.enabledChangeListeners.forEach(t=>{t(e)}))}toggleEnabled(){this.setEnabled(!this.enabled)}isEnabled(){return this.enabled}getInstanceId(){return this.instanceId}}let W=(e,t,r)=>{e({type:t,payload:r})},H=({children:e})=>{let{rfkId:t,entity:r,dispatch:i,instanceId:s}=(0,l.A)(),a=(0,n.useRef)(null);return a.current||(a.current=(({dispatch:e,entity:t,instanceId:r,rfkId:i}
1)=>{let s={},n={},a=!1,o=(0,d.eo)(i);o.setEntity(t);let l=new K(r,o),u=(0,h.D)(y,p.A.get(i,t)?.options);return{actions:((e,t)=>{let{actionProps:r={}}=t;return Object.keys(r).reduce((t,i)=>({...t,[i]:W.bind(null,e,r[i])}),{})})(e,u),options:u,query:l,state:s,config:n,updateState:n=>{let a=Object.fromEntries(Object.entries(n).filter(([e,t])=>s[e]!==t));Object.assign(s,n),e({type:f.A.WIDGET_STATE_CHANGED,payload:{rfkId:i,entity:t,instanceId:r,state:a}})},initialize:e=>{a||((e=>{Object.assign(s,"function"==typeof e?e():e)})(e.state),(e=>{((e,t,r={})=>{let{options:{propStateMapping:i=null,props:{initial:s={}}={}}={}}=p.A.get(e)||{};i&&((e,t,r)=>{Object.keys(r).forEach(i=>{"function"==typeof e[i]&&e[i](t,r)})})(i,t,(0,h.D)(s,r))})(l.getRequest().getRfkId(),l.getRequest(),s),e&&e(l),l.getRequest().takeSnapshot()})(e.query),Object.assign(n,e.config),a=!0)},isInitialized:()=>a}})({dispatch:i,entity:r,instanceId:s,rfkId:t})),(0,n.useEffect)(()=>(i({type:f.A.LOAD,payload:{rfkId:t,entity:r,instanceId:s}}),()=>{i({type:f.A.UNLOAD,payload:{rfkId:t,entity:r,instanceId:s}})}),[i,t,r,s]),(0,n.createElement)(o.A.Provider,{value:a.current},e)};var V=r(7820),B=r(3773);let $=(e,t,r)=>((...e)=>(t,r)=>e.reduceRight((e,t)=>(0,n.createElement)(t,r,e),t))(c,H)((0,n.createElement)(r,e),t),J=(e,t,r)=>(i.Vy.debug("widget",e&&e.name,t),((e,t,r,i)=>((e,t,r)=>{if(!0===e.__wrapped)throw Error(`Seems you are trying to wrap an already wrapped Widget component (entity: ${t})`);return r.__wrapped=!0,r})(t,r,s=>{let{rfkId:a}=s;return(0,n.useMemo)(()=>{p.A.setType(a,e)},[a]),i(s,{rfkId:a,entity:r},t)}))(t,e,r,$));J(V.A,s.b.BANNER,"content"),J(V.A,s.b.HTML_BLOCK,"content"),J(B.A,
1s.b.SEO,"content")},38806:(e,t,r)=>{e.exports=r(29429)},40052:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(14232),s=r(20722);let n=()=>(0,i.useContext)(s.$)},46441:(e,t,r)=>{var i=r(82944);e.exports=function(e,t){if(!i(e)&&"function"!=typeof e)return{};var r={};if("string"==typeof t)return t in e&&(r[t]=e[t]),r;for(var s=t.length,n=-1;++n<s;){var a=t[n];a in e&&(r[a]=e[a])}return r}},48329:(e,t,r)=>{r.d(t,{A:()=>s});var i=r(79885);let s=()=>(0,i.A)().actions},48915:(e,t,r)=>{let i;r.d(t,{A:()=>h});var s=r(78639),n=r(83325),a=r(91811);let o=(0,s.Y)({cookie:""});o.cookie||(o.cookie="");class l{getCookieValue(e,t){let r=e.slice(t.length+1,e.length);return r?decodeURIComponent(r):""}getCookieFromBrowser(e){let t=o.cookie.split("; ");for(let r=0;r<t.length;r++)if(t[r].slice(0,e.length)===e)return this.getCookieValue(t[r],e);return""}setCookieInBrowser(e,t,r){let i=new Date,s=encodeURIComponent(t);i.setMilliseconds(i.getMilliseconds()+r),s+=`;domain=${(0,a.v3)()};path=/;`,s+=r?`;expires=${i.toUTCString()}`:"",s+=";secure;SameSite=None;",o.cookie=`${e}=${s}`}removeCookieFromBrowser(e){o.cookie=`${e}=;domain=${(0,a.v3)()};path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;secure;SameSite=None`}removeCachedCookie(e){this.removeCookieFromBrowser(e)}set(e,t,r){if(t){let i="object"==typeof t?JSON.stringify(t):t;this.setCookieInBrowser(e,i,r)}else this.removeCachedCookie(e)}get(e){return this.getCookieFromBrowser(e)}remove(e){this.removeCachedCookie(e)}}class u{set(e,t,r){let i={value:t,lastModifiedAt:new Date().getTime()||0,expiryTime:r};void 0!==t?localStorage.setItem(e,JSON.stringify(i)):localStorage.removeItem(e)}get(e){let t=new Date().getTime()||0,r=(0,n.Gl)(localStorage.getItem(e));return r&&r.lastModifiedAt&&t-r.lastModifiedAt>+r.expiryTime&&(this.remove(e),r=void 0),r&&r.value}remove(e){localStorage.removeItem(e)}}class c{static init(e){i=e&&(0,s.z)().localStorage?new u:new l}static set(e,t,r){i.set(e,t,r||3e5)}static get(e){let t=i.get(e),r=t?(0,n.Gl)(t):{};return"undefined"===t&&(t=void 0),t&&r?r:t}static remove(e){i.remove(e)}}let h=c},49218:(e,t,r)=>{var i;r.d(t,{A:()=>s}),function(e){e.LOAD="core/LOAD",e.UNLOAD="core/UNLOAD",e.REQUEST="core/REQUEST",e.REQUEST_SUCCESS="core/REQUEST_SUCCESS",e.REQUEST_FAIL="core/REQUEST_FAIL",e.REQUEST_CANCELED="core/REQUEST_CANCELED",e.WIDGET_DATA_REQUEST="core/WIDGET_DATA_REQUEST",e.WIDGET_DATA_REQUEST_SUCCESS="core/WIDGET_DATA_REQUEST_SUCCESS",e.WIDGET_DATA_REQUEST_FAIL="core/WIDGET_DATA_REQUEST_FAIL",e.WIDGET_DATA_REQUEST_CANCELED="core/WIDGET_DATA_REQUEST_CANCELED",e.WIDGET_STATE_CHANGED="core/WIDGET_STATE_CHANGED",e.WIDGET_APPEAR="core/WIDGET_APPEAR",e.PAGE_CONTAINER_READY="core/PAGE_CONTAINER_READY",e.WIDGET_READY="core/WIDGET_READY",e.INITIALIZE="core/INITIALIZE",e.INITIALIZED="core/INITIALIZED",e.RESET_WIDGET="core/RESET_WIDGET",e.PAGE_CONTEXT_CHANGED="core/PAGE_CONTEXT_CHANGED",e.OC_CONTEXT_CHANGED="core/OC_CONTEXT_CHANGED",e.FOUND_WIDGETS="core/FOUND_WIDGETS",e.ADD_TO_CART="core/interaction/ADD_TO_CART",e.ORDER_CONFIRM="core/interaction/ORDER_CONFIRM",e.USER_LOGIN="core/interaction/USER_LOGIN",e.ADD_TO_WISHLIST="core/interaction/ADD_TO_WISHLIST",e.CART_STATUS="core/interaction/CART_STATUS",e.ITEM_CLICKED="core/interaction/ITEM_CLICKED",e.PAGE_WIDGETS_DATA_REQUEST="core/PAGE_WIDGETS_DATA_REQUEST",e.PAGE_WIDGETS_DATA_REQUEST_SUCCESS="core/PAGE_WIDGETS_DATA_REQUEST_SUCCESS",e.PAGE_WIDGETS_DATA_REQUEST_FAIL="core/PAGE_WIDGETS_DATA_REQUEST_FAIL",e.PAGE_WIDGETS_DATA_REQUEST_CANCELED="core/PAGE_WIDGETS_DATA_REQUEST_CANCELED"}(i||(i={}));let s=i},50316:(e,t,r)=>{var i;r.d(t,{b:()=>i}),function(e){e.RECOMMENDATION="recommendation",e.PREVIEW_SEARCH="preview_search",e.SEARCH_RESULTS="content_grid",e.CONTENT_BLOCK="content_block",e.QUESTIONS="questions_answers",e.HTML_BLOCK="html_block",e.BANNER="banner",e.SEO="seo"}(i=i||(i={}))},64650:(e,t,r)=>{r.d(t,{II:()=>c,v_:()=>o,wm:()=>u});var i=r(1860),s=r(97555),n=r(15154);function a(e){return Math.min(1e3*2**e,3e4)}function o(e){return(null!=e?e:"online")!=="online"||s.t.isOnline()}class l{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function u(e){return e instanceof l}function c(e){let t,r,u,c=!1,h=0,d=!1,p=new Promise((e,t)=>
1{r=e,u=t}),f=()=>!i.m.isFocused()||"always"!==e.networkMode&&!s.t.isOnline(),y=i=>{d||(d=!0,null==e.onSuccess||e.onSuccess(i),null==t||t(),r(i))},m=r=>{d||(d=!0,null==e.onError||e.onError(r),null==t||t(),u(r))},g=()=>new Promise(r=>{t=e=>{let t=d||!f();return t&&r(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,d||null==e.onContinue||e.onContinue()}),v=()=>{let t;if(!d){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(y).catch(t=>{var r,i;if(d)return;let s=null!=(r=e.retry)?r:3,o=null!=(i=e.retryDelay)?i:a,l="function"==typeof o?o(h,t):o,u=!0===s||"number"==typeof s&&h<s||"function"==typeof s&&s(h,t);if(c||!u)return void m(t);h++,null==e.onFail||e.onFail(h,t),(0,n.yy)(l).then(()=>{if(f())return g()}).then(()=>{c?m(t):v()})})}};return o(e.networkMode)?v():g().then(v),{promise:p,cancel:t=>{d||(m(new l(t)),null==e.abort||e.abort())},continue:()=>(null==t?void 0:t())?p:Promise.resolve(),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1}}}},66884:(e,t,r)=>{r.d(t,{l:()=>i});let i=e=>{let t=e.getRequest().getSearchLimit()?e.getRequest().getSearchLimit():e.getLastResponse()?.limit,r=t?Math.floor((e.getRequest().getSearchOffset()||0)/t+1):0;return{keyword:e.getRequest().getSearchQueryKeyphrase()||"",pageNumber:isNaN(r)?void 0:r,pageSize:t,numRequested:t,numResults:e.getLastResponse()?.content?.length,totalResults:e.getLastResponse()?.total_item}}},68941:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(15154);let s=function(){let e=[],t=0,r=e=>{e()},s=e=>{e()},n=s=>{t?e.push(s):(0,i.G6)(()=>{r(s)})};return{batch:n=>{let a;t++;try{a=n()}finally{--t||(()=>{let t=e;e=[],t.length&&(0,i.G6)(()=>{s(()=>{t.forEach(e=>{r(e)})})})})()}return a},batchCalls:e=>(...t)=>{n(()=>{e(...t)})},schedule:n,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{s=e}}}()},69256:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(23913),s=r(91811),n=r(80187);let a=(0,r(78639).z)();class o{constructor(e){Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e,this.cache={},a.RFK_CACHE||(a.RFK_CACHE={}),a.RFK_CACHE[e]=this.cache}hashKey(e){let t,r,i=0;for(t=0,r=e.length;t<r;t++)i=(i<<5)-i+e.charCodeAt(t)|0;return i}sortObjectKeys(e){return null==e?"":"object"!=typeof e?e:Object.keys(e).sort().reduce((t,r)=>(Array.isArray(e[r])?t[r]=e[r].map(e=>this.sortObjectKeys(e)):"object"==typeof e[r]?t[r]=this.sortObjectKeys(e[r]):t[r]=e[r],t),{})}createKey(e){let t=JSON.stringify(this.sortObjectKeys(e));return(0,s.kL)("debug")?(i.Vy.debug("cache ::: createKey",e),t):String(this.hashKey(t))}has(e){return e in this.cache}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}delete(e){delete this.cache[e]}all(){return this.cache}clear(){this.cache={},window.RFK_CACHE[this.name]=this.cache}getName(){return this.name}}let l={sitecore:{async getAuthHeader(){let{apiKey:e}=(0,s.Gc)();return Promise.resolve(e)}},oc:{getAuthHeader:async()=>Promise.all([r.e(621),r.e(909),r.e(40)]).then(r.bind(r,74773)).then(e=>e.Tokens).then(e=>{let t=e?.GetIdentityToken();if(!t)throw i.Vy.error("Could not found an Order Cloud Cloud logged user."),Error("Could not found an Order Cloud Cloud logged user.");return i.Vy.info("Using existing Order Cloud Token."),`Bearer ${t}`}).catch(e=>{throw i.Vy.error("Could not import Ordercloud SDK.",e),Error("Could not import Ordercloud SDK.")})}},u=async()=>{let{connector:e="oc"}=(0,s.Gc)();return{...{"Content-Type":"application/json"},Authorization:await l[e].getAuthHeader()||""}},c=new o("api-adapter"),h={cache:!0};class d{static async trackEvent(e){let t=(0,n.Ds)(e),{eventUrl:r,apiKey:a}=(0,s.Gc)();try{return(await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:a},body:JSON.stringify(t)})).json()}catch(e){return i.Vy.error(e),i.Vy.error("There was a problem on the service call"),e.message||null}}static async callApiWithoutCache(e,t){try{let r=await fetch(e,t),i=await r.json();return Promise.resolve(i)}catch(e){return i.Vy.error(e),i.Vy.error("There was a problem on the service call"),e.message||null}}static async callApiWithCache(e,t){let r=c.createKey(t);if(c.has(r))return c.get(r);
1let i=await d.callApiWithoutCache(e,t);return c.set(r,i),i}static async callApi(e,t=h){let{searchUrl:r}=(0,s.Gc)(),i={method:"POST",headers:await u(),body:JSON.stringify(e),signal:t.signal};return t.cache?d.callApiWithCache(r,i):d.callApiWithoutCache(r,i)}static clearCache(){c.clear()}}},70086:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(14232),s=r(49218),n=r(7060),a=r(40052),o=r(79885);let l=()=>{let e=(0,o.A)(),{rfkId:t,instanceId:r}=(0,a.A)(),[l,u]=(0,i.useState)(e.state),c=(0,i.useRef)({});return(0,i.useEffect)(()=>{let e={handleAction(e){if(e.type===s.A.WIDGET_STATE_CHANGED){let{rfkId:i,instanceId:s=null,state:n}=e.payload;if(i===t&&r===s){let e=((e,t)=>{let r=Object.fromEntries(Object.entries(e).filter(([e])=>t[e]));return 0===Object.keys(r).length?null:r})(n,c.current);e&&u(t=>({...t,...e}))}}}};return n.Ay.register(e),()=>n.Ay.unregister(e)},[t,r]),((e,t)=>{let r={};for(let i in e)"request"!==i&&"response"!==i&&Object.defineProperty(r,i,{get:()=>(t[i]=!0,e[i])});return r})(l,c.current)}},70454:(e,t,r)=>{r.d(t,{A:()=>a});var i=r(23913);let s=[],n=[];class a{static addActionHandler(e){s.push(e)}static removeActionHandler(e){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}static subscribe(e){s.push(e)}static unsubscribe(e){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}static dispatch(e){i.Vy.debug("dispatcher ::: dispatch",`[${e.type}]`,e.payload),s.forEach(t=>{t.handleAction(e)}),n.forEach(t=>{t.handleAction(e)})}}},70875:(e,t,r)=>{r.d(t,{Pr:()=>u,rd:()=>o,sF:()=>l,vC:()=>c});var i=r(23913),s=r(83325),n=r(81969),a=r(80187);let o=async(e,t,{actionCause:r,index:o,request:l,items:u})=>{let c=[];if(t&&u&&(c=(0,a.G$)(t,u))&&!(0,a.kz)(c))return void i.Vy.warn("trackEvent :::","A field is missing on one or more of the items provided");if(r&&"entity"===r&&(0,s.BU)(o))return void i.Vy.warn("trackEvent :::","Field index is mandatory for widget click entity events and is having invalid/missing value");let h={name:"widget",action:"click",action_cause:r,value:{entity:t,rfk_id:e,index:o,entities:c,request:l,context:n.A.toJson()}};return(0,a.u4)(h)},l=async(e,t,{request:r,filters:i})=>{let s={name:"widget",action:"click",action_cause:"suggestion",value:{entity:t,rfk_id:e,request:r,filters:i,context:n.A.toJson()}};return(0,a.u4)(s)},u=async(e,t,{index:r,request:i,filters:s})=>{let o={name:"widget",action:"click",action_cause:"filter",value:{rfk_id:e,entity:t,index:r,request:i,filters:s,context:n.A.toJson()}};return(0,a.u4)(o)},c=async(e,t,{request:r,items:s}={})=>{let o=[];if(t&&s&&(o=(0,a.G$)(t,s))&&!(0,a.kz)(o))return void i.Vy.warn("trackEvent :::","A field is missing on one or more of the items provided");let l={action:"view",name:"widget",value:{entity:t,rfk_id:e,request:r,entities:o,context:n.A.toJson()}};return(0,a.u4)(l)}},71157:(e,t,r)=>{r.d(t,{A:()=>i});let i={name:"Context",file:"context",buildInterface:!0,properties:{browser:{type:"model",model:{name:"ContextBrowser",file:"browser",properties:{user_agent:{},device:{},app_type:{}}}},campaign:{type:"model",model:{name:"ContextCampaign",properties:{utm_source:{},utm_medium:{},utm_campaign:{},utm_term:{},utm_content:{}}}},geo:{type:"model",model:{name:"ContextGeo",properties:{ip:{},location:{type:"model",model:{name:"ContextGeoLocation",properties:{lat:{required:!0},lon:{required:!0}}}}}}},ids:{type:"map",model:{name:"ContextEntityIds",properties:{__constructor__:{type:"array",name:"entityIds"}}},mapKey:"entity",mapKeyType:"Entity"},locale:{type:"model",model:{name:"ContextLocale",properties:{country:{required:!0},language:{required:!0}}}},page:{type:"model",model:{name:"ContextPage",properties:{uri:{required:!0},custom:{}}}},store:{type:"model",model:{name:"ContextStore",properties:{group_id:{},id:{required:!0}}}},time:{type:"model",model:{name:"ContextTime",properties:{epoch:{}}}},user:{type:"model",model:{name:"ContextUser",properties:{user_id:{name:"id"},uuid:{required:!0},groups:{type:"array",name:"groups"},custom:{}}}}}}},72680:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(14232),s=r(7060),n=r(40052),a=r(23015);let o=(e,t)=>{let{rfkId:r,instanceId:o}=(0,n.A)(),l=(0,a.n)(e,t);(0,i.useEffect)(()=>{let e={handleAction(e){let{rfkId:t,instanceId:i}=e.payload;t&&(t!==r||i!==o)||l.current(e)}};return s.Ay.register(e),()=>s.Ay.unregister(e)},[r,o,l])}},73911:(e,t,r)=>{r.d(t,{A:()=>b});
1var i=r(14232),s=r(106),n=r(85461),a=r(15154),o=r(68941),l=r(1860),u=r(29382),c=r(64650);class h extends u.Q{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),(0,a.f8)(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let s=this.hasListeners();s&&f(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(t),s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let n=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==r.enabled||n!==this.currentRefetchInterval)&&this.updateRefetchInterval(n)}getOptimisticResult(e){var t,r,i;let s=this.client.getQueryCache().build(this.client,e),n=this.createResult(s,e);return t=this,r=n,(i=e).keepPreviousData||(void 0!==i.placeholderData?!r.isPlaceholderData:(0,a.f8)(t.getCurrentResult(),r))||(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(a.lQ)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),a.S$||this.currentResult.isStale||!(0,a.gn)(this.options.staleTime))return;let e=(0,a.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!a.S$&&!1!==this.options.enabled&&(0,a.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||l.m.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r,i=this.currentQuery,s=this.options,n=this.currentResult,o=this.currentResultState,l=this.currentResultOptions,u=e!==i,h=u?e.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:m}=e,{dataUpdatedAt:g,error:v,errorUpdatedAt:b,fetchStatus:E,status:A}=m,C=!1,S=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&d(e,t),a=r&&f(e,i,t,s);(n||a)&&(E=(0,c.v_)(e.options.networkMode)?"fetching":"paused",g||(A="loading")),"isRestoring"===t._optimisticResults&&(E="idle")}if(t.keepPreviousData&&!m.dataUpdatedAt&&null!=p&&p.isSuccess&&"error"!==A)r=p.data,g=p.dataUpdatedAt,A=p.status,C=!0;else if(t.select&&void 0!==m.data)if(n&&m.data===(null==o?void 0:o.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(m.data),r=(0,a.pl)(null==n?void 0:n.data,r,t),this.selectResult=r,this.selectError=null}catch(e){this.selectError=e}else r=m.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===A){let e;if(null!=n&&n.isPlaceholderData&&t.placeholderData===(null==l?void 0:l.placeholderData))e=n.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(A="success",r=(0,a.pl)(null==n?void 0:n.data,e,t),S=!0)}this.selectError&&(v=this.selectError,r=this.selectResult,b=Date.now(),A="error");let _="fetching"===E,O="loading"===A,T="error"===A;return{status:A,fetchStatus:E,isLoading:O,isSuccess:"success"===A,isError:T,isInitialLoading:O&&_,data:r,dataUpdatedAt:g,error:v,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdate
1Count:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:_,isRefetching:_&&!O,isLoadingError:T&&0===m.dataUpdatedAt,isPaused:"paused"===E,isPlaceholderData:S,isPreviousData:C,isRefetchError:T&&0!==m.dataUpdatedAt,isStale:y(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,(0,a.f8)(r,t))return;this.currentResult=r;let i={cache:!0},s=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.trackedProps.size)return!0;let i=new Set(null!=r?r:this.trackedProps);return this.options.useErrorBoundary&&i.add("error"),Object.keys(this.currentResult).some(e=>this.currentResult[e]!==t[e]&&i.has(e))};(null==e?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||(0,c.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){o.j.batch(()=>{var t,r,i,s,n,a,o,l;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(i=(s=this.options).onSettled)||i.call(s,this.currentResult.data,null)):e.onError&&(null==(n=(a=this.options).onError)||n.call(a,this.currentResult.error),null==(o=(l=this.options).onSettled)||o.call(l,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function d(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&("error"!==e.state.status||!1!==t.retryOnMount)||e.state.dataUpdatedAt>0&&p(e,t,t.refetchOnMount)}function p(e,t,r){if(!1!==t.enabled){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&y(e,t)}return!1}function f(e,t,r,i){return!1!==r.enabled&&(e!==t||!1===i.enabled)&&(!r.suspense||"error"!==e.state.status)&&y(e,r)}function y(e,t){return e.isStaleByTime(t.staleTime)}let m=r(38806).useSyncExternalStore,g=i.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),v=i.createContext(!1);v.Provider;let b=e=>{var t;let[r,l]=(0,i.useState)(()=>e.getKey()),u=(0,n.jE)();return(0,i.useEffect)(()=>(e.onUpdate(()=>{l(e.getKey())}),()=>{u.cancelQueries({queryKey:e.getKey(),exact:!0}),e.destroy()}),[e,u]),t={queryKey:r,queryFn:t=>e.run({signal:t.signal}).catch(e=>e instanceof s.A?u.cancelQueries({queryKey:t.queryKey,exact:!0}).then(()=>null):Promise.reject(e)),refetchOnMount:!1,enabled:e.isEnabled()},function(e,t){let r=(0,n.jE)({context:e.context}),s=i.useContext(v),a=i.useContext(g),l=r.defaultQueryOptions(e);l._optimisticResults=s?"isRestoring":"optimistic",l.onError&&(l.onError=o.j.batchCalls(l.onError)),l.onSuccess&&(l.onSuccess=o.j.batchCalls(l.onSuccess)),l.onSettled&&(l.onSettled=o.j.batchCalls(l.onSettled)),l.suspense&&("number"!=typeof l.staleTime&&(l.staleTime=1e3),"number"==typeof l.cacheTime&&(l.cacheTime=Math.max(l.cacheTime,1e3))),(l.suspense||l.useErrorBoundary)&&!a.isReset()&&(l.retryOnMount=!1),i.useEffect(()=>{a.clearReset()},[a]);let[u]=i.useState(()=>new t(r,l)),c=u.getOptimisticResult(l);if(m(i.useCallback(e=>{let t=s?()=>void 0:u.subscribe(o.j.batchCalls(e));return u.updateResult(),t},[u,s]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),i.useEffect(()=>{u.setOptions(l,{listeners:!1})},[l,u]),(null==l?void 0:l.suspense)&&c.isLoading&&c.isFetching&&!s)throw u.fetchOptimistic(l).then(({data:e})=>{null==l.onSuccess||l.onSuccess(e),null==l.onSettled||l.onSettled(e,null)}
1).catch(e=>{a.clearReset(),null==l.onError||l.onError(e),null==l.onSettled||l.onSettled(void 0,e)});if((({result:e,errorResetBoundary:t,useErrorBoundary:r,query:i})=>{var s,n;return e.isError&&!t.isReset()&&!e.isFetching&&(s=r,n=[e.error,i],"function"==typeof s?s(...n):!!s)})({result:c,errorResetBoundary:a,useErrorBoundary:l.useErrorBoundary,query:u.getCurrentQuery()}))throw c.error;return l.notifyOnChangeProps?c:u.trackResult(c)}((0,a.vh)(t,void 0,void 0),h)}},74019:(e,t,r)=>{var i;r.d(t,{E:()=>i}),function(e){e.ITEM_CLICKED="search/ITEM_CLICKED",e.SUGGESTION_CLICKED="search/SUGGESTION_CLICKED",e.SUGGESTION_ADDED="search/SUGGESTION_ADDED",e.SUGGESTION_REMOVED="search/SUGGESTION_REMOVED",e.KEYPHRASE_CHANGED="search/KEYPHRASE_CHANGED"}(i=i||(i={}))},75243:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(69256);let s=null,n=async(e,t)=>a(e.toJson(),t),a=async(e,t)=>{if(!s)return Promise.reject(Error("No data processor configured"));try{let r=await i.A.callApi(e,{cache:!1,...t}),n=s.validateResponse(r,e);if(n)return Promise.reject(n);return Promise.resolve(s.processResponse(r,e))}catch(e){return Promise.reject(e)}},o={get:a,run:n,setProcessor:e=>{s=e},getProcessor:()=>s}},76537:(e,t,r)=>{var i;r.d(t,{E:()=>i}),function(e){e.FACET_CLICKED="searchResults/FACET_CLICKED",e.FILTER_CLICKED="searchResults/FILTER_CLICKED",e.REMOVE_FILTER="searchResults/REMOVE_FILTER",e.SORT_CHANGED="searchResults/SORT_CHANGED",e.PAGE_NUMBER_CHANGED="searchResults/PAGE_NUMBER_CHANGED",e.ITEM_CLICKED="searchResults/ITEM_CLICKED",e.RESULTS_PER_PAGE_CHANGED="searchResults/RESULTS_PER_PAGE_CHANGED",e.KEYPHRASE_CHANGED="searchResults/KEYPHRASE_CHANGED",e.CLEAR_FILTERS="searchResults/CLEAR_FILTERS"}(i=i||(i={}))},77376:(e,t,r)=>{r.d(t,{F6:()=>c,a3:()=>h});var i=r(83325),s=r(91811);let n=Date.now();var a=r(98212),o=r(48915);let l={},u=()=>{let{domainId:e,customerKey:t}=(0,s.Gc)();return t?(0,a.aX)(t):e},c=()=>{let e=(0,s.kL)("userId");if(e)return{user_id:e};let{uid:t}=(()=>{let{domainHash:e}=(0,s.Gc)();l.domainHashCkey=e,l.domainHash=l.domainHashCkey,l.domainRoot=(0,s.v3)();let t=(()=>{let e=0,t=o.A.get("__rutma");return o.A.get("__rutmb")||(o.A.set("__rutmb",u(),18e5),e=1),t=t?((e,t)=>{let r=e.split(".");return r.length>3&&(t&&(r[1]=r[2],r[2]=n,r[3]=+r[3]+1),4===r.length&&(r[4]=1),5===r.length&&(r[5]=1),r[4]=+r[4]+1,r[5]=1+(t?0:+r[5]),e=r.join(".")),e})(t,e):`${(()=>{let e=o.A.get("__ruid");if(e)return e;e="xx-xx-4x-1p-".replace(/[x]/g,()=>(0,i.hW)(36*Math.random()|0));for(let t=0;t<5;t++)e+=("0000"+(1679615*Math.random()|0).toString(36)).slice(-4);let t=u()+"-"+e+"-"+n;return o.A.set("__ruid",t),t})()}.${n}.${n}.1.1.1`,o.A.set("__rutma",t,18e5),t})(),r=t.split(".");return l.uid=r[0],l.usetLastDigit=(0,i.lj)(r[0]),l.previousSessionStartTime=parseInt(r[1]),l.currentSessionStartTime=parseInt(r[2]),l.visitCount=parseInt(r[3]),l.pageViewCount=parseInt(r[4]),l.visitPageCount=parseInt(r[5]),l.utma=t,l})();return{uuid:t}},h=()=>{o.A.remove("__ruid"),o.A.remove("__rutma"),o.A.remove("__rutmb"),o.A.remove("__ec")}},78639:(e,t,r)=>{r.d(t,{Y:()=>s,z:()=>i});let i=(e={})=>"undefined"!=typeof window?window:e,s=(e={})=>"undefined"!=typeof document?document:e},79738:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(23399);let s=(e,t)=>`${e}${t?`@${t}`:""}`,n={widgetTypesConfigMapping:{},widgetsConfigMapping:{},setWidgetType(e,t){(0,i.D)(this.widgetTypesConfigMapping,{[e]:t},{mutate:!0})},getType(e){let{type:t}=this.widgetsConfigMapping[s(e)]||{};return t},set(e,t,r){"string"==typeof t?this.widgetsConfigMapping[s(e,t)]=r:this.widgetsConfigMapping[s(e)]=t},update(e,t,r){"string"==typeof t?(0,i.D)(this.getOrCreate(e,t),r,{mutate:!0}):(0,i.D)(this.getOrCreate(e),r,{mutate:!0})},get(e,t){let r=this.widgetsConfigMapping[s(e,t)],n=this.widgetsConfigMapping[s(e)];if(!n&&!r)return;let a=(0,i.D)(n||{},r||{}),{component:o,options:l}=this.getForType(e)||{},{component:u=o,options:c}=a;return{...a,component:u,options:c?(0,i.D)(l||{},c):l}},getWidgetIds(){return Object.keys(this.widgetsConfigMapping)},getByType(e){return this.widgetTypesConfigMapping[e]||void 0},getForType(e){let t=this.getType(e);return t?this.getByType(t):void 0},getOrCreate(e,t){return this.widgetsConfigMapping[s(e,t)]||(this.widgetsConfigMapping[s(e,t)]={}),this.widgetsConfigMapping[s(e,t)]},getMetadata(e){let{metadata:t}=this.widgetsConfigMapping[s(e)]||{};return t},setMetadata(e,t){Object.assign(this.getOrCreate(e),{metadata:t}),this.setType(e,t.type)},updateMetadata(e,t){(0,i.D)(this.getOrCreate(e),{metadata:t},{mutate:!0}),this.setType(e,t.type)},setType(e,t){this.getType(e)||Object.assign(this.getOrCreate(e),{type:t})}}},79885:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(14232),s=r(20722);let n=()=>(0,i.useContext)(s.A)},80187:(e,t,r)=>{r.d(t,{Ds:()=>g,Fm:()=>h,G$:()=>d,KJ:()=>c,M8:()=>p,VD:()=>y,d9:()=>f,iR:()=>m,kz:()=>u,u4:()=>l});var i=r(23913),s=r(83325),n=r(69256),a=r(77376),o=r(91811);let l=async e=>{let{trackConsent:t}=(0,o.Gc)();if(i.Vy.debug("trackEvent ",`Consent: ${t} `,g(e)),!t)return;let r={...e,...(0,a.F6)(),client_time_ms:Date.now()};return i.Vy.debug("trackEvent","Sending: ",JSON.stringify(r,null,4)),await n.A.trackEvent(r)},u=e=>!e.find(({id:e,entity_type:t})=>(0,s.BU)(e)||(0,s.BU)(t)),c=e=>!e.find(({facetId:e})=>(0,s.BU)(e)),h=e=>!(0,s.BU)(e),d=(e,t)=>t.map(({id:t,entitySubtype:r,attributes:i,variant:n,uri:a,sourceId:o,price:l,finalPrice
1:u,quantity:c})=>({id:t,entity_type:e,...r?{entity_subtype:r}:{},...i&&!(0,s.vB)(i)?{attributes:i}:{},...l?{price:l}:{},...c?{quantity:c}:{},...u?{final_price:u}:{},...n?{variant:n}:{},...a?{uri:a}:{},...o?{source_id:o}:{}})),p=(e,t,r,i,s)=>({order_id:e,...t?{order_total:t}:{},...r?{order_subtotal:r}:{},...i?{coupon:i}:{},...s?{store:s}:{}}),f=({keyword:e,advancedQueryText:t,modifiedKeyword:r,numResults:i,totalResults:s,numRequested:n,pageSize:a,pageNumber:o,redirectUrl:l})=>({...e?{keyword:e}:{keyword:""},...t?{advanced_query_text:t}:{},...r?{modified_keyword:r}:{},...i?{num_results:i}:{},...s?{total_results:s}:{},...n?{num_requested:n}:{},...a?{page_size:a}:{},...o?{page_number:o}:{},...l?{redirect_url:l}:{}}),y=e=>e.map(({facetId:e,facetValue:t,startValue:r,endValue:i,facetValueId:s,valueIndex:n,facetIndex:a,facetTitle:o,displayName:l})=>({name:e,title:o,...l?{display_name:l}:{},...e?{field:e}:{},...s?{value:[s]}:t?{value:[t]}:{},...r?{start_value:r}:{},...i?{end_value:i}:{},...t?{display_name:[t]}:{},...n||0===n?{value_position:[n]}:{},...a||0===a?{facet_position:a}:{}})),m=e=>e.map(({name:e,title:t,value:r,displayName:i,uri:s})=>({name:e,title:t,...r?{value:[r]}:{},...i?{display_name:[i]}:{},...s?{uri:[s]}:{}}));function g(e){let t={};for(let r in e){let i=e[r];if(null!=i&&!("object"==typeof i&&0===Object.keys(i).length&&!Array.isArray(i))&&void 0!==i)if(Array.isArray(i)){let e=[];for(let t=0;t<i.length;t++){let r=i[t];if(null!=r&&!("object"==typeof r&&0===Object.keys(r).length&&!Array.isArray(r)))if("object"==typeof r){let t=g(r);(Object.keys(t).length>0||Array.isArray(t))&&e.push(t)}else e.push(r)}e.length>0&&(t[r]=e)}else if("object"==typeof i&&Object.keys(i).length>0){let e=g(i);(Object.keys(e).length>0||Array.isArray(e))&&(t[r]=e)}else t[r]=i}return t}},80942:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(14232),s=r(79885),n=Object.defineProperty,a=new Map,o=new WeakMap,l=0,u=void 0;i.Component;var c=r(49218),h=r(66884),d=r(40052);let p=(e,t)=>{if(!t)return;let r=t.getLastResponse(),i=r?.content||[];e({type:c.A.WIDGET_APPEAR,payload:{items:i.map(({id:e,source_id:t})=>({id:e,sourceId:t})),request:(0,h.l)(t)}})},f=()=>{let{options:e}=(0,s.A)(),{visibility:{onInView:t,onUpdate:r}={}}=e,{ref:n,inView:c,entry:h}=(()=>{let{dispatch:e}=(0,d.A)(),{options:{visibility:t={}}={}}=(0,s.A)(),r=(0,s.A)().query,n=r.getLastResponse(),{triggerOnce:c=!0}=t,h=(0,i.useRef)(!0),{ref:f,inView:y,entry:m}=function({threshold:e,delay:t,trackVisibility:r,rootMargin:s,root:n,triggerOnce:c,skip:h,initialInView:d,fallbackInView:p,onChange:f}={}){var y;let[m,g]=i.useState(null),v=i.useRef(f),[b,E]=i.useState({inView:!!d,entry:void 0});v.current=f,i.useEffect(()=>{let i;if(!h&&m)return i=function(e,t,r={},i=u){if(void 0===window.IntersectionObserver&&void 0!==i){let s=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}let{id:s,observer:n,elements:c}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?!(r=e.root)?"0":(o.has(r)||(l+=1,o.set(r,l.toString())),o.get(r)):e[t]}`}).toString(),r=a.get(t);if(!r){let i,s=new Map,n=new IntersectionObserver(t=>{t.forEach(t=>{var r;let n=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=n),null==(r=s.get(t.target))||r.forEach(e=>{e(n,t)})})},e);i=n.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:n,elements:s},a.set(t,r)}return r}(r),h=c.get(e)||[];return c.has(e)||c.set(e,h),h.push(t),n.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(c.delete(e),n.unobserve(e)),0===c.size&&(n.disconnect(),a.delete(s))}}(m,(e,t)=>{E({inView:e,entry:t}),v.current&&v.current(e,t),t.isIntersecting&&c&&i&&(i(),i=void 0)},{root:n,rootMargin:s,threshold:e,trackVisibility:r,delay:t},p),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,m,n,s,c,h,r,p,t]);let A=null==(y=b.entry)?void 0:y.target,C=i.useRef(void 0);m||!A||c||h||C.current===A||(C.current=A,E({inView:!!d,entry:void 0}));let S=[g,b.inView,b.entry];return S.ref=S[0],S.inView=S[1],S.entry=S[2],S}({...t,triggerOnce:c}),g=(0,i.useCallback)(()=>{p(e,r)},[e,r]);return(0,i.useEffect)(()=>{h.current&&y&&n&&(h.current=!c,p(e,r))},[e,y,m,c,n,r]),{ref:f,inView:y,entry:m,trigger:g}})();return(0,i.useEffect)(()=>{c&&t&&t(h),r&&r(c,h)},[c,h,r,t]),n}},81969:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(13176);class s{static get(){return this.context}static toJson(){if(this.context){let e=this.context.toJson();return{...e.browser?{browser:e.browser}:{},...e.geo?{geo:e.geo}:{},...e.store?{store:e.store}:{},...e.page?{page:{...e.page,...e.locale?{...e.locale.country?{locale_country:e.locale.country}:{},...e.locale.language?{locale_language:e.locale.language}:{}}:{}}}:{},...e.user?{user:e.user}:{}}}return{}}}Object.defineProperty(s,"context",{enumerable:!0,configurable:!0,writable:!0,value:new i.A});let n=s},82944:e=>{e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},83325:(e,t,r)=>{r.d(t,{BU:()=>n,Gl:()=>o,hW:()=>a,lj:()=>i,vB:()=>s}),r(20310),r(46441);let i=e=>e.length?e[e.length-1]:void 0,s=e=>0===Object.keys(e||{}).length,n=e=>void 0===e,a=e=>String.fromCharCode(e<10?e+48:e<36?e+87:e+29),o=e=>{try{if(e)return JSON.parse(e);return""}catch(t){return e}}},85461:(e,t,r)=>{r.d(t,{Ht:()=>l,jE:()=>o});var i=r(14232);let s=i.createContext(void 0),n=i.createContext(!1);function a(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=s),window.ReactQueryClientContext):s)}let o=({context:e}={})=>{let t=i.useContext(a(e,i.useContext(n)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},l=({client:e,children:t,context:r,contextSharing:s=!1})=>{i.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let o=a(r,s);return i.createElement(n.Provider,{value:!r&&s},i.createElement(o.Provider,{value:e},t))}},91811:(e,t,r)=>{r.d(t,{kL:()=>f,v3:()=>g,Gc:()=>y,ri:()=>h,Nk:()=>p,Wc:()=>m});var i=r(78639),s=r(23913);let n={staging:"https://discover-staging.sitecore-staging.cloud",prod:"https://discover.sitecorecloud.io",prodEu:"https://discover-euc1.sitecorecloud.io",apse2:"https://discover-apse2.sitecorecloud.io"},a={australiaEast:"https://australiaeast-integrations.ordercloud.io",europeWest:"https://westeurope-integrations.ordercloud.io",japanEast:"https://japaneast-integrations.ordercloud.io",usEast:"https://useast-integrations.ordercloud.io",usWest:"https://uswest-integrations.ordercloud.io",usWestQa:"https://uswest-integrations.ordercloud-qa.com"},o="/event/{{key}}/v4/publish",l={build:(e,t)=>{let r=Object.assign({},e,t),{orderCloudRegion:i="usWest",env:s="prod",discoverDomainId:l}=t;if(!l)throw Error("{discoverDomainId} has not been provided.");return r.domainId=l,r.connector="oc",Object.assign(r,((e,t,r)=>({useAccessToken:!0,apiDomain:a[e],searchUrl:`${a[e]}${"/api/v1/search/{{domain}}".replace("{{domain}}",r)}`,eventUrl:`${n[t]}${o.replace("{{key}}",r)}`}))(i,s,l))}};var u=r(98212);let c={build:(e,t)=>{let r=Object.assign({},e,t),{env:i="prod",customerKey:s=""}=r,{serviceHost:a,apiKey:l}=t,c=h(s);if(!c)throw Error(`Invalid customerKey: "${s}". It should match the following pattern: (\\d+)-(\\d+). Example: 11111-2222222`);let[d,p]=c;if(Object.assign(r,{domainId:d,domainHash:p}),r.connector="sitecore",!l&&!a)throw Error('Invalid configuration: "apiKey" has not been set but not serviceHost provided. Please, review your domain configuration');return Object.assign(r,((e,t,r,i)=>t?{apiDomain:i,searchUrl:`${i}${"/discover/v2/{{key}}".replace("{{key}}",(0,u.aX)(e))}`,eventUrl:`${i}${o.replace("{{key}}",e)}`}:{apiDomain:r,searchUrl:`${r}/api/discover/v2`,eventUrl:`${r}/api/event/v4/publish`})(s,l,a,n[i]))}},h=e=>{if(e){let t=e.match(/^(\d+)-(\d+)$/);if(t)return[t[1],t[2]]}return null},d={apiDomain:"",apiKey:"",clientId:"",connector:"sitecore",customerKey:"",debug:!1,domainHash:"",domainId:"",env:"prod",eventUrl:"",orderCloudRegion:"usWest",publicSuffix:!1,searchUrl:"",tokenDomain:"",tokenUrl:"",trackConsent:!0,useAccessToken:!1,userId:null},p=e=>{d=((e,t)=>("useToken"in t&&void 0!==t.useToken&&s.Vy.warn('Parameter "useToken" has been deprecated'),t.customerKey)?c.build(e,t):l.build(e,t))(d,e)},f=e=>d[e],y=()=>d,m=e=>{d.trackConsent=e},g=()=>{let e=(0,i.z)({location:{hostname:""}}),{publicSuffix:t}=y();return t?e.location.hostname:e.location.hostname.split(".").reverse().splice(0,2).reverse().join(".")}},97555:(e,t,r)=>{r.d(t,{t:()=>o});var i=r(29382),s=r(15154);let n=["online","offline"];class a extends i.Q{constructor(){super(),this.setup=e=>{if(!s.S$&&window.addEventListener){let t=()=>e();
1return n.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{n.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}}let o=new a},98212:(e,t,r)=>{r.d(t,{aX:()=>i});let i=e=>{let t=e.split("-");return 2===t.length&&t[1]||""}},98462:(e,t,r)=>{let i,s;r.d(t,{Ay:()=>es});var n,a,o=r(14232),l=r(78639),u=r(23913),c=r(75243);class h{validateResponse(e,t){return e&&(e.errors||[]).length>0?e:null}processResponse(e,t){return e}}var d=r(91811),p=r(48915),f=r(49218),y=r(7060),m=r(79738);class g extends h{processResponse(e){return e.widgets?.forEach(({rfk_id:e,type:t,variation_id:r,used_in:i})=>{m.A.setMetadata(e,{rfkId:e,type:t,variationId:r,usedIn:i})}),e}}let v=!1,b=()=>{v||((()=>{let{trackConsent:e}=(0,d.Gc)();y.Ay.toggleTrackConsent(e),y.Ay.getContext().setBrowserUserAgent((0,l.z)({navigator:{userAgent:""}}).navigator.userAgent)})(),v=!0,y.Ay.getDispatcher().dispatch({type:f.A.INITIALIZE,payload:{options:{}}}))};var E=r(15154);let A=console;var C=r(68941),S=r(64650);class _{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,E.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:E.S$?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class O extends _{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||A,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=i?i:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=(0,E.pl)(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(E.lQ).catch(E.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,E.j3)(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>
1t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,i,s,n;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(s=this.retryer)||s.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let a=(0,E.jY)(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(o);let u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};l(c),null==(r=this.options.behavior)||r.onFetch(c),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=c.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(n=c.fetchOptions)?void 0:n.meta});let h=e=>{if((0,S.wm)(e)&&e.silent||this.dispatch({type:"error",error:e}),!(0,S.wm)(e)){var t,r,i,s;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(i=(s=this.cache.config).onSettled)||i.call(s,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=(0,S.II)({fn:c.fetchFn,abort:null==a?void 0:a.abort.bind(a),onSuccess:e=>{var t,r,i,s;if(void 0===e)return void h(Error(this.queryHash+" data is undefined"));this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(i=(s=this.cache.config).onSettled)||i.call(s,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){let t=t=>{var r,i;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:(0,S.v_)(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(i=e.dataUpdatedAt)?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let s=e.error;if((0,S.wm)(s)&&s.revert&&this.revertState)return{...this.revertState,fetchStatus:"idle"};return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),C.j.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}var T=r(29382);class R extends T.Q{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var i;let s=t.queryKey,n=null!=(i=t.queryHash)?i:(0,E.F$)(s,t),a=this.get(n);return a||(a=new O({cache:this,logger:e.getLogger(),queryKey:s,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){C.j.batch(()=>
1{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=(0,E.b_)(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>(0,E.MK)(r,e))}findAll(e,t){let[r]=(0,E.b_)(e,t);return Object.keys(r).length>0?this.queries.filter(e=>(0,E.MK)(r,e)):this.queries}notify(e){C.j.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){C.j.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){C.j.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class w extends _{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||A,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,r,i,s,n,a,o,l,u,c,h,d,p,f,y,m,g,v,b;let E=()=>{var e;return this.retryer=(0,S.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},A="loading"===this.state.status;try{if(!A){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(l=(u=this.mutationCache.config).onMutate)?void 0:l.call(u,this.state.variables,this));let e=await (null==(c=(h=this.options).onMutate)?void 0:c.call(h,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let d=await E();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,d,this.state.variables,this.state.context,this)),await (null==(r=(i=this.options).onSuccess)?void 0:r.call(i,d,this.state.variables,this.state.context)),await (null==(s=(n=this.mutationCache.config).onSettled)?void 0:s.call(n,d,null,this.state.variables,this.state.context,this)),await (null==(a=(o=this.options).onSettled)?void 0:a.call(o,d,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:d}),d}catch(e){try{throw await (null==(d=(p=this.mutationCache.config).onError)?void 0:d.call(p,e,this.state.variables,this.state.context,this)),await (null==(f=(y=this.options).onError)?void 0:f.call(y,e,this.state.variables,this.state.context)),await (null==(m=(g=this.mutationCache.config).onSettled)?void 0:m.call(g,void 0,e,this.state.variables,this.state.context,this)),await (null==(v=(b=this.options).onSettled)?void 0:v.call(b,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){let t=t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!(0,S.v_)(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
1sed:!1,status:"error"};case"setState":return{...t,...e.state}}};this.state=t(this.state),C.j.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}class I extends T.Q{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let i=new w({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){C.j.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>(0,E.nJ)(e,t))}findAll(e){return this.mutations.filter(t=>(0,E.nJ)(e,t))}notify(e){C.j.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>
1e.state.isPaused);return C.j.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(E.lQ)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}var D=r(1860),P=r(97555);function x(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}class k{constructor(e={}){this.queryCache=e.queryCache||new R,this.mutationCache=e.mutationCache||new I,this.logger=e.logger||A,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=D.m.subscribe(()=>{D.m.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=P.t.subscribe(()=>{P.t.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=(0,E.b_)(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let i=(0,E.vh)(e,t,r),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let i=this.queryCache.find(e),s=null==i?void 0:i.state.data,n=(0,E.Zw)(t,s);if(void 0===n)return;let a=(0,E.vh)(e),o=this.defaultQueryOptions(a);return this.queryCache.build(this,o).setData(n,{...r,manual:!0})}setQueriesData(e,t,r){return C.j.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=(0,E.b_)(e,t),i=this.queryCache;C.j.batch(()=>{i.findAll(r).forEach(e=>{i.remove(e)})})}resetQueries(e,t,r){let[i,s]=(0,E.b_)(e,t,r),n=this.queryCache,a={type:"active",...i};return C.j.batch(()=>(n.findAll(i).forEach(e=>{e.reset()}),this.refetchQueries(a,s)))}cancelQueries(e,t,r){let[i,s={}]=(0,E.b_)(e,t,r);return void 0===s.revert&&(s.revert=!0),Promise.all(C.j.batch(()=>this.queryCache.findAll(i).map(e=>e.cancel(s)))).then(E.lQ).catch(E.lQ)}invalidateQueries(e,t,r){let[i,s]=(0,E.b_)(e,t,r);return C.j.batch(()=>{var e,t;if(this.queryCache.findAll(i).forEach(e=>{e.invalidate()}),"none"===i.refetchType)return Promise.resolve();let r={...i,type:null!=(e=null!=(t=i.refetchType)?t:i.type)?e:"active"};return this.refetchQueries(r,s)})}refetchQueries(e,t,r){let[i,s]=(0,E.b_)(e,t,r),n=Promise.all(C.j.batch(()=>this.queryCache.findAll(i).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...s,cancelRefetch:null==(t=null==s?void 0:s.cancelRefetch)||t,meta:{refetchPage:i.refetchPage}})}))).then(E.lQ);return null!=s&&s.throwOnError||(n=n.catch(E.lQ)),n}fetchQuery(e,t,r){let i=(0,E.vh)(e,t,r),s=this.defaultQueryOptions(i);void 0===s.retry&&(s.retry=!1);let n=this.queryCache.build(this,s);return n.isStaleByTime(s.staleTime)?n.fetch(s):Promise.resolve(n.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(E.lQ).catch(E.lQ)}fetchInfiniteQuery(e,t,r){let i=(0,E.vh)(e,t,r);return i.behavior={onFetch:e=>{e.fetchFn=()=>{var t,r,i,s,n,a,o,l;let u,c=null==(t=e.fetchOptions)||null==(r=t.meta)?void 0:r.refetchPage,h=null==(i=e.fetchOptions)||null==(s=i.meta)?void 0:s.fetchMore,d=null==h?void 0:h.pageParam,p=(null==h?void 0:h.direction)==="forward",f=(null==h?void 0:h.direction)==="backward",y=(null==(n=e.state.data)?void 0:n.pages)||[],m=(null==(a=e.state.data)?void 0:a.pageParams)||[],g=m,v=!1,b=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),E=(e,t,r,i)=>(g=i?[t,...g]:[...g,t],i?[r,...e]:[...e,r]),A=(t,r,i,s)=>{if(v)return Promise.reject("Cancelled");if(void 0===i&&!r&&t.length)return Promise.resolve(t);let n={queryKey:e.queryKey,pageParam:i,meta:e.options.meta};return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?v=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{v=!0}),e.signal}}),Promise.resolve(b(n)).then(e=>E(t,i,e,s))};if(y.length)if(p){let t=void 0!==d,r=t?d:x(e.options,y);u=A(y,t,r)}else if(f){let t=void 0!==d,r=t?d:(o=e.options,l=y,null==o.getPreviousPageParam?void 0:o.getPreviousPageParam(l[0],l));u=A(y,t,r,!0)}else{g=[];let t=void 0===e.options.getNextPageParam;u=!c||!y[0]||c(y[0],0,y)?A([],t,m[0]):Promise.resolve(E([],m[0],y[0]));for(let r=1;r<y.length;r++)u=u.then(i=>{if(!c||!y[r]||c(y[r],r,y)){let s=t?m[r]:x(e.options,i);return A(i,t,s)}return Promise.resolve(E(i,m[r],y[r]))})}else u=A([]);return u.then(e=>({pages:e,pageParams:g}))}}},this.fetchQuery(i)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(E.lQ).catch(E.lQ)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>(0,E.Od)(e)===(0,E.Od)(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>(0,E.Cp)(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>(0,E.Od)(e)===(0,E.Od)(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>(0,E.Cp)(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=(0,E.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}var N=r(85461);class L{constructor(){Object.defineProperty(this,"containerHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1}),y.Ay.register(this)}handleAction(e){switch(e.type){case f.A.PAGE_CONTAINER_READY:this.containerHandled||(this.containerHandled=this.handlePageContainerReadyAction(e.payload));break;case f.A.FOUND_WIDGETS:{let{widgets:t=[]}=e.payload;t.forEach(({rfkId:e,entity:t,node:r})=>{this.handleAddWidget(e,t,r)})}}}handlePageContainerReadyAction(e){return!0}handleAddWidget(e,t,r){}}var j=r(9869);let q='[data-rfkid="rfkid_container"]',F={start:()=>{if(i)return;let e=document.querySelector(q);(i=new MutationObserver(t=>{let r=[];t.forEach(t=>
1{t.addedNodes.forEach(t=>{let i=t.dataset.rfkid,s=t.dataset.entity;t.nodeType===Node.ELEMENT_NODE&&(!e||!e.contains(t))&&i&&s&&r.push({rfkId:i,entity:s,node:t})})}),Object.keys(r).length>0&&y.Ay.getDispatcher().dispatch({type:f.A.FOUND_WIDGETS,payload:{widgets:r}})})).observe(document.body,{subtree:!0,childList:!0,characterData:!0})}};var G=r(50316);let U={keyphrase:(e,t)=>t.keyphrase&&e.setSearchQueryKeyphrase(t.keyphrase),suggestionsList:(e,t)=>t.suggestionsList&&e.setSearchSuggestion(t.suggestionsList.map(({suggestion:e,max:t=3})=>({name:e,max:t}))),itemsPerPage:(e,t)=>e.setSearchLimit(t.itemsPerPage)};var Q=r(74019);let M={onItemClick:Q.E.ITEM_CLICKED,onSuggestionClick:Q.E.SUGGESTION_CLICKED,onSuggestionAdded:Q.E.SUGGESTION_ADDED,onSuggestionRemoved:Q.E.SUGGESTION_REMOVED,onKeyphraseChange:Q.E.KEYPHRASE_CHANGED},K={itemsPerPage:(e,t)=>e.setRecommendationsLimit(t.itemsPerPage)};!function(e){e.ITEM_CLICKED="recommendation/ITEM_CLICKED",e.NAVIGATION_NEXT="recommendation/NAVIGATION_NEXT",e.NAVIGATION_PREV="recommendation/NAVIGATION_PREV"}(n=n||(n={}));let W={onNavigationNext:n.NAVIGATION_NEXT,onNavigationPrev:n.NAVIGATION_PREV,onItemClick:n.ITEM_CLICKED},H={keyphrase:(e,t)=>t.keyphrase&&e.setQuestionsKeyphrase(t.keyphrase),relatedQuestions:(e,t)=>t.relatedQuestions&&e.setQuestionsRelatedQuestionsLimit(t.relatedQuestions)};(a=a||(a={})).KEYPHRASE_CHANGED="questions/KEYPHRASE_CHANGED";let V={onKeyphraseChanged:a.KEYPHRASE_CHANGED},B={keyphrase:(e,t)=>t.keyphrase&&e.setSearchQueryKeyphrase(t.keyphrase),page:(e,t)=>e.setSearchOffset((t.itemsPerPage??e.getSearchLimit())*((t.page??1)-1)||0),itemsPerPage:(e,t)=>e.setSearchLimit(t.itemsPerPage),sortType:(e,t)=>e.setSearchSortCriteriaName(t.sortType)};var $=r(76537);let J={onKeyphraseChange:$.E.KEYPHRASE_CHANGED,onClearFilters:$.E.CLEAR_FILTERS,onResultsPerPageChange:$.E.RESULTS_PER_PAGE_CHANGED,onPageNumberChange:$.E.PAGE_NUMBER_CHANGED,onItemClick:$.E.ITEM_CLICKED,onSortChange:$.E.SORT_CHANGED,onFacetClick:$.E.FACET_CLICKED,onFilterClick:$.E.FILTER_CLICKED,onRemoveFilter:$.E.REMOVE_FILTER};var z=r(7820),Y=r(3773);let X={component:z.A,options:{state:{}}},Z=(e,t)=>((e,t)=>{u.Vy.debug("setWidgetType",`Type: ${e}`,`Mapping: ${JSON.stringify(t)}`),m.A.setWidgetType(e,t)})(e,t);class ee{constructor(){Object.defineProperty(this,"widgets",{enumerable:!0,configurable:!0,writable:!0,value:{}})}getWidgetComponentConfig(e,t){let r=m.A.get(e,t);if(r&&r.type&&r.component)return r}getWidget(e,t){if(!this.widgets[e]){let r=this.getWidgetComponentConfig(e,t);r&&(this.widgets[e]=this.doSetup({...r,entity:t},e))}return this.widgets[e]}setup(e,t){return this.getWidget(e,t)}}let et=ee;var er=r(38721);class ei extends et{doSetup({type:e,entity:t,component:r}){return(0,er.HL)(r,e,t)}}let es=({apiKey:e,children:t,clientId:r,customerKey:i,debug:n,discoverDomainId:a,env:l="prod",orderCloudRegion:u,publicSuffix:m=!1,requestMiddleware:v,serviceHost:E,trackConsent:A=!0,uri:C,useAccessToken:S,useStorage:_,useToken:O,userId:T,...R})=>((0,o.useMemo)(()=>{((e,{processor:t=new h}={})=>{(0,d.Nk)(e);let{useStorage:r=!1}=e;p.A.init(r),t&&c.A.setProcessor(t)})({apiKey:e,clientId:r,customerKey:i,debug:n,discoverDomainId:a,env:l,orderCloudRegion:u,publicSuffix:m,requestMiddleware:v,serviceHost:E,trackConsent:A,useAccessToken:S,useStorage:_,useToken:O,userId:T},{processor:new g}),((...e)=>{Z(G.b.CONTENT_BLOCK,X),Z(G.b.HTML_BLOCK,X),Z(G.b.BANNER,X),Z(G.b.SEO,{...X,component:Y.A}),Z(G.b.PREVIEW_SEARCH,{options:{propStateMapping:U,actionProps:M,state:{}}}),Z(G.b.RECOMMENDATION,{options:{propStateMapping:K,actionProps:W,state:{}}}),Z(G.b.QUESTIONS,{options:{propStateMapping:H,actionProps:V,state:{}}}),Z(G.b.SEARCH_RESULTS,{options:{propStateMapping:B,actionProps:J,state:{selectedFacets:{},page:1}}}),new L,new ei,(e=>{let{autoIncludeNewWidgets:t=!1,autoIncludeWidgets:r=!0,uri:i}=e||{};if((0,j.f)()){i&&y.Ay.getContext().setPageUri(i),b();return}if(y.Ay.getContext().setPageUri(i||window.location.pathname),t&&F.start(),r){let e=Array.from(document.querySelectorAll(`:not(${q}) > [data-rfkid]:not(${q})`)).filter((e,t,r)=>r.indexOf(e)===t).map(e=>
1({rfkId:e.dataset.rfkid,entity:e.dataset.entity,node:e}));e.length&&setTimeout(()=>{y.Ay.getDispatcher().dispatch({type:f.A.FOUND_WIDGETS,payload:{widgets:e}})},0)}b()})(...e)})({uri:C,autoIncludeWidgets:!1,autoIncludeNewWidgets:!1})},[]),(0,o.useEffect)(()=>{y.Ay.toggleTrackConsent(A)},[A]),(0,o.createElement)(N.Ht,{...R,client:(e=>(!s&&e?s=e:s||(s=new k({defaultOptions:{queries:{retry:!1,keepPreviousData:!0,refetchOnWindowFocus:!1}}})),s))(R.client)},t))}}]);
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.