1import t from"./Dno-3OE4.js";import e from"./sU4Y0PXy.js";import{r as l,B as r,D as a,o,ac as s,i as n,h as u,v as c,g as f,F as i,E as p,a0 as m,s as y,x as v,f as d,ar as g,G as b}from"./CU7mbr9U.js";const h={key:0,class:"border-y border-gray-600 bg-gray-100 leading-tight"},k={class:"mb-2 font-bold uppercase text-primary"},x={key:0,class:"w-full font-bold uppercase text-primary"},A={key:1},$={class:"w-full font-bold uppercase text-primary"},w={class:"w-full"},C={key:1},j={__name:"mobile-table",props:{block:{type:[Object,String],default:()=>null}},setup(j){var E;const S=j,I=l((null==(E=S.block)?void 0:E.markup)||S.block||""),q=l(""),B=l([]),D=r((()=>{let t=I.value;return"object"==typeof t&&(t=""),t}));a(D,(t=>{q.value=t})),q.value=D.value,o((()=>{M(q.value)}));const F=t=>t.replace(/\u00A0/g," ").trim(),H=l(!1),M=l=>{const r=(new DOMParser).parseFromString(l,"text/html").querySelector("table");if(!r)return;const a=Array.from(r.querySelectorAll("thead tr")),o=Array.from(r.querySelectorAll("tbody tr")),n=a.length>0;H.value=n;const u=[];a.forEach(((t,e)=>{const l=[];let r=0;Array.from(t.children).forEach((t=>{for(;l[r];)r++;const a=parseInt(t.getAttribute("colspan")||"1"),o=parseInt(t.getAttribute("rowspan")||"1"),s=F(t.textContent);for(let e=0;e<a;e++)l[r+e]=s;for(let l=1;l<o;l++){u[e+l]||(u[e+l]=[]);for(let t=0;t<a;t++)u[e+l][r+t]=s}r+=a})),u[e]=l}));const c=u.length?Math.max(...u.map((t=>t.length))):0;if(!c&&o.length){const t=o[0];if(t){const e=Array.from(t.children).length;if(e>0){const t=Array(e).fill("").map(((t,e)=>`Col ${e+1}`));return N(o,t)}}}const f=!u.some((t=>{var e;return null==(e=t[0])?void 0:e.trim()})),i=c&&f?1:0,p=Array(c-i).fill("").map(((t,e)=>u.map((t=>t[e+i]||"")).filter(Boolean).join(" ").trim())),m={},y=[];o.forEach(((l,r)=>{var a;const o={};let n=0;const u=Array.from(l.children);let c=null,f=0;"TH"===(null==(a=u[0])?void 0:a.tagName)&&(c=F(u[0].textContent),f=1);for(let i=f;i<u.length;i++){const l=u[i];for(;m[`${r},${n}`];){const{value:t}=m[`${r},${n}`];o[p[n]]=t,n++}const a=parseInt(l.getAttribute("colspan")||"1"),c=parseInt(l.getAttribute("rowspan")||"1");let f,y=F(l.textContent);f="[v]"===y?s(t):"[x]"===y?s(e):y;for(let t=0;t<a;t++){const e=n+t;o[p[e]]=f;for(let t=1;t<c;t++)m[`${r+t},${e}`]={value:f,rowspan:c-t}}n+=a}for(;n<p.length;){if(m[`${r},${n}`]){const{value:t}=m[`${r},${n}`];o[p[n]]=t}n++}c?y.push({label:c,values:o}):y.push(o)})),B.value=y},N=(l,r)=>{const a=[];l.forEach((l=>{var o;const n={},u=Array.from(l.children);let c=null,f=0;"TH"===(null==(o=u[0])?void 0:o.tagName)&&(c=F(u[0].textContent),f=1);for(let a=f;a<u.length;a++){const l=u[a];let o,c=F(l.textContent);o="[v]"===c?s(t):"[x]"===c?s(e):c,n[r[a-f]||`Col ${a+1}`]=o}c?a.push({label:c,values:n}):a.push(n)})),B.value=a};return(t,e)=>{var l;return u(),n("div",null,[(null==(l=f(B))?void 0:l.length)?(u(),n("div",h,[(u(!0),n(i,null,p(f(B),((t,e)=>(u(),n("div",{key:e,class:m(["p-4 border-gray-400",e>0?"border-t":""])},["label"in t?(u(),n(i,{key:0},[y("div",k,v(t.label),1),(u(!0),n(i,null,p(t.values,((t,e)=>(u(),n("div",{class:"flex w-full my-2",key:e},[f(H)?(u(),n("strong",x,v(e)+": ",1)):c("",!0),y("span",{class:m(f(H)?"w-full":"w-auto")},[g(t)?(u(),d(b(t),{key:0})):(u(),n("span",A,v(t),1))],2)])))),128))],64)):(u(!0),n(i,{key:1},p(t,((t,e)=>(u(),n("div",{class:"flex w-full my-2",key:e},[y("strong",$,v(e)+":",1),y("span",w,[g(t)?(u(),d(b(t),{key:0})):(u(),n("span",C,v(t),1))])])))),128))],2)))),128))])):c("",!0)])}}};export{j 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.