1import{u as r,S as e}from"./2c1ab0fe.RaLGJvq2.js";import{L as n,G as t,an as l,S as i,aa as c,ao as a,H as o}from"./164ad2e3.bPUx3Fg0.js";import{a as u}from"./f67abd2c.BTHhdhoM.js";import"./d0bb51ec.BIqtCEEY.js";import"./app.CPIYcwpp.js";import"./60a453ce.BHWO3gHr.js";import"./e12db40c.CeuzD2R-.js";import"./9dba8418.DCzpk36x.js";function s(r,{relativeUrlBase:e}={}){const n=function(r){if(!r)return null;if("string"!=typeof r)return r;try{const e=JSON.parse(r);return d(e)?e:null}catch{return null}}(r);return n?f(n,p(n),e):null}function d(r){return"object"==typeof r&&null!==r&&"type"in r&&"string"==typeof r.type}function h(n,t,l){return Array.isArray(n)?n.filter(d).map((n,i)=>r(e,{children:f(n,t,l)},i)):null}function f(t,l,i){switch(t.type){case"root":return r(e,{children:h(t.children,l,i)});case"paragraph":return r("p",{children:h(t.children,l,i)});case"heading":{const e=`h${function(r,e){const n=m(r)??e??1,t=e??n;return Math.min(6,4+Math.max(0,n-t))}(t.level,l)}`;return r(e,{children:h(t.children,l,i)})}case"list":return"ordered"===t.listType?r("ol",{children:h(t.children,l,i)}):r("ul",{children:h(t.children,l,i)});case"list-item":return r("li",{children:h(t.children,l,i)});case"link":{const c=function(r,e){if(r.startsWith("/")&&!r.startsWith("//")){if(!e)return null;try{return new URL(r,e).href}catch{return null}}let n;try{n=new URL(r)}catch{return null}return"http:"===n.protocol||"https:"===n.protocol?n.href:null}(t.url,i);return c?r(n,{href:c,target:"_blank"===t.target?"_blank":"auto",children:h(t.children,l,i)}):r(e,{children:h(t.children,l,i)})}case"text":return function(e){let n=e.value;return e.italic&&(n=r("em",{children:n})),e.bold&&(n=r("strong",{children:n})),n}(t);default:return null}}function p(r){let e="heading"===r.type?m(r.level):void 0;if("children"in r&&Array.isArray(r.children))for(const n of r.children){if(!d(n))continue;const r=p(n);void 0!==r&&(void 0===e||r<e)&&(e=r)}return e}function m(r){return void 0!==r&&r>=1&&r<=6?r:void 0}function g({content:e}){const{url:n}=u();return r(t,{children:s(e,{relativeUrlBase:n.storefront()})})}function y({disclosures:e}){return r(i,{gap:"large-200",children:e.map(e=>r(l,{children:r(i,{gap:"small-200",children:[r(c,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"base",alignItems:"center",children:[r(a,{disclosure:e,size:"large"}),r(o,{level:2,children:e.title})]}),r(l,{children:r(g,{content:e.content})})]})},e.id))})}export{y 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.