PageSourceSearch

https://storyblok-assets-ng.mindvalley.com/_nuxt/COoUwr8l.js

js mindvalley.com collected 2026-09-24 08:24:11 UTC 2,327 bytes, 2 lines download raw bytes

1import{U as W,H as I}from"#entry";import{y as A,k as B,o as D,l as j,ai as L,A as T,D as m,aw as b,E as q,p as g,aq as O,j as C,_ as P,a as U}from"./D0rPpKiU.js";import{parseScriptAttributes as $,activateExternalScripts as F}from"./CNUngZjF.js";import"./D_gTWDL9.js";import"./D6SCFdCp.js";const J=["innerHTML"],N=A({__name:"HtmlWithComponents",props:{blok:{}},setup(u){const a=u,p=C(null),i=C([]),d=U(),h=()=>{const t=a.blok.html_code;return t?typeof t=="string"?t:t.code||"":""},f=m(()=>{const t=[];for(const e of a.blok.components||[]){const n=e.marker_id?.trim(),r=e.content;n&&r&&r.length>0&&t.push({marker:n,content:r,uid:e._uid})}return t}),x=m(()=>{const t=new Map;for(const e of f.value)e.marker&&e.content&&t.set(e.marker,e.content);return t}),k=t=>{if(t.includes("<body")){const e=t.match(/<body[^>]*>([\s\S]*?)<\/body>/i);if(e&&e[1])return(t.match(/<style[^>]*>[\s\S]*?<\/style>/gi)||[]).join(`
2`)+e[1]}return t},v=t=>{const e=[],n=[],r=/<script((?:[^>"']|"[^"]*"|'[^']*')*)>([\s\S]*?)<\/script>/gi;return{html:t.replace(r,(o,c,E)=>{if(/\ssrc\s*=/i.test(c)){const S=$(c),l=S.find(H=>H.name.toLowerCase()==="src");l&&l.value&&n.push({src:l.value,attrs:S})}else e.push(E);return""}),scripts:e,externals:n}},M=m(()=>{let t=h();t=k(t);const{html:e}=v(t);t=e;const n=/%%([^%]+)%%/g;return t=t.replace(n,(r,s)=>{const o=s.trim();return x.value.has(o)?`<div data-marker="${o}"></div>`:""}),t}),w=()=>{const t=h(),{scripts:e,externals:n}=v(k(t));e.forEach(r=>{try{new Function(r)()}catch{}}),F(n)},_=()=>{i.value.forEach(t=>{b(null,t)}),i.value=[]},y=async()=>{await q(),_();const t=p.value;t&&(f.value.forEach(e=>{t.querySelectorAll(`[data-marker="${e.marker}"]`).forEach(r=>{const s=e.content.map(c=>g(W,{blok:c,key:c._uid}));if(s.length===0)return;const o=s.length===1?s[0]:g("div",{class:"marker-content"},s);d?.appContext&&(o.appContext=d.appContext),b(o,r),i.value.push(r)})}),w())};return B(()=>{y()}),D(()=>{_()}),j(()=>{try{return JSON.stringify([a.blok.html_code,a.blok.components])}catch{return String(Math.random())}},()=>{y()},{flush:"post"}),(t,e)=>{const n=O("editable");return L((P(),T("div",{ref_key:"htmlContainer",ref:p,class:"html-with-components",innerHTML:M.value},null,8,J)),[[n,u.blok]])}}}),X=Object.assign(I(N,[["__scopeId","data-v-21dc67d3"]]),{__name:"HtmlWithComponents"});export{X as default};

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