PageSourceSearch

https://locreach.ai/static/js/1244.4edac791.chunk.js

js locreach.ai collected 2026-10-05 12:14:36 UTC 46,427 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkinfluencer_finder_frontend=globalThis.webpackChunkinfluencer_finder_frontend||[]).push([[1244,4409],{1244:(e,t,n)=>{n.r(t),n.d(t,{default:()=>U});var o=n(5043),i=n(5475),r=n(3216),s=(n(1183),n(4409)),a=n(8334),l=n(3644),u=n(5456),d=n(8877),c=n(5582),m=n(4531),v=n(1575);const p=e=>{const t=Number(e);return Number.isFinite(t)?Math.max(0,t):0};n(3138);var g=n(579);const b=(0,o.lazy)(()=>Promise.all([n.e(1143),n.e(4972)]).then(n.bind(n,5353))),f=(0,o.lazy)(()=>n.e(3506).then(n.bind(n,3506))),h=(0,o.lazy)(()=>Promise.all([n.e(5573),n.e(1577),n.e(5308)]).then(n.bind(n,1577))),y=(0,o.lazy)(()=>n.e(9742).then(n.bind(n,7361))),C=e=>null==e?"":String(e).trim(),k=e=>C(e).startsWith(":"),x=e=>{const t=C(e);if(!t||k(t))return"";const n=C((0,c._M)(t));return n&&!k(n)?n:""},w=e=>{const t=(e=>C(e).replace(/\bwanting(?=an\b)/gi,"wanting ").replace(/\bfor(?=a\b)/gi,"for ").replace(/\bwith(?=a\b)/gi,"with ").replace(/\s+/g," ").trim())(e);return t?t.split(" ").map((e,t)=>0===t?e.charAt(0).toUpperCase()+e.slice(1):/^[A-Z0-9]{2,}$/.test(e)||/\d/.test(e)||/[\u2013-]/.test(e)||["LocReach","London","Instagram","TikTok","WhatsApp","Google"].includes(e)?e:e.toLowerCase()).join(" "):""},N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=Number(e);return Number.isFinite(n)?n:t},j=e=>{const t=C(e),n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(t);if(!n)return"";const o=Number(n[1]),i=Number(n[2]),r=Number(n[3]),s=new Date(Date.UTC(o,i-1,r));return s.getUTCFullYear()===o&&s.getUTCMonth()===i-1&&s.getUTCDate()===r?t:""};const _=e=>{const t=new Date(e||0).getTime();return!Number.isFinite(t)||t<=0?"\u2014":new Date(t).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"})},I=e=>{const t=new Date(e||0).getTime();return!Number.isFinite(t)||t<=0?"":new Date(t).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"numeric"})},A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=C(e.status).toLowerCase(),n=e.expiresAt||e.expires_at,o=Boolean(e.isOngoing||e.is_ongoing);if("paused"===t||!1===e.active)return{label:"Paused",tone:"warn",timing:"Not currently shareable"};if("expired"===t||(e=>{const t=new Date(e||0).getTime();return Boolean(Number.isFinite(t)&&t>0&&t<Date.now())})(n)){const e=I(n);return{label:"Expired",tone:"warn",timing:e?`Ended ${e}`:"Ended"}}if(o||!n)return{label:"Active",tone:"ok",timing:"Ongoing"};const i=I(n);return{label:"Active",tone:"ok",timing:i?`Ends ${i}`:"Active"}};async function T(e){const t=C(e);if(!t)return!1;try{var n,o;if(null!==(n=navigator)&&void 0!==n&&null!==(o=n.clipboard)&&void 0!==o&&o.writeText)return await navigator.clipboard.writeText(t),!0}catch{}try{const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",e.style.left="-9999px",document.body.appendChild(e),e.focus(),e.select();const n=document.execCommand("copy");return document.body.removeChild(e),Boolean(n)}catch{return!1}}function R(e){let{campaignId:t,returnTo:n,by:o,range:i,includeRoi:r=!1,refresh:s="",from:a="",to:l=""}=e;const u={};return t&&(u.campaignId=t),n&&(u.returnTo=n),s&&(u.refresh=s),a&&(u.from=a,u.fromDay=a),l&&(u.to=l,u.toDay=l),r&&o&&(u.by=o),r&&i&&(u.range=i),u}const S=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t){const e=C(o);if(e)return e}return""},B=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t){if(null==o||""===o)continue;const e=Number(o);if(Number.isFinite(e)&&e>0)return Math.round(e)}return 0},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=null!==t&&void 0!==t&&t.offerStrategy&&"object"===typeof t.offerStrategy?t.offerStrategy:{},o=null!==t&&void 0!==t&&t.campaignStrategy&&"object"===typeof t.campaignStrategy?t.campaignStrategy:{},i=null!==e&&void 0!==e&&e.offerStrategy&&"object"===typeof e.offerStrategy?e.offerStrategy:null!==e&&void 0!==e&&e.offer_strategy&&"object"===typeof e.offer_strategy?e.offer_strategy:{}
1,r={source:S(n.source,o.source,i.source,null===e||void 0===e?void 0:e.campaignSource,null===e||void 0===e?void 0:e.campaign_source),suggestionId:S(n.suggestionId,n.suggestion_id,o.suggestionId,o.suggestion_id,i.suggestionId,i.suggestion_id,null===e||void 0===e?void 0:e.selectedDemandSuggestionId,null===e||void 0===e?void 0:e.selected_demand_suggestion_id),businessName:S(n.businessName,n.business_name,o.businessName,o.business_name,i.businessName,i.business_name,null===e||void 0===e?void 0:e.businessName,null===e||void 0===e?void 0:e.business_name),businessType:S(n.businessType,n.business_type,o.businessType,o.business_type,i.businessType,i.business_type,null===e||void 0===e?void 0:e.businessType,null===e||void 0===e?void 0:e.business_type),city:S(n.city,o.city,i.city,null===e||void 0===e?void 0:e.city),postcode:S(n.postcode,o.postcode,i.postcode,null===e||void 0===e?void 0:e.postcode),productOrService:S(n.productOrService,n.product_or_service,o.productOrService,o.product_or_service,i.productOrService,i.product_or_service,null===e||void 0===e?void 0:e.productOrService,null===e||void 0===e?void 0:e.product_or_service),targetCustomer:S(n.targetCustomer,n.target_customer,o.targetCustomer,o.target_customer,i.targetCustomer,i.target_customer,null===e||void 0===e?void 0:e.targetCustomer,null===e||void 0===e?void 0:e.target_customer),campaignDescription:S(n.campaignDescription,n.campaign_description,o.campaignDescription,o.campaign_description,i.campaignDescription,i.campaign_description,null===e||void 0===e?void 0:e.campaignDescription,null===e||void 0===e?void 0:e.campaign_description),offerIdea:S(n.offerIdea,n.offer_idea,o.offerIdea,o.offer_idea,i.offerIdea,i.offer_idea,null===e||void 0===e?void 0:e.offerIdea,null===e||void 0===e?void 0:e.offer_idea),creatorType:S(n.creatorType,n.creator_type,o.creatorType,o.creator_type,i.creatorType,i.creator_type,null===e||void 0===e?void 0:e.creatorType,null===e||void 0===e?void 0:e.creator_type),creatorCategory:S(n.creatorCategory,n.creator_category,o.creatorCategory,o.creator_category,i.creatorCategory,i.creator_category,null===e||void 0===e?void 0:e.creatorCategory,null===e||void 0===e?void 0:e.creator_category),localAngle:S(n.localAngle,n.local_angle,o.localAngle,o.local_angle,i.localAngle,i.local_angle,null===e||void 0===e?void 0:e.localAngle,null===e||void 0===e?void 0:e.local_angle),confidence:S(n.confidence,n.suggestionConfidence,n.suggestion_confidence,o.confidence,o.suggestionConfidence,o.suggestion_confidence,i.confidence,i.suggestionConfidence,i.suggestion_confidence,null===e||void 0===e?void 0:e.suggestionConfidence,null===e||void 0===e?void 0:e.suggestion_confidence),radiusMiles:B(n.radiusMiles,n.radius_miles,o.radiusMiles,o.radius_miles,i.radiusMiles,i.radius_miles,null===e||void 0===e?void 0:e.radiusMiles,null===e||void 0===e?void 0:e.radius_miles)};return r.source||!r.suggestionId&&!r.offerIdea||(r.source="ai_demand_suggestion"),Object.fromEntries(Object.entries(r).filter(e=>{let[,t]=e;return"number"===typeof t?t>0:C(t).length>0}))},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Boolean((null===e||void 0===e?void 0:e.offerIdea)||(null===e||void 0===e?void 0:e.creatorType)||(null===e||void 0===e?void 0:e.localAngle)||(null===e||void 0===e?void 0:e.targetCustomer)||(null===e||void 0===e?void 0:e.productOrService)||(null===e||void 0===e?void 0:e.campaignDescription))};function L(e){let{strategy:t,invitesHref:n=""}=e;if(!O(t))return null;const o=[t.businessType?`Business: ${w(t.businessType)}`:"",t.city||t.postcode?`Area: ${t.city||t.postcode}`:"",t.productOrService?`Promotion focus: ${w(t.productOrService)}`:""].filter(Boolean),r=[["Suitable creators",w(t.creatorType)],["Why this could work",w(t.localAngle)],["Customers to reach",w(t.targetCustomer)],["Customer offer",w(t.offerIdea||t.campaignDescription)]].filter(e=>{let[,t]=e;return C(t)});return(0,g.jsx)("section",{className:"card ol-strategyCard","aria-label":"Promotion strategy",children:(0,g.jsxs)("div",{className:"card-body ol-strategyCardBody",children:[(0,g.jsxs)("div",{className:"ol-strategyHead",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:"ol-strategyEyebrow",children:"Promotion plan"}),(0,g.jsx)("h3",{className:"ol-strategyTitle",children:"Keep creator outreach aligned with the customer opportunity"}),(0,g.jsx)("p",{className:"ol-strategyDescription",children:"Use this plan when selecting creators, preparing messages and reviewing customer results."})]}),n?(0,g.jsx)(i.N_,{className:"btn btn-primary btn-sm",to:n,children:"Add creators"}):null]}),o.length?(0,g.jsx)("div",{className:"ol-strategyChips","aria-label":"Promotion strategy context",children:o.map(e=>(0,g.jsx)("span",{children:e},e))}):null,r.length?(0,g.jsx)("div",{className:"ol-strategyGrid",children:r.map(e=>{let[t,n]=e;return(0,g.jsxs)("div",{className:"ol-strategyItem",children:[(0,g.jsx)("span",{children:t}),(0,g.jsx)("strong",{children:n})]},t)})}):null]})})}function V(e){let{activeTab:t="overview"}=e;const n="roi"===t,o="invites"===t,i="redemptions"===t;return(0,g.jsx)("div",{className:("ol-tabSkeleton "+(n?"is-roi":o?"is-invites":i?"is-redemptions":"is-overview")).trim(),"aria-hidden":"true",children:(0,g.jsxs)("div",{className:"ol-skeletonPanel",children:[(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--short"}),(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--title"}),(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--body"}),(0,g.jsxs)("div",{className:"ol-skeletonGrid",children:[(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),n?(0,g.jsx)("span",{}):null]}),(0,g.jsx)("div",{className:"ol-skeletonWide"})]})})}function P(e){let{activeTab:t="overview",backTo:n="",backLabel:o="Promotions",embedded:r=!1}=e;return r?(0,g.jsx)("div",{className:"page marketing ol-page--embedded","aria-busy":"true",children:(0,g.jsxs)("div",{className:`ol-embed ol-tone--${$(t)}`,"data-offer-tone":$(t),children:[(0,g.jsx)("div",{className:"ol-embedTabs","aria-hidden":"true",children:(0,g.jsxs)("div",{className:"ol-skeletonTabs",children:[(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{})]})}),(0,g.jsx)("div",{className:"ol-content ol-content--embedded",children:(0,g.jsx)(V,{activeTab:t})})]})}):(0,g.jsx)("div",{className:"page marketing","aria-busy":"true",children:(0,g.jsx)("div",{className:"ol-loadingShell page-shell",children:(0,g.jsxs)("div",{className:"ol-loadingInner page-content",children:[(0,g.jsxs)("header",{className:"ol-loadingHeader",children:[n?(0,g.jsxs)(i.N_,{className:"wl-backLink",to:n,"aria-label":o,children:[(0,g.jsx)("span",{"aria-hidden":"true",children:"\u2190"}),(0,g.jsx)("span",{children:o})]}):null,(0,g.jsxs)("div",{className:"ol-loadingHero","aria-hidden":"true",children:[(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--eyebrow"}),(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--heroTitle"}),(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--heroTitleSmall"}),(0,g.jsx)("div",{className:"ol-skeletonLine ol-skeletonLine--subtitle"}),(0,g.jsxs)("div",{className:"ol-skeletonMeta",children:[(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{})]})]})]}),(0,g.jsxs)("div",{className:"ol-skeletonTabs","aria-hidden":"true",children:[(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{}),(0,g.jsx)("span",{})]}),(0,g.jsx)(V,{activeTab:t})]})})})}const $=e=>"invites"===e?"creator":"redemptions"===e?"outcome":"roi"===e?"roi":"summary";function U(e){var t,n,k,I,S,B,U;let{embedded:D=!1,hidePageChrome:E=!1,loadOnboardingState:q=null,onOpenOfferWorkspace:F=null,onOpenCreatorCrm:W=null,onOpenPublicInvite:G=null,onOpenOnboarding:z=null}=e;const{offerId:H}=(0,r.g)(),Y=(0,r.zy)(),[K,Z]=(0,i.ok)(),{toast:J,show:Q}=function(){const[e,t]=(0,o.useState)(""),n=(0,o.useRef)(null),i=(0,o.useCallback)(function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1400;t(String(e||""));const i="undefined"!==typeof window?window:null;i&&(n.current&&i.clearTimeout(n.current),n.current=i.setTimeout(()=>t(""),o))},[]);return(0,o.useEffect)(()=>{const e="undefined"!==typeof window?window:null;return()=>{e&&n.current&&e.clearTimeout(n.current),n.current=null}},[]),{toast:e,show:i}}(),X=(0,m.G)("attributionEnabled"),ee=X&&(0,m.G)("advancedAnalyticsEnabled"),te=(0,o.useRef)(!0),ne=(0,o.useRef)(0),oe=(0,o.useRef)("");(0,o.useEffect)(()=>(te.current=!0,()=>{te.current=!1}),[]);const ie=(0,o.useMemo)(()=>x(H),[H]),re=null===Y||void 0===Y||null===(t=Y.state)||void 0===t?void 0:t.campaignId,se=null===Y||void 0===Y||null===(n=Y.state)||void 0===n?void 0:n.returnTo,ae=null===Y||void 0===Y||null===(k=Y.state)||void 0===k?void 0:k.from,le=!0===(null===Y||void 0===Y||null===(I=Y.state)||void 0===I?void 0:I.embedded),ue=!0===(null===Y||void 0===Y||null===(S=Y.state)||void 0===S?void 0:S.hidePageChrome),de=(null===Y||void 0===Y||null===(B=Y.state)||void 0===B?void 0:B.refreshAt)||(null===Y||void 0===Y||null===(U=Y.state)||void 0===U?void 0:U.invitesUpdatedAt)||"",ce=Boolean(D||E||le||ue),me=(0,o.useMemo)(()=>{const e=x(K.get("campaignId")||""),t=x(re||"");return e||t},[K,re]),ve=K.get("returnTo")||"",pe=K.get("from")||"",ge=K.get("refresh")||"",be=(0,o.useMemo)(()=>C(ge||de),[ge,de]),fe=(0,o.useMemo)(()=>j(K.get("fromDay")||K.get("from")||""),[K]),he=(0,o.useMemo)(()=>j(K.get("toDay")||K.get("to")||""),[K]),ye=(0,o.useMemo)(()=>(0,c.Fr)(ve),[ve]),Ce=(0,o.useMemo)(()=>(0,c.Fr)(pe),[pe]),ke=(0,o.useMemo)(()=>(0,c.Fr)(C(se)),[se]),xe=(0,o.useMemo)(()=>(0,c.Fr)(C(ae)),[ae]),we=(0,o.useMemo)(()=>ye||Ce||ke||xe||"",[ye,Ce,ke,xe]);(0,o.useEffect)(()=>{const e=new URLSearchParams(K);let t=!1;ye&&ye!==ve&&(e.set("returnTo",ye),t=!0),!ye&&we&&(e.set("returnTo",we),t=!0),pe&&(e.delete("from"),t=!0),be&&be!==ge&&(e.set("refresh",be),t=!0),t&&(0,o.startTransition)(()=>{Z(e,{replace:!0})})},[K,Z,ve,pe,ge,ye,we,be]);const Ne=(0,o.useMemo)(()=>me?(0,c.VL)(c.bw.campaignDetails(me),we?{tab:"offers",returnTo:we}:{tab:"offers"}):c.bw.attributionOffers,[me,we]),je=we||Ne,_e=(0,o.useMemo)(()=>{const e=["overview"];return X&&e.push("invites","redemptions"),ee&&e.push("roi"),e},[X,ee]),Ie=(0,o.useMemo)(()=>{const e=function(e,t){const n=C(t);if(!n)return"overview";const o=`/attribution/offers/${encodeURIComponent(n)}`,i=`/attribution/offers/${n}`,r=C(e),s=r.startsWith(o)?r.slice(o.length):r.startsWith(i)?r.slice(i.length):"";return"/invites"===s?"invites":"/redemptions"===s?"redemptions":"/roi"===s?"roi":"overview"}(Y.pathname,ie);
1if("overview"!==e)return _e.includes(e)?e:"overview";const t=C(K.get("tab"));return _e.includes(t)?t:"overview"},[Y.pathname,ie,K,_e]),Ae=`ol-tone--${$(Ie)}`,Te="overview"===Ie,Re="invites"===Ie,Se="redemptions"===Ie,Be="roi"===Ie,Me=Re||Se||Be,Oe=(0,o.useMemo)(()=>"invite"===C(K.get("by"))?"invite":"offer",[K]),Le=(0,o.useMemo)(()=>C(K.get("range"))||"30d",[K]),[Ve,Pe]=(0,o.useState)(null),[$e,Ue]=(0,o.useState)(null),[De,Ee]=(0,o.useState)(Boolean(ie)),[qe,Fe]=(0,o.useState)(""),We=(0,o.useMemo)(()=>{if(!ie||!Ve)return null;return x((null===Ve||void 0===Ve?void 0:Ve.offerId)||(null===Ve||void 0===Ve?void 0:Ve.offer_id)||(null===Ve||void 0===Ve?void 0:Ve.id)||(null===Ve||void 0===Ve?void 0:Ve._id)||"")===ie?Ve:null},[Ve,ie]),Ge=Boolean(ie&&Ve&&!We),ze=Boolean(De||Ge);(0,o.useEffect)(()=>{Ue(null)},[ie,me,be]);const He=(0,o.useCallback)(async()=>{if(!ie)return null;ne.current+=1;const e=ne.current;te.current&&(Fe(""),Ee(!0));try{const t=await(0,d.tP)(ie);return te.current&&e===ne.current?(oe.current=ie,Pe(t||null),t||Fe("Promotion not found."),t||null):null}catch(t){return te.current&&e===ne.current?(Pe(null),Fe((null===t||void 0===t?void 0:t.message)||"Failed to load promotion details."),null):null}finally{if(!te.current||e!==ne.current)return null;Ee(!1)}},[ie]);(0,o.useEffect)(()=>{if(!ie)return oe.current="",Pe(null),Ee(!1),void Fe("");oe.current!==ie&&(oe.current=ie,Pe(null)),Fe(""),Ee(!0);const e=setTimeout(()=>{He()},0);return()=>clearTimeout(e)},[ie,He,be]),(0,o.useEffect)(()=>{if(!ie)return;const e=()=>{He()},t=()=>{"visible"===document.visibilityState&&He()};return window.addEventListener("focus",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",t)}},[ie,He]);const Ye=(0,o.useMemo)(()=>ie?(0,c.VL)(c.bw.attributionOffer(ie),R({campaignId:me,returnTo:we,refresh:be,from:fe,to:he})):c.bw.attributionOffers,[ie,me,we,be,fe,he]),Ke=(0,o.useMemo)(()=>ie?(0,c.VL)(c.bw.attributionOfferInvites(ie),R({campaignId:me,returnTo:we,refresh:be,from:fe,to:he})):c.bw.attributionOffers,[ie,me,we,be,fe,he]),Ze=(0,o.useMemo)(()=>ie?(0,c.VL)(c.bw.attributionOfferRedemptions(ie),R({campaignId:me,returnTo:we,refresh:be,from:fe,to:he})):c.bw.attributionOffers,[ie,me,we,be,fe,he]),Je=(0,o.useMemo)(()=>me?(0,c.VL)(c.bw.campaignDetails(me),{tab:"bookings",returnTo:we}):"",[me,we]),Qe=(0,o.useMemo)(()=>ie?(0,c.VL)(c.bw.attributionOfferRoi(ie),R({campaignId:me,returnTo:we,by:Oe,range:Le,includeRoi:!0,refresh:be,from:fe,to:he})):c.bw.attributionOffers,[ie,me,we,Oe,Le,be,fe,he]),Xe=(0,o.useMemo)(()=>function(e,t){var n,o,i,r,s,a,l,u,d,c,m,p,g,b,f,h,y,k,x,w,j,_,I,A,T;const R=(0,v._1)(e,null),S=t&&"object"===typeof t?t:null;var B,M,O,L,V,P,$,U,D,E,q,F,W,G,z,H,Y,K,Z,J,Q,X,ee,te;if(!S)return{...R,startsAt:R.startsAt||R.starts_at||(null===e||void 0===e?void 0:e.startsAt)||(null===e||void 0===e?void 0:e.starts_at)||"",expiresAt:R.expiresAt||R.expires_at||(null===e||void 0===e?void 0:e.expiresAt)||(null===e||void 0===e?void 0:e.expires_at)||"",isOngoing:Boolean(null!==(B=null!==(M=null!==(O=R.isOngoing)&&void 0!==O?O:R.is_ongoing)&&void 0!==M?M:null===e||void 0===e?void 0:e.isOngoing)&&void 0!==B?B:null===e||void 0===e?void 0:e.is_ongoing),status:C(R.status)||C(null===e||void 0===e?void 0:e.status)||"",spendValue:N(null!==(L=null!==(V=R.spendValue)&&void 0!==V?V:R.spend)&&void 0!==L?L:R.cost,0),roiValue:Number.isFinite(Number(null!==(P=null!==($=R.roiValue)&&void 0!==$?$:R.roiMultiple)&&void 0!==P?P:R.roi))?Number(null!==(U=null!==(D=R.roiValue)&&void 0!==D?D:R.roiMultiple)&&void 0!==U?U:R.roi):null,acceptedInviteCount:N(R.acceptedInviteCount,0),onboardingSubmittedCount:N(R.onboardingSubmittedCount,0),leadCount:N(null!==(E=null!==(q=null!==(F=R.leadCount)&&void 0!==F?F:R.leads)&&void 0!==q?q:null===e||void 0===e?void 0:e.leadCount)&&void 0!==E?E:null===e||void 0===e?void 0:e.leads,0),bookingRequestCount:N(null!==(W=null!==(G=null!==(z=R.bookingRequestCount)&&void 0!==z?z:R.bookingRequests)&&void 0!==G?G:null===e||void 0===e?void 0:e.bookingRequestCount)&&void 0!==W?W:null===e||void 0===e?void 0:e.bookingRequests,0),confirmedBookingCount:N(null!==(H=null!==(Y=null!==(K=R.confirmedBookingCount)&&void 0!==K?K:R.confirmedBookings)&&void 0!==Y?Y:null===e||void 0===e?void 0:e.confirmedBookingCount)&&void 0!==H?H:null===e||void 0===e?void 0:e.confirmedBookings,0),completedBookingCount:N(null!==(Z=null!==(J=null!==(Q=R.completedBookingCount)&&void 0!==Q?Q:R.completedBookings)&&void 0!==J?J:null===e||void 0===e?void 0:e.completedBookingCount)&&void 0!==Z?Z:null===e||void 0===e?void 0:e.completedBookings,0),noShowBookingCount:N(null!==(X=null!==(ee=null!==(te=R.noShowBookingCount)&&void 0!==te?te:R.noShowBookings)&&void 0!==ee?ee:null===e||void 0===e?void 0:e.noShowBookingCount)&&void 0!==X?X:null===e||void 0===e?void 0:e.noShowBookings,0)};const ne=null!==(n=null!==(o=null!==(i=null!==(r=null!==(s=S.roiValue)&&void 0!==s?s:S.roiMultiple)&&void 0!==r?r:S.roi)&&void 0!==i?i:R.roiValue)&&void 0!==o?o:R.roiMultiple)&&void 0!==n?n:R.roi;return{...R,...S,title:C(S.title)||R.title||"Promotion",code:C(S.code)||R.code||"",active:"boolean"===typeof S.active?S.active:R.active,updatedAt:S.updatedAt||R.updatedAt||"",inviteCount:N(S.inviteCount,R.inviteCount),activeInviteCount:N(S.activeInviteCount,R.activeInviteCount),acceptedInviteCount:N(S.acceptedInviteCount,R.acceptedInviteCount),onboardingSubmittedCount:N(S.onboardingSubmittedCount,R.onboardingSubmittedCount),leadCount:N(null!==(a=S.leadCount)&&void 0!==a?a:S.leads,null!==(l=R.leadCount)&&void 0!==l?l:R.leads),bookingRequestCount:N(null!==(u=S.bookingRequestCount)&&void 0!==u?u:S.bookingRequests,null!==(d=R.bookingRequestCount)&&void 0!==d?d:R.bookingRequests),confirmedBookingCount:N(null!==(c=S.confirmedBookingCount)&&void 0!==c?c:S.confirmedBookings,null!==(m=R.confirmedBookingCount)&&void 0!==m?m:R.confirmedBookings),completedBookingCount:N(null!==(p=S.completedBookingCount)&&void 0!==p?p:S.completedBookings,null!==(g=R.completedBookingCount)&&void 0!==g?g:R.completedBookings),noShowBookingCount:N(null!==(b=S.noSh
1owBookingCount)&&void 0!==b?b:S.noShowBookings,null!==(f=R.noShowBookingCount)&&void 0!==f?f:R.noShowBookings),recordedRevenueValue:N(null!==(h=null!==(y=S.recordedRevenue)&&void 0!==y?y:S.recorded_revenue)&&void 0!==h?h:S.recordedRevenueValue,null!==(k=R.recordedRevenueValue)&&void 0!==k?k:R.recordedRevenue),estimatedBookingRevenueValue:N(null!==(x=null!==(w=S.estimatedBookingRevenue)&&void 0!==w?w:S.estimated_booking_revenue)&&void 0!==x?x:S.estimatedBookingRevenueValue,null!==(j=R.estimatedBookingRevenueValue)&&void 0!==j?j:R.estimatedBookingRevenue),redemptionCount:N(S.redemptionCount,R.redemptionCount),clicksCount:N(S.clicksCount,R.clicksCount),revenueValue:N(S.revenueValue,R.revenueValue),unattributedCount:N(S.unattributedCount,R.unattributedCount),topInviteId:C(S.topInviteId)||R.topInviteId||"",topInviteRedemptions:N(S.topInviteRedemptions,R.topInviteRedemptions),currency:C(S.currency)||R.currency||"GBP",discountType:C(S.discountType)||R.discountType||"",discountText:C(S.discountText)||R.discountText||"",landingUrl:C(S.landingUrl)||R.landingUrl||"",spendValue:N(null!==(_=null!==(I=S.spendValue)&&void 0!==I?I:S.spend)&&void 0!==_?_:S.cost,N(null!==(A=null!==(T=R.spendValue)&&void 0!==T?T:R.spend)&&void 0!==A?A:R.cost,0)),roiValue:Number.isFinite(Number(ne))?Number(ne):null}}(We,$e),[We,$e]),et=(0,o.useMemo)(()=>M(Xe||We||{},(null===Y||void 0===Y?void 0:Y.state)||{}),[Xe,We,null===Y||void 0===Y?void 0:Y.state]),tt=(0,o.useMemo)(()=>O(et),[et]),nt=We?w(Xe.title):"",ot=C(Xe.code),it=(Xe.active,N(Xe.inviteCount,0),N(Xe.activeInviteCount,0),N(Xe.acceptedInviteCount,0),N(Xe.onboardingSubmittedCount,0),N(Xe.redemptionCount,0),N(Xe.spendValue,0),N(Xe.revenueValue,0),Number.isFinite(Number(Xe.roiValue))&&Number(Xe.roiValue),(0,o.useCallback)(async()=>{if(!ot)return;const e=await T(ot);Q(e?"Promotion code copied":"Copy failed",e?1200:2e3)},[ot,Q])),rt=((0,o.useCallback)(async()=>{if(!ie)return;const e=await T(ie);Q(e?"Support reference copied":"Copy failed",e?1200:2e3)},[ie,Q]),(0,o.useCallback)(()=>{const e=Date.now().toString();return(0,o.startTransition)(()=>{const t=new URLSearchParams(K);t.set("refresh",e),Z(t,{replace:!0})}),e},[K,Z])),st=(0,o.useCallback)(()=>{Ue(null),rt()},[rt]),at=(0,o.useMemo)(()=>{const e=[{label:"Overview",to:Ye,end:!0}];return X&&e.push({label:"Creators",to:Ke},{label:"Customer outcomes",to:Ze}),ee&&e.push({label:"Results",to:Qe}),e},[Ye,Ke,Je,Ze,Qe,X,ee]),lt=((0,o.useMemo)(()=>me?(0,c.VL)(c.bw.campaignDetails(me),we?{tab:"offers",returnTo:we}:{tab:"offers"}):"",[me,we]),(0,o.useMemo)(()=>A(Xe),[Xe])),ut=(0,o.useMemo)(()=>[{label:"Code",value:ot?(0,g.jsx)("button",{type:"button",className:"ol-metaInlineBtn",onClick:it,title:"Copy promotion code",children:(0,g.jsx)("span",{className:"code",children:ot})}):"\u2014"},...tt?[{label:"Setup",value:(0,g.jsx)("span",{className:"badge badge-primary",children:"Suggested strategy"})}]:[],{label:"Timing",value:lt.timing||"\u2014"},{label:"Updated",value:Xe.updatedAt?_(Xe.updatedAt):"\u2014"}],[ot,tt,Xe.updatedAt,lt,it]),dt=(0,o.useMemo)(()=>(0,g.jsx)("span",{className:"ok"===lt.tone?"badge badge-ok":"badge badge-warn",children:lt.label}),[lt]),ct=(0,o.useMemo)(()=>Me?[]:ut,[Me,ut]),mt=(0,o.useMemo)(()=>Re?"Creators are optional. Add them only when you want creator-specific tracking links and outreach notes.":Se?"Record completed customer actions and keep tracking accurate.":Be?"Review customer activity, revenue, and ROI for this promotion.":tt?"Manage the customer page, tracked links, optional creators, customer outcomes, and performance from one workspace.":X?"Manage the customer page, tracked links, optional creators, outcomes, and performance for this promotion.":"Review promotion details.",[Re,Se,Be,X,tt]),vt=(0,o.useMemo)(()=>Me?[{label:"Back to promotion",to:Ye,className:"btn btn-ghost"}]:[{label:De?"Loading\u2026":"Refresh",onClick:st,disabled:ze,className:"btn btn-ghost"}],[Me,ze,st,Ye]),pt=(0,o.useCallback)(()=>{Ue(null),rt()},[rt]),gt=(0,o.useCallback)(e=>{Ue(e||null)},[]),bt=(0,o.useMemo)(()=>{if(!Te||!X)return null;const e=function(){var e,t,n,o,i,r,s,a,l,u,d;let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const v=p(c.inviteCount),g=p(c.activeInviteCount),b=p(c.acceptedInviteCount),f=p(c.onboardingSubmittedCount),h=p(null!==(e=c.clicksCount)&&void 0!==e?e:c.clicks),y=p(null!==(t=c.leadCount)&&void 0!==t?t:c.leads),C=p(null!==(n=c.bookingRequestCount)&&void 0!==n?n:c.bookingRequests),k=p(null!==(o=c.confirmedBookingCount)&&void 0!==o?o:c.confirmedBookings),x=p(null!==(i=c.completedBookingCount)&&void 0!==i?i:c.completedBookings),w=p(null!==(r=c.noShowBookingCount)&&void 0!==r?r:c.noShowBookings),N=Math.min(C||Number.POSITIVE_INFINITY,k+x+w),j=p(c.redemptionCount),_=p(null!==(s=null!==(a=c.spendValue)&&void 0!==a?a:c.spend)&&void 0!==s?s:c.cost),I=p(null!==(l=c.revenueValue)&&void 0!==l?l:c.revenue),A=Number(null!==(u=null!==(d=c.roiValue)&&void 0!==d?d:c.roiMultiple)&&void 0!==u?u:c.roi);if(0===v)return{id:"add-creators",priority:100,eyebrow:"Recommended next step",title:"Cho
1ose creators for this promotion",description:"Start with a small group of relevant local creators and prepare one tracked promotion link for each person.",note:"A focused creator list is easier to manage and measure.",primaryAction:m.creators?{label:"Choose creators",to:m.creators}:null,evidence:{inviteCount:v}};if(b>f){const e=b-f;return{id:"collect-creator-details",priority:95,eyebrow:"Recommended next step",title:`Collect details from ${e} creator${1===e?"":"s"}`,description:"They have agreed to take part but have not completed the details needed to run the promotion.",note:"Open creator outreach and share the onboarding link where needed.",primaryAction:m.creators?{label:"Review creator outreach",to:m.creators}:null,evidence:{acceptedInviteCount:b,onboardingSubmittedCount:f}}}if(C>N){const e=C-N;return{id:"review-bookings",priority:92,eyebrow:"Customer action required",title:`Review ${e} booking request${1===e?"":"s"}`,description:"Customers have requested a date and time. Respond promptly so interest is not lost.",note:"Confirm availability or decline the request so the customer knows what happens next.",primaryAction:m.bookings?{label:"Review bookings",to:m.bookings}:null,evidence:{bookingRequestCount:C,confirmedBookingCount:k,completedBookingCount:x,noShowBookingCount:w,reachedConfirmationCount:N}}}if(y>0&&0===C)return{id:"follow-up-leads",priority:90,eyebrow:"Recommended next step",title:"Follow up with interested customers",description:"Customer details have been captured, but no booking requests have been recorded yet.",note:"Prioritise recent leads and customers who supplied a phone number.",primaryAction:m.bookings?{label:"Open campaign customers",to:m.bookings}:m.roi?{label:"Review customer results",to:m.roi}:null,evidence:{leadCount:y,bookingRequestCount:C}};if(h>0&&0===y)return{id:"improve-conversion",priority:88,eyebrow:"Performance insight",title:"Turn more visits into customer leads",description:"People are opening the promotion, but no customer details have been captured. Review the offer value, page clarity and call to action.",note:`${h} tracked visit${1===h?"":"s"} recorded so far.`,primaryAction:m.roi?{label:"Review customer results",to:m.roi}:null,evidence:{clicks:h,leadCount:y}};if(k>0)return{id:"complete-bookings",priority:85,eyebrow:"Recommended next step",title:`Update ${k} confirmed booking${1===k?"":"s"}`,description:"Mark completed visits, cancellations or no-shows so campaign results remain accurate.",primaryAction:m.bookings?{label:"Update bookings",to:m.bookings}:null,evidence:{confirmedBookingCount:k,completedBookingCount:x}};return 0===j&&0===x?{id:"start-outreach",priority:80,eyebrow:"Recommended next step",title:"Start creator outreach",description:"The promotion is ready. Send the prepared creator messages and tracked links to begin generating customer activity.",note:g>0?`${g} creator record${1===g?" is":"s are"} active.`:"Use the creator-specific link in every message.",primaryAction:m.creators?{label:"Open creator outreach",to:m.creators}:null,evidence:{inviteCount:v,activeInviteCount:g}}:_<=0&&(I>0||x>0||j>0)?{id:"complete-roi-inputs",priority:70,eyebrow:"Recommended next step",title:"Add campaign spend to calculate ROI",description:"Customer outcomes are available, but return on investment needs the promotion cost.",note:I>0?"Attributed revenue is already available.":"Add revenue when customer value is known.",primaryAction:m.roi?{label:"Review customer results",to:m.roi}:null,secondaryAction:m.redemptions?{label:"Record customer outcome",to:m.redemptions,className:"btn btn-ghost"}:null,evidence:{completedBookingCount:x,redemptionCount:j,spend:_,revenue:I}}:{id:"review-performance",priority:60,eyebrow:"Recommended next step",title:"Review customer acquisition results",description:"Compare customer leads, booking requests, completed outcomes, revenue and creator attribution to decide what to improve next.",note:Number.isFinite(A)?`Current ROI: ${Math.round(10*A)/10}x.`:"ROI will appear when spend and revenue data are available.",primaryAction:m.roi?{label:"Review customer results",to:m.roi}:null,evidence:{leadCount:y,bookingRequestCount:C,completedBookingCount:x,redemptionCount:j,spend:_,revenue:I,roi:A}}}(Xe,{creators:Ke,bookings:Je,redemptions:Ze,roi:Qe});
1return e?(0,g.jsx)(u.A,{eyebrow:e.eyebrow,title:e.title,description:e.description,note:e.note,primaryAction:e.primaryAction,secondaryAction:e.secondaryAction}):null},[Te,X,Xe,Ke,Ze,Qe]),ft=()=>ze&&!We?(0,g.jsx)(V,{activeTab:Ie}):qe?(0,g.jsx)(s.A,{message:qe}):We?Re?X?(0,g.jsx)(f,{offerId:ie,campaignId:me,offerTitle:nt,offerStrategy:et,returnTo:we||je,onInvitesChanged:pt,loadOnboardingState:q,onOpenOfferWorkspace:F,onOpenCreatorCrm:W,onOpenPublicInvite:G,onOpenOnboarding:z,embedded:!0,hidePageChrome:!0,refreshToken:be}):(0,g.jsx)(s.A,{message:"Attribution features are currently disabled."}):Se?X?(0,g.jsx)(h,{offerId:ie,campaignId:me,completedBookingCount:N(Xe.completedBookingCount,0),refreshToken:be,inWorkspace:!0}):(0,g.jsx)(s.A,{message:"Attribution features are currently disabled."}):Be?ee?(0,g.jsx)(y,{offerId:ie,campaignId:me,refreshToken:be,inWorkspace:!0}):(0,g.jsx)(s.A,{message:"ROI analytics are currently disabled for this promotion."}):(0,g.jsx)(b,{offerId:ie,campaignId:me,returnTo:we||je,offerMeta:We,offerStrategy:et,inWorkspace:!0,onSummaryChange:gt,refreshToken:be}):(0,g.jsx)(s.A,{message:"Promotion not found."});return ie?!ze||We||qe?ce?(0,g.jsx)("div",{className:"page marketing ol-page--embedded","aria-busy":De?"true":"false",children:(0,g.jsxs)("div",{className:"ol-embed "+(Me?"ol-embed--focused":""),children:[J?(0,g.jsx)("div",{className:"ol-toastInline",role:"status","aria-live":"polite",children:J}):null,(0,g.jsx)("div",{className:"ol-embedTabs",children:(0,g.jsx)(l.A,{items:at})}),(0,g.jsx)("div",{className:"ol-content ol-content--embedded",children:(0,g.jsx)(o.Suspense,{fallback:(0,g.jsx)(V,{activeTab:Ie}),children:ft()})})]})}):(0,g.jsx)("div",{className:"page marketing","aria-busy":De?"true":"false",children:(0,g.jsxs)(a.A,{showBack:!0,backTo:je,backLabel:"Promotions",eyebrow:"Promotion",title:nt,subtitle:mt,status:Me?null:dt,meta:ct,primaryAction:null,secondaryActions:vt,progress:null,nextStep:bt,aiInsight:Te&&tt?(0,g.jsx)(L,{strategy:et,invitesHref:Ke}):null,tabs:(0,g.jsx)(l.A,{items:at}),stickyAction:null,className:`ol-workspace ${Ae} ${Me?"ol-workspace--focused":""}`.trim(),children:[J?(0,g.jsx)("div",{className:"ol-toastInline",role:"status","aria-live":"polite",children:J}):null,(0,g.jsx)("div",{className:"ol-content",children:(0,g.jsx)(o.Suspense,{fallback:(0,g.jsx)(V,{activeTab:Ie}),children:ft()})})]})}):(0,g.jsx)(P,{activeTab:Ie,backTo:je,backLabel:"Promotions",embedded:ce}):(0,g.jsx)("div",{className:"page marketing",children:(0,g.jsx)("div",{className:"ol-shell",children:(0,g.jsx)("div",{className:"card",children:(0,g.jsxs)("div",{className:"card-body ol-empty",children:[(0,g.jsx)("span",{className:"badge badge-warn",children:"Invalid or missing promotion ID"}),(0,g.jsx)("div",{className:"ol-spacer","aria-hidden":"true"}),(0,g.jsx)(i.N_,{className:"btn btn-primary",to:je,children:"Back"})]})})})})}},1575:(e,t,n)=>{n.d(t,{_1:()=>l});const o=e=>null==e?"":String(e).trim(),i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const i of t){if("string"===typeof i){const e=o(i);if(e)return e;continue}if(null!=i)return i}return""},r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t){const e=Number(o);if(Number.isFinite(e))return e}return 0},s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const o of t)if("boolean"===typeof o)return o;return null},a=e=>e&&"object"===typeof e&&!Array.isArray(e)?e:{};function l(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const t=a(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),n=a(e),o=a(n.totals||n.summary||n.metrics),l=a(n.offer||n.offerDetails),u=a(n.promotion||n.promo),d=a(n.destination||n.destinationDetails),c=a(n.topInvite||o.topInvite),m=r(n.spendValue,n.spend,n.cost,o.spendValue,o.spend,o.cost,t.spendValue,t.spend,t.cost),v=i(n.roiValue,n.roiMultiple,n.roi,o.roiValue,o.roiMultiple,o.roi,t.roiValue,t.roiMultiple,t.roi),p=Number(v),g=Number.isFinite(p)?p:null,b=i(n.conversionRate,n.conversion_rate,o.conversionRate,o.conversion_rate,t.conversionRate,t.conversion_rate),f=Number(b),h=Number.isFinite(f)?f:null;return{title:i(l.title,n.title,t.title,l.name,n.name,t.name)||"Offer",code:i(l.code,n.code,t.code)||"",active:s(n.active,l.active,t.active,n.isActive,l.isActive,t.isActive),updatedAt:i(n.updatedAt,n.updated_at,n.lastUpdated,n.last_updated,l.updatedAt,l.updated_at,t.updatedAt,t.updated_at,t.createdAt,t.created_at)||"",inviteCount:r(n.inviteCount,n.invitesCount,n.totalInvites,o.inviteCount,o.invitesCount,o.totalInvites,t.inviteCount,t.invitesCount,t.totalInvites),activeInviteCount:r(n.activeInviteCount,n.activeInvitesCount,n.activeInvites,o.activeInviteCount,o.activeInvitesCount,o.activeInvites,t.activeInviteCount,t.activeInvitesCount,t.activeInvites),acceptedInviteCount:r(n.acceptedInviteCount,n.acceptedInvitesCount,n.acceptedInvites,n.acceptedCount,o.acceptedInviteCount,o.acceptedInvitesCount,o.acceptedInvites,o.acceptedCount,t.acceptedInviteCount,t.acceptedInvitesCount,t.acceptedInvites,t.acceptedCount),onboardingSubmittedCount:r(n.onboardingSubmittedCount,n.submittedOnboardingCount,n.submittedOnboardings,o.onboardingSubmittedCount,o.submittedOnboardingCount,o.submittedOnboardings,t.onboardingSubmittedCount,t.submittedOnboardingCount,t.submittedOnboardings),clicksCount:r(n.clicksCount,n.clicks,n.totalClicks,o.clicksCount,o.clicks,o.totalClicks,t.clicksCount,t.clicks,t.totalClicks),redemptionCount:r(n.redemptionCount,n.redemptions,n.redemptionsCount,n.totalRedemptions,o.redemptionCount,o.redemptions,o.redemptionsCount,o.totalRedemptions,t.redemptionCount,t.redemptions,t.redemptionsCount,t.totalRedemptions),revenueValue:r(n.revenueValue,n.revenue,n.totalRevenue,o.revenueValue,o.revenue,o.totalRevenue,t.revenueValue,t.revenue,t.totalRevenue),unattributedCount:r(n.unattributedCount,n.unattributedRedemptions,n.unattributed_redemptions,o.unattributedCount,o.unattributedRedemptions,o.unattributed_redemptions,t.unattributedCount,t.unattributedRedemptions,t.unattributed_redemptions),topInviteId:i(c.inviteId,c.id,c.code,c.handle)||"",topInviteRedemptions:r(c.redemptions,c.redemptionsCount,c.totalRedemptions),currency:i(n.currency,o.currency,t.currency,"GBP"),landingUrl:i(d.landingUrl,d.landingURL,d.url,n.landingUrl,n.landingURL,n.destinationUrl,n.url,t.landingUrl,t.landingURL,t.destinationUrl,t.url)||"",publicPageUrl:i(d.publicPageUrl,d.public_page_url,n.publicPageUrl,n.public_page_url,t.publicPageUrl,t.public_page_url)||"",pageSlug:i(d.pageSlug,d.page_slug,n.pageSlug,n.page_slug,t.pageSlug,t.page_slug)||"",destinationMode:i(d.destinationMode,d.destination_mode,n.destinationMode,n.destination_mode,t.destinationMode,t.destination_mode)||"",landingPageEnabled:s(d.landingPageEnabled,d.landing_page_enabled,n.landingPageEnabled,n.landing_page_enabled,t.landingPageEnabled,t.landing_page_enabled),customerActionType:i(d.customerActionType,d.customer_action_type,n.customerActionType,n.customer_action_type,t.customerActionType,t.customer_action_type)||"",status:i(n.status,l.status,u.status,t.status)||"",startsAt:i(u.startsAt,u.starts_at,n.startsAt,n.starts_at,t.startsAt,t.starts_at)||"",expiresAt:i(u.expiresAt,u.expires_at,n.expiresAt,n.expires_at,t.expiresAt,t.expires_at)||"",isOngoing:s(u.isOngoing,u.is_ongoing,n.isOngoing,n.is_ongoing,t.isOngoing,t.is_ongoing),discountType:i(u.discountType,u.discount_type,n.discountType,n.discount_type,t.discountType,t.discount_type)||"",discountValue:i(u.discountValue,u.discount_value,n.discountValue,n.discount_value,t.discountValue,t.discount_value),discountText:i(u.discountText,u.discount_text,n.discountText,n.discount_text,t.discountText,t.discount_text)||"",spendValue:m,cost:m,spend:m,roiValue:g,roiMultiple:g,roi:g,conversionRate:h}}},3644:(e,t,n)=>{n.d(t,{A:()=>c});var o=n(5043),i=n(3216),r=n(5475),s=n(579);function a(e){const t=String(e||"").trim();if(!t)return"";return t.replace(/\/+$/,"")||"/"}function l(e){return function(e,t){try{return new URLSearchParams(e||"").get(t)||""}catch{return""}}(e,"tab")||"overview"}function u(e,t){const n=function(e){if(!e)return{pathname:"",search:""};if("string"===typeof e)try{const t=new URL(e,window.location.origin);return{pathname:a(t.pathname),search:t.search||""}}catch{const[t,n=""]=String(e).split("?");return{pathname:a(t),search:n?`?${n}`:""}}return{pathname:a(e.pathname||""),search:e.search||""}}(null===t||void 0===t?void 0:t.to);if(!n.pathname)return!1;const o=a((null===e||void 0===e?void 0:e.pathname)||""),i=(null===e||void 0===e?void 0:e.search)||"",r=n.pathname,s=n.search||"";return!!(null!==t&&void 0!==t&&t.end?o===r:o===r||o.startsWith(`${r}/`))&&function(e,t){const n=l(t),o=l(e);if(n!==o)return!1;const i=new Set(["returnTo","from","sourceTab","offerId","offerView"]);try{const n=new URLSearchParams(t||""),o=new URLSearchParams(e||"");for(const[e,t]of n.entries())if(!i.has(e)&&"tab"!==e&&(o.get(e)||"")!==t)return!1;return!0}catch{return n===o}}(i,s)}function d(e){let{items:t=[],listClassName:n="",tabClassName:o=""}=e;const a=(0,i.zy)();return(0,s.jsx)("div",{className:`wl-tabsList cd-tabs ol-tabs ${n}`.trim(),role:"tablist","aria-label":"Workspace tabs",children:t.map((e,t)=>{const n=u(a,e);return(0,s.jsx)(r.N_,{to:(null===e||void 0===e?void 0:e.to)||"#",className:`wl-tabLink cd-tab ol-tab ${n?"is-active":""} ${o}`.trim(),"aria-current":n?"page":void 0,children:(null===e||void 0===e?void 0:e.label)||"Tab"},`${(null===e||void 0===e?void 0:e.label)||"tab"}-${t}`)})})}d.displayName="WorkspaceTabs";const c=(0,o.memo)(d)},4409:(e,t,n)=>{n.d(t,{A:()=>r});var o=n(5043),i=n(579);const r=e=>{let{message:t,variant:n="error",onClose:r,autoHideMs:s}=e;const a=(0,o.useMemo)(()=>String(t||"").trim(),[t]);if((0,o.useEffect)(()=>
1{if(!a)return;if(!s)return;if("function"!==typeof r)return;const e=setTimeout(()=>r(),s);return()=>clearTimeout(e)},[a,s,r]),!a)return null;const l="error"===n?"alert":"status";return(0,i.jsxs)("div",{className:`notice notice--${n}`,role:l,"aria-live":"error"===n?"assertive":"polite",children:[(0,i.jsxs)("div",{className:"notice__content",children:[(0,i.jsxs)("span",{className:"notice__icon","aria-hidden":"true",children:["error"===n&&"\u26d4","warn"===n&&"\u26a0\ufe0f","info"===n&&"\u2139\ufe0f","success"===n&&"\u2705"]}),(0,i.jsx)("p",{className:"notice__text",children:a})]}),"function"===typeof r&&(0,i.jsx)("button",{type:"button",className:"notice__close","aria-label":"Dismiss notification",onClick:r,children:"\u2715"})]})}},5456:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(5043),i=n(5475),r=n(579);function s(e,t,n){if(!e||!e.label)return null;const{label:o,to:s,onClick:a,disabled:l=!1,className:u=n,type:d="button"}=e,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"btn btn--ghost";const n=(String(e||t).trim()||t).split(/\s+/).filter(Boolean).map(e=>{switch(e){case"btn-primary":return"btn--primary";case"btn-ghost":return"btn--ghost";case"btn-sm":return"btn--sm";case"btn-outline":return"btn--outline";case"btn-danger":return"btn--danger";case"btn-success":return"btn--success";case"btn-soft":return"btn--soft";default:return e}});return n.includes("btn")||n.unshift("btn"),[...new Set(n)].join(" ")}(u,n),m=function(e){let{disabled:t,onClick:n,isLink:o}=e;return e=>{if(t)return e.preventDefault(),void e.stopPropagation();"function"===typeof n&&n(e),o||e.defaultPrevented}}({disabled:l,onClick:a,isLink:Boolean(s)});return s?(0,r.jsx)(i.N_,{to:l?"#":s,className:c,"aria-disabled":l?"true":void 0,tabIndex:l?-1:void 0,onClick:m,children:o},t):(0,r.jsx)("button",{type:d,className:c,onClick:m,disabled:l,children:o},t)}function a(e){let{eyebrow:t="Next step",icon:n=null,title:o,description:i="",note:a="",primaryAction:l=null,secondaryAction:u=null}=e;return o?(0,r.jsxs)("section",{className:"nba-card","aria-label":t||"Next step",children:[(0,r.jsx)("div",{className:"nba-top",children:(0,r.jsxs)("div",{className:"nba-copy",children:[t?(0,r.jsx)("div",{className:"nba-eyebrow",children:t}):null,(0,r.jsxs)("div",{className:"nba-titleRow",children:[n?(0,r.jsx)("div",{className:"nba-icon","aria-hidden":"true",children:n}):null,(0,r.jsx)("h3",{className:"nba-title",children:o})]}),i?(0,r.jsx)("p",{className:"nba-description",children:i}):null,a?(0,r.jsx)("div",{className:"nba-note",children:a}):null]})}),l||u?(0,r.jsxs)("div",{className:"nba-actions",children:[l?s(l,"nba-primary","btn btn--primary"):null,u?s(u,"nba-secondary","btn btn--ghost"):null]}):null]}):null}a.displayName="NextBestActionCard";const l=(0,o.memo)(a)},8334:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(5043),i=n(5475),r=n(579);function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"btn btn--ghost";if(!e||!e.label)return null;const{label:o,onClick:s,to:a,disabled:l=!1,className:u=n,type:d="button"}=e,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"btn btn--ghost";const n=(String(e||t).trim()||t).split(/\s+/).filter(Boolean).map(e=>{switch(e){case"btn-primary":return"btn--primary";case"btn-ghost":return"btn--ghost";case"btn-sm":return"btn--sm";case"btn-outline":return"btn--outline";case"btn-danger":return"btn--danger";case"btn-success":return"btn--success";case"btn-soft":return"btn--soft";default:return e}});return n.includes("btn")||n.unshift("btn"),[...new Set(n)].join(" ")}(u,n);return a?(0,r.jsx)(i.N_,{to:l?"#":a,className:c,"aria-disabled":l?"true":void 0,tabIndex:l?-1:void 0,onClick:e=>{if(l)return e.preventDefault(),void e.stopPropagation();null===s||void 0===s||s(e)},children:o},t):(0,r.jsx)("button",{type:d,className:c,onClick:s,disabled:l,children:o},t)}function a(e){let{showBack:t=!1,backTo:n="",backLabel:o="Back",eyebrow:a="",title:l,subtitle:u="",status:d=null,meta:c=[],primaryAction:m=null,secondaryActions:v=[],progress:p=null,nextStep:g=null,aiInsight:b=null,tabs:f=null,children:h,stickyAction:y=null,className:C=""}=e;const k=Array.isArray(c)&&c.length>
10,x=Boolean(f),w=Array.isArray(v)&&v.length>0,N=Boolean(p||g||b),j=Boolean(t&&n);return(0,r.jsxs)("div",{className:`wl-page page-shell ${C}`.trim(),children:[(0,r.jsxs)("div",{className:"wl-shell page-content",children:[(0,r.jsxs)("header",{className:"wl-header",children:[(0,r.jsxs)("div",{className:"wl-headerTop",children:[(0,r.jsxs)("div",{className:"wl-headerLeft",children:[j?(0,r.jsxs)(i.N_,{className:"wl-backLink",to:n,"aria-label":o,children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"\u2190"}),(0,r.jsx)("span",{children:o})]}):null,(0,r.jsxs)("div",{className:"wl-titleWrap",children:[a?(0,r.jsx)("div",{className:"wl-eyebrow",children:a}):null,(0,r.jsxs)("div",{className:"wl-titleRow",children:[(0,r.jsx)("h1",{className:"wl-title",children:l}),d?(0,r.jsx)("div",{className:"wl-statusWrap",children:d}):null]}),u?(0,r.jsx)("p",{className:"wl-subtitle",children:u}):null]})]}),(0,r.jsxs)("div",{className:"wl-headerRight",children:[w?v.map((e,t)=>s(e,`${(null===e||void 0===e?void 0:e.label)||"secondary"}-${t}`,"btn btn--ghost")):null,m?s(m,"primary-action","btn btn--primary"):null]})]}),k?(0,r.jsx)("div",{className:"wl-metaRow","aria-label":"Workspace metadata",children:c.map((e,t)=>(0,r.jsxs)("div",{className:"wl-metaItem",children:[(0,r.jsx)("span",{className:"wl-metaLabel",children:e.label}),(0,r.jsx)("span",{className:"wl-metaValue",children:e.value})]},`${(null===e||void 0===e?void 0:e.label)||"meta"}-${t}`))}):null]}),N?(0,r.jsxs)("section",{className:"wl-guidance",children:[p?(0,r.jsx)("div",{className:"wl-guidanceCard",children:p}):null,g?(0,r.jsx)("div",{className:"wl-guidanceCard",children:g}):null,b?(0,r.jsx)("div",{className:"wl-guidanceCard",children:b}):null]}):null,x?(0,r.jsx)("nav",{className:"wl-tabsBar","aria-label":"Workspace navigation",children:(0,r.jsx)("div",{className:"wl-tabs",children:f})}):null,(0,r.jsx)("main",{className:"wl-content",id:"app-main",children:h})]}),y?(0,r.jsx)("div",{className:"wl-stickyBar","aria-label":"Primary action",children:(0,r.jsx)("div",{className:"wl-shell page-content",children:(0,r.jsx)("div",{className:"wl-stickyInner",children:y})})}):null]})}a.displayName="WorkspaceLayout";const l=(0,o.memo)(a)}}]);
2//# sourceMappingURL=1244.4edac791.chunk.js.map

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