1import{d as ue,g as f,a as w,i as a,k as ge,r as B,t as k,b as Je,c as rt,u as Ft,l as V,s as nt,f as J}from"./web-Bf5s-bfW.js";import{e as G,a as lt,n as we,b as t,r as Lt,q as Et,p as _,F as ee,S as ce,h as Mt,M as me,k as Bt}from"./solid-CxN7oBiC.js";import{c as Pt,u as ve}from"./index-BcLIwR4t.js";import{c as Rt}from"./components_directory-yUFn447a.js";import{q as Y,f as Vt,r as he,M as At}from"./gc_sdk_partner_config-CZZotJWC.js";import{s as Ce}from"./snackbar-B3Kyxyn3.js";import"./etc-C4njaG5h.js";import"./events-BeaGbsfN.js";import"./debounce-vNSi-bT1.js";import"./icons-CCbAo7Bs.js";import"./preload-helper-CwFoz0Gw.js";import"./common-B0Jw61e1.js";import"./number-B_BhWxZ7.js";import"./icons-DaD63GyN.js";import"./intercom-Bja0o_BM.js";import"./repo_context-BlsUr76K.js";import"./job-B03zVIpe.js";import"./routing-DiG4O4UF.js";import"./border_gradient_telescope-CAJg9e6D.js";import"./trigger_app_events-CsxL6GyX.js";import"./local_storage-DFxxYqIm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"6f733099e5334164e635d861caf3350518bfeb4d"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d8dde028-85c6-4ea9-ab4b-887784e6885f",e._sentryDebugIdIdentifier="sentry-dbid-d8dde028-85c6-4ea9-ab4b-887784e6885f")})()}catch{}const Dt=()=>Object.keys(Rt.home||{}),Te=[{name:"bajaj",clientId:"bajaj-code-Bp3sxUCw",appSecret:"pUMdQ53wWqQ5BNbpU1CyMTK2xgc0Pr1lQiNbFm0w6dE1mGH342vOYQaWlBibwYK3"},{name:"raisoni",clientId:"raisoni-dev",appSecret:"TkfXWjyuUUw9oW0gtXrdteFCuYZxRg9cpQTQPDeUwMMg2faw4BlGflsHGlQWtMuL"},{name:"godrej",clientId:"godrej-properties-rnr-LEj5WNL5",appSecret:"tldf7kcwhH2uETgKfyzrZkKMXRsW6jOYHrLj28cMd03WeyNjoAQAdXE0LwR9A7Sw"},{name:"onepercent",clientId:"onepercent",appSecret:"7C8CA1E9-42D6"},{name:"stashfin",clientId:"stashfin-dev-2jBw3m0N",appSecret:"mEyrB5rrsbxM5QnA1rBQTv84BLjp3px41lhkQixSTRx6gQS17vuQMvLmkxgsFJp3"},{name:"visithealth",clientId:"visit-health",appSecret:"sCOZ07mzht"},{name:"indriya (phone login)",clientId:"indriya-dev-uZyj062N",appSecret:"UxpT58CRJPirPaXnhMcdYah8T8PDUQTE9t2oQGXMBRXmAwW3cMCIEnHWtLDLQAw6"},{name:"nielsen (phone login)",clientId:"nielsen-QEjZqzmO",appSecret:"mKroiVe4HRKHA5qa2G6ewi0n9vXl2FkmJ26BMLWM71woIOs3NmH0Bf2sZMR7CfOg"}];function Ut(e,r){const l=`/?clientId=${e.clientId}&appSecret=${e.appSecret}`;return r?`${l}&token=mock-${e.clientId}`:l}const at=Lt();function zt(e){const l=Dt()[0]||"",[d,n]=G("header"),[v,c]=G("mobile"),[C,M]=G(Te[0].clientId),[h,S]=G(!0),[u,s]=G(l),[y,p]=G(null),[b,I]=G(null),[L,T]=Pt({...Y,featureFlags:{...Y.featureFlags,profileCompletionConfig:{...Y.featureFlags.profileCompletionConfig}},data:{...Y.data,faqs:[...Y.data.faqs]},appHeaderConfig:{...Y.appHeaderConfig},loginPage:{...Y.loginPage,header:{...Y.loginPage.header}},pageComponentsList:{...Y.pageComponentsList},telescopeCssVariables:{},sdkCssVariables:{}}),[R,A]=G(null),D=lt(()=>!1);we(()=>{const o=m=>{if(m.data?.operationType==="customizationState"){const P=R();P&&(P(m.data.state),A(null))}};window.addEventListener("message",o)});const N={consoleMode:d,setConsoleMode:o=>{n(o)},previewMode:v,setPreviewMode:c,selectedClientId:C,setSelectedClientId:M,ssoEnabled:h,setSsoEnabled:S,selectedComponentType:u,setSelectedComponentType:s,iframeRef:y,setIframeRef:p,isDIYModeEnabled:D,currentDragAddress:b,setCurrentDragAddress:I,requestCustomizationState:o=>{A(()=>o),y()?.contentWindow?.postMessage({operationType:"getCustomizationState"},"*")},consoleConfig:L,setConsoleConfig:T,importCustomizationState:o=>{try{const m=atob(o.trim()),P=JSON.parse(m);if(!P||typeof P!="object"||Array.isArray(P))return{success:!1,error:"Invalid config: expected an object"};T(P);const X=y();return X?.contentWindow?(X.contentWindow.postMessage({operationType:"applyCustomizationState",customizationState:P},"*"),{success:!0}):{success:!1,error:"SDK iframe not available"}}catch(m){return m instanceof SyntaxError?{success:!1,error:"Invalid JSON format"}:m instanceof DOMException?{success:!1,error:"Invalid base64 encoding"}:{success:!1,error:"Failed to import config"}}
1}};return t(at.Provider,{value:N,get children(){return e.children}})}function re(){const e=Et(at);if(!e)throw new Error("useSdkConsoleContext must be used within a SdkConsoleContextProvider");return e}var Ht=k('<div class="no-scrollbar flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><div class="flex items-center justify-between"><h2 class="text-lg font-semibold text-text-normal-primary">Client</h2></div><div class="no-scrollbar flex-1 space-y-4 overflow-y-auto"><div class="flex items-center justify-between rounded-lg border border-stroke-1 bg-background-normal-primary px-3 py-2.5"><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary">SSO</label><p class="text-xs text-text-normal-tertiary">Pass <code>token=mock-<clientId></code> when enabled</p></div><!$><!/></div><div class=space-y-2><h3 class="text-sm font-semibold text-text-normal-primary">Test Clients</h3><div class=space-y-2></div></div></div><div class="mt-auto border-t border-stroke-1 pt-3"><p class="text-xs text-text-normal-tertiary">Selecting a client reloads the preview iframe'),jt=k('<button class="flex w-full flex-col gap-1 rounded-lg border px-3 py-2.5 text-left transition-all"><span class="text-sm font-medium text-text-normal-primary"></span><span class="text-xs text-text-normal-tertiary">');function Ot(){const{components:e}=ve(),{selectedClientId:r,setSelectedClientId:l,ssoEnabled:d,setSsoEnabled:n,iframeRef:v}=re(),c=()=>{v()?.contentWindow?.postMessage({operationType:"clearSessionStorage"},"*")},C=h=>{h!==r()&&(c(),l(h))},M=h=>{c(),n(h)};return(()=>{var h=f(Ht),S=h.firstChild,u=S.nextSibling,s=u.firstChild,y=s.firstChild,p=y.nextSibling,[b,I]=w(p.nextSibling),L=s.nextSibling,T=L.firstChild,R=T.nextSibling;return a(s,t(e.Toggle,{get checked(){return d()},onChange:M}),b,I),a(R,t(ee,{each:Te,children:A=>{const D=()=>r()===A.clientId;return(()=>{var U=f(jt),j=U.firstChild,q=j.nextSibling;return U.$$click=()=>C(A.clientId),a(j,()=>A.name),a(q,()=>A.clientId),_(N=>ge(U,{"border-brand-tbd-base bg-brand-tbd-lighter":D(),"border-stroke-1 bg-background-normal-primary hover:bg-background-normal-tertiary":!D()},N)),B(),U})()}})),h})()}ue(["click"]);var Wt=k('<div class="flex flex-1 items-center justify-center overflow-hidden py-1"><div class="overflow-hidden transition-all duration-300"><div class="flex size-full items-start justify-center overflow-hidden"><div class=shrink-0><iframe class="no-scrollbar block size-full rounded-[24px] border-[2px] border-background-inverted-primary bg-background-normal-primary"title="SDK Preview">');function Nt(){const{setIframeRef:e,currentDragAddress:r,previewMode:l,selectedClientId:d,ssoEnabled:n}=re(),v=lt(()=>{const s=Te.find(y=>y.clientId===d())??Te[0];return Ut(s,n())});let c;const[,C]=G(!1);we(()=>{c&&e(c)});const M=s=>{s.preventDefault(),C(!0),c?.contentWindow?.postMessage({operationType:"dragStateChange",isDragging:!0,componentAddress:r()},"*")},h=s=>{s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="copy")},S=s=>{s.currentTarget?.contains(s.relatedTarget)||(C(!1),c?.contentWindow?.postMessage({operationType:"dragStateChange",isDragging:!1},"*"))},u=s=>{s.preventDefault(),C(!1)};return(()=>{var s=f(Wt),y=s.firstChild,p=y.firstChild,b=p.firstChild,I=b.firstChild;s.addEventListener("drop",u),s.addEventListener("dragleave",S),s.addEventListener("dragover",h),s.addEventListener("dragenter",M);var L=c;return typeof L=="function"?Ft(L,I):c=I,_(T=>{var R=l()==="mobile"?{height:"635px","aspect-ratio":"11/21.5"}:{height:"538px","aspect-ratio":"16/9"},A=l()==="mobile"?{height:"812px","aspect-ratio":"11/21.5",transform:"scale(0.764)","transform-origin":"top center"}:{height:"800px","aspect-ratio":"16.3/9",transform:"scale(0.650)","transform-origin":"top center"},D=v();return T.e=Je(y,R,T.e),T.t=Je(b,A,T.t),D!==T.a&&rt(I,"src",T.a=D),T},{e:void 0,t:void 0,a:void 0}),s})()}var qt=k('<p class="text-sm text-error-base">'),Qt=k('<div class="flex flex-col gap-4 p-4"><div><h3 class="text-lg font-semibold text-text-normal-primary">Import Configuration</h3><p class="text-sm mt-1 text-text-normal-tertiary">Paste a base64-encoded config string from a live link</p></div><div class="flex flex-col gap-2"><label class="text-sm font-medium text-text-normal-secondary">Config String</label><textarea placeholder="Paste your base64 config here..."class="text-sm min-h-[120px] w-full resize-y rounded-lg border border-stroke-1 bg-background-normal-primary p-3 text-text-normal-primary placeholder:text-text-normal-tertiary focus:border-brand-tbd-base focus:outline-none"></textarea><!$><!/></div><p class="text-xs text-text-normal-tertiary">You can get this string from the URL parameter "customization" after clicking "Get live link"</p><div class="flex justify-end gap-3 pt-2">');function Gt(e){const{components:r}=ve(),[l,d]=G(""),[n,v]=G(null),[c,C]=G(!1),M=()=>{v(null),C(!0);const h=l().trim();if(!h){v("Please enter a config string"),C(!1);return}const S=e.importCustomizationState(h);S.success?e.onSuccess():v(S.error||"Import failed"),C(!1)};return(()=>{var h=f(Qt),S=h.firstChild,u=S.nextSibling,s=u.firstChild,y=s.nextSibling,p=y.nextSibling,[b,I]=w(p.nextSibling),L=u.nextSibling,T=L.nextSibling;return y.$$input=R=>{d(R.currentTarget.value),v(null)},a(u,t(ce,{get when(){return n()},get children(){var R=f(qt);return a(R,n),R}}),b,I),a(T,t(r.Button,{get text(){return c()?"Importing...":"Import Config"},variant:"primary",style:"neutral",size:44,onClick:M,get disabled(){return c()||!l().trim()}})),_(()=>y.classList.toggle("!border-error-base",!!n())),_(()=>V(y,"value",l())),B(),h})()}ue(["input"]);var Kt=k('<div class="relative flex items-center justify-between border-t border-stroke-1 bg-background-normal-primary px-4 py-3"><div class=left-4></div><div class="w-full max-w-[775px]"></div><div class="right-4 flex items-center gap-3"><div class=w-[220px]></div><!$><!/><!$><!/>'),Zt=k('<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 viewBox="0 0 20 20"fill=none><path d="M3.33301 4.16667V13.3333H16.6663V4.16667H3.33301ZM1.66634 3.33917C1.66634 2.87583 2.04551 2.5 2.49301 2.5H17.5063C17.963 2.5 18.333 2.87417 18.333 3.33917V15H1.66634V3.33917ZM0.833008 15.8333H19.1663V17.5H0.833008V15.8333Z"fill=currentColor>'),Jt=k('<svg xmlns=http://www.w3.org/2000/svg width=20 height=20 viewBox="0 0 20 20"fill=none>
1<path d="M5.83366 3.33333V16.6667H14.167V3.33333H5.83366ZM5.00033 1.66666H15.0003C15.2213 1.66666 15.4333 1.75446 15.5896 1.91074C15.7459 2.06702 15.8337 2.27898 15.8337 2.5V17.5C15.8337 17.721 15.7459 17.933 15.5896 18.0893C15.4333 18.2455 15.2213 18.3333 15.0003 18.3333H5.00033C4.77931 18.3333 4.56735 18.2455 4.41107 18.0893C4.25479 17.933 4.16699 17.721 4.16699 17.5V2.5C4.16699 2.27898 4.25479 2.06702 4.41107 1.91074C4.56735 1.75446 4.77931 1.66666 5.00033 1.66666ZM10.0003 14.1667C10.2213 14.1667 10.4333 14.2545 10.5896 14.4107C10.7459 14.567 10.8337 14.779 10.8337 15C10.8337 15.221 10.7459 15.433 10.5896 15.5893C10.4333 15.7455 10.2213 15.8333 10.0003 15.8333C9.77931 15.8333 9.56735 15.7455 9.41107 15.5893C9.25479 15.433 9.16699 15.221 9.16699 15C9.16699 14.779 9.25479 14.567 9.41107 14.4107C9.56735 14.2545 9.77931 14.1667 10.0003 14.1667V14.1667Z"fill=currentColor>');const Xt=[{id:"client",label:"Client"},{id:"login",label:"Login"},{id:"data-flags",label:"Data & Flags"},{id:"header",label:"Header"},{id:"theming",label:"Theming"},{id:"preview",label:"Preview"}];function Yt(){const{components:e}=ve(),{consoleMode:r,setConsoleMode:l,previewMode:d,setPreviewMode:n,iframeRef:v,requestCustomizationState:c,importCustomizationState:C}=re(),M=[{id:"desktop",label:"Desktop",icon:()=>t(er,{})},{id:"mobile",label:"Mobile",icon:()=>t(tr,{})}],{openModalV2:h,goBack:S}=Vt(),u=()=>{h(()=>t(Gt,{importCustomizationState:C,onSuccess:()=>{S(),Ce({level:"success",message:"Config imported successfully!"})}}),{size:"medium"})},s=()=>{c(p=>{const b=btoa(JSON.stringify(p));navigator.clipboard.writeText(b).then(()=>{Ce({level:"success",message:"Config copied to clipboard!"})}).catch(()=>{Ce({level:"error",message:"Failed to copy config"})})})},y=()=>{c(p=>{const b=btoa(JSON.stringify(p)),I=v(),L=new URL(I?.src||window.location.href);L.searchParams.set("customization",b),navigator.clipboard.writeText(L.toString()).then(()=>{Ce({level:"success",message:"Link copied to clipboard!"})}).catch(()=>{Ce({level:"error",message:"Failed to copy link"})})})};return(()=>{var p=f(Kt),b=p.firstChild,I=b.nextSibling,L=I.nextSibling,T=L.firstChild,R=T.nextSibling,[A,D]=w(R.nextSibling),U=A.nextSibling,[j,q]=w(U.nextSibling);return a(b,t(e.Button,{text:"Import config",variant:"secondary",style:"neutral",size:44,onClick:u})),a(I,t(e.SegmentedControl,{items:Xt,get activeItem(){return r()},onItemChange:N=>l(N),type:"label-only",expanded:!0})),a(T,t(e.SegmentedControl,{items:M,get activeItem(){return d()},onItemChange:N=>n(N),type:"icon-label",size:"small",expanded:!0})),a(L,t(e.Button,{text:"Copy config",variant:"secondary",style:"neutral",size:44,onClick:s}),A,D),a(L,t(e.Button,{text:"Get live link",variant:"primary",style:"neutral",size:44,onClick:y}),j,q),p})()}function er(){return f(Zt)}function tr(){return f(Jt)}var rr=k('<svg fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z">'),nr=k('<svg fill=none stroke=currentColor viewBox="0 0 24 24"><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z">');function lr(e){return(()=>{var r=f(rr);return nt(r,e,!0,!0),B(),r})()}function ar(e){return(()=>{var r=f(nr);return nt(r,e,!0,!0),B(),r})()}var fe=k('<button class="text-xs shrink-0 text-brand-tbd-base hover:underline">Reset'),or=k('<div class="flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><div class="flex items-center justify-between"><h2 class="text-lg font-semibold text-text-normal-primary">Theming</h2></div><div class="space-y-6 overflow-y-auto"><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Theme Mode</label><p class="text-xs text-text-normal-tertiary">Choose between light and dark theme</p></div><div class="flex gap-2"><button class="text-sm flex flex-1 items-center justify-center gap-2 rounded-lg border px-4 py-2.5 font-medium transition-all"><!$><!/>Light</button><button class="text-sm flex flex-1 items-center justify-center gap-2 rounded-lg border px-4 py-2.5 font-medium transition-all"><!$><!/>Dark</button></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Brand Color</label><p class="text-xs text-text-normal-tertiary">Used for buttons, links, and accent elements</p></div><div class="flex items-center gap-3"><div class="shadow-sm size-10 rounded-lg border border-stroke-2"></div><input type=color class="h-10 w-16 cursor-pointer rounded-md border border-stroke-1"><input type=text class="text-sm w-24 rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary"placeholder=#7D52F5></div><div class="flex flex-wrap gap-2"></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Text Colors</label><p class="text-xs text-text-normal-tertiary">Customize text colors. Reset to use theme defaults.</p></div><div class=space-y-3></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">
1Background Colors</label><p class="text-xs text-text-normal-tertiary">Customize page and surface background colors. Reset to use theme defaults.</p></div><div class=space-y-3></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Stroke Colors</label><p class="text-xs text-text-normal-tertiary">Customize border and divider colors. Reset to use theme defaults.</p></div><div class=space-y-3></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">SDK Colors</label><p class="text-xs text-text-normal-tertiary">Customize SDK-specific colors like discount text. Reset to use defaults.</p></div><div class=space-y-3></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Search Bar</label><p class="text-xs text-text-normal-tertiary">Customize search bar appearance</p></div><div class=space-y-2><span class="text-sm text-text-normal-secondary">Border Radius</span><div class="flex items-center gap-3"><div class="size-12 shrink-0 border border-stroke-2"></div><input type=range min=0 max=24 class="h-2 flex-1 cursor-pointer appearance-none rounded-lg bg-stroke-1"><div class="flex items-center gap-1"><input type=number min=0 max=50 class="text-sm w-16 rounded-md border border-stroke-1 bg-background-normal-primary px-2 py-1.5 text-text-normal-primary"><span class="text-sm text-text-normal-tertiary">px</span></div><!$><!/></div></div><div class=space-y-2><span class="text-sm text-text-normal-secondary">Background Color</span><div class="flex items-center gap-3"><div class="size-8 shrink-0 rounded-md border border-stroke-2"></div><input type=color class="h-8 w-12 shrink-0 cursor-pointer rounded-md border border-stroke-1"><input type=text class="text-sm w-24 rounded-md border border-stroke-1 bg-background-normal-primary px-2 py-1.5 text-text-normal-primary"placeholder=#FFFFFF><!$><!/></div></div></div><div class=space-y-3><div class=space-y-1><label class="text-sm font-medium text-text-normal-primary">Font Family</label><p class="text-xs text-text-normal-tertiary">Choose a font for your SDK</p></div><div class="grid grid-cols-2 gap-2"></div></div></div><div class="mt-auto border-t border-stroke-1 pt-3"><p class="text-xs text-text-normal-tertiary">Changes are applied instantly to the preview'),sr=k('<button class="size-7 rounded-full border-2 transition-transform hover:scale-110">'),ir=k('<div class="flex items-center gap-3"><span class="text-sm w-20 text-text-normal-secondary"></span><div class="size-8 shrink-0 rounded-md border border-stroke-2"></div><input type=color class="h-8 w-12 shrink-0 cursor-pointer rounded-md border border-stroke-1"><input type=text class="text-sm w-24 rounded-md border border-stroke-1 bg-background-normal-primary px-2 py-1.5 text-text-normal-primary"placeholder=#000000><!$><!/>'),Xe=k('<div class="flex items-center gap-3"><span class="text-sm w-32 text-text-normal-secondary"></span><div class="size-8 shrink-0 rounded-md border border-stroke-2"></div><input type=color class="h-8 w-12 shrink-0 cursor-pointer rounded-md border border-stroke-1"><input type=text class="text-sm w-24 rounded-md border border-stroke-1 bg-background-normal-primary px-2 py-1.5 text-text-normal-primary"placeholder=#000000><!$><!/>'),dr=k('<div class="flex items-center gap-3"><span class="text-sm w-24 text-text-normal-secondary"></span><div class="size-8 shrink-0 rounded-md border border-stroke-2"></div><input type=color class="h-8 w-12 shrink-0 cursor-pointer rounded-md border border-stroke-1"><input type=text class="text-sm w-24 rounded-md border border-stroke-1 bg-background-normal-primary px-2 py-1.5 text-text-normal-primary"placeholder=#00AF54><!$><!/>'),cr=k('<button class="text-sm rounded-lg border px-3 py-2 text-left transition-all hover:bg-background-normal-tertiary">');const gr=[{key:"--text-listing",label:"Listing Text",description:"Discount percentage text color"},{key:"--text-listing-dark",label:"Listing Dark",description:"Discount text on dark backgrounds"}],Ye=e=>e.startsWith("var(")?e.includes("success-base")?"#00AF54":e.includes("green-600")?"#008C43":e.includes("background-normal-primary")?"#FFFFFF":"#00AF54":e,ur=[{key:"--text-normal-primary",label:"Primary"},{key:"--text-normal-secondary",label:"Secondary"},{key:"--text-normal-tertiary",label:"Tertiary"}],pr=[{key:"--background-normal-primary",label:"Normal Primary"},{key:"--background-normal-secondary",label:"Normal Secondary"},{key:"--background-normal-tertiary",label:"Normal Tertiary"},{key:"--background-inverted-primary",label:"Inverted Primary"},{key:"--background-inverted-secondary",label:"Inverted Secondary"},{key:"--background-inverted-tertiary",label:"Inverted Tertiary"},{key:"--background-mapping-elevation-1",label:"Elevation 1"},{key:"--background-mapping-elevation-2",label:"Elevation 2"},{key:"--background-mapping-reverse",label:"Mapping Reverse"}],br=[{key:"--stroke-solid",label:"Solid"},{key:"--stroke-1",label:"Stroke 1"},{key:"--stroke-2",label:"Stroke 2"},{key:"--stroke-3",label:"Stroke 3"},{key:"--stroke-solid-inverted",label:"Solid Inverted"},{key:"--stroke-1-alpha",label:"Stroke 1 Alpha"},{key:"--stroke-2-alpha",label:"Stroke 2 Alpha"},{key:"--stroke-3-alpha",label:"Stroke 3 Alpha"}],mr=["#7D52F5","#335CFF","#1FC26B","#FA7319","#FA3847","#21D4BA"],Re=[{name:"Inter",value:"'Inter', sans-serif",url:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"},{name:"Plus Jakarta Sans",value:"'Plus Jakarta Sans', sans-serif",url:"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap"},{name:"Poppins",value:"'Poppins', sans-serif",url:"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap"},{name:"Roboto",value:"'Roboto', sans-serif",url:"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"},{name:"Open Sans",value:"'Open Sans', sans-serif",url:"https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap"},{name:"Lato",value:"'Lato', sans-serif",url:"https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap"},{name:"Montserrat",value:"'Montserrat', sans-serif",url:"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap"},{name:"Nunito",value:"'Nunito', sans-serif",url:"https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700&display=swap"},{name:"Raleway",value:"'Raleway', sans-serif",url:"https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap"},{name:"DM Sans",value:"'DM Sans', sans-serif",url:"https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"}];function hr(){const{iframeRef:e,consoleConfig:r,setConsoleConfig:l}=re(),d=()=>r.telescopeCssVariables?.["--brand-tbd-base"]||"#7D52F5",n=()=>r.theme,v=()=>Re.find(o=>o.value===r.sdkCssVariables?.["--font-family"])?.name||"Inter";we(()=>{Re.forEach(o=>
1{const m=document.createElement("link");m.rel="stylesheet",m.href=o.url,document.head.appendChild(m)})});const[c,C]=G({}),M=o=>{const m=e();m?.contentWindow&&m.contentWindow.postMessage({operationType:"updateStyles",...o},"*")},h=()=>{const o=e();o?.contentWindow&&o.contentWindow.postMessage({operationType:"getComputedTextColors"},"*")};we(()=>{const o=m=>{m.data?.operationType==="computedTextColors"&&m.data?.values&&C(m.data.values)};window.addEventListener("message",o),setTimeout(()=>h(),500)}),Mt(()=>{r.theme,setTimeout(()=>h(),100)});const S=o=>{l("theme",o),M({theme:o})},u=o=>{l("telescopeCssVariables","--brand-tbd-base",o),M({styles:{"--brand-tbd-base":o}})},s=o=>{l("sdkCssVariables","--font-family",o.value),l("data","fontImportUrl",o.url),M({styles:{"--font-family":o.value},fontImportUrl:o.url})},y=(o,m)=>{l("telescopeCssVariables",o,m),M({styles:{[o]:m}})},p=o=>{l("telescopeCssVariables",m=>{const P={...m};return delete P[o],P}),M({styles:{[o]:null}})},b=o=>{const m=e();m?.contentWindow&&m.contentWindow.postMessage({operationType:"updateSdkStyles",sdkStyles:o},"*")},I=(o,m)=>{l("sdkCssVariables",o,m),b({[o]:m})},L=o=>{l("sdkCssVariables",m=>{const P={...m};return delete P[o],P}),b({[o]:he[o]})},T=o=>{const m=r.sdkCssVariables?.[o];return m||Ye(he[o])},R=()=>{const o=r.sdkCssVariables?.["--sdk-roundness-alpha"];return o||he["--sdk-roundness-alpha"]},A=()=>{const o=R();return parseInt(o.replace("px",""),10)||12},D=o=>{const m=`${o}px`;l("sdkCssVariables","--sdk-roundness-alpha",m),b({"--sdk-roundness-alpha":m})},U=()=>{l("sdkCssVariables",o=>{const{"--sdk-roundness-alpha":m,...P}=o;return P}),b({"--sdk-roundness-alpha":he["--sdk-roundness-alpha"]})},j=()=>{const o=r.sdkCssVariables?.["--search-bg"];return o||Ye(he["--search-bg"])},q=o=>{l("sdkCssVariables","--search-bg",o),b({"--search-bg":o})},N=()=>{l("sdkCssVariables",o=>{const{"--search-bg":m,...P}=o;return P}),b({"--search-bg":he["--search-bg"]})};return(()=>{var o=f(or),m=o.firstChild,P=m.nextSibling,X=P.firstChild,pe=X.firstChild,$e=pe.nextSibling,$=$e.firstChild,te=$.firstChild,[ne,x]=w(te.nextSibling);ne.nextSibling;var K=$.nextSibling,Ie=K.firstChild,[Se,Fe]=w(Ie.nextSibling);Se.nextSibling;var _e=X.nextSibling,Le=_e.firstChild,be=Le.nextSibling,ye=be.firstChild,le=ye.nextSibling,Ue=le.nextSibling,st=be.nextSibling,ze=_e.nextSibling,it=ze.firstChild,dt=it.nextSibling,He=ze.nextSibling,ct=He.firstChild,gt=ct.nextSibling,je=He.nextSibling,ut=je.firstChild,pt=ut.nextSibling,Oe=je.nextSibling,bt=Oe.firstChild,mt=bt.nextSibling,We=Oe.nextSibling,ht=We.firstChild,Ne=ht.nextSibling,ft=Ne.firstChild,qe=ft.nextSibling,Ee=qe.firstChild,Me=Ee.nextSibling,Qe=Me.nextSibling,Ge=Qe.firstChild,xt=Qe.nextSibling,[vt,$t]=w(xt.nextSibling),yt=Ne.nextSibling,Ct=yt.firstChild,Ke=Ct.nextSibling,Ze=Ke.firstChild,Be=Ze.nextSibling,Pe=Be.nextSibling,kt=Pe.nextSibling,[St,_t]=w(kt.nextSibling),wt=We.nextSibling,Tt=wt.firstChild,It=Tt.nextSibling;return $.$$click=()=>S("telescope-light-theme"),a($,t(lr,{class:"size-4"}),ne,x),K.$$click=()=>
1S("telescope-dark-theme"),a(K,t(ar,{class:"size-4"}),Se,Fe),le.$$input=g=>u(g.currentTarget.value),Ue.$$input=g=>{const i=g.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(i)&&u(i)},a(st,()=>mr.map(g=>(()=>{var i=f(sr);return i.$$click=()=>u(g),J(i,"background-color",g),_(E=>{var H=d()===g,z=d()!==g;return H!==E.e&&i.classList.toggle("border-text-normal-primary",E.e=H),z!==E.t&&i.classList.toggle("border-transparent",E.t=z),E},{e:void 0,t:void 0}),B(),i})())),a(dt,t(ee,{each:ur,children:g=>{const i=g.key;return(()=>{var E=f(ir),H=E.firstChild,z=H.nextSibling,O=z.nextSibling,W=O.nextSibling,ae=W.nextSibling,[oe,se]=w(ae.nextSibling);return a(H,()=>g.label),O.$$input=F=>y(i,F.currentTarget.value),W.$$input=F=>{const Z=F.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(Z)&&y(i,Z)},a(E,t(ce,{get when(){return r.telescopeCssVariables?.[i]!==void 0},get children(){var F=f(fe);return F.$$click=()=>p(i),B(),F}}),oe,se),_(F=>J(z,"background-color",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(O,"value",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(W,"value",(r.telescopeCssVariables?.[i]||c()[i]||"#000000").toUpperCase())),B(),E})()}})),a(gt,t(ee,{each:pr,children:g=>{const i=g.key;return(()=>{var E=f(Xe),H=E.firstChild,z=H.nextSibling,O=z.nextSibling,W=O.nextSibling,ae=W.nextSibling,[oe,se]=w(ae.nextSibling);return a(H,()=>g.label),O.$$input=F=>y(i,F.currentTarget.value),W.$$input=F=>{const Z=F.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(Z)&&y(i,Z)},a(E,t(ce,{get when(){return r.telescopeCssVariables?.[i]!==void 0},get children(){var F=f(fe);return F.$$click=()=>p(i),B(),F}}),oe,se),_(F=>J(z,"background-color",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(O,"value",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(W,"value",(r.telescopeCssVariables?.[i]||c()[i]||"#000000").toUpperCase())),B(),E})()}})),a(pt,t(ee,{each:br,children:g=>{const i=g.key;return(()=>{var E=f(Xe),H=E.firstChild,z=H.nextSibling,O=z.nextSibling,W=O.nextSibling,ae=W.nextSibling,[oe,se]=w(ae.nextSibling);return a(H,()=>g.label),O.$$input=F=>y(i,F.currentTarget.value),W.$$input=F=>{const Z=F.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(Z)&&y(i,Z)},a(E,t(ce,{get when(){return r.telescopeCssVariables?.[i]!==void 0},get children(){var F=f(fe);return F.$$click=()=>p(i),B(),F}}),oe,se),_(F=>J(z,"background-color",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(O,"value",r.telescopeCssVariables?.[i]||c()[i]||"#000000")),_(()=>V(W,"value",(r.telescopeCssVariables?.[i]||c()[i]||"#000000").toUpperCase())),B(),E})()}})),a(mt,t(ee,{each:gr,children:g=>{const i=g.key;return(()=>{var E=f(dr),H=E.firstChild,z=H.nextSibling,O=z.nextSibling,W=O.nextSibling,ae=W.nextSibling,[oe,se]=w(ae.nextSibling);return a(H,()=>g.label),O.$$input=F=>I(i,F.currentTarget.value),W.$$input=F=>{const Z=F.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(Z)&&I(i,Z)},a(E,t(ce,{get when(){return r.sdkCssVariables?.[i]!==void 0},get children(){var F=f(fe);return F.$$click=()=>L(i),B(),F}}),oe,se),_(F=>J(z,"background-color",T(i))),_(()=>V(O,"value",T(i))),_(()=>V(W,"value",T(i).toUpperCase())),B(),E})()}})),Me.$$input=g=>D(parseInt(g.currentTarget.value,10)),Ge.$$input=g=>{const i=parseInt(g.currentTarget.value,10);!isNaN(i)&&i>=0&&D(i)},a(qe,t(ce,{get when(){return r.sdkCssVariables?.["--sdk-roundness-alpha"]!==void 0},get children(){var g=f(fe);return g.$$click=U,B(),g}}),vt,$t),Be.$$input=g=>q(g.currentTarget.value),Pe.$$input=g=>{const i=g.currentTarget.value;/^#[0-9A-Fa-f]{6}$/.test(i)&&q(i)},a(Ke,t(ce,{get when(){return r.sdkCssVariables?.["--search-bg"]!==void 0},get children(){var g=f(fe);return g.$$click=N,B(),g}}),St,_t),a(It,()=>Re.map(g=>(()=>{var i=f(cr);return i.$$click=()=>s(g),a(i,()=>g.name),_(E=>{var H={"border-brand-tbd-base bg-brand-tbd-lighter":v()===g.name,"border-stroke-1 bg-background-normal-primary":v()!==g.name},z=g.value;return E.e=ge(i,H,E.e),z!==E.t&&J(i,"font-family",E.t=z),E},{e:void 0,t:void 0}),B(),i})())),_(g=>{var i={"border-brand-tbd-base bg-brand-tbd-lighter text-text-normal-primary":n()==="telescope-light-theme","border-stroke-1 bg-background-normal-primary text-text-normal-secondary hover:bg-background-normal-tertiary":n()!=="telescope-light-theme"},E={"border-brand-tbd-base bg-brand-tbd-lighter text-text-normal-primary":n()==="telescope-
1dark-theme","border-stroke-1 bg-background-normal-primary text-text-normal-secondary hover:bg-background-normal-tertiary":n()!=="telescope-dark-theme"},H=d(),z=R(),O=j(),W=j();return g.e=ge($,i,g.e),g.t=ge(K,E,g.t),H!==g.a&&J(ye,"background-color",g.a=H),z!==g.o&&J(Ee,"border-radius",g.o=z),O!==g.i&&J(Ee,"background-color",g.i=O),W!==g.n&&J(Ze,"background-color",g.n=W),g},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),_(()=>V(le,"value",d())),_(()=>V(Ue,"value",d().toUpperCase())),_(()=>V(Me,"value",A())),_(()=>V(Ge,"value",A())),_(()=>V(Be,"value",j())),_(()=>V(Pe,"value",j().toUpperCase())),B(),o})()}ue(["click","input"]);var et=k('<input type=text class="text-sm w-full rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary"placeholder=https://...>'),fr=k('<div class="flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><div class="flex items-center justify-between"><h2 class="text-lg font-semibold text-text-normal-primary">Data & Feature Flags</h2></div><div class="flex-1 space-y-6 overflow-y-auto"><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><div class="mt-auto border-t border-stroke-1 pt-3"><p class="text-xs text-text-normal-tertiary">Changes are applied instantly to the preview'),xr=k('<div class=space-y-3><h3 class="text-sm font-semibold text-text-normal-primary"></h3><div class=space-y-4>'),vr=k('<div class=space-y-2><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary"></label><p class="text-xs text-text-normal-tertiary"></p></div><!$><!/>'),$r=k('<div class="flex flex-wrap gap-2">'),yr=k('<button class="text-sm rounded-lg border px-4 py-2 font-medium transition-all">'),Cr=k('<div class="flex items-center justify-between rounded-lg border border-stroke-1 bg-background-normal-primary px-3 py-2.5"><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary"></label><p class="text-xs text-text-normal-tertiary"></p></div><!$><!/>');function kr(){const{components:e}=ve(),{iframeRef:r,consoleConfig:l,setConsoleConfig:d}=re(),n=l,v=d,c=u=>{const s=r();s?.contentWindow&&s.contentWindow.postMessage({operationType:"updateFrontendConfig",frontendConfig:u},"*")},C=(u,s)=>{v(u,s),c({[u]:s})},M=(u,s)=>{v("data",u,s),c({data:{[u]:s}})},h=(u,s)=>{v("featureFlags",u,s),c({featureFlags:{[u]:s}})},S=(u,s)=>{const y={...n.featureFlags.profileCompletionConfig,[u]:s};v("featureFlags","profileCompletionConfig",y),c({featureFlags:{profileCompletionConfig:y}})};return(()=>{var u=f(fr),s=u.firstChild,y=s.nextSibling,p=y.firstChild,[b,I]=w(p.nextSibling),L=b.nextSibling,[T,R]=w(L.nextSibling),A=T.nextSibling,[D,U]=w(A.nextSibling),j=D.nextSibling,[q,N]=w(j.nextSibling),o=q.nextSibling,[m,P]=w(o.nextSibling),X=m.nextSibling,[pe,$e]=w(X.nextSibling),$=pe.nextSibling,[te,ne]=w($.nextSibling);return a(y,t(ie,{title:"SDK Meta",get children(){return t(Ve,{label:"Template",description:"Homepage template to use",get children(){return t(Sr,{options:[{value:"default",label:"Default"},{value:"gc-home-template-2",label:"GC Home Template 2"}],get value(){return n.template},onChange:x=>C("template",x)})}})}}),b,I),a(y,t(ie,{title:"General Settings",get children(){return[t(Ve,{label:"Client Logo URL",description:"URL for the client logo",get children(){var x=f(et);return x.$$input=K=>M("clientLogoUrl",K.currentTarget.value),_(()=>V(x,"value",n.data.clientLogoUrl)),B(),x}}),t(Q,{label:"Enable Branding",description:"Show Hubble branding in the SDK",get checked(){return n.featureFlags.enableBranding},onChange:x=>h("enableBranding",x),get Toggle(){return e.Toggle}})]}}),T,R),a(y,t(ie,{title:"Feature Toggles",get children(){return[t(Q,{label:"Enable Banners",description:"Show promotional banners",get checked(){return n.featureFlags.enableBanners},onChange:x=>h("enableBanners",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Enable Use on Brand CTA",description:"Show 'Use on Brand' call-to-action",get checked(){return n.featureFlags.enableUseOnBrandCta},onChange:x=>h("enableUseOnBrandCta",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Enable Share Voucher Button",description:"Show 'Share' button on voucher card",get checked(){return n.featureFlags.enableShareVoucherButton},onChange:x=>h("enableShareVoucherButton",x),get Toggle(){return e.Toggle}}
1),t(Q,{label:"Enable Coupons",description:"Show coupons in the SDK",get checked(){return n.featureFlags.enableCoupons},onChange:x=>h("enableCoupons",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Show Logout",description:"Show logout option in the menu",get checked(){return n.featureFlags.showLogout},onChange:x=>h("showLogout",x),get Toggle(){return e.Toggle}})]}}),D,U),a(y,t(ie,{title:"Session & Auth",get children(){return[t(Q,{label:"Lazy Login Allowed",description:"Let the homepage work without a session",get checked(){return n.featureFlags.isLazyLoginAllowed},onChange:x=>h("isLazyLoginAllowed",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Support Enabled",description:"Show contact support option",get checked(){return n.featureFlags.supportEnabled},onChange:x=>h("supportEnabled",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Allow Code Redemption",description:"Let users redeem codes (CODE auth flow)",get checked(){return n.featureFlags.allowCodeRedemption},onChange:x=>h("allowCodeRedemption",x),get Toggle(){return e.Toggle}})]}}),q,N),a(y,t(ie,{title:"Voucher Sharing",get children(){return[t(Q,{label:"Whatsapp Sharing",description:"Enable sharing vouchers via Whatsapp",get checked(){return n.featureFlags.whatsappSharingEnabled},onChange:x=>h("whatsappSharingEnabled",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Email Sharing",description:"Enable sharing vouchers via Email",get checked(){return n.featureFlags.emailSharingEnabled},onChange:x=>h("emailSharingEnabled",x),get Toggle(){return e.Toggle}}),t(Q,{label:"SMS Sharing",description:"Enable sharing vouchers via SMS",get checked(){return n.featureFlags.smsSharingEnabled},onChange:x=>h("smsSharingEnabled",x),get Toggle(){return e.Toggle}})]}}),m,P),a(y,t(ie,{title:"Profile Completion (pre-checkout)",get children(){return[t(Q,{label:"Collect Name",description:"Require name before checkout if missing",get checked(){return n.featureFlags.profileCompletionConfig.collectName},onChange:x=>S("collectName",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Collect Email",description:"Require email before checkout if missing",get checked(){return n.featureFlags.profileCompletionConfig.collectEmail},onChange:x=>S("collectEmail",x),get Toggle(){return e.Toggle}}),t(Q,{label:"Collect Phone",description:"Require phone before checkout if missing",get checked(){return n.featureFlags.profileCompletionConfig.collectPhone},onChange:x=>S("collectPhone",x),get Toggle(){return e.Toggle}})]}}),pe,$e),a(y,t(ie,{title:"Coin Settings",get children(){return[t(Ve,{label:"Coin Logo URL",description:"URL for the coin icon",get children(){var x=f(et);return x.$$input=K=>M("coinLogoUrl",K.currentTarget.value),_(()=>V(x,"value",n.data.coinLogoUrl)),B(),x}}),t(Q,{label:"Allow Partial Coin Consumption",description:"Let users spend partial coin amounts",get checked(){return n.featureFlags.allowPartialCoinConsumption},onChange:x=>h("allowPartialCoinConsumption",x),get Toggle(){return e.Toggle}})]}}),te,ne),u})()}function ie(e){return(()=>{var r=f(xr),l=r.firstChild,d=l.nextSibling;return a(l,()=>e.title),a(d,()=>e.children),r})()}function Ve(e){return(()=>{var r=f(vr),l=r.firstChild,d=l.firstChild,n=d.nextSibling,v=l.nextSibling,[c,C]=w(v.nextSibling);return a(d,()=>e.label),a(n,()=>e.description),a(r,()=>e.children,c,C),r})()}function Sr(e){return(()=>{var r=f($r);return a(r,t(ee,{get each(){return e.options},children:l=>(()=>{var d=f(yr);return d.$$click=()=>e.onChange(l.value),a(d,()=>l.label),_(n=>ge(d,{"border-brand-tbd-base bg-brand-tbd-lighter text-text-normal-primary":e.value===l.value,"border-stroke-1 bg-background-normal-primary text-text-normal-secondary hover:bg-background-normal-tertiary":e.value!==l.value},n)),B(),d})()})),r})()}function Q(e){return(()=>{var r=f(Cr),l=r.firstChild,d=l.firstChild,n=d.nextSibling,v=l.nextSibling,[c,C]=w(v.nextSibling);return a(d,()=>e.label),a(n,()=>e.description),a(r,t(e.Toggle,{get checked(){return e.checked},get onChange(){return e.onChange}}),c,C),r})()}ue(["input","click"]);var _r=k('<div class="flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><h2 class="text-lg font-semibold text-text-normal-primary">Global Components Map</h2><p class="text-sm text-text-normal-tertiary">Coming soon...');function wr(){return f(_r)}var Tr=k("<div class=space-y-2>"),Ir=k('<div class="flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><div class="flex items-center justify-between"><h2 class="text-lg font-semibold text-text-normal-primary">App Header Configuration</h2></div><div class="flex-1 space-y-6 overflow-y-auto"><!$><!/><!$><!/><!$><!/></div><div class="mt-auto border-t border-stroke-1 pt-3"><p class="text-xs text-text-normal-tertiary">Changes are applied instantly to the preview'),Fr=k('<label class="flex cursor-pointer items-center gap-3 rounded-lg border border-stroke-1 bg-background-normal-primary px-3 py-2 transition-colors hover:bg-background-normal-tertiary"><input type=checkbox class="size-4 rounded border-stroke-1 text-brand-tbd-base accent-brand-tbd-base"><span class="text-sm capitalize text-text-normal-primary">'),Lr=k('<div class=space-y-2><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary"></label><p class="text-xs text-text-normal-tertiary"></p></div><!$><!/>'),Er=k('<div class="flex flex-wrap gap-2">'),Mr=k('<button class="text-sm rounded-lg border px-4 py-2 font-medium transition-all">');const Br=[{value:"savings",label:"Savings"},{value:"logo",label:"Logo"},{value:"empty",label:"Empty"},{value:"pageTitle",label:"Page title"}],Pr=[{value:"solid",label:"Solid"},{value:"alpha",label:"Alpha"}],Rr=["back","menu","search"];function Vr(){const{components:e}=ve(),{iframeRef:r,consoleConfig:l,setConsoleConfig:d}=re(),n=l,v=d,c=S=>{const u=r();u?.contentWindow&&u.contentWindow.postMessage({operationType:"updateFrontendConfig",frontendConfig:S},"*")},C=(S,u)=>{v("appHeaderConfig",S,u),c({appHeaderConfig:{[S]:u}})},M=(S,u)=>{const s=[...n.appHeaderConfig.buttons],y=s.findIndex(p=>p.type===S);y>=0?s[y]={type:S,visible:u}:s.push({type:S,visible:u}),v("appHeaderConfig","buttons",s),c({appHeaderConfig:{buttons:s}})},h=S=>n.appHeaderConfig.buttons.find(s=>s.type===S)?.visible??!1;return(()=>{var S=f(Ir),u=S.firstChild,s=u.nextSibling,y=s.firstChild,[p,b]=w(y.nextSibling),I=p.nextSibling,[L,T]=w(I.nextSibling),R=L.nextSibling,[A,D]=w(R.nextSibling);return a(s,t(Ae,{label:"Title Variant",description:"What to show in the header title area",get children(){return t(tt,{options:Br,get value(){return n.appHeaderConfig.titleVariant},onChange:U=>C("titleVariant",U)})}}),p,b),a(s,t(Ae,{label:"Button Fill",description:"Style of header buttons",get children(){return t(tt,{options:Pr,get value(){return n.appHeaderConfig.buttonFill},onChange:U=>C("buttonFill",U)})}}),L,T),a(s,t(Ae,{label:"Header Buttons",description:"Select which buttons to show",get children(){var U=f(Tr);return a(U,t(ee,{each:Rr,children:j=>(()=>{var q=f(Fr),N=q.firstChild,o=N.nextSibling;return N.addEventListener("change",m=>M(j,m.currentTarget.checked)),a(o,j),_(()=>V(N,"checked",h(j))),q})()})),U}}),A,D),S})()}function Ae(e){return(()=>{var r=f(Lr),l=r.firstChild,d=l.firstChild,n=d.nextSibling,v=l.nextSibling,[c,C]=w(v.nextSibling);return a(d,()=>e.label),a(n,()=>e.description),a(r,()=>e.children,c,C),r})()}function tt(e){return(()=>{var r=f(Er);return a(r,t(ee,{get each(){return e.options},children:l=>(()=>{var d=f(Mr);return d.$$click=()=>e.onChange(l.value),a(d,()=>l.label),_(n=>ge(d,{"border-brand-tbd-base bg-brand-tbd-lighter text-text-normal-primary":e.value===l.value,"border-stroke-1 bg-background-normal-primary text-text-normal-secondary hover:bg-background-normal-tertiary":e.value!==l.value},n)),B(),d})()})),r})()}ue(["click"]);var Ar=k('<button class="text-sm w-full rounded-lg border border-dashed border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-secondary hover:bg-background-normal-tertiary">+ Add FAQ'),Dr=k('<div class="flex h-full w-[350px] flex-col gap-4 overflow-hidden rounded-lg border border-stroke-1 bg-background-normal-secondary p-4"><div class="flex items-center justify-between"><h2 class="text-lg font-semibold text-text-normal-primary">Login Page Configuration</h2></div><div class="flex-1 space-y-6 overflow-y-auto"><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><div class="mt-auto border-t border-stroke-1 pt-3"><p class="text-xs text-text-normal-tertiary">Changes are applied instantly to the preview'),Ur=k('<div class="space-y-2 rounded-lg border border-stroke-1 bg-background-normal-primary p-3"><div class="flex items-center justify-between"><span class="text-xs font-medium text-text-normal-secondary">FAQ <!$><!/></span><button class="text-xs text-text-normal-secondary underline underline-offset-2">Remove</button></div><input type=text placeholder=Question class="text-sm w-full rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary"><textarea placeholder=Answer rows=3 class="text-sm w-full rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary">'),zr=k('<div class=space-y-3><h3 class="text-sm font-semibold text-text-normal-primary"></h3><div class=space-y-4>'),Hr=k('<div class=space-y-2><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary"></label><p class="text-xs text-text-normal-tertiary"></p></div><!$><!/>'),jr=k('<input type=text class="text-sm w-full rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary">'),Or=k('<div class="flex items-center gap-2"><input type=color class="h-9 w-12 shrink-0 cursor-pointer rounded-md border border-stroke-1 bg-background-normal-primary">
1<input type=text placeholder="#RRGGBB or empty"class="text-sm w-full rounded-md border border-stroke-1 bg-background-normal-primary px-3 py-2 text-text-normal-primary">'),Wr=k('<div class="flex items-center justify-between rounded-lg border border-stroke-1 bg-background-normal-primary px-3 py-2.5"><div class=space-y-0.5><label class="text-sm font-medium text-text-normal-primary"></label><p class="text-xs text-text-normal-tertiary"></p></div><!$><!/>');function Nr(){const{components:e}=ve(),{iframeRef:r,consoleConfig:l,setConsoleConfig:d}=re(),n=l,v=d,c=p=>{const b=r();b?.contentWindow&&b.contentWindow.postMessage({operationType:"updateFrontendConfig",frontendConfig:p},"*")},C=(p,b)=>{v("loginPage",p,b),c({loginPage:{[p]:b}})},M=(p,b)=>{v("loginPage","header",p,b),c({loginPage:{header:{[p]:b}}})},h=(p,b)=>{v("featureFlags",p,b),c({featureFlags:{[p]:b}})},S=(p,b)=>{v("data",p,b),c({data:{[p]:b}})},u=(p,b,I)=>{const L=n.data.faqs.map((T,R)=>R===p?{...T,[b]:I}:T);v("data","faqs",L),c({data:{faqs:L}})},s=()=>{const p=[...n.data.faqs,{question:"",answer:""}];v("data","faqs",p),c({data:{faqs:p}})},y=p=>{const b=n.data.faqs.filter((I,L)=>L!==p);v("data","faqs",b),c({data:{faqs:b}})};return(()=>{var p=f(Dr),b=p.firstChild,I=b.nextSibling,L=I.firstChild,[T,R]=w(L.nextSibling),A=T.nextSibling,[D,U]=w(A.nextSibling),j=D.nextSibling,[q,N]=w(j.nextSibling),o=q.nextSibling,[m,P]=w(o.nextSibling),X=m.nextSibling,[pe,$e]=w(X.nextSibling);return a(I,t(ke,{title:"Content",get children(){return[t(xe,{label:"Intro Text",description:"Small text shown above the heading",get value(){return n.loginPage.introText},onInput:$=>C("introText",$)}),t(xe,{label:"Heading Text",description:"Main heading on the login page",get value(){return n.loginPage.headingText},onInput:$=>C("headingText",$)}),t(xe,{label:"Fallback Text",description:"Legacy text field (used if heading is empty)",get value(){return n.loginPage.text},onInput:$=>C("text",$)}),t(de,{label:"Show Back Button",description:"Show back button when header is hidden",get checked(){return n.loginPage.showBackButton},onChange:$=>C("showBackButton",$),get Toggle(){return e.Toggle}}),t(de,{label:"Show Circular Logo",description:"Render the logo in a circular bordered container",get checked(){return n.loginPage.showCircularLogo},onChange:$=>C("showCircularLogo",$),get Toggle(){return e.Toggle}})]}}),T,R),a(I,t(ke,{title:"Background",get children(){return[t(xe,{label:"Background Image URL",description:"Leave empty to use a solid color",get value(){return n.loginPage.backgroundImageUrl??""},placeholder:"https://...",onInput:$=>C("backgroundImageUrl",$||null)}),t(De,{label:"Background Color",description:"Used when no background image is set",get value(){return n.loginPage.backgroundColor??""},onInput:$=>C("backgroundColor",$||null)}),t(de,{label:"Show Blurred Layer",description:"Overlay a blurred gradient on the background (shared with home hero)",get checked(){return n.featureFlags.showBlurredLayer},onChange:$=>h("showBlurredLayer",$),get Toggle(){return e.Toggle}}),t(De,{label:"Blurred Layer Color",description:"Tint of the blurred gradient (shared with home hero)",get value(){return n.data.blurredLayerColor},onInput:$=>S("blurredLayerColor",$)})]}}),D,U),a(I,t(ke,{title:"Header",get children(){return[t(de,{label:"Show Header",description:"Show the login page top header",get checked(){return n.loginPage.showHeader},onChange:$=>C("showHeader",$),get Toggle(){return e.Toggle}}),t(de,{label:"Transparent",description:"Use transparent header background",get checked(){return n.loginPage.header.transparent??!1},onChange:$=>M("transparent",$),get Toggle(){return e.Toggle}}),t(de,{label:"Logo Only",description:"Hide links in header, show logo only",get checked(){return n.loginPage.header.logoOnly??!1},onChange:$=>M("logoOnly",$),get Toggle(){return e.Toggle}}),t(de,{label:"Bottom Stroke",description:"Show a divider below the header",get checked(){return n.loginPage.header.bottomStroke??!1},onChange:$=>M("bottomStroke",$),get Toggle(){return e.Toggle}}),t(De,{label:"Header Background Color",description:"Leave empty to use theme default",get value(){return n.loginPage.header.backgroundColor??""},onInput:$=>M("backgroundColor",$||null)})]}}
1),q,N),a(I,t(ke,{title:"Legal URLs",get children(){return[t(xe,{label:"Terms & Conditions URL",description:"Opened from header / T&C link",get value(){return n.data.termsAndConditionsUrl},placeholder:"https://...",onInput:$=>S("termsAndConditionsUrl",$)}),t(xe,{label:"Privacy Policy URL",description:"Opened from privacy policy link",get value(){return n.data.privacyPolicyUrl??""},placeholder:"https://...",onInput:$=>S("privacyPolicyUrl",$)})]}}),m,P),a(I,t(ke,{title:"FAQs in Header",get children(){return[t(ee,{get each(){return n.data.faqs},children:($,te)=>(()=>{var ne=f(Ur),x=ne.firstChild,K=x.firstChild,Ie=K.firstChild,Se=Ie.nextSibling,[Fe,_e]=w(Se.nextSibling),Le=K.nextSibling,be=x.nextSibling,ye=be.nextSibling;return a(K,()=>te()+1,Fe,_e),Le.$$click=()=>y(te()),be.$$input=le=>u(te(),"question",le.currentTarget.value),ye.$$input=le=>u(te(),"answer",le.currentTarget.value),_(()=>V(be,"value",$.question)),_(()=>V(ye,"value",$.answer)),B(),ne})()}),(()=>{var $=f(Ar);return $.$$click=s,B(),$})()]}}),pe,$e),p})()}function ke(e){return(()=>{var r=f(zr),l=r.firstChild,d=l.nextSibling;return a(l,()=>e.title),a(d,()=>e.children),r})()}function ot(e){return(()=>{var r=f(Hr),l=r.firstChild,d=l.firstChild,n=d.nextSibling,v=l.nextSibling,[c,C]=w(v.nextSibling);return a(d,()=>e.label),a(n,()=>e.description),a(r,()=>e.children,c,C),r})()}function xe(e){return t(ot,{get label(){return e.label},get description(){return e.description},get children(){var r=f(jr);return r.$$input=l=>e.onInput(l.currentTarget.value),_(()=>rt(r,"placeholder",e.placeholder)),_(()=>V(r,"value",e.value)),B(),r}})}function De(e){return t(ot,{get label(){return e.label},get description(){return e.description},get children(){var r=f(Or),l=r.firstChild,d=l.nextSibling;return l.$$input=n=>e.onInput(n.currentTarget.value),d.$$input=n=>e.onInput(n.currentTarget.value),_(()=>V(l,"value",e.value||"#000000")),_(()=>V(d,"value",e.value)),B(),r}})}function de(e){return(()=>{var r=f(Wr),l=r.firstChild,d=l.firstChild,n=d.nextSibling,v=l.nextSibling,[c,C]=w(v.nextSibling);return a(d,()=>e.label),a(n,()=>e.description),a(r,t(e.Toggle,{get checked(){return e.checked},get onChange(){return e.onChange}}),c,C),r})()}ue(["click","input"]);var qr=k('<div class="flex h-svh flex-col bg-background-normal-primary"><div class="relative flex flex-1 gap-4 overflow-hidden p-4"><div class="w-[350px] shrink-0 transition-all duration-300 ease-out"></div><div class="flex flex-1 transition-all duration-300 ease-out"></div></div><!$><!/>');function Qr(){return t(At,{get children(){return t(zt,{get children(){return t(Gr,{})}})}})}function Gr(){const{consoleMode:e}=re(),r=()=>e()!=="preview";return(()=>{var l=f(qr),d=l.firstChild,n=d.firstChild,v=n.nextSibling,c=d.nextSibling,[C,M]=w(c.nextSibling);return a(n,t(Bt,{fallback:null,get children(){return[t(me,{get when(){return e()==="client"},get children(){return t(Ot,{})}}),t(me,{get when(){return e()==="theming"},get children(){return t(hr,{})}}),t(me,{get when(){return e()==="data-flags"},get children(){return t(kr,{})}}),t(me,{get when(){return e()==="global-map"},get children(){return t(wr,{})}}),t(me,{get when(){return e()==="header"},get children(){return t(Vr,{})}}),t(me,{get when(){return e()==="login"},get children(){return t(Nr,{})}})]}})),a(v,t(Nt,{})),a(l,t(Yt,{}),C,M),_(h=>{var S={"opacity-100 translate-x-0":r(),"opacity-0 -translate-x-full pointer-events-none absolute":!r()},u=!r(),s=!!r();return h.e=ge(n,S,h.e),u!==h.t&&v.classList.toggle("justify-center",h.t=u),s!==h.a&&v.classList.toggle("justify-start",h.a=s),h},{e:void 0,t:void 0,a:void 0}),l})()}ue(["click"]);function fn(){return t(Qr,{})}export{fn as default}; 2//# sourceMappingURL=(console)-DEx8K4pn.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.