render-tag 0.1.27 → 0.1.29
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/lib/css-resolver.d.ts.map +1 -1
- package/lib/css-resolver.js +77 -5
- package/lib/css-resolver.js.map +1 -1
- package/lib/layout.d.ts +15 -1
- package/lib/layout.d.ts.map +1 -1
- package/lib/layout.js +36 -5
- package/lib/layout.js.map +1 -1
- package/lib/path/index.d.ts.map +1 -1
- package/lib/path/index.js +39 -19
- package/lib/path/index.js.map +1 -1
- package/lib/render-tag.umd.js +7 -7
- package/lib/render-tag.umd.js.map +1 -1
- package/lib/render.d.ts +16 -1
- package/lib/render.d.ts.map +1 -1
- package/lib/render.js +71 -15
- package/lib/render.js.map +1 -1
- package/lib/types.d.ts +27 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/path/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/path/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,GAIf,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAsB,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;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AAC,CAAC;QACnB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QAC/B,MAAM,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;QACzD,MAAM,KAAK,GAAG;YACZ,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;YAClC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,IAAI;SAChC,CAAC;QACF,IAAI,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;;YACnC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;IACD,GAAG,CAAC,MAAM,EAAE,CAAC;IACb,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACpB,GAAG,CAAC,OAAO,EAAE,CAAC;AAChB,CAAC;AAED,wEAAwE"}
|
package/lib/render-tag.umd.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RenderTag={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=null,n=null;function r(e){t=e,e===null&&(n=null)}function i(e){let t=typeof document<`u`,n=typeof OffscreenCanvas<`u`;if(t&&(e||!n))return document.createElement(`canvas`).getContext(`2d`);if(n)return new OffscreenCanvas(1,1).getContext(`2d`);throw Error(`render-tag: no canvas available for text measurement. In a non-browser environment, pass config.ctx (a 2D context).`)}function a(){if(t)return t;if(typeof DOMParser<`u`)return n||=new DOMParser,n;throw Error(`render-tag: no DOM parser available. In a non-browser environment, inject one via setDOMParser(new DOMParser()) using a DOM library such as linkedom or jsdom.`)}function o(e){let t=a().parseFromString(`<!DOCTYPE html><html><head></head><body>${e}</body></html>`,`text/html`),n=t.querySelectorAll(`style`),r=``;for(let e of n)r+=e.textContent+`
|
|
2
|
-
`,e.remove();t.body.normalize();let i=t.createDocumentFragment();for(;t.body.firstChild;)i.appendChild(t.body.firstChild);return{fragment:i,css:r}}var s=1,c=3;function l(e){let t=[],n=[];e=e.replace(/\/\*[\s\S]*?\*\//g,``);let r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length)break;if(e[r]===`@`){let t=r,i=0;for(;r<e.length;){if(e[r]===`{`&&i++,e[r]===`}`&&(i--,i<=0)){r++;break}r++}let a=e.slice(t,r);a.startsWith(`@font-face`)&&n.push(a);continue}let i=r;for(;r<e.length&&e[r]!==`{`;)r++;if(r>=e.length)break;let a=e.slice(i,r).trim();r++;let o=r;for(;r<e.length&&e[r]!==`}`;)r++;let s=e.slice(o,r).trim();if(r++,!a)continue;let c=a.split(`,`).map(e=>e.trim()).filter(Boolean),l=[];for(let e of s.split(`;`)){let t=e.indexOf(`:`);if(t===-1)continue;let n=e.slice(0,t).trim().toLowerCase(),r=e.slice(t+1).trim();n&&r&&l.push({property:n,value:r})}c.length>0&&l.length>0&&t.push({selectors:c,declarations:l})}return{rules:t,fontFaceRules:n}}function u(e){let t=e.replace(/::[\w-]+/g,``).split(/\s*>\s*|\s+/),n=0,r=0,i=0;for(let e of t){let t=e.match(/#[\w-]+/g);t&&(n+=t.length);let a=e.match(/\.[\w-]+/g);a&&(r+=a.length);let o=e.replace(/[#.][\w-]+/g,``).replace(/:[\w-]+/g,``).trim();o&&o!==`*`&&i++}return[n,r,i]}function d(e){let t=e.match(/\.[\w-]+/g)||[],n=e.replace(/\.[\w-]+/g,``).replace(/:[\w-]+/g,``).trim();return{tag:n&&n!==`*`?n:``,classes:t.map(e=>e.slice(1))}}function f(e,t){if(e.tag&&e.tag!==t.tagName)return!1;for(let n of e.classes)if(!t.classes.has(n))return!1;return!0}function p(e){let t;if(e.includes(`::`)){if(e.replace(/::marker\b/g,``).includes(`::`))return null;if(/::marker\b/.test(e))t=`marker`,e=e.replace(/(^|[\s>])::marker\b/g,`$1*`),e=e.replace(/::marker\b/g,``);else return null}if(/:(?:nth-|hover|focus|active|visited|first-child|last-child)/.test(e))return null;let n=[],r=[],i=e.trim().split(/\s+/);for(let e=0;e<i.length;e++)i[e]===`>`?r.push(`>`):(n.length>r.length+1&&r.push(` `),n.push(i[e]));for(;r.length<n.length-1;)r.push(` `);if(n.length===0)return null;let a=n.map(d),o=a[a.length-1],s=o.tag;return{parts:a,combinators:r,rightmost:o,rightmostIsRoot:s===`html`||s===`body`,spec:u(e),pseudoElement:t}}function m(e,t){if(e.rightmostIsRoot){if(t.parent!==null)return!1}else if(!f(e.rightmost,t))return!1;if(e.parts.length===1)return!0;let n=t.parent;for(let t=e.parts.length-2;t>=0;t--){if(!n)return!1;let r=e.parts[t];if(e.combinators[t]===`>`)if(n.parent===null&&(r.tag===`html`||r.tag===`body`))n=n.parent;else if(f(r,n))n=n.parent;else return!1;else{let e=!1;for(;n;){if(n.parent===null&&(r.tag===`html`||r.tag===`body`)){n=n.parent,e=!0;break}if(f(r,n)){n=n.parent,e=!0;break}n=n.parent}if(!e)return!1}}return!0}function h(){return{fontFamily:`serif`,fontSize:16,fontWeight:400,fontStyle:`normal`,fontVariantCaps:`normal`,color:`rgb(0, 0, 0)`,textAlign:`start`,textAlignLast:`auto`,textIndent:0,textTransform:`none`,textDecorationLine:`none`,textDecorationStyle:`solid`,textDecorationColor:`rgb(0, 0, 0)`,textDecorations:[],textShadow:`none`,webkitTextStrokeWidth:0,webkitTextStrokeColor:``,webkitTextStrokeImage:`none`,webkitTextFillColor:``,paintOrder:`normal`,strokeLinejoin:`round`,webkitBackgroundClip:``,backgroundImage:`none`,letterSpacing:0,wordSpacing:0,fontKerning:`auto`,lineHeight:0,verticalAlign:`baseline`,whiteSpace:`normal`,wordBreak:`normal`,overflowWrap:`normal`,unicodeBidi:`normal`,direction:`ltr`,display:`block`,width:0,minHeight:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,backgroundColor:`rgba(0, 0, 0, 0)`,borderTopWidth:0,borderTopColor:`rgb(0, 0, 0)`,borderTopStyle:`none`,borderRightWidth:0,borderRightColor:`rgb(0, 0, 0)`,borderRightStyle:`none`,borderBottomWidth:0,borderBottomColor:`rgb(0, 0, 0)`,borderBottomStyle:`none`,borderLeftWidth:0,borderLeftColor:`rgb(0, 0, 0)`,borderLeftStyle:`none`,flexDirection:`row`,gap:0,flexGrow:0,listStyleType:`disc`,lineClamp:0}}var g={span:{display:`inline`},a:{display:`inline`},strong:{display:`inline`,fontWeight:700},b:{display:`inline`,fontWeight:700},em:{display:`inline`,fontStyle:`italic`},i:{display:`inline`,fontStyle:`italic`},u:{display:`inline`,textDecorationLine:`underline`},s:{display:`inline`,textDecorationLine:`line-through`},strike:{display:`inline`,textDecorationLine:`line-through`},del:{display:`inline`,textDecorationLine:`line-through`},sub:{display:`inline`,verticalAlign:`sub`,fontSize:.83},sup:{display:`inline`,verticalAlign:`super`,fontSize:.83},code:{display:`inline`,fontFamily:`monospace`},cite:{display:`inline`,fontStyle:`italic`},bdo:{display:`inline`,unicodeBidi:`bidi-override`},bdi:{display:`inline`,unicodeBidi:`isolate`},p:{display:`block`,marginTop:-1,marginBottom:-1},div:{display:`block`},h1:{display:`block`,fontSize:2,fontWeight:700,marginTop:-.67,marginBottom:-.67},h2:{display:`block`,fontSize:1.5,fontWeight:700,marginTop:-.83,marginBottom:-.83},h3:{display:`block`,fontSize:1.17,fontWeight:700,marginTop:-1,marginBottom:-1},h4:{display:`block`,fontSize:1,fontWeight:700,marginTop:-1.33,marginBottom:-1.33},h5:{display:`block`,fontSize:.83,fontWeight:700,marginTop:-1.67,marginBottom:-1.67},h6:{display:`block`,fontSize:.67,fontWeight:700,marginTop:-2.33,marginBottom:-2.33},ul:{display:`block`,listStyleType:`disc`,marginTop:-1,marginBottom:-1},ol:{display:`block`,listStyleType:`decimal`,marginTop:-1,marginBottom:-1},li:{display:`list-item`},blockquote:{display:`block`,marginTop:-1,marginBottom:-1,marginLeft:40,marginRight:40},pre:{display:`block`,whiteSpace:`pre`,fontFamily:`monospace`,marginTop:-1,marginBottom:-1},table:{display:`table`},tr:{display:`table-row`},td:{display:`table-cell`},th:{display:`table-cell`,fontWeight:700},br:{display:`inline`},hr:{display:`block`,borderTopWidth:1,borderTopStyle:`solid`,borderTopColor:`gray`,marginTop:-.5,marginBottom:-.5}};function _(e,t,n){if(!e||e===`normal`||e===`auto`||e===`none`)return 0;let r=e.trim();if(r.endsWith(`em`)){let e=parseFloat(r);return isNaN(e)?0:e*t}if(r.endsWith(`%`)){let e=parseFloat(r);return isNaN(e)?0:e/100*n}if(r.endsWith(`px`)){let e=parseFloat(r);return isNaN(e)?0:e}let i=parseFloat(r);return isNaN(i)?0:i}function v(e){if(e===`bold`)return 700;if(e===`normal`)return 400;let t=parseInt(e,10);return isNaN(t)?400:t}function y(e){let t=e.trim().toLowerCase();if(!t||t===`normal`)return!1;let n=t.split(/\s+/).filter(e=>e===`fill`||e===`stroke`),r=n.indexOf(`stroke`),i=n.indexOf(`fill`);return r===-1?!1:i===-1?!0:r<i}function b(e){let t=[],n=0,r=``;for(let i=0;i<e.length;i++){let a=e[i];a===`(`?(n++,r+=a):a===`)`?(n=Math.max(0,n-1),r+=a):n===0&&/\s/.test(a)?r&&=(t.push(r),``):r+=a}return r&&t.push(r),t}function x(e,t){if(e===`margin`||e===`padding`){let n=t.trim().split(/\s+/),r,i,a,o;return n.length===1?r=i=a=o=n[0]:n.length===2?(r=a=n[0],i=o=n[1]):n.length===3?(r=n[0],i=o=n[1],a=n[2]):(r=n[0],i=n[1],a=n[2],o=n[3]),[{property:`${e}-top`,value:r},{property:`${e}-right`,value:i},{property:`${e}-bottom`,value:a},{property:`${e}-left`,value:o}]}if(e===`border`||e===`border-top`||e===`border-right`||e===`border-bottom`||e===`border-left`){let n=t.trim().split(/\s+/),r=[`solid`,`dashed`,`dotted`,`double`,`none`,`hidden`],i=n.find(e=>e.endsWith(`px`)||/^\d/.test(e))||`0`,a=n.find(e=>r.includes(e))||`none`,o=n.find(e=>!e.endsWith(`px`)&&!/^\d/.test(e)&&!r.includes(e))||`currentColor`,s=[],c=e===`border`?[`top`,`right`,`bottom`,`left`]:[e.replace(`border-`,``)];for(let e of c)s.push({property:`border-${e}-width`,value:i}),s.push({property:`border-${e}-style`,value:a}),s.push({property:`border-${e}-color`,value:o});return s}if(e===`list-style`)return t===`none`?[{property:`list-style-type`,value:`none`}]:[{property:`list-style-type`,value:t}];if(e===`text-decoration`){let e=t.trim();if(e===`inherit`||e===`none`)return[{property:`text-decoration-line`,value:`none`}];let n=``,r=e.replace(/\b(rgba?\([^)]*\)|hsla?\([^)]*\))/i,e=>(n=e,``)).split(/\s+/).filter(Boolean),i=[`underline`,`overline`,`line-through`],a=[`solid`,`double`,`dotted`,`dashed`,`wavy`],o=[],s=[];for(let e of r)i.includes(e)?s.push(e):a.includes(e)?o.push({property:`text-decoration-style`,value:e}):!/^[\d.+-]/.test(e)&&e!==`auto`&&e!==`from-font`&&o.push({property:`text-decoration-color`,value:e});return n&&o.push({property:`text-decoration-color`,value:n}),s.length>0&&o.unshift({property:`text-decoration-line`,value:s.join(` `)}),o}if(e===`-webkit-text-stroke`){let e=b(t.trim()),n=e.find(e=>e.endsWith(`px`)||/^\d/.test(e))||`0`,r=e.find(e=>!e.endsWith(`px`)&&!/^\d/.test(e))||`currentColor`;return[{property:`-webkit-text-stroke-width`,value:n},{property:`-webkit-text-stroke-color`,value:r}]}if(e===`flex`){let e=t.trim().split(/\s+/),n=parseFloat(e[0]);return isNaN(n)?[]:[{property:`flex-grow`,value:String(n)}]}return e===`border-collapse`||e===`border-spacing`?[]:[{property:e,value:t}]}function S(e){let t=e.trim();return t.toLowerCase()===`currentcolor`?``:t}function C(e,t,n,r,i,a){let o=e.fontSize||r;switch(t){case`font-family`:e.fontFamily=n.trim();break;case`font-size`:{let t=n.trim();t.endsWith(`em`)?e.fontSize=parseFloat(t)*r:t.endsWith(`%`)?e.fontSize=parseFloat(t)/100*r:e.fontSize=parseFloat(t)||r;break}case`font-weight`:e.fontWeight=v(n);break;case`font-style`:e.fontStyle=n.trim();break;case`font-variant`:case`font-variant-caps`:e.fontVariantCaps=/\bsmall-caps\b/.test(n)?`small-caps`:`normal`;break;case`color`:e.color=n.trim();break;case`text-align`:e.textAlign=n.trim();break;case`text-align-last`:e.textAlignLast=n.trim();break;case`text-indent`:e.textIndent=_(n,o,i);break;case`text-transform`:e.textTransform=n.trim();break;case`text-decoration-line`:e.textDecorationLine=n.trim();break;case`text-decoration`:break;case`text-decoration-style`:e.textDecorationStyle=n.trim();break;case`text-decoration-color`:e.textDecorationColor=n.trim();break;case`text-shadow`:e.textShadow=n.trim();break;case`-webkit-text-stroke-width`:e.webkitTextStrokeWidth=_(n,o,i);break;case`-webkit-text-stroke-color`:e.webkitTextStrokeColor=S(n);break;case`--rt-text-stroke-image`:e.webkitTextStrokeImage=n.trim();break;case`-webkit-text-fill-color`:e.webkitTextFillColor=S(n);break;case`paint-order`:e.paintOrder=n.trim();break;case`stroke-linejoin`:e.strokeLinejoin=n.trim();break;case`-webkit-background-clip`:case`background-clip`:e.webkitBackgroundClip=n.trim();break;case`background-image`:e.backgroundImage=n.trim();break;case`letter-spacing`:e.letterSpacing=n.trim()===`normal`?0:_(n,o,i);break;case`word-spacing`:e.wordSpacing=n.trim()===`normal`?0:_(n,o,i);break;case`font-kerning`:e.fontKerning=n.trim();break;case`line-height`:{let t=n.trim();if(t===`normal`)e.lineHeight=0;else if(t.endsWith(`px`))e.lineHeight=parseFloat(t)||0;else if(t.endsWith(`em`))e.lineHeight=parseFloat(t)*o;else if(t.endsWith(`%`)){let n=parseFloat(t);isNaN(n)||(e.lineHeight=n/100*o)}else{let n=parseFloat(t);isNaN(n)||(e.lineHeight=n*o,e._lineHeightMultiplier=n)}break}case`-webkit-line-clamp`:case`line-clamp`:{let t=n.trim().toLowerCase();if(t===`none`||t===`auto`)e.lineClamp=0;else{let n=parseInt(t,10);e.lineClamp=Number.isFinite(n)&&n>0?n:0}break}case`vertical-align`:e.verticalAlign=n.trim();break;case`white-space`:e.whiteSpace=n.trim();break;case`word-break`:e.wordBreak=n.trim();break;case`overflow-wrap`:case`word-wrap`:e.overflowWrap=n.trim();break;case`direction`:e.direction=n.trim();break;case`unicode-bidi`:e.unicodeBidi=n.trim();break;case`display`:e.display=n.trim();break;case`width`:{let t=n.trim();t===`100%`?e.width=i:t!==`auto`&&(e.width=_(t,o,i));break}case`min-height`:e.minHeight=_(n,o,i);break;case`padding-top`:e.paddingTop=_(n,o,i);break;case`padding-right`:e.paddingRight=_(n,o,i);break;case`padding-bottom`:e.paddingBottom=_(n,o,i);break;case`padding-left`:e.paddingLeft=_(n,o,i);break;case`margin-top`:e.marginTop=_(n,o,i);break;case`margin-right`:e.marginRight=_(n,o,i);break;case`margin-bottom`:e.marginBottom=_(n,o,i);break;case`margin-left`:e.marginLeft=_(n,o,i);break;case`background-color`:e.backgroundColor=n.trim();break;case`background`:{let t=n.trim();t.includes(`gradient(`)?e.backgroundImage=t:(t.startsWith(`#`)||t.startsWith(`rgb`)||t.startsWith(`hsl`)||[`transparent`,`none`,`inherit`].includes(t)||/^[a-z]+$/.test(t))&&(e.backgroundColor=t);break}case`padding-inline-start`:a===`rtl`?e.paddingRight=_(n,o,i):e.paddingLeft=_(n,o,i);break;case`padding-inline-end`:a===`rtl`?e.paddingLeft=_(n,o,i):e.paddingRight=_(n,o,i);break;case`margin-inline-start`:a===`rtl`?e.marginRight=_(n,o,i):e.marginLeft=_(n,o,i);break;case`margin-inline-end`:a===`rtl`?e.marginLeft=_(n,o,i):e.marginRight=_(n,o,i);break;case`border-top-width`:e.borderTopWidth=_(n,o,i);break;case`border-top-color`:e.borderTopColor=n.trim();break;case`border-top-style`:e.borderTopStyle=n.trim();break;case`border-right-width`:e.borderRightWidth=_(n,o,i);break;case`border-right-color`:e.borderRightColor=n.trim();break;case`border-right-style`:e.borderRightStyle=n.trim();break;case`border-bottom-width`:e.borderBottomWidth=_(n,o,i);break;case`border-bottom-color`:e.borderBottomColor=n.trim();break;case`border-bottom-style`:e.borderBottomStyle=n.trim();break;case`border-left-width`:e.borderLeftWidth=_(n,o,i);break;case`border-left-color`:e.borderLeftColor=n.trim();break;case`border-left-style`:e.borderLeftStyle=n.trim();break;case`flex-direction`:e.flexDirection=n.trim();break;case`gap`:e.gap=_(n,o,i);break;case`flex-grow`:e.flexGrow=parseFloat(n)||0;break;case`list-style-type`:e.listStyleType=n.trim();break;case`position`:case`top`:case`left`:case`right`:case`bottom`:case`inset-inline-start`:case`inset-inline-end`:case`content`:case`counter-reset`:case`counter-increment`:case`border-radius`:case`border-top-left-radius`:case`border-top-right-radius`:case`border-bottom-left-radius`:case`border-bottom-right-radius`:case`cursor`:case`opacity`:case`overflow`:case`box-sizing`:case`outline`:case`transition`:case`transform`:case`font-stretch`:case`font-display`:case`src`:case`unicode-range`:break}}var w=[[`font-family`,`fontFamily`],[`font-size`,`fontSize`],[`font-weight`,`fontWeight`],[`font-style`,`fontStyle`],[`color`,`color`],[`text-align`,`textAlign`],[`text-align-last`,`textAlignLast`],[`text-indent`,`textIndent`],[`text-transform`,`textTransform`],[`white-space`,`whiteSpace`],[`word-break`,`wordBreak`],[`overflow-wrap`,`overflowWrap`],[`direction`,`direction`],[`letter-spacing`,`letterSpacing`],[`word-spacing`,`wordSpacing`],[`line-height`,`lineHeight`],[`text-shadow`,`textShadow`],[`font-kerning`,`fontKerning`],[`list-style-type`,`listStyleType`],[`vertical-align`,`verticalAlign`],[`paint-order`,`paintOrder`],[`stroke-linejoin`,`strokeLinejoin`],[`-webkit-text-stroke-width`,`webkitTextStrokeWidth`],[`-webkit-text-stroke-color`,`webkitTextStrokeColor`],[`-webkit-text-fill-color`,`webkitTextFillColor`]];function T(e,t,n){for(let[r,i]of w)if(!n.has(r))if(i===`lineHeight`){let n=t._lineHeightMultiplier;n===void 0?e.lineHeight=t.lineHeight:(e.lineHeight=n*e.fontSize,e._lineHeightMultiplier=n)}else e[i]=t[i]}function E(e){let t=new Map,n=new Map,r=[],i=0;for(let a of e){let e=[];for(let t of a.declarations){let n=t.value.includes(`!important`),r=n?t.value.replace(/\s*!important\s*/g,``).trim():t.value,i=x(t.property,r);for(let t of i)e.push({property:t.property,value:t.value,important:n})}for(let o of a.selectors){let a=p(o);if(!a)continue;let s={selector:a,declarations:e,orderBase:i++},c=a.rightmost;if(c.tag&&!a.rightmostIsRoot){let e=t.get(c.tag);e?e.push(s):t.set(c.tag,[s])}if(c.classes.length>0){let e=c.classes[0],t=n.get(e);t?t.push(s):n.set(e,[s])}!c.tag&&c.classes.length===0&&r.push(s),a.rightmostIsRoot&&r.push(s)}}return{byTag:t,byClass:n,universal:r}}function D(e,t){switch(t){case`disc`:return`•`;case`circle`:return`○`;case`square`:return`■`;case`none`:return``;case`decimal-leading-zero`:return`${e<10&&e>=0?`0`+e:e}.`;case`lower-roman`:return`${O(e).toLowerCase()}.`;case`upper-roman`:return`${O(e)}.`;case`lower-alpha`:case`lower-latin`:return`${k(e).toLowerCase()}.`;case`upper-alpha`:case`upper-latin`:return`${k(e)}.`;default:return`${e}.`}}function O(e){if(e<1||e>3999)return`${e}`;let t=[[1e3,`M`],[900,`CM`],[500,`D`],[400,`CD`],[100,`C`],[90,`XC`],[50,`L`],[40,`XL`],[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]],n=``;for(let[r,i]of t)for(;e>=r;)n+=i,e-=r;return n}function k(e){if(e<1)return`${e}`;let t=``;for(;e>0;){let n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-1)/26)}return t}function A(e,t){if(e.tagName.toLowerCase()!==`li`)return;if(t===`none`)return``;let n=e.parentElement,r=n?.tagName.toLowerCase();if(t===`disc`||t===`circle`||t===`square`)return D(0,t);if(r===`ol`||r===`ul`||!n){let r=n?Array.from(n.children).filter(e=>e.tagName.toLowerCase()===`li`):[e],i=n?.getAttribute(`start`),a=n?.hasAttribute(`reversed`)??!1,o=i?parseInt(i,10):a?r.length:1,s=a?-1:1,c=o;for(let n of r){let r=n.getAttribute(`value`);if(r){let e=parseInt(r,10);Number.isNaN(e)||(c=e)}if(n===e)return D(c,t||`decimal`);c+=s}return D(c,t||`decimal`)}}function j(e){let t=e.style;return t&&typeof t.cssText==`string`?t:null}function M(e){let t=[];for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim().toLowerCase(),i=n.slice(e+1).trim();r&&i&&t.push({property:r,value:i})}return t}function N(e,t,n){let{rules:r,fontFaceRules:i}=l(t),a=null;i.length>0&&typeof document<`u`&&document.head&&(a=document.createElement(`style`),a.textContent=i.join(`
|
|
3
|
-
`),document.head.appendChild(a));let o=E(r),u=e.ownerDocument.createElement(`div`);u.appendChild(e);function d(e,t){let n=new Set,r=e.getAttribute(`class`);if(r)for(let e of r.split(/\s+/))e&&n.add(e);return{tagName:e.tagName.toLowerCase(),classes:n,parent:t,el:e}}function f(e,t,r){let i=e.tagName.toLowerCase(),a=d(e,r),s=h(),c=new Set,l=[],u=new Set,f=o.byTag.get(i);if(f)for(let e of f)u.add(e),l.push(e);for(let e of a.classes){let t=o.byClass.get(e);if(t)for(let e of t)u.has(e)||(u.add(e),l.push(e))}for(let e of o.universal)u.has(e)||(u.add(e),l.push(e));let _=[],v=[];for(let e of l)if(m(e.selector,a)){let t=e.selector.pseudoElement===`marker`?v:_;for(let n of e.declarations)t.push({property:n.property,value:n.value,specificity:e.selector.spec,order:e.orderBase,important:n.important})}let y=g[i],b=!1;if(y?.fontSize!==void 0){let e=y.fontSize;e<10?s.fontSize=e*t.fontSize:s.fontSize=e,b=!0,c.add(`font-size`)}_.length>1&&_.sort((e,t)=>{if(e.important!==t.important)return e.important?1:-1;let n=e.specificity,r=t.specificity;return n[0]===r[0]?n[1]===r[1]?n[2]===r[2]?e.order-t.order:n[2]-r[2]:n[1]-r[1]:n[0]-r[0]});for(let e of _)e.property===`font-size`&&(C(s,e.property,e.value,t.fontSize,n,t.direction),b=!0);let S=j(e);if(S&&S.cssText){let e=M(S.cssText);for(let r of e)r.property===`font-size`&&(C(s,r.property,r.value,t.fontSize,n,t.direction),b=!0)}b||(s.fontSize=t.fontSize);let w=s.fontSize;if(y){for(let[e,t]of Object.entries(y)){if(e===`fontSize`)continue;s[e]=t;let n=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase());c.add(n)}s.marginTop<0&&(s.marginTop=Math.abs(s.marginTop)*w),s.marginBottom<0&&(s.marginBottom=Math.abs(s.marginBottom)*w),(i===`ul`||i===`ol`)&&(t.direction===`rtl`?(s.paddingRight=40,c.add(`padding-right`)):(s.paddingLeft=40,c.add(`padding-left`)))}let E=t.direction,D={"word-wrap":`overflow-wrap`};for(let e of _)e.property!==`font-size`&&(C(s,e.property,e.value,w,n,E),c.add(D[e.property]||e.property));let O=!!S?.width;if(S&&S.cssText){let e=M(S.cssText);for(let t of e){if(t.property===`font-size`){c.add(`font-size`);continue}let e=x(t.property,t.value);for(let t of e)C(s,t.property,t.value,w,n,E),c.add(D[t.property]||t.property)}}O||(s.width=0);let k=e.getAttribute(`dir`);k&&(s.direction=k,c.add(`direction`)),c.add(`font-size`),T(s,t,c),c.has(`text-decoration-color`)?s.textDecorationColor===`currentColor`&&(s.textDecorationColor=s.color):s.textDecorationColor=s.webkitTextFillColor||s.color;for(let e of[`Top`,`Right`,`Bottom`,`Left`]){let t=`border${e}Color`,n=`border-${e.toLowerCase()}-color`;c.has(n)?s[t]===`currentColor`&&(s[t]=s.color):s[t]=s.color}let N=[];if(s.textDecorationLine&&s.textDecorationLine!==`none`)for(let e of s.textDecorationLine.split(/\s+/))e&&e!==`none`&&N.push({line:e,color:s.textDecorationColor,style:s.textDecorationStyle});s.textDecorations=t.textDecorations.length?[...t.textDecorations,...N]:N;let P=new Set(s.textDecorationLine.split(/\s+/).filter(e=>e&&e!==`none`));if(t.textDecorationLine&&t.textDecorationLine!==`none`)for(let e of t.textDecorationLine.split(/\s+/))e&&e!==`none`&&P.add(e);P.size>0&&(s.textDecorationLine=[...P].join(` `));let F=A(e,s.listStyleType),I,L=!1;if(i===`li`&&v.length>0){v.length>1&&v.sort((e,t)=>{if(e.important!==t.important)return e.important?1:-1;let n=e.specificity,r=t.specificity;return n[0]===r[0]?n[1]===r[1]?n[2]===r[2]?e.order-t.order:n[2]-r[2]:n[1]-r[1]:n[0]-r[0]});let e=[`paddingLeft`,`paddingRight`,`fontSize`,`fontFamily`,`fontWeight`,`fontStyle`,`color`,`letterSpacing`],t={...s},r=new Set;for(let i of v){if(i.property===`content`){let e=i.value.trim().toLowerCase();(e===`none`||e===`""`||e===`''`||e===`normal`)&&(L=e===`none`||e===`""`||e===`''`);continue}let a=e.map(e=>t[e]);C(t,i.property,i.value,w,n,E),e.forEach((e,n)=>{t[e]!==a[n]&&r.add(e)})}if(r.size>0){I={};for(let e of r)I[e]=t[e]}}let R=[];for(let t of e.childNodes){let e=p(t,s,a);e&&R.push(e)}return{element:e,tagName:i,style:s,children:R,textContent:null,listMarker:F,markerStyle:I,markerHidden:L||void 0}}function p(e,t,n){if(e.nodeType===c){let n=e.textContent;if(!n)return null;if(n.trim()===``&&!n.includes(`\xA0`)){let r=t.whiteSpace,i=e.previousSibling,a=e.nextSibling,o=e=>{if(!e||e.nodeType!==s)return e?.nodeType===c;let t=g[e.tagName.toLowerCase()]?.display||`block`;return t===`inline`||t===`inline-block`};if(i&&a&&!o(i)&&!o(a)&&!(r===`pre`||r===`pre-wrap`||r===`pre-line`)||r!==`pre`&&r!==`pre-wrap`&&r!==`pre-line`&&n.includes(`
|
|
2
|
+
`,e.remove();t.body.normalize();let i=t.createDocumentFragment();for(;t.body.firstChild;)i.appendChild(t.body.firstChild);return{fragment:i,css:r}}var s=1,c=3;function l(e){let t=[],n=[];e=e.replace(/\/\*[\s\S]*?\*\//g,``);let r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length)break;if(e[r]===`@`){let t=r,i=0;for(;r<e.length;){if(e[r]===`{`&&i++,e[r]===`}`&&(i--,i<=0)){r++;break}r++}let a=e.slice(t,r);a.startsWith(`@font-face`)&&n.push(a);continue}let i=r;for(;r<e.length&&e[r]!==`{`;)r++;if(r>=e.length)break;let a=e.slice(i,r).trim();r++;let o=r;for(;r<e.length&&e[r]!==`}`;)r++;let s=e.slice(o,r).trim();if(r++,!a)continue;let c=a.split(`,`).map(e=>e.trim()).filter(Boolean),l=[];for(let e of s.split(`;`)){let t=e.indexOf(`:`);if(t===-1)continue;let n=e.slice(0,t).trim().toLowerCase(),r=e.slice(t+1).trim();n&&r&&l.push({property:n,value:r})}c.length>0&&l.length>0&&t.push({selectors:c,declarations:l})}return{rules:t,fontFaceRules:n}}function u(e){let t=e.replace(/::[\w-]+/g,``).split(/\s*>\s*|\s+/),n=0,r=0,i=0;for(let e of t){let t=e.match(/#[\w-]+/g);t&&(n+=t.length);let a=e.match(/\.[\w-]+/g);a&&(r+=a.length);let o=e.replace(/[#.][\w-]+/g,``).replace(/:[\w-]+/g,``).trim();o&&o!==`*`&&i++}return[n,r,i]}function d(e){let t=e.match(/\.[\w-]+/g)||[],n=e.replace(/\.[\w-]+/g,``).replace(/:[\w-]+/g,``).trim();return{tag:n&&n!==`*`?n:``,classes:t.map(e=>e.slice(1))}}function f(e,t){if(e.tag&&e.tag!==t.tagName)return!1;for(let n of e.classes)if(!t.classes.has(n))return!1;return!0}function p(e){let t;if(e.includes(`::`)){if(e.replace(/::marker\b/g,``).includes(`::`))return null;if(/::marker\b/.test(e))t=`marker`,e=e.replace(/(^|[\s>])::marker\b/g,`$1*`),e=e.replace(/::marker\b/g,``);else return null}if(/:(?:nth-|hover|focus|active|visited|first-child|last-child)/.test(e))return null;let n=[],r=[],i=e.trim().split(/\s+/);for(let e=0;e<i.length;e++)i[e]===`>`?r.push(`>`):(n.length>r.length+1&&r.push(` `),n.push(i[e]));for(;r.length<n.length-1;)r.push(` `);if(n.length===0)return null;let a=n.map(d),o=a[a.length-1],s=o.tag;return{parts:a,combinators:r,rightmost:o,rightmostIsRoot:s===`html`||s===`body`,spec:u(e),pseudoElement:t}}function m(e,t){if(e.rightmostIsRoot){if(t.parent!==null)return!1}else if(!f(e.rightmost,t))return!1;if(e.parts.length===1)return!0;let n=t.parent;for(let t=e.parts.length-2;t>=0;t--){if(!n)return!1;let r=e.parts[t];if(e.combinators[t]===`>`)if(n.parent===null&&(r.tag===`html`||r.tag===`body`))n=n.parent;else if(f(r,n))n=n.parent;else return!1;else{let e=!1;for(;n;){if(n.parent===null&&(r.tag===`html`||r.tag===`body`)){n=n.parent,e=!0;break}if(f(r,n)){n=n.parent,e=!0;break}n=n.parent}if(!e)return!1}}return!0}function h(){return{fontFamily:`serif`,fontSize:16,fontWeight:400,fontStyle:`normal`,fontVariantCaps:`normal`,color:`rgb(0, 0, 0)`,textAlign:`start`,textAlignLast:`auto`,textIndent:0,textTransform:`none`,textDecorationLine:`none`,textDecorationStyle:`solid`,textDecorationColor:`rgb(0, 0, 0)`,textDecorations:[],textUnderlineOffset:null,textDecorationThickness:null,textShadow:`none`,webkitTextStrokeWidth:0,webkitTextStrokeColor:``,webkitTextStrokeImage:`none`,webkitTextFillColor:``,paintOrder:`normal`,strokeLinejoin:`round`,webkitBackgroundClip:``,backgroundImage:`none`,letterSpacing:0,wordSpacing:0,fontKerning:`auto`,lineHeight:0,verticalAlign:`baseline`,whiteSpace:`normal`,wordBreak:`normal`,overflowWrap:`normal`,unicodeBidi:`normal`,direction:`ltr`,display:`block`,width:0,minHeight:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,backgroundColor:`rgba(0, 0, 0, 0)`,borderTopWidth:0,borderTopColor:`rgb(0, 0, 0)`,borderTopStyle:`none`,borderRightWidth:0,borderRightColor:`rgb(0, 0, 0)`,borderRightStyle:`none`,borderBottomWidth:0,borderBottomColor:`rgb(0, 0, 0)`,borderBottomStyle:`none`,borderLeftWidth:0,borderLeftColor:`rgb(0, 0, 0)`,borderLeftStyle:`none`,flexDirection:`row`,gap:0,flexGrow:0,listStyleType:`disc`,lineClamp:0}}var g={span:{display:`inline`},a:{display:`inline`},strong:{display:`inline`,fontWeight:700},b:{display:`inline`,fontWeight:700},em:{display:`inline`,fontStyle:`italic`},i:{display:`inline`,fontStyle:`italic`},u:{display:`inline`,textDecorationLine:`underline`},s:{display:`inline`,textDecorationLine:`line-through`},strike:{display:`inline`,textDecorationLine:`line-through`},del:{display:`inline`,textDecorationLine:`line-through`},sub:{display:`inline`,verticalAlign:`sub`,fontSize:.83},sup:{display:`inline`,verticalAlign:`super`,fontSize:.83},code:{display:`inline`,fontFamily:`monospace`},cite:{display:`inline`,fontStyle:`italic`},bdo:{display:`inline`,unicodeBidi:`bidi-override`},bdi:{display:`inline`,unicodeBidi:`isolate`},p:{display:`block`,marginTop:-1,marginBottom:-1},div:{display:`block`},h1:{display:`block`,fontSize:2,fontWeight:700,marginTop:-.67,marginBottom:-.67},h2:{display:`block`,fontSize:1.5,fontWeight:700,marginTop:-.83,marginBottom:-.83},h3:{display:`block`,fontSize:1.17,fontWeight:700,marginTop:-1,marginBottom:-1},h4:{display:`block`,fontSize:1,fontWeight:700,marginTop:-1.33,marginBottom:-1.33},h5:{display:`block`,fontSize:.83,fontWeight:700,marginTop:-1.67,marginBottom:-1.67},h6:{display:`block`,fontSize:.67,fontWeight:700,marginTop:-2.33,marginBottom:-2.33},ul:{display:`block`,listStyleType:`disc`,marginTop:-1,marginBottom:-1},ol:{display:`block`,listStyleType:`decimal`,marginTop:-1,marginBottom:-1},li:{display:`list-item`},blockquote:{display:`block`,marginTop:-1,marginBottom:-1,marginLeft:40,marginRight:40},pre:{display:`block`,whiteSpace:`pre`,fontFamily:`monospace`,marginTop:-1,marginBottom:-1},table:{display:`table`},tr:{display:`table-row`},td:{display:`table-cell`},th:{display:`table-cell`,fontWeight:700},br:{display:`inline`},hr:{display:`block`,borderTopWidth:1,borderTopStyle:`solid`,borderTopColor:`gray`,marginTop:-.5,marginBottom:-.5}};function _(e,t,n){if(!e||e===`normal`||e===`auto`||e===`none`)return 0;let r=e.trim();if(r.endsWith(`em`)){let e=parseFloat(r);return isNaN(e)?0:e*t}if(r.endsWith(`%`)){let e=parseFloat(r);return isNaN(e)?0:e/100*n}if(r.endsWith(`px`)){let e=parseFloat(r);return isNaN(e)?0:e}let i=parseFloat(r);return isNaN(i)?0:i}function v(e){if(e===`bold`)return 700;if(e===`normal`)return 400;let t=parseInt(e,10);return isNaN(t)?400:t}function y(e){let t=e.trim().toLowerCase();if(!t||t===`normal`)return!1;let n=t.split(/\s+/).filter(e=>e===`fill`||e===`stroke`),r=n.indexOf(`stroke`),i=n.indexOf(`fill`);return r===-1?!1:i===-1?!0:r<i}function b(e){let t=[],n=0,r=``;for(let i=0;i<e.length;i++){let a=e[i];a===`(`?(n++,r+=a):a===`)`?(n=Math.max(0,n-1),r+=a):n===0&&/\s/.test(a)?r&&=(t.push(r),``):r+=a}return r&&t.push(r),t}function x(e,t){if(e===`margin`||e===`padding`){let n=t.trim().split(/\s+/),r,i,a,o;return n.length===1?r=i=a=o=n[0]:n.length===2?(r=a=n[0],i=o=n[1]):n.length===3?(r=n[0],i=o=n[1],a=n[2]):(r=n[0],i=n[1],a=n[2],o=n[3]),[{property:`${e}-top`,value:r},{property:`${e}-right`,value:i},{property:`${e}-bottom`,value:a},{property:`${e}-left`,value:o}]}if(e===`border`||e===`border-top`||e===`border-right`||e===`border-bottom`||e===`border-left`){let n=t.trim().split(/\s+/),r=[`solid`,`dashed`,`dotted`,`double`,`none`,`hidden`],i=n.find(e=>e.endsWith(`px`)||/^\d/.test(e))||`0`,a=n.find(e=>r.includes(e))||`none`,o=n.find(e=>!e.endsWith(`px`)&&!/^\d/.test(e)&&!r.includes(e))||`currentColor`,s=[],c=e===`border`?[`top`,`right`,`bottom`,`left`]:[e.replace(`border-`,``)];for(let e of c)s.push({property:`border-${e}-width`,value:i}),s.push({property:`border-${e}-style`,value:a}),s.push({property:`border-${e}-color`,value:o});return s}if(e===`list-style`)return t===`none`?[{property:`list-style-type`,value:`none`}]:[{property:`list-style-type`,value:t}];if(e===`text-decoration`){let e=t.trim();if(e===`inherit`||e===`none`)return[{property:`text-decoration-line`,value:`none`},{property:`text-decoration-thickness`,value:`auto`}];let n=``,r=e.replace(/\b(rgba?\([^)]*\)|hsla?\([^)]*\))/i,e=>(n=e,``)).split(/\s+/).filter(Boolean),i=[`underline`,`overline`,`line-through`],a=[`solid`,`double`,`dotted`,`dashed`,`wavy`],o=[{property:`text-decoration-thickness`,value:`auto`}],s=[];for(let e of r)i.includes(e)?s.push(e):a.includes(e)?o.push({property:`text-decoration-style`,value:e}):/^[\d.+-]/.test(e)||e===`auto`||e===`from-font`?o.push({property:`text-decoration-thickness`,value:e}):o.push({property:`text-decoration-color`,value:e});return n&&o.push({property:`text-decoration-color`,value:n}),s.length>0&&o.unshift({property:`text-decoration-line`,value:s.join(` `)}),o}if(e===`-webkit-text-stroke`){let e=b(t.trim()),n=e.find(e=>e.endsWith(`px`)||/^\d/.test(e))||`0`,r=e.find(e=>!e.endsWith(`px`)&&!/^\d/.test(e))||`currentColor`;return[{property:`-webkit-text-stroke-width`,value:n},{property:`-webkit-text-stroke-color`,value:r}]}if(e===`flex`){let e=t.trim().split(/\s+/),n=parseFloat(e[0]);return isNaN(n)?[]:[{property:`flex-grow`,value:String(n)}]}return e===`border-collapse`||e===`border-spacing`?[]:[{property:e,value:t}]}function S(e){let t=e.trim();return t.toLowerCase()===`currentcolor`?``:t}function C(e,t,n,r,i,a){let o=e.fontSize||r;switch(t){case`font-family`:e.fontFamily=n.trim();break;case`font-size`:{let t=n.trim();t.endsWith(`em`)?e.fontSize=parseFloat(t)*r:t.endsWith(`%`)?e.fontSize=parseFloat(t)/100*r:e.fontSize=parseFloat(t)||r;break}case`font-weight`:e.fontWeight=v(n);break;case`font-style`:e.fontStyle=n.trim();break;case`font-variant`:case`font-variant-caps`:e.fontVariantCaps=/\bsmall-caps\b/.test(n)?`small-caps`:`normal`;break;case`color`:e.color=n.trim();break;case`text-align`:e.textAlign=n.trim();break;case`text-align-last`:e.textAlignLast=n.trim();break;case`text-indent`:e.textIndent=_(n,o,i);break;case`text-transform`:e.textTransform=n.trim();break;case`text-decoration-line`:e.textDecorationLine=n.trim();break;case`text-decoration`:break;case`text-decoration-style`:e.textDecorationStyle=n.trim();break;case`text-decoration-color`:e.textDecorationColor=n.trim();break;case`text-underline-offset`:{let t=n.trim();if(t===`auto`)e._underlineOffsetPct=void 0,e.textUnderlineOffset=null;else if(!isNaN(parseFloat(t)))if(t.endsWith(`%`)){let n=parseFloat(t);e.textUnderlineOffset=n/100*o,e._underlineOffsetPct=n}else e._underlineOffsetPct=void 0,e.textUnderlineOffset=_(t,o,i);break}case`text-decoration-thickness`:{let t=n.trim();t===`auto`||t===`from-font`?e.textDecorationThickness=null:isNaN(parseFloat(t))||(t.endsWith(`%`)?e.textDecorationThickness=parseFloat(t)/100*o:e.textDecorationThickness=_(t,o,i));break}case`text-shadow`:e.textShadow=n.trim();break;case`-webkit-text-stroke-width`:e.webkitTextStrokeWidth=_(n,o,i);break;case`-webkit-text-stroke-color`:e.webkitTextStrokeColor=S(n);break;case`--rt-text-stroke-image`:e.webkitTextStrokeImage=n.trim();break;case`-webkit-text-fill-color`:e.webkitTextFillColor=S(n);break;case`paint-order`:e.paintOrder=n.trim();break;case`stroke-linejoin`:e.strokeLinejoin=n.trim();break;case`-webkit-background-clip`:case`background-clip`:e.webkitBackgroundClip=n.trim();break;case`background-image`:e.backgroundImage=n.trim();break;case`letter-spacing`:e.letterSpacing=n.trim()===`normal`?0:_(n,o,i);break;case`word-spacing`:e.wordSpacing=n.trim()===`normal`?0:_(n,o,i);break;case`font-kerning`:e.fontKerning=n.trim();break;case`line-height`:{let t=n.trim();if(t===`normal`)e.lineHeight=0;else if(t.endsWith(`px`))e.lineHeight=parseFloat(t)||0;else if(t.endsWith(`em`))e.lineHeight=parseFloat(t)*o;else if(t.endsWith(`%`)){let n=parseFloat(t);isNaN(n)||(e.lineHeight=n/100*o)}else{let n=parseFloat(t);isNaN(n)||(e.lineHeight=n*o,e._lineHeightMultiplier=n)}break}case`-webkit-line-clamp`:case`line-clamp`:{let t=n.trim().toLowerCase();if(t===`none`||t===`auto`)e.lineClamp=0;else{let n=parseInt(t,10);e.lineClamp=Number.isFinite(n)&&n>0?n:0}break}case`vertical-align`:e.verticalAlign=n.trim();break;case`white-space`:e.whiteSpace=n.trim();break;case`word-break`:e.wordBreak=n.trim();break;case`overflow-wrap`:case`word-wrap`:e.overflowWrap=n.trim();break;case`direction`:e.direction=n.trim();break;case`unicode-bidi`:e.unicodeBidi=n.trim();break;case`display`:e.display=n.trim();break;case`width`:{let t=n.trim();t===`100%`?e.width=i:t!==`auto`&&(e.width=_(t,o,i));break}case`min-height`:e.minHeight=_(n,o,i);break;case`padding-top`:e.paddingTop=_(n,o,i);break;case`padding-right`:e.paddingRight=_(n,o,i);break;case`padding-bottom`:e.paddingBottom=_(n,o,i);break;case`padding-left`:e.paddingLeft=_(n,o,i);break;case`margin-top`:e.marginTop=_(n,o,i);break;case`margin-right`:e.marginRight=_(n,o,i);break;case`margin-bottom`:e.marginBottom=_(n,o,i);break;case`margin-left`:e.marginLeft=_(n,o,i);break;case`background-color`:e.backgroundColor=n.trim();break;case`background`:{let t=n.trim();t.includes(`gradient(`)?e.backgroundImage=t:(t.startsWith(`#`)||t.startsWith(`rgb`)||t.startsWith(`hsl`)||[`transparent`,`none`,`inherit`].includes(t)||/^[a-z]+$/.test(t))&&(e.backgroundColor=t);break}case`padding-inline-start`:a===`rtl`?e.paddingRight=_(n,o,i):e.paddingLeft=_(n,o,i);break;case`padding-inline-end`:a===`rtl`?e.paddingLeft=_(n,o,i):e.paddingRight=_(n,o,i);break;case`margin-inline-start`:a===`rtl`?e.marginRight=_(n,o,i):e.marginLeft=_(n,o,i);break;case`margin-inline-end`:a===`rtl`?e.marginLeft=_(n,o,i):e.marginRight=_(n,o,i);break;case`border-top-width`:e.borderTopWidth=_(n,o,i);break;case`border-top-color`:e.borderTopColor=n.trim();break;case`border-top-style`:e.borderTopStyle=n.trim();break;case`border-right-width`:e.borderRightWidth=_(n,o,i);break;case`border-right-color`:e.borderRightColor=n.trim();break;case`border-right-style`:e.borderRightStyle=n.trim();break;case`border-bottom-width`:e.borderBottomWidth=_(n,o,i);break;case`border-bottom-color`:e.borderBottomColor=n.trim();break;case`border-bottom-style`:e.borderBottomStyle=n.trim();break;case`border-left-width`:e.borderLeftWidth=_(n,o,i);break;case`border-left-color`:e.borderLeftColor=n.trim();break;case`border-left-style`:e.borderLeftStyle=n.trim();break;case`flex-direction`:e.flexDirection=n.trim();break;case`gap`:e.gap=_(n,o,i);break;case`flex-grow`:e.flexGrow=parseFloat(n)||0;break;case`list-style-type`:e.listStyleType=n.trim();break;case`position`:case`top`:case`left`:case`right`:case`bottom`:case`inset-inline-start`:case`inset-inline-end`:case`content`:case`counter-reset`:case`counter-increment`:case`border-radius`:case`border-top-left-radius`:case`border-top-right-radius`:case`border-bottom-left-radius`:case`border-bottom-right-radius`:case`cursor`:case`opacity`:case`overflow`:case`box-sizing`:case`outline`:case`transition`:case`transform`:case`font-stretch`:case`font-display`:case`src`:case`unicode-range`:break}}var w=[[`font-family`,`fontFamily`],[`font-size`,`fontSize`],[`font-weight`,`fontWeight`],[`font-style`,`fontStyle`],[`color`,`color`],[`text-align`,`textAlign`],[`text-align-last`,`textAlignLast`],[`text-indent`,`textIndent`],[`text-transform`,`textTransform`],[`white-space`,`whiteSpace`],[`word-break`,`wordBreak`],[`overflow-wrap`,`overflowWrap`],[`direction`,`direction`],[`letter-spacing`,`letterSpacing`],[`word-spacing`,`wordSpacing`],[`line-height`,`lineHeight`],[`text-shadow`,`textShadow`],[`font-kerning`,`fontKerning`],[`list-style-type`,`listStyleType`],[`vertical-align`,`verticalAlign`],[`text-underline-offset`,`textUnderlineOffset`],[`paint-order`,`paintOrder`],[`stroke-linejoin`,`strokeLinejoin`],[`-webkit-text-stroke-width`,`webkitTextStrokeWidth`],[`-webkit-text-stroke-color`,`webkitTextStrokeColor`],[`-webkit-text-fill-color`,`webkitTextFillColor`]];function T(e,t,n){for(let[r,i]of w)if(!n.has(r))if(i===`lineHeight`){let n=t._lineHeightMultiplier;n===void 0?e.lineHeight=t.lineHeight:(e.lineHeight=n*e.fontSize,e._lineHeightMultiplier=n)}else if(i===`textUnderlineOffset`){let n=t._underlineOffsetPct;n===void 0?e.textUnderlineOffset=t.textUnderlineOffset:(e.textUnderlineOffset=n/100*e.fontSize,e._underlineOffsetPct=n)}else e[i]=t[i]}function E(e){let t=new Map,n=new Map,r=[],i=0;for(let a of e){let e=[];for(let t of a.declarations){let n=t.value.includes(`!important`),r=n?t.value.replace(/\s*!important\s*/g,``).trim():t.value,i=x(t.property,r);for(let t of i)e.push({property:t.property,value:t.value,important:n})}for(let o of a.selectors){let a=p(o);if(!a)continue;let s={selector:a,declarations:e,orderBase:i++},c=a.rightmost;if(c.tag&&!a.rightmostIsRoot){let e=t.get(c.tag);e?e.push(s):t.set(c.tag,[s])}if(c.classes.length>0){let e=c.classes[0],t=n.get(e);t?t.push(s):n.set(e,[s])}!c.tag&&c.classes.length===0&&r.push(s),a.rightmostIsRoot&&r.push(s)}}return{byTag:t,byClass:n,universal:r}}function D(e,t){switch(t){case`disc`:return`•`;case`circle`:return`○`;case`square`:return`■`;case`none`:return``;case`decimal-leading-zero`:return`${e<10&&e>=0?`0`+e:e}.`;case`lower-roman`:return`${O(e).toLowerCase()}.`;case`upper-roman`:return`${O(e)}.`;case`lower-alpha`:case`lower-latin`:return`${k(e).toLowerCase()}.`;case`upper-alpha`:case`upper-latin`:return`${k(e)}.`;default:return`${e}.`}}function O(e){if(e<1||e>3999)return`${e}`;let t=[[1e3,`M`],[900,`CM`],[500,`D`],[400,`CD`],[100,`C`],[90,`XC`],[50,`L`],[40,`XL`],[10,`X`],[9,`IX`],[5,`V`],[4,`IV`],[1,`I`]],n=``;for(let[r,i]of t)for(;e>=r;)n+=i,e-=r;return n}function k(e){if(e<1)return`${e}`;let t=``;for(;e>0;){let n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-1)/26)}return t}function A(e,t){if(e.tagName.toLowerCase()!==`li`)return;if(t===`none`)return``;let n=e.parentElement,r=n?.tagName.toLowerCase();if(t===`disc`||t===`circle`||t===`square`)return D(0,t);if(r===`ol`||r===`ul`||!n){let r=n?Array.from(n.children).filter(e=>e.tagName.toLowerCase()===`li`):[e],i=n?.getAttribute(`start`),a=n?.hasAttribute(`reversed`)??!1,o=i?parseInt(i,10):a?r.length:1,s=a?-1:1,c=o;for(let n of r){let r=n.getAttribute(`value`);if(r){let e=parseInt(r,10);Number.isNaN(e)||(c=e)}if(n===e)return D(c,t||`decimal`);c+=s}return D(c,t||`decimal`)}}function j(e){let t=e.style;return t&&typeof t.cssText==`string`?t:null}function M(e){let t=[];for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e===-1)continue;let r=n.slice(0,e).trim().toLowerCase(),i=n.slice(e+1).trim();r&&i&&t.push({property:r,value:i})}return t}function N(e,t,n){let{rules:r,fontFaceRules:i}=l(t),a=null;i.length>0&&typeof document<`u`&&document.head&&(a=document.createElement(`style`),a.textContent=i.join(`
|
|
3
|
+
`),document.head.appendChild(a));let o=E(r),u=e.ownerDocument.createElement(`div`);u.appendChild(e);function d(e,t){let n=new Set,r=e.getAttribute(`class`);if(r)for(let e of r.split(/\s+/))e&&n.add(e);return{tagName:e.tagName.toLowerCase(),classes:n,parent:t,el:e}}function f(e,t,r){let i=e.tagName.toLowerCase(),a=d(e,r),s=h(),c=new Set,l=[],u=new Set,f=o.byTag.get(i);if(f)for(let e of f)u.add(e),l.push(e);for(let e of a.classes){let t=o.byClass.get(e);if(t)for(let e of t)u.has(e)||(u.add(e),l.push(e))}for(let e of o.universal)u.has(e)||(u.add(e),l.push(e));let _=[],v=[];for(let e of l)if(m(e.selector,a)){let t=e.selector.pseudoElement===`marker`?v:_;for(let n of e.declarations)t.push({property:n.property,value:n.value,specificity:e.selector.spec,order:e.orderBase,important:n.important})}let y=g[i],b=!1;if(y?.fontSize!==void 0){let e=y.fontSize;e<10?s.fontSize=e*t.fontSize:s.fontSize=e,b=!0,c.add(`font-size`)}_.length>1&&_.sort((e,t)=>{if(e.important!==t.important)return e.important?1:-1;let n=e.specificity,r=t.specificity;return n[0]===r[0]?n[1]===r[1]?n[2]===r[2]?e.order-t.order:n[2]-r[2]:n[1]-r[1]:n[0]-r[0]});for(let e of _)e.property===`font-size`&&(C(s,e.property,e.value,t.fontSize,n,t.direction),b=!0);let S=j(e);if(S&&S.cssText){let e=M(S.cssText);for(let r of e)r.property===`font-size`&&(C(s,r.property,r.value,t.fontSize,n,t.direction),b=!0)}b||(s.fontSize=t.fontSize);let w=s.fontSize;if(y){for(let[e,t]of Object.entries(y)){if(e===`fontSize`)continue;s[e]=t;let n=e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase());c.add(n)}s.marginTop<0&&(s.marginTop=Math.abs(s.marginTop)*w),s.marginBottom<0&&(s.marginBottom=Math.abs(s.marginBottom)*w),(i===`ul`||i===`ol`)&&(t.direction===`rtl`?(s.paddingRight=40,c.add(`padding-right`)):(s.paddingLeft=40,c.add(`padding-left`)))}let E=t.direction,D={"word-wrap":`overflow-wrap`};for(let e of _)e.property!==`font-size`&&(C(s,e.property,e.value,w,n,E),c.add(D[e.property]||e.property));let O=!!S?.width;if(S&&S.cssText){let e=M(S.cssText);for(let t of e){if(t.property===`font-size`){c.add(`font-size`);continue}let e=x(t.property,t.value);for(let t of e)C(s,t.property,t.value,w,n,E),c.add(D[t.property]||t.property)}}O||(s.width=0);let k=e.getAttribute(`dir`);k&&(s.direction=k,c.add(`direction`)),c.add(`font-size`),T(s,t,c),c.has(`text-decoration-color`)?s.textDecorationColor===`currentColor`&&(s.textDecorationColor=s.color):s.textDecorationColor=s.webkitTextFillColor||s.color;for(let e of[`Top`,`Right`,`Bottom`,`Left`]){let t=`border${e}Color`,n=`border-${e.toLowerCase()}-color`;c.has(n)?s[t]===`currentColor`&&(s[t]=s.color):s[t]=s.color}let N=[];if(s.textDecorationLine&&s.textDecorationLine!==`none`)for(let e of s.textDecorationLine.split(/\s+/))e&&e!==`none`&&N.push({line:e,color:s.textDecorationColor,style:s.textDecorationStyle,declarer:s});s.textDecorations=t.textDecorations.length?[...t.textDecorations,...N]:N;let P=new Set(s.textDecorationLine.split(/\s+/).filter(e=>e&&e!==`none`));if(t.textDecorationLine&&t.textDecorationLine!==`none`)for(let e of t.textDecorationLine.split(/\s+/))e&&e!==`none`&&P.add(e);P.size>0&&(s.textDecorationLine=[...P].join(` `));let F=A(e,s.listStyleType),I,L=!1;if(i===`li`&&v.length>0){v.length>1&&v.sort((e,t)=>{if(e.important!==t.important)return e.important?1:-1;let n=e.specificity,r=t.specificity;return n[0]===r[0]?n[1]===r[1]?n[2]===r[2]?e.order-t.order:n[2]-r[2]:n[1]-r[1]:n[0]-r[0]});let e=[`paddingLeft`,`paddingRight`,`fontSize`,`fontFamily`,`fontWeight`,`fontStyle`,`color`,`letterSpacing`],t={...s},r=new Set;for(let i of v){if(i.property===`content`){let e=i.value.trim().toLowerCase();(e===`none`||e===`""`||e===`''`||e===`normal`)&&(L=e===`none`||e===`""`||e===`''`);continue}let a=e.map(e=>t[e]);C(t,i.property,i.value,w,n,E),e.forEach((e,n)=>{t[e]!==a[n]&&r.add(e)})}if(r.size>0){I={};for(let e of r)I[e]=t[e]}}let R=[];for(let t of e.childNodes){let e=p(t,s,a);e&&R.push(e)}return{element:e,tagName:i,style:s,children:R,textContent:null,listMarker:F,markerStyle:I,markerHidden:L||void 0}}function p(e,t,n){if(e.nodeType===c){let n=e.textContent;if(!n)return null;if(n.trim()===``&&!n.includes(`\xA0`)){let r=t.whiteSpace,i=e.previousSibling,a=e.nextSibling,o=e=>{if(!e||e.nodeType!==s)return e?.nodeType===c;let t=g[e.tagName.toLowerCase()]?.display||`block`;return t===`inline`||t===`inline-block`};if(i&&a&&!o(i)&&!o(a)&&!(r===`pre`||r===`pre-wrap`||r===`pre-line`)||r!==`pre`&&r!==`pre-wrap`&&r!==`pre-line`&&n.includes(`
|
|
4
4
|
`))return null}let r={...t},i=t.whiteSpace,a=n;return i!==`pre`&&i!==`pre-wrap`&&i!==`pre-line`&&i!==`break-spaces`&&(a=n.replace(/[\n\r]/g,` `)),{element:null,tagName:`#text`,style:r,children:[],textContent:a}}if(e.nodeType!==s)return null;let r=e,i=r.tagName.toLowerCase();return i===`style`||i===`script`?null:i===`br`?{element:null,tagName:`#text`,style:{...t},children:[],textContent:`
|
|
5
|
-
`}:f(r,t,n)}return{tree:f(u,h(),null),cleanup:()=>{a&&a.remove()}}}var P=!0,F,I=[],L=new Map;function R(e,t){let n=e.font+`\0`+(e.letterSpacing||``)+`\0`+t,r=L.get(n);if(r!==void 0)return r;let i=e.measureText(t).width;return L.set(n,i),i}function ee(e){let t=``;for(let n of e){if(!n.text||n.isSpace)continue;let e=V(n.style);if(t&&e!==t)return!0;t=e}return!1}function z(e,t){e.font=V(t),e.fontKerning=t.fontKerning===`none`?`none`:`normal`}function B(e){return Number.isFinite(e)&&e!==0?`${e}px`:`0px`}var te=new Map;function V(e){let t=`${e.fontStyle}|${e.fontVariantCaps}|${e.fontWeight}|${e.fontSize}|${e.fontFamily}`,n=te.get(t);if(n)return n;let r=[];e.fontStyle!==`normal`&&r.push(e.fontStyle),e.fontVariantCaps===`small-caps`&&r.push(`small-caps`),e.fontWeight!==400&&r.push(String(e.fontWeight)),r.push(`${e.fontSize}px`),r.push(e.fontFamily);let i=r.join(` `);return te.set(t,i),i}var ne=new Map,H=null,U=null,W=null,re=new Set([`disc`,`circle`,`square`]);function ie(e,t,n=!1){let r=`${e}|${t}|${n?`ul-li`:`block`}`,i=ne.get(r);if(i!==void 0)return i;if(typeof document>`u`||!document.body)throw Error(`render-tag: accuracy 'balanced' requires a browser DOM for line-height probes; use the default 'performance' mode in non-browser environments.`);let a;n?(U||(U=document.createElement(`ul`),U.style.cssText=`position:absolute;top:-9999px;left:-9999px;visibility:hidden;padding:0;margin:0;border:0;list-style:disc;`,W=document.createElement(`li`),W.style.cssText=`white-space:nowrap;padding:0;margin:0;border:0;`,W.textContent=`Mg`,U.appendChild(W),document.body.appendChild(U)),a=W):(H||(H=document.createElement(`div`),H.style.cssText=`position:absolute;top:-9999px;left:-9999px;visibility:hidden;white-space:nowrap;padding:0;margin:0;border:0;`,H.textContent=`Mg`,document.body.appendChild(H)),a=H),a.style.font=e,a.style.lineHeight=t;let o=a.getBoundingClientRect().height;return ne.set(r,o),o}function G(e,t,n=!1){if(t.lineHeight>0)return P?ie(V(t),`${t.lineHeight}px`,n):t.lineHeight;if(P)return ie(V(t),`normal`,n);let{ascent:r,descent:i}=Y(e,t);return r+i}function ae(e,t,n){let{ascent:r,descent:i}=Y(e,t);return(r-i)/2+n/2}function oe(e,t){switch(t){case`uppercase`:return e.toUpperCase();case`lowercase`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|[\s\p{P}])(\p{L})/gu,(e,t,n)=>t===`'`||t===`’`?e:t+n.toUpperCase());default:return e}}function K(e){if(e.tagName===`#text`)return!0;let t=e.style.display;return t===`inline`||t===`inline-block`}function se(e){return e.children.length>0&&e.children.every(K)}function q(e){return!e||e===`transparent`||e===`rgba(0, 0, 0, 0)`}var J=new Map;function Y(e,t){let n=V(t),r=J.get(n);if(r)return r;e.font=n;let i=e.measureText(`M`),a={ascent:i.fontBoundingBoxAscent??i.actualBoundingBoxAscent,descent:i.fontBoundingBoxDescent??i.actualBoundingBoxDescent};return J.set(n,a),a}function ce(e,t,n,r,i,a,o){switch(e){case`super`:return-r*.4;case`sub`:return r*.26;case`text-top`:return-(i-t);case`text-bottom`:return a-n;case`middle`:return-(r*.25)-(n-t)/2;default:{let t=parseFloat(e);return Number.isFinite(t)?e.endsWith(`%`)?-(t/100)*o:-t:0}}}function X(e){return e!==`baseline`&&e!==`top`&&e!==`bottom`&&e!==``}function le(e,t){let n=e.textDecorations,r=t.textDecorations;if(n===r)return!0;if(!n||!r||n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(n[e].line!==r[e].line||n[e].color!==r[e].color||n[e].style!==r[e].style)return!1;return!0}function
|
|
6
|
-
`)return;let r=n[e-1];if(!r||r.isSpace||!r.text.trim()||r.boxOpen||r.boxClose)return;let i=
|
|
5
|
+
`}:f(r,t,n)}return{tree:f(u,h(),null),cleanup:()=>{a&&a.remove()}}}var P=!0,F,I=[],L=new Map;function R(e,t){let n=e.font+`\0`+(e.letterSpacing||``)+`\0`+t,r=L.get(n);if(r!==void 0)return r;let i=e.measureText(t).width;return L.set(n,i),i}function ee(e){let t=``;for(let n of e){if(!n.text||n.isSpace)continue;let e=V(n.style);if(t&&e!==t)return!0;t=e}return!1}function z(e,t){e.font=V(t),e.fontKerning=t.fontKerning===`none`?`none`:`normal`}function B(e){return Number.isFinite(e)&&e!==0?`${e}px`:`0px`}var te=new Map;function V(e){let t=`${e.fontStyle}|${e.fontVariantCaps}|${e.fontWeight}|${e.fontSize}|${e.fontFamily}`,n=te.get(t);if(n)return n;let r=[];e.fontStyle!==`normal`&&r.push(e.fontStyle),e.fontVariantCaps===`small-caps`&&r.push(`small-caps`),e.fontWeight!==400&&r.push(String(e.fontWeight)),r.push(`${e.fontSize}px`),r.push(e.fontFamily);let i=r.join(` `);return te.set(t,i),i}var ne=new Map,H=null,U=null,W=null,re=new Set([`disc`,`circle`,`square`]);function ie(e,t,n=!1){let r=`${e}|${t}|${n?`ul-li`:`block`}`,i=ne.get(r);if(i!==void 0)return i;if(typeof document>`u`||!document.body)throw Error(`render-tag: accuracy 'balanced' requires a browser DOM for line-height probes; use the default 'performance' mode in non-browser environments.`);let a;n?(U||(U=document.createElement(`ul`),U.style.cssText=`position:absolute;top:-9999px;left:-9999px;visibility:hidden;padding:0;margin:0;border:0;list-style:disc;`,W=document.createElement(`li`),W.style.cssText=`white-space:nowrap;padding:0;margin:0;border:0;`,W.textContent=`Mg`,U.appendChild(W),document.body.appendChild(U)),a=W):(H||(H=document.createElement(`div`),H.style.cssText=`position:absolute;top:-9999px;left:-9999px;visibility:hidden;white-space:nowrap;padding:0;margin:0;border:0;`,H.textContent=`Mg`,document.body.appendChild(H)),a=H),a.style.font=e,a.style.lineHeight=t;let o=a.getBoundingClientRect().height;return ne.set(r,o),o}function G(e,t,n=!1){if(t.lineHeight>0)return P?ie(V(t),`${t.lineHeight}px`,n):t.lineHeight;if(P)return ie(V(t),`normal`,n);let{ascent:r,descent:i}=Y(e,t);return r+i}function ae(e,t,n){let{ascent:r,descent:i}=Y(e,t);return(r-i)/2+n/2}function oe(e,t){switch(t){case`uppercase`:return e.toUpperCase();case`lowercase`:return e.toLowerCase();case`capitalize`:return e.replace(/(^|[\s\p{P}])(\p{L})/gu,(e,t,n)=>t===`'`||t===`’`?e:t+n.toUpperCase());default:return e}}function K(e){if(e.tagName===`#text`)return!0;let t=e.style.display;return t===`inline`||t===`inline-block`}function se(e){return e.children.length>0&&e.children.every(K)}function q(e){return!e||e===`transparent`||e===`rgba(0, 0, 0, 0)`}var J=new Map;function Y(e,t){let n=V(t),r=J.get(n);if(r)return r;e.font=n;let i=e.measureText(`M`),a={ascent:i.fontBoundingBoxAscent??i.actualBoundingBoxAscent,descent:i.fontBoundingBoxDescent??i.actualBoundingBoxDescent};return J.set(n,a),a}function ce(e,t,n,r,i,a,o){switch(e){case`super`:return-r*.4;case`sub`:return r*.26;case`text-top`:return-(i-t);case`text-bottom`:return a-n;case`middle`:return-(r*.25)-(n-t)/2;default:{let t=parseFloat(e);return Number.isFinite(t)?e.endsWith(`%`)?-(t/100)*o:-t:0}}}function X(e){return e!==`baseline`&&e!==`top`&&e!==`bottom`&&e!==``}function le(e,t){if(e===t)return!0;let n=e.declarer,r=t.declarer;return n.fontSize===r.fontSize&&n.fontFamily===r.fontFamily&&n.fontWeight===r.fontWeight&&n.fontStyle===r.fontStyle&&n.fontVariantCaps===r.fontVariantCaps&&n.verticalAlign===r.verticalAlign&&n.textUnderlineOffset===r.textUnderlineOffset&&n.textDecorationThickness===r.textDecorationThickness}function ue(e,t){let n=e.textDecorations,r=t.textDecorations;if(n===r)return!0;if(!n||!r||n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(n[e].line!==r[e].line||n[e].color!==r[e].color||n[e].style!==r[e].style||!le(n[e],r[e]))return!1;return!0}function de(e,t){return e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle&&e.color===t.color&&e.textDecorationLine===t.textDecorationLine&&ue(e,t)&&e.backgroundColor===t.backgroundColor}function fe(e){return!q(e.backgroundColor)||e.borderTopWidth>0&&e.borderTopStyle!==`none`||e.borderRightWidth>0&&e.borderRightStyle!==`none`||e.borderBottomWidth>0&&e.borderBottomStyle!==`none`||e.borderLeftWidth>0&&e.borderLeftStyle!==`none`}function pe(e){return e.webkitBackgroundClip===`text`&&(!!e.backgroundImage&&e.backgroundImage!==`none`||!q(e.backgroundColor))}function me(e){return!!(e.boxOpen&&e.boxClose&&e.text)}function he(e,t,n){let r=t.words.length-1;for(;r>=0&&(t.words[r].text===``||me(t.words[r]));)r--;if(r<0)return;let i=t.words[r].style,a=t.words[r].boxStyle;z(e,i),e.letterSpacing=`${i.letterSpacing||0}px`;let o=R(e,`…`),s=()=>{for(;t.words.length>0&&t.words[t.words.length-1].isSpace;){let e=t.words.pop();t.totalWidth-=e.width}};s();let c=e=>!e.isSpace&&e.text!==``&&!e.boxOpen&&!e.boxClose;for(;t.totalWidth+o>n&&t.words.length>0;){let e=t.words[t.words.length-1];if(!c(e)&&!me(e))break;t.totalWidth-=e.width,t.words.pop(),s()}let l={text:`…`,width:o,style:i,isSpace:!1,boxStyle:a};t.words.push(l),t.totalWidth+=o}function ge(e){let t=[];function n(e,r,i,a){if(e.tagName===`#text`&&e.textContent){t.push({text:e.textContent,style:e.style,boxStyle:r,clipStyle:i,strokeImageStyle:a});return}let o=e.style.display===`inline-block`,s=o||K(e)&&fe(e.style),c=s?e.style:r,l=K(e)&&pe(e.style)?e.style:i,u=K(e)&&e.style.webkitTextStrokeImage&&e.style.webkitTextStrokeImage!==`none`?e.style:a,d=s&&(e.style.paddingLeft>0||e.style.paddingRight>0||e.style.borderLeftWidth>0||e.style.borderRightWidth>0);if(o){let n=e.element?.textContent||``;t.push({text:n,style:e.style,boxStyle:c,clipStyle:l,strokeImageStyle:u,boxOpen:e.style,boxClose:e.style});return}let f=e.style.unicodeBidi,p=(f===`bidi-override`||f===`isolate-override`)&&e.style.direction===`rtl`,m=t.length;d&&t.push({text:``,style:e.style,boxStyle:c,boxOpen:e.style});for(let t of e.children)n(t,s?c:r,l,u);if(d&&t.push({text:``,style:e.style,boxStyle:c,boxClose:e.style}),p&&t.length>m){let e=t.splice(m);for(let t of e)t.text&&(t.text=[...t.text].reverse().join(``),t.style={...t.style,direction:`ltr`});e.reverse(),t.push(...e)}}for(let t of e.children)n(t);return t}function _e(e){for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(n>=3584&&n<=3711||n>=3712&&n<=3839||n>=4096&&n<=4255||n>=6016&&n<=6143)return!0;n>65535&&t++}return!1}var ve;function ye(){return ve||(typeof Intl<`u`&&Intl.Segmenter?(ve=new Intl.Segmenter(void 0,{granularity:`word`}),ve):null)}function be(e,t,n,r,i){if(t.includes(``)||t.includes(``)){let a=t.split(/(\u200B|\u00AD)/),o=i??{cumText:``,cumWidth:0},s=!1;for(let t of a){if(t===``){s=!0;continue}if(t===``||t===``){s=!1;continue}let i=r.length;be(e,t,n,r,o),s&&i>0&&(r[i-1].isSoftHyphenBreak=!0),s=!1}s&&r.length>0&&(r[r.length-1].isSoftHyphenBreak=!0);return}if(n.style.whiteSpace===`pre`||n.style.whiteSpace===`pre-wrap`||n.style.whiteSpace===`break-spaces`){let i=t.split(/( +|\t)/),a=R(e,` `)*8;for(let t of i){if(t===``)continue;if(t===` `){r.push({text:` `,width:a,style:n.style,isSpace:!0,isTab:!0,boxStyle:n.boxStyle,clipStyle:n.clipStyle,strokeImageStyle:n.strokeImageStyle});continue}let i=/^ +$/.test(t);r.push({text:t,width:R(e,t),style:n.style,isSpace:i,boxStyle:n.boxStyle,clipStyle:n.clipStyle,strokeImageStyle:n.strokeImageStyle})}}else{let a=t.split(/([ \t\n\r\f\v]+)/).flatMap(e=>/^[ \t\n\r\f\v]+$/.test(e)?[e]:e.split(/(?<=\?)(?=.)/)),o=i?.cumText??``,s=i?.cumWidth??0;for(let t of a){if(t===``)continue;if(/^[ \t\n\r\f\v]+$/.test(t)){let t=s;o+=` `,s=e.measureText(o).width;let i=s-t+(n.style.wordSpacing||0);r.push({text:` `,width:i,style:n.style,isSpace:!0,boxStyle:n.boxStyle,clipStyle:n.clipStyle,strokeImageStyle:n.strokeImageStyle});continue}if(_e(t)){let i=ye();if(i){for(let a of i.segment(t)){let t=a.segment,i=s;o+=t,s=e.measureText(o).width,r.push({text:t,width:s-i,style:n.style,isSpace:!1,boxStyle:n.boxStyle,clipStyle:n.clipStyle,strokeImageStyle:n.strokeImageStyle})}continue}}let i=s;o+=t,s=e.measureText(o).width;let a=s-i,c=R(e,t);F&&F({type:`measure-word`,message:`"${t}" delta=${a.toFixed(2)} direct=${c.toFixed(2)} diff=${(a-c).toFixed(2)} cumText="${o}"`,data:{text:t,deltaWidth:a,directWidth:c,cumWidth:s,prevCum:i,font:n.style.fontFamily,fontSize:n.style.fontSize}}),r.push({text:t,width:a,style:n.style,isSpace:!1,boxStyle:n.boxStyle,clipStyle:n.clipStyle,strokeImageStyle:n.strokeImageStyle})}i&&(i.cumText=o,i.cumWidth=s)}}function xe(e,t){let n=[];for(let r of t){if(r.text===``&&!r.boxOpen&&!r.boxClose){let e=r.style.display===`inline-block`&&(r.style.marginLeft||r.style.marginRight)||0;e>0&&n.push({text:``,width:e,style:r.style,isSpace:!1,boxStyle:r.boxStyle});continue}if(r.boxOpen&&r.boxClose&&r.text){z(e,r.style),e.letterSpacing=B(r.style.letterSpacing);let t=oe(r.text,r.style.textTransform),i=r.style,a=R(e,t),o=i.marginLeft+i.borderLeftWidth+i.paddingLeft+a+i.paddingRight+i.borderRightWidth+i.marginRight;n.push({text:t,width:o,style:r.style,isSpace:!1,boxStyle:r.boxStyle,boxOpen:r.boxOpen,boxClose:r.boxClose,clipStyle:r.clipStyle,strokeImageStyle:r.strokeImageStyle});continue}if(r.boxOpen){let e=r.boxOpen.paddingLeft+r.boxOpen.borderLeftWidth;e>0&&n.push({text:``,width:e,style:r.style,isSpace:!1,boxStyle:r.boxStyle,boxOpen:r.boxOpen});continue}if(r.boxClose){let e=r.boxClose.paddingRight+r.boxClose.borderRightWidth;e>0&&n.push({text:``,width:e,style:r.style,isSpace:!1,boxStyle:r.boxStyle,boxClose:r.boxClose});continue}z(e,r.style),e.letterSpacing=B(r.style.letterSpacing);let t=oe(r.text,r.style.textTransform),i=e=>{let t=n[e];if(!t||t.isSpace||!t.text||t.text===`
|
|
6
|
+
`)return;let r=n[e-1];if(!r||r.isSpace||!r.text.trim()||r.boxOpen||r.boxClose)return;let i=we(t.text)[0],a=we(r.text),o=a[a.length-1];Z(i)||Z(o)||Ee(i)||Ee(o)||_e(t.text)||_e(r.text)||(t.noBreakBefore=!0)};if(t.includes(`
|
|
7
7
|
`)){let a=t.split(`
|
|
8
8
|
`);for(let t=0;t<a.length;t++)if(t>0&&n.push({text:`
|
|
9
|
-
`,width:0,style:r.style,isSpace:!1,boxStyle:r.boxStyle}),a[t]){let o=n.length;
|
|
10
|
-
`){u.words.length===0?(u.lineHeight=Math.max(u.lineHeight,p),u.endedByHardBreak=!0,c.push(u),u=l()):(u.endedByHardBreak=!0,h()),g=!0;continue}if(d){u.words.push(s),u.totalWidth+=s.width,u.lineHeight=Math.max(u.lineHeight,p);continue}if(!s.isSpace&&s.text&&!s.noBreakBefore&&!s.boxOpen&&!s.boxClose){let n=r;for(;n+1<t.length;){let e=t[n+1];if(!e.text||e.isSpace||e.boxOpen||e.boxClose||!e.noBreakBefore)break;n++}if(n>r){let a=s.style.overflowWrap===`break-word`||s.style.wordBreak===`break-all`,o=0;for(let e=r;e<=n;e++)o+=t[e].width;let c=[];for(let e=r;e<=n;e++)for(let n of[...t[e].text])c.push({ch:n,style:t[e].style,clipStyle:t[e].clipStyle,strokeImageStyle:t[e].strokeImageStyle});let l=c.map(e=>e.ch).join(``).split(/(?<=-)(?!\d)|(?<=[^\d]-)/).filter(e=>e.length),d=l.length>1;if(!(u.totalWidth+o<=f())&&(d||a&&o>f())){let t=[],o=0;for(let e of l){let n=[...e].length;t.push(c.slice(o,o+n)),o+=n}let s=(t,n)=>{let r=0;for(;r<t.length;){let a=t[r].style,o=t[r].clipStyle,s=t[r].strokeImageStyle;z(e,a),e.letterSpacing=B(a.letterSpacing);let c=G(e,a,i),l=``,d=0;for(;r<t.length&&t[r].style===a;){let i=t[r].ch,p=R(e,l+i);n&&u.totalWidth+p>f()&&(u.words.length>0||l)?(l&&(u.words.push({text:l,width:d,style:a,isSpace:!1,clipStyle:o,strokeImageStyle:s}),u.totalWidth+=d,u.lineHeight=Math.max(u.lineHeight,c)),h(!0),g=!1,l=i,d=R(e,i)):(l+=i,d=p),r++}l&&(u.words.push({text:l,width:d,style:a,isSpace:!1,clipStyle:o,strokeImageStyle:s}),u.totalWidth+=d,u.lineHeight=Math.max(u.lineHeight,c),g=!1)}},p=t=>{let n=0,r=0;for(;r<t.length;){let i=t[r].style,a=``;for(;r<t.length&&t[r].style===i;)a+=t[r].ch,r++;z(e,i),e.letterSpacing=B(i.letterSpacing),n+=R(e,a)}return n};!d&&u.words.length>0&&(h(!0),g=!1);for(let e of t){let t=p(e);u.words.length>0&&u.totalWidth+t>f()&&(h(!0),g=!1),s(e,a&&t>f())}r=n;continue}}}let _=!s.isSpace&&s.text.length>1?
|
|
11
|
-
`)break;let r=!!n.text&&De.test(n.text),i=!n.text&&!!n.boxClose,a=!!n.text&&!!n.noBreakBefore;if(r||i||a){v+=n.width;continue}break}for(let i of _){let s=i===_[_.length-1]?v:0,l=!i.isSpace&&i.text.length>0&&De.test(i.text)&&u.words.length>0&&!u.words[u.words.length-1].isSpace,d=i===_[0]&&i.noBreakBefore&&u.words.length>0&&!u.words[u.words.length-1].isSpace,y=0;if(!i.text&&i.boxOpen){let n=t[r+1];n&&!n.isSpace&&n.text&&(y=(n.text.length>1?Ee(e,n,f(),0):[n])[0].width)}let b=0;if(i.isSoftHyphenBreak&&(z(e,i.style),e.letterSpacing=B(i.style.letterSpacing),b=R(e,`-`)),!i.isSpace&&!l&&!d&&u.words.length>0&&u.totalWidth+i.width+b+s+y>f()){let t=u.totalWidth+i.width+b+s+y-f(),r=!0;if(t<1&&!ee([...u.words,i])){z(e,i.style);let t=u.words.map(e=>e.text).join(``)+i.text+(i.isSoftHyphenBreak?`-`:``),n=0;for(let e of u.words)e.text||(n+=e.width);i.text||(n+=i.width),R(e,t)+n+s+y<=f()+.02&&(r=!1)}if(r&&i.text.includes(`-`)){let t=i.text.split(/(?<=-)(?!\d)|(?<=[^\d]-)/);if(t.length>1){z(e,i.style);let n=``,r=0,a=0,o=f()-u.totalWidth;for(;a<t.length;a++){let i=n+t[a],s=R(e,i);if(s>o)break;n=i,r=s}if(a>0&&a<t.length){u.words.push({...i,text:n,width:r}),u.totalWidth+=r,u.lineHeight=Math.max(u.lineHeight,p),h(!0),g=!1;let o=t.slice(a).join(``),s=R(e,o);u.words.push({...i,text:o,width:s}),u.totalWidth+=s,u.lineHeight=Math.max(u.lineHeight,p);continue}}}if(r){if(F){let e=u.words.map(e=>e.text).join(``);F({type:`line-wrap`,message:`"${i.text}" overflow=${t.toFixed(2)} wrap=true lineWidth=${u.totalWidth.toFixed(2)} pieceWidth=${i.width.toFixed(2)} contentWidth=${n} line="${e}"`,data:{text:i.text,overflow:t,lineWidth:u.totalWidth,pieceWidth:i.width,contentWidth:n,lineText:e}})}h(!0),g=!1}}if(i.isSpace&&u.words.length===0&&(!g||!m))continue;let x=i.width;if(i.isTab){let e=o?.interval||i.width,t=o?.halfSpace??0,n=e-((c.length===0?a:0)+u.totalWidth)%e;n<t&&(n+=e),x=n,i.width=x}if(u.words.length===0&&x>f()&&!i.isSpace&&i.text.includes(`-`)){let t=i.text.split(/(?<=-)(?!\d)|(?<=[^\d]-)/);if(t.length>1){z(e,i.style);let n=t.filter(e=>e).map(t=>({...i,text:t,width:R(e,t)})),r=!0;for(let e of n)r?(r=!1,u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p)):u.totalWidth+e.width>f()?(h(!0),g=!1,u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p)):(u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p));continue}}u.words.push(i),u.totalWidth+=x,u.lineHeight=Math.max(u.lineHeight,p),i.isSpace||(g=!1)}}return h(),c}function ke(e,t,n,r,i,a=!1,o){let s=[],c=new Map,l=new Map;if(o&&(o.exhausted||o.remaining<=0))return o.exhausted=!0,{nodes:s,height:0};let u=he(t);if(u.length===0)return{nodes:s,height:0};let d=be(e,u),f=t.style.textIndent||0;z(e,t.style);let p=e.letterSpacing;e.letterSpacing=`0px`;let m=R(e,` `);e.letterSpacing=p;let h={interval:(m+(t.style.letterSpacing||0)+(t.style.wordSpacing||0))*8,halfSpace:m/2},g=G(e,t.style,a),_=Oe(e,d,i,t.style.whiteSpace,a,f,h,g),v=o?o.remaining:t.style.lineClamp;if(v>0&&_.length>v){_.length=v;let t=_[v-1];me(e,t,i-(v===1?f:0)),t.endedByHardBreak=!0,o&&(o.remaining=0,o.exhausted=!0)}else o&&(o.remaining-=_.length);let y=t.style.direction===`rtl`,b=e=>e===`start`?y?`right`:`left`:e===`end`?y?`left`:`right`:e,x=b(t.style.textAlign),S=t.style.textAlignLast||`auto`;S=S===`auto`?t.style.textAlign===`justify`?y?`right`:`left`:x:b(S);let C=Y(e,t.style),w=r;for(let t=0;t<_.length;t++){let r=_[t];if(r.words.length===0){w+=r.lineHeight;continue}let a=r.lineHeight,o=t===_.length-1,u=t===0,d=o||r.endedByHardBreak?S:x,p=u?f:0,m=i-p,h=0;if(d===`justify`&&r.totalWidth<m){let e=r.words.filter(e=>e.isSpace).length;e>0&&(h=(m-r.totalWidth)/e)}let g=r.totalWidth>m+.5,v=n+p;g?v=y?n+m-r.totalWidth:n+p:d===`center`?v=n+p+(m-r.totalWidth)/2:d===`right`?v=(y?n+m:n+p+m)-r.totalWidth:d===`justify`&&y&&(v=n+m-r.totalWidth);let b=v,T=C.ascent,E=C.descent;for(let t of r.words){if(t.text===``||X(t.style.verticalAlign))continue;let{ascent:n,descent:r}=Y(e,t.style);n>T&&(T=n),r>E&&(E=r)}if(T===0)for(let t of r.words){if(t.text===``)continue;let{ascent:n,descent:r}=Y(e,t.style);T=n,E=r;break}let D=T+E,O=w+(a-D)/2+T,k=r.words.filter(e=>e.text!==``&&!X(e.style.verticalAlign)),A=k.length>0?Math.max(...k.map(e=>e.style.fontSize)):0,j=w,M=w+a;for(let t of r.words){if(t.text===``)continue;let n=t.style.verticalAlign;if(!X(n))continue;if(A===0)break;let{ascent:r,descent:i}=Y(e,t.style),o=O+ce(n,r,i,A,T,E,a),s=o-r,c=o+i;s<j&&(j=s),c>M&&(M=c)}let N=M-j,P=(t,n,r)=>{let{ascent:i,descent:a}=Y(e,t),o=t.paddingTop+t.borderTopWidth,c=t.paddingBottom+t.borderBottomWidth,l=i+a+o+c,u;u=t.display===`inline-block`?w+t.marginTop:O-i-o,s.push({type:`box`,style:t,x:n,y:u,width:r,height:l,tagName:`span`,children:[]})};if(!y){let e=v,t=e,n,i=!1;for(let a of r.words){if(a.boxOpen&&a.boxClose&&a.text){n&&(i&&P(n,t,e-t),n=void 0,i=!1);let r=a.style,o=a.width-r.marginLeft-r.borderLeftWidth-r.paddingLeft-r.paddingRight-r.borderRightWidth-r.marginRight;P(r,e+r.marginLeft,r.borderLeftWidth+r.paddingLeft+o+r.paddingRight+r.borderRightWidth),i=!1,e+=a.width;continue}a.boxStyle!==n&&(n&&i&&P(n,t,e-t),n=a.boxStyle,t=e,i=!1),a.text&&!a.isSpace&&(i=!0),e+=a.width+(a.isSpace?h:0)}n&&i&&P(n,t,e-t)}let F=r.words.filter(e=>e.text!==``),L=F.length>0&&F.every(e=>ue(e.style,F[0].style));if(y){let t=[],n=null,i=0;for(let e of r.words){if(e.text===``){n&&=(t.push(n),null),i+=e.width;continue}if(e.isSpace&&h>0){n&&=(t.push(n),null),i+=e.width+h;continue}n&&ue(n.style,e.style)?(n.text+=e.text,n.width+=e.width):(n&&t.push(n),n={text:e.text,style:e.style,width:e.width,boxStyle:e.boxStyle,clipStyle:e.clipStyle,strokeImageStyle:e.strokeImageStyle,x:0,padBefore:i},i=0)}n&&t.push(n);let a=v+r.totalWidth;for(let n of t){a-=n.padBefore,z(e,n.style);let t=R(e,n.text);a-=t,n.x=a,n.width=t}for(let e of t)if(e.boxStyle&&de(e.boxStyle)){let t=e.boxStyle,n=t.paddingLeft+t.borderLeftWidth,r=t.paddingRight+t.borderRightWidth;P(t,e.x-n,e.width+n+r)}for(let e of t){let t={type:`text`,text:e.text,x:e.x+e.width,y:O,width:e.width,style:{...e.style,direction:`rtl`}};s.push(t),e.clipStyle&&c.set(t,e.clipStyle),e.strokeImageStyle&&l.set(t,e.strokeImageStyle)}}else{let t=r.words.map(e=>e.text).join(``);if(L&&/[\u0590-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/.test(t)&&!r.words.some(e=>e.boxOpen||e.boxClose||e.style.verticalAlign===`super`||e.style.verticalAlign===`sub`)){z(e,F[0].style);let n=R(e,t),r={type:`text`,text:t,x:v,y:O,width:n,style:{...F[0].style,direction:`ltr`}};s.push(r),F[0].clipStyle&&c.set(r,F[0].clipStyle),F[0].strokeImageStyle&&l.set(r,F[0].strokeImageStyle)}else for(let t of r.words){if(t.text===``){v+=t.width;continue}if(t.boxOpen&&t.boxClose){let n=t.style,r=v+n.marginLeft+n.borderLeftWidth+n.paddingLeft,i={type:`text`,text:t.text,x:r,y:O,width:R(e,t.text),style:t.style};s.push(i),t.clipStyle&&c.set(i,t.clipStyle),t.strokeImageStyle&&l.set(i,t.strokeImageStyle),v+=t.width;continue}let n=O,r=t.style.verticalAlign;if(X(r)){let i=A||t.style.fontSize,{ascent:o,descent:s}=Y(e,t.style);n+=ce(r,o,s,i,T,E,a)}let i=t.width+(t.isSpace?h:0),o={type:`text`,text:t.text,x:v,y:n,width:i,style:t.style};s.push(o),t.clipStyle&&c.set(o,t.clipStyle),t.strokeImageStyle&&l.set(o,t.strokeImageStyle),v+=i}}let ee=d===`justify`&&h>0?m:r.totalWidth;I.push({y:Math.round(O),text:r.words.map(e=>e.text).join(``),bounds:{x:b,y:j,width:ee,height:N}}),w+=N}return Ae(e,s,c,(e,t,n)=>{e.clip={image:t.backgroundImage&&t.backgroundImage!==`none`?t.backgroundImage:void 0,color:q(t.backgroundColor)?void 0:t.backgroundColor,...n}}),Ae(e,s,l,(e,t,n)=>{e.strokeImage={image:t.webkitTextStrokeImage,...n}}),{nodes:s,height:w-r}}function Ae(e,t,n,r){if(n.size===0)return;let i=e=>e.style.direction===`rtl`?{left:e.x-e.width,right:e.x}:{left:e.x,right:e.x+e.width};for(let a=0;a<t.length;){let o=t[a],s=o.type===`text`?n.get(o):void 0;if(!s){a++;continue}let c=a,l=1/0,u=-1/0;for(;c<t.length;){let e=t[c];if(e.type!==`text`||n.get(e)!==s||e.y!==o.y)break;let r=i(e);r.left<l&&(l=r.left),r.right>u&&(u=r.right),c++}let{ascent:d,descent:f}=Y(e,s),p={x:l,y:o.y-d,width:u-l,height:d+f};for(let e=a;e<c;e++)r(t[e],s,p);a=c}}function je(e,t){return e>=0&&t>=0?Math.max(e,t):e<0&&t<0?Math.min(e,t):e+t}function Q(e,t,n,r,i,a){let o=t.style;!a&&o.lineClamp>0&&(a={remaining:o.lineClamp,exhausted:!1});let s=o.marginLeft,c=o.marginRight,l=o.borderLeftWidth,u=o.borderRightWidth,d=o.borderTopWidth,f=o.borderBottomWidth,p=o.paddingLeft,m=o.paddingRight,h=o.paddingTop,g=o.paddingBottom,_=n+s,v=o.width>0?o.width:i-s-c,y=_+l+p,b=Math.max(0,v-l-u-p-m),x=r,S=x+d+h,C={type:`box`,style:o,x:_,y:x,width:v,height:0,tagName:t.tagName,children:[],listMarker:t.listMarker};if(o.display===`flex`){let n=Ne(e,t,y,S,b);return C.children=n.children,C.height=d+h+n.height+g+f,{box:C,height:C.height,marginBottomOut:o.marginBottom}}if(o.display===`table`){let n=Me(e,t,y,S,b);return C.children=n.children,C.height=d+h+n.height+g+f,{box:C,height:C.height,marginBottomOut:o.marginBottom}}if(t.children.length===0)return C.height=d+h+g+f,o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:o.marginBottom};if(se(t)){let{nodes:n,height:r}=ke(e,t,y,S,b,t.tagName===`li`&&re.has(o.listStyleType),a);C.children=n,C.height=d+h+r+g+f}else{let n=S,r=0,i=!1,s=t.tagName===`li`||t.tagName===`ul`||t.tagName===`ol`||t.tagName===`dd`||t.tagName===`dt`;for(let c=0;c<t.children.length;c++){let l=t.children[c];if(a&&(a.exhausted||a.remaining<=0)){a.exhausted=!0,r=0;break}if(l.tagName===`#text`||K(l)){let s=[l];for(;c+1<t.children.length;){let e=t.children[c+1];if(e.tagName===`#text`||K(e))s.push(e),c++;else break}r>0&&(n+=r,r=0);let u={element:null,tagName:`div`,style:{...t.style,display:`block`,marginTop:0,marginBottom:0,paddingTop:0,paddingBottom:0,borderTopWidth:0,borderBottomWidth:0},children:s,textContent:null},d=t.tagName===`li`&&re.has(o.listStyleType),{nodes:f,height:p}=ke(e,u,y,n,b,d,a);C.children.push(...f),n+=p,r=0,i=!0;continue}let u=l.style.marginTop;if(!(!i&&h===0&&d===0&&s)){let e=je(r,u);n+=e}let{box:f,height:p,marginBottomOut:m}=Q(e,l,y,n,b,a);C.children.push(f),n+=p,r=a?.exhausted?0:m,i=!0}let c=o.marginBottom,l=g===0&&f===0&&s;l&&r>0&&(c=Math.max(o.marginBottom,r));let u=n-S;return!l&&r>0&&(u+=r),C.height=d+h+u+g+f,o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:c}}return o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:o.marginBottom}}function Me(e,t,n,r,i){let a=[],o=[];for(let e of t.children)if(e.tagName===`tr`)o.push(e);else if([`thead`,`tbody`,`tfoot`].includes(e.tagName))for(let t of e.children)t.tagName===`tr`&&o.push(t);if(o.length===0)return{children:a,height:0};let s=Math.max(...o.map(e=>e.children.filter(e=>e.tagName===`td`||e.tagName===`th`).length));if(s===0)return{children:a,height:0};let c=i/s,l=r;for(let t of o){let r=t.children.filter(e=>e.tagName===`td`||e.tagName===`th`),i=0,o=[];for(let t=0;t<r.length;t++){let a=r[t],{box:s,height:u}=Q(e,a,n+t*c,l,c);o.push(s),i=Math.max(i,u)}for(let e of o)e.height=i,a.push(e);l+=i}return{children:a,height:l-r}}function Ne(e,t,n,r,i){let a=t.style,o=a.gap,s=[],c=t.children.filter(e=>e.tagName!==`#text`||e.textContent?.trim());if(c.length===0)return{children:s,height:0};if(a.flexDirection===`row`||a.flexDirection===``){let t=o*(c.length-1),a=c.reduce((e,t)=>e+(t.style.flexGrow||0),0),l=(i-t)/(a||c.length),u=n,d=0;for(let t of c){if(t.tagName===`#text`)continue;let n=l*(t.style.flexGrow||(a===0?1:0)),{box:i,height:c}=Q(e,t,u,r,n);s.push(i),d=Math.max(d,c),u+=n+o}return{children:s,height:d}}let l=r;for(let t of c){if(t.tagName===`#text`)continue;let{box:r,height:a}=Q(e,t,n,l,i);s.push(r),l+=a+o}return{children:s,height:l-r}}function Pe(e,t,n){if(!n.listMarker||n.markerHidden)return;let r=n.style,i=n.markerStyle,a=i?{...r,...i}:r;e.font=V(a);let o=G(e,r),s=t.y+r.borderTopWidth+r.paddingTop+ae(e,r,o),c=R(e,n.listMarker),l=r.direction===`rtl`,u=re.has(r.listStyleType),d=l?i?.paddingLeft:i?.paddingRight,f,p=s,m=`ltr`,h=a,g=c,_=t.x+r.borderLeftWidth+r.paddingLeft,v=t.x+t.width;if(u){let{ascent:t}=Y(e,a),r=e.measureText(n.listMarker),i=t/3,o=d===void 0?7+i:d,u=(r.actualBoundingBoxAscent??0)+(r.actualBoundingBoxDescent??0),m=u>0?i/u:1,y=(r.actualBoundingBoxRight??c)*m,b=(r.actualBoundingBoxLeft??0)*m,x=((r.actualBoundingBoxAscent??0)-(r.actualBoundingBoxDescent??0))/2*m;f=l?v+o+b:_-o-y,p=s-i+x,h={...a,fontSize:a.fontSize*m},g=c*m}else{let t=d===void 0?R(e,` `):d;l?/\d/.test(n.listMarker)?(m=`rtl`,f=v+t+c):f=v+t:f=_-c-t}t.children.unshift({type:`text`,text:n.listMarker,x:f,y:p,width:g,style:{...h,textDecorationLine:`none`,textDecorations:[],fontWeight:i?.fontWeight??400,fontStyle:i?.fontStyle??`normal`,direction:m}});let y=m===`rtl`?f-g:f;I.push({y:Math.round(s),text:n.listMarker,bounds:{x:y,y:t.y+r.borderTopWidth+r.paddingTop,width:g,height:o}})}function Fe(e,t,n,r=!0,i){P=r,F=i,ne.clear(),J.clear(),te.clear(),L.clear(),I=[];let{box:a,height:o}=Q(e,t,0,0,n);Ie(e,a,t);let s=I.slice().sort((e,t)=>e.y-t.y||e.bounds.x-t.bounds.x),c=[];for(let e of s){let t=c[c.length-1],n=e.bounds.height*.5;if(t&&Math.abs(e.y-t.y)<n){let n=t.text.length>0&&e.text.length>0&&!/\s$/.test(t.text)&&!/^\s/.test(e.text);t.text+=(n?` `:``)+e.text,t.y=Math.max(t.y,e.y);let r=Math.min(t.bounds.x,e.bounds.x),i=Math.min(t.bounds.y,e.bounds.y),a=Math.max(t.bounds.x+t.bounds.width,e.bounds.x+e.bounds.width),o=Math.max(t.bounds.y+t.bounds.height,e.bounds.y+e.bounds.height);t.bounds={x:r,y:i,width:a-r,height:o-i}}else c.push({y:e.y,text:e.text,bounds:{...e.bounds}})}return{root:a,height:o,lines:c}}function Ie(e,t,n){Pe(e,t,n);let r=0;for(let i of n.children)if(!(i.tagName===`#text`||K(i)))for(;r<t.children.length;){let n=t.children[r];if(n.type===`box`&&n.tagName===i.tagName){Ie(e,n,i),r++;break}r++}}function Le(e){if(!e||e===`none`)return[];let t=[],n=e.split(/,(?![^(]*\))/);for(let e of n){let n=e.trim(),r=n.match(/(rgb[a]?\([^)]+\)|#[0-9a-fA-F]+|\b[a-z]+\b)(?:\s|$)/i),i=n.match(/-?[\d.]+px/g);if(i&&i.length>=2){let e=i.map(e=>parseFloat(e));t.push({offsetX:e[0],offsetY:e[1],blur:e[2]||0,color:r?r[1]:`rgba(0,0,0,1)`})}}return t}function Re(e,t){return e[`border${t}Width`]>0&&e[`border${t}Style`]!==`none`}function ze(e,t,n,r,i,a,o){if(n=Math.round(n-i/2)+i/2,e.save(),e.strokeStyle=o,e.lineWidth=i,a===`double`){let a=Math.max(i,2);e.lineWidth=Math.max(.5,i*.5),e.beginPath(),e.moveTo(t,n-a/2),e.lineTo(t+r,n-a/2),e.moveTo(t,n+a/2),e.lineTo(t+r,n+a/2),e.stroke()}else if(a===`wavy`){let a=Math.max(1.5,i),o=a*4;e.beginPath(),e.moveTo(t,n);for(let i=t;i<t+r;i+=o)e.quadraticCurveTo(i+o/4,n-a,i+o/2,n),e.quadraticCurveTo(i+o*3/4,n+a,i+o,n);e.stroke()}else a===`dotted`?e.setLineDash([i,i*2]):a===`dashed`&&e.setLineDash([i*3,i*2]),e.beginPath(),e.moveTo(t,n),e.lineTo(t+r,n),e.stroke();e.setLineDash([]),e.restore()}function $(e,t,n,r,i,a){let o=t.indexOf(`linear-gradient(`);if(o===-1)return null;let s=0,c=-1;for(let e=o+16;e<t.length;e++)if(t[e]===`(`)s++;else if(t[e]===`)`){if(s===0){c=e;break}s--}if(c===-1)return null;let l=t.slice(o+16,c),u=[];s=0;let d=0,f=l;for(let e=0;e<f.length;e++)f[e]===`(`?s++:f[e]===`)`?s--:f[e]===`,`&&s===0&&(u.push(f.slice(d,e).trim()),d=e+1);u.push(f.slice(d).trim());let p=180,m=0,h=u[0];h.endsWith(`deg`)?(p=parseFloat(h),m=1):h===`to right`?(p=90,m=1):h===`to left`?(p=270,m=1):h===`to bottom`?(p=180,m=1):h===`to top`&&(p=0,m=1);let g=(p-90)*Math.PI/180,_=n+r/2,v=i+a/2,y=Math.abs(r*Math.cos(g))+Math.abs(a*Math.sin(g)),b=Math.cos(g)*y/2,x=Math.sin(g)*y/2,S=e.createLinearGradient(_-b,v-x,_+b,v+x),C=u.slice(m);for(let e=0;e<C.length;e++){let t=C[e].trim(),n=t,r=e/Math.max(1,C.length-1),i=t.match(/\s+([\d.]+%)\s*$/);i&&(r=parseFloat(i[1])/100,n=t.slice(0,t.length-i[0].length).trim());try{S.addColorStop(r,n)}catch{}}return S}function Be(e){return e.webkitTextFillColor&&e.webkitTextFillColor!==`transparent`?e.webkitTextFillColor:e.color}function Ve(e){return Math.max(1,Math.floor(e/10))}function He(e,t,n){e.strokeStyle=n||t.webkitTextStrokeColor||t.color,e.lineWidth=t.webkitTextStrokeWidth;let r=t.strokeLinejoin;e.lineJoin=r===`miter`||r===`bevel`?r:`round`}function Ue(e,t,n,r){let{style:i}=t;e.save(),e.font=V(i),e.textBaseline=`alphabetic`,e.fontKerning=i.fontKerning===`none`?`none`:`normal`,Number.isFinite(i.letterSpacing)&&i.letterSpacing!==0&&(e.letterSpacing=`${i.letterSpacing}px`),i.wordSpacing&&(e.wordSpacing=`${i.wordSpacing}px`),i.direction===`rtl`&&(e.direction=`rtl`,e.textAlign=`right`);let a=fe(i),o=i.webkitTextStrokeWidth>0,s=i.webkitTextFillColor===`transparent`||i.color===`transparent`,c=t.clip?(t.clip.image?$(e,t.clip.image,t.clip.x,t.clip.width,t.clip.y,t.clip.height):null)??t.clip.color??null:null,l=a||(n!=null||c!=null)&&s,u=c??n??null,d=(t.strokeImage?$(e,t.strokeImage.image,t.strokeImage.x,t.strokeImage.width,t.strokeImage.y,t.strokeImage.height):null)??r??null,f=Le(i.textShadow);if(f.length>0){let n=l||!s;for(let r of f)e.save(),e.shadowOffsetX=r.offsetX,e.shadowOffsetY=r.offsetY,e.shadowBlur=r.blur,e.shadowColor=r.color,n&&(e.fillStyle=l&&u?u:Be(i),e.fillText(t.text,t.x,t.y)),o&&(He(e,i,d),e.strokeText(t.text,t.x,t.y)),e.restore()}let p=()=>{l?(e.save(),e.fillStyle=u||i.color,e.fillText(t.text,t.x,t.y),e.restore()):s||(e.fillStyle=Be(i),e.fillText(t.text,t.x,t.y))},m=()=>{o&&(e.save(),He(e,i,d),e.strokeText(t.text,t.x,t.y),e.restore())};y(i.paintOrder)?(m(),p()):(p(),m());let h=t.width,g=i.fontSize,_=Ve(g),v=i.direction===`rtl`?t.x-h:t.x;if(i.textDecorations.length>0){let{ascent:n}=Y(e,i);for(let r of i.textDecorations){let a=r.color;if(q(r.color))if(u)a=u;else continue;let o=r.style||`solid`,s=i.webkitTextStrokeWidth>0?i.webkitTextStrokeWidth:0,c=d||i.webkitTextStrokeColor||i.color,l=t=>{let n=typeof c==`string`&&q(c);if(s>0&&!n){ze(e,v,t,h,_+s,o,c);let n=_-s;n>0&&ze(e,v,t,h,n,o,a)}else ze(e,v,t,h,_,o,a)};if(r.line===`underline`){let e=g*.105-.2;l(t.y+e)}else if(r.line===`line-through`){let e=-(g*.33);l(t.y+e)}else r.line===`overline`&&l(Math.floor(t.y-n)-_/2)}}e.restore()}function We(e,t,n=null,r=null){let{style:i}=t;!q(i.backgroundColor)&&i.webkitBackgroundClip!==`text`&&(e.fillStyle=i.backgroundColor,e.fillRect(t.x,t.y,t.width,t.height));let a=[[`Top`,t.x,t.y+i.borderTopWidth/2,t.x+t.width,t.y+i.borderTopWidth/2],[`Right`,t.x+t.width-i.borderRightWidth/2,t.y,t.x+t.width-i.borderRightWidth/2,t.y+t.height],[`Bottom`,t.x,t.y+t.height-i.borderBottomWidth/2,t.x+t.width,t.y+t.height-i.borderBottomWidth/2],[`Left`,t.x+i.borderLeftWidth/2,t.y,t.x+i.borderLeftWidth/2,t.y+t.height]];for(let[t,n,r,o,s]of a)Re(i,t)&&(e.strokeStyle=i[`border${t}Color`],e.lineWidth=i[`border${t}Width`],e.beginPath(),e.moveTo(n,r),e.lineTo(o,s),e.stroke());if(fe(i)){let r=i.backgroundImage&&i.backgroundImage!==`none`?$(e,i.backgroundImage,t.x,t.width,t.y,t.height):null,a=q(i.backgroundColor)?null:i.backgroundColor;n=r??a??n}i.webkitTextStrokeImage&&i.webkitTextStrokeImage!==`none`&&(r=$(e,i.webkitTextStrokeImage,t.x,t.width,t.y,t.height));for(let i of t.children)Ge(e,i,n,r)}function Ge(e,t,n,r){t.type===`text`?Ue(e,t,n,r):We(e,t,n,r)}var Ke=null;function qe(e){let{html:t,width:n,height:r,accuracy:a=`performance`,debug:s}=e;if(!n||n<=0||Number.isNaN(n))throw TypeError(`layout: width must be a positive number, got ${n}`);let c=a===`balanced`,{fragment:l,css:u}=o(t),{tree:d,cleanup:f}=N(l,u,n),p=e.ctx??(Ke??=i(!0));p.fontKerning=`normal`;let{root:m,height:h,lines:g}=Fe(p,d,n,c,s),_=r||h;return f(),{layoutRoot:m,height:_,lines:g}}function Je(e){let{layout:t,width:n,pixelRatio:r=globalThis.devicePixelRatio??1}=e;if(e.ctx&&e.canvas)throw TypeError(`drawLayout: ctx and canvas are mutually exclusive — provide one or neither`);let i=t.height,a,o;if(e.ctx)o=e.ctx,a=e.ctx.canvas;else{if(!e.canvas&&typeof document>`u`)throw Error(`render-tag: drawLayout cannot create a canvas in a non-browser environment — pass ctx or canvas.`);a=e.canvas??document.createElement(`canvas`),a.width=Math.ceil(n*r),a.height=Math.ceil(i*r),`style`in a&&(a.style.width=`${n}px`,a.style.height=`${i}px`),o=a.getContext(`2d`),o.scale(r,r)}return Ge(o,t.layoutRoot),{canvas:a}}function Ye(e){if(e.ctx&&e.canvas)throw TypeError(`render: ctx and canvas are mutually exclusive — provide one or neither`);let t=qe({html:e.html,width:e.width,height:e.height,accuracy:e.accuracy,debug:e.debug,ctx:e.ctx}),{canvas:n}=Je({layout:t,width:e.width,ctx:e.ctx,canvas:e.canvas,pixelRatio:e.pixelRatio});return{canvas:n,height:t.height,layoutRoot:t.layoutRoot,lines:t.lines}}e.drawLayout=Je,e.layout=qe,e.render=Ye,e.setDOMParser=r});
|
|
9
|
+
`,width:0,style:r.style,isSpace:!1,boxStyle:r.boxStyle}),a[t]){let o=n.length;be(e,a[t],r,n),i(o)}}else{let a=n.length;be(e,t,r,n),i(a)}}return n}function Z(e){let t=e.codePointAt(0)||0;return t>=19968&&t<=40959||t>=13312&&t<=19903||t>=12288&&t<=12351||t>=12352&&t<=12447||t>=12448&&t<=12543||t>=44032&&t<=55215||t>=65280&&t<=65519||t>=131072&&t<=173791}var Se;function Ce(){return Se||(typeof Intl<`u`&&Intl.Segmenter?(Se=new Intl.Segmenter(void 0,{granularity:`grapheme`}),Se):null)}function we(e){let t=Ce();return t?[...t.segment(e)].map(e=>e.segment):[...e]}var Te=/\p{Extended_Pictographic}/u;function Ee(e){for(let t of e)if(t.codePointAt(0)>=126976)return!0;return e.includes(``)||e.includes(`️`)?Te.test(e):!1}function De(e,t,n,r){let i=[...t.text].some(Z),a=Te.test(t.text)&&!!Ce(),o=t.width>n&&(t.style.overflowWrap===`break-word`||t.style.wordBreak===`break-all`);if(!i&&!a&&!o)return[t];if(o&&t.style.wordBreak!==`break-all`&&t.style.overflowWrap===`break-word`){let r=t.text.split(/(?<=-)(?!\d)|(?<=[^\d]-)/).filter(e=>e.length);if(r.length>1){e.font=V(t.style),e.letterSpacing=B(t.style.letterSpacing);let i=[];for(let a of r){let r=R(e,a);r<=n?i.push({...t,text:a,width:r}):i.push(...De(e,{...t,text:a,width:r},n,0))}return i}}e.font=V(t.style),e.letterSpacing=B(t.style.letterSpacing);let s=a?we(t.text):[...t.text],c=[],l=``,u=0;for(let r of s){if(a&&Ee(r)){l&&(c.push({...t,text:l,width:u}),l=``,u=0),c.push({...t,text:r,width:R(e,r)});continue}if(Z(r)){l&&(c.push({...t,text:l,width:u}),l=``,u=0);let n=R(e,r);c.push({...t,text:r,width:n});continue}let i=l+r,s=R(e,i);if(o&&s>n&&l){c.push({...t,text:l,width:u}),l=r,u=R(e,r);continue}l=i,u=s}return l&&c.push({...t,text:l,width:u}),c}var Oe=/^[,.\;:!?\)\]\}'"»›]+$/;function ke(e,t,n,r,i=!1,a=0,o,s=0){let c=[],l=()=>({words:[],totalWidth:0,lineHeight:s}),u=l(),d=r===`nowrap`||r===`pre`,f=()=>n-(c.length===0?a:0),p=r===`pre-wrap`||r===`pre`||r===`pre-line`,m=r===`pre`||r===`pre-wrap`||r===`break-spaces`;function h(t=!1){let i=u.words.length>0;if(!(r===`break-spaces`||m&&!t))for(;u.words.length>0&&u.words[u.words.length-1].isSpace;)u.totalWidth-=u.words[u.words.length-1].width,u.words.pop();if(t&&u.words.length>0){let t=u.words[u.words.length-1];if(t.isSoftHyphenBreak){z(e,t.style);let n=R(e,`-`);u.words.push({text:`-`,width:n,style:t.style,isSpace:!1,clipStyle:t.clipStyle,strokeImageStyle:t.strokeImageStyle}),u.totalWidth+=n}}if(u.words.length>0||i&&p){if(F){let e=u.words.map(e=>e.text).join(``);F({type:`line-commit`,message:`Line ${c.length}: "${e}" width=${u.totalWidth.toFixed(2)} / ${n}`,data:{lineIndex:c.length,text:e,totalWidth:u.totalWidth,contentWidth:n}})}c.push(u)}u=l()}let g=!0;for(let r=0;r<t.length;r++){let s=t[r],p=G(e,s.style,i);if(s.boxStyle&&s.boxStyle.display===`inline-block`){let e=s.boxStyle;p=Math.max(p,p+e.paddingTop+e.paddingBottom+e.marginTop+e.marginBottom+e.borderTopWidth+e.borderBottomWidth)}if(s.text===`
|
|
10
|
+
`){u.words.length===0?(u.lineHeight=Math.max(u.lineHeight,p),u.endedByHardBreak=!0,c.push(u),u=l()):(u.endedByHardBreak=!0,h()),g=!0;continue}if(d){u.words.push(s),u.totalWidth+=s.width,u.lineHeight=Math.max(u.lineHeight,p);continue}if(!s.isSpace&&s.text&&!s.noBreakBefore&&!s.boxOpen&&!s.boxClose){let n=r;for(;n+1<t.length;){let e=t[n+1];if(!e.text||e.isSpace||e.boxOpen||e.boxClose||!e.noBreakBefore)break;n++}if(n>r){let a=s.style.overflowWrap===`break-word`||s.style.wordBreak===`break-all`,o=0;for(let e=r;e<=n;e++)o+=t[e].width;let c=[];for(let e=r;e<=n;e++)for(let n of[...t[e].text])c.push({ch:n,style:t[e].style,clipStyle:t[e].clipStyle,strokeImageStyle:t[e].strokeImageStyle});let l=c.map(e=>e.ch).join(``).split(/(?<=-)(?!\d)|(?<=[^\d]-)/).filter(e=>e.length),d=l.length>1;if(!(u.totalWidth+o<=f())&&(d||a&&o>f())){let t=[],o=0;for(let e of l){let n=[...e].length;t.push(c.slice(o,o+n)),o+=n}let s=(t,n)=>{let r=0;for(;r<t.length;){let a=t[r].style,o=t[r].clipStyle,s=t[r].strokeImageStyle;z(e,a),e.letterSpacing=B(a.letterSpacing);let c=G(e,a,i),l=``,d=0;for(;r<t.length&&t[r].style===a;){let i=t[r].ch,p=R(e,l+i);n&&u.totalWidth+p>f()&&(u.words.length>0||l)?(l&&(u.words.push({text:l,width:d,style:a,isSpace:!1,clipStyle:o,strokeImageStyle:s}),u.totalWidth+=d,u.lineHeight=Math.max(u.lineHeight,c)),h(!0),g=!1,l=i,d=R(e,i)):(l+=i,d=p),r++}l&&(u.words.push({text:l,width:d,style:a,isSpace:!1,clipStyle:o,strokeImageStyle:s}),u.totalWidth+=d,u.lineHeight=Math.max(u.lineHeight,c),g=!1)}},p=t=>{let n=0,r=0;for(;r<t.length;){let i=t[r].style,a=``;for(;r<t.length&&t[r].style===i;)a+=t[r].ch,r++;z(e,i),e.letterSpacing=B(i.letterSpacing),n+=R(e,a)}return n};!d&&u.words.length>0&&(h(!0),g=!1);for(let e of t){let t=p(e);u.words.length>0&&u.totalWidth+t>f()&&(h(!0),g=!1),s(e,a&&t>f())}r=n;continue}}}let _=!s.isSpace&&s.text.length>1?De(e,s,f(),u.totalWidth):[s],v=0;for(let e=r+1;e<t.length;e++){let n=t[e];if(n.isSpace||n.text===`
|
|
11
|
+
`)break;let r=!!n.text&&Oe.test(n.text),i=!n.text&&!!n.boxClose,a=!!n.text&&!!n.noBreakBefore;if(r||i||a){v+=n.width;continue}break}for(let i of _){let s=i===_[_.length-1]?v:0,l=!i.isSpace&&i.text.length>0&&Oe.test(i.text)&&u.words.length>0&&!u.words[u.words.length-1].isSpace,d=i===_[0]&&i.noBreakBefore&&u.words.length>0&&!u.words[u.words.length-1].isSpace,y=0;if(!i.text&&i.boxOpen){let n=t[r+1];n&&!n.isSpace&&n.text&&(y=(n.text.length>1?De(e,n,f(),0):[n])[0].width)}let b=0;if(i.isSoftHyphenBreak&&(z(e,i.style),e.letterSpacing=B(i.style.letterSpacing),b=R(e,`-`)),!i.isSpace&&!l&&!d&&u.words.length>0&&u.totalWidth+i.width+b+s+y>f()){let t=u.totalWidth+i.width+b+s+y-f(),r=!0;if(t<1&&!ee([...u.words,i])){z(e,i.style);let t=u.words.map(e=>e.text).join(``)+i.text+(i.isSoftHyphenBreak?`-`:``),n=0;for(let e of u.words)e.text||(n+=e.width);i.text||(n+=i.width),R(e,t)+n+s+y<=f()+.02&&(r=!1)}if(r&&i.text.includes(`-`)){let t=i.text.split(/(?<=-)(?!\d)|(?<=[^\d]-)/);if(t.length>1){z(e,i.style);let n=``,r=0,a=0,o=f()-u.totalWidth;for(;a<t.length;a++){let i=n+t[a],s=R(e,i);if(s>o)break;n=i,r=s}if(a>0&&a<t.length){u.words.push({...i,text:n,width:r}),u.totalWidth+=r,u.lineHeight=Math.max(u.lineHeight,p),h(!0),g=!1;let o=t.slice(a).join(``),s=R(e,o);u.words.push({...i,text:o,width:s}),u.totalWidth+=s,u.lineHeight=Math.max(u.lineHeight,p);continue}}}if(r){if(F){let e=u.words.map(e=>e.text).join(``);F({type:`line-wrap`,message:`"${i.text}" overflow=${t.toFixed(2)} wrap=true lineWidth=${u.totalWidth.toFixed(2)} pieceWidth=${i.width.toFixed(2)} contentWidth=${n} line="${e}"`,data:{text:i.text,overflow:t,lineWidth:u.totalWidth,pieceWidth:i.width,contentWidth:n,lineText:e}})}h(!0),g=!1}}if(i.isSpace&&u.words.length===0&&(!g||!m))continue;let x=i.width;if(i.isTab){let e=o?.interval||i.width,t=o?.halfSpace??0,n=e-((c.length===0?a:0)+u.totalWidth)%e;n<t&&(n+=e),x=n,i.width=x}if(u.words.length===0&&x>f()&&!i.isSpace&&i.text.includes(`-`)){let t=i.text.split(/(?<=-)(?!\d)|(?<=[^\d]-)/);if(t.length>1){z(e,i.style);let n=t.filter(e=>e).map(t=>({...i,text:t,width:R(e,t)})),r=!0;for(let e of n)r?(r=!1,u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p)):u.totalWidth+e.width>f()?(h(!0),g=!1,u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p)):(u.words.push(e),u.totalWidth+=e.width,u.lineHeight=Math.max(u.lineHeight,p));continue}}u.words.push(i),u.totalWidth+=x,u.lineHeight=Math.max(u.lineHeight,p),i.isSpace||(g=!1)}}return h(),c}function Ae(e,t,n,r,i,a=!1,o){let s=[],c=new Map,l=new Map;if(o&&(o.exhausted||o.remaining<=0))return o.exhausted=!0,{nodes:s,height:0};let u=ge(t);if(u.length===0)return{nodes:s,height:0};let d=xe(e,u),f=t.style.textIndent||0;z(e,t.style);let p=e.letterSpacing;e.letterSpacing=`0px`;let m=R(e,` `);e.letterSpacing=p;let h={interval:(m+(t.style.letterSpacing||0)+(t.style.wordSpacing||0))*8,halfSpace:m/2},g=G(e,t.style,a),_=ke(e,d,i,t.style.whiteSpace,a,f,h,g),v=o?o.remaining:t.style.lineClamp;if(v>0&&_.length>v){_.length=v;let t=_[v-1];he(e,t,i-(v===1?f:0)),t.endedByHardBreak=!0,o&&(o.remaining=0,o.exhausted=!0)}else o&&(o.remaining-=_.length);let y=t.style.direction===`rtl`,b=e=>e===`start`?y?`right`:`left`:e===`end`?y?`left`:`right`:e,x=b(t.style.textAlign),S=t.style.textAlignLast||`auto`;S=S===`auto`?t.style.textAlign===`justify`?y?`right`:`left`:x:b(S);let C=Y(e,t.style),w=r;for(let t=0;t<_.length;t++){let r=_[t];if(r.words.length===0){w+=r.lineHeight;continue}let a=r.lineHeight,o=t===_.length-1,u=t===0,d=o||r.endedByHardBreak?S:x,p=u?f:0,m=i-p,h=0;if(d===`justify`&&r.totalWidth<m){let e=r.words.filter(e=>e.isSpace).length;e>0&&(h=(m-r.totalWidth)/e)}let g=r.totalWidth>m+.5,v=n+p;g?v=y?n+m-r.totalWidth:n+p:d===`center`?v=n+p+(m-r.totalWidth)/2:d===`right`?v=(y?n+m:n+p+m)-r.totalWidth:d===`justify`&&y&&(v=n+m-r.totalWidth);let b=v,T=C.ascent,E=C.descent;for(let t of r.words){if(t.text===``||X(t.style.verticalAlign))continue;let{ascent:n,descent:r}=Y(e,t.style);n>T&&(T=n),r>E&&(E=r)}if(T===0)for(let t of r.words){if(t.text===``)continue;let{ascent:n,descent:r}=Y(e,t.style);T=n,E=r;break}let D=T+E,O=w+(a-D)/2+T,k=r.words.filter(e=>e.text!==``&&!X(e.style.verticalAlign)),A=k.length>0?Math.max(...k.map(e=>e.style.fontSize)):0,j=w,M=w+a;for(let t of r.words){if(t.text===``)continue;let n=t.style.verticalAlign;if(!X(n))continue;if(A===0)break;let{ascent:r,descent:i}=Y(e,t.style),o=O+ce(n,r,i,A,T,E,a),s=o-r,c=o+i;s<j&&(j=s),c>M&&(M=c)}let N=M-j,P=(t,n,r)=>{let{ascent:i,descent:a}=Y(e,t),o=t.paddingTop+t.borderTopWidth,c=t.paddingBottom+t.borderBottomWidth,l=i+a+o+c,u;u=t.display===`inline-block`?w+t.marginTop:O-i-o,s.push({type:`box`,style:t,x:n,y:u,width:r,height:l,tagName:`span`,children:[]})};if(!y){let e=v,t=e,n,i=!1;for(let a of r.words){if(a.boxOpen&&a.boxClose&&a.text){n&&(i&&P(n,t,e-t),n=void 0,i=!1);let r=a.style,o=a.width-r.marginLeft-r.borderLeftWidth-r.paddingLeft-r.paddingRight-r.borderRightWidth-r.marginRight;P(r,e+r.marginLeft,r.borderLeftWidth+r.paddingLeft+o+r.paddingRight+r.borderRightWidth),i=!1,e+=a.width;continue}a.boxStyle!==n&&(n&&i&&P(n,t,e-t),n=a.boxStyle,t=e,i=!1),a.text&&!a.isSpace&&(i=!0),e+=a.width+(a.isSpace?h:0)}n&&i&&P(n,t,e-t)}let F=r.words.filter(e=>e.text!==``),L=F.length>0&&F.every(e=>de(e.style,F[0].style));if(y){let t=[],n=null,i=0;for(let e of r.words){if(e.text===``){n&&=(t.push(n),null),i+=e.width;continue}if(e.isSpace&&h>0){n&&=(t.push(n),null),i+=e.width+h;continue}n&&de(n.style,e.style)?(n.text+=e.text,n.width+=e.width):(n&&t.push(n),n={text:e.text,style:e.style,width:e.width,boxStyle:e.boxStyle,clipStyle:e.clipStyle,strokeImageStyle:e.strokeImageStyle,x:0,padBefore:i},i=0)}n&&t.push(n);let a=v+r.totalWidth;for(let n of t){a-=n.padBefore,z(e,n.style);let t=R(e,n.text);a-=t,n.x=a,n.width=t}for(let e of t)if(e.boxStyle&&fe(e.boxStyle)){let t=e.boxStyle,n=t.paddingLeft+t.borderLeftWidth,r=t.paddingRight+t.borderRightWidth;P(t,e.x-n,e.width+n+r)}for(let e of t){let t={type:`text`,text:e.text,x:e.x+e.width,y:O,width:e.width,style:{...e.style,direction:`rtl`}};s.push(t),e.clipStyle&&c.set(t,e.clipStyle),e.strokeImageStyle&&l.set(t,e.strokeImageStyle)}}else{let t=r.words.map(e=>e.text).join(``);if(L&&/[\u0590-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/.test(t)&&!r.words.some(e=>e.boxOpen||e.boxClose||e.style.verticalAlign===`super`||e.style.verticalAlign===`sub`)){z(e,F[0].style);let n=R(e,t),r={type:`text`,text:t,x:v,y:O,width:n,style:{...F[0].style,direction:`ltr`}};s.push(r),F[0].clipStyle&&c.set(r,F[0].clipStyle),F[0].strokeImageStyle&&l.set(r,F[0].strokeImageStyle)}else for(let t of r.words){if(t.text===``){v+=t.width;continue}if(t.boxOpen&&t.boxClose){let n=t.style,r=v+n.marginLeft+n.borderLeftWidth+n.paddingLeft,i={type:`text`,text:t.text,x:r,y:O,width:R(e,t.text),style:t.style};s.push(i),t.clipStyle&&c.set(i,t.clipStyle),t.strokeImageStyle&&l.set(i,t.strokeImageStyle),v+=t.width;continue}let n=O,r=t.style.verticalAlign;if(X(r)){let i=A||t.style.fontSize,{ascent:o,descent:s}=Y(e,t.style);n+=ce(r,o,s,i,T,E,a)}let i=t.width+(t.isSpace?h:0),o={type:`text`,text:t.text,x:v,y:n,width:i,style:t.style,...n===O?{}:{lineBaselineY:O}};s.push(o),t.clipStyle&&c.set(o,t.clipStyle),t.strokeImageStyle&&l.set(o,t.strokeImageStyle),v+=i}}let ee=d===`justify`&&h>0?m:r.totalWidth;I.push({y:Math.round(O),text:r.words.map(e=>e.text).join(``),bounds:{x:b,y:j,width:ee,height:N}}),w+=N}return je(e,s,c,(e,t,n)=>{e.clip={image:t.backgroundImage&&t.backgroundImage!==`none`?t.backgroundImage:void 0,color:q(t.backgroundColor)?void 0:t.backgroundColor,...n}}),je(e,s,l,(e,t,n)=>{e.strokeImage={image:t.webkitTextStrokeImage,...n}}),{nodes:s,height:w-r}}function je(e,t,n,r){if(n.size===0)return;let i=e=>e.style.direction===`rtl`?{left:e.x-e.width,right:e.x}:{left:e.x,right:e.x+e.width};for(let a=0;a<t.length;){let o=t[a],s=o.type===`text`?n.get(o):void 0;if(!s){a++;continue}let c=a,l=1/0,u=-1/0;for(;c<t.length;){let e=t[c];if(e.type!==`text`||n.get(e)!==s||e.y!==o.y)break;let r=i(e);r.left<l&&(l=r.left),r.right>u&&(u=r.right),c++}let{ascent:d,descent:f}=Y(e,s),p={x:l,y:o.y-d,width:u-l,height:d+f};for(let e=a;e<c;e++)r(t[e],s,p);a=c}}function Me(e,t){return e>=0&&t>=0?Math.max(e,t):e<0&&t<0?Math.min(e,t):e+t}function Q(e,t,n,r,i,a){let o=t.style;!a&&o.lineClamp>0&&(a={remaining:o.lineClamp,exhausted:!1});let s=o.marginLeft,c=o.marginRight,l=o.borderLeftWidth,u=o.borderRightWidth,d=o.borderTopWidth,f=o.borderBottomWidth,p=o.paddingLeft,m=o.paddingRight,h=o.paddingTop,g=o.paddingBottom,_=n+s,v=o.width>0?o.width:i-s-c,y=_+l+p,b=Math.max(0,v-l-u-p-m),x=r,S=x+d+h,C={type:`box`,style:o,x:_,y:x,width:v,height:0,tagName:t.tagName,children:[],listMarker:t.listMarker};if(o.display===`flex`){let n=Pe(e,t,y,S,b);return C.children=n.children,C.height=d+h+n.height+g+f,{box:C,height:C.height,marginBottomOut:o.marginBottom}}if(o.display===`table`){let n=Ne(e,t,y,S,b);return C.children=n.children,C.height=d+h+n.height+g+f,{box:C,height:C.height,marginBottomOut:o.marginBottom}}if(t.children.length===0)return C.height=d+h+g+f,o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:o.marginBottom};if(se(t)){let{nodes:n,height:r}=Ae(e,t,y,S,b,t.tagName===`li`&&re.has(o.listStyleType),a);C.children=n,C.height=d+h+r+g+f}else{let n=S,r=0,i=!1,s=t.tagName===`li`||t.tagName===`ul`||t.tagName===`ol`||t.tagName===`dd`||t.tagName===`dt`;for(let c=0;c<t.children.length;c++){let l=t.children[c];if(a&&(a.exhausted||a.remaining<=0)){a.exhausted=!0,r=0;break}if(l.tagName===`#text`||K(l)){let s=[l];for(;c+1<t.children.length;){let e=t.children[c+1];if(e.tagName===`#text`||K(e))s.push(e),c++;else break}r>0&&(n+=r,r=0);let u={element:null,tagName:`div`,style:{...t.style,display:`block`,marginTop:0,marginBottom:0,paddingTop:0,paddingBottom:0,borderTopWidth:0,borderBottomWidth:0},children:s,textContent:null},d=t.tagName===`li`&&re.has(o.listStyleType),{nodes:f,height:p}=Ae(e,u,y,n,b,d,a);C.children.push(...f),n+=p,r=0,i=!0;continue}let u=l.style.marginTop;if(!(!i&&h===0&&d===0&&s)){let e=Me(r,u);n+=e}let{box:f,height:p,marginBottomOut:m}=Q(e,l,y,n,b,a);C.children.push(f),n+=p,r=a?.exhausted?0:m,i=!0}let c=o.marginBottom,l=g===0&&f===0&&s;l&&r>0&&(c=Math.max(o.marginBottom,r));let u=n-S;return!l&&r>0&&(u+=r),C.height=d+h+u+g+f,o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:c}}return o.minHeight>0&&(C.height=Math.max(C.height,o.minHeight)),{box:C,height:C.height,marginBottomOut:o.marginBottom}}function Ne(e,t,n,r,i){let a=[],o=[];for(let e of t.children)if(e.tagName===`tr`)o.push(e);else if([`thead`,`tbody`,`tfoot`].includes(e.tagName))for(let t of e.children)t.tagName===`tr`&&o.push(t);if(o.length===0)return{children:a,height:0};let s=Math.max(...o.map(e=>e.children.filter(e=>e.tagName===`td`||e.tagName===`th`).length));if(s===0)return{children:a,height:0};let c=i/s,l=r;for(let t of o){let r=t.children.filter(e=>e.tagName===`td`||e.tagName===`th`),i=0,o=[];for(let t=0;t<r.length;t++){let a=r[t],{box:s,height:u}=Q(e,a,n+t*c,l,c);o.push(s),i=Math.max(i,u)}for(let e of o)e.height=i,a.push(e);l+=i}return{children:a,height:l-r}}function Pe(e,t,n,r,i){let a=t.style,o=a.gap,s=[],c=t.children.filter(e=>e.tagName!==`#text`||e.textContent?.trim());if(c.length===0)return{children:s,height:0};if(a.flexDirection===`row`||a.flexDirection===``){let t=o*(c.length-1),a=c.reduce((e,t)=>e+(t.style.flexGrow||0),0),l=(i-t)/(a||c.length),u=n,d=0;for(let t of c){if(t.tagName===`#text`)continue;let n=l*(t.style.flexGrow||(a===0?1:0)),{box:i,height:c}=Q(e,t,u,r,n);s.push(i),d=Math.max(d,c),u+=n+o}return{children:s,height:d}}let l=r;for(let t of c){if(t.tagName===`#text`)continue;let{box:r,height:a}=Q(e,t,n,l,i);s.push(r),l+=a+o}return{children:s,height:l-r}}function Fe(e,t,n){if(!n.listMarker||n.markerHidden)return;let r=n.style,i=n.markerStyle,a=i?{...r,...i}:r;e.font=V(a);let o=G(e,r),s=t.y+r.borderTopWidth+r.paddingTop+ae(e,r,o),c=R(e,n.listMarker),l=r.direction===`rtl`,u=re.has(r.listStyleType),d=l?i?.paddingLeft:i?.paddingRight,f,p=s,m=`ltr`,h=a,g=c,_=t.x+r.borderLeftWidth+r.paddingLeft,v=t.x+t.width;if(u){let{ascent:t}=Y(e,a),r=e.measureText(n.listMarker),i=t/3,o=d===void 0?7+i:d,u=(r.actualBoundingBoxAscent??0)+(r.actualBoundingBoxDescent??0),m=u>0?i/u:1,y=(r.actualBoundingBoxRight??c)*m,b=(r.actualBoundingBoxLeft??0)*m,x=((r.actualBoundingBoxAscent??0)-(r.actualBoundingBoxDescent??0))/2*m;f=l?v+o+b:_-o-y,p=s-i+x,h={...a,fontSize:a.fontSize*m},g=c*m}else{let t=d===void 0?R(e,` `):d;l?/\d/.test(n.listMarker)?(m=`rtl`,f=v+t+c):f=v+t:f=_-c-t}t.children.unshift({type:`text`,text:n.listMarker,x:f,y:p,width:g,style:{...h,textDecorationLine:`none`,textDecorations:[],fontWeight:i?.fontWeight??400,fontStyle:i?.fontStyle??`normal`,direction:m}});let y=m===`rtl`?f-g:f;I.push({y:Math.round(s),text:n.listMarker,bounds:{x:y,y:t.y+r.borderTopWidth+r.paddingTop,width:g,height:o}})}function Ie(e,t,n,r=!0,i){P=r,F=i,ne.clear(),J.clear(),te.clear(),L.clear(),I=[];let{box:a,height:o}=Q(e,t,0,0,n);Le(e,a,t);let s=I.slice().sort((e,t)=>e.y-t.y||e.bounds.x-t.bounds.x),c=[];for(let e of s){let t=c[c.length-1],n=e.bounds.height*.5;if(t&&Math.abs(e.y-t.y)<n){let n=t.text.length>0&&e.text.length>0&&!/\s$/.test(t.text)&&!/^\s/.test(e.text);t.text+=(n?` `:``)+e.text,t.y=Math.max(t.y,e.y);let r=Math.min(t.bounds.x,e.bounds.x),i=Math.min(t.bounds.y,e.bounds.y),a=Math.max(t.bounds.x+t.bounds.width,e.bounds.x+e.bounds.width),o=Math.max(t.bounds.y+t.bounds.height,e.bounds.y+e.bounds.height);t.bounds={x:r,y:i,width:a-r,height:o-i}}else c.push({y:e.y,text:e.text,bounds:{...e.bounds}})}return{root:a,height:o,lines:c}}function Le(e,t,n){Fe(e,t,n);let r=0;for(let i of n.children)if(!(i.tagName===`#text`||K(i)))for(;r<t.children.length;){let n=t.children[r];if(n.type===`box`&&n.tagName===i.tagName){Le(e,n,i),r++;break}r++}}function Re(e){if(!e||e===`none`)return[];let t=[],n=e.split(/,(?![^(]*\))/);for(let e of n){let n=e.trim(),r=n.match(/(rgb[a]?\([^)]+\)|#[0-9a-fA-F]+|\b[a-z]+\b)(?:\s|$)/i),i=n.match(/-?[\d.]+px/g);if(i&&i.length>=2){let e=i.map(e=>parseFloat(e));t.push({offsetX:e[0],offsetY:e[1],blur:e[2]||0,color:r?r[1]:`rgba(0,0,0,1)`})}}return t}function ze(e,t){return e[`border${t}Width`]>0&&e[`border${t}Style`]!==`none`}function Be(e,t,n,r,i,a,o){if(n=Math.round(n-i/2)+i/2,e.save(),e.strokeStyle=o,e.lineWidth=i,a===`double`){let a=Math.max(i,2);e.lineWidth=Math.max(.5,i*.5),e.beginPath(),e.moveTo(t,n-a/2),e.lineTo(t+r,n-a/2),e.moveTo(t,n+a/2),e.lineTo(t+r,n+a/2),e.stroke()}else if(a===`wavy`){let a=Math.max(1.5,i),o=a*4;e.beginPath(),e.moveTo(t,n);for(let i=t;i<t+r;i+=o)e.quadraticCurveTo(i+o/4,n-a,i+o/2,n),e.quadraticCurveTo(i+o*3/4,n+a,i+o,n);e.stroke()}else a===`dotted`?e.setLineDash([i,i*2]):a===`dashed`&&e.setLineDash([i*3,i*2]),e.beginPath(),e.moveTo(t,n),e.lineTo(t+r,n),e.stroke();e.setLineDash([]),e.restore()}function $(e,t,n,r,i,a){let o=t.indexOf(`linear-gradient(`);if(o===-1)return null;let s=0,c=-1;for(let e=o+16;e<t.length;e++)if(t[e]===`(`)s++;else if(t[e]===`)`){if(s===0){c=e;break}s--}if(c===-1)return null;let l=t.slice(o+16,c),u=[];s=0;let d=0,f=l;for(let e=0;e<f.length;e++)f[e]===`(`?s++:f[e]===`)`?s--:f[e]===`,`&&s===0&&(u.push(f.slice(d,e).trim()),d=e+1);u.push(f.slice(d).trim());let p=180,m=0,h=u[0];h.endsWith(`deg`)?(p=parseFloat(h),m=1):h===`to right`?(p=90,m=1):h===`to left`?(p=270,m=1):h===`to bottom`?(p=180,m=1):h===`to top`&&(p=0,m=1);let g=(p-90)*Math.PI/180,_=n+r/2,v=i+a/2,y=Math.abs(r*Math.cos(g))+Math.abs(a*Math.sin(g)),b=Math.cos(g)*y/2,x=Math.sin(g)*y/2,S=e.createLinearGradient(_-b,v-x,_+b,v+x),C=u.slice(m);for(let e=0;e<C.length;e++){let t=C[e].trim(),n=t,r=e/Math.max(1,C.length-1),i=t.match(/\s+([\d.]+%)\s*$/);i&&(r=parseFloat(i[1])/100,n=t.slice(0,t.length-i[0].length).trim());try{S.addColorStop(r,n)}catch{}}return S}function Ve(e){return e.webkitTextFillColor&&e.webkitTextFillColor!==`transparent`?e.webkitTextFillColor:e.color}function He(e){return Math.max(1,Math.floor(e/10))}function Ue(e){let t=e.declarer.textDecorationThickness;return t===null?He(e.declarer.fontSize):t<=0?0:Math.max(1,Math.round(t))}function We(e,t){let n=e.declarer.textUnderlineOffset;return n===null?e.declarer.textDecorationThickness===null?null:Math.ceil(t/2)+t/2:n+t/2}function Ge(e,t,n){e.strokeStyle=n||t.webkitTextStrokeColor||t.color,e.lineWidth=t.webkitTextStrokeWidth;let r=t.strokeLinejoin;e.lineJoin=r===`miter`||r===`bevel`?r:`round`}function Ke(e,t,n,r){let{style:i}=t;e.save(),e.font=V(i),e.textBaseline=`alphabetic`,e.fontKerning=i.fontKerning===`none`?`none`:`normal`,Number.isFinite(i.letterSpacing)&&i.letterSpacing!==0&&(e.letterSpacing=`${i.letterSpacing}px`),i.wordSpacing&&(e.wordSpacing=`${i.wordSpacing}px`),i.direction===`rtl`&&(e.direction=`rtl`,e.textAlign=`right`);let a=pe(i),o=i.webkitTextStrokeWidth>0,s=i.webkitTextFillColor===`transparent`||i.color===`transparent`,c=t.clip?(t.clip.image?$(e,t.clip.image,t.clip.x,t.clip.width,t.clip.y,t.clip.height):null)??t.clip.color??null:null,l=a||(n!=null||c!=null)&&s,u=c??n??null,d=(t.strokeImage?$(e,t.strokeImage.image,t.strokeImage.x,t.strokeImage.width,t.strokeImage.y,t.strokeImage.height):null)??r??null,f=Re(i.textShadow);if(f.length>0){let n=l||!s;for(let r of f)e.save(),e.shadowOffsetX=r.offsetX,e.shadowOffsetY=r.offsetY,e.shadowBlur=r.blur,e.shadowColor=r.color,n&&(e.fillStyle=l&&u?u:Ve(i),e.fillText(t.text,t.x,t.y)),o&&(Ge(e,i,d),e.strokeText(t.text,t.x,t.y)),e.restore()}let p=()=>{l?(e.save(),e.fillStyle=u||i.color,e.fillText(t.text,t.x,t.y),e.restore()):s||(e.fillStyle=Ve(i),e.fillText(t.text,t.x,t.y))},m=()=>{o&&(e.save(),Ge(e,i,d),e.strokeText(t.text,t.x,t.y),e.restore())};y(i.paintOrder)?(m(),p()):(p(),m());let h=t.width,g=i.direction===`rtl`?t.x-h:t.x;if(i.textDecorations.length>0)for(let n of i.textDecorations){let r=Ue(n);if(r<=0)continue;let a=n.color;if(q(n.color))if(u)a=u;else continue;let o=n.style||`solid`,s=i.webkitTextStrokeWidth>0?i.webkitTextStrokeWidth:0,c=d||i.webkitTextStrokeColor||i.color,l=t=>{let n=typeof c==`string`&&q(c);if(s>0&&!n){Be(e,g,t,h,r+s,o,c);let n=r-s;n>0&&Be(e,g,t,h,n,o,a)}else Be(e,g,t,h,r,o,a)};if(n.line===`underline`){let e=t.lineBaselineY!==void 0&&!X(n.declarer.verticalAlign)?t.lineBaselineY:t.y,i=We(n,r);l(i===null?e+n.declarer.fontSize*.105-.2:e+i)}else if(n.line===`line-through`)l(t.y-i.fontSize*.33);else if(n.line===`overline`){let{ascent:n}=Y(e,i);l(Math.floor(t.y-n)-r/2)}}e.restore()}function qe(e,t,n=null,r=null){let{style:i}=t;!q(i.backgroundColor)&&i.webkitBackgroundClip!==`text`&&(e.fillStyle=i.backgroundColor,e.fillRect(t.x,t.y,t.width,t.height));let a=[[`Top`,t.x,t.y+i.borderTopWidth/2,t.x+t.width,t.y+i.borderTopWidth/2],[`Right`,t.x+t.width-i.borderRightWidth/2,t.y,t.x+t.width-i.borderRightWidth/2,t.y+t.height],[`Bottom`,t.x,t.y+t.height-i.borderBottomWidth/2,t.x+t.width,t.y+t.height-i.borderBottomWidth/2],[`Left`,t.x+i.borderLeftWidth/2,t.y,t.x+i.borderLeftWidth/2,t.y+t.height]];for(let[t,n,r,o,s]of a)ze(i,t)&&(e.strokeStyle=i[`border${t}Color`],e.lineWidth=i[`border${t}Width`],e.beginPath(),e.moveTo(n,r),e.lineTo(o,s),e.stroke());if(pe(i)){let r=i.backgroundImage&&i.backgroundImage!==`none`?$(e,i.backgroundImage,t.x,t.width,t.y,t.height):null,a=q(i.backgroundColor)?null:i.backgroundColor;n=r??a??n}i.webkitTextStrokeImage&&i.webkitTextStrokeImage!==`none`&&(r=$(e,i.webkitTextStrokeImage,t.x,t.width,t.y,t.height));for(let i of t.children)Je(e,i,n,r)}function Je(e,t,n,r){t.type===`text`?Ke(e,t,n,r):qe(e,t,n,r)}var Ye=null;function Xe(e){let{html:t,width:n,height:r,accuracy:a=`performance`,debug:s}=e;if(!n||n<=0||Number.isNaN(n))throw TypeError(`layout: width must be a positive number, got ${n}`);let c=a===`balanced`,{fragment:l,css:u}=o(t),{tree:d,cleanup:f}=N(l,u,n),p=e.ctx??(Ye??=i(!0));p.fontKerning=`normal`;let{root:m,height:h,lines:g}=Ie(p,d,n,c,s),_=r||h;return f(),{layoutRoot:m,height:_,lines:g}}function Ze(e){let{layout:t,width:n,pixelRatio:r=globalThis.devicePixelRatio??1}=e;if(e.ctx&&e.canvas)throw TypeError(`drawLayout: ctx and canvas are mutually exclusive — provide one or neither`);let i=t.height,a,o;if(e.ctx)o=e.ctx,a=e.ctx.canvas;else{if(!e.canvas&&typeof document>`u`)throw Error(`render-tag: drawLayout cannot create a canvas in a non-browser environment — pass ctx or canvas.`);a=e.canvas??document.createElement(`canvas`),a.width=Math.ceil(n*r),a.height=Math.ceil(i*r),`style`in a&&(a.style.width=`${n}px`,a.style.height=`${i}px`),o=a.getContext(`2d`),o.scale(r,r)}return Je(o,t.layoutRoot),{canvas:a}}function Qe(e){if(e.ctx&&e.canvas)throw TypeError(`render: ctx and canvas are mutually exclusive — provide one or neither`);let t=Xe({html:e.html,width:e.width,height:e.height,accuracy:e.accuracy,debug:e.debug,ctx:e.ctx}),{canvas:n}=Ze({layout:t,width:e.width,ctx:e.ctx,canvas:e.canvas,pixelRatio:e.pixelRatio});return{canvas:n,height:t.height,layoutRoot:t.layoutRoot,lines:t.lines}}e.drawLayout=Ze,e.layout=Xe,e.render=Qe,e.setDOMParser=r});
|
|
12
12
|
//# sourceMappingURL=render-tag.umd.js.map
|