(self.webpackChunkui=self.webpackChunkui||[]).push([[25],{235:t=>{(()=>{"use strict";var e={8578(t,e){e.getFromRemote=async function({contentLookupKey:t,contentObject:e,projectId:o,localRemoteCache:c,cacheTTL:r=3e3,handle:a,liveRef:i,contentCacheEndpoint:s}){const u=async()=>i&&s?async function(t,{contentObjectType:e,projectId:n,liveRef:o}){const c=`${t.replace(/\/+$/,"")}/${encodeURIComponent(n)}/content-cache/preview/${encodeURIComponent(e)}/${encodeURIComponent(o)}`,r=await fetch(c,{method:"GET"});if(!r.ok)throw new Error(`LIVE content fetch failed: ${r.status}`);return r.json()}(s,{contentObjectType:e.type,projectId:o,liveRef:i}):async function(t,e){return(await fetch("https://deploys.services.outsmartly.app/content",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})).json()}(0,{contentLookupKey:t,contentObjectString:JSON.stringify(e),projectId:o,handle:a,ACTION:"GET_CONTENT"}).then((t=>{if(t.success)return t.object;throw new Error(t.error)}));if(!c)return u();const l=function(t,e,n,o){return`${e}:${t}:${null!=n?n:""}:${null!=o?o:""}`}(t,o,a,i);try{if(n[l])return await n[l].promise;const t=u();return setTimeout((()=>{delete n[l]}),r),n[l]={promise:t},await t}catch(t){throw delete n[l],t}};const n={}}},n={};function o(t){var c=n[t];if(void 0!==c)return c.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}var c={};(()=>{var t=c;Object.defineProperty(t,"__esModule",{value:!0}),t.setupContent=function({getFromCache:t,getFromCacheList:o,logAssignment:c,selectContentResult:r,projectId:a,featureAssignments:i,localRemoteCache:s}){const u=o?async t=>(await o([t]))[0]:t;return async function(t,o){var l;const p=Boolean(o&&t.key),d=`content_${p?`${t.type}_${o}`:t.type}`,f=`__${d}`,h=null==i?void 0:i[d];if(null==h?void 0:h.startsWith("SKA-")){const e=`__content_${t.type}_${h}`,n=await u(e);if(n){c({featureId:d,variationId:h});const{__meta:t,...e}=n;return e}}if(a&&(null==h?void 0:h.startsWith("LIVE-"))){const o=null!==(l=null==i?void 0:i.contentCacheEndpoint)&&void 0!==l?l:n,c=await(0,e.getFromRemote)({contentLookupKey:f,contentObject:t,projectId:a,localRemoteCache:s,liveRef:h,contentCacheEndpoint:o}),{__meta:r,...u}=c;return u}let y=null;if(a&&"true"===(null==i?void 0:i[`preview_${t.type}`])){const n="product_mf"!==t.type&&"collection_mf"!==t.type||!p?null==i?void 0:i[d]:String(o);y=await(0,e.getFromRemote)({contentLookupKey:f,contentObject:t,projectId:a,localRemoteCache:s,handle:n})}if(y||(y=await u(f)),!y)return void(s&&console.warn(`No content found for "${t.type}"`));const m=await r(t,y,d);if(!m)return m;const{__meta:v,...w}=m;return w}};const e=o(8578),n="https://canvas.outsmartly.app"})(),t.exports=c})()}}]);