1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50553],{23878:(e,t,l)=>{l.d(t,{KO:()=>d,Ml:()=>i,YS:()=>a,ZF:()=>o,_K:()=>s,gI:()=>n,p_:()=>c,r$:()=>r});let n=9,o=1.5,i=[8,8,9,51,12,12],r=["Pos","Menge","Ein.","Text","Betrag","Gesamt"],a=new Set(["Betrag","Gesamt","Preis","Menge","Ein.","Einheit"]),s=10,d=70,c=1.2},50553:(e,t,l)=>{l.d(t,{V:()=>C});var n,o,i=l(9966),r=l(4125);let a={h1:16,h2:14,h3:12};function s(e,t){return e&&t?"boldItalic":e?"bold":t?"italic":"regular"}var d=l(93269);let c={regular:"Roboto-Regular.ttf",bold:"Roboto-Bold.ttf",italic:"Roboto-Italic.ttf",boldItalic:"Roboto-BoldItalic.ttf"},u=["p","h1","h2","h3","strong","b","em","i","ul","ol","li","br"];async function p(e,t){let l="__richTextFonts",n=t.get(l);if(n)return n;let o=await import("fs"),i=await import("path"),r={};for(let[t,l]of Object.entries(c)){let n=(0,d.c)(l,o,i),a=o.readFileSync(n);r[t]=await e.embedFont(a,{subset:!0})}return t.set(l,r),r}function f(e,t){return e.replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(e,l)=>{let n=l.toLowerCase();return t.includes(n)?e.startsWith("</")?"</".concat(n,">"):"<".concat(n,">"):""})}var h=l(23878);function g(e,t){return e&&t?"boldItalic":e?"bold":t?"italic":"regular"}function y(e,t,l,n){if(!e)return[""];let o=e.split("\n"),i=[];for(let e of o){let o=e.split(/\s+/).filter(Boolean);if(0===o.length){i.push("");continue}let r="";for(let e of o){let o=r?"".concat(r," ").concat(e):e;t.widthOfTextAtSize(o,l)>n&&r?(i.push(r),r=e):r=o}r&&i.push(r)}return i.length>0?i:[""]}let b={r:.75,g:.75,b:.75},x={r:.91,g:.91,b:.91},m={pdf:async e=>{var t,l,n,o,i;let r,{value:a,schema:s,pdfDoc:d,page:c,pdfLib:u,_cache:f}=e;if(!a||!a.trim())return;try{r=JSON.parse(a)}catch(e){return}if(!r||0===r.length)return;let m=function(e,t,l){var n,o,i,r;let a=null!=(n=l.fontSize)?n:h.gI,s=null!=(o=l.rowPaddingY)?o:h.ZF,d=null!=(i=l.headWidthPercentages)?i:h.Ml,c=null!=(r=l.width)?r:0,u=1.4*a*.35278346151132434;return e.map(e=>{let l=function(e){switch(e){case"table_header":case"section_header":case"subtotal":return{bold:!0,italic:!1};case"separator":return{bold:!1,italic:!0};default:return{bold:!1,italic:!1}}}(e.rowType);if("separator"===e.rowType){let n=e.cells.join(" "),o=l.bold,i=l.italic;return{cells:[{lines:[n],font:t[g(o,i)],fontSize:a,bold:o,italic:i,underline:!1,strikethrough:!1}],rowType:e.rowType,heightMm:u+2*s,lineMode:e.lineMode,sectionMode:e.sectionMode}}if("section_header"===e.rowType){let n=l.bold,o=l.italic,i=t[g(n,o)],r=y(e.cells.filter(e=>""!==e.trim()).join(" "),i,a,Math.max(2.8346*c-8.5038,1)),d=Math.max(1,r.length)*u+2*s;return{cells:[{lines:r,font:i,fontSize:a,bold:n,italic:o,underline:!1,strikethrough:!1}],rowType:e.rowType,heightMm:d,lineMode:e.lineMode,sectionMode:e.sectionMode}}let n="subtotal"===e.rowType&&("eventual"===e.lineMode||"alternative"===e.lineMode),o=1,i=d.map((i,r)=>{var s,d,u,p,f,h,b;let x=null!=(d=e.cells[r])?d:"",m=null!=(u=null==(s=e.cellStyles)?void 0:s[r])?u:{},w=null!=(p=m.bold)?p:l.bold,S=null!=(f=m.italic)?f:n||l.italic,z=null!=(h=m.underline)&&h,v=null!=(b=m.strikethrough)&&b,T=t[g(w,S)],k=y(x,T,a,Math.max(i/100*c*2.8346-8.5038,1));return k.length>o&&(o=k.length),{lines:k,font:T,fontSize:a,bold:w,italic:S,underline:z,strikethrough:v}}),r=o*u+2*s;return{cells:i,rowType:e.rowType,heightMm:r,lineMode:e.lineMode,sectionMode:e.sectionMode}})}(r,await p(d,f),s),{rgb:w}=u,S=c.getHeight(),z=null!=(t=s.fontSize)?t:h.gI,v=null!=(l=s.rowPaddingY)?l:h.ZF,T=null!=(n=s.headWidthPercentages)?n:h.Ml,k=null!=(o=s.head)?o:h.r$,M=!1!==s.showBorders,_=!1!==s.showColumnDividers,C=null!=(i=function(e){if(!e)return null;let t=e.trim().match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(!t)return null;let l=t[1];3===l.length&&(l=l.split("").map(e=>e+e).join(""));let n=parseInt(l.slice(0,2),16)/255;return{r:n,g:parseInt(l.slice(2,4),16)/255,b:parseInt(l.slice(4,6),16)/255}}(s.headBackgroundColor))?i:x,E=s.width,A=2.8346*s.position.x,B=2.8346*s.position.y,P=2.8346*E,q=1.4*z,I=2.8346*v,L=T.map(e=>e/100*P),N=[],O=0;for(let e of L)N.push(O),O+=e;let F=0;for(let e of m){let t=B+2.8346*F,l=2.8346*e.heightMm,n=S-t-l;if("table_header"===e.rowType?c.drawRectangle({x:A,y:n,width:P,height:l,color:w(C.r,C.g,C.b),borderWidth:0}):"separator"===e.rowType&&c.drawRectangle({x:A,y:n,width:P,height:l,color:w(.96,.96,.96),borderWidth:0}),"separator"===e.rowType){let l=e.cells[0];l&&l.lines[0]&&c.drawText(l.lines[0],{x:A+4.2519,y:S-t-I-z,font:l.font,size:l.fontSize,color:w(.3,.3,.3)})}else if("section_header"===e.rowType){let l=e.cells[0];
1l&&l.lines.forEach((e,n)=>{let o=S-t-I-z-n*q;c.drawText(e,{x:A+4.2519,y:o,font:l.font,size:l.fontSize,color:w(0,0,0)})})}else e.cells.forEach((e,l)=>{var n;let o=A+N[l],i=L[l],r=null!=(n=k[l])?n:"",a=h.YS.has(r);e.lines.forEach((l,n)=>{let r;if(!l)return;let s=S-t-I-z-n*q;if(r=a?o+i-4.2519-e.font.widthOfTextAtSize(l,e.fontSize):o+4.2519,c.drawText(l,{x:r,y:s,font:e.font,size:e.fontSize,color:w(0,0,0)}),e.underline){let t=e.font.widthOfTextAtSize(l,e.fontSize);c.drawLine({start:{x:r,y:s-1},end:{x:r+t,y:s-1},thickness:.5,color:w(0,0,0)})}if(e.strikethrough){let t=e.font.widthOfTextAtSize(l,e.fontSize);c.drawLine({start:{x:r,y:s+.3*z},end:{x:r+t,y:s+.3*z},thickness:.5,color:w(0,0,0)})}})});if(M&&"separator"!==e.rowType){if(c.drawLine({start:{x:A,y:n},end:{x:A+P,y:n},thickness:.5,color:w(b.r,b.g,b.b)}),"subtotal"===e.rowType){let e=S-t;c.drawLine({start:{x:A,y:e},end:{x:A+P,y:e},thickness:.5,color:w(b.r,b.g,b.b)})}if(_&&("table_header"===e.rowType||"line"===e.rowType))for(let e=1;e<N.length;e++){let l=A+N[e];c.drawLine({start:{x:l,y:n},end:{x:l,y:S-t},thickness:.5,color:w(b.r,b.g,b.b)})}}F+=e.heightMm}},ui:e=>{var t,l,n,o,i,r;let{rootElement:a,schema:s,value:d}=e;if(!a)return;let c=null!=(t=s.fontSize)?t:h.gI,u=null!=(l=s.headWidthPercentages)?l:h.Ml,p=null!=(n=s.head)?n:h.r$,f=null!=(o=s.headBackgroundColor)?o:"#E8E8E8",g=document.createElement("div");g.style.fontFamily="Roboto, Arial, sans-serif",g.style.fontSize="".concat(c,"px"),g.style.width="100%",g.style.overflow="hidden";let y="Beispieltext",b=[{cells:p,rowType:"table_header",bold:!0,bg:f},{cells:["1.","","","Musterposition","",""],rowType:"section_header",bold:!0,bg:"transparent"},{cells:["1.1","10","Std","same_row"===s.descriptionMode?"Arbeitsleistung ".concat(y):"below"===s.descriptionMode?"Arbeitsleistung\n".concat(y):"Arbeitsleistung","50,00","500,00"],rowType:"line",bg:"transparent"},{cells:["","","","Zwischensumme","1.000,00","1.000,00"],rowType:"subtotal",bold:!0,bg:"transparent"}];for(let e of(()=>{if(!d||!String(d).trim())return b;try{let e=JSON.parse(String(d));return Array.isArray(e)&&e.length>0?e:b}catch(e){return b}})()){let t=document.createElement("div");t.style.display="flex",t.style.width="100%",t.style.backgroundColor=null!=(i=e.bg)?i:"table_header"===e.rowType?f:"transparent",e.color&&(t.style.color=e.color),"separator"===e.rowType&&(t.style.backgroundColor="#f5f5f5",t.style.fontStyle="italic");let l=null!=(r=e.bold)?r:["table_header","section_header","subtotal"].includes(e.rowType),n=1===e.cells.length||"section_header"===e.rowType||"separator"===e.rowType;(n?[e.cells.filter(Boolean).join(" "),"","","","",""]:e.cells).forEach((o,i)=>{var r,a,s,d,c,f,g,y;let b=document.createElement("div"),x=n?100*(0===i):null!=(g=u[i])?g:0;b.style.width="".concat(x,"%"),b.style.padding="".concat(h.ZF,"px ").concat(5.67,"px"),b.style.boxSizing="border-box",b.style.overflow="hidden",b.style.whiteSpace=o.includes("\n")?"pre-line":"nowrap",b.style.textOverflow="ellipsis",(l||(null==(a=e.cellStyles)||null==(r=a[i])?void 0:r.bold))&&(b.style.fontWeight="bold"),(null==(d=e.cellStyles)||null==(s=d[i])?void 0:s.italic)&&(b.style.fontStyle="italic"),(null==(f=e.cellStyles)||null==(c=f[i])?void 0:c.strikethrough)&&(b.style.textDecoration="line-through");let m=null!=(y=p[i])?y:"";h.YS.has(m)&&(b.style.textAlign="right"),b.textContent=o,t.appendChild(b)}),g.appendChild(t)}a.textContent="",a.appendChild(g)},propPanel:{schema:{fontSize:{title:"Font Size",type:"number",widget:"inputNumber",props:{min:4,max:36}},showBorders:{title:"Show Borders",type:"boolean",widget:"switch"},showColumnDividers:{title:"Show Column Dividers",type:"boolean",widget:"switch"},headBackgroundColor:{title:"Head Background",type:"string",widget:"color"},descriptionMode:{title:"Description",type:"string",widget:"select",props:{options:[{label:"Don't print",value:"none"},{label:"Print in same row",value:"same_row"},{label:"Print below",value:"below"}]}}},defaultSchema:{name:"",type:"quoteInvoiceLines",content:"",position:{x:0,y:0},width:190,height:15,showBorders:!0,showColumnDividers:!0,descriptionMode:"none",fontSize:h.gI,headWidthPercentages:[...h.Ml],head:[...h.r$],rowPaddingY:h.ZF,rotate:0,opacity:1}}},w={r:.6,g:.6,b:.6};function S(e){let t=e.findIndex(e=>"gross"===e.rowType),l=-1===t?e.length:t;for(let t=l-1;t>=0;t--)if("net"===e[t].rowType)return t;return -1}function z(e,t,l){var n,o;return"gross"===t?null!=(n=e.grossBorderStyle)?n:"single":l&&null!=(o=e.netBorderStyle)?o:"none"}let v={pdf:async e=>{var t,l,n,o,i;let r,{value:a,schema:s,pdfDoc:d,page:c,pdfLib:u,_cache:f}=e;if(!a||!a.trim())return;try{if(r=JSON.parse(a),!Array.isArray(r)||0===r.length)return}catch(e){return}let y=await p(d,f),{rgb:b}=u,x=c.getHeight(),m=null!=(t=s.fontSize)?t:h._K,v=null!=(l=s.rowPaddingY)?l:h.p_,T=null!=(n=s.labelWidthPercent)?n:h.KO,k=s.width,M=2.8346*s.position.x,_=2.8346*s.position.y,C=2.8346*k,E=T/100*C,A=2.8346*v,B=1.4*m,P=0,q=S(r);for(let[e,t]of r.entries()){if("divider"===t.rowType){let e=x-_-2.8346*P;c.drawLine({start:{x:M,y:e},end:{x:M+C,y:e},thickness:.5,color:b(w.r,w.g,w.b)}),P+=1.5;continue}let l=y[g(null!=(o=t.bold)?o:"gross"===t.rowType||"net"===t.rowType,null!=(i=t.italic)?i:"alternative_section"===t.rowType)],n=x-(_+2.8346*P)-A-m;if(t.label){let e=l.widthOfTextAtSize(t.label,m);
1c.drawText(t.label,{x:M+E-4.2519-e,y:n,font:l,size:m,color:b(0,0,0)})}if(t.amount){let e=l.widthOfTextAtSize(t.amount,m);c.drawText(t.amount,{x:M+C-4.2519-e,y:n,font:l,size:m,color:b(0,0,0)})}let r=z(s,t.rowType,e===q);if("none"!==r){let e=n-2,t="double"===r?2:1;for(let l=0;l<t;l++){let t=e-1.5*l;c.drawLine({start:{x:M,y:t},end:{x:M+C,y:t},thickness:.8,color:b(0,0,0)})}}P+=.35278346151132434*B+2*v}},ui:e=>{var t;let{rootElement:l,schema:n}=e;if(!l)return;let o=null!=(t=n.fontSize)?t:h._K,i=document.createElement("div");i.style.fontFamily="Roboto, Arial, sans-serif",i.style.fontSize="".concat(o,"px"),i.style.width="100%",i.style.overflow="hidden";let r=[{label:"Gefahrenbeseitigung",amount:"3.040,00 â¬",bold:!1},{label:"Material / Entsorgung",amount:"215,00 â¬",bold:!1},{label:"",amount:"",divider:!0},{label:"Netto",amount:"3.255,00 â¬",bold:!0,rowType:"net"},{label:"19% USt.",amount:"618,45 â¬",bold:!1},{label:"Brutto",amount:"3.873,45 â¬",bold:!0,rowType:"gross"}],a=S(r);for(let[e,t]of r.entries()){if(t.divider){let e=document.createElement("div");e.style.borderTop="1px solid #999",e.style.margin="2px 0",i.appendChild(e);continue}let l=document.createElement("div");l.style.display="flex",l.style.justifyContent="space-between",l.style.padding="1px 4px",t.bold&&(l.style.fontWeight="bold");let o=document.createElement("div");o.textContent=t.label;let r=document.createElement("div");r.textContent=t.amount,r.style.textAlign="right",l.appendChild(o),l.appendChild(r),i.appendChild(l);let s=z(n,t.rowType,e===a);if("none"!==s){let e="double"===s?2:1;for(let l=0;l<e;l++){let e=document.createElement("div");e.dataset["gross"===t.rowType?"grossBorderLine":"netBorderLine"]="true",e.style.borderTop="1px solid #000",e.style.margin="2px 0 0",i.appendChild(e)}}}l.textContent="",l.appendChild(i)},propPanel:{schema:{fontSize:{title:"Font Size",type:"number",widget:"inputNumber",props:{min:4,max:36}},grossBorderStyle:{title:"Gross Total Border",type:"string",widget:"select",props:{options:[{label:"None",value:"none"},{label:"Single line",value:"single"},{label:"Double line",value:"double"}]}},netBorderStyle:{title:"Net Total Border",type:"string",widget:"select",props:{options:[{label:"None",value:"none"},{label:"Single line",value:"single"},{label:"Double line",value:"double"}]}}},defaultSchema:{name:"",type:"quoteTotals",content:"",position:{x:0,y:0},width:100,height:40,fontSize:h._K,labelWidthPercent:h.KO,rowPaddingY:h.p_,grossBorderStyle:"single",netBorderStyle:"none",rotate:0,opacity:1}}};var T=l(84604);let k={r:.6,g:.6,b:.6};async function M(e){var t,l,n,o,i,r;let a,{value:s,schema:d,page:c,pdfLib:u,_cache:f}=e;if(!(null==s?void 0:s.trim()))return;try{if(a=JSON.parse(s),!Array.isArray(a)||0===a.length)return}catch(e){return}let y=await p(e.pdfDoc,f),{rgb:b}=u,x=c.getHeight(),m=null!=(n=d.fontSize)?n:h._K,w=null!=(o=d.rowPaddingY)?o:h.p_,S=Number(null==(t=d.position)?void 0:t.x),z=Number(null==(l=d.position)?void 0:l.y),v=Number(d.width);if(!Number.isFinite(S)||!Number.isFinite(z)||!Number.isFinite(v)||v<=0)return;let T=2.8346*S,M=2.8346*z,_=2.8346*v,C=2.8346*w,E=1.4*m,A=0;for(let e of a){if("divider"===e.rowType){let e=x-M-2.8346*A;c.drawLine({start:{x:T,y:e},end:{x:T+_,y:e},thickness:.5,color:b(k.r,k.g,k.b)}),A+=1.5;continue}let t=y[g(null!=(i=e.bold)?i:"section"===e.rowType,null!=(r=e.italic)&&r)],l=x-(M+2.8346*A)-C-m;if(e.label&&c.drawText(e.label,{x:T+4.2519,y:l,font:t,size:m,color:b(0,0,0)}),e.amount){let n=t.widthOfTextAtSize(e.amount,m);c.drawText(e.amount,{x:T+_-4.2519-n,y:l,font:t,size:m,color:b(0,0,0)})}A+=.35278346151132434*E+2*w}}let _={pdf:async e=>{await M(e)},ui:e=>{var t;let{rootElement:l,schema:n}=e;if(!l)return;let o=null!=(t=n.fontSize)?t:h._K;(0,T.qn)(l,o)},propPanel:{schema:null!=(o=null==(n=v.propPanel)?void 0:n.schema)?o:{},defaultSchema:{name:"payment_schedule_table",type:"paymentScheduleTable",content:(0,T.NR)(),position:{x:0,y:0},width:174,height:22,fontSize:h._K,labelWidthPercent:55,rowPaddingY:h.p_,rotate:0,opacity:1}}},C={text:i.n,image:r.Sl,svg:r.JW,line:r.n8,table:r.tp,rectangle:r.YC,ellipse:r.pw,checkbox:r.kv,radiogroup:r.R$,select:r.Lt,multivariabletext:r.rT,datetime:r.KQ,date:r.p6,time:r.kB,richtext:{uninterruptedEditMode:!0,pdf:async e=>{let{value:t,schema:l,pdfDoc:n,page:o,pdfLib:i,_cache:r}=e;if(t&&t.trim())try{var d;let e=null!=(d=l.fontSize)?d:10,c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!e||!e.trim())return[];if(!/<[a-z][\s\S]*>/i.test(e)){var l=e,n=t;let o=l.split("\n"),i=[];for(let e=0;e<o.length;e++)e>0&&i.push({text:"",font:"regular",fontSize:n,indent:0,isParagraphBreak:!0}),o[e].trim()&&i.push({text:o[e],font:"regular",fontSize:n,indent:0});return i}let o=[];return function e(t,l,n){let o,i=/<\/?([a-z][a-z0-9]*)\b[^>]*>|[^<]+/gi;for(;null!==(o=i.exec(t));){let d=o[0];if(!d.startsWith("</"))if(d.startsWith("<")){let o=d.match(/^<([a-z][a-z0-9]*)\b/i);if(!o)continue;let c=o[1].toLowerCase();if("br"===c){l.push({text:"\n",font:s(n.bold,n.italic),fontSize:n.fontSize,indent:n.indent});continue}let u=function(e,t,l){let n=1,o=t,i=RegExp("<".concat(l,"\\b"),"gi"),r=RegExp("</".concat(l,">"),"gi");for(;o<e.length&&n>0;){i.lastIndex=o,r.lastIndex=o;let l=i.exec(e),a=r.exec(e);if(!a)break;if(l&&l.index<a.index)n++,o=l.index+l[0].length;else{if(0==--n)return{content:e.slice(t,a.index),endIndex:a.index+a[0].length};o=a.index+a[0].length}}return{content:e.slice(t),endIndex:e.length}}(t,i.lastIndex,c);if(!u)continue;i.lastIndex=u.endIndex;let p=u.content;switch(c){case"p":l.length>0&&l.push({text:"",font:"regular",fontSize:n.fontSize,indent:0,isParagraphBreak:!0}),e(p,l,{...n});break;case"h1":case"h2":case"h3":{var r;l.length>0&&l.push({text:"",font:"regular",fontSize:n.fontSize,indent:0,isParagraphBreak:!0});let t=null!=(r=a[c])?r:n.fontSize;e(p,l,{...n,bold:!0,fontSize:t});for(let e=l.length-1;e>=0;e--)if(!l[e].isParagraphBreak){l[e].isHeading=!0;break}break}case"strong":case"b":e(p,l,{...n,bold:!0});break;case"em":case"i":e(p,l,{...n,italic:!0});break;case"ul":e(p,l,{...n,indent:n.indent+1,inOl:!1});break;case"ol":n.olCounters.push(0),e(p,l,{...n,indent:n.indent+1,inOl:!0}),n.olCounters.pop();break;case"li":{let t;if(l.length>0&&l.push({text:"",font:"regular",fontSize:n.fontSize,indent:0,isParagraphBreak:!0}),n.inOl){let e=n.olCounters.length-1;e>=0?(n.olCounters[e]++,t="".concat(n.olCounters[e],".")):t="â¢"}else t="â¢";let o=l.length;e(p,l,{...n});for(let e=o;e<l.length;e++)if(!l[e].isParagraphBreak&&l[e].text.trim()){l[e].listMarker=t,l[e].indent=n.indent;break}break}default:e(p,l,{...n})}}else{let e=d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/ /g," ");e&&l.push({text:e,font:s(n.bold,n.italic),fontSize:n.fontSize,indent:n.indent})}}}(e,o,{bold:!1,italic:!1,fontSize:t,indent:0,inOl:!1,olCounters:[]}),o}(t,e);if(0===c.length)return;let u=await p(n,r),f=function(e,t,l){let n=2.8346*l,o=[],i=0;for(let l of e){if(l.isParagraphBreak){i+=2;continue}l.isHeading&&(i+=4);let e=t[l.font],r=1.35*l.fontSize,a=14*l.indent,s=12*!!l.listMarker,d=n-a-s;if(d<=0)continue;
1let c=l.text.replace(/\n/g," ").split(/\s+/).filter(Boolean);if(0===c.length&&l.listMarker){o.push({segments:[{text:l.listMarker,font:e,fontSize:l.fontSize}],y:i,x:a}),i+=r;continue}let u="",p=!0;for(let t=0;t<c.length;t++){let n=u?"".concat(u," ").concat(c[t]):c[t];if(e.widthOfTextAtSize(n,l.fontSize)>d&&u){let n=[];p&&l.listMarker&&n.push({text:l.listMarker+" ",font:e,fontSize:l.fontSize}),n.push({text:u,font:e,fontSize:l.fontSize}),o.push({segments:n,y:i,x:a+(p?0:s)}),i+=r,u=c[t],p=!1}else u=n}if(u){let t=[];p&&l.listMarker&&t.push({text:l.listMarker+" ",font:e,fontSize:l.fontSize}),t.push({text:u,font:e,fontSize:l.fontSize}),o.push({segments:t,y:i,x:a+(p?0:s)}),i+=r}}return o}(c,u,l.width),h=o.getHeight(),g=2.8346*l.position.y,y=2.8346*l.position.x,{rgb:b}=i;for(let e of f){let t=e.segments[0];if(!t)continue;let l=h-g-e.y-t.fontSize,n=y+e.x;for(let t of e.segments)o.drawText(t.text,{x:n,y:l,font:t.font,size:t.fontSize,color:b(0,0,0)}),n+=t.font.widthOfTextAtSize(t.text,t.fontSize)}}catch(e){console.error("[richTextPlugin.pdf] Error rendering rich text:",e)}},ui:e=>{let{value:t,rootElement:l,schema:n,mode:o,onChange:i}=e;if(!l)return;let r="designer"===o,a=n.fontSize||10,s=document.createElement("div");s.style.width="100%",s.style.height="100%",s.style.overflow=r?"auto":"hidden",s.style.fontFamily="Roboto, Arial, sans-serif",s.style.fontSize="".concat(a,"px"),s.style.lineHeight="1.35",s.style.padding="2px",s.style.boxSizing="border-box";let d=[...u];t&&t.trim()&&(s.innerHTML=f(t,d)),function(e){e.querySelectorAll("h1").forEach(e=>{e.style.fontSize="16px",e.style.fontWeight="bold",e.style.margin="4px 0 2px"}),e.querySelectorAll("h2").forEach(e=>{e.style.fontSize="14px",e.style.fontWeight="bold",e.style.margin="3px 0 2px"}),e.querySelectorAll("h3").forEach(e=>{e.style.fontSize="12px",e.style.fontWeight="bold",e.style.margin="2px 0 1px"}),e.querySelectorAll("ul, ol").forEach(e=>{e.style.paddingLeft="14px",e.style.margin="2px 0"}),e.querySelectorAll("p").forEach(e=>{e.style.margin="2px 0"})}(s);let c=()=>{var e;if(!r||!i)return;let t=f(s.innerHTML,d);t!==(null!=(e=n.content)?e:"")&&i({key:"content",value:t})};r&&(s.contentEditable="true",s.style.cursor="text",s.style.outline="none",s.setAttribute("spellcheck","true"),s.addEventListener("pointerdown",e=>e.stopPropagation()),s.addEventListener("mousedown",e=>e.stopPropagation()),s.addEventListener("paste",e=>{var t,l,n,o;e.preventDefault(),e.stopPropagation();let i=null==(l=e.clipboardData)||null==(t=l.getData("text/html"))?void 0:t.trim(),r=null!=(o=null==(n=e.clipboardData)?void 0:n.getData("text/plain"))?o:"",a=i?f(i,d):r.split(/\r?\n/).map(e=>"<p>".concat(e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),"</p>")).join("");try{document.execCommand("insertHTML",!1,a)}catch(e){}c()}),s.addEventListener("blur",()=>{c()}),"designer"===o&&setTimeout(()=>{s.focus()},0)),l.innerHTML="",l.appendChild(s)},propPanel:{schema:{fontSize:{title:"Font Size",type:"number",widget:"inputNumber",props:{min:4,max:36}}},defaultSchema:{name:"",type:"richText",content:"",position:{x:0,y:0},width:170,height:60,fontSize:10,rotate:0,opacity:1}}},quoteinvoicelines:m,quotetotals:v,paymentscheduletable:_,qrcode:r._q.qrcode,code128:r._q.code128,ean13:r._q.ean13,ean8:r._q.ean8,japanpost:r._q.japanpost,code39:r._q.code39,upca:r._q.upca,upce:r._q.upce,nw7:r._q.nw7,itf14:r._q.itf14,gs1datamatrix:r._q.gs1datamatrix,pdf417:r._q.pdf417}},84604:(e,t,l)=>{l.d(t,{NR:()=>o,qn:()=>i});let n=[{label:"Zahlungsplan",amount:"",rowType:"section",bold:!0},{label:"Anzahlung bei Auftragserteilung",amount:"1.000,00 â¬",rowType:"net",bold:!1},{label:"Anzahlung Material (30 %)",amount:"793,54 â¬",rowType:"net",bold:!1},{label:"Nach Fertigstellung (Rest)",amount:"851,59 â¬",rowType:"net",bold:!1}];function o(){return JSON.stringify(n)}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,l=document.createElement("div");for(let e of(l.style.fontFamily="Roboto, Arial, sans-serif",l.style.fontSize="".concat(t,"px"),l.style.width="100%",l.style.color="#374151",l.style.lineHeight="1.35",n)){let t=document.createElement("div");t.style.display="flex",t.style.justifyContent="space-between",t.style.alignItems="baseline",t.style.gap="12px",t.style.padding="2px 0";let n=document.createElement("div");n.style.flex="1",n.style.minWidth="0",n.textContent=e.label,e.bold&&(n.style.fontWeight="bold");let o=document.createElement("div");o.textContent=e.amount,o.style.textAlign="right",o.style.whiteSpace="nowrap",o.style.flexShrink="0",e.amount&&(o.style.fontWeight="600"),t.appendChild(n),e.amount&&t.appendChild(o),l.appendChild(t)}e.textContent="",e.appendChild(l)}},93269:(e,t,l)=>{l.d(t,{c:()=>o});var n=l(87358);function o(e,t,l){let o=[l.join(n.cwd(),"lib","pdfme","fonts",e),l.join(n.cwd(),"public","fonts",e)];for(let e of o)if(t.existsSync(e))return e;throw Error("Roboto font not found: ".concat(e,". Tried: ").concat(o.join(", ")))}}}]);
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.