veo-sdk 0.5.34 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder-3QPHB2VJ.mjs +5 -0
- package/dist/{builder-ZKWVTSTP.mjs.map → builder-3QPHB2VJ.mjs.map} +1 -1
- package/dist/builder.cjs +2271 -412
- package/dist/builder.cjs.map +1 -1
- package/dist/builder.d.cts +92 -4
- package/dist/builder.d.ts +92 -4
- package/dist/builder.mjs +4 -4
- package/dist/{chunk-HAAT6XVN.mjs → chunk-GMXQMZ4X.mjs} +97 -10
- package/dist/chunk-GMXQMZ4X.mjs.map +1 -0
- package/dist/{chunk-IZXJA55N.mjs → chunk-N4VFMZFA.mjs} +895 -41
- package/dist/chunk-N4VFMZFA.mjs.map +1 -0
- package/dist/{chunk-W4R4XCWL.mjs → chunk-O6USA4TU.mjs} +1117 -98
- package/dist/chunk-O6USA4TU.mjs.map +1 -0
- package/dist/{guide-preview-DbEZdGBV.d.cts → guide-preview-DylsEhrg.d.cts} +98 -5
- package/dist/{guide-preview-DbEZdGBV.d.ts → guide-preview-DylsEhrg.d.ts} +98 -5
- package/dist/index.cjs +2141 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +5 -5
- package/dist/veo-builder.js +261 -28
- package/dist/veo-builder.js.map +1 -1
- package/dist/veo-guides.js +228 -16
- package/dist/veo-guides.js.map +1 -1
- package/package.json +1 -1
- package/dist/builder-ZKWVTSTP.mjs +0 -5
- package/dist/chunk-HAAT6XVN.mjs.map +0 -1
- package/dist/chunk-IZXJA55N.mjs.map +0 -1
- package/dist/chunk-W4R4XCWL.mjs.map +0 -1
package/dist/veo-guides.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var veoGuides=(function(exports){'use strict';function At(){return typeof window<"u"}function je(){return typeof document<"u"}function Pt(o,e=typeof window>"u"?1024:window.innerWidth){if(!o||o==="all")return true;let t=e<=767;return o==="mobile"?t:!t}function ue(o){let e=o?.trigger??"immediate";return e==="immediate"||e==="delayed"?true:e==="on_click"||e==="on_hover"?o?.autoShow===true:false}function $e(o){if(!ue(o))return 0;let e=o?.delayMs??0;return Number.isFinite(e)&&e>0?e:0}function Lt(o,e=new Date){return !o||o.length===0?true:o.includes(e.getDay())}var Mt=["http:","https:"],Gt="data-veo-guide",Nt="veo:freq:";var _t="veo:walkthrough_state:";var Dt={shown:1,dismissed:2,completed:2};function Bt(o){return o.slice(-16)||"default"}var Ye=class{constructor(e){this.storageKey=`${Nt}${e}`,this.cache=this.load(),this.prune();}shouldFilter(e,t){if(t==="every_visit"||t==="always")return false;let n=this.cache.get(e);return n?t==="once"?true:t==="until_dismissed"?n.status==="dismissed"||n.status==="completed":t==="until_answered"?n.status==="completed":false:false}record(e,t){let n=this.cache.get(e);n&&Dt[t]<Dt[n.status]||(this.cache.set(e,{guideId:e,status:t,lastInteractionAt:Date.now()}),this.persist());}clear(){this.cache.clear(),this.persist();}snapshot(){return Array.from(this.cache.values())}prune(){let e=Date.now(),t=false;for(let[n,i]of this.cache)e-i.lastInteractionAt>7776e6&&(this.cache.delete(n),t=true);if(this.cache.size>500){let n=Array.from(this.cache.entries()).sort((r,s)=>r[1].lastInteractionAt-s[1].lastInteractionAt),i=this.cache.size-500;for(let r=0;r<i;r++){let s=n[r];s&&this.cache.delete(s[0]);}t=true;}t&&this.persist();}load(){if(typeof localStorage>"u")return new Map;try{let e=localStorage.getItem(this.storageKey);if(!e)return new Map;let t=JSON.parse(e);if(!Array.isArray(t))return new Map;let n=[];for(let i of t)if(i&&typeof i=="object"&&typeof i.guideId=="string"&&typeof i.lastInteractionAt=="number"&&["shown","dismissed","completed"].includes(i.status)){let r=i;n.push([r.guideId,r]);}return new Map(n)}catch{return new Map}}persist(){if(!(typeof localStorage>"u"))try{let e=JSON.stringify(Array.from(this.cache.values()));localStorage.setItem(this.storageKey,e);}catch{}}};var Ve=class{constructor(e,t,n=false){this.apiUrl=e;this.apiKey=t;this.debug=n;}async resolve(e,t){let n=new URLSearchParams({endUserId:e,pageUrl:t}),i;try{i=await fetch(`${this.apiUrl}/v1/guides/resolve?${n.toString()}`,{method:"GET",headers:{"X-Api-Key":this.apiKey},credentials:"omit"});}catch(r){return this.debug&&console.error("[veo] guides resolve fetch failed:",r),[]}if(!i.ok)return this.debug&&console.warn("[veo] guides resolve HTTP",i.status),[];try{let r=await i.json();return Array.isArray(r.guides)?r.guides:[]}catch(r){return this.debug&&console.error("[veo] guides resolve parse failed:",r),[]}}async fetchById(e){let t;try{t=await fetch(`${this.apiUrl}/v1/guides/${encodeURIComponent(e)}`,{method:"GET",headers:{"X-Api-Key":this.apiKey},credentials:"omit"});}catch(n){return this.debug&&console.error("[veo] guides fetchById network failed:",n),null}if(!t.ok)return this.debug&&console.warn("[veo] guides fetchById HTTP",t.status),null;try{let n=await t.json();return typeof n.guideId!="string"||typeof n.guideName!="string"||typeof n.guideType!="string"||!Array.isArray(n.guideSteps)||!n.activationRules||typeof n.displayFrequency!="string"||typeof n.displayPriority!="number"?(this.debug&&console.warn("[veo] guides fetchById: unexpected shape"),null):{guideId:n.guideId,guideName:n.guideName,guideType:n.guideType,guideSteps:n.guideSteps,activationRules:n.activationRules,displayFrequency:n.displayFrequency,displayPriority:n.displayPriority}}catch(n){return this.debug&&console.error("[veo] guides fetchById parse failed:",n),null}}};function $t(o){let e={endUserId:o.endUserId,interactionType:o.action};return o.sessionId&&(e.sessionId=o.sessionId),typeof o.stepIndex=="number"&&(e.stepPosition=o.stepIndex),o.pageUrl&&(e.pageUrl=o.pageUrl),o.pagePath&&(e.pagePath=o.pagePath),o.metadata&&(e.metadata=o.metadata),e}var Xe=class{constructor(e,t){this.apiUrl=e;this.apiKey=t;}async send(e){let t=this.buildUrl(e.guideId),n=await fetch(t,{method:"POST",headers:{"X-Api-Key":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify($t(e.payload)),credentials:"omit"});if(!n.ok)throw new Error(`guide interaction send failed: HTTP ${n.status}`)}sendBeacon(e){if(typeof navigator>"u"||typeof navigator.sendBeacon!="function")return false;let t=`${this.buildUrl(e.guideId)}?key=${encodeURIComponent(this.apiKey)}`,n=new Blob([JSON.stringify($t(e.payload))],{type:"application/json"});try{return navigator.sendBeacon(t,n)}catch{return false}}buildUrl(e){return `${this.apiUrl}/v1/guides/${encodeURIComponent(e)}/interactions`}};var Qe=class{constructor(e){this.config=e;this.buffer=[];this.timer=null;this.flushing=false;this.unloadCleanup=null;this.startTimer(),this.installUnloadHandler();}get size(){return this.buffer.length}enqueue(e){this.buffer.push({guideId:e.guideId,payload:e.payload,attempts:0,enqueuedAt:Date.now()}),this.buffer.length>=this.config.batchSize&&this.flush();}async flush(){if(this.flushing||this.buffer.length===0)return;let e=Date.now(),t=this.buffer.filter(r=>(r.nextRetryAt??0)<=e);if(t.length===0)return;this.flushing=true;let n=new Set(t);this.buffer=this.buffer.filter(r=>!n.has(r));let i=await Promise.allSettled(t.map(r=>this.config.client.send({guideId:r.guideId,payload:r.payload})));for(let r=0;r<i.length;r++){let s=i[r],a=t[r];!s||!a||s.status!=="fulfilled"&&(a.attempts+=1,a.attempts<this.config.maxRetries?(a.nextRetryAt=Date.now()+this.retryDelayMs(a.attempts),this.buffer.push(a)):this.safeOnError(s.reason,a));}this.flushing=false;}retryDelayMs(e){let t=Math.min(3e3*2**(e-1),3e4);return t/2+Math.random()*(t/2)}flushBeacon(){if(this.buffer.length===0)return;let e=this.buffer.splice(0,this.buffer.length);for(let t of e)this.config.client.sendBeacon({guideId:t.guideId,payload:t.payload});}destroy(){this.timer&&clearInterval(this.timer),this.timer=null,this.unloadCleanup?.(),this.unloadCleanup=null;}startTimer(){typeof window>"u"||(this.timer=setInterval(()=>{this.flush();},this.config.flushIntervalMs));}installUnloadHandler(){if(typeof window>"u")return;let e=()=>this.flushBeacon(),t=()=>{document.visibilityState==="hidden"&&this.flushBeacon();};window.addEventListener("pagehide",e),window.addEventListener("visibilitychange",t),this.unloadCleanup=()=>{window.removeEventListener("pagehide",e),window.removeEventListener("visibilitychange",t);};}safeOnError(e,t){if(!this.config.onError)return;let n=e instanceof Error?e:new Error(String(e));try{this.config.onError(n,t);}catch{}}};var te=Math.min,V=Math.max,Fe=Math.round,We=Math.floor,B=o=>({x:o,y:o}),qn={left:"right",right:"left",bottom:"top",top:"bottom"};function Ze(o,e,t){return V(o,te(e,t))}function xe(o,e){return typeof o=="function"?o(e):o}function ne(o){return o.split("-")[0]}function Ce(o){return o.split("-")[1]}function mt(o){return o==="x"?"y":"x"}function et(o){return o==="y"?"height":"width"}function X(o){let e=o[0];return e==="t"||e==="b"?"y":"x"}function tt(o){return mt(X(o))}function Wt(o,e,t){t===void 0&&(t=false);let n=Ce(o),i=tt(o),r=et(i),s=i==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=He(s)),[s,He(s)]}function zt(o){let e=He(o);return [Je(o),e,Je(e)]}function Je(o){return o.includes("start")?o.replace("start","end"):o.replace("end","start")}var Ht=["left","right"],Ft=["right","left"],jn=["top","bottom"],Yn=["bottom","top"];function Vn(o,e,t){switch(o){case "top":case "bottom":return t?e?Ft:Ht:e?Ht:Ft;case "left":case "right":return e?jn:Yn;default:return []}}function Ut(o,e,t,n){let i=Ce(o),r=Vn(ne(o),t==="start",n);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(Je)))),r}function He(o){let e=ne(o);return qn[e]+o.slice(e.length)}function Xn(o){return {top:0,right:0,bottom:0,left:0,...o}}function ht(o){return typeof o!="number"?Xn(o):{top:o,right:o,bottom:o,left:o}}function pe(o){let{x:e,y:t,width:n,height:i}=o;return {width:n,height:i,top:t,left:e,right:e+n,bottom:t+i,x:e,y:t}}function Kt(o,e,t){let{reference:n,floating:i}=o,r=X(e),s=tt(e),a=et(s),l=ne(e),d=r==="y",c=n.x+n.width/2-i.width/2,u=n.y+n.height/2-i.height/2,p=n[a]/2-i[a]/2,f;switch(l){case "top":f={x:c,y:n.y-i.height};break;case "bottom":f={x:c,y:n.y+n.height};break;case "right":f={x:n.x+n.width,y:u};break;case "left":f={x:n.x-i.width,y:u};break;default:f={x:n.x,y:n.y};}switch(Ce(e)){case "start":f[s]-=p*(t&&d?-1:1);break;case "end":f[s]+=p*(t&&d?-1:1);break}return f}async function qt(o,e){var t;e===void 0&&(e={});let{x:n,y:i,platform:r,rects:s,elements:a,strategy:l}=o,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=false,padding:f=0}=xe(e,o),m=ht(f),v=a[p?u==="floating"?"reference":"floating":u],y=pe(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(v)))==null||t?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),g=u==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),w=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},x=pe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:b,strategy:l}):g);return {top:(y.top-x.top+m.top)/w.y,bottom:(x.bottom-y.bottom+m.bottom)/w.y,left:(y.left-x.left+m.left)/w.x,right:(x.right-y.right+m.right)/w.x}}var Qn=50,jt=async(o,e,t)=>{let{placement:n="bottom",strategy:i="absolute",middleware:r=[],platform:s}=t,a=s.detectOverflow?s:{...s,detectOverflow:qt},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:o,floating:e,strategy:i}),{x:c,y:u}=Kt(d,n,l),p=n,f=0,m={};for(let h=0;h<r.length;h++){let v=r[h];if(!v)continue;let{name:y,fn:g}=v,{x:b,y:w,data:x,reset:C}=await g({x:c,y:u,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:d,platform:a,elements:{reference:o,floating:e}});c=b??c,u=w??u,m[y]={...m[y],...x},C&&f<Qn&&(f++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(d=C.rects===true?await s.getElementRects({reference:o,floating:e,strategy:i}):C.rects),{x:c,y:u}=Kt(d,p,l)),h=-1);}return {x:c,y:u,placement:p,strategy:i,middlewareData:m}},Yt=o=>({name:"arrow",options:o,async fn(e){let{x:t,y:n,placement:i,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:d,padding:c=0}=xe(o,e)||{};if(d==null)return {};let u=ht(c),p={x:t,y:n},f=tt(i),m=et(f),h=await s.getDimensions(d),v=f==="y",y=v?"top":"left",g=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=r.reference[m]+r.reference[f]-p[f]-r.floating[m],x=p[f]-r.reference[f],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d)),E=C?C[b]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=a.floating[b]||r.floating[m]);let Z=w/2-x/2,le=E/2-h[m]/2-1,j=te(u[y],le),De=te(u[g],le),de=j,Be=E-h[m]-De,R=E/2-h[m]/2+Z,ce=Ze(de,R,Be),Y=!l.arrow&&Ce(i)!=null&&R!==ce&&r.reference[m]/2-(R<de?j:De)-h[m]/2<0,O=Y?R<de?R-de:R-Be:0;return {[f]:p[f]+O,data:{[f]:ce,centerOffset:R-ce-O,...Y&&{alignmentOffset:O}},reset:Y}}});var Vt=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(e){var t,n;let{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=true,crossAxis:u=true,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=true,...v}=xe(o,e);if((t=r.arrow)!=null&&t.alignmentOffset)return {};let y=ne(i),g=X(a),b=ne(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=p||(b||!h?[He(a)]:zt(a)),C=m!=="none";!p&&C&&x.push(...Ut(a,h,m,w));let E=[a,...x],Z=await l.detectOverflow(e,v),le=[],j=((n=r.flip)==null?void 0:n.overflows)||[];if(c&&le.push(Z[y]),u){let R=Wt(i,s,w);le.push(Z[R[0]],Z[R[1]]);}if(j=[...j,{placement:i,overflows:le}],!le.every(R=>R<=0)){var De,de;let R=(((De=r.flip)==null?void 0:De.index)||0)+1,ce=E[R];if(ce&&(!(u==="alignment"?g!==X(ce):false)||j.every(D=>X(D.placement)===g?D.overflows[0]>0:true)))return {data:{index:R,overflows:j},reset:{placement:ce}};let Y=(de=j.filter(O=>O.overflows[0]<=0).sort((O,D)=>O.overflows[1]-D.overflows[1])[0])==null?void 0:de.placement;if(!Y)switch(f){case "bestFit":{var Be;let O=(Be=j.filter(D=>{if(C){let ee=X(D.placement);return ee===g||ee==="y"}return true}).map(D=>[D.placement,D.overflows.filter(ee=>ee>0).reduce((ee,Un)=>ee+Un,0)]).sort((D,ee)=>D[1]-ee[1])[0])==null?void 0:Be[0];O&&(Y=O);break}case "initialPlacement":Y=a;break}if(i!==Y)return {reset:{placement:Y}}}return {}}}};var Jn=new Set(["left","top"]);async function Zn(o,e){let{placement:t,platform:n,elements:i}=o,r=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=ne(t),a=Ce(t),l=X(t)==="y",d=Jn.has(s)?-1:1,c=r&&l?-1:1,u=xe(e,o),{mainAxis:p,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),l?{x:f*c,y:p*d}:{x:p*d,y:f*c}}var Xt=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(e){var t,n;let{x:i,y:r,placement:s,middlewareData:a}=e,l=await Zn(e,o);return s===((t=a.offset)==null?void 0:t.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Qt=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(e){let{x:t,y:n,placement:i,platform:r}=e,{mainAxis:s=true,crossAxis:a=false,limiter:l={fn:y=>{let{x:g,y:b}=y;return {x:g,y:b}}},...d}=xe(o,e),c={x:t,y:n},u=await r.detectOverflow(e,d),p=X(ne(i)),f=mt(p),m=c[f],h=c[p];if(s){let y=f==="y"?"top":"left",g=f==="y"?"bottom":"right",b=m+u[y],w=m-u[g];m=Ze(b,m,w);}if(a){let y=p==="y"?"top":"left",g=p==="y"?"bottom":"right",b=h+u[y],w=h-u[g];h=Ze(b,h,w);}let v=l.fn({...e,[f]:m,[p]:h});return {...v,data:{x:v.x-t,y:v.y-n,enabled:{[f]:s,[p]:a}}}}}};function nt(){return typeof window<"u"}function me(o){return Zt(o)?(o.nodeName||"").toLowerCase():"#document"}function A(o){var e;return (o==null||(e=o.ownerDocument)==null?void 0:e.defaultView)||window}function $(o){var e;return (e=(Zt(o)?o.ownerDocument:o.document)||window.document)==null?void 0:e.documentElement}function Zt(o){return nt()?o instanceof Node||o instanceof A(o).Node:false}function N(o){return nt()?o instanceof Element||o instanceof A(o).Element:false}function H(o){return nt()?o instanceof HTMLElement||o instanceof A(o).HTMLElement:false}function Jt(o){return !nt()||typeof ShadowRoot>"u"?false:o instanceof ShadowRoot||o instanceof A(o).ShadowRoot}function Ee(o){let{overflow:e,overflowX:t,overflowY:n,display:i}=_(o);return /auto|scroll|overlay|hidden|clip/.test(e+n+t)&&i!=="inline"&&i!=="contents"}function en(o){return /^(table|td|th)$/.test(me(o))}function ze(o){try{if(o.matches(":popover-open"))return !0}catch{}try{return o.matches(":modal")}catch{return false}}var eo=/transform|translate|scale|rotate|perspective|filter/,to=/paint|layout|strict|content/,fe=o=>!!o&&o!=="none",gt;function ot(o){let e=N(o)?_(o):o;return fe(e.transform)||fe(e.translate)||fe(e.scale)||fe(e.rotate)||fe(e.perspective)||!it()&&(fe(e.backdropFilter)||fe(e.filter))||eo.test(e.willChange||"")||to.test(e.contain||"")}function tn(o){let e=Q(o);for(;H(e)&&!he(e);){if(ot(e))return e;if(ze(e))return null;e=Q(e);}return null}function it(){return gt==null&&(gt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gt}function he(o){return /^(html|body|#document)$/.test(me(o))}function _(o){return A(o).getComputedStyle(o)}function Ue(o){return N(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function Q(o){if(me(o)==="html")return o;let e=o.assignedSlot||o.parentNode||Jt(o)&&o.host||$(o);return Jt(e)?e.host:e}function nn(o){let e=Q(o);return he(e)?o.ownerDocument?o.ownerDocument.body:o.body:H(e)&&Ee(e)?e:nn(e)}function Se(o,e,t){var n;e===void 0&&(e=[]),t===void 0&&(t=true);let i=nn(o),r=i===((n=o.ownerDocument)==null?void 0:n.body),s=A(i);if(r){let a=rt(s);return e.concat(s,s.visualViewport||[],Ee(i)?i:[],a&&t?Se(a):[])}else return e.concat(i,Se(i,[],t))}function rt(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function an(o){let e=_(o),t=parseFloat(e.width)||0,n=parseFloat(e.height)||0,i=H(o),r=i?o.offsetWidth:t,s=i?o.offsetHeight:n,a=Fe(t)!==r||Fe(n)!==s;return a&&(t=r,n=s),{width:t,height:n,$:a}}function yt(o){return N(o)?o:o.contextElement}function ke(o){let e=yt(o);if(!H(e))return B(1);let t=e.getBoundingClientRect(),{width:n,height:i,$:r}=an(e),s=(r?Fe(t.width):t.width)/n,a=(r?Fe(t.height):t.height)/i;return (!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var no=B(0);function ln(o){let e=A(o);return !it()||!e.visualViewport?no:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function oo(o,e,t){return e===void 0&&(e=false),!t||e&&t!==A(o)?false:e}function ge(o,e,t,n){e===void 0&&(e=false),t===void 0&&(t=false);let i=o.getBoundingClientRect(),r=yt(o),s=B(1);e&&(n?N(n)&&(s=ke(n)):s=ke(o));let a=oo(r,t,n)?ln(r):B(0),l=(i.left+a.x)/s.x,d=(i.top+a.y)/s.y,c=i.width/s.x,u=i.height/s.y;if(r){let p=A(r),f=n&&N(n)?A(n):n,m=p,h=rt(m);for(;h&&n&&f!==m;){let v=ke(h),y=h.getBoundingClientRect(),g=_(h),b=y.left+(h.clientLeft+parseFloat(g.paddingLeft))*v.x,w=y.top+(h.clientTop+parseFloat(g.paddingTop))*v.y;l*=v.x,d*=v.y,c*=v.x,u*=v.y,l+=b,d+=w,m=A(h),h=rt(m);}}return pe({width:c,height:u,x:l,y:d})}function st(o,e){let t=Ue(o).scrollLeft;return e?e.left+t:ge($(o)).left+t}function dn(o,e){let t=o.getBoundingClientRect(),n=t.left+e.scrollLeft-st(o,t),i=t.top+e.scrollTop;return {x:n,y:i}}function io(o){let{elements:e,rect:t,offsetParent:n,strategy:i}=o,r=i==="fixed",s=$(n),a=e?ze(e.floating):false;if(n===s||a&&r)return t;let l={scrollLeft:0,scrollTop:0},d=B(1),c=B(0),u=H(n);if((u||!u&&!r)&&((me(n)!=="body"||Ee(s))&&(l=Ue(n)),u)){let f=ge(n);d=ke(n),c.x=f.x+n.clientLeft,c.y=f.y+n.clientTop;}let p=s&&!u&&!r?dn(s,l):B(0);return {width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:t.y*d.y-l.scrollTop*d.y+c.y+p.y}}function ro(o){return Array.from(o.getClientRects())}function so(o){let e=$(o),t=Ue(o),n=o.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=V(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),s=-t.scrollLeft+st(o),a=-t.scrollTop;return _(n).direction==="rtl"&&(s+=V(e.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:a}}var on=25;function ao(o,e){let t=A(o),n=$(o),i=t.visualViewport,r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;let c=it();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop);}let d=st(n);if(d<=0){let c=n.ownerDocument,u=c.body,p=getComputedStyle(u),f=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-u.clientWidth-f);m<=on&&(r-=m);}else d<=on&&(r+=d);return {width:r,height:s,x:a,y:l}}function lo(o,e){let t=ge(o,true,e==="fixed"),n=t.top+o.clientTop,i=t.left+o.clientLeft,r=H(o)?ke(o):B(1),s=o.clientWidth*r.x,a=o.clientHeight*r.y,l=i*r.x,d=n*r.y;return {width:s,height:a,x:l,y:d}}function rn(o,e,t){let n;if(e==="viewport")n=ao(o,t);else if(e==="document")n=so($(o));else if(N(e))n=lo(e,t);else {let i=ln(o);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height};}return pe(n)}function cn(o,e){let t=Q(o);return t===e||!N(t)||he(t)?false:_(t).position==="fixed"||cn(t,e)}function co(o,e){let t=e.get(o);if(t)return t;let n=Se(o,[],false).filter(a=>N(a)&&me(a)!=="body"),i=null,r=_(o).position==="fixed",s=r?Q(o):o;for(;N(s)&&!he(s);){let a=_(s),l=ot(s);!l&&a.position==="fixed"&&(i=null),(r?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ee(s)&&!l&&cn(o,s))?n=n.filter(c=>c!==s):i=a,s=Q(s);}return e.set(o,n),n}function uo(o){let{element:e,boundary:t,rootBoundary:n,strategy:i}=o,s=[...t==="clippingAncestors"?ze(e)?[]:co(e,this._c):[].concat(t),n],a=rn(e,s[0],i),l=a.top,d=a.right,c=a.bottom,u=a.left;for(let p=1;p<s.length;p++){let f=rn(e,s[p],i);l=V(f.top,l),d=te(f.right,d),c=te(f.bottom,c),u=V(f.left,u);}return {width:d-u,height:c-l,x:u,y:l}}function po(o){let{width:e,height:t}=an(o);return {width:e,height:t}}function fo(o,e,t){let n=H(e),i=$(e),r=t==="fixed",s=ge(o,true,r,e),a={scrollLeft:0,scrollTop:0},l=B(0);function d(){l.x=st(i);}if(n||!n&&!r)if((me(e)!=="body"||Ee(i))&&(a=Ue(e)),n){let f=ge(e,true,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop;}else i&&d();r&&!n&&i&&d();let c=i&&!n&&!r?dn(i,a):B(0),u=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return {x:u,y:p,width:s.width,height:s.height}}function vt(o){return _(o).position==="static"}function sn(o,e){if(!H(o)||_(o).position==="fixed")return null;if(e)return e(o);let t=o.offsetParent;return $(o)===t&&(t=t.ownerDocument.body),t}function un(o,e){let t=A(o);if(ze(o))return t;if(!H(o)){let i=Q(o);for(;i&&!he(i);){if(N(i)&&!vt(i))return i;i=Q(i);}return t}let n=sn(o,e);for(;n&&en(n)&&vt(n);)n=sn(n,e);return n&&he(n)&&vt(n)&&!ot(n)?t:n||tn(o)||t}var mo=async function(o){let e=this.getOffsetParent||un,t=this.getDimensions,n=await t(o.floating);return {reference:fo(o.reference,await e(o.floating),o.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ho(o){return _(o).direction==="rtl"}var go={convertOffsetParentRelativeRectToViewportRelativeRect:io,getDocumentElement:$,getClippingRect:uo,getOffsetParent:un,getElementRects:mo,getClientRects:ro,getDimensions:po,getScale:ke,isElement:N,isRTL:ho};function pn(o,e){return o.x===e.x&&o.y===e.y&&o.width===e.width&&o.height===e.height}function vo(o,e){let t=null,n,i=$(o);function r(){var a;clearTimeout(n),(a=t)==null||a.disconnect(),t=null;}function s(a,l){a===void 0&&(a=false),l===void 0&&(l=1),r();let d=o.getBoundingClientRect(),{left:c,top:u,width:p,height:f}=d;if(a||e(),!p||!f)return;let m=We(u),h=We(i.clientWidth-(c+p)),v=We(i.clientHeight-(u+f)),y=We(c),b={rootMargin:-m+"px "+-h+"px "+-v+"px "+-y+"px",threshold:V(0,te(1,l))||1},w=true;function x(C){let E=C[0].intersectionRatio;if(E!==l){if(!w)return s();E?s(false,E):n=setTimeout(()=>{s(false,1e-7);},1e3);}E===1&&!pn(d,o.getBoundingClientRect())&&s(),w=false;}try{t=new IntersectionObserver(x,{...b,root:i.ownerDocument});}catch{t=new IntersectionObserver(x,b);}t.observe(o);}return s(true),r}function fn(o,e,t,n){n===void 0&&(n={});let{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=false}=n,d=yt(o),c=i||r?[...d?Se(d):[],...e?Se(e):[]]:[];c.forEach(y=>{i&&y.addEventListener("scroll",t,{passive:true}),r&&y.addEventListener("resize",t);});let u=d&&a?vo(d,t):null,p=-1,f=null;s&&(f=new ResizeObserver(y=>{let[g]=y;g&&g.target===d&&f&&e&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e);})),t();}),d&&!l&&f.observe(d),e&&f.observe(e));let m,h=l?ge(o):null;l&&v();function v(){let y=ge(o);h&&!pn(h,y)&&t(),h=y,m=requestAnimationFrame(v);}return t(),()=>{var y;c.forEach(g=>{i&&g.removeEventListener("scroll",t),r&&g.removeEventListener("resize",t);}),u?.(),(y=f)==null||y.disconnect(),f=null,l&&cancelAnimationFrame(m);}}var F=Xt;var W=Qt,z=Vt;var oe=Yt;var U=(o,e,t)=>{let n=new Map,i={platform:go,...t},r={...i.platform,_c:n};return jt(o,e,{...i,platform:r})};var yo={P:"p",BR:"br",STRONG:"strong",B:"strong",EM:"em",I:"em",U:"u",S:"s",UL:"ul",OL:"ol",LI:"li",A:"a"},bo=new Set(["SCRIPT","STYLE","TEMPLATE","IFRAME","OBJECT","EMBED","NOSCRIPT","TITLE","TEXTAREA","SELECT","SVG","MATH"]),mn=16*1024,wo=20,xo=1e3;function hn(o,e){let t=e.createDocumentFragment();if(typeof o!="string"||o.length===0)return t;let n;try{n=new DOMParser().parseFromString(o.length>mn?o.slice(0,mn):o,"text/html");}catch{return t.appendChild(e.createTextNode(o)),t}let i={nodes:0,exceeded:false};for(let r of Array.from(n.body.childNodes)){let s=Ke(r,e,0,i);s&&t.appendChild(s);}if(i.exceeded){let r=e.createDocumentFragment();return r.appendChild(e.createTextNode(n.body.textContent??"")),r}return t}function Ke(o,e,t,n){if(n.exceeded)return null;if(++n.nodes>xo||t>wo)return n.exceeded=true,null;if(o.nodeType===Node.TEXT_NODE)return e.createTextNode(o.textContent??"");if(o.nodeType!==Node.ELEMENT_NODE)return null;let i=o;if(bo.has(i.tagName))return null;let r=yo[i.tagName];if(!r){let a=e.createDocumentFragment();for(let l of Array.from(i.childNodes)){let d=Ke(l,e,t+1,n);d&&a.appendChild(d);}return a}if(r==="a"){let a=i.getAttribute("href")??"";if(!I(a)){let d=e.createDocumentFragment();for(let c of Array.from(i.childNodes)){let u=Ke(c,e,t+1,n);u&&d.appendChild(u);}return d}let l=e.createElement("a");l.setAttribute("href",a),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer nofollow");for(let d of Array.from(i.childNodes)){let c=Ke(d,e,t+1,n);c&&l.appendChild(c);}return l}let s=e.createElement(r);for(let a of Array.from(i.childNodes)){let l=Ke(a,e,t+1,n);l&&s.appendChild(l);}return s}function L(o,e,t){let n=e.createElement("div");n.className="veo-guide-content";let i=vn(o);return i?So(n,i,e,t):Co(n,o,e,t),n.appendChild(ve(e,()=>t.onDismiss())),n}function gn(o,e){let t=vn(o);if(t){let i=[];for(let{block:r,idx:s}of t){if(r.type==="button")continue;let a=at(r,e);a&&(a.dataset.veoIdx=String(s),i.push(a));}return i}let n=[];if(typeof o.imageUrl=="string"&&o.imageUrl&&I(o.imageUrl)){let i=e.createElement("img");i.className="veo-guide-image",i.src=o.imageUrl,i.alt=typeof o.title=="string"?o.title:"",n.push(i);}if(typeof o.title=="string"&&o.title){let i=e.createElement("h2");i.className="veo-guide-title",i.textContent=o.title,n.push(i);}if(typeof o.content=="string"&&o.content){let i=e.createElement("p");i.className="veo-guide-text",i.textContent=o.content,n.push(i);}return n}function Co(o,e,t,n){if(typeof e.imageUrl=="string"&&e.imageUrl&&I(e.imageUrl)){let r=t.createElement("img");r.className="veo-guide-image",r.src=e.imageUrl,r.alt=typeof e.title=="string"?e.title:"",o.appendChild(r);}if(typeof e.title=="string"&&e.title){let r=t.createElement("h2");r.className="veo-guide-title",r.textContent=e.title,o.appendChild(r);}if(typeof e.content=="string"&&e.content){let r=t.createElement("p");r.className="veo-guide-text",r.textContent=e.content,o.appendChild(r);}let i=t.createElement("div");if(i.className="veo-guide-actions",typeof e.ctaText=="string"&&e.ctaText){let r=t.createElement("button");r.type="button",r.className="veo-guide-cta",r.textContent=e.ctaText,r.addEventListener("click",()=>{let s=e.ctaAction??"dismiss",a=ko(e);n.onCtaClick(s,a);}),i.appendChild(r);}o.appendChild(i);}function vn(o){if(!Array.isArray(o.blocks)||o.blocks.length===0)return null;let e=o.blocks.map((t,n)=>({block:t,idx:n})).filter(t=>{let n=t.block;return !n||typeof n!="object"?false:n.type==="image"?typeof n.url=="string"&&I(n.url):n.type==="title"||n.type==="text"||n.type==="button"});return e.length>0?e:null}function So(o,e,t,n){let i=0;for(;i<e.length;){let r=e[i];if(r?.block.type==="button"){let a=t.createElement("div");a.className="veo-guide-actions",a.dataset.veoIdx=String(r.idx);let l;for(;i<e.length&&e[i]?.block.type==="button";){let d=e[i].block;if(!l){let c=d.style?.align;(c==="left"||c==="center"||c==="right")&&(l=c);}a.appendChild(Eo(d,t,n)),i++;}l&&(a.style.justifyContent=yn[l]),o.appendChild(a);continue}let s=r?at(r.block,t):null;s&&r&&(s.dataset.veoIdx=String(r.idx),o.appendChild(s)),i++;}}function at(o,e){switch(o.type){case "title":{let t=e.createElement("h2");return t.className="veo-guide-title",t.textContent=typeof o.text=="string"?o.text:"",Re(t,o.style,"text"),t}case "text":{let t=e.createElement("div");return t.className="veo-guide-text",typeof o.html=="string"&&o.html?t.appendChild(hn(o.html,e)):t.textContent=typeof o.text=="string"?o.text:"",Re(t,o.style,"text"),t}case "image":{if(typeof o.url!="string"||!I(o.url))return null;let t=e.createElement("img");return t.className="veo-guide-image",t.src=o.url,t.alt="",Re(t,o.style,"image"),t}default:return null}}function Eo(o,e,t){let n=e.createElement("button");return n.type="button",n.className="veo-guide-cta",n.textContent=typeof o.text=="string"&&o.text?o.text:"OK",Re(n,o.style,"button"),n.addEventListener("click",()=>{let i=o.action??"dismiss",r=i==="next"||i==="url"||i==="guide"?i:"dismiss",s=r==="url"&&typeof o.url=="string"&&I(o.url)?o.url:r==="guide"&&typeof o.targetGuideId=="string"&&o.targetGuideId?o.targetGuideId:void 0,a={...typeof o.id=="string"&&o.id?{buttonId:o.id}:{},...typeof o.text=="string"&&o.text?{buttonText:o.text}:{}};t.onCtaClick(r,s,Object.keys(a).length?a:void 0);}),n}var yn={left:"flex-start",center:"center",right:"flex-end"};function P(o,e,t){return Math.min(t,Math.max(e,o))}function Re(o,e,t){if(!e||typeof e!="object")return;let n=e;if(t==="image"&&n.bleed===true){o.classList.add("veo-guide-image--bleed");return}let i=typeof n.align=="string"?n.align:null;if(i&&(i==="left"||i==="center"||i==="right")&&(t==="text"?o.style.textAlign=i:t==="image"&&(o.style.alignSelf=yn[i])),t!=="image"&&typeof n.color=="string"&&(o.style.color=n.color),t==="text"&&typeof n.fontSize=="number"&&Number.isFinite(n.fontSize)&&(o.style.fontSize=`${P(n.fontSize,8,72)}px`),t==="image"&&typeof n.width=="number"&&Number.isFinite(n.width)&&(o.style.width=`${P(n.width,10,100)}%`),t==="image"&&typeof n.radius=="number"&&Number.isFinite(n.radius)&&(o.style.borderRadius=`${P(n.radius,0,48)}px`),typeof n.marginTop=="number"&&Number.isFinite(n.marginTop)&&(o.style.marginTop=`${P(n.marginTop,0,64)}px`),typeof n.marginBottom=="number"&&Number.isFinite(n.marginBottom)&&(o.style.marginBottom=`${P(n.marginBottom,0,64)}px`),t!=="image"&&(typeof n.fontSize=="number"&&Number.isFinite(n.fontSize)&&(o.style.fontSize=`${P(n.fontSize,8,96)}px`),typeof n.fontFamily=="string"&&n.fontFamily&&n.fontFamily!=="inherit"&&(o.style.fontFamily=n.fontFamily),typeof n.fontWeight=="string"&&n.fontWeight&&(o.style.fontWeight=n.fontWeight),typeof n.textTransform=="string"&&n.textTransform&&n.textTransform!=="none"&&(o.style.textTransform=n.textTransform),typeof n.lineHeight=="number"&&Number.isFinite(n.lineHeight)&&(o.style.lineHeight=`${P(n.lineHeight,50,300)}%`),typeof n.letterSpacing=="number"&&Number.isFinite(n.letterSpacing)&&(o.style.letterSpacing=`${P(n.letterSpacing,-5,20)}px`)),typeof n.background=="string"&&n.background&&(o.style.background=n.background),typeof n.borderWidth=="number"&&n.borderWidth>0){let r=typeof n.borderColor=="string"&&n.borderColor?n.borderColor:"#bbbbbb";o.style.border=`${P(n.borderWidth,0,20)}px solid ${r}`;}t!=="image"&&typeof n.radius=="number"&&Number.isFinite(n.radius)&&(o.style.borderRadius=`${P(n.radius,0,64)}px`),typeof n.height=="number"&&Number.isFinite(n.height)&&n.height>0&&(o.style.height=`${P(n.height,1,2e3)}px`),t!=="image"&&typeof n.width=="number"&&Number.isFinite(n.width)&&n.width>0&&(o.style.width=`${P(n.width,1,2e3)}px`);for(let r of ["Top","Right","Bottom","Left"]){let s=n[`padding${r}`];typeof s=="number"&&Number.isFinite(s)&&o.style.setProperty(`padding-${r.toLowerCase()}`,`${P(s,0,128)}px`);let a=n[`margin${r}`];typeof a=="number"&&Number.isFinite(a)&&o.style.setProperty(`margin-${r.toLowerCase()}`,`${P(a,0,128)}px`);}}function ve(o,e,t="veo-guide-close"){let n=o.createElement("button");return n.type="button",n.className=t,n.setAttribute("aria-label","Cerrar"),n.textContent="\xD7",n.addEventListener("click",e),n}function I(o){if(typeof o!="string"||o.length===0)return false;try{let e=typeof window<"u"?window.location.href:"http://localhost/",t=new URL(o,e);return Mt.includes(t.protocol)}catch{return false}}function ko(o){let e=o.style?.ctaUrl;if(typeof e=="string")return I(e)?e:void 0}var Ro={"--veo-bg":"#1f2937","--veo-text":"#f9fafb","--veo-text-secondary":"#d1d5db","--veo-shadow":"0 20px 60px rgba(0, 0, 0, 0.55)"},wt={left:"flex-start",center:"center",right:"flex-end"},Io={left:"flex-start",center:"center",right:"flex-end"},To={title:"text",text:"text",image:"self"},bn={none:"none",soft:"0 4px 14px rgba(0, 0, 0, 0.10)",medium:"0 8px 30px rgba(0, 0, 0, 0.18)",strong:"0 24px 60px rgba(0, 0, 0, 0.32)"},wn={center:[.5,.5],top:[.5,0],bottom:[.5,1],left:[0,.5],right:[1,.5],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},K=/^#[0-9a-f]{3,8}$|^(rgb|rgba|hsl|hsla)\([\d.,%/\sdeg]+\)$|^[a-z]{3,20}$/i;function T(o,e,t){return Math.min(t,Math.max(e,o))}function xn(o,e){if(!e||typeof e!="object")return;let t=e;if(typeof t.accentColor=="string"&&K.test(t.accentColor.trim())&&o.style.setProperty("--veo-primary",t.accentColor.trim()),typeof t.fontFamily=="string"&&t.fontFamily.length<=200&&!/[<>{}]/.test(t.fontFamily)&&o.style.setProperty("--veo-font",t.fontFamily.trim()),t.theme==="dark")for(let[r,s]of Object.entries(Ro))o.style.setProperty(r,s);typeof t.background=="string"&&K.test(t.background.trim())&&o.style.setProperty("--veo-bg",t.background.trim()),typeof t.textColor=="string"&&K.test(t.textColor.trim())&&o.style.setProperty("--veo-text",t.textColor.trim()),typeof t.textSecondaryColor=="string"&&K.test(t.textSecondaryColor.trim())&&o.style.setProperty("--veo-text-secondary",t.textSecondaryColor.trim()),typeof t.radius=="number"&&Number.isFinite(t.radius)&&o.style.setProperty("--veo-radius",`${T(t.radius,0,48)}px`),typeof t.width=="number"&&Number.isFinite(t.width)&&o.style.setProperty("--veo-width",`${T(t.width,220,720)}px`),typeof t.height=="number"&&Number.isFinite(t.height)&&o.style.setProperty("--veo-min-h",`${T(t.height,120,900)}px`),(t.align==="left"||t.align==="center"||t.align==="right")&&o.style.setProperty("--veo-actions-justify",wt[t.align]),typeof t.padding=="number"&&Number.isFinite(t.padding)&&o.style.setProperty("--veo-pad",`${T(t.padding,0,64)}px`),typeof t.margin=="number"&&Number.isFinite(t.margin)&&o.style.setProperty("--veo-margin",`${T(t.margin,0,64)}px`),typeof t.borderWidth=="number"&&Number.isFinite(t.borderWidth)&&o.style.setProperty("--veo-border-width",`${T(t.borderWidth,0,16)}px`),typeof t.borderColor=="string"&&K.test(t.borderColor.trim())&&o.style.setProperty("--veo-border-color",t.borderColor.trim()),typeof t.shadow=="string"&&bn[t.shadow]&&o.style.setProperty("--veo-shadow",bn[t.shadow]);let n,i;if(typeof t.posX=="number"&&typeof t.posY=="number"?(n=T(t.posX,0,1),i=T(t.posY,0,1)):typeof t.overlayPosition=="string"&&wn[t.overlayPosition]&&([n,i]=wn[t.overlayPosition]),n!==void 0&&i!==void 0&&(o.style.setProperty("--veo-pos-x",`${n*100}%`),o.style.setProperty("--veo-pos-y",`${i*100}%`)),t.elements&&typeof t.elements=="object"){let r=t.elements;bt(o,"title",r.title),bt(o,"text",r.text),bt(o,"image",r.image),Ao(o,r.cta);}}function Ao(o,e){if(!e||typeof e!="object")return;let t=e;typeof t.align=="string"&&wt[t.align]&&o.style.setProperty("--veo-actions-justify",wt[t.align]),typeof t.background=="string"&&K.test(t.background.trim())&&o.style.setProperty("--veo-cta-bg",t.background.trim()),typeof t.color=="string"&&K.test(t.color.trim())&&o.style.setProperty("--veo-cta-color",t.color.trim()),typeof t.fontSize=="number"&&Number.isFinite(t.fontSize)&&o.style.setProperty("--veo-cta-size",`${T(t.fontSize,10,24)}px`),typeof t.radius=="number"&&Number.isFinite(t.radius)&&o.style.setProperty("--veo-cta-radius",`${T(t.radius,0,48)}px`);}function bt(o,e,t){if(!t||typeof t!="object")return;let n=t;if(typeof n.align=="string"&&(n.align==="left"||n.align==="center"||n.align==="right")){let r=(To[e]??"text")==="self"?Io[n.align]:n.align;o.style.setProperty(`--veo-${e}-align`,r);}typeof n.color=="string"&&K.test(n.color.trim())&&o.style.setProperty(`--veo-${e}-color`,n.color.trim()),typeof n.fontSize=="number"&&Number.isFinite(n.fontSize)&&o.style.setProperty(`--veo-${e}-size`,`${T(n.fontSize,8,72)}px`),typeof n.width=="number"&&Number.isFinite(n.width)&&o.style.setProperty(`--veo-${e}-width`,`${T(n.width,10,100)}%`),typeof n.radius=="number"&&Number.isFinite(n.radius)&&o.style.setProperty(`--veo-${e}-radius`,`${T(n.radius,0,48)}px`),typeof n.marginTop=="number"&&Number.isFinite(n.marginTop)&&o.style.setProperty(`--veo-${e}-mt`,`${T(n.marginTop,0,64)}px`),typeof n.marginBottom=="number"&&Number.isFinite(n.marginBottom)&&o.style.setProperty(`--veo-${e}-mb`,`${T(n.marginBottom,0,64)}px`);}function q(o){let e=o?.inlinePosition;return e==="before"||e==="prepend"||e==="append"?e:"after"}function M(o,e,t){switch(t){case "before":o.before(e);break;case "after":o.after(e);break;case "prepend":o.prepend(e);break;case "append":o.append(e);break}}function G(o,e,t){let n=window.setInterval(()=>{if(o.isConnected)return;let i=document.querySelector(e);i&&M(i,o,t);},1e3);return ()=>window.clearInterval(n)}function k(o,e=5e3){return new Promise(t=>{let n=()=>{try{return document.querySelector(o)}catch{return null}},i=n();if(i){t(i);return}let r=false,s=d=>{r||(r=true,a.disconnect(),clearTimeout(l),t(d));},a=new MutationObserver(()=>{let d=n();d&&s(d);});a.observe(document.body,{childList:true,subtree:true});let l=setTimeout(()=>s(null),e);})}var Cn=`
|
|
1
|
+
var veoGuides=(function(exports){'use strict';function Ot(){return typeof window<"u"}function Qe(){return typeof document<"u"}function Dt(n,e=typeof window>"u"?1024:window.innerWidth){if(!n||n==="all")return true;let t=e<=767;return n==="mobile"?t:!t}function me(n){let e=n?.trigger??"immediate";return e==="immediate"||e==="delayed"?true:e==="on_click"||e==="on_hover"?n?.autoShow===true:false}function We(n){if(!me(n))return 0;let e=n?.delayMs??0;return Number.isFinite(e)&&e>0?e:0}function Ft(n,e=new Date){return !n||n.length===0?true:n.includes(e.getDay())}var Ht=["http:","https:"],zt="data-veo-guide",Wt="veo:freq:";var Ut="veo:walkthrough_state:";var jt={shown:1,dismissed:2,completed:2};function Kt(n){return n.slice(-16)||"default"}var Ze=class{constructor(e){this.storageKey=`${Wt}${e}`,this.cache=this.load(),this.prune();}shouldFilter(e,t){if(t==="every_visit"||t==="always")return false;let o=this.cache.get(e);return o?t==="once"?true:t==="until_dismissed"?o.status==="dismissed"||o.status==="completed":t==="until_answered"?o.status==="completed":false:false}record(e,t){let o=this.cache.get(e);o&&jt[t]<jt[o.status]||(this.cache.set(e,{guideId:e,status:t,lastInteractionAt:Date.now()}),this.persist());}clear(){this.cache.clear(),this.persist();}snapshot(){return Array.from(this.cache.values())}prune(){let e=Date.now(),t=false;for(let[o,i]of this.cache)e-i.lastInteractionAt>7776e6&&(this.cache.delete(o),t=true);if(this.cache.size>500){let o=Array.from(this.cache.entries()).sort((r,s)=>r[1].lastInteractionAt-s[1].lastInteractionAt),i=this.cache.size-500;for(let r=0;r<i;r++){let s=o[r];s&&this.cache.delete(s[0]);}t=true;}t&&this.persist();}load(){if(typeof localStorage>"u")return new Map;try{let e=localStorage.getItem(this.storageKey);if(!e)return new Map;let t=JSON.parse(e);if(!Array.isArray(t))return new Map;let o=[];for(let i of t)if(i&&typeof i=="object"&&typeof i.guideId=="string"&&typeof i.lastInteractionAt=="number"&&["shown","dismissed","completed"].includes(i.status)){let r=i;o.push([r.guideId,r]);}return new Map(o)}catch{return new Map}}persist(){if(!(typeof localStorage>"u"))try{let e=JSON.stringify(Array.from(this.cache.values()));localStorage.setItem(this.storageKey,e);}catch{}}};var Je=class{constructor(e,t,o=false){this.apiUrl=e;this.apiKey=t;this.debug=o;}async resolve(e,t){let o=new URLSearchParams({endUserId:e,pageUrl:t}),i;try{i=await fetch(`${this.apiUrl}/v1/guides/resolve?${o.toString()}`,{method:"GET",headers:{"X-Api-Key":this.apiKey},credentials:"omit"});}catch(r){return this.debug&&console.error("[veo] guides resolve fetch failed:",r),[]}if(!i.ok)return this.debug&&console.warn("[veo] guides resolve HTTP",i.status),[];try{let r=await i.json();return Array.isArray(r.guides)?r.guides:[]}catch(r){return this.debug&&console.error("[veo] guides resolve parse failed:",r),[]}}async fetchById(e){let t;try{t=await fetch(`${this.apiUrl}/v1/guides/${encodeURIComponent(e)}`,{method:"GET",headers:{"X-Api-Key":this.apiKey},credentials:"omit"});}catch(o){return this.debug&&console.error("[veo] guides fetchById network failed:",o),null}if(!t.ok)return this.debug&&console.warn("[veo] guides fetchById HTTP",t.status),null;try{let o=await t.json();return typeof o.guideId!="string"||typeof o.guideName!="string"||typeof o.guideType!="string"||!Array.isArray(o.guideSteps)||!o.activationRules||typeof o.displayFrequency!="string"||typeof o.displayPriority!="number"?(this.debug&&console.warn("[veo] guides fetchById: unexpected shape"),null):{guideId:o.guideId,guideName:o.guideName,guideType:o.guideType,guideSteps:o.guideSteps,activationRules:o.activationRules,displayFrequency:o.displayFrequency,displayPriority:o.displayPriority}}catch(o){return this.debug&&console.error("[veo] guides fetchById parse failed:",o),null}}};function Vt(n){let e={endUserId:n.endUserId,interactionType:n.action};return n.sessionId&&(e.sessionId=n.sessionId),typeof n.stepIndex=="number"&&(e.stepPosition=n.stepIndex),n.pageUrl&&(e.pageUrl=n.pageUrl),n.pagePath&&(e.pagePath=n.pagePath),n.metadata&&(e.metadata=n.metadata),e}var et=class{constructor(e,t){this.apiUrl=e;this.apiKey=t;}async send(e){let t=this.buildUrl(e.guideId),o=await fetch(t,{method:"POST",headers:{"X-Api-Key":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(Vt(e.payload)),credentials:"omit"});if(!o.ok)throw new Error(`guide interaction send failed: HTTP ${o.status}`)}sendBeacon(e){if(typeof navigator>"u"||typeof navigator.sendBeacon!="function")return false;let t=`${this.buildUrl(e.guideId)}?key=${encodeURIComponent(this.apiKey)}`,o=new Blob([JSON.stringify(Vt(e.payload))],{type:"application/json"});try{return navigator.sendBeacon(t,o)}catch{return false}}buildUrl(e){return `${this.apiUrl}/v1/guides/${encodeURIComponent(e)}/interactions`}};var tt=class{constructor(e){this.config=e;this.buffer=[];this.timer=null;this.flushing=false;this.unloadCleanup=null;this.startTimer(),this.installUnloadHandler();}get size(){return this.buffer.length}enqueue(e){this.buffer.push({guideId:e.guideId,payload:e.payload,attempts:0,enqueuedAt:Date.now()}),this.buffer.length>=this.config.batchSize&&this.flush();}async flush(){if(this.flushing||this.buffer.length===0)return;let e=Date.now(),t=this.buffer.filter(r=>(r.nextRetryAt??0)<=e);if(t.length===0)return;this.flushing=true;let o=new Set(t);this.buffer=this.buffer.filter(r=>!o.has(r));let i=await Promise.allSettled(t.map(r=>this.config.client.send({guideId:r.guideId,payload:r.payload})));for(let r=0;r<i.length;r++){let s=i[r],a=t[r];!s||!a||s.status!=="fulfilled"&&(a.attempts+=1,a.attempts<this.config.maxRetries?(a.nextRetryAt=Date.now()+this.retryDelayMs(a.attempts),this.buffer.push(a)):this.safeOnError(s.reason,a));}this.flushing=false;}retryDelayMs(e){let t=Math.min(3e3*2**(e-1),3e4);return t/2+Math.random()*(t/2)}flushBeacon(){if(this.buffer.length===0)return;let e=this.buffer.splice(0,this.buffer.length);for(let t of e)this.config.client.sendBeacon({guideId:t.guideId,payload:t.payload});}destroy(){this.timer&&clearInterval(this.timer),this.timer=null,this.unloadCleanup?.(),this.unloadCleanup=null;}startTimer(){typeof window>"u"||(this.timer=setInterval(()=>{this.flush();},this.config.flushIntervalMs));}installUnloadHandler(){if(typeof window>"u")return;let e=()=>this.flushBeacon(),t=()=>{document.visibilityState==="hidden"&&this.flushBeacon();};window.addEventListener("pagehide",e),window.addEventListener("visibilitychange",t),this.unloadCleanup=()=>{window.removeEventListener("pagehide",e),window.removeEventListener("visibilitychange",t);};}safeOnError(e,t){if(!this.config.onError)return;let o=e instanceof Error?e:new Error(String(e));try{this.config.onError(o,t);}catch{}}};var ne=Math.min,Q=Math.max,qe=Math.round,je=Math.floor,H=n=>({x:n,y:n}),pn={left:"right",right:"left",bottom:"top",top:"bottom"};function nt(n,e,t){return Q(n,ne(e,t))}function ke(n,e){return typeof n=="function"?n(e):n}function ie(n){return n.split("-")[0]}function Ee(n){return n.split("-")[1]}function bt(n){return n==="x"?"y":"x"}function it(n){return n==="y"?"height":"width"}function Z(n){let e=n[0];return e==="t"||e==="b"?"y":"x"}function rt(n){return bt(Z(n))}function Qt(n,e,t){t===void 0&&(t=false);let o=Ee(n),i=rt(n),r=it(i),s=i==="x"?o===(t?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Ue(s)),[s,Ue(s)]}function Zt(n){let e=Ue(n);return [ot(n),e,ot(e)]}function ot(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var Yt=["left","right"],Xt=["right","left"],mn=["top","bottom"],fn=["bottom","top"];function hn(n,e,t){switch(n){case "top":case "bottom":return t?e?Xt:Yt:e?Yt:Xt;case "left":case "right":return e?mn:fn;default:return []}}function Jt(n,e,t,o){let i=Ee(n),r=hn(ie(n),t==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(ot)))),r}function Ue(n){let e=ie(n);return pn[e]+n.slice(e.length)}function gn(n){return {top:0,right:0,bottom:0,left:0,...n}}function wt(n){return typeof n!="number"?gn(n):{top:n,right:n,bottom:n,left:n}}function fe(n){let{x:e,y:t,width:o,height:i}=n;return {width:o,height:i,top:t,left:e,right:e+o,bottom:t+i,x:e,y:t}}function eo(n,e,t){let{reference:o,floating:i}=n,r=Z(e),s=rt(e),a=it(s),l=ie(e),d=r==="y",c=o.x+o.width/2-i.width/2,m=o.y+o.height/2-i.height/2,p=o[a]/2-i[a]/2,u;switch(l){case "top":u={x:c,y:o.y-i.height};break;case "bottom":u={x:c,y:o.y+o.height};break;case "right":u={x:o.x+o.width,y:m};break;case "left":u={x:o.x-i.width,y:m};break;default:u={x:o.x,y:o.y};}switch(Ee(e)){case "start":u[s]-=p*(t&&d?-1:1);break;case "end":u[s]+=p*(t&&d?-1:1);break}return u}async function to(n,e){var t;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:a,strategy:l}=n,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:m="floating",altBoundary:p=false,padding:u=0}=ke(e,n),f=wt(u),g=a[p?m==="floating"?"reference":"floating":m],y=fe(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(g)))==null||t?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),v=m==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),w=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},x=fe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return {top:(y.top-x.top+f.top)/w.y,bottom:(x.bottom-y.bottom+f.bottom)/w.y,left:(y.left-x.left+f.left)/w.x,right:(x.right-y.right+f.right)/w.x}}var vn=50,oo=async(n,e,t)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=t,a=s.detectOverflow?s:{...s,detectOverflow:to},l=await(s.isRTL==null?void 0:s.isRTL(e)),d=await s.getElementRects({reference:n,floating:e,strategy:i}),{x:c,y:m}=eo(d,o,l),p=o,u=0,f={};for(let h=0;h<r.length;h++){let g=r[h];if(!g)continue;let{name:y,fn:v}=g,{x:b,y:w,data:x,reset:C}=await v({x:c,y:m,initialPlacement:o,placement:p,strategy:i,middlewareData:f,rects:d,platform:a,elements:{reference:n,floating:e}});c=b??c,m=w??m,f[y]={...f[y],...x},C&&u<vn&&(u++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(d=C.rects===true?await s.getElementRects({reference:n,floating:e,strategy:i}):C.rects),{x:c,y:m}=eo(d,p,l)),h=-1);}return {x:c,y:m,placement:p,strategy:i,middlewareData:f}},no=n=>({name:"arrow",options:n,async fn(e){let{x:t,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:d,padding:c=0}=ke(n,e)||{};if(d==null)return {};let m=wt(c),p={x:t,y:o},u=rt(i),f=it(u),h=await s.getDimensions(d),g=u==="y",y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[u]-p[u]-r.floating[f],x=p[u]-r.reference[u],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d)),S=C?C[b]:0;(!S||!await(s.isElement==null?void 0:s.isElement(C)))&&(S=a.floating[b]||r.floating[f]);let R=w/2-x/2,P=S/2-h[f]/2-1,O=ne(m[y],P),He=ne(m[v],P),ue=O,ze=S-h[f]-He,T=S/2-h[f]/2+R,pe=nt(ue,T,ze),X=!l.arrow&&Ee(i)!=null&&T!==pe&&r.reference[f]/2-(T<ue?O:He)-h[f]/2<0,D=X?T<ue?T-ue:T-ze:0;return {[u]:p[u]+D,data:{[u]:pe,centerOffset:T-pe-D,...X&&{alignmentOffset:D}},reset:X}}});var io=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:c=true,crossAxis:m=true,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=true,...g}=ke(n,e);if((t=r.arrow)!=null&&t.alignmentOffset)return {};let y=ie(i),v=Z(a),b=ie(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(d.floating)),x=p||(b||!h?[Ue(a)]:Zt(a)),C=f!=="none";!p&&C&&x.push(...Jt(a,h,f,w));let S=[a,...x],R=await l.detectOverflow(e,g),P=[],O=((o=r.flip)==null?void 0:o.overflows)||[];if(c&&P.push(R[y]),m){let T=Qt(i,s,w);P.push(R[T[0]],R[T[1]]);}if(O=[...O,{placement:i,overflows:P}],!P.every(T=>T<=0)){var He,ue;let T=(((He=r.flip)==null?void 0:He.index)||0)+1,pe=S[T];if(pe&&(!(m==="alignment"?v!==Z(pe):false)||O.every(F=>Z(F.placement)===v?F.overflows[0]>0:true)))return {data:{index:T,overflows:O},reset:{placement:pe}};let X=(ue=O.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:ue.placement;if(!X)switch(u){case "bestFit":{var ze;let D=(ze=O.filter(F=>{if(C){let oe=Z(F.placement);return oe===v||oe==="y"}return true}).map(F=>[F.placement,F.overflows.filter(oe=>oe>0).reduce((oe,cn)=>oe+cn,0)]).sort((F,oe)=>F[1]-oe[1])[0])==null?void 0:ze[0];D&&(X=D);break}case "initialPlacement":X=a;break}if(i!==X)return {reset:{placement:X}}}return {}}}};var yn=new Set(["left","top"]);async function bn(n,e){let{placement:t,platform:o,elements:i}=n,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=ie(t),a=Ee(t),l=Z(t)==="y",d=yn.has(s)?-1:1,c=r&&l?-1:1,m=ke(e,n),{mainAxis:p,crossAxis:u,alignmentAxis:f}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&typeof f=="number"&&(u=a==="end"?f*-1:f),l?{x:u*c,y:p*d}:{x:p*d,y:u*c}}var ro=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,o;let{x:i,y:r,placement:s,middlewareData:a}=e,l=await bn(e,n);return s===((t=a.offset)==null?void 0:t.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},so=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:o,placement:i,platform:r}=e,{mainAxis:s=true,crossAxis:a=false,limiter:l={fn:y=>{let{x:v,y:b}=y;return {x:v,y:b}}},...d}=ke(n,e),c={x:t,y:o},m=await r.detectOverflow(e,d),p=Z(ie(i)),u=bt(p),f=c[u],h=c[p];if(s){let y=u==="y"?"top":"left",v=u==="y"?"bottom":"right",b=f+m[y],w=f-m[v];f=nt(b,f,w);}if(a){let y=p==="y"?"top":"left",v=p==="y"?"bottom":"right",b=h+m[y],w=h-m[v];h=nt(b,h,w);}let g=l.fn({...e,[u]:f,[p]:h});return {...g,data:{x:g.x-t,y:g.y-o,enabled:{[u]:s,[p]:a}}}}}};function st(){return typeof window<"u"}function ge(n){return lo(n)?(n.nodeName||"").toLowerCase():"#document"}function M(n){var e;return (n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function z(n){var e;return (e=(lo(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function lo(n){return st()?n instanceof Node||n instanceof M(n).Node:false}function $(n){return st()?n instanceof Element||n instanceof M(n).Element:false}function W(n){return st()?n instanceof HTMLElement||n instanceof M(n).HTMLElement:false}function ao(n){return !st()||typeof ShadowRoot>"u"?false:n instanceof ShadowRoot||n instanceof M(n).ShadowRoot}function Re(n){let{overflow:e,overflowX:t,overflowY:o,display:i}=B(n);return /auto|scroll|overlay|hidden|clip/.test(e+o+t)&&i!=="inline"&&i!=="contents"}function co(n){return /^(table|td|th)$/.test(ge(n))}function Ke(n){try{if(n.matches(":popover-open"))return !0}catch{}try{return n.matches(":modal")}catch{return false}}var wn=/transform|translate|scale|rotate|perspective|filter/,xn=/paint|layout|strict|content/,he=n=>!!n&&n!=="none",xt;function at(n){let e=$(n)?B(n):n;return he(e.transform)||he(e.translate)||he(e.scale)||he(e.rotate)||he(e.perspective)||!lt()&&(he(e.backdropFilter)||he(e.filter))||wn.test(e.willChange||"")||xn.test(e.contain||"")}function uo(n){let e=J(n);for(;W(e)&&!ve(e);){if(at(e))return e;if(Ke(e))return null;e=J(e);}return null}function lt(){return xt==null&&(xt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xt}function ve(n){return /^(html|body|#document)$/.test(ge(n))}function B(n){return M(n).getComputedStyle(n)}function Ve(n){return $(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function J(n){if(ge(n)==="html")return n;let e=n.assignedSlot||n.parentNode||ao(n)&&n.host||z(n);return ao(e)?e.host:e}function po(n){let e=J(n);return ve(e)?n.ownerDocument?n.ownerDocument.body:n.body:W(e)&&Re(e)?e:po(e)}function Ie(n,e,t){var o;e===void 0&&(e=[]),t===void 0&&(t=true);let i=po(n),r=i===((o=n.ownerDocument)==null?void 0:o.body),s=M(i);if(r){let a=dt(s);return e.concat(s,s.visualViewport||[],Re(i)?i:[],a&&t?Ie(a):[])}else return e.concat(i,Ie(i,[],t))}function dt(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function go(n){let e=B(n),t=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=W(n),r=i?n.offsetWidth:t,s=i?n.offsetHeight:o,a=qe(t)!==r||qe(o)!==s;return a&&(t=r,o=s),{width:t,height:o,$:a}}function St(n){return $(n)?n:n.contextElement}function Te(n){let e=St(n);if(!W(e))return H(1);let t=e.getBoundingClientRect(),{width:o,height:i,$:r}=go(e),s=(r?qe(t.width):t.width)/o,a=(r?qe(t.height):t.height)/i;return (!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Cn=H(0);function vo(n){let e=M(n);return !lt()||!e.visualViewport?Cn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Sn(n,e,t){return e===void 0&&(e=false),!t||e&&t!==M(n)?false:e}function ye(n,e,t,o){e===void 0&&(e=false),t===void 0&&(t=false);let i=n.getBoundingClientRect(),r=St(n),s=H(1);e&&(o?$(o)&&(s=Te(o)):s=Te(n));let a=Sn(r,t,o)?vo(r):H(0),l=(i.left+a.x)/s.x,d=(i.top+a.y)/s.y,c=i.width/s.x,m=i.height/s.y;if(r){let p=M(r),u=o&&$(o)?M(o):o,f=p,h=dt(f);for(;h&&o&&u!==f;){let g=Te(h),y=h.getBoundingClientRect(),v=B(h),b=y.left+(h.clientLeft+parseFloat(v.paddingLeft))*g.x,w=y.top+(h.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,d*=g.y,c*=g.x,m*=g.y,l+=b,d+=w,f=M(h),h=dt(f);}}return fe({width:c,height:m,x:l,y:d})}function ct(n,e){let t=Ve(n).scrollLeft;return e?e.left+t:ye(z(n)).left+t}function yo(n,e){let t=n.getBoundingClientRect(),o=t.left+e.scrollLeft-ct(n,t),i=t.top+e.scrollTop;return {x:o,y:i}}function kn(n){let{elements:e,rect:t,offsetParent:o,strategy:i}=n,r=i==="fixed",s=z(o),a=e?Ke(e.floating):false;if(o===s||a&&r)return t;let l={scrollLeft:0,scrollTop:0},d=H(1),c=H(0),m=W(o);if((m||!m&&!r)&&((ge(o)!=="body"||Re(s))&&(l=Ve(o)),m)){let u=ye(o);d=Te(o),c.x=u.x+o.clientLeft,c.y=u.y+o.clientTop;}let p=s&&!m&&!r?yo(s,l):H(0);return {width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+c.x+p.x,y:t.y*d.y-l.scrollTop*d.y+c.y+p.y}}function En(n){return Array.from(n.getClientRects())}function In(n){let e=z(n),t=Ve(n),o=n.ownerDocument.body,i=Q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=Q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+ct(n),a=-t.scrollTop;return B(o).direction==="rtl"&&(s+=Q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}var mo=25;function Rn(n,e){let t=M(n),o=z(n),i=t.visualViewport,r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;let c=lt();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop);}let d=ct(o);if(d<=0){let c=o.ownerDocument,m=c.body,p=getComputedStyle(m),u=c.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(o.clientWidth-m.clientWidth-u);f<=mo&&(r-=f);}else d<=mo&&(r+=d);return {width:r,height:s,x:a,y:l}}function Tn(n,e){let t=ye(n,true,e==="fixed"),o=t.top+n.clientTop,i=t.left+n.clientLeft,r=W(n)?Te(n):H(1),s=n.clientWidth*r.x,a=n.clientHeight*r.y,l=i*r.x,d=o*r.y;return {width:s,height:a,x:l,y:d}}function fo(n,e,t){let o;if(e==="viewport")o=Rn(n,t);else if(e==="document")o=In(z(n));else if($(e))o=Tn(e,t);else {let i=vo(n);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height};}return fe(o)}function bo(n,e){let t=J(n);return t===e||!$(t)||ve(t)?false:B(t).position==="fixed"||bo(t,e)}function An(n,e){let t=e.get(n);if(t)return t;let o=Ie(n,[],false).filter(a=>$(a)&&ge(a)!=="body"),i=null,r=B(n).position==="fixed",s=r?J(n):n;for(;$(s)&&!ve(s);){let a=B(s),l=at(s);!l&&a.position==="fixed"&&(i=null),(r?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Re(s)&&!l&&bo(n,s))?o=o.filter(c=>c!==s):i=a,s=J(s);}return e.set(n,o),o}function Ln(n){let{element:e,boundary:t,rootBoundary:o,strategy:i}=n,s=[...t==="clippingAncestors"?Ke(e)?[]:An(e,this._c):[].concat(t),o],a=fo(e,s[0],i),l=a.top,d=a.right,c=a.bottom,m=a.left;for(let p=1;p<s.length;p++){let u=fo(e,s[p],i);l=Q(u.top,l),d=ne(u.right,d),c=ne(u.bottom,c),m=Q(u.left,m);}return {width:d-m,height:c-l,x:m,y:l}}function Pn(n){let{width:e,height:t}=go(n);return {width:e,height:t}}function Mn(n,e,t){let o=W(e),i=z(e),r=t==="fixed",s=ye(n,true,r,e),a={scrollLeft:0,scrollTop:0},l=H(0);function d(){l.x=ct(i);}if(o||!o&&!r)if((ge(e)!=="body"||Re(i))&&(a=Ve(e)),o){let u=ye(e,true,r,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop;}else i&&d();r&&!o&&i&&d();let c=i&&!o&&!r?yo(i,a):H(0),m=s.left+a.scrollLeft-l.x-c.x,p=s.top+a.scrollTop-l.y-c.y;return {x:m,y:p,width:s.width,height:s.height}}function Ct(n){return B(n).position==="static"}function ho(n,e){if(!W(n)||B(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return z(n)===t&&(t=t.ownerDocument.body),t}function wo(n,e){let t=M(n);if(Ke(n))return t;if(!W(n)){let i=J(n);for(;i&&!ve(i);){if($(i)&&!Ct(i))return i;i=J(i);}return t}let o=ho(n,e);for(;o&&co(o)&&Ct(o);)o=ho(o,e);return o&&ve(o)&&Ct(o)&&!at(o)?t:o||uo(n)||t}var Nn=async function(n){let e=this.getOffsetParent||wo,t=this.getDimensions,o=await t(n.floating);return {reference:Mn(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function _n(n){return B(n).direction==="rtl"}var Gn={convertOffsetParentRelativeRectToViewportRelativeRect:kn,getDocumentElement:z,getClippingRect:Ln,getOffsetParent:wo,getElementRects:Nn,getClientRects:En,getDimensions:Pn,getScale:Te,isElement:$,isRTL:_n};function xo(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function $n(n,e){let t=null,o,i=z(n);function r(){var a;clearTimeout(o),(a=t)==null||a.disconnect(),t=null;}function s(a,l){a===void 0&&(a=false),l===void 0&&(l=1),r();let d=n.getBoundingClientRect(),{left:c,top:m,width:p,height:u}=d;if(a||e(),!p||!u)return;let f=je(m),h=je(i.clientWidth-(c+p)),g=je(i.clientHeight-(m+u)),y=je(c),b={rootMargin:-f+"px "+-h+"px "+-g+"px "+-y+"px",threshold:Q(0,ne(1,l))||1},w=true;function x(C){let S=C[0].intersectionRatio;if(S!==l){if(!w)return s();S?s(false,S):o=setTimeout(()=>{s(false,1e-7);},1e3);}S===1&&!xo(d,n.getBoundingClientRect())&&s(),w=false;}try{t=new IntersectionObserver(x,{...b,root:i.ownerDocument});}catch{t=new IntersectionObserver(x,b);}t.observe(n);}return s(true),r}function Co(n,e,t,o){o===void 0&&(o={});let{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=false}=o,d=St(n),c=i||r?[...d?Ie(d):[],...e?Ie(e):[]]:[];c.forEach(y=>{i&&y.addEventListener("scroll",t,{passive:true}),r&&y.addEventListener("resize",t);});let m=d&&a?$n(d,t):null,p=-1,u=null;s&&(u=new ResizeObserver(y=>{let[v]=y;v&&v.target===d&&u&&e&&(u.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=u)==null||b.observe(e);})),t();}),d&&!l&&u.observe(d),e&&u.observe(e));let f,h=l?ye(n):null;l&&g();function g(){let y=ye(n);h&&!xo(h,y)&&t(),h=y,f=requestAnimationFrame(g);}return t(),()=>{var y;c.forEach(v=>{i&&v.removeEventListener("scroll",t),r&&v.removeEventListener("resize",t);}),m?.(),(y=u)==null||y.disconnect(),u=null,l&&cancelAnimationFrame(f);}}var U=ro;var q=so,j=io;var re=no;var K=(n,e,t)=>{let o=new Map,i={platform:Gn,...t},r={...i.platform,_c:o};return oo(n,e,{...i,platform:r})};var Bn={P:"p",BR:"br",STRONG:"strong",B:"strong",EM:"em",I:"em",U:"u",S:"s",UL:"ul",OL:"ol",LI:"li",A:"a"},On=new Set(["SCRIPT","STYLE","TEMPLATE","IFRAME","OBJECT","EMBED","NOSCRIPT","TITLE","TEXTAREA","SELECT","SVG","MATH"]),So=16*1024,Dn=20,Fn=1e3;function Ae(n,e){let t=e.createDocumentFragment();if(typeof n!="string"||n.length===0)return t;let o;try{o=new DOMParser().parseFromString(n.length>So?n.slice(0,So):n,"text/html");}catch{return t.appendChild(e.createTextNode(n)),t}let i={nodes:0,exceeded:false};for(let r of Array.from(o.body.childNodes)){let s=Ye(r,e,0,i);s&&t.appendChild(s);}if(i.exceeded){let r=e.createDocumentFragment();return r.appendChild(e.createTextNode(o.body.textContent??"")),r}return t}function Ye(n,e,t,o){if(o.exceeded)return null;if(++o.nodes>Fn||t>Dn)return o.exceeded=true,null;if(n.nodeType===Node.TEXT_NODE)return e.createTextNode(n.textContent??"");if(n.nodeType!==Node.ELEMENT_NODE)return null;let i=n;if(On.has(i.tagName))return null;let r=Bn[i.tagName];if(!r){let a=e.createDocumentFragment();for(let l of Array.from(i.childNodes)){let d=Ye(l,e,t+1,o);d&&a.appendChild(d);}return a}if(r==="a"){let a=i.getAttribute("href")??"";if(!A(a)){let d=e.createDocumentFragment();for(let c of Array.from(i.childNodes)){let m=Ye(c,e,t+1,o);m&&d.appendChild(m);}return d}let l=e.createElement("a");l.setAttribute("href",a),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer nofollow");for(let d of Array.from(i.childNodes)){let c=Ye(d,e,t+1,o);c&&l.appendChild(c);}return l}let s=e.createElement(r);for(let a of Array.from(i.childNodes)){let l=Ye(a,e,t+1,o);l&&s.appendChild(l);}return s}function Hn(n,e){let t;try{t=new URL(e);}catch{return null}if(t.protocol!=="https:"&&t.protocol!=="http:")return null;let o=t.hostname.replace(/^www\./,"").replace(/^m\./,""),i=(r,s)=>s.match(r)?.[1]??null;switch(n){case "youtube":{let r=null;return o==="youtube.com"||o==="youtube-nocookie.com"?r=t.searchParams.get("v")??i(/^\/(?:embed|shorts|live)\/([A-Za-z0-9_-]{6,})/,t.pathname):o==="youtu.be"&&(r=i(/^\/([A-Za-z0-9_-]{6,})/,t.pathname)),!r||!/^[A-Za-z0-9_-]{6,}$/.test(r)?null:`https://www.youtube-nocookie.com/embed/${r}`}case "vimeo":{if(o!=="vimeo.com"&&o!=="player.vimeo.com")return null;let r=i(/(\d{6,})/,t.pathname);return r?`https://player.vimeo.com/video/${r}`:null}case "loom":{if(o!=="loom.com")return null;let r=i(/^\/(?:share|embed)\/([A-Za-z0-9]{16,})/,t.pathname);return r?`https://www.loom.com/embed/${r}`:null}case "wistia":{if(!Le(o,"wistia.com")&&!Le(o,"wistia.net"))return null;let r=i(/\/(?:medias|embed\/iframe)\/([A-Za-z0-9]{6,})/,t.pathname);return r?`https://fast.wistia.net/embed/iframe/${r}`:null}case "msstream":{if(!Le(o,"microsoftstream.com"))return null;let r=i(/\/(?:embed\/)?video\/([0-9a-f-]{36})/i,t.pathname);return r?`https://web.microsoftstream.com/embed/video/${r}?autoplay=false&showinfo=true`:null}case "vidyard":{if(!Le(o,"vidyard.com"))return null;let r=i(/\/watch\/([A-Za-z0-9_-]{8,})/,t.pathname)??(o==="play.vidyard.com"?i(/^\/([A-Za-z0-9_-]{8,})/,t.pathname):null);return r?`https://play.vidyard.com/${r}`:null}case "sharepoint":return t.protocol==="https:"&&Le(o,"sharepoint.com")?t.href:null;case "brightcove":return t.protocol==="https:"&&o==="players.brightcove.net"&&t.searchParams.get("videoId")?t.href:null;case "kaltura":return t.protocol==="https:"&&Le(o,"kaltura.com")&&t.pathname.startsWith("/p/")?t.href:null;default:return null}}function Le(n,e){return n===e||n.endsWith(`.${e}`)}function zn(n){try{let e=new URL(n);return e.protocol!=="https:"&&e.protocol!=="http:"?null:/\.(mp4|webm|mov)$/i.test(e.pathname)?e.href:null}catch{return null}}function ko(n,e,t={}){let o=n.provider==="file",i=typeof n.url=="string"?o?zn(n.url):Hn(n.provider,n.url):null;if(!i)return null;let r=n.style??{},s=e.createElement("div");s.className="veo-guide-video";let a=r.aspect==="4:3"?"4 / 3":"16 / 9";if(s.style.aspectRatio=a,r.widthMode==="fill")s.style.width="100%";else {let c=typeof r.width=="number"&&Number.isFinite(r.width)?r.width:400;s.style.width=`${Math.max(120,Math.min(1600,c))}px`,s.style.maxWidth="100%";}let l=r.align==="center"?"center":r.align==="right"?"flex-end":"flex-start";if(s.style.alignSelf=l,o){let c=e.createElement("video");return c.src=i,c.controls=true,c.setAttribute("playsinline",""),c.preload="metadata",c.setAttribute("aria-label",typeof n.alt=="string"&&n.alt.trim()?n.alt.trim():"Video"),t.editing&&(c.style.pointerEvents="none"),s.appendChild(c),s}let d=e.createElement("iframe");return d.src=i,d.title=typeof n.alt=="string"&&n.alt.trim()?n.alt.trim():"Video",d.setAttribute("loading","lazy"),d.setAttribute("referrerpolicy","strict-origin-when-cross-origin"),d.setAttribute("allow",`accelerometer; autoplay; clipboard-write; encrypted-media; picture-in-picture${t.editing?"":"; fullscreen"}`),t.editing||d.setAttribute("allowfullscreen",""),t.editing&&(d.style.pointerEvents="none"),s.appendChild(d),s}function N(n,e,t){let o=e.createElement("div");o.className="veo-guide-content";let i=Ro(n);return i?Un(o,i,e,t):Wn(o,n,e,t),o.appendChild(be(e,()=>t.onDismiss())),o}function Io(n,e){let t=Ro(n);if(t){let i=[];for(let{block:r,idx:s}of t){if(r.type==="button")continue;let a=ut(r,e);a&&(a.dataset.veoIdx=String(s),i.push(a));}return i}let o=[];if(typeof n.imageUrl=="string"&&n.imageUrl&&A(n.imageUrl)){let i=e.createElement("img");i.className="veo-guide-image",i.src=n.imageUrl,i.alt=typeof n.title=="string"?n.title:"",o.push(i);}if(typeof n.title=="string"&&n.title){let i=e.createElement("h2");i.className="veo-guide-title",i.textContent=n.title,o.push(i);}if(typeof n.content=="string"&&n.content){let i=e.createElement("p");i.className="veo-guide-text",i.textContent=n.content,o.push(i);}return o}function Wn(n,e,t,o){if(typeof e.imageUrl=="string"&&e.imageUrl&&A(e.imageUrl)){let r=t.createElement("img");r.className="veo-guide-image",r.src=e.imageUrl,r.alt=typeof e.title=="string"?e.title:"",n.appendChild(r);}if(typeof e.title=="string"&&e.title){let r=t.createElement("h2");r.className="veo-guide-title",r.textContent=e.title,n.appendChild(r);}if(typeof e.content=="string"&&e.content){let r=t.createElement("p");r.className="veo-guide-text",r.textContent=e.content,n.appendChild(r);}let i=t.createElement("div");if(i.className="veo-guide-actions",typeof e.ctaText=="string"&&e.ctaText){let r=t.createElement("button");r.type="button",r.className="veo-guide-cta",r.textContent=e.ctaText,r.addEventListener("click",()=>{let s=e.ctaAction??"dismiss",a=Vn(e);o.onCtaClick(s,a);}),i.appendChild(r);}n.appendChild(i);}function Ro(n){if(!Array.isArray(n.blocks)||n.blocks.length===0)return null;let e=n.blocks.map((t,o)=>({block:t,idx:o})).filter(t=>{let o=t.block;return !o||typeof o!="object"?false:o.type==="image"?typeof o.url=="string"&&A(o.url):o.type==="title"||o.type==="text"||o.type==="button"});return e.length>0?e:null}function Un(n,e,t,o){let i=0;for(;i<e.length;){let r=e[i];if(r?.block.type==="button"){let a=t.createElement("div");a.className="veo-guide-actions",a.dataset.veoIdx=String(r.idx);let l;for(;i<e.length&&e[i]?.block.type==="button";){let d=e[i].block;if(!l){let c=d.style?.align;(c==="left"||c==="center"||c==="right")&&(l=c);}a.appendChild(Kn(d,t,o)),i++;}l&&(a.style.justifyContent=kt[l]),n.appendChild(a);continue}let s=r?ut(r.block,t):null;s&&r&&(s.dataset.veoIdx=String(r.idx),n.appendChild(s)),i++;}}function ut(n,e,t={}){switch(n.type){case "video":return ko(n,e,t);case "divider":return jn(n,e);case "title":{let o=e.createElement("h2");return o.className="veo-guide-title",o.textContent=typeof n.text=="string"?n.text:"",se(o,n.style,"text"),o}case "text":{let o=e.createElement("div");return o.className="veo-guide-text",typeof n.html=="string"&&n.html?o.appendChild(Ae(n.html,e)):o.textContent=typeof n.text=="string"?n.text:"",se(o,n.style,"text"),o}case "image":{if(typeof n.url!="string"||!A(n.url))return null;let o=e.createElement("img");return o.className="veo-guide-image",o.src=n.url,o.alt=typeof n.alt=="string"?n.alt:"",se(o,n.style,"image"),o}default:return null}}var qn=new Set(["solid","dotted","dashed"]);function jn(n,e){let t=n.style??{},o=e.createElement("div");o.className="veo-guide-divider",o.setAttribute("role","separator");let i=e.createElement("hr"),r=t.preset==="custom",s=r&&typeof t.color=="string"&&t.color?t.color:t.colorMode==="dark"?"rgba(255, 255, 255, 0.35)":"#e5e7eb",a=r&&typeof t.thickness=="number"&&Number.isFinite(t.thickness)?I(Math.round(t.thickness),1,12):1,l=typeof t.lineStyle=="string"&&qn.has(t.lineStyle)?t.lineStyle:"solid";i.style.borderTop=`${a}px ${l} ${s}`,o.appendChild(i);for(let[d,c]of [["marginTop","marginTop"],["marginRight","marginRight"],["marginBottom","marginBottom"],["marginLeft","marginLeft"]]){let m=t[d];typeof m=="number"&&Number.isFinite(m)&&(o.style[c]=`${I(m,0,64)}px`);}return o}function Kn(n,e,t){let o=e.createElement("button");return o.type="button",o.className="veo-guide-cta",o.textContent=typeof n.text=="string"&&n.text?n.text:"OK",se(o,n.style,"button"),o.addEventListener("click",()=>{let i=n.action??"dismiss",r=i==="next"||i==="url"||i==="guide"?i:"dismiss",s=r==="url"&&typeof n.url=="string"&&A(n.url)?n.url:r==="guide"&&typeof n.targetGuideId=="string"&&n.targetGuideId?n.targetGuideId:void 0,a={...typeof n.id=="string"&&n.id?{buttonId:n.id}:{},...typeof n.text=="string"&&n.text?{buttonText:n.text}:{}};t.onCtaClick(r,s,Object.keys(a).length?a:void 0);}),o}var kt={left:"flex-start",center:"center",right:"flex-end"};function I(n,e,t){return Math.min(t,Math.max(e,n))}var Eo={title:{size:18,weight:600,lineHeight:1.3},subtitle:{size:16,weight:600,lineHeight:1.35},paragraph:{size:14,weight:400,lineHeight:1.5},small:{size:12,weight:400,lineHeight:1.5}};function se(n,e,t){if(!e||typeof e!="object")return;let o=e;if(t==="image"&&o.bleed===true){n.classList.add("veo-guide-image--bleed");return}let i=typeof o.align=="string"?o.align:null;if(i&&(i==="left"||i==="center"||i==="right")&&(t==="text"?(n.style.textAlign=i,n.style.alignSelf=kt[i]):t==="image"&&(n.style.alignSelf=kt[i])),t==="text"&&typeof o.preset=="string"&&o.preset in Eo){let r=Eo[o.preset];r&&(n.style.fontSize=`${r.size}px`,n.style.fontWeight=String(r.weight),n.style.lineHeight=String(r.lineHeight));}if(t!=="image"&&o.colorMode==="dark"&&(n.style.background="#1f1d1b",n.style.color="#f5f0eb",n.style.borderRadius=n.style.borderRadius||"8px"),t!=="image"&&typeof o.color=="string"&&(n.style.color=o.color),t==="text"&&typeof o.fontSize=="number"&&Number.isFinite(o.fontSize)&&(n.style.fontSize=`${I(o.fontSize,8,72)}px`),t==="image"&&o.naturalSize===true?(n.style.width="auto",n.style.maxWidth="100%",n.style.maxHeight="none",n.style.objectFit="contain"):t==="image"&&typeof o.width=="number"&&Number.isFinite(o.width)&&(n.style.width=`${I(o.width,10,100)}%`),t==="image"&&typeof o.radius=="number"&&Number.isFinite(o.radius)&&(n.style.borderRadius=`${I(o.radius,0,48)}px`),typeof o.marginTop=="number"&&Number.isFinite(o.marginTop)&&(n.style.marginTop=`${I(o.marginTop,0,64)}px`),typeof o.marginBottom=="number"&&Number.isFinite(o.marginBottom)&&(n.style.marginBottom=`${I(o.marginBottom,0,64)}px`),t!=="image"&&(typeof o.fontSize=="number"&&Number.isFinite(o.fontSize)&&(n.style.fontSize=`${I(o.fontSize,8,96)}px`),typeof o.fontFamily=="string"&&o.fontFamily&&o.fontFamily!=="inherit"&&(n.style.fontFamily=o.fontFamily),typeof o.fontWeight=="string"&&o.fontWeight&&(n.style.fontWeight=o.fontWeight),typeof o.textTransform=="string"&&o.textTransform&&o.textTransform!=="none"&&(n.style.textTransform=o.textTransform),typeof o.lineHeight=="number"&&Number.isFinite(o.lineHeight)&&(n.style.lineHeight=`${I(o.lineHeight,50,300)}%`),typeof o.letterSpacing=="number"&&Number.isFinite(o.letterSpacing)&&(n.style.letterSpacing=`${I(o.letterSpacing,-5,20)}px`)),typeof o.background=="string"&&o.background&&(n.style.background=o.background),typeof o.borderWidth=="number"&&o.borderWidth>0){let r=typeof o.borderColor=="string"&&o.borderColor?o.borderColor:"#bbbbbb";n.style.border=`${I(o.borderWidth,0,20)}px solid ${r}`;}t!=="image"&&typeof o.radius=="number"&&Number.isFinite(o.radius)&&(n.style.borderRadius=`${I(o.radius,0,64)}px`),typeof o.height=="number"&&Number.isFinite(o.height)&&o.height>0&&(n.style.height=`${I(o.height,1,2e3)}px`),t!=="image"&&typeof o.width=="number"&&Number.isFinite(o.width)&&o.width>0&&(n.style.width=`${I(o.width,1,2e3)}px`);for(let r of ["Top","Right","Bottom","Left"]){let s=o[`padding${r}`];typeof s=="number"&&Number.isFinite(s)&&n.style.setProperty(`padding-${r.toLowerCase()}`,`${I(s,0,128)}px`);let a=o[`margin${r}`];typeof a=="number"&&Number.isFinite(a)&&n.style.setProperty(`margin-${r.toLowerCase()}`,`${I(a,0,128)}px`);}}function be(n,e,t="veo-guide-close"){let o=n.createElement("button");return o.type="button",o.className=t,o.setAttribute("aria-label","Cerrar"),o.textContent="\xD7",o.addEventListener("click",e),o}function A(n){if(typeof n!="string"||n.length===0)return false;try{let e=typeof window<"u"?window.location.href:"http://localhost/",t=new URL(n,e);return Ht.includes(t.protocol)}catch{return false}}function Vn(n){let e=n.style?.ctaUrl;if(typeof e=="string")return A(e)?e:void 0}var Yn={"--veo-bg":"#1f2937","--veo-text":"#f9fafb","--veo-text-secondary":"#d1d5db","--veo-shadow":"0 20px 60px rgba(0, 0, 0, 0.55)"},It={left:"flex-start",center:"center",right:"flex-end"},Xn={left:"flex-start",center:"center",right:"flex-end"},Qn={title:"text",text:"text",image:"self"},To={none:"none",soft:"0 4px 14px rgba(0, 0, 0, 0.10)",medium:"0 8px 30px rgba(0, 0, 0, 0.18)",strong:"0 24px 60px rgba(0, 0, 0, 0.32)"},Ao={center:[.5,.5],top:[.5,0],bottom:[.5,1],left:[0,.5],right:[1,.5],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},V=/^#[0-9a-f]{3,8}$|^(rgb|rgba|hsl|hsla)\([\d.,%/\sdeg]+\)$|^[a-z]{3,20}$/i;function L(n,e,t){return Math.min(t,Math.max(e,n))}function Lo(n,e){if(!e||typeof e!="object")return;let t=e;if(typeof t.accentColor=="string"&&V.test(t.accentColor.trim())&&n.style.setProperty("--veo-primary",t.accentColor.trim()),typeof t.fontFamily=="string"&&t.fontFamily.length<=200&&!/[<>{}]/.test(t.fontFamily)&&n.style.setProperty("--veo-font",t.fontFamily.trim()),t.theme==="dark")for(let[r,s]of Object.entries(Yn))n.style.setProperty(r,s);typeof t.background=="string"&&V.test(t.background.trim())&&n.style.setProperty("--veo-bg",t.background.trim()),typeof t.textColor=="string"&&V.test(t.textColor.trim())&&n.style.setProperty("--veo-text",t.textColor.trim()),typeof t.textSecondaryColor=="string"&&V.test(t.textSecondaryColor.trim())&&n.style.setProperty("--veo-text-secondary",t.textSecondaryColor.trim()),typeof t.radius=="number"&&Number.isFinite(t.radius)&&n.style.setProperty("--veo-radius",`${L(t.radius,0,48)}px`),typeof t.width=="number"&&Number.isFinite(t.width)&&n.style.setProperty("--veo-width",`${L(t.width,220,720)}px`),typeof t.height=="number"&&Number.isFinite(t.height)&&n.style.setProperty("--veo-min-h",`${L(t.height,120,900)}px`),(t.align==="left"||t.align==="center"||t.align==="right")&&n.style.setProperty("--veo-actions-justify",It[t.align]),typeof t.padding=="number"&&Number.isFinite(t.padding)&&n.style.setProperty("--veo-pad",`${L(t.padding,0,64)}px`),typeof t.margin=="number"&&Number.isFinite(t.margin)&&n.style.setProperty("--veo-margin",`${L(t.margin,0,64)}px`),typeof t.borderWidth=="number"&&Number.isFinite(t.borderWidth)&&n.style.setProperty("--veo-border-width",`${L(t.borderWidth,0,16)}px`),typeof t.borderColor=="string"&&V.test(t.borderColor.trim())&&n.style.setProperty("--veo-border-color",t.borderColor.trim()),typeof t.shadow=="string"&&To[t.shadow]&&n.style.setProperty("--veo-shadow",To[t.shadow]);let o,i;if(typeof t.posX=="number"&&typeof t.posY=="number"?(o=L(t.posX,0,1),i=L(t.posY,0,1)):typeof t.overlayPosition=="string"&&Ao[t.overlayPosition]&&([o,i]=Ao[t.overlayPosition]),o!==void 0&&i!==void 0&&(n.style.setProperty("--veo-pos-x",`${o*100}%`),n.style.setProperty("--veo-pos-y",`${i*100}%`)),t.elements&&typeof t.elements=="object"){let r=t.elements;Et(n,"title",r.title),Et(n,"text",r.text),Et(n,"image",r.image),Zn(n,r.cta);}}function Zn(n,e){if(!e||typeof e!="object")return;let t=e;typeof t.align=="string"&&It[t.align]&&n.style.setProperty("--veo-actions-justify",It[t.align]),typeof t.background=="string"&&V.test(t.background.trim())&&n.style.setProperty("--veo-cta-bg",t.background.trim()),typeof t.color=="string"&&V.test(t.color.trim())&&n.style.setProperty("--veo-cta-color",t.color.trim()),typeof t.fontSize=="number"&&Number.isFinite(t.fontSize)&&n.style.setProperty("--veo-cta-size",`${L(t.fontSize,10,24)}px`),typeof t.radius=="number"&&Number.isFinite(t.radius)&&n.style.setProperty("--veo-cta-radius",`${L(t.radius,0,48)}px`);}function Et(n,e,t){if(!t||typeof t!="object")return;let o=t;if(typeof o.align=="string"&&(o.align==="left"||o.align==="center"||o.align==="right")){let r=(Qn[e]??"text")==="self"?Xn[o.align]:o.align;n.style.setProperty(`--veo-${e}-align`,r);}typeof o.color=="string"&&V.test(o.color.trim())&&n.style.setProperty(`--veo-${e}-color`,o.color.trim()),typeof o.fontSize=="number"&&Number.isFinite(o.fontSize)&&n.style.setProperty(`--veo-${e}-size`,`${L(o.fontSize,8,72)}px`),typeof o.width=="number"&&Number.isFinite(o.width)&&n.style.setProperty(`--veo-${e}-width`,`${L(o.width,10,100)}%`),typeof o.radius=="number"&&Number.isFinite(o.radius)&&n.style.setProperty(`--veo-${e}-radius`,`${L(o.radius,0,48)}px`),typeof o.marginTop=="number"&&Number.isFinite(o.marginTop)&&n.style.setProperty(`--veo-${e}-mt`,`${L(o.marginTop,0,64)}px`),typeof o.marginBottom=="number"&&Number.isFinite(o.marginBottom)&&n.style.setProperty(`--veo-${e}-mb`,`${L(o.marginBottom,0,64)}px`);}function Y(n){let e=n?.inlinePosition;return e==="before"||e==="prepend"||e==="append"?e:"after"}function _(n,e,t){switch(t){case "before":n.before(e);break;case "after":n.after(e);break;case "prepend":n.prepend(e);break;case "append":n.append(e);break}}function G(n,e,t){let o=window.setInterval(()=>{if(n.isConnected)return;let i=document.querySelector(e);i&&_(i,n,t);},1e3);return ()=>window.clearInterval(o)}function E(n,e=5e3){return new Promise(t=>{let o=()=>{try{return document.querySelector(n)}catch{return null}},i=o();if(i){t(i);return}let r=false,s=d=>{r||(r=true,a.disconnect(),clearTimeout(l),t(d));},a=new MutationObserver(()=>{let d=o();d&&s(d);});a.observe(document.body,{childList:true,subtree:true});let l=setTimeout(()=>s(null),e);})}var Po=`
|
|
2
2
|
:host {
|
|
3
3
|
--veo-primary: #FF5B35;
|
|
4
4
|
--veo-text: #1f2937;
|
|
@@ -116,7 +116,161 @@ var veoGuides=(function(exports){'use strict';function At(){return typeof window
|
|
|
116
116
|
}
|
|
117
117
|
/* Card gen\xE9rica del modelo unificado. El dise\xF1o (bg/borde/padding/\u2026) lo aplica
|
|
118
118
|
el renderer como estilos inline desde step.design; ac\xE1 van los defaults. */
|
|
119
|
+
/* Edici\xF3n (builder): sin animaci\xF3n de entrada al repintar la preview. */
|
|
120
|
+
:host(.veo-no-anim) * { animation: none !important; }
|
|
121
|
+
|
|
122
|
+
/* Bloque video: caja con relaci\xF3n de aspecto; el iframe la llena. */
|
|
123
|
+
.veo-guide-video { position: relative; overflow: hidden; border-radius: 8px; background: #000; }
|
|
124
|
+
.veo-guide-video iframe, .veo-guide-video video {
|
|
125
|
+
position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* \u2500\u2500 Layout por filas/columnas (composite) \u2500\u2500
|
|
129
|
+
El espacio tiene UNA fuente por capa: el aire con el borde lo da el padding
|
|
130
|
+
de la card; la separaci\xF3n entre filas/bloques la da el margen inferior
|
|
131
|
+
(12px, ah\xED vive la l\xEDnea \xAB+\xBB del editor); los bloques NO llevan padding
|
|
132
|
+
propio (solo el que el autor les ponga inline). El \xFAltimo elemento no deja
|
|
133
|
+
margen colgando. */
|
|
134
|
+
.veo-card > [data-veo-block], .veo-card > .veo-row, .veo-card > .veo-guide-actions,
|
|
135
|
+
.veo-col > [data-veo-block], .veo-col > .veo-guide-actions { margin-bottom: 12px; }
|
|
136
|
+
/* La card y cada columna son columnas flex: cada bloque mide SU contenido (como
|
|
137
|
+
el bot\xF3n) y se ubica con su alineaci\xF3n (align-self); filas, columnas, formularios
|
|
138
|
+
y filas de botones ocupan todo el ancho. */
|
|
139
|
+
.veo-card:not(.veo-card--empty), .veo-col {
|
|
140
|
+
display: flex; flex-direction: column; align-items: flex-start;
|
|
141
|
+
}
|
|
142
|
+
.veo-card > [data-veo-block], .veo-col > [data-veo-block] { max-width: 100%; }
|
|
143
|
+
/* L\xEDnea horizontal: ocupa todo el ancho; el padding del bloque es solo vertical
|
|
144
|
+
(zona clickeable en el editor) y la l\xEDnea es el borde superior del hr. */
|
|
145
|
+
.veo-card > .veo-guide-divider, .veo-col > .veo-guide-divider { padding: 6px 0; align-self: stretch; }
|
|
146
|
+
.veo-guide-divider { box-sizing: border-box; }
|
|
147
|
+
/* Bloque de c\xF3digo (modo host): ocupa todo el ancho, como un formulario. */
|
|
148
|
+
.veo-code-host { display: block; min-width: 0; }
|
|
149
|
+
.veo-card > .veo-code-host, .veo-col > .veo-code-host { align-self: stretch; }
|
|
150
|
+
.veo-guide-divider hr { margin: 0; border: 0; height: 0; }
|
|
151
|
+
.veo-card > .veo-row, .veo-card > .veo-guide-actions, .veo-card > .veo-form,
|
|
152
|
+
.veo-col > .veo-guide-actions, .veo-col > .veo-form { align-self: stretch; }
|
|
153
|
+
.veo-row { display: flex; gap: 12px; align-items: flex-start; box-sizing: border-box; }
|
|
154
|
+
.veo-col { flex: 1 1 0; min-width: 0; }
|
|
155
|
+
.veo-col > :last-child { margin-bottom: 0; }
|
|
156
|
+
/* Fila con alineaci\xF3n horizontal (editor de fila): las columnas miden su contenido. */
|
|
157
|
+
.veo-row--aligned > .veo-col { flex: 0 1 auto; }
|
|
158
|
+
|
|
159
|
+
/* \u2500\u2500 Editor in-app: bloque seleccionado + barra de acciones + placeholders \u2500\u2500 */
|
|
160
|
+
.veo-block-placeholder {
|
|
161
|
+
border: 1px dashed #b0a9a5; border-radius: 6px; padding: 12px; margin-bottom: 12px;
|
|
162
|
+
color: #8a8582; font-size: 13px; text-align: center;
|
|
163
|
+
}
|
|
164
|
+
/* El bloque seleccionado no lleva contorno propio: lo rodea .veo-block-frame
|
|
165
|
+
(marco aparte, con aire y alto m\xEDnimo, que no altera el layout). */
|
|
166
|
+
.veo-block--selected { position: relative; z-index: 1; }
|
|
167
|
+
.veo-block-frame {
|
|
168
|
+
position: absolute; z-index: 4; pointer-events: none; box-sizing: border-box;
|
|
169
|
+
border: 2px solid #3b82f6; border-radius: 10px; background: rgba(59, 130, 246, 0.04);
|
|
170
|
+
}
|
|
171
|
+
/* Barra del bloque (mock): p\xEDldora blanca con sombra, solo \xEDconos; la papelera
|
|
172
|
+
en rojo, separada por una l\xEDnea. */
|
|
173
|
+
.veo-block-toolbar {
|
|
174
|
+
position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px;
|
|
175
|
+
background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px;
|
|
176
|
+
box-shadow: 0 6px 20px rgba(0,0,0,0.16);
|
|
177
|
+
}
|
|
178
|
+
.veo-block-toolbar button {
|
|
179
|
+
border: 0; background: transparent; color: #4b4642; cursor: pointer; padding: 6px; border-radius: 8px;
|
|
180
|
+
display: inline-flex; align-items: center; justify-content: center; line-height: 1;
|
|
181
|
+
}
|
|
182
|
+
.veo-block-toolbar button:hover { background: #f5efeb; }
|
|
183
|
+
.veo-block-toolbar button svg { width: 20px; height: 20px; }
|
|
184
|
+
.veo-block-toolbar .veo-block-toolbar-remove { color: #e5484d; }
|
|
185
|
+
/* Separadores: antes de la papelera y antes de las flechas de mover. */
|
|
186
|
+
.veo-block-toolbar .veo-block-toolbar-remove, .veo-block-toolbar .veo-block-toolbar-move-left {
|
|
187
|
+
margin-left: 6px; position: relative;
|
|
188
|
+
}
|
|
189
|
+
.veo-block-toolbar .veo-block-toolbar-remove::before, .veo-block-toolbar .veo-block-toolbar-move-left::before {
|
|
190
|
+
content: ""; position: absolute; left: -4px; top: 6px; bottom: 6px; width: 1px; background: #e7e2de;
|
|
191
|
+
}
|
|
192
|
+
.veo-block-toolbar button:disabled { opacity: 0.3; cursor: default; background: transparent; }
|
|
193
|
+
/* Contenedor (hover): contorno azul de la tarjeta y dos pesta\xF1as centradas
|
|
194
|
+
sobre su borde superior: \xABEditar contenedor\xBB (outline) y \xABEditar filas\xBB. */
|
|
195
|
+
.veo-card-frame {
|
|
196
|
+
position: absolute; z-index: 3; inset: 0; pointer-events: none; box-sizing: border-box;
|
|
197
|
+
border: 2px solid #3b82f6; border-radius: inherit;
|
|
198
|
+
}
|
|
199
|
+
.veo-card-toolbar {
|
|
200
|
+
position: absolute; z-index: 6; left: 50%; transform: translateX(-50%);
|
|
201
|
+
display: inline-flex; align-items: flex-end; gap: 8px; white-space: nowrap;
|
|
202
|
+
}
|
|
203
|
+
.veo-card-toolbar button {
|
|
204
|
+
cursor: pointer; padding: 8px 14px; border-radius: 8px; border: 2px solid #3b82f6;
|
|
205
|
+
font: 600 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
206
|
+
background: #fff; color: #3b82f6;
|
|
207
|
+
}
|
|
208
|
+
.veo-card-toolbar button:hover { background: #eff6ff; }
|
|
209
|
+
/* Con fondo = la vista que el panel muestra ahora (contenedor o estructura). */
|
|
210
|
+
.veo-card-toolbar button.is-active { background: #3b82f6; color: #fff; }
|
|
211
|
+
.veo-card-toolbar button.is-active:hover { background: #2563eb; border-color: #2563eb; }
|
|
212
|
+
/* Editor de fila: marco al pasar el mouse por una fila (o la fila del bloque
|
|
213
|
+
seleccionado) y barra \xABEditar fila \xB7 duplicar\xBB bajo su esquina derecha. */
|
|
214
|
+
.veo-row-frame {
|
|
215
|
+
position: absolute; z-index: 3; pointer-events: none; box-sizing: border-box;
|
|
216
|
+
border: 2px solid #3b82f6; border-radius: 10px;
|
|
217
|
+
}
|
|
218
|
+
.veo-row-toolbar {
|
|
219
|
+
position: absolute; z-index: 5; display: inline-flex; align-items: center; gap: 2px; padding: 4px 6px;
|
|
220
|
+
background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 12px;
|
|
221
|
+
box-shadow: 0 6px 20px rgba(0,0,0,0.16); white-space: nowrap;
|
|
222
|
+
}
|
|
223
|
+
.veo-row-toolbar button {
|
|
224
|
+
border: 0; background: transparent; color: #4b4642; cursor: pointer; padding: 6px 8px; border-radius: 8px;
|
|
225
|
+
display: inline-flex; align-items: center; gap: 8px; line-height: 1;
|
|
226
|
+
font: 500 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
227
|
+
}
|
|
228
|
+
.veo-row-toolbar button:hover { background: #f5efeb; }
|
|
229
|
+
.veo-row-toolbar button svg { width: 20px; height: 20px; }
|
|
230
|
+
.veo-row-toolbar .veo-row-toolbar-duplicate { margin-left: 6px; position: relative; }
|
|
231
|
+
.veo-row-toolbar .veo-row-toolbar-duplicate::before {
|
|
232
|
+
content: ""; position: absolute; left: -4px; top: 6px; bottom: 6px; width: 1px; background: #e7e2de;
|
|
233
|
+
}
|
|
234
|
+
.veo-row-toolbar .veo-row-toolbar-remove { color: #e5484d; }
|
|
235
|
+
/* Huecos \xAB+\xBB (mock): zona invisible entre elementos; al pasar el mouse aparece
|
|
236
|
+
la l\xEDnea azul (horizontal = fila / bloque apilado, vertical = columna) con
|
|
237
|
+
un \xAB+\xBB circular al centro. */
|
|
238
|
+
.veo-gap { position: absolute; z-index: 4; }
|
|
239
|
+
.veo-gap i { position: absolute; background: #3b82f6; opacity: 0; transition: opacity 100ms; pointer-events: none; }
|
|
240
|
+
.veo-gap--h i { left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; }
|
|
241
|
+
.veo-gap--v i { top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; }
|
|
242
|
+
.veo-gap button {
|
|
243
|
+
position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -11px; box-sizing: border-box;
|
|
244
|
+
opacity: 0; transition: opacity 100ms; width: 22px; height: 22px; border-radius: 50%; padding: 0;
|
|
245
|
+
border: 2px solid #fff; background: #3b82f6; color: #fff; cursor: pointer;
|
|
246
|
+
font: 600 15px/18px system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center;
|
|
247
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.25);
|
|
248
|
+
}
|
|
249
|
+
.veo-gap:hover i, .veo-gap:hover button, .veo-gap:focus-within button { opacity: 1; }
|
|
250
|
+
.veo-gap button:hover { background: #2563eb; }
|
|
251
|
+
|
|
252
|
+
/* Tarjeta sin bloques (paso reci\xE9n creado). La tarjeta NO impone tama\xF1o ni
|
|
253
|
+
padding propios (as\xED el ancho/padding del dise\xF1o se ven tal cual); el tama\xF1o
|
|
254
|
+
m\xEDnimo lo pone la zona punteada azul de la preview. */
|
|
255
|
+
.veo-card--empty { display: flex; align-items: stretch; }
|
|
256
|
+
.veo-card-empty-zone {
|
|
257
|
+
flex: 1; min-width: 0; min-height: 160px; margin-top: 14px;
|
|
258
|
+
display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
|
|
259
|
+
border: 2px dashed #3b82f6; border-radius: 8px; background: #eff6ff;
|
|
260
|
+
color: #2563eb; font-size: 16px; font-weight: 500; user-select: none; pointer-events: none;
|
|
261
|
+
padding: 0 12px; box-sizing: border-box; overflow: hidden;
|
|
262
|
+
}
|
|
263
|
+
.veo-card-empty-zone b { font-weight: 600; font-size: 22px; line-height: 1; }
|
|
264
|
+
/* Sin ancho configurado, la zona da un tama\xF1o c\xF3modo por defecto. */
|
|
265
|
+
.veo-card--empty:not([style*="width"]) .veo-card-empty-zone { min-width: 360px; }
|
|
266
|
+
/* Tarjeta angosta (la mide el renderer): solo el \xAB+\xBB, sin texto, y m\xE1s baja. */
|
|
267
|
+
.veo-card--narrow .veo-card-empty-zone span { display: none; }
|
|
268
|
+
.veo-card--narrow .veo-card-empty-zone { min-height: 120px; }
|
|
119
269
|
.veo-card {
|
|
270
|
+
/* Contenedor posicionado SIEMPRE: el \u2715 (absolute) se ubica respecto a la
|
|
271
|
+
tarjeta tambi\xE9n en pasos embebidos (inline), no respecto a la app. Los
|
|
272
|
+
flotantes lo pisan con position:fixed inline. */
|
|
273
|
+
position: relative;
|
|
120
274
|
pointer-events: auto;
|
|
121
275
|
background: var(--veo-bg, #ffffff);
|
|
122
276
|
color: var(--veo-text, #1f2937);
|
|
@@ -209,6 +363,13 @@ var veoGuides=(function(exports){'use strict';function At(){return typeof window
|
|
|
209
363
|
transition: opacity 120ms ease;
|
|
210
364
|
}
|
|
211
365
|
.veo-guide-cta:hover { opacity: 0.9; }
|
|
366
|
+
/* Presets del boton (editor): secundario = contorno; enlace = solo texto. */
|
|
367
|
+
.veo-guide-cta--secondary {
|
|
368
|
+
background: transparent; color: var(--veo-primary);
|
|
369
|
+
border: 1px solid var(--veo-primary);
|
|
370
|
+
}
|
|
371
|
+
.veo-guide-cta--link { background: transparent; color: var(--veo-primary); padding: 0; }
|
|
372
|
+
.veo-guide-cta--link:hover { opacity: 1; text-decoration: underline; }
|
|
212
373
|
.veo-guide-cta:active { transform: translateY(1px); }
|
|
213
374
|
.veo-guide-close {
|
|
214
375
|
position: absolute; top: -6px; right: -6px;
|
|
@@ -239,6 +400,10 @@ var veoGuides=(function(exports){'use strict';function At(){return typeof window
|
|
|
239
400
|
|
|
240
401
|
.veo-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
|
|
241
402
|
.veo-form-field { display: flex; flex-direction: column; gap: 6px; }
|
|
403
|
+
/* Pregunta de la encuesta (rich text del bloque form). */
|
|
404
|
+
.veo-form-question { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--veo-text); }
|
|
405
|
+
.veo-form-question p { margin: 0; }
|
|
406
|
+
.veo-form > .veo-guide-actions { margin: 0; }
|
|
242
407
|
.veo-form-label { font-size: 13px; font-weight: 500; color: var(--veo-text); }
|
|
243
408
|
.veo-form-input {
|
|
244
409
|
font-size: 14px; color: var(--veo-text);
|
|
@@ -247,26 +412,71 @@ var veoGuides=(function(exports){'use strict';function At(){return typeof window
|
|
|
247
412
|
padding: 8px 10px; width: 100%;
|
|
248
413
|
}
|
|
249
414
|
.veo-form-input:focus { outline: 2px solid var(--veo-primary); outline-offset: -1px; border-color: transparent; }
|
|
250
|
-
|
|
415
|
+
/* Lista de tareas (mock): \xEDtems con anillo de progreso, texto + subt\xEDtulo,
|
|
416
|
+
y al pie \xABX de N completadas\xBB + porcentaje + barra. */
|
|
417
|
+
.veo-checklist {
|
|
418
|
+
display: flex; flex-direction: column; gap: 22px; align-self: stretch; width: 100%;
|
|
419
|
+
min-width: 360px; box-sizing: border-box;
|
|
420
|
+
}
|
|
421
|
+
.veo-checklist-title { font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--veo-cl-title); }
|
|
422
|
+
.veo-checklist-title p { margin: 0; }
|
|
423
|
+
.veo-checklist-items { display: flex; flex-direction: column; gap: 22px; }
|
|
424
|
+
.veo-checklist-item {
|
|
425
|
+
display: flex; align-items: center; gap: 18px; width: 100%; text-align: left;
|
|
426
|
+
background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit;
|
|
427
|
+
}
|
|
428
|
+
.veo-checklist-item:hover .veo-checklist-label { text-decoration: underline; }
|
|
429
|
+
.veo-checklist-ring { width: 44px; height: 44px; flex: 0 0 auto; }
|
|
430
|
+
.veo-checklist-texts { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
431
|
+
.veo-checklist-label {
|
|
432
|
+
font-size: calc(var(--veo-cl-font-size, 14px) + 4px); font-weight: var(--veo-cl-font-weight, 600);
|
|
433
|
+
line-height: 1.3; color: var(--veo-cl-title);
|
|
434
|
+
}
|
|
435
|
+
.veo-checklist-sub { font-size: calc(var(--veo-cl-font-size, 14px) + 1px); color: var(--veo-cl-subtitle); }
|
|
436
|
+
.veo-checklist-footer { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
|
|
437
|
+
.veo-checklist-summary {
|
|
438
|
+
display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
|
|
439
|
+
font-size: calc(var(--veo-cl-font-size, 14px) + 1px);
|
|
440
|
+
}
|
|
441
|
+
.veo-checklist-count { color: var(--veo-cl-subtitle); }
|
|
442
|
+
.veo-checklist-percent { font-weight: 700; font-size: calc(var(--veo-cl-font-size, 14px) + 3px); color: var(--veo-cl-bar); }
|
|
443
|
+
.veo-checklist-bar { height: var(--veo-cl-bar-h, 8px); background: #e7e2de; border-radius: 999px; overflow: hidden; }
|
|
444
|
+
.veo-checklist--dark .veo-checklist-bar { background: #3c3734; }
|
|
445
|
+
.veo-checklist-bar-fill { height: 100%; background: var(--veo-cl-bar); border-radius: 999px; transition: width 300ms ease; }
|
|
446
|
+
.veo-checklist-empty { margin: 0; font-size: 13px; color: var(--veo-cl-subtitle); }
|
|
447
|
+
/* Opci\xF3n m\xFAltiple (mock): c\xEDrculos/casillas grandes con su texto al lado. */
|
|
448
|
+
.veo-form-options { display: flex; flex-direction: column; gap: 14px; }
|
|
251
449
|
.veo-form-option {
|
|
252
|
-
display: flex; align-items: center; gap:
|
|
253
|
-
font-size:
|
|
254
|
-
}
|
|
255
|
-
.veo-form-option input {
|
|
256
|
-
|
|
450
|
+
display: flex; align-items: center; gap: 14px;
|
|
451
|
+
font-size: 16px; color: var(--veo-text); cursor: pointer;
|
|
452
|
+
}
|
|
453
|
+
.veo-form-option input {
|
|
454
|
+
accent-color: var(--veo-primary); margin: 0; cursor: pointer;
|
|
455
|
+
width: 26px; height: 26px; flex: 0 0 auto;
|
|
456
|
+
}
|
|
457
|
+
/* Escala num\xE9rica (mock): casillas cuadradas; con etiquetas, cada casilla
|
|
458
|
+
lleva la suya debajo (la primera cuelga a la izquierda, la \xFAltima a la derecha). */
|
|
459
|
+
.veo-form-scale { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
|
|
460
|
+
.veo-scale-item { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
|
|
461
|
+
.veo-scale-item--first { align-items: flex-start; }
|
|
462
|
+
.veo-scale-item--last { align-items: flex-end; }
|
|
463
|
+
.veo-scale-label { font-size: 12px; line-height: 1.2; color: #8a8582; white-space: nowrap; }
|
|
257
464
|
.veo-nps-btn {
|
|
258
|
-
min-width:
|
|
259
|
-
font-size:
|
|
260
|
-
background: var(--veo-bg); border: 1px solid #
|
|
465
|
+
min-width: var(--veo-scale-size, 44px); height: var(--veo-scale-size, 44px); padding: 0 6px;
|
|
466
|
+
font-size: 16px; font-weight: 600; color: var(--veo-text);
|
|
467
|
+
background: var(--veo-bg); border: 1px solid #d5cec9; border-radius: 8px;
|
|
261
468
|
cursor: pointer; transition: all 100ms ease;
|
|
262
469
|
}
|
|
263
|
-
.veo-nps-btn:hover { border-color: var(--veo-primary); }
|
|
470
|
+
.veo-nps-btn:hover { border-color: var(--veo-scale-color, var(--veo-primary)); }
|
|
264
471
|
.veo-rating-btn {
|
|
265
472
|
background: none; border: none; padding: 0 2px;
|
|
266
473
|
font-size: 26px; line-height: 1; color: #d1d5db;
|
|
267
474
|
cursor: pointer; transition: color 100ms ease;
|
|
268
475
|
}
|
|
269
|
-
.veo-scale-active.veo-nps-btn {
|
|
476
|
+
.veo-scale-active.veo-nps-btn {
|
|
477
|
+
background: var(--veo-scale-color, var(--veo-primary)); color: #fff;
|
|
478
|
+
border-color: var(--veo-scale-color, var(--veo-primary));
|
|
479
|
+
}
|
|
270
480
|
.veo-scale-active.veo-rating-btn { color: #f59e0b; }
|
|
271
481
|
.veo-form-error { font-size: 13px; color: #dc2626; margin: 0; }
|
|
272
482
|
.veo-form-thanks {
|
|
@@ -422,9 +632,11 @@ var veoGuides=(function(exports){'use strict';function At(){return typeof window
|
|
|
422
632
|
from { transform: translateY(-10px); opacity: 0; }
|
|
423
633
|
to { transform: translateY(0); opacity: 1; }
|
|
424
634
|
}
|
|
425
|
-
`;var S=class{constructor(){this.host=null;this.shadow=null;this.cleanups=[];this.liveContainer=null;this.liveContent=null;this.liveBuild=null;this.liveKey="";}liveKeyOf(e){return ""}onLiveUpdate(e){}updateStep(e){if(!this.host||!this.liveContainer||!this.liveContent||!this.liveBuild||this.liveKeyOf(e)!==this.liveKey)return false;let t=this.liveBuild(e);return this.liveContainer.replaceChild(t,this.liveContent),this.liveContent=t,this.applyDesign(e.style),this.onLiveUpdate(e),true}createHost(){let e=document.createElement("div");e.setAttribute(Gt,"");let t=e.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=Cn,t.appendChild(n);let i=document.createElement("div");return t.appendChild(i),document.body.appendChild(e),this.host=e,this.shadow=t,{host:e,shadow:t,root:i}}applyDesign(e){this.host&&xn(this.host,e);}registerCleanup(e){this.cleanups.push(e);}hostElement(){return this.host}destroy(){for(let e of this.cleanups)try{e();}catch{}this.cleanups=[],this.host?.parentNode&&this.host.parentNode.removeChild(this.host),this.host=null,this.shadow=null;}};var Po={top:"bottom",bottom:"top",left:"right",right:"left"};function ie(o,e,t){let n=Po[e.split("-")[0]??"bottom"]??"top";for(let i of ["top","bottom","left","right"])o.style.setProperty(i,"");t?.x!=null&&o.style.setProperty("left",`${t.x}px`),t?.y!=null&&o.style.setProperty("top",`${t.y}px`),o.style.setProperty(n,"-6px");}var Lo=150,Ie=class extends S{constructor(){super(...arguments);this.tooltip=null;this.arrowEl=null;this.badgeBtn=null;this.open=false;this.shownEmitted=false;this.trigger="hover";this.side="top";this.closeTimer=null;this.stopFloat=null;}async render(t){let n=t.guide.guideSteps[0];if(!n)return;let i=n.selector??t.guide.activationRules.selector;if(typeof i!="string"||i.length===0)return;let r=await k(i);if(!r)return;let{host:s,root:a}=this.createHost(),l=a.ownerDocument??document;this.applyDesign(n.style);let d=n.style?.width;typeof d=="number"&&Number.isFinite(d)&&s.style.setProperty("--veo-badge-tip-width",`${Math.min(720,Math.max(220,d))}px`),this.trigger=n.style?.badgeTrigger==="click"?"click":"hover";let c=n.style?.tooltipPlacement;this.side=c==="bottom"||c==="left"||c==="right"?c:"top";let u=q(n.style);s.style.display="inline-flex",s.style.verticalAlign="middle";let p=En(Sn(n),l);a.appendChild(p),this.badgeBtn=p,M(r,s,u),this.registerCleanup(G(s,i,u));let f=l.createElement("div");f.className="veo-tooltip veo-badge-tooltip",f.style.display="none";let m=(w,x)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:w,...x?{metadata:x}:{}});},h=w=>L(w,l,{onCtaClick:(x,C,E)=>{m("cta_clicked",E),x==="url"&&C&&window.open(C,"_blank","noopener,noreferrer"),this.closeTooltip(),x==="guide"&&C&&t.onOpenGuide?.(C);},onDismiss:()=>this.closeTooltip()}),v=h(n);f.appendChild(v);let y=l.createElement("div");y.className="veo-tooltip-arrow",f.appendChild(y),a.appendChild(f),this.tooltip=f,this.arrowEl=y,this.liveContainer=f,this.liveContent=v,this.liveKey=this.liveKeyOf(n),this.liveBuild=h;let g=()=>{this.cancelClose(),this.open||(this.openTooltip(p),this.shownEmitted||(this.shownEmitted=true,m("shown")));};if(this.trigger==="hover"){let w=()=>{this.cancelClose(),this.closeTimer=window.setTimeout(()=>this.closeTooltip(),Lo);};p.addEventListener("mouseenter",g),p.addEventListener("focus",g),p.addEventListener("mouseleave",w),p.addEventListener("blur",w),f.addEventListener("mouseenter",()=>this.cancelClose()),f.addEventListener("mouseleave",w);}else {p.addEventListener("click",()=>{this.open?this.closeTooltip():g();});let w=x=>{this.open&&(x.composedPath().includes(s)||this.closeTooltip());};document.addEventListener("click",w,true),this.registerCleanup(()=>document.removeEventListener("click",w,true));}let b=w=>{w.key==="Escape"&&this.open&&this.closeTooltip();};document.addEventListener("keydown",b),this.registerCleanup(()=>document.removeEventListener("keydown",b)),t.isPreview&&g();}liveKeyOf(t){let n=t.selector??"",i=q(t.style),r=t.style?.badgeTrigger==="click"?"click":"hover";return `${n}|${i}|${r}`}onLiveUpdate(t){if(this.badgeBtn){let i=this.badgeBtn.ownerDocument,r=En(Sn(t),i);this.badgeBtn.className=r.className,this.badgeBtn.setAttribute("style",r.getAttribute("style")??""),this.badgeBtn.replaceChildren(...Array.from(r.childNodes));}let n=t.style?.tooltipPlacement;this.side=n==="bottom"||n==="left"||n==="right"?n:"top",this.open&&this.badgeBtn&&this.position(this.badgeBtn);}destroy(){this.cancelClose(),this.stopFloat?.(),this.stopFloat=null,this.tooltip=null,this.arrowEl=null,this.badgeBtn=null,this.open=false,super.destroy();}openTooltip(t){if(!this.tooltip)return;this.tooltip.style.display="block",this.open=true,this.position(t);let n=()=>{this.position(t);};window.addEventListener("scroll",n,true),window.addEventListener("resize",n),this.stopFloat=()=>{window.removeEventListener("scroll",n,true),window.removeEventListener("resize",n);};}closeTooltip(){this.cancelClose(),!(!this.tooltip||!this.open)&&(this.tooltip.style.display="none",this.open=false,this.stopFloat?.(),this.stopFloat=null);}cancelClose(){this.closeTimer!==null&&(window.clearTimeout(this.closeTimer),this.closeTimer=null);}async position(t){let n=this.tooltip,i=this.arrowEl;if(!n||!i)return;let{x:r,y:s,placement:a,middlewareData:l}=await U(t,n,{strategy:"fixed",placement:this.side,middleware:[F(8),z(),W({padding:8}),oe({element:i})]});n.style.left=`${r}px`,n.style.top=`${s}px`,ie(i,a,l.arrow);}};function Sn(o){let e=o.style?.badge;if(!e||typeof e!="object")return {kind:"icon"};let t=e;return {kind:t.kind==="dot"||t.kind==="pill"||t.kind==="text"||t.kind==="image"||t.kind==="icon"?t.kind:"icon",icon:typeof t.icon=="string"?t.icon:null,text:typeof t.text=="string"?t.text:null,imageUrl:typeof t.imageUrl=="string"?t.imageUrl:null,color:typeof t.color=="string"&&K.test(t.color.trim())?t.color.trim():null,size:typeof t.size=="number"&&Number.isFinite(t.size)?t.size:null}}function qe(o,e,t){return Math.min(t,Math.max(e,o))}function En(o,e){let t=e.createElement("button");t.type="button",t.className=`veo-badge veo-badge--${o.kind}`,t.setAttribute("aria-label","M\xE1s informaci\xF3n");let n=qe(o.size??18,8,48);switch(o.kind){case "dot":t.style.width=`${n}px`,t.style.height=`${n}px`,o.color&&(t.style.background=o.color);break;case "pill":{t.textContent=o.text?.slice(0,24)||"Nuevo",t.style.fontSize=`${qe(Math.round(n*.62),8,24)}px`,o.color&&(t.style.background=o.color);break}case "text":{t.textContent=o.text?.slice(0,32)||"Nuevo",t.style.fontSize=`${qe(Math.round(n*.7),9,28)}px`,o.color&&(t.style.color=o.color);break}case "image":{if(o.imageUrl&&I(o.imageUrl)){let i=e.createElement("img");i.src=o.imageUrl,i.alt="",i.style.width=`${n}px`,i.style.height=`${n}px`,t.appendChild(i);}else t.className="veo-badge veo-badge--icon",t.textContent="?",t.style.width=`${n}px`,t.style.height=`${n}px`,t.style.fontSize=`${qe(Math.round(n*.62),8,32)}px`;break}default:{t.textContent=(o.icon||"\u2139\uFE0F").slice(0,4),t.style.width=`${n}px`,t.style.height=`${n}px`,t.style.fontSize=`${qe(Math.round(n*.62),8,32)}px`,o.color&&(t.style.color=o.color);break}}return t}function Te(o,e,t,n,i){let r=n.createElement("div");r.className="veo-guide-content";let s=n.createElement("div");s.className="veo-walkthrough-counter",s.textContent=`Paso ${e+1} de ${t}`,r.appendChild(s);let a=n.createElement("div");a.className="veo-walkthrough-progress";for(let m=0;m<t;m++){let h=n.createElement("span");h.className="veo-walkthrough-progress-dot",m<e&&h.classList.add("completed"),m===e&&h.classList.add("active"),a.appendChild(h);}r.appendChild(a);for(let m of gn(o,n))r.appendChild(m);let l=n.createElement("div");l.className="veo-walkthrough-actions";let d=n.createElement("button");d.type="button",d.className="veo-walkthrough-skip",d.textContent="Omitir",d.addEventListener("click",()=>i.onSkip()),l.appendChild(d);let c=n.createElement("div");if(c.className="veo-walkthrough-actions-right",e>0){let m=n.createElement("button");m.type="button",m.className="veo-walkthrough-btn-secondary",m.textContent="Atr\xE1s",m.addEventListener("click",()=>i.onBack()),c.appendChild(m);}let u=e===t-1,p=n.createElement("button");p.type="button",p.className="veo-guide-cta";let f=u?"Finalizar":"Siguiente";return p.textContent=typeof o.ctaText=="string"&&o.ctaText?o.ctaText:f,p.addEventListener("click",()=>{u?i.onComplete():i.onNext();}),c.appendChild(p),l.appendChild(c),r.appendChild(l),r.appendChild(ve(n,()=>i.onSkip())),r}var re=class extends S{async render(e){let t=e.nav?.stepIndex??0,n=e.guide.guideSteps[t];if(!n)return;let i=n.style?.position==="bottom"?"bottom":"top",r=n.selector?.trim()||null,s=null;if(r&&(s=await k(r),!s))return;let{host:a,root:l}=this.createHost();this.applyDesign(n.style);let d=l.ownerDocument??document,c=d.createElement("div");c.className=kn(i,!!s);let u=(f,m,h)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:f,...h?{metadata:h}:{}}),m&&window.open(m,"_blank","noopener,noreferrer"),e.onClose();},p=e.nav?Te(n,e.nav.stepIndex,e.nav.totalSteps,d,e.nav.callbacks):L(n,d,{onCtaClick:(f,m,h)=>{u("cta_clicked",f==="url"?m:void 0,h),f==="guide"&&m&&e.onOpenGuide?.(m);},onDismiss:()=>u("dismissed")});if(c.appendChild(p),l.appendChild(c),r&&s){a.style.display="block";let f=i==="top"?"prepend":"append";M(s,a,f),this.registerCleanup(G(a,r,f));}e.nav||(this.liveContainer=c,this.liveContent=p,this.liveBuild=f=>L(f,d,{onCtaClick:(m,h,v)=>{u("cta_clicked",m==="url"?h:void 0,v),m==="guide"&&h&&e.onOpenGuide?.(h);},onDismiss:()=>u("dismissed")}),this.liveKey=this.liveKeyOf(n),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"}));}liveKeyOf(e){let t=e.selector?.trim()??"";if(!t)return "";let n=e.style?.position==="bottom"?"bottom":"top";return `${t}|${n}`}onLiveUpdate(e){if(this.liveContainer){let t=e.style?.position==="bottom"?"bottom":"top",n=!!e.selector?.trim();this.liveContainer.className=kn(t,n);}}};function kn(o,e){return e?"veo-banner veo-banner-embedded":`veo-banner veo-banner-${o}`}function Rn(){let e=Date.now().toString(16).padStart(12,"0"),t=new Uint8Array(10);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(t);else for(let i=0;i<t.length;i++)t[i]=Math.floor(Math.random()*256);t[0]=(t[0]??0)&15|112,t[2]=(t[2]??0)&63|128;let n=Array.from(t,i=>i.toString(16).padStart(2,"0")).join("");return [e.slice(0,8),e.slice(8,12),n.slice(0,4),n.slice(4,8),n.slice(8,20)].join("-")}function Ae(o,e,t,n){let i=o.createElement("iframe");i.className="veo-custom-frame",i.setAttribute("sandbox","allow-scripts"),i.setAttribute("title",t.guide.guideName||"OnUser"),i.style.width=n.width;let r=n.fixedHeight!==void 0&&n.fixedHeight!==null;r&&(i.style.height=Ct(n.fixedHeight));let s=Rn(),a=e.style?.tailwind===true;i.srcdoc=Oo(e.html??"",e.css??"",e.js??"",s,{hostCss:Go(),htmlAttrs:No(),tailwind:a});let l=()=>t.onClose(),d=c=>{if(c.source!==i.contentWindow)return;let u=c.data;if(!(!u||typeof u!="object"||u.__veo!==s))switch(u.type){case "dismiss":t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"dismissed"}),l();break;case "cta":t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"cta_clicked"}),typeof u.url=="string"&&I(u.url)&&window.open(u.url,"_blank","noopener,noreferrer"),u.close!==false&&l();break;case "navigate":typeof u.url=="string"&&I(u.url)&&window.location.assign(u.url);break;case "track":typeof u.name=="string"&&t.onTrack&&t.onTrack(u.name,_o(u.props)?u.props:void 0);break;case "resize":!r&&typeof u.height=="number"&&u.height>0&&(i.style.height=`${Math.ceil(u.height)}px`);break}};return window.addEventListener("message",d),{iframe:i,cleanup:()=>window.removeEventListener("message",d)}}function Ct(o){return typeof o=="number"?`${o}px`:o}var Mo=800*1024;function Go(){if(typeof document>"u")return "";let o="";try{for(let e of Array.from(document.styleSheets)){let t=null;try{t=e.cssRules;}catch{continue}if(t){for(let n of Array.from(t))if(o+=`${n.cssText}
|
|
426
|
-
`,o.length>Mo)return o}}}catch{return o}return o}function No(){if(typeof document>"u")return "";try{let o=document.documentElement,e=[];for(let t of ["class","style","data-theme","data-mode","data-color-mode"]){let n=o.getAttribute(t);n&&n.length<=1e3&&!/["<>]/.test(n)&&e.push(`${t}="${n}"`);}return e.join(" ")}catch{return ""}}function _o(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function Oo(o,e,t,n,i){let r=`(function(){var T=${JSON.stringify(n)};function P(m){m.__veo=T;parent.postMessage(m,'*');}window.veo={dismiss:function(){P({type:'dismiss'});},cta:function(u){P({type:'cta',url:u});},track:function(n,p){P({type:'track',name:n,props:p||{}});},navigate:function(u){P({type:'navigate',url:u});}};document.addEventListener('click',function(e){var a=e.target&&e.target.closest?e.target.closest('a[href]'):null;if(!a)return;var h=a.getAttribute('href');if(!h||h.charAt(0)==='#'||/^(javascript|mailto|tel):/i.test(h))return;e.preventDefault();if(a.target==='_blank'){P({type:'cta',url:a.href,close:false});}else{P({type:'navigate',url:h});}},true);function H(){var r=document.getElementById('__veo_root');var h=r?r.getBoundingClientRect().height:document.documentElement.scrollHeight;P({type:'resize',height:Math.ceil(h)});}window.addEventListener('load',H);try{if(typeof ResizeObserver!=='undefined'){var _r=document.getElementById('__veo_root');new ResizeObserver(H).observe(_r||document.documentElement);}}catch(e){}})();`,s=i.hostCss?`<style>${xt(i.hostCss,"style")}</style>`:"",a=i.tailwind?'<script src="https://cdn.tailwindcss.com"></script>':"";return `<!DOCTYPE html><html ${i.htmlAttrs}><head><meta charset="utf-8"><style>html,body{margin:0;padding:0;}body{font-family:system-ui,-apple-system,sans-serif;}</style>`+s+"<style>html,body{margin:0!important;padding:0!important;background:transparent!important;height:auto!important;min-height:0!important;max-height:none!important;width:auto!important;min-width:0!important;overflow:visible!important;color-scheme:normal!important;}</style>"+a+`<style>${xt(e,"style")}</style></head><body style="margin:0!important;background:transparent!important;min-height:0!important;height:auto!important;"><div id="__veo_root">${o}</div><script>${r}</script>`+(t?`<script>${xt(t,"script")}</script>`:"")+"</body></html>"}function xt(o,e){let t=e==="script"?/<\/script/gi:/<\/style/gi;return o.replace(t,`<\\/${e}`)}function Do(o,e,t){let n=o.parentNode;if(t==="prepend"){let i=o.firstChild;for(let r of e)o.insertBefore(r,i);}else if(t==="append")for(let i of e)o.appendChild(i);else if(t==="before")for(let i of e)n?.insertBefore(i,o);else {let i=o;for(let r of e)n?.insertBefore(r,i.nextSibling),i=r;}}var Bo=0;function St(o,e,t,n,i){if(o.sandboxed){let l={html:o.html??"",css:o.css,js:o.js},{iframe:d,cleanup:c}=Ae(e,l,t,{width:"100%"}),u=e.createElement("div");return u.className="veo-code-sandbox",u.appendChild(d),{node:u,cleanup:c}}let r=e,s=[];if(typeof o.css=="string"&&o.css.trim()){let l=r.createElement("style");l.textContent=o.css,r.head.appendChild(l),s.push(l);}let a=null;if(typeof o.html=="string"&&o.html.trim()){let l=e.createElement("div");l.className="veo-code-html",l.innerHTML=o.html;for(let d of Array.from(l.querySelectorAll("script")))s.push($o(d,r)),d.remove();if(i){let d=Array.from(l.childNodes);Do(i.anchor,d,i.pos),s.push(...d);}else if(n){let d=`veo-code-${++Bo}`;l.slot=d,n.appendChild(l),s.push(l);let c=e.createElement("slot");c.setAttribute("name",d),a=c;}else a=l;}if(typeof o.js=="string"&&o.js.trim()){let l=r.createElement("script");l.textContent=o.js,r.body.appendChild(l),s.push(l);}return {node:a,cleanup:()=>{for(let l of s)l.parentNode?.removeChild(l);}}}function $o(o,e){let t=e.createElement("script");for(let n of Array.from(o.attributes))t.setAttribute(n.name,n.value);return o.src||(t.textContent=o.textContent),e.body.appendChild(t),t}function lt(o,e,t){let n=e.guide.guideSteps[0];if(!n)return;let i=n.fields??[],r=()=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"dismissed"}),e.onClose();},s=t.createElement("div");if(s.className="veo-guide-content",n.title){let p=t.createElement("h2");p.className="veo-guide-title",p.textContent=n.title,s.appendChild(p);}if(n.content){let p=t.createElement("p");p.className="veo-guide-text",p.textContent=n.content,s.appendChild(p);}let a=[],l=t.createElement("form");l.className="veo-form",l.noValidate=true;for(let p of i){let{wrapper:f,read:m}=Et(p,t);a.push({field:p,read:m}),l.appendChild(f);}let d=t.createElement("p");d.className="veo-form-error",d.style.display="none",l.appendChild(d);let c=t.createElement("div");c.className="veo-guide-actions";let u=t.createElement("button");u.type="submit",u.className="veo-guide-cta",u.textContent=n.ctaText||"Enviar",c.appendChild(u),l.appendChild(c),l.addEventListener("submit",p=>{p.preventDefault(),d.style.display="none";let f={};for(let{field:h,read:v}of a){let y=v();if(y==null||y===""){if(h.required){d.textContent=`Completa "${h.label}"`,d.style.display="block";return}continue}f[h.key]=y;}if(Object.keys(f).length===0){d.textContent="Responde al menos un campo",d.style.display="block";return}u.disabled=true,(e.onFormSubmit??(()=>Promise.resolve(true)))(f).then(h=>{if(!h){u.disabled=false,d.textContent="No se pudo enviar. Prueba de nuevo.",d.style.display="block";return}e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"completed"});let v=e.isPreview?e.previewNote??"Vista previa: la respuesta NO se guard\xF3.":null;Ho(o,t,v),window.setTimeout(()=>e.onClose(),v?2200:1400);});}),s.appendChild(l),s.appendChild(ve(t,r)),o.appendChild(s);}function Ho(o,e,t){for(;o.firstChild;)o.removeChild(o.firstChild);let n=e.createElement("div");if(n.className="veo-form-thanks",n.textContent="\u2713 \xA1Gracias por tu respuesta!",o.appendChild(n),t){let i=e.createElement("p");i.className="veo-form-preview-note",i.textContent=t,o.appendChild(i);}}function Et(o,e){let t=e.createElement("div");t.className="veo-form-field";let n=e.createElement("label");switch(n.className="veo-form-label",n.textContent=o.required?`${o.label} *`:o.label,t.appendChild(n),o.type){case "textarea":{let i=e.createElement("textarea");return i.className="veo-form-input",i.rows=3,o.placeholder&&(i.placeholder=o.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()}}case "number":{let i=e.createElement("input");return i.type="number",i.className="veo-form-input",o.placeholder&&(i.placeholder=o.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()===""?void 0:Number(i.value)}}case "select":{let i=e.createElement("select");i.className="veo-form-input";let r=e.createElement("option");r.value="",r.textContent=o.placeholder||"Elige una opci\xF3n\u2026",i.appendChild(r);for(let s of o.options??[]){let a=e.createElement("option");a.value=s,a.textContent=s,i.appendChild(a);}return t.appendChild(i),{wrapper:t,read:()=>i.value||void 0}}case "radio":{let i=e.createElement("div");i.className="veo-form-options";let r=`veo-${o.key}`,s=[];for(let a of o.options??[]){let l=e.createElement("label");l.className="veo-form-option";let d=e.createElement("input");d.type="radio",d.name=r,d.value=a,s.push(d);let c=e.createElement("span");c.textContent=a,l.appendChild(d),l.appendChild(c),i.appendChild(l);}return t.appendChild(i),{wrapper:t,read:()=>s.find(a=>a.checked)?.value}}case "multiselect":{let i=e.createElement("div");i.className="veo-form-options";let r=[];for(let s of o.options??[]){let a=e.createElement("label");a.className="veo-form-option";let l=e.createElement("input");l.type="checkbox",l.value=s,r.push(l);let d=e.createElement("span");d.textContent=s,a.appendChild(l),a.appendChild(d),i.appendChild(a);}return t.appendChild(i),{wrapper:t,read:()=>{let s=r.filter(a=>a.checked).map(a=>a.value);return s.length>0?s:void 0}}}case "checkbox":{let i=e.createElement("label");i.className="veo-form-option";let r=e.createElement("input");r.type="checkbox";let s=e.createElement("span");return s.textContent=o.placeholder||"S\xED",i.appendChild(r),i.appendChild(s),t.appendChild(i),{wrapper:t,read:()=>r.checked?true:o.required?"":false}}case "yesno":{let i=e.createElement("div");i.className="veo-form-options";let r=`veo-${o.key}`,[s,a]=o.options?.length===2?o.options:["S\xED","No"],l=[];for(let{label:d,value:c}of [{label:s,value:true},{label:a,value:false}]){let u=e.createElement("label");u.className="veo-form-option";let p=e.createElement("input");p.type="radio",p.name=r,l.push({input:p,value:c});let f=e.createElement("span");f.textContent=d,u.appendChild(p),u.appendChild(f),i.appendChild(u);}return t.appendChild(i),{wrapper:t,read:()=>l.find(d=>d.input.checked)?.value}}case "nps":return In(t,e,0,10,"veo-nps-btn");case "rating":return In(t,e,1,5,"veo-rating-btn","\u2605");default:{let i=e.createElement("input");return i.type="text",i.className="veo-form-input",o.placeholder&&(i.placeholder=o.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()}}}}function In(o,e,t,n,i,r){let s=e.createElement("div");s.className="veo-form-scale";let a,l=[];for(let d=t;d<=n;d++){let c=e.createElement("button");c.type="button",c.className=i,c.textContent=r??String(d),c.setAttribute("aria-label",String(d)),c.addEventListener("click",()=>{a=d,l.forEach((u,p)=>{let f=r?p+t<=d:p+t===d;u.classList.toggle("veo-scale-active",f);});}),l.push(c),s.appendChild(c);}return o.appendChild(s),{wrapper:o,read:()=>a}}var Tn="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021",An="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75",Pn="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z",kt="M21 12a9 9 0 11-18 0 9 9 0 0118 0z",Fo="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",Rt={info:{paths:[kt,Tn],dots:[[12,8.25]]},exclamation:{paths:[kt,"M12 8v4.5"],dots:[[12,15.75]]},question:{paths:[kt,An],dots:[[12,17.25]]},star:{paths:[Pn]},"info-solid":{paths:[Tn],dots:[[12,8.25]],solid:true,scale:.8},"exclamation-solid":{paths:["M12 8v4.5"],dots:[[12,15.75]],solid:true,scale:.8},"question-solid":{paths:[An],dots:[[12,17.25]],solid:true,scale:.8},"star-solid":{paths:[Pn],solid:true,scale:.55},"target-solid":{paths:[Fo],solid:true,scale:.6},new:{paths:[],text:"New"}},Wo=14,zo=19e3,Ln=8;function se(o,e){return typeof o=="number"&&Number.isFinite(o)?o:e}function Mn(o,e,t,n){let i=Rt[e]??Rt.info;if(i.text){let d=o.createElement("span");return d.textContent=i.text,d.style.font=`700 ${Math.round(t*.85)}px/1 system-ui, -apple-system, sans-serif`,d.style.color=n,d}let r="http://www.w3.org/2000/svg",s=o.createElementNS(r,"svg");s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("width",String(t)),s.setAttribute("height",String(t)),s.setAttribute("fill","none"),s.setAttribute("aria-hidden","true");let a=i.solid?"#ffffff":n;if(i.solid){let d=o.createElementNS(r,"circle");d.setAttribute("cx","12"),d.setAttribute("cy","12"),d.setAttribute("r","12"),d.setAttribute("fill",n),s.appendChild(d);}let l=o.createElementNS(r,"g");if(l.setAttribute("stroke",a),l.setAttribute("stroke-width",i.solid?"2":"1.8"),l.setAttribute("stroke-linecap","round"),l.setAttribute("stroke-linejoin","round"),i.scale&&i.scale!==1){let d=i.scale,c=12-12*d;l.setAttribute("transform",`translate(${c} ${c}) scale(${d})`);}for(let d of i.paths){let c=o.createElementNS(r,"path");c.setAttribute("d",d),l.appendChild(c);}for(let[d,c]of i.dots??[]){let u=o.createElementNS(r,"circle");u.setAttribute("cx",String(d)),u.setAttribute("cy",String(c)),u.setAttribute("r","0.9"),u.setAttribute("fill",a),u.setAttribute("stroke","none"),l.appendChild(u);}return s.appendChild(l),s}function Gn(o,e){let t=se(e.size,Wo),n=e.color||"#000000",i=o.createElement("span");if(i.className=`veo-badge-marker veo-badge-marker-${e.kind}`,i.style.display="inline-flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.boxSizing="border-box",i.style.lineHeight="1",e.kind==="image"){let r=o.createElement("img");return r.alt="",r.src=e.imageUrl||"",r.style.width=`${t}px`,r.style.height=`${t}px`,r.style.objectFit="contain",r.style.display="block",i.appendChild(r),i}if(e.kind==="icon-text"){i.style.gap="6px",i.style.color=n,i.style.fontSize=`${t}px`,i.style.fontFamily="inherit",i.style.fontWeight="600",i.style.whiteSpace="nowrap",i.style.background=e.bgColor||"transparent";let r=se(e.borderWidth,0);r>0&&(i.style.border=`${r}px solid ${e.borderColor||n}`),i.style.padding=`${se(e.paddingY,6)}px ${se(e.paddingX,10)}px`,i.style.borderRadius=`${se(e.radius,999)}px`,e.showIcon!==false&&i.appendChild(Mn(o,e.icon||"star",t,n));let s=o.createElement("span");return s.textContent=e.text||"",i.appendChild(s),i}return i.style.width=`${t}px`,i.style.height=`${t}px`,i.appendChild(Mn(o,e.icon||"info",t,n)),i}function Uo(o,e,t,n){let i=o.left+o.width,r=o.top+o.height,s=o.top+o.height/2-e.height/2,a=o.left+o.width/2-e.width/2,l,d;switch(t){case "top-left":l=o.left-e.width/2,d=o.top-e.height/2;break;case "bottom-left":l=o.left-e.width/2,d=r-e.height/2;break;case "bottom-right":l=i-e.width/2,d=r-e.height/2;break;case "left":l=o.left-e.width-Ln,d=s;break;case "right":l=i+Ln,d=s;break;case "center":l=a,d=s;break;default:l=i-e.width/2,d=o.top-e.height/2;}return {x:l+n.x,y:d+n.y}}function Nn(o,e,t){e.style.position="absolute",e.style.zIndex=String(se(t.zIndex,zo)),e.style.margin="0";let n=()=>{let i=o.getBoundingClientRect(),r=e.getBoundingClientRect(),{x:s,y:a}=Uo({left:i.left+window.scrollX,top:i.top+window.scrollY,width:i.width,height:i.height},{width:r.width,height:r.height},t.position??"top-right",{x:se(t.offsetX,0),y:se(t.offsetY,0)});e.style.left=`${Math.round(s)}px`,e.style.top=`${Math.round(a)}px`;};return n(),fn(o,e,n)}var Ko={left:"flex-start",center:"center",right:"flex-end"},be=class extends S{async render(e){let t=e.nav?.stepIndex??0,n=e.guide.guideSteps[t];if(!n)return;let i=n.badge?.enabled===true,r=(n.position==="relative-to-element"||n.presentation==="inline"||i)&&n.anchorSelector?.trim()||void 0,s=null;if(r&&(s=await k(r),!s))return;let a=n.blocks??[],l=a.length===1&&a[0]?.type==="code"?a[0]:void 0;if(n.presentation==="inline"&&s&&l&&!l.sandboxed){let g=s.ownerDocument??document,{cleanup:b}=St(l,g,e,void 0,{anchor:s,pos:It(n.inlinePosition)});this.registerCleanup(b),e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:"shown"});return}let{host:d,root:c}=this.createHost(),u=c.ownerDocument??document,p=n.design??{};typeof p.zIndex=="number"&&(d.style.zIndex=String(p.zIndex));let f=u.createElement("div");f.className="veo-card",Vo(f,p);let m=(g,b)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:g,...{}});},h=[];this.buildContent(f,n.blocks??[],u,e,t,h,d);let v=f.lastElementChild;v&&!v.style.marginBottom&&(v.style.marginBottom="0");let y=null;if(p.closeButton!==false){let g=ve(u,()=>{if(y){y();return}m("dismissed"),this.closeOrSkip(e);}),b=typeof p.closeColor=="string"?p.closeColor:null,w=typeof p.closeHoverColor=="string"?p.closeHoverColor:null;b&&(g.style.color=b);let x=typeof p.closePosition=="string"?p.closePosition:"top-right";jo(g,x),w&&(g.addEventListener("mouseenter",()=>{g.style.color=w;}),g.addEventListener("mouseleave",()=>{g.style.color=b??"";})),f.appendChild(g);}if(i&&s){y=this.renderBadgeMode(n,f,s,r,d,c,u,e,t,p);return}if(n.presentation==="inline"&&s){d.style.display="block";let g=It(n.inlinePosition);c.appendChild(f),M(s,d,g),this.registerCleanup(G(d,r,g));}else if(n.position==="relative-to-element"&&s){if(p.backdrop===true){let w=u.createElement("div");w.className="veo-composite-overlay veo-composite-overlay--dim",typeof p.backdropColor=="string"&&(w.style.background=p.backdropColor);let x=typeof p.backdropZIndex=="number"?p.backdropZIndex:2e5;w.style.zIndex=String(x),c.appendChild(w),p.targetAbove===true&&this.registerCleanup(Yo(s,x+1));}let g=u.createElement("div");g.className="veo-composite-anchored";let b=p.caret===false?null:On(u,p);b&&g.appendChild(b),g.appendChild(f),c.appendChild(g),this.registerCleanup(await Dn(s,g,b));}else {let g=u.createElement("div");g.className="veo-composite-overlay",p.backdrop!==false&&(g.classList.add("veo-composite-overlay--dim"),typeof p.backdropColor=="string"&&(g.style.background=p.backdropColor),typeof p.backdropZIndex=="number"&&(g.style.zIndex=String(p.backdropZIndex)),g.addEventListener("click",b=>{b.target===g&&(m("dismissed"),this.closeOrSkip(e));})),qo(f,n.position,p),g.appendChild(f),c.appendChild(g);}e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:"shown"});}buildContent(e,t,n,i,r,s,a){let l=c=>{i.onInteraction({guideId:i.guide.guideId,stepIndex:r,action:"cta_clicked",...c.id?{metadata:{buttonId:c.id}}:{}});},d=0;for(;d<t.length;){let c=t[d];if(!c){d++;continue}if(c.type==="button"){let p=n.createElement("div");p.className="veo-guide-actions";let f;for(;d<t.length&&t[d]?.type==="button";){let m=t[d];if(!f){let h=m.style?.align;(h==="left"||h==="center"||h==="right")&&(f=h);}p.appendChild(this.buildButton(m,n,i,r,s,l)),d++;}f&&(p.style.justifyContent=Ko[f]??"flex-end"),e.appendChild(p);continue}if(c.type==="code"){let{node:p,cleanup:f}=St(c,n,i,a);p&&e.appendChild(p),this.registerCleanup(f),d++;continue}if(c.type==="form"){let p=n.createElement("div");p.className="veo-form";for(let f of c.fields??[]){let{wrapper:m,read:h}=Et(f,n);s.push({field:f,read:h}),p.appendChild(m);}e.appendChild(p),d++;continue}let u=at(c,n);u&&e.appendChild(u),d++;}}buildButton(e,t,n,i,r,s){let a=t.createElement("button");a.type="button",a.className="veo-guide-cta",a.textContent=e.text?.trim()||"OK",Re(a,e.style,"button");let l=n.nav?.callbacks;return a.addEventListener("click",()=>{switch(e.action){case "next":s(e),l?l.onNext():n.onClose();break;case "prev":s(e),l?.onBack();break;case "url":s(e),typeof e.url=="string"&&I(e.url)&&window.open(e.url,"_blank","noopener,noreferrer");break;case "guide":s(e),e.targetGuideId&&n.onOpenGuide?.(e.targetGuideId),this.closeOrSkip(n);break;case "submit-forms":case "submit-forms-advance":case "submit-forms-goto":this.submitForms(r,n,i,a,()=>{s(e),e.action==="submit-forms"||!l?n.onClose():e.action==="submit-forms-goto"&&typeof e.targetStep=="number"&&l.onGoto?l.onGoto(e.targetStep):l.onNext();});break;default:s(e),this.closeOrSkip(n);}}),a}submitForms(e,t,n,i,r){let s={};for(let{field:l,read:d}of e){let c=d();if(c==null||c===""){if(l.required){i.textContent=`Completa "${l.label}"`;return}continue}s[l.key]=c;}if(e.length>0&&Object.keys(s).length===0)return;i.disabled=true,(t.onFormSubmit??(()=>Promise.resolve(true)))(s).then(l=>{i.disabled=false,l&&(t.onInteraction({guideId:t.guide.guideId,stepIndex:n,action:"completed"}),r());});}closeOrSkip(e){e.nav?.callbacks?e.nav.callbacks.onSkip():e.onClose();}renderBadgeMode(e,t,n,i,r,s,a,l,d,c){let u=e.badge?.trigger==="click"?"click":"hover",p=e.badge?.placement==="top"||e.badge?.placement==="left"||e.badge?.placement==="right"?e.badge.placement:"bottom",f=a.createElement("div");f.className="veo-composite-badge",f.setAttribute("role","button"),f.tabIndex=0,f.style.cursor="pointer",f.style.display="inline-flex",f.style.alignItems="center";let m=e.badge?.marker??null;m?f.appendChild(Gn(a,m)):this.buildContent(f,e.badge?.blocks??[],a,l,d,[],r),s.appendChild(f),c.fullWidth===true?(t.style.width="auto",t.style.maxWidth="320px"):!t.style.width&&!t.style.maxWidth&&(t.style.maxWidth="320px");let h=a.createElement("div");h.className="veo-composite-anchored",h.style.display="none";let v=c.caret===false?null:On(a,c);if(v&&h.appendChild(v),h.appendChild(t),s.appendChild(h),m)r.style.display="inline-block",(n.ownerDocument??document).body.appendChild(r),this.registerCleanup(Nn(n,r,m)),this.registerCleanup(()=>r.remove());else {r.style.display="inline-block";let E=It(e.inlinePosition);M(n,r,E),this.registerCleanup(G(r,i,E));}let y=false,g=null,b=null,w=false,x=()=>{y||(y=true,h.style.display="block",Dn(f,h,v,p).then(E=>{y?g=E:E();}),w||(w=true,l.onInteraction({guideId:l.guide.guideId,stepIndex:d,action:"shown"})));},C=()=>{y=false,h.style.display="none",g?.(),g=null;};if(u==="hover"){let E=()=>{b!==null&&(clearTimeout(b),b=null);},Z=()=>{E(),b=window.setTimeout(C,150);};f.addEventListener("mouseenter",()=>{E(),x();}),f.addEventListener("mouseleave",Z),f.addEventListener("focus",x),h.addEventListener("mouseenter",E),h.addEventListener("mouseleave",Z);}else f.addEventListener("click",()=>{y?C():x();});return this.registerCleanup(()=>{g?.(),b!==null&&clearTimeout(b);}),l.badgeOpen&&x(),C}};function It(o){return o==="before"||o==="prepend"||o==="append"?o:"after"}function qo(o,e,t){let n=o.style;n.position="fixed";let i="16px",r=t.hAlign==="left"?"left":t.hAlign==="right"?"right":null,s=e.includes("top")?"top":e.includes("bottom")?"bottom":"middle",a=r??(e.includes("left")?"left":e.includes("right")?"right":"middle");s==="top"?n.top=i:s==="bottom"?n.bottom=i:n.top="50%",a==="left"?n.left=i:a==="right"?n.right=i:n.left="50%";let l=a==="middle"?"-50%":"0",d=s==="middle"?"-50%":"0";n.transform=l==="0"&&d==="0"?"":`translate(${l}, ${d})`;}var _n="10px";function jo(o,e){let t=o.style;t.top="auto",t.right="auto",t.bottom="auto",t.left="auto";let n=e.includes("bottom")?"bottom":"top",i=e.includes("left")?"left":"right";t.setProperty(n,_n),t.setProperty(i,_n);}function On(o,e){let t=o.createElement("div");t.className="veo-composite-caret";let n=typeof e.caretWidth=="number"?e.caretWidth:12,i=typeof e.caretHeight=="number"?e.caretHeight:12,r=t.style;if(r.position="absolute",r.width=`${n}px`,r.height=`${i}px`,r.transform="rotate(45deg)",r.background=typeof e.background=="string"?e.background:"#ffffff",typeof e.borderWidth=="number"&&e.borderWidth>0){let s=typeof e.borderColor=="string"?e.borderColor:"#bbbbbb";r.border=`${e.borderWidth}px solid ${s}`;}return t}function Yo(o,e){let t=o,n=t.style.position,i=t.style.zIndex;return getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.style.zIndex=String(e),()=>{t.style.position=n,t.style.zIndex=i;}}async function Dn(o,e,t,n="bottom"){let i=async()=>{let{x:s,y:a,placement:l,middlewareData:d}=await U(o,e,{placement:n,strategy:"fixed",middleware:[F(t?10:8),z(),W({padding:8}),...t?[oe({element:t})]:[]]});e.style.left=`${s}px`,e.style.top=`${a}px`,t&&ie(t,l,d.arrow);};await i();let r=()=>{i();};return window.addEventListener("scroll",r,true),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",r,true),window.removeEventListener("resize",r);}}function Vo(o,e){let t=o.style,n=a=>typeof a=="number"&&Number.isFinite(a)?`${a}px`:null,i=a=>typeof a=="string"&&a?a:null;i(e.background)&&(t.background=e.background);let r=i(e.color)??i(e.textColor);r&&(t.color=r),n(e.fontSize)&&(t.fontSize=n(e.fontSize)),i(e.fontWeight)&&(t.fontWeight=e.fontWeight),i(e.fontFamily)&&e.fontFamily!=="inherit"&&(t.fontFamily=e.fontFamily),i(e.textTransform)&&e.textTransform!=="none"&&(t.textTransform=e.textTransform),typeof e.letterSpacing=="number"&&(t.letterSpacing=`${e.letterSpacing}px`),i(e.align)&&(t.textAlign=e.align),typeof e.lineHeight=="number"&&(t.lineHeight=`${e.lineHeight}%`),n(e.radius)&&(t.borderRadius=n(e.radius));let s=n(e.borderWidth);if(s&&(t.border=`${s} solid ${i(e.borderColor)??"#e5e5e5"}`),i(e.shadowColor)||typeof e.shadowBlur=="number"){let a=l=>typeof e[l]=="number"?e[l]:0;t.boxShadow=`${a("shadowX")}px ${a("shadowY")}px ${a("shadowBlur")}px ${a("shadowSpread")}px ${i(e.shadowColor)??"rgba(0,0,0,0.2)"}`;}e.fullWidth===true?t.width="100%":e.widthType==="fluid"?(t.width="auto",n(e.width)&&(t.maxWidth=n(e.width))):n(e.width)&&(t.width=n(e.width));for(let a of ["Top","Right","Bottom","Left"]){let l=n(e[`padding${a}`]);l&&t.setProperty(`padding-${a.toLowerCase()}`,l);let d=n(e[`margin${a}`]);d&&t.setProperty(`margin-${a.toLowerCase()}`,d);}}var Xo={mode:"floating",position:"bottom-right"},Bn=16,Qo=360,Pe=class extends S{async render(e){let t=e.guide.guideSteps[0];if(!t||typeof t.html!="string"||t.html.length===0)return;let n=t.placement??Xo,i=null;if(n.mode==="anchored"){let c=n.selector??t.selector??e.guide.activationRules.selector;if(typeof c!="string"||c.length===0||(i=await k(c),!i))return}let{root:r}=this.createHost(),s=r.ownerDocument??document,a=s.createElement("div");a.className=n.mode==="anchored"?"veo-custom-anchored":"veo-custom-floating";let{iframe:l,cleanup:d}=Ae(s,t,e,{width:Ct(n.width??Qo),fixedHeight:n.height??null});this.registerCleanup(d),a.appendChild(l),r.appendChild(a),n.mode==="floating"?Jo(a,n):i&&this.registerCleanup(await this.setupAnchoredPosition(i,a,n)),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}async setupAnchoredPosition(e,t,n){let i=n.side??"bottom",r=async()=>{let{x:a,y:l}=await U(e,t,{placement:i,strategy:"fixed",middleware:[F(n.offsetY??8),z(),W({padding:8})]});t.style.left=`${a}px`,t.style.top=`${l}px`;};await r();let s=()=>{r();};return window.addEventListener("scroll",s,true),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s,true),window.removeEventListener("resize",s);}}};function Jo(o,e){let t=e.position??"bottom-right",n=`${e.offsetX??Bn}px`,i=`${e.offsetY??Bn}px`,r=o.style;if(t==="center"){r.top="50%",r.left="50%",r.transform="translate(-50%, -50%)";return}let[s,a]=t.split("-");s==="top"?r.top=i:r.bottom=i,a==="left"?r.left=n:a==="right"?r.right=n:(r.left="50%",r.transform="translateX(-50%)");}var Le=class extends S{render(e){let t=e.guide.guideSteps[0];if(!t||(t.fields??[]).length===0)return;let{root:n}=this.createHost();this.applyDesign(t.style);let i=n.ownerDocument??document,r=i.createElement("div");r.className="veo-modal-overlay";let s=i.createElement("div");s.className="veo-modal-card",lt(s,e,i),r.appendChild(s),n.appendChild(r);let a=()=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"dismissed"}),e.onClose();};r.addEventListener("click",d=>{d.target===r&&a();});let l=d=>{d.key==="Escape"&&a();};document.addEventListener("keydown",l),this.registerCleanup(()=>document.removeEventListener("keydown",l)),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var Me=class extends S{async render(e){let t=e.guide.guideSteps[0];if(!t||typeof t.html!="string"||t.html.length===0)return;let n=t.selector??e.guide.activationRules.selector;if(typeof n!="string"||n.length===0)return;let i=await k(n);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=q(t.style);M(i,r,a),this.registerCleanup(G(r,n,a));let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-custom-inline";let{iframe:c,cleanup:u}=Ae(l,t,e,{width:"100%"});this.registerCleanup(u),d.appendChild(c),s.appendChild(d),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var Ge=class extends S{async render(e){let t=e.guide.guideSteps[0];if(!t||(t.fields??[]).length===0)return;let n=t.selector??e.guide.activationRules.selector;if(typeof n!="string"||n.length===0)return;let i=await k(n);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=q(t.style);M(i,r,a),this.registerCleanup(G(r,n,a)),this.applyDesign(t.style);let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-inline",lt(d,e,l),s.appendChild(d),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var Ne=class extends S{async render(e){let t=e.guide.guideSteps[0];if(!t)return;let n=t.selector??e.guide.activationRules.selector;if(typeof n!="string"||n.length===0)return;let i=await k(n);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=q(t.style);M(i,r,a),this.registerCleanup(G(r,n,a)),this.applyDesign(t.style);let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-inline";let c=(p,f,m)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:p,...m?{metadata:m}:{}}),f&&window.open(f,"_blank","noopener,noreferrer"),e.onClose();},u=L(t,l,{onCtaClick:(p,f,m)=>{c("cta_clicked",p==="url"?f:void 0,m),p==="guide"&&f&&e.onOpenGuide?.(f);},onDismiss:()=>c("dismissed")});d.appendChild(u),s.appendChild(d),this.liveContainer=d,this.liveContent=u,this.liveKey=`${n}|${a}`,this.liveBuild=p=>L(p,l,{onCtaClick:(f,m,h)=>{c("cta_clicked",f==="url"?m:void 0,h),f==="guide"&&m&&e.onOpenGuide?.(m);},onDismiss:()=>c("dismissed")}),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}liveKeyOf(e){return `${e.selector??""}|${q(e.style)}`}};function $n(o){return o.style?.backdrop===false?"veo-modal-overlay veo-modal-overlay--none":"veo-modal-overlay"}var ae=class extends S{constructor(){super(...arguments);this.overlay=null;}render(t){let n=t.nav?.stepIndex??0,i=t.guide.guideSteps[n];if(!i)return;let{root:r}=this.createHost();this.applyDesign(i.style);let s=r.ownerDocument??document,a=s.createElement("div");a.className=$n(i),this.overlay=a;let l=s.createElement("div");l.className="veo-modal-card";let d=(f,m,h)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:n,action:f,...h?{metadata:h}:{}}),m&&window.open(m,"_blank","noopener,noreferrer"),t.onClose();},c=()=>{t.nav?t.nav.callbacks.onSkip():d("dismissed");},u=t.nav?Te(i,t.nav.stepIndex,t.nav.totalSteps,s,t.nav.callbacks):L(i,s,{onCtaClick:(f,m,h)=>{d("cta_clicked",f==="url"?m:void 0,h),f==="guide"&&m&&t.onOpenGuide?.(m);},onDismiss:()=>d("dismissed")});l.appendChild(u),a.appendChild(l),r.appendChild(a),t.nav||(this.liveContainer=l,this.liveContent=u,this.liveBuild=f=>L(f,s,{onCtaClick:(m,h,v)=>{d("cta_clicked",m==="url"?h:void 0,v),m==="guide"&&h&&t.onOpenGuide?.(h);},onDismiss:()=>d("dismissed")})),a.addEventListener("click",f=>{f.target===a&&c();});let p=f=>{f.key==="Escape"&&c();};document.addEventListener("keydown",p),this.registerCleanup(()=>document.removeEventListener("keydown",p)),t.nav||t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"shown"});}onLiveUpdate(t){this.overlay&&(this.overlay.className=$n(t));}destroy(){this.overlay=null,super.destroy();}};var _e=class extends S{constructor(){super(...arguments);this.side="bottom";this.reposition=null;}async render(t){let n=t.guide.guideSteps[0];if(!n)return;let i=n.selector??t.guide.activationRules.selector;if(typeof i!="string"||i.length===0)return;let r=await k(i);if(!r)return;let s=n.style?.tooltipPlacement;this.side=s==="top"||s==="left"||s==="right"?s:"bottom";let{root:a}=this.createHost();this.applyDesign(n.style);let l=a.ownerDocument??document,d=l.createElement("div");d.className="veo-tooltip";let c=(h,v,y)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:h,...y?{metadata:y}:{}}),v&&window.open(v,"_blank","noopener,noreferrer"),t.onClose();},u=L(n,l,{onCtaClick:(h,v,y)=>{c("cta_clicked",h==="url"?v:void 0,y),h==="guide"&&v&&t.onOpenGuide?.(v);},onDismiss:()=>c("dismissed")});d.appendChild(u);let p=l.createElement("div");p.className="veo-tooltip-arrow",d.appendChild(p),a.appendChild(d);let f=async()=>{let{x:h,y:v,placement:y,middlewareData:g}=await U(r,d,{placement:this.side,middleware:[F(10),z(),W({padding:8}),oe({element:p})]});d.style.left=`${h}px`,d.style.top=`${v}px`,ie(p,y,g.arrow);};await f();let m=()=>{f();};this.reposition=m,window.addEventListener("scroll",m,true),window.addEventListener("resize",m),this.registerCleanup(()=>{window.removeEventListener("scroll",m,true),window.removeEventListener("resize",m);}),this.liveContainer=d,this.liveContent=u,this.liveKey=i,this.liveBuild=h=>L(h,l,{onCtaClick:(v,y,g)=>{c("cta_clicked",v==="url"?y:void 0,g),v==="guide"&&y&&t.onOpenGuide?.(y);},onDismiss:()=>c("dismissed")}),t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"shown"});}liveKeyOf(t){return t.selector??""}onLiveUpdate(t){let n=t.style?.tooltipPlacement;this.side=n==="top"||n==="left"||n==="right"?n:"bottom",this.reposition?.();}};var Oe=class extends S{async render(e){let t=e.guide.guideSteps[e.currentStepIndex];if(!t)return false;let n=t.selector??e.guide.activationRules.selector;if(typeof n!="string"||n.length===0)return false;let i=await k(n,5e3);if(!i)return false;let r=t.style?.tooltipPlacement,s=r==="top"||r==="left"||r==="right"?r:"bottom",{root:a}=this.createHost();this.applyDesign(t.style);let l=a.ownerDocument??document,d=l.createElement("div");d.className="veo-walkthrough";let c=Te(t,e.currentStepIndex,e.guide.guideSteps.length,l,e.callbacks);d.appendChild(c);let u=l.createElement("div");u.className="veo-walkthrough-arrow",d.appendChild(u),a.appendChild(d);let p=async()=>{let{x:m,y:h,placement:v,middlewareData:y}=await U(i,d,{placement:s,middleware:[F(10),z(),W({padding:8}),oe({element:u})]});d.style.left=`${m}px`,d.style.top=`${h}px`,ie(u,v,y.arrow);};await p();let f=()=>{p();};return window.addEventListener("scroll",f,true),window.addEventListener("resize",f),this.registerCleanup(()=>{window.removeEventListener("scroll",f,true),window.removeEventListener("resize",f);}),true}};function Zo(o){let e=[o];try{let t=new URL(o);e.push(`${t.pathname}${t.search}${t.hash}`),t.hash.startsWith("#/")&&e.push(t.hash.slice(1));}catch{}return e}function ei(o,e){let t=Zo(e);switch(o.type){case "exact":return t.some(n=>n===o.pattern);case "prefix":return t.some(n=>n.startsWith(o.pattern));case "regex":try{let n=new RegExp(o.pattern);return t.some(i=>n.test(i))}catch{return false}}}function J(o,e){return !o||o.scope==="sitewide"||!o.pattern?true:ei({type:o.matchType??"prefix",pattern:o.pattern},e)}var dt=class{constructor(e){this.state=null;this.storageKey=`${_t}${e}`,this.state=this.load(),this.state&&this.isAbandoned(this.state)&&this.clear();}current(){return this.state?this.isAbandoned(this.state)?(this.clear(),null):this.state:null}hasActive(){return this.current()!==null}start(e,t){let n=Date.now();return this.state={guideId:e,totalSteps:t,currentStepIndex:0,startedAt:n,lastProgressAt:n},this.persist(),this.state}advance(){if(!this.state)return null;let e=this.state.currentStepIndex+1;return e>=this.state.totalSteps?null:(this.state={...this.state,currentStepIndex:e,lastProgressAt:Date.now()},this.persist(),this.state)}back(){return this.state?this.state.currentStepIndex===0?this.state:(this.state={...this.state,currentStepIndex:this.state.currentStepIndex-1,lastProgressAt:Date.now()},this.persist(),this.state):null}clear(){if(this.state=null,!(typeof localStorage>"u"))try{localStorage.removeItem(this.storageKey);}catch{}}isAbandoned(e){return Date.now()-e.lastProgressAt>18e5}load(){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(this.storageKey);if(!e)return null;let t=JSON.parse(e);if(!t||typeof t!="object")return null;let n=t;return typeof n.guideId!="string"||typeof n.totalSteps!="number"||typeof n.currentStepIndex!="number"||typeof n.startedAt!="number"||typeof n.lastProgressAt!="number"?null:n}catch{return null}}persist(){if(!(typeof localStorage>"u"||!this.state))try{localStorage.setItem(this.storageKey,JSON.stringify(this.state));}catch{}}};var ni=3e4,oi={shown:"shown",dismissed:"dismissed",cta_clicked:null,step_advanced:null,step_back:null,completed:"completed"},ii={minute:6e4,hour:36e5,day:864e5,week:6048e5};function ri(o){return Math.max(0,o.every)*ii[o.unit]}var ct=class{constructor(e,t){this.client=e;this.activeRenderers=new Set;this.activeByGuideId=new Map;this.dispatched=new Set;this.activeWalkthroughRenderer=null;this.activeWalkthroughGuide=null;this.resolveCache=null;this.inflightResolve=null;this.armedTriggers=new Map;this.pendingComposite=null;this.compositeDelays=new Map;this.repeatHoldUntil=new Map;this.localDismissals=new Map;this.activeComposite=new Map;if(this.debug=t.debug===true,this.apiUrl=t.apiUrl,this.apiKey=t.apiKey,this.resolver=t.resolver??new Ve(t.apiUrl,t.apiKey,this.debug),t.trackerQueue)this.trackerQueue=t.trackerQueue;else {let i=new Xe(t.apiUrl,t.apiKey);this.trackerQueue=new Qe({client:i,flushIntervalMs:3e3,batchSize:5,maxRetries:3,onError:(r,s)=>{this.debug&&console.warn(`[veo] dropped guide interaction after retries: guideId=${s.guideId} action=${s.payload.action}`,r);}});}let n=Bt(t.apiKey);this.frequencyCache=t.frequencyCache??new Ye(n),this.walkthroughState=t.walkthroughState??new dt(n);}get pendingInteractions(){return this.trackerQueue.size}clearFrequencyCache(){this.frequencyCache.clear();}clearWalkthroughState(){this.tearDownWalkthrough();}async checkGuides(e,t){let n=this.client.getEndUserId();if(!n){this.debug&&console.log("[veo] guides: skipped, no endUserId yet");return}if(this.pruneComposite(e),await this.tryResumeWalkthrough(n,t,e))return;this.tryResumeComposite(t,e);let i;try{i=await this.resolveGuides(n,e);}catch(r){this.debug&&console.error("[veo] guides resolver threw:",r);return}i=i.filter(r=>Lt(r.campaignWeekdays)&&Pt(r.activationRules.devices)),this.debug&&console.log(`[veo] guides: ${i.length} eligible at ${e}`),this.disarmTriggers();for(let r of i){let s=r.activationRules,a=s.trigger;(a==="on_click"||a==="on_hover")&&s.selector&&(this.armInteractionTrigger(r,n,t,e),!ue(s))||await this.showGuide(r,n,t,e,{badgeOpen:a!=="manual"});}}async showGuide(e,t,n,i,r={}){let s=r.badgeOpen!==false;if(this.frequencyCache.shouldFilter(e.guideId,e.displayFrequency)){this.debug&&console.log(`[veo] guides: filtered locally guideId=${e.guideId}`);return}if(!r.byUser&&this.isHeldByRepeat(e)){this.debug&&console.log(`[veo] guides: held by repeat guideId=${e.guideId}`);return}if(this.activeByGuideId.has(e.guideId)){this.debug&&console.log(`[veo] guides: already shown guideId=${e.guideId}`);return}if(e.guideType==="walkthrough"&&e.guideSteps.length>1){if(this.walkthroughState.hasActive()){this.debug&&console.log(`[veo] guides: walkthrough ${e.guideId} skipped (another active)`);return}await this.startWalkthrough(e,t,n,i);return}if(e.guideType==="composite"){this.startComposite(e,n,i,s);return}this.runSingleStepRender(e,n,i);}armInteractionTrigger(e,t,n,i){if(this.frequencyCache.shouldFilter(e.guideId,e.displayFrequency)||this.activeByGuideId.has(e.guideId)||this.armedTriggers.has(e.guideId))return;let r=e.activationRules.selector,s=e.activationRules.trigger==="on_hover"?"mouseover":"click",a=d=>{let c=d.target;if(c instanceof Element){try{if(!c.closest(r))return}catch{return}l(),this.showGuide(e,t,n,i,{byUser:true});}},l=()=>{document.removeEventListener(s,a,true),this.armedTriggers.delete(e.guideId);};document.addEventListener(s,a,true),this.armedTriggers.set(e.guideId,l),this.debug&&console.log(`[veo] guides: armed ${s} trigger for ${e.guideId} on ${r}`);}disarmTriggers(){for(let e of this.armedTriggers.values())e();this.armedTriggers.clear();}async resolveGuides(e,t){let n=`${e}
|
|
427
|
-
${t}`,i=Date.now();if(this.resolveCache?.key===n&&i-this.resolveCache.at<ni)return this.debug&&console.log("[veo] guides: resolve cache hit"),this.resolveCache.guides;if(this.inflightResolve?.key===n)return this.inflightResolve.promise;let r=this.resolver.resolve(e,t);this.inflightResolve={key:n,promise:r};try{let s=await r;return this.resolveCache={key:n,at:Date.now(),guides:s},s}finally{this.inflightResolve?.key===n&&(this.inflightResolve=null);}}destroy(){for(let e of this.activeRenderers)try{e.destroy();}catch(t){this.debug&&console.error("[veo] renderer destroy failed:",t);}if(this.activeRenderers.clear(),this.activeByGuideId.clear(),this.activeComposite.clear(),this.activeWalkthroughRenderer){try{this.activeWalkthroughRenderer.destroy();}catch{}this.activeWalkthroughRenderer=null,this.activeWalkthroughGuide=null;}this.disarmTriggers();for(let e of this.compositeDelays.values())clearTimeout(e.timer);this.compositeDelays.clear(),this.repeatHoldUntil.clear(),this.localDismissals.clear(),this.dispatched.clear(),this.resolveCache=null,this.inflightResolve=null,this.trackerQueue.destroy();}runSingleStepRender(e,t,n){let i=this.createSingleStepRenderer(e.guideType);if(!i)return;this.activeByGuideId.set(e.guideId,i);let r=$e(e.activationRules);window.setTimeout(()=>this.mountSingleStepRenderer(e,i,t,n),r);}startComposite(e,t,n,i=true){if(this.pendingComposite?.guide.guideId===e.guideId)return;let r=e.guideSteps,s=e.activationRules.repeat?.onLoad==="resume"?this.recallStep(e.guideId):null,a=s!==null&&J(r[s]?.pageLocation,n)?s:r.findIndex(c=>J(c.pageLocation,n));if(a===-1||e.activationRules.trigger==="manual"&&!r[a]?.badge?.enabled||this.compositeDelays.has(e.guideId))return;this.resetDispatched(e.guideId);let l=$e(e.activationRules);if(l<=0){this.renderCompositeStep(e,a,t,n,i);return}let d=setTimeout(()=>{this.compositeDelays.delete(e.guideId),!this.activeByGuideId.has(e.guideId)&&this.renderCompositeStep(e,a,t,n,i);},l);this.compositeDelays.set(e.guideId,{guide:e,stepIndex:a,timer:d});}resetDispatched(e){let t=`${e}:`;for(let n of this.dispatched)n.startsWith(t)&&this.dispatched.delete(n);}isHeldByRepeat(e){let t=e.activationRules.repeat;if(!t)return false;let n=this.repeatHoldUntil.get(e.guideId);return n!==void 0&&Date.now()<n?true:t.stopAfter.kind==="dismissals"?(this.localDismissals.get(e.guideId)??0)>=t.stopAfter.count:false}recordRepeatLocal(e,t){let n=e.activationRules.repeat;n&&(t==="shown"?this.repeatHoldUntil.set(e.guideId,Date.now()+ri(n)):t==="dismissed"?this.localDismissals.set(e.guideId,(this.localDismissals.get(e.guideId)??0)+1):t==="completed"&&n.stopAfter.kind==="completed"&&this.repeatHoldUntil.set(e.guideId,Number.POSITIVE_INFINITY));}stepKey(e){return `veo:last_step:${e}`}rememberStep(e,t){try{localStorage.setItem(this.stepKey(e),String(t));}catch{}}recallStep(e){try{let t=localStorage.getItem(this.stepKey(e));if(t===null)return null;let n=Number(t);return Number.isInteger(n)&&n>=0?n:null}catch{return null}}pruneComposite(e){for(let[t,n]of this.compositeDelays){let r=n.guide.guideSteps[n.stepIndex];(!r||!J(r.pageLocation,e))&&(clearTimeout(n.timer),this.compositeDelays.delete(t));}for(let t of this.activeComposite.values()){let i=t.guide.guideSteps[t.stepIndex];(!i||!J(i.pageLocation,e))&&t.cleanup();}}tryResumeComposite(e,t){let n=this.pendingComposite;if(!n)return false;let r=n.guide.guideSteps[n.stepIndex];return r?J(r.pageLocation,t)?(this.pendingComposite=null,this.renderCompositeStep(n.guide,n.stepIndex,e,t),true):false:(this.pendingComposite=null,false)}renderCompositeStep(e,t,n,i,r=true){let s=e.guideSteps;this.rememberStep(e.guideId,t);let a=new be;this.activeRenderers.add(a),this.activeByGuideId.set(e.guideId,a);let l=()=>{a.destroy(),this.activeRenderers.delete(a),this.activeByGuideId.get(e.guideId)===a&&this.activeByGuideId.delete(e.guideId),this.activeComposite.delete(e.guideId);};this.activeComposite.set(e.guideId,{guide:e,stepIndex:t,cleanup:l});let d=u=>{if(l(),u<0||u>=s.length)return;let p=s[u];p&&J(p.pageLocation,i)?this.renderCompositeStep(e,u,n,i,r):this.pendingComposite={guide:e,stepIndex:u};},c=s.length>1?{stepIndex:t,totalSteps:s.length,callbacks:{onNext:()=>d(t+1),onBack:()=>d(t-1),onGoto:u=>d(u),onSkip:l,onComplete:l}}:void 0;try{a.render({guide:e,onInteraction:u=>this.handleInteraction(e,n,i,u),onClose:l,onTrack:(u,p)=>this.client.track(u,p),onFormSubmit:u=>this.submitFormResponse(e.guideId,u),onOpenGuide:u=>{this.openGuideById(u,n,i);},badgeOpen:r,...c?{nav:c}:{}});}catch(u){this.debug&&console.error("[veo] composite renderer threw:",u),l();}}mountSingleStepRenderer(e,t,n,i){this.activeRenderers.add(t),this.activeByGuideId.set(e.guideId,t);let r=()=>{t.destroy(),this.activeRenderers.delete(t),this.activeByGuideId.get(e.guideId)===t&&this.activeByGuideId.delete(e.guideId);},s=c=>{this.handleInteraction(e,n,i,c);},a=(c,u)=>{this.client.track(c,u);},l=c=>this.submitFormResponse(e.guideId,c),d=c=>{this.openGuideById(c,n,i);};try{t.render({guide:e,onInteraction:s,onClose:r,onTrack:a,onFormSubmit:l,onOpenGuide:d});}catch(c){this.debug&&console.error("[veo] renderer.render threw:",c),this.activeRenderers.delete(t),this.activeByGuideId.get(e.guideId)===t&&this.activeByGuideId.delete(e.guideId);}}async openGuideById(e,t,n){if(this.activeByGuideId.has(e))return;let i=await this.resolver.fetchById(e);if(!i){this.debug&&console.warn(`[veo] guides: chained guide ${e} not found`);return}let r=this.client.getEndUserId()??this.client.getAnonymousId();if(i.guideType==="walkthrough"&&i.guideSteps.length>1){this.walkthroughState.hasActive()||await this.startWalkthrough(i,r,t,n);return}this.runSingleStepRender(i,t,n);}async tryResumeWalkthrough(e,t,n){let i=this.walkthroughState.current();if(!i)return false;let r=await this.resolver.fetchById(i.guideId);if(!r||r.guideType!=="walkthrough")return this.debug&&console.log(`[veo] guides: walkthrough ${i.guideId} no longer available, cleaning up`),this.tearDownWalkthrough(),true;let s=Math.min(i.currentStepIndex,r.guideSteps.length-1);return await this.renderWalkthroughStep(r,s,e,t,n),true}async startWalkthrough(e,t,n,i){this.walkthroughState.start(e.guideId,e.guideSteps.length),await this.renderWalkthroughStep(e,0,t,n,i)&&(this.enqueueInteractionOnce(e.guideId,t,n,i,"shown",0),this.frequencyCache.record(e.guideId,"shown"));}async renderWalkthroughStep(e,t,n,i,r){this.activeWalkthroughRenderer&&(this.activeWalkthroughRenderer.destroy(),this.activeWalkthroughRenderer=null),this.activeWalkthroughGuide=e;let s={onNext:()=>this.handleWalkthroughNext(n,i,r),onBack:()=>this.handleWalkthroughBack(n,i,r),onSkip:()=>this.handleWalkthroughSkip(n,i,r),onComplete:()=>this.handleWalkthroughComplete(n,i,r)},a=e.guideSteps[t],l=si(a);if(l==="modal"||l==="banner"){let u=l==="modal"?new ae:new re;try{u.render({guide:e,onInteraction:()=>{},onClose:()=>{},nav:{stepIndex:t,totalSteps:e.guideSteps.length,callbacks:s}});}catch(p){return this.debug&&console.error("[veo] sequence renderer threw:",p),this.tearDownWalkthrough(),false}return this.activeWalkthroughRenderer=u,true}let d=new Oe,c=false;try{c=await d.render({guide:e,currentStepIndex:t,callbacks:s});}catch(u){this.debug&&console.error("[veo] walkthrough renderer threw:",u);}return c?(this.activeWalkthroughRenderer=d,true):(this.debug&&console.warn(`[veo] walkthrough ${e.guideId} step ${t} could not render, cancelling`),this.tearDownWalkthrough(),false)}handleWalkthroughNext(e,t,n){let i=this.activeWalkthroughGuide;if(!i)return;let r=this.walkthroughState.advance();if(!r){this.handleWalkthroughComplete(e,t,n);return}this.enqueueInteraction(i.guideId,e,t,n,"step_advanced",r.currentStepIndex),this.renderWalkthroughStep(i,r.currentStepIndex,e,t,n);}handleWalkthroughBack(e,t,n){let i=this.activeWalkthroughGuide;if(!i)return;let r=this.walkthroughState.current();if(!r||r.currentStepIndex===0)return;let s=this.walkthroughState.back();s&&(this.enqueueInteraction(i.guideId,e,t,n,"step_back",s.currentStepIndex),this.renderWalkthroughStep(i,s.currentStepIndex,e,t,n));}handleWalkthroughSkip(e,t,n){let i=this.activeWalkthroughGuide,r=this.walkthroughState.current();!i||!r||(this.enqueueInteraction(i.guideId,e,t,n,"dismissed",r.currentStepIndex),this.frequencyCache.record(i.guideId,"dismissed"),this.tearDownWalkthrough());}handleWalkthroughComplete(e,t,n){let i=this.activeWalkthroughGuide,r=this.walkthroughState.current();!i||!r||(this.enqueueInteraction(i.guideId,e,t,n,"completed",r.currentStepIndex),this.frequencyCache.record(i.guideId,"completed"),this.tearDownWalkthrough());}tearDownWalkthrough(){if(this.activeWalkthroughRenderer)try{this.activeWalkthroughRenderer.destroy();}catch{}this.activeWalkthroughRenderer=null,this.activeWalkthroughGuide=null,this.walkthroughState.clear();}handleInteraction(e,t,n,i){let r=i.metadata?.buttonId?`:${i.metadata.buttonId}`:"",s=`${e.guideId}:${i.action}${r}`;if(this.dispatched.has(s)){this.debug&&console.log(`[veo] guides: dedup hit ${s}`);return}this.dispatched.add(s);let a=oi[i.action];a&&this.frequencyCache.record(e.guideId,a),this.recordRepeatLocal(e,i.action),(i.action==="dismissed"||i.action==="completed")&&(this.resolveCache=null);let l=this.client.getEndUserId();if(!l){this.debug&&console.warn("[veo] guides: interaction without endUserId \u2014 skipping enqueue");return}this.trackerQueue.enqueue({guideId:e.guideId,payload:{endUserId:l,sessionId:t,action:i.action,stepIndex:i.stepIndex,pageUrl:n,pagePath:Hn(n),...i.metadata?{metadata:i.metadata}:{}}});}enqueueInteraction(e,t,n,i,r,s){this.trackerQueue.enqueue({guideId:e,payload:{endUserId:t,sessionId:n,action:r,stepIndex:s,pageUrl:i,pagePath:Hn(i)}});}enqueueInteractionOnce(e,t,n,i,r,s){let a=`${e}:${r}:${s}`;this.dispatched.has(a)||(this.dispatched.add(a),this.enqueueInteraction(e,t,n,i,r,s));}createSingleStepRenderer(e){switch(e){case "modal":return new ae;case "banner":return new re;case "tooltip":return new _e;case "custom":return new Pe;case "inline":return new Ne;case "inline-custom":return new Me;case "form":return new Le;case "inline-form":return new Ge;case "badge":return new Ie;case "composite":return new be;case "walkthrough":return null;default:return null}}async submitFormResponse(e,t){let n=this.client.getEndUserId()??this.client.getAnonymousId();try{let i=await fetch(`${this.apiUrl}/v1/guides/${e}/form-response`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":this.apiKey},body:JSON.stringify({endUserId:n,answers:t})});return !i.ok&&this.debug&&console.warn("[veo] form-response respondi\xF3",i.status),i.ok}catch(i){return this.debug&&console.warn("[veo] form-response fall\xF3:",i),false}}};function Hn(o){try{return new URL(o).pathname}catch{return "/"}}function si(o){let e=o?.style?.render;return typeof e=="string"?e:"walkthrough"}var ai="__veo_preview__",Tt=class{constructor(){this.singleStep=null;this.walkthrough=null;this.walkthroughGuide=null;this.walkthroughIndex=0;this.input=null;}preview(e){let t=e.guideSteps[0];if(this.singleStep&&this.input&&e.guideType===this.input.guideType&&e.guideType!=="walkthrough"&&e.badgeOpen===true==(this.input.badgeOpen===true)&&t&&this.singleStep.updateStep(t))return this.input=e,{close:()=>this.close(),ready:Promise.resolve({rendered:true}),host:()=>this.activeHost()};this.close(),this.input=e;let n=li(e),i=typeof e.startStepIndex=="number"?e.startStepIndex:0;if(n.guideType==="composite"){let s=Math.min(Math.max(0,i),n.guideSteps.length-1),a=n.guideSteps[s];a&&(n.guideSteps=[a]);let l=this.renderSingleStep(n);return {close:()=>this.close(),ready:l,host:()=>this.activeHost()}}let r=n.guideType==="walkthrough"?this.startWalkthrough(n,i):this.renderSingleStep(n);return {close:()=>this.close(),ready:r,host:()=>this.activeHost()}}activeHost(){return this.singleStep?this.singleStep.hostElement():this.walkthrough instanceof S?this.walkthrough.hostElement():null}close(e=false){let t=e?this.input?.onClosed:void 0;this.singleStep&&(we(this.singleStep),this.singleStep=null),this.walkthrough&&(we(this.walkthrough),this.walkthrough=null),this.walkthroughGuide=null,this.walkthroughIndex=0,this.input=null,t?.();}async renderSingleStep(e){let t=di(e.guideType);if(!t)return {rendered:false};this.singleStep=t;let n=false;try{await t.render({guide:e,onInteraction:i=>{i.action==="shown"&&(n=!0);},onClose:()=>this.close(!0),badgeOpen:this.input?.badgeOpen??ue(this.input?.activationRules),onTrack:()=>{},onOpenGuide:()=>{},onFormSubmit:this.input?.formSubmit??(()=>Promise.resolve(!0)),isPreview:!0,...this.input?.formSubmit&&this.input.formSubmitNote!==void 0?{previewNote:this.input.formSubmitNote}:{}});}catch{return this.close(),{rendered:false}}return this.singleStep!==t?(we(t),{rendered:false}):{rendered:n}}async startWalkthrough(e,t=0){if(e.guideSteps.length===0)return {rendered:false};this.walkthroughGuide=e;let n=Math.min(Math.max(0,Math.floor(t)),e.guideSteps.length-1);return this.walkthroughIndex=n,{rendered:await this.renderWalkthroughStep(n)}}async renderWalkthroughStep(e){let t=this.walkthroughGuide;if(!t)return false;this.walkthrough&&(we(this.walkthrough),this.walkthrough=null);let n={onNext:()=>{let l=this.walkthroughIndex+1;if(l>=t.guideSteps.length){this.close();return}this.walkthroughIndex=l,this.renderWalkthroughStep(l);},onBack:()=>{let l=this.walkthroughIndex-1;l<0||(this.walkthroughIndex=l,this.renderWalkthroughStep(l));},onSkip:()=>this.close(),onComplete:()=>this.close()},r=t.guideSteps[e]?.style?.render;if(r==="modal"||r==="banner"){let l=r==="modal"?new ae:new re;try{l.render({guide:t,onInteraction:()=>{},onClose:()=>this.close(!0),nav:{stepIndex:e,totalSteps:t.guideSteps.length,callbacks:n}});}catch{return we(l),false}return this.walkthroughGuide!==t?(we(l),false):(this.walkthrough=l,true)}let s=new Oe,a=false;try{a=await s.render({guide:t,currentStepIndex:e,callbacks:n});}catch{a=false;}return !a||this.walkthroughGuide!==t?(we(s),false):(this.walkthrough=s,true)}},ut=null;function pt(o){return je()?(ut||(ut=new Tt),ut.preview(o)):{close:()=>{},ready:Promise.resolve({rendered:false}),host:()=>null}}function Fn(){ut?.close();}function li(o){let e=o.activationRules?.selector,t={url:o.activationRules?.url??{type:"prefix",pattern:"/"},trigger:"immediate",...e!==void 0?{selector:e}:{}};return {guideId:ai,guideName:o.guideName??"Preview",guideType:o.guideType,guideSteps:o.guideSteps,activationRules:t,displayFrequency:"always",displayPriority:0}}function di(o){switch(o){case "modal":return new ae;case "banner":return new re;case "tooltip":return new _e;case "custom":return new Pe;case "inline":return new Ne;case "inline-custom":return new Me;case "form":return new Le;case "inline-form":return new Ge;case "badge":return new Ie;case "composite":return new be;case "walkthrough":return null;default:return null}}function we(o){try{o.destroy();}catch{}}var ci="veo:preview_token";function ui(){try{return window.sessionStorage}catch{return null}}function Wn(){try{ui()?.removeItem(ci);}catch{}}var ft=null;async function zn(o){if(!je())return null;ft?.teardown();let e=null;try{let p=await fetch(`${o.apiUrl}/v1/guides/preview-resolve`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":o.apiKey},body:JSON.stringify({token:o.token})});p.ok?e=(await p.json()).guide??null:o.debug&&console.warn("[veo] preview-resolve respondi\xF3",p.status);}catch(p){o.debug&&console.warn("[veo] preview-resolve fall\xF3:",p);}let t=async p=>{if(!e)return false;let f=window.veo,m=f?.getEndUserId?.()??f?.getAnonymousId?.()??null;if(!m)return false;try{return (await fetch(`${o.apiUrl}/v1/guides/${e.guideId}/form-response`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":o.apiKey},body:JSON.stringify({endUserId:m,answers:p})})).ok}catch{return false}},n=null,i=null,r=null,s=e?`Vista previa: ${e.guideName}`:"",a=()=>{i&&clearTimeout(i),i=null,r?.(),r=null;},l=()=>{if(!e)return;n?.close();let p;if(e.guideType==="composite"){let m=e.guideSteps.findIndex(h=>J(h.pageLocation,window.location.href));if(m===-1){c.setLabel(`${s} \xB7 ning\xFAn paso aplica a esta p\xE1gina`);return}p=m;}c.setLabel(s),n=pt({guideType:e.guideType,guideSteps:e.guideSteps,activationRules:e.activationRules,guideName:e.guideName,...p!==void 0?{startStepIndex:p}:{},formSubmit:t,formSubmitNote:"Vista previa: guardado en TU usuario para probar el flujo."});},d=()=>{if(!e)return;a();let p=e.activationRules,f=p.selector?.trim();if((p.trigger==="on_click"||p.trigger==="on_hover")&&f&&!ue(p)){let h=p.trigger==="on_hover"?"pasa el mouse por":"haz clic en";c.setLabel(`${s} \xB7 ${h} el elemento objetivo`);let v=y=>{let g=y.target;if(g instanceof Element&&!g.closest("[data-veo-preview-chip],[data-veo-guide]")){try{if(!g.closest(f))return}catch{return}a(),l();}};document.addEventListener("click",v,true),p.trigger==="on_hover"&&document.addEventListener("mouseover",v,true),r=()=>{document.removeEventListener("click",v,true),document.removeEventListener("mouseover",v,true);};return}let m=$e(p);if(m>0){c.setLabel(`${s} \xB7 aparece en ${Math.round(m/1e3)} s`),i=setTimeout(()=>{i=null,l();},m);return}l();},c=pi({label:e?s:"Link de preview inv\xE1lido o vencido",error:!e,onReshow:e?d:null,onClose:()=>u.teardown()}),u={teardown(){a(),n?.close(),n=null,c.remove(),Wn(),ft===u&&(ft=null);}};return ft=u,d(),u}function pi(o){let e=document.createElement("div");e.setAttribute("data-veo-preview-chip","");let t=e.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=`
|
|
635
|
+
`;var k=class{constructor(){this.host=null;this.shadow=null;this.cleanups=[];this.liveContainer=null;this.liveContent=null;this.liveBuild=null;this.liveKey="";}liveKeyOf(e){return ""}onLiveUpdate(e){}updateStep(e){if(!this.host||!this.liveContainer||!this.liveContent||!this.liveBuild||this.liveKeyOf(e)!==this.liveKey)return false;let t=this.liveBuild(e);return this.liveContainer.replaceChild(t,this.liveContent),this.liveContent=t,this.applyDesign(e.style),this.onLiveUpdate(e),true}createHost(){let e=document.createElement("div");e.setAttribute(zt,"");let t=e.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=Po,t.appendChild(o);let i=document.createElement("div");return t.appendChild(i),document.body.appendChild(e),this.host=e,this.shadow=t,{host:e,shadow:t,root:i}}applyDesign(e){this.host&&Lo(this.host,e);}registerCleanup(e){this.cleanups.push(e);}hostElement(){return this.host}destroy(){for(let e of this.cleanups)try{e();}catch{}this.cleanups=[],this.host?.parentNode&&this.host.parentNode.removeChild(this.host),this.host=null,this.shadow=null;}};var Jn={top:"bottom",bottom:"top",left:"right",right:"left"};function ae(n,e,t){let o=Jn[e.split("-")[0]??"bottom"]??"top";for(let i of ["top","bottom","left","right"])n.style.setProperty(i,"");t?.x!=null&&n.style.setProperty("left",`${t.x}px`),t?.y!=null&&n.style.setProperty("top",`${t.y}px`),n.style.setProperty(o,"-6px");}var ei=150,Pe=class extends k{constructor(){super(...arguments);this.tooltip=null;this.arrowEl=null;this.badgeBtn=null;this.open=false;this.shownEmitted=false;this.trigger="hover";this.side="top";this.closeTimer=null;this.stopFloat=null;}async render(t){let o=t.guide.guideSteps[0];if(!o)return;let i=o.selector??t.guide.activationRules.selector;if(typeof i!="string"||i.length===0)return;let r=await E(i);if(!r)return;let{host:s,root:a}=this.createHost(),l=a.ownerDocument??document;this.applyDesign(o.style);let d=o.style?.width;typeof d=="number"&&Number.isFinite(d)&&s.style.setProperty("--veo-badge-tip-width",`${Math.min(720,Math.max(220,d))}px`),this.trigger=o.style?.badgeTrigger==="click"?"click":"hover";let c=o.style?.tooltipPlacement;this.side=c==="bottom"||c==="left"||c==="right"?c:"top";let m=Y(o.style);s.style.display="inline-flex",s.style.verticalAlign="middle";let p=No(Mo(o),l);a.appendChild(p),this.badgeBtn=p,_(r,s,m),this.registerCleanup(G(s,i,m));let u=l.createElement("div");u.className="veo-tooltip veo-badge-tooltip",u.style.display="none";let f=(w,x)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:w,...x?{metadata:x}:{}});},h=w=>N(w,l,{onCtaClick:(x,C,S)=>{f("cta_clicked",S),x==="url"&&C&&window.open(C,"_blank","noopener,noreferrer"),this.closeTooltip(),x==="guide"&&C&&t.onOpenGuide?.(C);},onDismiss:()=>this.closeTooltip()}),g=h(o);u.appendChild(g);let y=l.createElement("div");y.className="veo-tooltip-arrow",u.appendChild(y),a.appendChild(u),this.tooltip=u,this.arrowEl=y,this.liveContainer=u,this.liveContent=g,this.liveKey=this.liveKeyOf(o),this.liveBuild=h;let v=()=>{this.cancelClose(),this.open||(this.openTooltip(p),this.shownEmitted||(this.shownEmitted=true,f("shown")));};if(this.trigger==="hover"){let w=()=>{this.cancelClose(),this.closeTimer=window.setTimeout(()=>this.closeTooltip(),ei);};p.addEventListener("mouseenter",v),p.addEventListener("focus",v),p.addEventListener("mouseleave",w),p.addEventListener("blur",w),u.addEventListener("mouseenter",()=>this.cancelClose()),u.addEventListener("mouseleave",w);}else {p.addEventListener("click",()=>{this.open?this.closeTooltip():v();});let w=x=>{this.open&&(x.composedPath().includes(s)||this.closeTooltip());};document.addEventListener("click",w,true),this.registerCleanup(()=>document.removeEventListener("click",w,true));}let b=w=>{w.key==="Escape"&&this.open&&this.closeTooltip();};document.addEventListener("keydown",b),this.registerCleanup(()=>document.removeEventListener("keydown",b)),t.isPreview&&v();}liveKeyOf(t){let o=t.selector??"",i=Y(t.style),r=t.style?.badgeTrigger==="click"?"click":"hover";return `${o}|${i}|${r}`}onLiveUpdate(t){if(this.badgeBtn){let i=this.badgeBtn.ownerDocument,r=No(Mo(t),i);this.badgeBtn.className=r.className,this.badgeBtn.setAttribute("style",r.getAttribute("style")??""),this.badgeBtn.replaceChildren(...Array.from(r.childNodes));}let o=t.style?.tooltipPlacement;this.side=o==="bottom"||o==="left"||o==="right"?o:"top",this.open&&this.badgeBtn&&this.position(this.badgeBtn);}destroy(){this.cancelClose(),this.stopFloat?.(),this.stopFloat=null,this.tooltip=null,this.arrowEl=null,this.badgeBtn=null,this.open=false,super.destroy();}openTooltip(t){if(!this.tooltip)return;this.tooltip.style.display="block",this.open=true,this.position(t);let o=()=>{this.position(t);};window.addEventListener("scroll",o,true),window.addEventListener("resize",o),this.stopFloat=()=>{window.removeEventListener("scroll",o,true),window.removeEventListener("resize",o);};}closeTooltip(){this.cancelClose(),!(!this.tooltip||!this.open)&&(this.tooltip.style.display="none",this.open=false,this.stopFloat?.(),this.stopFloat=null);}cancelClose(){this.closeTimer!==null&&(window.clearTimeout(this.closeTimer),this.closeTimer=null);}async position(t){let o=this.tooltip,i=this.arrowEl;if(!o||!i)return;let{x:r,y:s,placement:a,middlewareData:l}=await K(t,o,{strategy:"fixed",placement:this.side,middleware:[U(8),j(),q({padding:8}),re({element:i})]});o.style.left=`${r}px`,o.style.top=`${s}px`,ae(i,a,l.arrow);}};function Mo(n){let e=n.style?.badge;if(!e||typeof e!="object")return {kind:"icon"};let t=e;return {kind:t.kind==="dot"||t.kind==="pill"||t.kind==="text"||t.kind==="image"||t.kind==="icon"?t.kind:"icon",icon:typeof t.icon=="string"?t.icon:null,text:typeof t.text=="string"?t.text:null,imageUrl:typeof t.imageUrl=="string"?t.imageUrl:null,color:typeof t.color=="string"&&V.test(t.color.trim())?t.color.trim():null,size:typeof t.size=="number"&&Number.isFinite(t.size)?t.size:null}}function Xe(n,e,t){return Math.min(t,Math.max(e,n))}function No(n,e){let t=e.createElement("button");t.type="button",t.className=`veo-badge veo-badge--${n.kind}`,t.setAttribute("aria-label","M\xE1s informaci\xF3n");let o=Xe(n.size??18,8,48);switch(n.kind){case "dot":t.style.width=`${o}px`,t.style.height=`${o}px`,n.color&&(t.style.background=n.color);break;case "pill":{t.textContent=n.text?.slice(0,24)||"Nuevo",t.style.fontSize=`${Xe(Math.round(o*.62),8,24)}px`,n.color&&(t.style.background=n.color);break}case "text":{t.textContent=n.text?.slice(0,32)||"Nuevo",t.style.fontSize=`${Xe(Math.round(o*.7),9,28)}px`,n.color&&(t.style.color=n.color);break}case "image":{if(n.imageUrl&&A(n.imageUrl)){let i=e.createElement("img");i.src=n.imageUrl,i.alt="",i.style.width=`${o}px`,i.style.height=`${o}px`,t.appendChild(i);}else t.className="veo-badge veo-badge--icon",t.textContent="?",t.style.width=`${o}px`,t.style.height=`${o}px`,t.style.fontSize=`${Xe(Math.round(o*.62),8,32)}px`;break}default:{t.textContent=(n.icon||"\u2139\uFE0F").slice(0,4),t.style.width=`${o}px`,t.style.height=`${o}px`,t.style.fontSize=`${Xe(Math.round(o*.62),8,32)}px`,n.color&&(t.style.color=n.color);break}}return t}function Me(n,e,t,o,i){let r=o.createElement("div");r.className="veo-guide-content";let s=o.createElement("div");s.className="veo-walkthrough-counter",s.textContent=`Paso ${e+1} de ${t}`,r.appendChild(s);let a=o.createElement("div");a.className="veo-walkthrough-progress";for(let f=0;f<t;f++){let h=o.createElement("span");h.className="veo-walkthrough-progress-dot",f<e&&h.classList.add("completed"),f===e&&h.classList.add("active"),a.appendChild(h);}r.appendChild(a);for(let f of Io(n,o))r.appendChild(f);let l=o.createElement("div");l.className="veo-walkthrough-actions";let d=o.createElement("button");d.type="button",d.className="veo-walkthrough-skip",d.textContent="Omitir",d.addEventListener("click",()=>i.onSkip()),l.appendChild(d);let c=o.createElement("div");if(c.className="veo-walkthrough-actions-right",e>0){let f=o.createElement("button");f.type="button",f.className="veo-walkthrough-btn-secondary",f.textContent="Atr\xE1s",f.addEventListener("click",()=>i.onBack()),c.appendChild(f);}let m=e===t-1,p=o.createElement("button");p.type="button",p.className="veo-guide-cta";let u=m?"Finalizar":"Siguiente";return p.textContent=typeof n.ctaText=="string"&&n.ctaText?n.ctaText:u,p.addEventListener("click",()=>{m?i.onComplete():i.onNext();}),c.appendChild(p),l.appendChild(c),r.appendChild(l),r.appendChild(be(o,()=>i.onSkip())),r}var le=class extends k{async render(e){let t=e.nav?.stepIndex??0,o=e.guide.guideSteps[t];if(!o)return;let i=o.style?.position==="bottom"?"bottom":"top",r=o.selector?.trim()||null,s=null;if(r&&(s=await E(r),!s))return;let{host:a,root:l}=this.createHost();this.applyDesign(o.style);let d=l.ownerDocument??document,c=d.createElement("div");c.className=_o(i,!!s);let m=(u,f,h)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:u,...h?{metadata:h}:{}}),f&&window.open(f,"_blank","noopener,noreferrer"),e.onClose();},p=e.nav?Me(o,e.nav.stepIndex,e.nav.totalSteps,d,e.nav.callbacks):N(o,d,{onCtaClick:(u,f,h)=>{m("cta_clicked",u==="url"?f:void 0,h),u==="guide"&&f&&e.onOpenGuide?.(f);},onDismiss:()=>m("dismissed")});if(c.appendChild(p),l.appendChild(c),r&&s){a.style.display="block";let u=i==="top"?"prepend":"append";_(s,a,u),this.registerCleanup(G(a,r,u));}e.nav||(this.liveContainer=c,this.liveContent=p,this.liveBuild=u=>N(u,d,{onCtaClick:(f,h,g)=>{m("cta_clicked",f==="url"?h:void 0,g),f==="guide"&&h&&e.onOpenGuide?.(h);},onDismiss:()=>m("dismissed")}),this.liveKey=this.liveKeyOf(o),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"}));}liveKeyOf(e){let t=e.selector?.trim()??"";if(!t)return "";let o=e.style?.position==="bottom"?"bottom":"top";return `${t}|${o}`}onLiveUpdate(e){if(this.liveContainer){let t=e.style?.position==="bottom"?"bottom":"top",o=!!e.selector?.trim();this.liveContainer.className=_o(t,o);}}};function _o(n,e){return e?"veo-banner veo-banner-embedded":`veo-banner veo-banner-${n}`}var ee={iconEmptyColor:"#e7e2de",iconFillColor:"#406a31",barColor:"#406a31",barHeight:8,fontSize:14,fontWeight:600,titleColor:"#2c2825",subtitleColor:"#8a8582",subtitleTemplate:"Completado <%= currentStep %> de <%= totalSteps %> pasos"},Go={regular:400,medium:500,semibold:600,bold:700};function ti(n){let e=n??{},t=(a,l)=>typeof e[a]=="string"&&e[a].trim()?e[a]:l,o=(a,l,d,c)=>typeof e[a]=="number"&&Number.isFinite(e[a])?Math.min(c,Math.max(d,e[a])):l,i=e.fontWeight,r=typeof i=="number"?Math.min(900,Math.max(100,i)):typeof i=="string"&&Go[i.toLowerCase()]?Go[i.toLowerCase()]:ee.fontWeight,s=e.colorMode==="dark";return {colorMode:s?"dark":"light",iconEmptyColor:t("iconEmptyColor",s?"#3c3734":ee.iconEmptyColor),iconFillColor:t("iconFillColor",ee.iconFillColor),barColor:t("barColor",ee.barColor),barHeight:o("barHeight",ee.barHeight,2,40),fontSize:o("fontSize",ee.fontSize,10,40),fontWeight:r,titleColor:t("titleColor",s?"#f5efeb":ee.titleColor),subtitleColor:t("subtitleColor",s?"#b0a9a5":ee.subtitleColor),subtitleTemplate:t("subtitleTemplate",ee.subtitleTemplate)}}function oi(n,e){return n.replace(/<%=\s*currentStep\s*%>/g,String(e.currentStep)).replace(/<%=\s*totalSteps\s*%>/g,String(e.totalSteps))}var Rt=10,$o=2*Math.PI*Rt;function ni(n,e,t,o){let i="http://www.w3.org/2000/svg",r=n.createElementNS(i,"svg");r.setAttribute("viewBox","0 0 28 28"),r.setAttribute("class","veo-checklist-ring"),r.setAttribute("aria-hidden","true");let s=n.createElementNS(i,"circle");if(s.setAttribute("cx","14"),s.setAttribute("cy","14"),s.setAttribute("r",String(Rt)),s.setAttribute("fill",t?o.iconFillColor:"none"),s.setAttribute("stroke",o.iconEmptyColor),s.setAttribute("stroke-width","4.5"),r.appendChild(s),t){let l=n.createElementNS(i,"path");return l.setAttribute("d","M9 14.5l3.2 3.2L19 11"),l.setAttribute("fill","none"),l.setAttribute("stroke","#fff"),l.setAttribute("stroke-width","2.4"),l.setAttribute("stroke-linecap","round"),l.setAttribute("stroke-linejoin","round"),r.appendChild(l),r}let a=Math.max(0,Math.min(1,e));if(a>0){let l=n.createElementNS(i,"circle");l.setAttribute("cx","14"),l.setAttribute("cy","14"),l.setAttribute("r",String(Rt)),l.setAttribute("fill","none"),l.setAttribute("stroke",o.iconFillColor),l.setAttribute("stroke-width","4.5"),l.setAttribute("stroke-linecap","butt"),l.setAttribute("stroke-dasharray",`${($o*a).toFixed(2)} ${$o.toFixed(2)}`),l.setAttribute("transform","rotate(-90 14 14)"),r.appendChild(l);}return r}function Bo(n,e,t){let o=ti(n.style),i=(n.items??[]).filter(f=>f&&typeof f.guideId=="string"&&f.guideId),r=e.createElement("div");if(r.className=`veo-checklist${o.colorMode==="dark"?" veo-checklist--dark":""}`,r.style.setProperty("--veo-cl-font-size",`${o.fontSize}px`),r.style.setProperty("--veo-cl-font-weight",String(o.fontWeight)),r.style.setProperty("--veo-cl-title",o.titleColor),r.style.setProperty("--veo-cl-subtitle",o.subtitleColor),r.style.setProperty("--veo-cl-bar",o.barColor),r.style.setProperty("--veo-cl-bar-h",`${o.barHeight}px`),typeof n.html=="string"&&n.html||typeof n.text=="string"&&n.text){let f=e.createElement("div");f.className="veo-checklist-title",typeof n.html=="string"&&n.html?f.appendChild(Ae(n.html,e)):f.textContent=n.text,r.appendChild(f);}let s=e.createElement("div");s.className="veo-checklist-items",s.setAttribute("role","list"),r.appendChild(s);let a=e.createElement("div");a.className="veo-checklist-footer";let l=e.createElement("div");l.className="veo-checklist-summary";let d=e.createElement("span");d.className="veo-checklist-count";let c=e.createElement("span");c.className="veo-checklist-percent",l.append(d,c);let m=e.createElement("div");m.className="veo-checklist-bar";let p=e.createElement("div");p.className="veo-checklist-bar-fill",m.appendChild(p),a.append(l,m),r.appendChild(a);let u=f=>{s.textContent="";let h=f?i.filter(b=>f.has(b.guideId)):i,g=0;for(let b of h){let w=f?.get(b.guideId)??null;w?.completed&&g++;let x=e.createElement("button");x.type="button",x.className=`veo-checklist-item${w?.completed?" veo-checklist-item--done":""}`,x.setAttribute("role","listitem");let C=w&&w.totalSteps>0?w.currentStep/w.totalSteps:0;x.appendChild(ni(e,C,w?.completed===true,o));let S=e.createElement("span");S.className="veo-checklist-texts";let R=e.createElement("span");if(R.className="veo-checklist-label",R.textContent=(b.text??"").trim()||w?.guideName||"Gu\xEDa",w&&w.published===false&&(x.title="Gu\xEDa no publicada: los usuarios no la ver\xE1n"),S.appendChild(R),w){let P=e.createElement("span");P.className="veo-checklist-sub",P.textContent=oi(o.subtitleTemplate,w),S.appendChild(P);}x.appendChild(S),x.addEventListener("click",P=>{if(P.preventDefault(),P.stopPropagation(),t.isPreview)return;let O=w&&!w.completed?Math.min(w.currentStep,w.totalSteps-1):0;t.onOpenGuideAt?t.onOpenGuideAt(b.guideId,O):t.onOpenGuide?.(b.guideId);}),s.appendChild(x);}let y=h.length,v=y>0?Math.round(g/y*100):0;d.textContent=`${g} de ${y} ${y===1?"completada":"completadas"}`,c.textContent=`${v}%`,p.style.width=`${v}%`,a.hidden=y===0;};if(t.isPreview&&i.length===0){let f=new Map([["__sample_1",{guideId:"__sample_1",guideName:"Configura tu primer env\xEDo",totalSteps:2,currentStep:1,completed:false}],["__sample_2",{guideId:"__sample_2",guideName:"Conecta tu tienda",totalSteps:2,currentStep:2,completed:true}]]);i.push({guideId:"__sample_1",text:"Configura tu primer env\xEDo"},{guideId:"__sample_2",text:"Conecta tu tienda"}),u(f);let h=e.createElement("p");return h.className="veo-checklist-empty",h.textContent="Ejemplo: agrega gu\xEDas a la lista desde Opciones.",r.appendChild(h),r}return u(null),t.fetchProgress&&i.length>0&&t.fetchProgress(i.map(f=>f.guideId)).then(f=>u(new Map(f.map(h=>[h.guideId,h])))).catch(()=>{}),r}function Oo(){let e=Date.now().toString(16).padStart(12,"0"),t=new Uint8Array(10);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")crypto.getRandomValues(t);else for(let i=0;i<t.length;i++)t[i]=Math.floor(Math.random()*256);t[0]=(t[0]??0)&15|112,t[2]=(t[2]??0)&63|128;let o=Array.from(t,i=>i.toString(16).padStart(2,"0")).join("");return [e.slice(0,8),e.slice(8,12),o.slice(0,4),o.slice(4,8),o.slice(8,20)].join("-")}function Ne(n,e,t,o){let i=n.createElement("iframe");i.className="veo-custom-frame",i.setAttribute("sandbox","allow-scripts"),i.setAttribute("title",t.guide.guideName||"OnUser"),i.style.width=o.width;let r=o.fixedHeight!==void 0&&o.fixedHeight!==null;r&&(i.style.height=At(o.fixedHeight));let s=Oo(),a=e.style?.tailwind===true;i.srcdoc=li(e.html??"",e.css??"",e.js??"",s,{hostCss:ri(),htmlAttrs:si(),tailwind:a});let l=()=>t.onClose(),d=c=>{if(c.source!==i.contentWindow)return;let m=c.data;if(!(!m||typeof m!="object"||m.__veo!==s))switch(m.type){case "dismiss":t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"dismissed"}),l();break;case "cta":t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"cta_clicked"}),typeof m.url=="string"&&A(m.url)&&window.open(m.url,"_blank","noopener,noreferrer"),m.close!==false&&l();break;case "navigate":typeof m.url=="string"&&A(m.url)&&window.location.assign(m.url);break;case "track":typeof m.name=="string"&&t.onTrack&&t.onTrack(m.name,ai(m.props)?m.props:void 0);break;case "resize":!r&&typeof m.height=="number"&&m.height>0&&(i.style.height=`${Math.ceil(m.height)}px`);break}};return window.addEventListener("message",d),{iframe:i,cleanup:()=>window.removeEventListener("message",d)}}function At(n){return typeof n=="number"?`${n}px`:n}var ii=800*1024;function ri(){if(typeof document>"u")return "";let n="";try{for(let e of Array.from(document.styleSheets)){let t=null;try{t=e.cssRules;}catch{continue}if(t){for(let o of Array.from(t))if(n+=`${o.cssText}
|
|
636
|
+
`,n.length>ii)return n}}}catch{return n}return n}function si(){if(typeof document>"u")return "";try{let n=document.documentElement,e=[];for(let t of ["class","style","data-theme","data-mode","data-color-mode"]){let o=n.getAttribute(t);o&&o.length<=1e3&&!/["<>]/.test(o)&&e.push(`${t}="${o}"`);}return e.join(" ")}catch{return ""}}function ai(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function li(n,e,t,o,i){let r=`(function(){var T=${JSON.stringify(o)};function P(m){m.__veo=T;parent.postMessage(m,'*');}window.veo={dismiss:function(){P({type:'dismiss'});},cta:function(u){P({type:'cta',url:u});},track:function(n,p){P({type:'track',name:n,props:p||{}});},navigate:function(u){P({type:'navigate',url:u});}};document.addEventListener('click',function(e){var a=e.target&&e.target.closest?e.target.closest('a[href]'):null;if(!a)return;var h=a.getAttribute('href');if(!h||h.charAt(0)==='#'||/^(javascript|mailto|tel):/i.test(h))return;e.preventDefault();if(a.target==='_blank'){P({type:'cta',url:a.href,close:false});}else{P({type:'navigate',url:h});}},true);function H(){var r=document.getElementById('__veo_root');var h=r?r.getBoundingClientRect().height:document.documentElement.scrollHeight;P({type:'resize',height:Math.ceil(h)});}window.addEventListener('load',H);try{if(typeof ResizeObserver!=='undefined'){var _r=document.getElementById('__veo_root');new ResizeObserver(H).observe(_r||document.documentElement);}}catch(e){}})();`,s=i.hostCss?`<style>${Tt(i.hostCss,"style")}</style>`:"",a=i.tailwind?'<script src="https://cdn.tailwindcss.com"></script>':"";return `<!DOCTYPE html><html ${i.htmlAttrs}><head><meta charset="utf-8"><style>html,body{margin:0;padding:0;}body{font-family:system-ui,-apple-system,sans-serif;}</style>`+s+"<style>html,body{margin:0!important;padding:0!important;background:transparent!important;height:auto!important;min-height:0!important;max-height:none!important;width:auto!important;min-width:0!important;overflow:visible!important;color-scheme:normal!important;}</style>"+a+`<style>${Tt(e,"style")}</style></head><body style="margin:0!important;background:transparent!important;min-height:0!important;height:auto!important;"><div id="__veo_root">${n}</div><script>${r}</script>`+(t?`<script>${Tt(t,"script")}</script>`:"")+"</body></html>"}function Tt(n,e){let t=e==="script"?/<\/script/gi:/<\/style/gi;return n.replace(t,`<\\/${e}`)}var di="data-veo-raw-block";function ci(n,e,t){let o=n.parentNode;if(t==="prepend"){let i=n.firstChild;for(let r of e)n.insertBefore(r,i);}else if(t==="append")for(let i of e)n.appendChild(i);else if(t==="before")for(let i of e)o?.insertBefore(i,n);else {let i=n;for(let r of e)o?.insertBefore(r,i.nextSibling),i=r;}}var ui=0;function Lt(n,e,t,o,i){if(n.sandboxed){let d={html:n.html??"",css:n.css,js:n.js},{iframe:c,cleanup:m}=Ne(e,d,t,{width:"100%"}),p=e.createElement("div");return p.className="veo-code-sandbox",p.appendChild(c),{node:p,cleanup:m}}let r=e,s=[];if(typeof n.css=="string"&&n.css.trim()){let d=r.createElement("style");d.textContent=n.css,r.head.appendChild(d),s.push(d);}let a=null;if(typeof n.html=="string"&&n.html.trim()){let d=e.createElement("div");d.className="veo-code-html",d.innerHTML=n.html;for(let c of Array.from(d.querySelectorAll("script")))s.push(mi(c,r)),c.remove();if(i){let c=Array.from(d.childNodes);if(i.tagBlockId)for(let m of c)m instanceof Element&&m.setAttribute(di,i.tagBlockId);ci(i.anchor,c,i.pos),s.push(...c);}else if(o){let c=`veo-code-${++ui}`;d.slot=c,o.appendChild(d),s.push(d);let m=e.createElement("slot");m.setAttribute("name",c);let p=e.createElement("div");p.className="veo-code-host",p.appendChild(m),a=p;}else a=d;}let l=false;if(typeof n.js=="string"&&n.js.trim()){let d=n.js,c=()=>{if(l)return;let m=r.createElement("script");m.textContent=pi(d),r.body.appendChild(m),s.push(m);};o&&!o.isConnected?queueMicrotask(c):c();}return {node:a,cleanup:()=>{l=true;for(let d of s)d.parentNode?.removeChild(d);}}}function pi(n){return `(function(){try{
|
|
637
|
+
${n}
|
|
638
|
+
}catch(e){console.error("[OnUser] Error en el bloque de c\xF3digo:",e)}})();`}function mi(n,e){let t=e.createElement("script");for(let o of Array.from(n.attributes))t.setAttribute(o.name,o.value);return n.src||(t.textContent=n.textContent),e.body.appendChild(t),t}function pt(n,e,t){let o=e.guide.guideSteps[0];if(!o)return;let i=o.fields??[],r=()=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"dismissed"}),e.onClose();},s=t.createElement("div");if(s.className="veo-guide-content",o.title){let p=t.createElement("h2");p.className="veo-guide-title",p.textContent=o.title,s.appendChild(p);}if(o.content){let p=t.createElement("p");p.className="veo-guide-text",p.textContent=o.content,s.appendChild(p);}let a=[],l=t.createElement("form");l.className="veo-form",l.noValidate=true;for(let p of i){let{wrapper:u,read:f}=Pt(p,t);a.push({field:p,read:f}),l.appendChild(u);}let d=t.createElement("p");d.className="veo-form-error",d.style.display="none",l.appendChild(d);let c=t.createElement("div");c.className="veo-guide-actions";let m=t.createElement("button");m.type="submit",m.className="veo-guide-cta",m.textContent=o.ctaText||"Enviar",c.appendChild(m),l.appendChild(c),l.addEventListener("submit",p=>{p.preventDefault(),d.style.display="none";let u={};for(let{field:h,read:g}of a){let y=g();if(y==null||y===""){if(h.required){d.textContent=`Completa "${h.label}"`,d.style.display="block";return}continue}u[h.key]=y;}if(Object.keys(u).length===0){d.textContent="Responde al menos un campo",d.style.display="block";return}m.disabled=true,(e.onFormSubmit??(()=>Promise.resolve(true)))(u).then(h=>{if(!h){m.disabled=false,d.textContent="No se pudo enviar. Prueba de nuevo.",d.style.display="block";return}e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"completed"});let g=e.isPreview?e.previewNote??"Vista previa: la respuesta NO se guard\xF3.":null;fi(n,t,g),window.setTimeout(()=>e.onClose(),g?2200:1400);});}),s.appendChild(l),s.appendChild(be(t,r)),n.appendChild(s);}function fi(n,e,t){for(;n.firstChild;)n.removeChild(n.firstChild);let o=e.createElement("div");if(o.className="veo-form-thanks",o.textContent="\u2713 \xA1Gracias por tu respuesta!",n.appendChild(o),t){let i=e.createElement("p");i.className="veo-form-preview-note",i.textContent=t,n.appendChild(i);}}function Pt(n,e){let t=e.createElement("div");t.className="veo-form-field";let o=e.createElement("label");switch(o.className="veo-form-label",o.textContent=n.required?`${n.label} *`:n.label,t.appendChild(o),n.type){case "textarea":{let i=e.createElement("textarea");return i.className="veo-form-input",i.rows=3,n.placeholder&&(i.placeholder=n.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()}}case "number":{let i=e.createElement("input");return i.type="number",i.className="veo-form-input",n.placeholder&&(i.placeholder=n.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()===""?void 0:Number(i.value)}}case "select":{let i=e.createElement("select");i.className="veo-form-input";let r=e.createElement("option");r.value="",r.textContent=n.placeholder||"Elige una opci\xF3n\u2026",i.appendChild(r);for(let s of n.options??[]){let a=e.createElement("option");a.value=s,a.textContent=s,i.appendChild(a);}return t.appendChild(i),{wrapper:t,read:()=>i.value||void 0}}case "radio":{let i=e.createElement("div");i.className="veo-form-options";let r=`veo-${n.key}`,s=[];for(let a of n.options??[]){let l=e.createElement("label");l.className="veo-form-option";let d=e.createElement("input");d.type="radio",d.name=r,d.value=a,s.push(d);let c=e.createElement("span");c.textContent=a,l.appendChild(d),l.appendChild(c),i.appendChild(l);}return t.appendChild(i),{wrapper:t,read:()=>s.find(a=>a.checked)?.value}}case "multiselect":{let i=e.createElement("div");i.className="veo-form-options";let r=[];for(let s of n.options??[]){let a=e.createElement("label");a.className="veo-form-option";let l=e.createElement("input");l.type="checkbox",l.value=s,r.push(l);let d=e.createElement("span");d.textContent=s,a.appendChild(l),a.appendChild(d),i.appendChild(a);}return t.appendChild(i),{wrapper:t,read:()=>{let s=r.filter(a=>a.checked).map(a=>a.value);return s.length>0?s:void 0}}}case "checkbox":{let i=e.createElement("label");i.className="veo-form-option";let r=e.createElement("input");r.type="checkbox";let s=e.createElement("span");return s.textContent=n.placeholder||"S\xED",i.appendChild(r),i.appendChild(s),t.appendChild(i),{wrapper:t,read:()=>r.checked?true:n.required?"":false}}case "yesno":{let i=e.createElement("div");i.className="veo-form-options";let r=`veo-${n.key}`,[s,a]=n.options?.length===2?n.options:["S\xED","No"],l=[];for(let{label:d,value:c}of [{label:s,value:true},{label:a,value:false}]){let m=e.createElement("label");m.className="veo-form-option";let p=e.createElement("input");p.type="radio",p.name=r,l.push({input:p,value:c});let u=e.createElement("span");u.textContent=d,m.appendChild(p),m.appendChild(u),i.appendChild(m);}return t.appendChild(i),{wrapper:t,read:()=>l.find(d=>d.input.checked)?.value}}case "nps":{let i=typeof n.min=="number"?n.min:0,r=typeof n.max=="number"&&n.max>i?n.max:10;return Do(t,e,i,r,"veo-nps-btn",void 0,{labels:n.scaleLabels??[],showLabels:n.showLabels!==false})}case "rating":return Do(t,e,1,5,"veo-rating-btn","\u2605");default:{let i=e.createElement("input");return i.type="text",i.className="veo-form-input",n.placeholder&&(i.placeholder=n.placeholder),t.appendChild(i),{wrapper:t,read:()=>i.value.trim()}}}}function Do(n,e,t,o,i,r,s={labels:[],showLabels:false}){let a=e.createElement("div");a.className="veo-form-scale";let l,d=[],c=p=>s.labels[p-t]?.trim()??"",m=s.showLabels&&Array.from({length:o-t+1},(p,u)=>t+u).some(p=>c(p));for(let p=t;p<=o;p++){let u=e.createElement("button");u.type="button",u.className=i,u.textContent=r??String(p);let f=c(p);if(u.setAttribute("aria-label",f?`${p} \xB7 ${f}`:String(p)),f&&(u.title=f),u.addEventListener("click",()=>{l=p,d.forEach((y,v)=>{let b=r?v+t<=p:v+t===p;y.classList.toggle("veo-scale-active",b);});}),d.push(u),!m){a.appendChild(u);continue}let h=e.createElement("div");h.className=`veo-scale-item${p===t?" veo-scale-item--first":p===o?" veo-scale-item--last":""}`;let g=e.createElement("span");g.className="veo-scale-label",g.textContent=f,h.append(u,g),a.appendChild(h);}return n.appendChild(a),{wrapper:n,read:()=>l}}function Fo(n){let e=new Map,t=[],o=-1;return n.forEach((i,r)=>{if(!i)return;let s;typeof i.row=="number"&&Number.isFinite(i.row)?(s=i.row,o=s):(s=o+.5,o=s);let a=typeof i.col=="number"&&Number.isFinite(i.col)?i.col:0,l=e.get(s);l||(l={row:s,columns:[]},e.set(s,l),t.push(s));let d=l.columns.find(c=>c.col===a);d||(d={col:a,blocks:[]},l.columns.push(d)),d.blocks.push({block:i,index:r});}),t.sort((i,r)=>i-r).map(i=>{let r=e.get(i);return r.columns.sort((s,a)=>s.col-a.col),r})}var mt=new WeakMap;function xe(n=document){let e=n.documentElement,t=n.body;if(!e||!t)return ()=>{};let o=mt.get(n);if(!o){o={count:0,html:{overflow:e.style.overflow,paddingRight:e.style.paddingRight},body:{overflow:t.style.overflow,paddingRight:t.style.paddingRight}},mt.set(n,o);let r=n.defaultView,s=r?Math.max(0,r.innerWidth-e.clientWidth):0;s>0&&(t.style.paddingRight=`${s}px`),e.style.overflow="hidden",t.style.overflow="hidden";}o.count+=1;let i=false;return ()=>{if(i)return;i=true;let r=mt.get(n);r&&(r.count-=1,!(r.count>0)&&(mt.delete(n),e.style.overflow=r.html.overflow,e.style.paddingRight=r.html.paddingRight,t.style.overflow=r.body.overflow,t.style.paddingRight=r.body.paddingRight));}}var Mt=n=>`veo:snooze:${n}`,Ho={hour:36e5,day:864e5,week:6048e5};function hi(n,e){return (Number.isFinite(n)&&n>0?Math.floor(n):1)*(Ho[e]??Ho.day)}function zo(n,e,t,o=Date.now()){try{localStorage.setItem(Mt(n),String(o+hi(e,t)));}catch{}}function Wo(n,e=Date.now()){try{let t=localStorage.getItem(Mt(n));if(t===null)return !1;let o=Number(t);return !Number.isFinite(o)||o<=e?(localStorage.removeItem(Mt(n)),!1):!0}catch{return false}}var Uo="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021",qo="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75",jo="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z",Nt="M21 12a9 9 0 11-18 0 9 9 0 0118 0z",gi="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",_t={info:{paths:[Nt,Uo],dots:[[12,8.25]]},exclamation:{paths:[Nt,"M12 8v4.5"],dots:[[12,15.75]]},question:{paths:[Nt,qo],dots:[[12,17.25]]},star:{paths:[jo]},"info-solid":{paths:[Uo],dots:[[12,8.25]],solid:true,scale:.8},"exclamation-solid":{paths:["M12 8v4.5"],dots:[[12,15.75]],solid:true,scale:.8},"question-solid":{paths:[qo],dots:[[12,17.25]],solid:true,scale:.8},"star-solid":{paths:[jo],solid:true,scale:.55},"target-solid":{paths:[gi],solid:true,scale:.6},new:{paths:[],text:"New"}},vi=14,yi=19e3,Ko=8;function de(n,e){return typeof n=="number"&&Number.isFinite(n)?n:e}function Vo(n,e,t,o){let i=_t[e]??_t.info;if(i.text){let d=n.createElement("span");return d.textContent=i.text,d.style.font=`700 ${Math.round(t*.85)}px/1 system-ui, -apple-system, sans-serif`,d.style.color=o,d}let r="http://www.w3.org/2000/svg",s=n.createElementNS(r,"svg");s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("width",String(t)),s.setAttribute("height",String(t)),s.setAttribute("fill","none"),s.setAttribute("aria-hidden","true");let a=i.solid?"#ffffff":o;if(i.solid){let d=n.createElementNS(r,"circle");d.setAttribute("cx","12"),d.setAttribute("cy","12"),d.setAttribute("r","12"),d.setAttribute("fill",o),s.appendChild(d);}let l=n.createElementNS(r,"g");if(l.setAttribute("stroke",a),l.setAttribute("stroke-width",i.solid?"2":"1.8"),l.setAttribute("stroke-linecap","round"),l.setAttribute("stroke-linejoin","round"),i.scale&&i.scale!==1){let d=i.scale,c=12-12*d;l.setAttribute("transform",`translate(${c} ${c}) scale(${d})`);}for(let d of i.paths){let c=n.createElementNS(r,"path");c.setAttribute("d",d),l.appendChild(c);}for(let[d,c]of i.dots??[]){let m=n.createElementNS(r,"circle");m.setAttribute("cx",String(d)),m.setAttribute("cy",String(c)),m.setAttribute("r","0.9"),m.setAttribute("fill",a),m.setAttribute("stroke","none"),l.appendChild(m);}return s.appendChild(l),s}function Yo(n,e){let t=de(e.size,vi),o=e.color||"#000000",i=n.createElement("span");if(i.className=`veo-badge-marker veo-badge-marker-${e.kind}`,i.style.display="inline-flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.boxSizing="border-box",i.style.lineHeight="1",e.kind==="image"){let r=n.createElement("img");return r.alt="",r.src=e.imageUrl||"",r.style.width=`${t}px`,r.style.height=`${t}px`,r.style.objectFit="contain",r.style.display="block",i.appendChild(r),i}if(e.kind==="icon-text"){i.style.gap="6px",i.style.color=o,i.style.fontSize=`${t}px`,i.style.fontFamily="inherit",i.style.fontWeight="600",i.style.whiteSpace="nowrap",i.style.background=e.bgColor||"transparent";let r=de(e.borderWidth,0);r>0&&(i.style.border=`${r}px solid ${e.borderColor||o}`),i.style.padding=`${de(e.paddingY,6)}px ${de(e.paddingX,10)}px`,i.style.borderRadius=`${de(e.radius,999)}px`,e.showIcon!==false&&i.appendChild(Vo(n,e.icon||"star",t,o));let s=n.createElement("span");return s.textContent=e.text||"",i.appendChild(s),i}return i.style.width=`${t}px`,i.style.height=`${t}px`,i.appendChild(Vo(n,e.icon||"info",t,o)),i}function bi(n,e,t,o){let i=n.left+n.width,r=n.top+n.height,s=n.top+n.height/2-e.height/2,a=n.left+n.width/2-e.width/2,l,d;switch(t){case "top-left":l=n.left-e.width/2,d=n.top-e.height/2;break;case "bottom-left":l=n.left-e.width/2,d=r-e.height/2;break;case "bottom-right":l=i-e.width/2,d=r-e.height/2;break;case "left":l=n.left-e.width-Ko,d=s;break;case "right":l=i+Ko,d=s;break;case "center":l=a,d=s;break;default:l=i-e.width/2,d=n.top-e.height/2;}return {x:l+o.x,y:d+o.y}}function Xo(n,e,t){e.style.position="absolute",e.style.zIndex=String(de(t.zIndex,yi)),e.style.margin="0";let o=()=>{let i=n.getBoundingClientRect(),r=e.getBoundingClientRect(),{x:s,y:a}=bi({left:i.left+window.scrollX,top:i.top+window.scrollY,width:i.width,height:i.height},{width:r.width,height:r.height},t.position??"top-right",{x:de(t.offsetX,0),y:de(t.offsetY,0)});e.style.left=`${Math.round(s)}px`,e.style.top=`${Math.round(a)}px`;};return o(),Co(n,e,o)}var $t={left:"flex-start",center:"center",right:"flex-end"},Qo={...$t,distribute:"space-between"},Zo={top:"flex-start",center:"center",bottom:"flex-end"};function wi(n,e){let t=n.style;typeof e.background=="string"&&e.background&&(t.background=e.background);for(let o of ["Top","Right","Bottom","Left"]){let i=e[`padding${o}`];typeof i=="number"&&Number.isFinite(i)&&t.setProperty(`padding-${o.toLowerCase()}`,`${i}px`);let r=e[`margin${o}`];typeof r=="number"&&Number.isFinite(r)&&t.setProperty(`margin-${o.toLowerCase()}`,`${r}px`);}typeof e.minHeight=="number"&&Number.isFinite(e.minHeight)&&e.minHeight>0&&(t.minHeight=`${e.minHeight}px`),e.align&&Qo[e.align]&&(t.justifyContent=Qo[e.align],n.classList.add("veo-row--aligned")),e.valign&&Zo[e.valign]&&(t.alignItems=Zo[e.valign]);}var Ce=class extends k{async render(e){let t=e.nav?.stepIndex??0,o=e.guide.guideSteps[t];if(!o)return;let i=o.badge?.enabled===true,r=(o.position==="relative-to-element"||o.presentation==="inline"||i)&&o.anchorSelector?.trim()||void 0,s=null;if(r&&(s=await E(r),!s))return;let a=o.blocks??[],l=a.length===1&&a[0]?.type==="code"?a[0]:void 0;if(o.presentation==="inline"&&s&&l&&!l.sandboxed){let v=s.ownerDocument??document,{cleanup:b}=Lt(l,v,e,void 0,{anchor:s,pos:Gt(o.inlinePosition),...e.isPreview&&l.editorId?{tagBlockId:l.editorId}:{}});this.registerCleanup(b),e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:"shown"});return}let{host:d,root:c}=this.createHost(),m=c.ownerDocument??document,p=o.design??{};typeof p.zIndex=="number"&&(d.style.zIndex=String(p.zIndex));let u=m.createElement("div");u.className="veo-card",Ai(u,p),typeof p.ariaLabel=="string"&&p.ariaLabel.trim()&&(u.setAttribute("role","dialog"),u.setAttribute("aria-label",p.ariaLabel.trim()));let f=(v,b)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:v,...{}});},h=[];if(this.buildContent(u,o.blocks??[],m,e,t,h,d),a.length===0&&(u.classList.add("veo-card--empty"),e.isPreview)){let v=m.createElement("div");v.className="veo-card-empty-zone";let b=m.createElement("b");b.textContent="+";let w=m.createElement("span");w.textContent="Clic para agregar contenido",v.append(b,w),u.appendChild(v);let x=()=>{u.classList.toggle("veo-card--narrow",u.clientWidth<Ti);};if(typeof ResizeObserver<"u"){let C=new ResizeObserver(x);C.observe(u),this.registerCleanup(()=>C.disconnect());}x();}let g=u.lastElementChild;g&&!g.style.marginBottom&&(g.style.marginBottom="0");let y=null;if(p.closeButton!==false){let v=be(m,()=>{if(y){y();return}f("dismissed"),this.closeOrSkip(e);}),b=typeof p.closeColor=="string"?p.closeColor:null,w=typeof p.closeHoverColor=="string"?p.closeHoverColor:null;b&&(v.style.color=b);let x=typeof p.closePosition=="string"?p.closePosition:"top-right";Ei(v,x);for(let C of ["Top","Right","Bottom","Left"]){let S=p[`closePadding${C}`];typeof S=="number"&&v.style.setProperty(`padding-${C.toLowerCase()}`,`${S}px`);let R=p[`closeMargin${C}`];typeof R=="number"&&v.style.setProperty(`margin-${C.toLowerCase()}`,`${R}px`);}w&&(v.addEventListener("mouseenter",()=>{v.style.color=w;}),v.addEventListener("mouseleave",()=>{v.style.color=b??"";})),u.appendChild(v),ki(u,a,x,p);}if(i&&s){y=this.renderBadgeMode(o,u,s,r,d,c,m,e,t,p);return}if(o.presentation==="inline"&&s){d.style.display="block";let v=Gt(o.inlinePosition);c.appendChild(u),_(s,d,v),this.registerCleanup(G(d,r,v));}else if(o.position==="relative-to-element"&&s){if(p.backdrop===true){let w=m.createElement("div");w.className="veo-composite-overlay veo-composite-overlay--dim",typeof p.backdropColor=="string"&&(w.style.background=p.backdropColor);let x=typeof p.backdropZIndex=="number"?p.backdropZIndex:2e5;w.style.zIndex=String(x),c.appendChild(w),this.registerCleanup(xe(m)),p.targetAbove===true&&this.registerCleanup(Ii(s,x+1));}let v=m.createElement("div");v.className="veo-composite-anchored";let b=p.caret===false?null:en(m,p);b&&v.appendChild(b),v.appendChild(u),c.appendChild(v),this.registerCleanup(await tn(s,v,b));}else {let v=m.createElement("div");v.className="veo-composite-overlay",p.backdrop!==false&&(v.classList.add("veo-composite-overlay--dim"),typeof p.backdropColor=="string"&&(v.style.background=p.backdropColor),typeof p.backdropZIndex=="number"&&(v.style.zIndex=String(p.backdropZIndex)),v.addEventListener("click",b=>{b.target===v&&(f("dismissed"),this.closeOrSkip(e));}),this.registerCleanup(xe(m))),xi(u,o.position,p),v.appendChild(u),c.appendChild(v);}e.onInteraction({guideId:e.guide.guideId,stepIndex:t,action:"shown"});}buildContent(e,t,o,i,r,s,a){let l=u=>{i.onInteraction({guideId:i.guide.guideId,stepIndex:r,action:"cta_clicked",...u.id?{metadata:{buttonId:u.id}}:{}});},d=(u,f,h)=>(u.dataset.veoBlock=String(h),f.editorId&&(u.dataset.veoBlockId=f.editorId),u),c=(u,f)=>{if(!i.isPreview||!u.editorId)return null;let h=o.createElement("div");return h.className="veo-block-placeholder",h.textContent=f,h},m=(u,f)=>{let h=0;for(;h<f.length;){let{block:g,index:y}=f[h];if(g.type==="button"){let b=o.createElement("div");b.className="veo-guide-actions";let w;for(;h<f.length&&f[h]?.block.type==="button";){let{block:x,index:C}=f[h];if(!w){let S=x.style?.align;(S==="left"||S==="center"||S==="right")&&(w=S);}b.appendChild(d(this.buildButton(x,o,i,r,s,l),x,C)),h++;}w&&(b.style.justifyContent=$t[w]??"flex-end"),u.appendChild(b);continue}if(g.type==="code"){let{node:b,cleanup:w}=Lt(g,o,i,a),x=b??c(g,"Bloque de c\xF3digo");x&&u.appendChild(d(x,g,y)),this.registerCleanup(w),h++;continue}if(g.type==="form"){u.appendChild(d(this.buildForm(g,o,i,r,s,l),g,y)),h++;continue}if(g.type==="checklist"){let b=Bo(g,o,i);se(b,g.style,"text"),b.style.alignSelf="stretch",b.style.width="100%",u.appendChild(d(b,g,y)),h++;continue}let v=ut(g,o,{editing:i.isPreview===true})??c(g,g.type==="image"?"Imagen (sin URL)":g.type==="video"?"Video (elige proveedor y pega la URL)":"Bloque vac\xEDo");v&&u.appendChild(d(v,g,y)),h++;}},p=i.guide.guideSteps[r]?.rows;for(let u of Fo(t)){let f=Number.isInteger(u.row)?p?.[String(u.row)]:void 0;if(u.columns.length===1&&!f){m(e,u.columns[0].blocks);continue}let h=o.createElement("div");h.className="veo-row",Number.isInteger(u.row)&&(h.dataset.veoRow=String(u.row));for(let g of u.columns){let y=o.createElement("div");y.className="veo-col",m(y,g.blocks),h.appendChild(y);}f&&wi(h,f),e.appendChild(h);}}buildForm(e,t,o,i,r,s){let a=t.createElement("div");a.className="veo-form";let l=e.style??{},{marginTop:d,marginBottom:c,...m}=l;for(let[h,g]of [["marginTop",d],["marginBottom",c]])typeof g=="number"&&Number.isFinite(g)&&(a.style[h]=`${g}px`);let p=null;(typeof e.html=="string"&&e.html||typeof e.text=="string"&&e.text)&&(p=t.createElement("div"),p.className="veo-form-question",typeof e.html=="string"&&e.html?p.appendChild(Ae(e.html,t)):p.textContent=e.text,se(p,m,"text"),a.appendChild(p));let u=p?.textContent?.trim()??"",f=[];for(let h of e.fields??[]){let{wrapper:g,read:y}=Pt(h,t),v=e.style??{};if(typeof v.scaleColor=="string"&&v.scaleColor&&g.style.setProperty("--veo-scale-color",v.scaleColor),typeof v.scaleSize=="number"&&v.scaleSize>=24&&v.scaleSize<=96&&g.style.setProperty("--veo-scale-size",`${v.scaleSize}px`),p&&(g.querySelector(".veo-form-label")?.remove(),u))for(let w of g.querySelectorAll("input, textarea, select"))w.setAttribute("aria-label",u);let b={field:h,read:y,blockId:e.id??null};r.push(b),f.push(b),a.appendChild(g);}if(e.submit){let h=t.createElement("div");h.className="veo-guide-actions";let g={...e.submit,type:"button"},y=g.style?.align;(y==="left"||y==="center"||y==="right")&&(h.style.justifyContent=$t[y]??"flex-end"),h.appendChild(this.buildButton(g,t,o,i,r,s,f)),a.appendChild(h);}return a}buildButton(e,t,o,i,r,s,a){let l=t.createElement("button");l.type="button",l.className="veo-guide-cta",l.textContent=e.text?.trim()||"OK";let d=e.style??{};(d.preset==="secondary"||d.preset==="link")&&l.classList.add(`veo-guide-cta--${d.preset}`),typeof d.ariaLabel=="string"&&d.ariaLabel.trim()&&l.setAttribute("aria-label",d.ariaLabel.trim()),se(l,e.style,"button");let c=o.nav?.callbacks,m=f=>{switch(f.action){case "next":c?c.onNext():o.onClose();break;case "prev":c?.onBack();break;case "goto":c?.onGoto&&typeof f.targetStep=="number"?c.onGoto(f.targetStep):o.onClose();break;case "snooze":zo(o.guide.guideId,typeof f.snoozeEvery=="number"?f.snoozeEvery:1,f.snoozeUnit??"day"),o.onClose();break;case "url":typeof f.url=="string"&&A(f.url)&&(f.newTab===false?window.location.assign(f.url):window.open(f.url,"_blank","noopener,noreferrer"));break;case "guide":f.targetGuideId&&o.onOpenGuide?.(f.targetGuideId),this.closeOrSkip(o);break;default:this.closeOrSkip(o);}},p=()=>{e.secondAction?.action&&m(e.secondAction);},u=()=>{switch(e.action){case "next":case "prev":case "goto":case "snooze":case "url":case "guide":s(e),m(e),p();break;case "submit-forms":case "submit-forms-advance":case "submit-forms-goto":this.submitForms(r,o,i,l,()=>{s(e),e.action==="submit-forms"||!c?o.onClose():e.action==="submit-forms-goto"&&typeof e.targetStep=="number"&&c.onGoto?c.onGoto(e.targetStep):c.onNext();});break;default:s(e),this.closeOrSkip(o),p();}};return l.addEventListener("click",()=>{a?this.submitForms(a,o,i,l,u):u();}),l}submitForms(e,t,o,i,r){let s={};for(let{field:c,read:m}of e){let p=m();if(p==null||p===""){if(c.required){i.textContent=`Completa "${c.label}"`;return}continue}s[c.key]=p;}if(Object.keys(s).length===0){r();return}i.disabled=true;let a=t.onFormSubmit??(()=>Promise.resolve(true)),l=new Set(e.filter(c=>s[c.field.key]!==void 0).map(c=>c.blockId??"")),d=l.size===1&&[...l][0]||void 0;a(s,{...d?{pollId:d}:{},stepIndex:o}).then(c=>{if(i.disabled=false,!c)return;(!t.nav||o>=t.nav.totalSteps-1)&&t.onInteraction({guideId:t.guide.guideId,stepIndex:o,action:"completed"}),r();});}closeOrSkip(e){e.nav?.callbacks?e.nav.callbacks.onSkip():e.onClose();}renderBadgeMode(e,t,o,i,r,s,a,l,d,c){let m=e.badge?.trigger==="click"?"click":"hover",p=e.badge?.placement==="top"||e.badge?.placement==="left"||e.badge?.placement==="right"?e.badge.placement:"bottom",u=a.createElement("div");u.className="veo-composite-badge",u.setAttribute("role","button"),u.tabIndex=0,u.style.cursor="pointer",u.style.display="inline-flex",u.style.alignItems="center";let f=e.badge?.marker??null;f?u.appendChild(Yo(a,f)):this.buildContent(u,e.badge?.blocks??[],a,l,d,[],r),s.appendChild(u),c.fullWidth===true?(t.style.width="auto",t.style.maxWidth="320px"):!t.style.width&&!t.style.maxWidth&&(t.style.maxWidth="320px");let h=a.createElement("div");h.className="veo-composite-anchored",h.style.display="none";let g=c.caret===false?null:en(a,c);if(g&&h.appendChild(g),h.appendChild(t),s.appendChild(h),f)r.style.display="inline-block",(o.ownerDocument??document).body.appendChild(r),this.registerCleanup(Xo(o,r,f)),this.registerCleanup(()=>r.remove());else {r.style.display="inline-block";let S=Gt(e.inlinePosition);_(o,r,S),this.registerCleanup(G(r,i,S));}let y=false,v=null,b=null,w=false,x=()=>{y||(y=true,h.style.display="block",tn(u,h,g,p).then(S=>{y?v=S:S();}),w||(w=true,l.onInteraction({guideId:l.guide.guideId,stepIndex:d,action:"shown"})));},C=()=>{y=false,h.style.display="none",v?.(),v=null;};if(m==="hover"){let S=()=>{b!==null&&(clearTimeout(b),b=null);},R=()=>{S(),b=window.setTimeout(C,150);};u.addEventListener("mouseenter",()=>{S(),x();}),u.addEventListener("mouseleave",R),u.addEventListener("focus",x),h.addEventListener("mouseenter",S),h.addEventListener("mouseleave",R);}else u.addEventListener("click",()=>{y?C():x();});return this.registerCleanup(()=>{v?.(),b!==null&&clearTimeout(b);}),l.badgeOpen&&x(),C}};function Gt(n){return n==="before"||n==="prepend"||n==="append"?n:"after"}function xi(n,e,t){let o=n.style;o.position="fixed";let i=16,r=u=>typeof t[u]=="number"&&Number.isFinite(t[u])?t[u]:0;o.margin="0";let s=t.hAlign==="left"?"left":t.hAlign==="right"?"right":null,a=e.includes("top")?"top":e.includes("bottom")?"bottom":"middle",l=s??(e.includes("left")?"left":e.includes("right")?"right":"middle");a==="top"?o.top=`${i+r("marginTop")}px`:a==="bottom"?o.bottom=`${i+r("marginBottom")}px`:o.top="50%",l==="left"?o.left=`${i+r("marginLeft")}px`:l==="right"?o.right=`${i+r("marginRight")}px`:o.left="50%";let d=r("marginLeft")-r("marginRight"),c=r("marginTop")-r("marginBottom"),m=l==="middle"?`calc(-50% + ${d}px)`:"0",p=a==="middle"?`calc(-50% + ${c}px)`:"0";o.transform=m==="0"&&p==="0"?"":`translate(${m}, ${p})`;}var Jo="10px",Ci=42,Si=20;function ki(n,e,t,o){if(e.length===0)return;let i=t.includes("bottom")?"Bottom":"Top";if((i==="Top"?e[0]:e[e.length-1])?.type==="image")return;let s=o[`closeMargin${i}`],a=Ci+(typeof s=="number"?s:0),l=o[`padding${i}`];(typeof l=="number"?l:Si)<a&&n.style.setProperty(`padding-${i.toLowerCase()}`,`${a}px`);}function Ei(n,e){let t=n.style;t.top="auto",t.right="auto",t.bottom="auto",t.left="auto";let o=e.includes("bottom")?"bottom":"top",i=e.includes("left")?"left":"right";t.setProperty(o,Jo),t.setProperty(i,Jo);}function en(n,e){let t=n.createElement("div");t.className="veo-composite-caret";let o=typeof e.caretWidth=="number"?e.caretWidth:12,i=typeof e.caretHeight=="number"?e.caretHeight:12,r=t.style;if(r.position="absolute",r.width=`${o}px`,r.height=`${i}px`,r.transform="rotate(45deg)",r.background=typeof e.background=="string"?e.background:"#ffffff",typeof e.borderWidth=="number"&&e.borderWidth>0){let s=typeof e.borderColor=="string"?e.borderColor:"#bbbbbb";r.border=`${e.borderWidth}px solid ${s}`;}return t}function Ii(n,e){let t=n,o=t.style.position,i=t.style.zIndex;return getComputedStyle(t).position==="static"&&(t.style.position="relative"),t.style.zIndex=String(e),()=>{t.style.position=o,t.style.zIndex=i;}}async function tn(n,e,t,o="bottom"){let i=async()=>{let{x:s,y:a,placement:l,middlewareData:d}=await K(n,e,{placement:o,strategy:"fixed",middleware:[U(t?10:8),j(),q({padding:8}),...t?[re({element:t})]:[]]});e.style.left=`${s}px`,e.style.top=`${a}px`,t&&ae(t,l,d.arrow);};await i();let r=()=>{i();};return window.addEventListener("scroll",r,true),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",r,true),window.removeEventListener("resize",r);}}var Ri=120,Ti=260;function Ai(n,e){let t=n.style,o=l=>typeof l=="number"&&Number.isFinite(l)?`${l}px`:null,i=l=>typeof l=="string"&&l?l:null;e.colorMode==="dark"&&(t.background="#1f1d1b",t.color="#f5f0eb",n.classList.add("veo-card--dark")),i(e.background)&&(t.background=e.background);let r=i(e.color)??i(e.textColor);r&&(t.color=r),o(e.fontSize)&&(t.fontSize=o(e.fontSize)),i(e.fontWeight)&&(t.fontWeight=e.fontWeight),i(e.fontFamily)&&e.fontFamily!=="inherit"&&(t.fontFamily=e.fontFamily),i(e.textTransform)&&e.textTransform!=="none"&&(t.textTransform=e.textTransform),typeof e.letterSpacing=="number"&&(t.letterSpacing=`${e.letterSpacing}px`),i(e.align)&&(t.textAlign=e.align),typeof e.lineHeight=="number"&&(t.lineHeight=`${e.lineHeight}%`),o(e.radius)&&(t.borderRadius=o(e.radius));let s=o(e.borderWidth);if(s&&(t.border=`${s} solid ${i(e.borderColor)??"#e5e5e5"}`),i(e.shadowColor)||typeof e.shadowBlur=="number"){let l=d=>typeof e[d]=="number"?e[d]:0;t.boxShadow=`${l("shadowX")}px ${l("shadowY")}px ${l("shadowBlur")}px ${l("shadowSpread")}px ${i(e.shadowColor)??"rgba(0,0,0,0.2)"}`;}let a=typeof e.width=="number"&&Number.isFinite(e.width)?`${Math.max(Ri,e.width)}px`:null;e.fullWidth===true?t.width="100%":e.widthType==="fluid"?(t.width="100%",a&&(t.maxWidth=a)):a&&(t.width=a);for(let l of ["Top","Right","Bottom","Left"]){let d=o(e[`padding${l}`]);d&&t.setProperty(`padding-${l.toLowerCase()}`,d);let c=o(e[`margin${l}`]);c&&t.setProperty(`margin-${l.toLowerCase()}`,c);}}var Li={mode:"floating",position:"bottom-right"},on=16,Pi=360,_e=class extends k{async render(e){let t=e.guide.guideSteps[0];if(!t||typeof t.html!="string"||t.html.length===0)return;let o=t.placement??Li,i=null;if(o.mode==="anchored"){let c=o.selector??t.selector??e.guide.activationRules.selector;if(typeof c!="string"||c.length===0||(i=await E(c),!i))return}let{root:r}=this.createHost(),s=r.ownerDocument??document,a=s.createElement("div");a.className=o.mode==="anchored"?"veo-custom-anchored":"veo-custom-floating";let{iframe:l,cleanup:d}=Ne(s,t,e,{width:At(o.width??Pi),fixedHeight:o.height??null});this.registerCleanup(d),a.appendChild(l),r.appendChild(a),o.mode==="floating"?Mi(a,o):i&&this.registerCleanup(await this.setupAnchoredPosition(i,a,o)),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}async setupAnchoredPosition(e,t,o){let i=o.side??"bottom",r=async()=>{let{x:a,y:l}=await K(e,t,{placement:i,strategy:"fixed",middleware:[U(o.offsetY??8),j(),q({padding:8})]});t.style.left=`${a}px`,t.style.top=`${l}px`;};await r();let s=()=>{r();};return window.addEventListener("scroll",s,true),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s,true),window.removeEventListener("resize",s);}}};function Mi(n,e){let t=e.position??"bottom-right",o=`${e.offsetX??on}px`,i=`${e.offsetY??on}px`,r=n.style;if(t==="center"){r.top="50%",r.left="50%",r.transform="translate(-50%, -50%)";return}let[s,a]=t.split("-");s==="top"?r.top=i:r.bottom=i,a==="left"?r.left=o:a==="right"?r.right=o:(r.left="50%",r.transform="translateX(-50%)");}var Ge=class extends k{render(e){let t=e.guide.guideSteps[0];if(!t||(t.fields??[]).length===0)return;let{root:o}=this.createHost();this.applyDesign(t.style);let i=o.ownerDocument??document,r=i.createElement("div");r.className="veo-modal-overlay";let s=i.createElement("div");s.className="veo-modal-card",pt(s,e,i),r.appendChild(s),o.appendChild(r),this.registerCleanup(xe(i));let a=()=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"dismissed"}),e.onClose();};r.addEventListener("click",d=>{d.target===r&&a();});let l=d=>{d.key==="Escape"&&a();};document.addEventListener("keydown",l),this.registerCleanup(()=>document.removeEventListener("keydown",l)),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var $e=class extends k{async render(e){let t=e.guide.guideSteps[0];if(!t||typeof t.html!="string"||t.html.length===0)return;let o=t.selector??e.guide.activationRules.selector;if(typeof o!="string"||o.length===0)return;let i=await E(o);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=Y(t.style);_(i,r,a),this.registerCleanup(G(r,o,a));let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-custom-inline";let{iframe:c,cleanup:m}=Ne(l,t,e,{width:"100%"});this.registerCleanup(m),d.appendChild(c),s.appendChild(d),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var Be=class extends k{async render(e){let t=e.guide.guideSteps[0];if(!t||(t.fields??[]).length===0)return;let o=t.selector??e.guide.activationRules.selector;if(typeof o!="string"||o.length===0)return;let i=await E(o);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=Y(t.style);_(i,r,a),this.registerCleanup(G(r,o,a)),this.applyDesign(t.style);let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-inline",pt(d,e,l),s.appendChild(d),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}};var Oe=class extends k{async render(e){let t=e.guide.guideSteps[0];if(!t)return;let o=t.selector??e.guide.activationRules.selector;if(typeof o!="string"||o.length===0)return;let i=await E(o);if(!i)return;let{host:r,root:s}=this.createHost();r.style.display="block";let a=Y(t.style);_(i,r,a),this.registerCleanup(G(r,o,a)),this.applyDesign(t.style);let l=s.ownerDocument??document,d=l.createElement("div");d.className="veo-inline";let c=(p,u,f)=>{e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:p,...f?{metadata:f}:{}}),u&&window.open(u,"_blank","noopener,noreferrer"),e.onClose();},m=N(t,l,{onCtaClick:(p,u,f)=>{c("cta_clicked",p==="url"?u:void 0,f),p==="guide"&&u&&e.onOpenGuide?.(u);},onDismiss:()=>c("dismissed")});d.appendChild(m),s.appendChild(d),this.liveContainer=d,this.liveContent=m,this.liveKey=`${o}|${a}`,this.liveBuild=p=>N(p,l,{onCtaClick:(u,f,h)=>{c("cta_clicked",u==="url"?f:void 0,h),u==="guide"&&f&&e.onOpenGuide?.(f);},onDismiss:()=>c("dismissed")}),e.onInteraction({guideId:e.guide.guideId,stepIndex:0,action:"shown"});}liveKeyOf(e){return `${e.selector??""}|${Y(e.style)}`}};function nn(n){return n.style?.backdrop===false?"veo-modal-overlay veo-modal-overlay--none":"veo-modal-overlay"}var ce=class extends k{constructor(){super(...arguments);this.overlay=null;this.releaseScroll=null;}syncScrollLock(t){let o=t.style?.backdrop!==false;o&&!this.releaseScroll?this.releaseScroll=xe(this.host?.ownerDocument??document):!o&&this.releaseScroll&&(this.releaseScroll(),this.releaseScroll=null);}render(t){let o=t.nav?.stepIndex??0,i=t.guide.guideSteps[o];if(!i)return;let{root:r}=this.createHost();this.applyDesign(i.style);let s=r.ownerDocument??document,a=s.createElement("div");a.className=nn(i),this.overlay=a,this.syncScrollLock(i);let l=s.createElement("div");l.className="veo-modal-card";let d=(u,f,h)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:o,action:u,...h?{metadata:h}:{}}),f&&window.open(f,"_blank","noopener,noreferrer"),t.onClose();},c=()=>{t.nav?t.nav.callbacks.onSkip():d("dismissed");},m=t.nav?Me(i,t.nav.stepIndex,t.nav.totalSteps,s,t.nav.callbacks):N(i,s,{onCtaClick:(u,f,h)=>{d("cta_clicked",u==="url"?f:void 0,h),u==="guide"&&f&&t.onOpenGuide?.(f);},onDismiss:()=>d("dismissed")});l.appendChild(m),a.appendChild(l),r.appendChild(a),t.nav||(this.liveContainer=l,this.liveContent=m,this.liveBuild=u=>N(u,s,{onCtaClick:(f,h,g)=>{d("cta_clicked",f==="url"?h:void 0,g),f==="guide"&&h&&t.onOpenGuide?.(h);},onDismiss:()=>d("dismissed")})),a.addEventListener("click",u=>{u.target===a&&c();});let p=u=>{u.key==="Escape"&&c();};document.addEventListener("keydown",p),this.registerCleanup(()=>document.removeEventListener("keydown",p)),t.nav||t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"shown"});}onLiveUpdate(t){this.overlay&&(this.overlay.className=nn(t)),this.syncScrollLock(t);}destroy(){this.overlay=null,this.releaseScroll?.(),this.releaseScroll=null,super.destroy();}};var De=class extends k{constructor(){super(...arguments);this.side="bottom";this.reposition=null;}async render(t){let o=t.guide.guideSteps[0];if(!o)return;let i=o.selector??t.guide.activationRules.selector;if(typeof i!="string"||i.length===0)return;let r=await E(i);if(!r)return;let s=o.style?.tooltipPlacement;this.side=s==="top"||s==="left"||s==="right"?s:"bottom";let{root:a}=this.createHost();this.applyDesign(o.style);let l=a.ownerDocument??document,d=l.createElement("div");d.className="veo-tooltip";let c=(h,g,y)=>{t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:h,...y?{metadata:y}:{}}),g&&window.open(g,"_blank","noopener,noreferrer"),t.onClose();},m=N(o,l,{onCtaClick:(h,g,y)=>{c("cta_clicked",h==="url"?g:void 0,y),h==="guide"&&g&&t.onOpenGuide?.(g);},onDismiss:()=>c("dismissed")});d.appendChild(m);let p=l.createElement("div");p.className="veo-tooltip-arrow",d.appendChild(p),a.appendChild(d);let u=async()=>{let{x:h,y:g,placement:y,middlewareData:v}=await K(r,d,{placement:this.side,middleware:[U(10),j(),q({padding:8}),re({element:p})]});d.style.left=`${h}px`,d.style.top=`${g}px`,ae(p,y,v.arrow);};await u();let f=()=>{u();};this.reposition=f,window.addEventListener("scroll",f,true),window.addEventListener("resize",f),this.registerCleanup(()=>{window.removeEventListener("scroll",f,true),window.removeEventListener("resize",f);}),this.liveContainer=d,this.liveContent=m,this.liveKey=i,this.liveBuild=h=>N(h,l,{onCtaClick:(g,y,v)=>{c("cta_clicked",g==="url"?y:void 0,v),g==="guide"&&y&&t.onOpenGuide?.(y);},onDismiss:()=>c("dismissed")}),t.onInteraction({guideId:t.guide.guideId,stepIndex:0,action:"shown"});}liveKeyOf(t){return t.selector??""}onLiveUpdate(t){let o=t.style?.tooltipPlacement;this.side=o==="top"||o==="left"||o==="right"?o:"bottom",this.reposition?.();}};var Fe=class extends k{async render(e){let t=e.guide.guideSteps[e.currentStepIndex];if(!t)return false;let o=t.selector??e.guide.activationRules.selector;if(typeof o!="string"||o.length===0)return false;let i=await E(o,5e3);if(!i)return false;let r=t.style?.tooltipPlacement,s=r==="top"||r==="left"||r==="right"?r:"bottom",{root:a}=this.createHost();this.applyDesign(t.style);let l=a.ownerDocument??document,d=l.createElement("div");d.className="veo-walkthrough";let c=Me(t,e.currentStepIndex,e.guide.guideSteps.length,l,e.callbacks);d.appendChild(c);let m=l.createElement("div");m.className="veo-walkthrough-arrow",d.appendChild(m),a.appendChild(d);let p=async()=>{let{x:f,y:h,placement:g,middlewareData:y}=await K(i,d,{placement:s,middleware:[U(10),j(),q({padding:8}),re({element:m})]});d.style.left=`${f}px`,d.style.top=`${h}px`,ae(m,g,y.arrow);};await p();let u=()=>{p();};return window.addEventListener("scroll",u,true),window.addEventListener("resize",u),this.registerCleanup(()=>{window.removeEventListener("scroll",u,true),window.removeEventListener("resize",u);}),true}};function rn(n){let e=[n];try{let t=new URL(n);e.push(`${t.pathname}${t.search}${t.hash}`),t.hash.startsWith("#/")&&e.push(t.hash.slice(1));}catch{}return e}function Ni(n,e){let t=rn(e);switch(n.type){case "exact":return t.some(o=>o===n.pattern);case "prefix":return t.some(o=>o.startsWith(n.pattern));case "regex":try{let o=new RegExp(n.pattern);return t.some(i=>o.test(i))}catch{return false}}}function te(n,e){return !n||n.scope==="sitewide"?true:n.scope==="pages"?(n.rules??[]).some(o=>_i(o,e)):n.pattern?Ni({type:n.matchType??"prefix",pattern:n.pattern},e):true}function _i(n,e){let t=n.pattern.toLowerCase(),o=rn(e).map(i=>i.toLowerCase());switch(n.type){case "exact":return o.some(i=>i===t);case "prefix":return o.some(i=>i.startsWith(t));case "contains":return o.some(i=>i.includes(t));case "regex":try{let i=new RegExp(n.pattern,"i");return o.some(r=>i.test(r))}catch{return false}default:return false}}var ft=class{constructor(e){this.state=null;this.storageKey=`${Ut}${e}`,this.state=this.load(),this.state&&this.isAbandoned(this.state)&&this.clear();}current(){return this.state?this.isAbandoned(this.state)?(this.clear(),null):this.state:null}hasActive(){return this.current()!==null}start(e,t){let o=Date.now();return this.state={guideId:e,totalSteps:t,currentStepIndex:0,startedAt:o,lastProgressAt:o},this.persist(),this.state}advance(){if(!this.state)return null;let e=this.state.currentStepIndex+1;return e>=this.state.totalSteps?null:(this.state={...this.state,currentStepIndex:e,lastProgressAt:Date.now()},this.persist(),this.state)}back(){return this.state?this.state.currentStepIndex===0?this.state:(this.state={...this.state,currentStepIndex:this.state.currentStepIndex-1,lastProgressAt:Date.now()},this.persist(),this.state):null}clear(){if(this.state=null,!(typeof localStorage>"u"))try{localStorage.removeItem(this.storageKey);}catch{}}isAbandoned(e){return Date.now()-e.lastProgressAt>18e5}load(){if(typeof localStorage>"u")return null;try{let e=localStorage.getItem(this.storageKey);if(!e)return null;let t=JSON.parse(e);if(!t||typeof t!="object")return null;let o=t;return typeof o.guideId!="string"||typeof o.totalSteps!="number"||typeof o.currentStepIndex!="number"||typeof o.startedAt!="number"||typeof o.lastProgressAt!="number"?null:o}catch{return null}}persist(){if(!(typeof localStorage>"u"||!this.state))try{localStorage.setItem(this.storageKey,JSON.stringify(this.state));}catch{}}};var $i=3e4,Bi={shown:"shown",dismissed:"dismissed",cta_clicked:null,step_advanced:null,step_back:null,completed:"completed"},Oi={minute:6e4,hour:36e5,day:864e5,week:6048e5};function Di(n){return Math.max(0,n.every)*Oi[n.unit]}var ht=class{constructor(e,t){this.client=e;this.activeRenderers=new Set;this.activeByGuideId=new Map;this.dispatched=new Set;this.activeWalkthroughRenderer=null;this.activeWalkthroughGuide=null;this.resolveCache=null;this.inflightResolve=null;this.armedTriggers=new Map;this.pendingComposite=null;this.compositeDelays=new Map;this.repeatHoldUntil=new Map;this.localDismissals=new Map;this.activeComposite=new Map;this.sessionProgress=new Map;if(this.debug=t.debug===true,this.apiUrl=t.apiUrl,this.apiKey=t.apiKey,this.resolver=t.resolver??new Je(t.apiUrl,t.apiKey,this.debug),t.trackerQueue)this.trackerQueue=t.trackerQueue;else {let i=new et(t.apiUrl,t.apiKey);this.trackerQueue=new tt({client:i,flushIntervalMs:3e3,batchSize:5,maxRetries:3,onError:(r,s)=>{this.debug&&console.warn(`[veo] dropped guide interaction after retries: guideId=${s.guideId} action=${s.payload.action}`,r);}});}let o=Kt(t.apiKey);this.frequencyCache=t.frequencyCache??new Ze(o),this.walkthroughState=t.walkthroughState??new ft(o);}get pendingInteractions(){return this.trackerQueue.size}clearFrequencyCache(){this.frequencyCache.clear();}clearWalkthroughState(){this.tearDownWalkthrough();}async checkGuides(e,t){let o=this.client.getEndUserId();if(!o){this.debug&&console.log("[veo] guides: skipped, no endUserId yet");return}if(this.pruneComposite(e),await this.tryResumeWalkthrough(o,t,e))return;this.tryResumeComposite(t,e);let i;try{i=await this.resolveGuides(o,e);}catch(r){this.debug&&console.error("[veo] guides resolver threw:",r);return}i=i.filter(r=>Ft(r.campaignWeekdays)&&Dt(r.activationRules.devices)),this.debug&&console.log(`[veo] guides: ${i.length} eligible at ${e}`),this.disarmTriggers();for(let r of i){let s=r.activationRules,a=s.trigger;(a==="on_click"||a==="on_hover")&&s.selector&&(this.armInteractionTrigger(r,o,t,e),!me(s))||await this.showGuide(r,o,t,e,{badgeOpen:a!=="manual"});}}async showGuide(e,t,o,i,r={}){let s=r.badgeOpen!==false;if(this.frequencyCache.shouldFilter(e.guideId,e.displayFrequency)){this.debug&&console.log(`[veo] guides: filtered locally guideId=${e.guideId}`);return}if(!r.byUser&&Wo(e.guideId)){this.debug&&console.log(`[veo] guides: snoozed guideId=${e.guideId}`);return}if(!r.byUser&&this.isHeldByRepeat(e)){this.debug&&console.log(`[veo] guides: held by repeat guideId=${e.guideId}`);return}if(this.activeByGuideId.has(e.guideId)){this.debug&&console.log(`[veo] guides: already shown guideId=${e.guideId}`);return}if(e.guideType==="walkthrough"&&e.guideSteps.length>1){if(this.walkthroughState.hasActive()){this.debug&&console.log(`[veo] guides: walkthrough ${e.guideId} skipped (another active)`);return}await this.startWalkthrough(e,t,o,i);return}if(e.guideType==="composite"){this.startComposite(e,o,i,s);return}this.runSingleStepRender(e,o,i);}armInteractionTrigger(e,t,o,i){if(this.frequencyCache.shouldFilter(e.guideId,e.displayFrequency)||this.activeByGuideId.has(e.guideId)||this.armedTriggers.has(e.guideId))return;let r=e.activationRules.selector,s=e.activationRules.trigger==="on_hover"?"mouseover":"click",a=d=>{let c=d.target;if(c instanceof Element){try{if(!c.closest(r))return}catch{return}l(),this.showGuide(e,t,o,i,{byUser:true});}},l=()=>{document.removeEventListener(s,a,true),this.armedTriggers.delete(e.guideId);};document.addEventListener(s,a,true),this.armedTriggers.set(e.guideId,l),this.debug&&console.log(`[veo] guides: armed ${s} trigger for ${e.guideId} on ${r}`);}disarmTriggers(){for(let e of this.armedTriggers.values())e();this.armedTriggers.clear();}async resolveGuides(e,t){let o=`${e}
|
|
639
|
+
${t}`,i=Date.now();if(this.resolveCache?.key===o&&i-this.resolveCache.at<$i)return this.debug&&console.log("[veo] guides: resolve cache hit"),this.resolveCache.guides;if(this.inflightResolve?.key===o)return this.inflightResolve.promise;let r=this.resolver.resolve(e,t);this.inflightResolve={key:o,promise:r};try{let s=await r;return this.resolveCache={key:o,at:Date.now(),guides:s},s}finally{this.inflightResolve?.key===o&&(this.inflightResolve=null);}}destroy(){for(let e of this.activeRenderers)try{e.destroy();}catch(t){this.debug&&console.error("[veo] renderer destroy failed:",t);}if(this.activeRenderers.clear(),this.activeByGuideId.clear(),this.activeComposite.clear(),this.activeWalkthroughRenderer){try{this.activeWalkthroughRenderer.destroy();}catch{}this.activeWalkthroughRenderer=null,this.activeWalkthroughGuide=null;}this.disarmTriggers();for(let e of this.compositeDelays.values())clearTimeout(e.timer);this.compositeDelays.clear(),this.repeatHoldUntil.clear(),this.localDismissals.clear(),this.dispatched.clear(),this.resolveCache=null,this.inflightResolve=null,this.trackerQueue.destroy();}runSingleStepRender(e,t,o){let i=this.createSingleStepRenderer(e.guideType);if(!i)return;this.activeByGuideId.set(e.guideId,i);let r=We(e.activationRules);window.setTimeout(()=>this.mountSingleStepRenderer(e,i,t,o),r);}startComposite(e,t,o,i=true){if(this.pendingComposite?.guide.guideId===e.guideId)return;let r=e.guideSteps,s=e.activationRules.repeat?.onLoad==="resume"?this.recallStep(e.guideId):null,a=s!==null&&te(r[s]?.pageLocation,o)?s:r.findIndex(c=>te(c.pageLocation,o));if(a===-1||e.activationRules.trigger==="manual"&&!r[a]?.badge?.enabled||this.compositeDelays.has(e.guideId))return;this.resetDispatched(e.guideId);let l=We(e.activationRules);if(l<=0){this.renderCompositeStep(e,a,t,o,i);return}let d=setTimeout(()=>{this.compositeDelays.delete(e.guideId),!this.activeByGuideId.has(e.guideId)&&this.renderCompositeStep(e,a,t,o,i);},l);this.compositeDelays.set(e.guideId,{guide:e,stepIndex:a,timer:d});}resetDispatched(e){let t=`${e}:`;for(let o of this.dispatched)o.startsWith(t)&&this.dispatched.delete(o);}isHeldByRepeat(e){let t=e.activationRules.repeat;if(!t)return false;let o=this.repeatHoldUntil.get(e.guideId);return o!==void 0&&Date.now()<o?true:t.stopAfter.kind==="dismissals"?(this.localDismissals.get(e.guideId)??0)>=t.stopAfter.count:false}recordRepeatLocal(e,t){let o=e.activationRules.repeat;o&&(t==="shown"?this.repeatHoldUntil.set(e.guideId,Date.now()+Di(o)):t==="dismissed"?this.localDismissals.set(e.guideId,(this.localDismissals.get(e.guideId)??0)+1):t==="completed"&&o.stopAfter.kind==="completed"&&this.repeatHoldUntil.set(e.guideId,Number.POSITIVE_INFINITY));}stepKey(e){return `veo:last_step:${e}`}rememberStep(e,t){try{localStorage.setItem(this.stepKey(e),String(t));}catch{}}recallStep(e){try{let t=localStorage.getItem(this.stepKey(e));if(t===null)return null;let o=Number(t);return Number.isInteger(o)&&o>=0?o:null}catch{return null}}pruneComposite(e){for(let[t,o]of this.compositeDelays){let r=o.guide.guideSteps[o.stepIndex];(!r||!te(r.pageLocation,e))&&(clearTimeout(o.timer),this.compositeDelays.delete(t));}for(let t of this.activeComposite.values()){let i=t.guide.guideSteps[t.stepIndex];(!i||!te(i.pageLocation,e))&&t.cleanup();}}tryResumeComposite(e,t){let o=this.pendingComposite;if(!o)return false;let r=o.guide.guideSteps[o.stepIndex];return r?te(r.pageLocation,t)?(this.pendingComposite=null,this.renderCompositeStep(o.guide,o.stepIndex,e,t),true):false:(this.pendingComposite=null,false)}renderCompositeStep(e,t,o,i,r=true){let s=e.guideSteps;this.rememberStep(e.guideId,t);let a=new Ce;this.activeRenderers.add(a),this.activeByGuideId.set(e.guideId,a);let l=()=>{a.destroy(),this.activeRenderers.delete(a),this.activeByGuideId.get(e.guideId)===a&&this.activeByGuideId.delete(e.guideId),this.activeComposite.delete(e.guideId);};this.activeComposite.set(e.guideId,{guide:e,stepIndex:t,cleanup:l});let d=m=>{if(l(),m<0||m>=s.length)return;let p=this.client.getEndUserId();p&&this.enqueueInteraction(e.guideId,p,o,i,m>t?"step_advanced":"step_back",m);let u=s[m];u&&te(u.pageLocation,i)?this.renderCompositeStep(e,m,o,i,r):this.pendingComposite={guide:e,stepIndex:m};},c=s.length>1?{stepIndex:t,totalSteps:s.length,callbacks:{onNext:()=>d(t+1),onBack:()=>d(t-1),onGoto:m=>d(m),onSkip:l,onComplete:l}}:void 0;try{a.render({guide:e,onInteraction:m=>this.handleInteraction(e,o,i,m),onClose:l,onTrack:(m,p)=>this.client.track(m,p),onFormSubmit:(m,p)=>this.submitFormResponse(e.guideId,m,p),onOpenGuide:m=>{this.openGuideById(m,o,i);},fetchProgress:m=>this.fetchProgress(m),onOpenGuideAt:(m,p)=>{this.openGuideById(m,o,i,p);},badgeOpen:r,...c?{nav:c}:{}});}catch(m){this.debug&&console.error("[veo] composite renderer threw:",m),l();}}mountSingleStepRenderer(e,t,o,i){this.activeRenderers.add(t),this.activeByGuideId.set(e.guideId,t);let r=()=>{t.destroy(),this.activeRenderers.delete(t),this.activeByGuideId.get(e.guideId)===t&&this.activeByGuideId.delete(e.guideId);},s=c=>{this.handleInteraction(e,o,i,c);},a=(c,m)=>{this.client.track(c,m);},l=(c,m)=>this.submitFormResponse(e.guideId,c,m),d=c=>{this.openGuideById(c,o,i);};try{t.render({guide:e,onInteraction:s,onClose:r,onTrack:a,onFormSubmit:l,onOpenGuide:d});}catch(c){this.debug&&console.error("[veo] renderer.render threw:",c),this.activeRenderers.delete(t),this.activeByGuideId.get(e.guideId)===t&&this.activeByGuideId.delete(e.guideId);}}async openGuideById(e,t,o,i){if(this.activeByGuideId.has(e))return;let r=await this.resolver.fetchById(e);if(!r){this.debug&&console.warn(`[veo] guides: chained guide ${e} not found`);return}let s=this.client.getEndUserId()??this.client.getAnonymousId();if(r.guideType==="composite"&&typeof i=="number"){let a=r.guideSteps.length,l=Math.max(0,Math.min(a-1,Math.floor(i)));this.enqueueInteractionOnce(r.guideId,s,t,o,"shown",0),l>0&&this.enqueueInteraction(r.guideId,s,t,o,"step_advanced",l),this.renderCompositeStep(r,l,t,o);return}if(r.guideType==="walkthrough"&&r.guideSteps.length>1){this.walkthroughState.hasActive()||await this.startWalkthrough(r,s,t,o);return}this.runSingleStepRender(r,t,o);}async tryResumeWalkthrough(e,t,o){let i=this.walkthroughState.current();if(!i)return false;let r=await this.resolver.fetchById(i.guideId);if(!r||r.guideType!=="walkthrough")return this.debug&&console.log(`[veo] guides: walkthrough ${i.guideId} no longer available, cleaning up`),this.tearDownWalkthrough(),true;let s=Math.min(i.currentStepIndex,r.guideSteps.length-1);return await this.renderWalkthroughStep(r,s,e,t,o),true}async startWalkthrough(e,t,o,i){this.walkthroughState.start(e.guideId,e.guideSteps.length),await this.renderWalkthroughStep(e,0,t,o,i)&&(this.enqueueInteractionOnce(e.guideId,t,o,i,"shown",0),this.frequencyCache.record(e.guideId,"shown"));}async renderWalkthroughStep(e,t,o,i,r){this.activeWalkthroughRenderer&&(this.activeWalkthroughRenderer.destroy(),this.activeWalkthroughRenderer=null),this.activeWalkthroughGuide=e;let s={onNext:()=>this.handleWalkthroughNext(o,i,r),onBack:()=>this.handleWalkthroughBack(o,i,r),onSkip:()=>this.handleWalkthroughSkip(o,i,r),onComplete:()=>this.handleWalkthroughComplete(o,i,r)},a=e.guideSteps[t],l=Fi(a);if(l==="modal"||l==="banner"){let m=l==="modal"?new ce:new le;try{m.render({guide:e,onInteraction:()=>{},onClose:()=>{},nav:{stepIndex:t,totalSteps:e.guideSteps.length,callbacks:s}});}catch(p){return this.debug&&console.error("[veo] sequence renderer threw:",p),this.tearDownWalkthrough(),false}return this.activeWalkthroughRenderer=m,true}let d=new Fe,c=false;try{c=await d.render({guide:e,currentStepIndex:t,callbacks:s});}catch(m){this.debug&&console.error("[veo] walkthrough renderer threw:",m);}return c?(this.activeWalkthroughRenderer=d,true):(this.debug&&console.warn(`[veo] walkthrough ${e.guideId} step ${t} could not render, cancelling`),this.tearDownWalkthrough(),false)}handleWalkthroughNext(e,t,o){let i=this.activeWalkthroughGuide;if(!i)return;let r=this.walkthroughState.advance();if(!r){this.handleWalkthroughComplete(e,t,o);return}this.enqueueInteraction(i.guideId,e,t,o,"step_advanced",r.currentStepIndex),this.renderWalkthroughStep(i,r.currentStepIndex,e,t,o);}handleWalkthroughBack(e,t,o){let i=this.activeWalkthroughGuide;if(!i)return;let r=this.walkthroughState.current();if(!r||r.currentStepIndex===0)return;let s=this.walkthroughState.back();s&&(this.enqueueInteraction(i.guideId,e,t,o,"step_back",s.currentStepIndex),this.renderWalkthroughStep(i,s.currentStepIndex,e,t,o));}handleWalkthroughSkip(e,t,o){let i=this.activeWalkthroughGuide,r=this.walkthroughState.current();!i||!r||(this.enqueueInteraction(i.guideId,e,t,o,"dismissed",r.currentStepIndex),this.frequencyCache.record(i.guideId,"dismissed"),this.tearDownWalkthrough());}handleWalkthroughComplete(e,t,o){let i=this.activeWalkthroughGuide,r=this.walkthroughState.current();!i||!r||(this.enqueueInteraction(i.guideId,e,t,o,"completed",r.currentStepIndex),this.frequencyCache.record(i.guideId,"completed"),this.tearDownWalkthrough());}tearDownWalkthrough(){if(this.activeWalkthroughRenderer)try{this.activeWalkthroughRenderer.destroy();}catch{}this.activeWalkthroughRenderer=null,this.activeWalkthroughGuide=null,this.walkthroughState.clear();}handleInteraction(e,t,o,i){let r=i.metadata?.buttonId?`:${i.metadata.buttonId}`:"",s=`${e.guideId}:${i.action}${r}`;if(this.dispatched.has(s)){this.debug&&console.log(`[veo] guides: dedup hit ${s}`);return}this.dispatched.add(s);let a=Bi[i.action];a&&this.frequencyCache.record(e.guideId,a),this.recordRepeatLocal(e,i.action),(i.action==="dismissed"||i.action==="completed")&&(this.resolveCache=null);let l=this.client.getEndUserId();if(!l){this.debug&&console.warn("[veo] guides: interaction without endUserId \u2014 skipping enqueue");return}this.noteProgress(e.guideId,i.action,i.stepIndex),this.trackerQueue.enqueue({guideId:e.guideId,payload:{endUserId:l,sessionId:t,action:i.action,stepIndex:i.stepIndex,pageUrl:o,pagePath:sn(o),...i.metadata?{metadata:i.metadata}:{}}});}enqueueInteraction(e,t,o,i,r,s){this.noteProgress(e,r,s),this.trackerQueue.enqueue({guideId:e,payload:{endUserId:t,sessionId:o,action:r,stepIndex:s,pageUrl:i,pagePath:sn(i)}});}noteProgress(e,t,o){if(t!=="shown"&&t!=="step_advanced"&&t!=="step_back"&&t!=="completed")return;let i=this.sessionProgress.get(e)??{maxStep:-1,completed:false};this.sessionProgress.set(e,{maxStep:Math.max(i.maxStep,o),completed:i.completed||t==="completed"});}async fetchProgress(e){let t=this.client.getEndUserId()??this.client.getAnonymousId(),o=[];try{let i=new URLSearchParams({endUserId:t,guideIds:e.join(",")}),r=await fetch(`${this.apiUrl}/v1/guides/progress?${i}`,{headers:{"X-Api-Key":this.apiKey}});r.ok?o=(await r.json()).items??[]:this.debug&&console.warn("[veo] guides/progress respondi\xF3",r.status);}catch(i){this.debug&&console.warn("[veo] guides/progress fall\xF3:",i);}return o.map(i=>{let r=this.sessionProgress.get(i.guideId);if(!r)return i;let s=Math.min(i.totalSteps,r.maxStep+1),a=i.completed||r.completed||s>=i.totalSteps;return {...i,currentStep:a?i.totalSteps:Math.max(i.currentStep,s),completed:a}})}enqueueInteractionOnce(e,t,o,i,r,s){let a=`${e}:${r}:${s}`;this.dispatched.has(a)||(this.dispatched.add(a),this.enqueueInteraction(e,t,o,i,r,s));}createSingleStepRenderer(e){switch(e){case "modal":return new ce;case "banner":return new le;case "tooltip":return new De;case "custom":return new _e;case "inline":return new Oe;case "inline-custom":return new $e;case "form":return new Ge;case "inline-form":return new Be;case "badge":return new Pe;case "composite":return new Ce;case "walkthrough":return null;default:return null}}async submitFormResponse(e,t,o){let i=this.client.getEndUserId()??this.client.getAnonymousId();try{let r=await fetch(`${this.apiUrl}/v1/guides/${e}/form-response`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":this.apiKey},body:JSON.stringify({endUserId:i,answers:t,sessionId:this.client.getSessionId(),...o?{stepPosition:o.stepIndex}:{},...o?.pollId?{pollId:o.pollId}:{}})});return !r.ok&&this.debug&&console.warn("[veo] form-response respondi\xF3",r.status),r.ok}catch(r){return this.debug&&console.warn("[veo] form-response fall\xF3:",r),false}}};function sn(n){try{return new URL(n).pathname}catch{return "/"}}function Fi(n){let e=n?.style?.render;return typeof e=="string"?e:"walkthrough"}var Hi="__veo_preview__",Bt=class{constructor(){this.singleStep=null;this.walkthrough=null;this.walkthroughGuide=null;this.walkthroughIndex=0;this.input=null;}preview(e){let t=e.guideSteps[0];if(this.singleStep&&this.input&&e.guideType===this.input.guideType&&e.guideType!=="walkthrough"&&e.badgeOpen===true==(this.input.badgeOpen===true)&&t&&this.singleStep.updateStep(t))return this.input=e,{close:()=>this.close(),ready:Promise.resolve({rendered:true}),host:()=>this.activeHost()};this.close(),this.input=e;let o=zi(e),i=typeof e.startStepIndex=="number"?e.startStepIndex:0;if(o.guideType==="composite"){let s=Math.min(Math.max(0,i),o.guideSteps.length-1),a=o.guideSteps[s];a&&(o.guideSteps=[a]);let l=this.renderSingleStep(o);return {close:()=>this.close(),ready:l,host:()=>this.activeHost()}}let r=o.guideType==="walkthrough"?this.startWalkthrough(o,i):this.renderSingleStep(o);return {close:()=>this.close(),ready:r,host:()=>this.activeHost()}}activeHost(){return this.singleStep?this.singleStep.hostElement():this.walkthrough instanceof k?this.walkthrough.hostElement():null}close(e=false){let t=e?this.input?.onClosed:void 0;this.singleStep&&(Se(this.singleStep),this.singleStep=null),this.walkthrough&&(Se(this.walkthrough),this.walkthrough=null),this.walkthroughGuide=null,this.walkthroughIndex=0,this.input=null,t?.();}async renderSingleStep(e){let t=Wi(e.guideType);if(!t)return {rendered:false};this.singleStep=t;let o=false;try{await t.render({guide:e,onInteraction:i=>{i.action==="shown"&&(o=!0);},onClose:()=>this.close(!0),badgeOpen:this.input?.badgeOpen??me(this.input?.activationRules),onTrack:()=>{},onOpenGuide:()=>{},onFormSubmit:this.input?.formSubmit??(()=>Promise.resolve(!0)),...this.input?.fetchProgress?{fetchProgress:this.input.fetchProgress}:{},isPreview:!0,...this.input?.formSubmit&&this.input.formSubmitNote!==void 0?{previewNote:this.input.formSubmitNote}:{}});}catch{return this.close(),{rendered:false}}return this.singleStep!==t?(Se(t),{rendered:false}):{rendered:o}}async startWalkthrough(e,t=0){if(e.guideSteps.length===0)return {rendered:false};this.walkthroughGuide=e;let o=Math.min(Math.max(0,Math.floor(t)),e.guideSteps.length-1);return this.walkthroughIndex=o,{rendered:await this.renderWalkthroughStep(o)}}async renderWalkthroughStep(e){let t=this.walkthroughGuide;if(!t)return false;this.walkthrough&&(Se(this.walkthrough),this.walkthrough=null);let o={onNext:()=>{let l=this.walkthroughIndex+1;if(l>=t.guideSteps.length){this.close();return}this.walkthroughIndex=l,this.renderWalkthroughStep(l);},onBack:()=>{let l=this.walkthroughIndex-1;l<0||(this.walkthroughIndex=l,this.renderWalkthroughStep(l));},onSkip:()=>this.close(),onComplete:()=>this.close()},r=t.guideSteps[e]?.style?.render;if(r==="modal"||r==="banner"){let l=r==="modal"?new ce:new le;try{l.render({guide:t,onInteraction:()=>{},onClose:()=>this.close(!0),nav:{stepIndex:e,totalSteps:t.guideSteps.length,callbacks:o}});}catch{return Se(l),false}return this.walkthroughGuide!==t?(Se(l),false):(this.walkthrough=l,true)}let s=new Fe,a=false;try{a=await s.render({guide:t,currentStepIndex:e,callbacks:o});}catch{a=false;}return !a||this.walkthroughGuide!==t?(Se(s),false):(this.walkthrough=s,true)}},gt=null;function vt(n){return Qe()?(gt||(gt=new Bt),gt.preview(n)):{close:()=>{},ready:Promise.resolve({rendered:false}),host:()=>null}}function an(){gt?.close();}function zi(n){let e=n.activationRules?.selector,t={url:n.activationRules?.url??{type:"prefix",pattern:"/"},trigger:"immediate",...e!==void 0?{selector:e}:{}};return {guideId:Hi,guideName:n.guideName??"Preview",guideType:n.guideType,guideSteps:n.guideSteps,activationRules:t,displayFrequency:"always",displayPriority:0}}function Wi(n){switch(n){case "modal":return new ce;case "banner":return new le;case "tooltip":return new De;case "custom":return new _e;case "inline":return new Oe;case "inline-custom":return new $e;case "form":return new Ge;case "inline-form":return new Be;case "badge":return new Pe;case "composite":return new Ce;case "walkthrough":return null;default:return null}}function Se(n){try{n.destroy();}catch{}}var Ui="veo:preview_token";function qi(){try{return window.sessionStorage}catch{return null}}function ln(){try{qi()?.removeItem(Ui);}catch{}}var yt=null;async function dn(n){if(!Qe())return null;yt?.teardown();let e=null;try{let p=await fetch(`${n.apiUrl}/v1/guides/preview-resolve`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":n.apiKey},body:JSON.stringify({token:n.token})});p.ok?e=(await p.json()).guide??null:n.debug&&console.warn("[veo] preview-resolve respondi\xF3",p.status);}catch(p){n.debug&&console.warn("[veo] preview-resolve fall\xF3:",p);}let t=async(p,u)=>{if(!e)return false;let f=window.veo,h=f?.getEndUserId?.()??f?.getAnonymousId?.()??null;if(!h)return false;try{return (await fetch(`${n.apiUrl}/v1/guides/${e.guideId}/form-response`,{method:"POST",headers:{"Content-Type":"application/json","X-Api-Key":n.apiKey},body:JSON.stringify({endUserId:h,answers:p,...u?{stepPosition:u.stepIndex}:{},...u?.pollId?{pollId:u.pollId}:{}})})).ok}catch{return false}},o=null,i=null,r=null,s=e?`Vista previa: ${e.guideName}`:"",a=()=>{i&&clearTimeout(i),i=null,r?.(),r=null;},l=()=>{if(!e)return;o?.close();let p;if(e.guideType==="composite"){let f=e.guideSteps.findIndex(h=>te(h.pageLocation,window.location.href));if(f===-1){c.setLabel(`${s} \xB7 ning\xFAn paso aplica a esta p\xE1gina`);return}p=f;}c.setLabel(s),o=vt({guideType:e.guideType,guideSteps:e.guideSteps,activationRules:e.activationRules,guideName:e.guideName,...p!==void 0?{startStepIndex:p}:{},formSubmit:t,formSubmitNote:"Vista previa: guardado en TU usuario para probar el flujo."});},d=()=>{if(!e)return;a();let p=e.activationRules,u=p.selector?.trim();if((p.trigger==="on_click"||p.trigger==="on_hover")&&u&&!me(p)){let h=p.trigger==="on_hover"?"pasa el mouse por":"haz clic en";c.setLabel(`${s} \xB7 ${h} el elemento objetivo`);let g=y=>{let v=y.target;if(v instanceof Element&&!v.closest("[data-veo-preview-chip],[data-veo-guide]")){try{if(!v.closest(u))return}catch{return}a(),l();}};document.addEventListener("click",g,true),p.trigger==="on_hover"&&document.addEventListener("mouseover",g,true),r=()=>{document.removeEventListener("click",g,true),document.removeEventListener("mouseover",g,true);};return}let f=We(p);if(f>0){c.setLabel(`${s} \xB7 aparece en ${Math.round(f/1e3)} s`),i=setTimeout(()=>{i=null,l();},f);return}l();},c=ji({label:e?s:"Link de preview inv\xE1lido o vencido",error:!e,onReshow:e?d:null,onClose:()=>m.teardown()}),m={teardown(){a(),o?.close(),o=null,c.remove(),ln(),yt===m&&(yt=null);}};return yt=m,d(),m}function ji(n){let e=document.createElement("div");e.setAttribute("data-veo-preview-chip","");let t=e.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=`
|
|
428
640
|
.chip { position: fixed; bottom: 16px; right: 16px; z-index: 2147483647;
|
|
429
641
|
display: flex; align-items: center; gap: 8px; padding: 8px 12px;
|
|
430
642
|
background: #111827; color: #f9fafb; border-radius: 9999px;
|
|
@@ -434,5 +646,5 @@ ${t}`,i=Date.now();if(this.resolveCache?.key===n&&i-this.resolveCache.at<ni)retu
|
|
|
434
646
|
button { all: unset; cursor: pointer; padding: 2px 6px; border-radius: 9999px;
|
|
435
647
|
font-size: 12px; line-height: 1; }
|
|
436
648
|
button:hover { background: rgba(255,255,255,.15); }
|
|
437
|
-
`,t.appendChild(
|
|
649
|
+
`,t.appendChild(o);let i=document.createElement("div");i.className=n.error?"chip error":"chip";let r=document.createElement("span");if(r.className="label",r.textContent=n.label,i.appendChild(r),n.onReshow){let a=document.createElement("button");a.textContent="\u21BB",a.title="Volver a mostrar la gu\xEDa",a.addEventListener("click",n.onReshow),i.appendChild(a);}let s=document.createElement("button");return s.textContent="\u2715",s.title="Salir de la vista previa",s.addEventListener("click",n.onClose),i.appendChild(s),t.appendChild(i),document.body.appendChild(e),{remove:()=>e.remove(),setLabel:a=>{r.textContent=a,r.title=a;}}}function Ki(n){return {name:"guides",install(e){if(!Ot())return;let t=new ht(e,n);window.__veoGuides={controller:t},e.on("identify",({sessionId:o})=>{t.checkGuides(window.location.href,o);}),e.on("pageview",({url:o,sessionId:i})=>{t.checkGuides(o,i);}),t.checkGuides(window.location.href,e.getSessionId());}}}exports.closeGuidePreview=an;exports.guidesPlugin=Ki;exports.previewGuide=vt;exports.runPreviewMode=dn;return exports;})({});//# sourceMappingURL=veo-guides.js.map
|
|
438
650
|
//# sourceMappingURL=veo-guides.js.map
|