(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,26752,e=>{"use strict";e.i(538167);var t=e.i(282446);e.i(74492),e.i(144683);let r=new WeakMap;e.s(["f",0,function(e,i){var n;let a,o=(0,t.f)(i),l=(n=o,(a=r.get(n))||(a=new WeakSet,r.set(n,a)),a);for(let[t,...r]of e)(!l.has(t)||(null==i?void 0:i.dangerouslyForceHydrate))&&(l.add(t),o.set(t,...r))}])},797770,e=>{"use strict";let t=(0,e.i(144683).g)("");e.s(["f",0,t])},688070,e=>{"use strict";let t=(0,e.i(144683).g)(!1);e.s(["f",0,t])},604323,e=>{"use strict";let t=(0,e.i(144683).g)();e.s(["f",0,t])},513539,e=>{"use strict";var t=e.i(144683);let r=(0,t.g)(null),i=(0,t.g)(null);e.s(["M",0,i,"D",0,r])},236433,e=>{"use strict";let t=(0,e.i(144683).g)(null);e.s(["f",0,t])},328343,680810,562209,e=>{"use strict";var t=e.i(538167),r=e.i(282446),i=e.i(737801),n=e.i(688070);e.s(["f",0,()=>{let e=(0,i.f)(),a=(0,r.y)(n.f);return(0,t.useCallback)((t,r={})=>{if(a)return void console.debug("Skipping enrolled-in-experiment in webview mode");if(!window.mParticle?.isInitialized?.())return void console.warn("MParticle is not initialized");if(!t)return void console.warn("No exposure data provided to trackEnrolledInExperiment");if(!t.experiment_key)return void console.debug(`[Experiment] Skipping exposure tracking for ${t.flag_key} - no experiment_key (feature flag only)`);try{let i={...e,newVariant:t.variant||"",newExperiment:t.flag_key,newExperimentKey:t.experiment_key,newExperimentReceivedAt:Date.now()};window.mParticle?.logEvent?.("enrolled-in-experiment",window.mParticle?.EventType?.Other,i,r),console.debug(`MParticle: Event tracked - enrolled-in-experiment for ${t.flag_key||"unknown"}:${t.variant}`)}catch(e){console.error("MParticle: Failed to track event",e)}},[e,a])}],328343);var a=e.i(199690),o=e.i(201542),l=e.i(682142),u=e.i(782937),s=e.i(695881),c=e.i(333350),d=e.i(64412),f=e.i(950771),p=e.i(537989),m=e.i(695203),g=e.i(358273),w=e.i(777638),x=e.i(924776),y=e.i(24638),v=e.i(963722),_=e.i(313983),k=e.i(409628),E=e.i(605781);let h=(0,s.createLogger)("useTrackEnrolledInExperiment"),I=[];function b(e){try{(0,E.P)(e),h.info(`Hightouch: Event "enrolled-in-experiment" tracked - ${e.newExperiment}:${e.newVariant}`)}catch(e){h.error("Hightouch: Failed to track enrolled-in-experiment",e)}}e.s(["f",0,()=>{let e=(0,r.y)(p.f),i=(0,r.y)(f.f),a=(0,r.y)(m.f),s=(0,r.y)(n.f),{location:E}=(0,d.f)(),h=(0,y.f)(),S=(0,x.f)()&&void 0!==h,C=(0,t.useCallback)((t,r)=>{let n=(0,l.f)(),s=n?.["TWC-GeoIP-Country"]??(0,o.getCookie)("twc-location-country"),c=n?.["TWC-GeoIP-Region"]??(0,o.getCookie)("twc-location-region"),d=n?.["TWC-Privacy"]??(0,o.getCookie)("twc-privacy"),f=window.DprSdk?.getGdprConsentOptInsString()??"",p=window.DprSdk?.getCcpaSaleOptInString()??"",m=window.navigator?.globalPrivacyControl??!1,x=(0,v.u)(_.d.FUNCTIONAL_TECHNOLOGY),y=(0,v.u)(_.d.GEOGRAPHICALLY_RELEVANT_ADVERTISING),h=navigator?.cookieEnabled??!1,I=(0,o.getCookie)("partner")||"",b=(0,u.i)(I)??I,S=(0,g.N)(),C=S?.sessionId||"",P=S?.sessionStartTime||0,T=new Date,D=T.getHours(),O=k.f[T.getDay()]??"",N=-T.getTimezoneOffset()/60;return{newExperiment:t.flag_key,newVariant:t.variant||"",newExperimentReceivedAt:Date.now(),experimentJoinList:r,pageId:e??"",referrer:document.referrer,locale:i,deviceClass:a,partner:b,sessionId:C,sessionStartTime:P,dayOfWeek:O,hourOfDay:D,deviceTimeZone:N,regime:d??"",cookiesEnabled:h,gpcSignalOptOut:m,functionalTechnologies:x,geographicallyRelevantAds:y,priv:f,privProducts:p,campaign:(0,w.s)()??void 0,weatherMode:"normal",physicalCountry:s??"",physicalState:c??"",wlocCity:E?.city??null,wlocCountry:E?.countryCode??null,wlocState:E?.adminDistrictCode??null,wlocDMA:E?.dmaCd??null,samsungVersion:(0,w.L)(),appVersion:"e9304b9dc9a3aba9ddce0ca3871fe1caf9336dfa".slice(0,10)}},[e,i,a,E]);return(0,t.useEffect)(()=>{if(!S||0===I.length)return;let e=I;I=[],e.forEach(b)},[S]),(0,t.useCallback)((e,t)=>{if(!c.default||s||!e.experiment_key)return;let r=C(e,t);S?b(r):I.push(r)},[S,s,C])}],680810);var S=e.i(553329);let C="production"!==a.default.env.VERCEL_TARGET_ENV,P=new Set;e.s(["y",0,function(){P.clear()},"B",0,function({exposure:e,userId:t,deviceId:r}){if(!e.experiment_key){C&&console.debug(`[Experiment] Skipping Amplitude HTTP exposure for ${e.flag_key} — no experiment_key (feature flag only)`);return}if(!t&&!r){C&&console.debug("[Experiment] Skipping Amplitude HTTP exposure — no user identity");return}let i=`${e.flag_key}::${e.variant??""}`;if(P.has(i)){C&&console.debug(`[Experiment] Skipping duplicate Amplitude HTTP exposure: ${i}`);return}P.add(i);let n={api_key:"bb1117981ed2a95dc4fa64b75661d681",events:[{event_type:"$exposure",user_id:t,device_id:r,ip:"$remote",time:Date.now(),event_properties:{flag_key:e.flag_key,variant:e.variant,experiment_key:e.experiment_key,platform:"web",app_name:"wx-next-web",environment:C?"dev":"prod",experimentation_platform:"amplitude_experiment"}}]};(async()=>{let{data:t,error:r}=await (0,S.f)(fetch("https://api2.amplitude.com/2/httpapi",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0}));r?console.error("[Experiment] Failed to send exposure to Amplitude HTTP API:",r):t&&!t.ok?console.error(`[Experiment] Amplitude HTTP API returned ${t.status}`):C&&console.debug("[Experiment] Amplitude HTTP exposure sent:",{flag_key:e.flag_key,variant:e.variant})})()}],562209)},742436,569014,e=>{"use strict";e.s(["ExperimentContext",()=>_,"ExperimentProvider",()=>k,"useExperimentContext",()=>E],742436);var t=e.i(199690),r=e.i(458201),i=e.i(538167),n=e.i(333350),a=e.i(282446),o=e.i(328343),l=e.i(680810),u=e.i(158662),s=e.i(528600),c=e.i(562209),d=e.i(283366),f=e.i(219750),p=e.i(441535),m=e.i(830460);e.i(617163);let g={next:[{experimentName:"cw15000",variantName:"control"}],htmx:[{experimentName:"cw15000",variantName:"a"}]},w="wx.siteExperiment",x=e=>e.metadata?.[w]===!0,y=e=>x(e)?`${e.flag_key}:${e.variant??""}`:e.flag_key;e.s(["c",0,x,"o",0,function(e){return(Object.hasOwn(g,e)?g[e]:[]).map(e=>({...e})).map(({experimentName:e,variantName:t})=>({flag_key:e,variant:t,experiment_key:e,metadata:{[w]:!0}}))},"C",0,y],569014);let v="production"!==t.default.env.VERCEL_TARGET_ENV,_=(0,i.createContext)(null),k=({children:e})=>{let t=(0,o.f)(),g=(0,l.f)(),w=(0,a.F)(u.f),{user:k}=(0,s.f)(),[E,h]=(0,i.useState)(!1),[,I]=(0,i.useState)(0),b=(0,i.useRef)(void 0),S=(0,i.useRef)(void 0);b.current=k.userID||void 0;let C=n.default?window.__wxExperimentDeviceId:void 0;S.current=C||k.anonId||void 0,v&&C&&k.anonId&&C!==k.anonId&&console.warn("[Experiment] Device ID divergence — bucketing on the early ID.",{earlyDeviceId:C,useUserAnonId:k.anonId});let P=(0,i.useRef)(new Set),T=(0,i.useRef)({}),D=(0,i.useCallback)(e=>{if(void 0===e.variant&&e.metadata?.default===!0){v&&console.debug(`[Experiment] Skipping unassigned exposure for ${e.flag_key}`);return}let r=(0,d.p)(e.flag_key),i=void 0!==r?{...e,variant:r}:e,n=`${i.flag_key}::${i.variant??""}`;if(P.current.has(n))return;let a=()=>{if(P.current.has(n))return;P.current.add(n);let[e]=JSON.parse((0,p.f)({[i.flag_key]:{key:i.variant}}));if(e){let t=y(i);T.current={...T.current,[t]:e},w(JSON.stringify(Object.values(T.current))),(0,d.W)(t,e)}try{let e=f.f[i.flag_key];t(e?{...i,flag_key:e}:i),x(i)||(0,c.B)({exposure:i,userId:b.current,deviceId:S.current});let r=Object.values(T.current);g(i,r.length>0?JSON.stringify(r):null)}catch(e){console.error("[Experiment] Failed to track exposure:",e)}};window.mParticle?.isInitialized?.()?a():window.mParticle?.ready?.(a)},[t,g,w]),O=function(){let[e,t]=(0,i.useState)(()=>n.default?window.__wxExperimentClient??null:null);return(0,i.useEffect)(()=>{if(e||!n.default)return;let r=(0,m.F)(!0)??null;r?t(r):v&&console.debug("[Experiment] No client available (no API key?) — variants will use fallbacks")},[e]),e}();return(0,i.useEffect)(()=>{if(!n.default)return;window.__wxExposureSink=D;let e=window.__wxExposureQueue;if(e?.length)for(let t of(window.__wxExposureQueue=[],e))D(t);return()=>{window.__wxExposureSink===D&&(window.__wxExposureQueue??=[],window.__wxExposureSink=e=>{window.__wxExposureQueue?.push(e)})}},[D]),(0,i.useEffect)(()=>{let e=!n.default||!1!==window.__wxNeedsRemoteExperiments;(async()=>{if(!O)return;if(!e){v&&console.debug("[Experiment] All flags are local-mode — skipping remote fetch"),h(!0);return}let t=S.current;if(!t&&!k.userID){v&&console.debug("[Experiment] No user identifier available"),h(!0);return}let r={device_id:t,...k.userID?{user_id:k.userID}:{},user_properties:{}};v&&console.debug("[Experiment] Fetching experiments from API for user:",r);try{await O.fetch(r)}catch(e){console.error("[Experiment] Failed to fetch experiments:",e)}finally{h(!0)}})()},[O,k.anonId,k.userID]),(0,i.useEffect)(()=>{if(!O)return;let e=S.current;(e||k.userID)&&O.setUser({device_id:e,...k.userID?{user_id:k.userID}:{}})},[O,k.anonId,k.userID]),(0,i.useEffect)(()=>{P.current.clear(),(0,c.y)(),(0,d.z)(),T.current={},w(null),I(e=>e+1);let e=(0,d.f)();Object.keys(e).length>0&&(T.current=e,w(JSON.stringify(Object.values(e))))},[k.userID,w]),(0,r.jsx)(_.Provider,{value:{client:O,variant:(e,t)=>{if(!O)return t;let r=O.variant(e,t);return v&&console.debug("[Experiment] Current Variant:",r),r},fetch:e=>{if(!O)return Promise.resolve();if(!e){let e=S.current;if(e||k.userID){let t={device_id:e,...k.userID?{user_id:k.userID}:{},user_properties:{}};return O.fetch(t)}}return O.fetch(e)},isFetchComplete:E},children:e})},E=()=>{let e=(0,i.useContext)(_);if(!e)throw Error("useExperimentContext must be used within an AmplitudeExperimentProvider");return e}},219750,441535,e=>{"use strict";e.s(["f",0,{"homepage-video-player-desktop-web":"cw13124",cw14363:"cw14363",cw14385:"cw14385",cw15118:"cw15118","tenday-upsell-gate":"cw14461","ad-label-upsell":"cw15141"}],219750),e.s(["f",0,function(e){return JSON.stringify(Object.entries(e).filter(([,e])=>!!e?.key).map(([e,t])=>{let r=t.key??"",i=Math.floor(Date.now()/1e3);return`${e},${r},${i}`}))}],441535)},283366,e=>{"use strict";e.s(["p",()=>v,"f",()=>m,"z",()=>_,"I",()=>k,"W",()=>g]);var t=e.i(538167),r=e.i(695881),i=e.i(333350),n=e.i(358273),a=e.i(742436);let o=(0,r.createLogger)("useExposure"),l="wxu-exp-exposed:",u=new Set,s=()=>{try{return(0,n.N)()?.sessionId||null}catch{return null}},c=(e,t)=>{for(let r=localStorage.length-1;r>=0;r--){let i=localStorage.key(r);i?.startsWith(e)&&i!==e+t&&localStorage.removeItem(i)}},d=e=>{try{let t=localStorage.getItem(l+e);return new Set(t?JSON.parse(t):[])}catch{return new Set}},f=(e,t)=>{try{c(l,e),localStorage.setItem(l+e,JSON.stringify([...t]))}catch{}},p="wxu-exp-joinlist:",m=()=>{let e=s();if(!e)return{};try{let t=localStorage.getItem(p+e);return t?JSON.parse(t):{}}catch{return{}}},g=(e,t)=>{let r=s();if(r)try{c(p,r);let i=m();localStorage.setItem(p+r,JSON.stringify({...i,[e]:t}))}catch{}},w=e=>{if(0===u.size)return;let t=d(e);for(let e of u)t.add(e);f(e,t),u.clear()},x=e=>{let t=s();return t?(w(t),d(t).has(e)):u.has(e)},y=new Map;function v(e){return y.get(e)}function _(){u.clear(),y.clear();let e=s();if(e)try{localStorage.removeItem(l+e)}catch{}}function k(e,r){let n=void 0!==r,l=r?.variant,c=(0,t.useContext)(a.ExperimentContext);(0,t.useEffect)(()=>{if(!i.default||!c||x(e)||n&&void 0===l)return;let{client:t,isFetchComplete:r}=c;if(!t||!r)return;let a=()=>{if(!x(e)){(e=>{let t=s();if(!t)return u.add(e);w(t);let r=d(t);r.add(e),f(t,r)})(e),void 0!==l&&y.set(e,l);try{t.exposure(e)}catch(t){(e=>{let t=s();if(!t)return u.delete(e);let r=d(t);r.delete(e)&&f(t,r)})(e),void 0!==l&&y.delete(e),o.error("Failed to track exposure:",t)}}};window.mParticle?.isInitialized?.()?a():window.mParticle?.ready?.(a)},[c,e,n,l])}},617163,e=>{"use strict";e.i(199690),e.s([])},991511,e=>{"use strict";var t=e.i(538167),r=e.i(26752),i=e.i(282446);e.s(["f",0,e=>{(0,r.f)(e);let n=(0,i.f)(),a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{for(let[e,t]of a.current)n.get(e)!==t&&n.set(e,t)})}])}]);