@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
46 lines • 186 kB
JavaScript
/* @license */
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("kendo.core.min.js")):typeof define==`function`&&define.amd?define([`exports`,`kendo.core.min`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.Color={}),e.kendo._globals.Core))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.defineProperty,r=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},i=class{},a=class extends i{constructor(){super(),this._events={}}bind(e,t,n){let r=s(e),i=o(t),a=r.length;if(t===void 0){for(let t in e)this.bind(t,e[t]);return this}for(let e=0;e<a;e++){let a=r[e],o=i?t:t[a];if(o){if(n){let e=o;o=()=>{this.unbind(a,o),e.apply(this,arguments)},o.original=e}(this._events[a]=this._events[a]||[]).push(o)}}return this}one(e,t){return this.bind(e,t,!0)}first(e,t){let n=s(e),r=o(t);for(let e=0,i=n.length;e<i;e++){let i=n[e],a=r?t:t[i];a&&(this._events[i]=this._events[i]||[]).unshift(a)}return this}trigger(e,t={}){let n=this._events[e];if(n){let e=n.length;t.sender=this,t._defaultPrevented=!1,t.preventDefault=c,t.isDefaultPrevented=l,n=n.slice();for(let r=0;r<e;r++)n[r].call(this,t);return t._defaultPrevented===!0}return!1}unbind(e,t){let n=this._events[e];if(e===void 0)this._events={};else if(n)if(t)for(let e=n.length-1;e>=0;e--)(n[e]===t||n[e].original===t)&&n.splice(e,1);else this._events[e]=[];return this}};function o(e){return typeof e==`function`}function s(e){return typeof e==`string`?[e]:e}function c(){this._defaultPrevented=!0}function l(){return this._defaultPrevented===!0}let u=e=>{let t=typeof window<`u`?window:{},n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};u=e=>n.call(t,e),u(e)};var d=u;let f=/&/g,p=/</g,m=/"/g,h=/'/g,g=/>/g;function _(e){return String(e).replace(f,`&`).replace(p,`<`).replace(g,`>`).replace(m,`"`).replace(h,`'`)}function v(e){let t=window.console;t!==void 0&&t.log&&t.log(e)}function y(e){let t={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+))/i},n={};for(let r in t)if(t.hasOwnProperty(r)){let i=e.match(t[r]);if(i){n[r]=!0,n[i[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}}return n}let b=null,x={get browser(){return typeof window>`u`||b||(b=y(window.navigator.userAgent)),b}},S=Date.now||function(){return new Date().getTime()};function C(e,t){let n=0,r;if(!t||t<=0)return e;let i=function(){let i=S()-n,a=arguments,o=function(){e.apply(null,a),n=S()};if(!n)return o();r&&clearTimeout(r),i>t?o():r=setTimeout(o,t-i)};return i.cancel=function(){clearTimeout(r)},i}let w={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgrey:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkslategrey:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dimgrey:`696969`,dodgerblue:`1e90ff`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,grey:`808080`,green:`008000`,greenyellow:`adff2f`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgray:`d3d3d3`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslategray:`778899`,lightslategrey:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,slategrey:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`},ee=x.browser,T=e=>{let t=Object.keys(w);t.push(`transparent`);let n=RegExp(`^(`+t.join(`|`)+`)(\\W|$)`,`i`);return T=e=>n.exec(e),n.exec(e)};var E=class extends i{constructor(){super()}toHSV(){return this}toRGB(){return this}toHex(e){return this.toBytes().toHex(e)}toBytes(){return this}toCss(e){return`#`+this.toHex(e)}toCssRgba(){let e=this.toBytes();return`rgba(${e.r}, ${e.g}, ${e.b}, ${parseFloat(Number(this.a).toFixed(3))})`}toCssHex(){return this.a===1?`#`+this.toHex():`#`+this.toHex({alpha:!0})}toDisplay(){return ee.msie&&ee.version<9?this.toCss():this.toCssRgba()}equals(e){return e===this||e!=null&&this.toCssRgba()===k(e).toCssRgba()}diff(e){if(e===null)return NaN;let t=this.toBytes(),n=e.toBytes();return Math.sqrt(((t.r-n.r)*.3)**2+((t.g-n.g)*.59)**2+((t.b-n.b)*.11)**2)}clone(){let e=this.toBytes();return e===this&&(e=new O(e.r,e.g,e.b,e.a)),e}},D=class extends E{constructor(e,t,n,r){super(),this.r=e,this.g=t,this.b=n,this.a=r}toHSV(){let{r:e,g:t,b:n}=this,r=Math.min(e,t,n),i=Math.max(e,t,n),a=i-r,o=i,s,c;return a===0?new ne(0,0,o,this.a):(i===0?(c=0,s=-1):(c=a/i,s=e===i?(t-n)/a:t===i?2+(n-e)/a:4+(e-t)/a,s*=60,s<0&&(s+=360)),new ne(s,c,o,this.a))}toHSL(){let{r:e,g:t,b:n}=this,r=Math.max(e,t,n),i=Math.min(e,t,n),a,o,s=(r+i)/2;if(r===i)a=o=0;else{let c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break;default:break}}return new re(a*60,o*100,s*100,this.a)}toBytes(){return new O(this.r*255,this.g*255,this.b*255,this.a)}},O=class extends D{constructor(e,t,n,r){super(Math.round(e),Math.round(t),Math.round(n),r)}toRGB(){return new D(this.r/255,this.g/255,this.b/255,this.a)}toHSV(){return this.toRGB().toHSV()}toHSL(){return this.toRGB().toHSL()}toHex(e){let t=te(this.r,2)+te(this.g,2)+te(this.b,2);return e&&e.alpha&&(t+=te(Math.round(this.a*255),2)),t}toBytes(){return this}};function te(e,t,n=`0`){let r=e.toString(16);for(;t>r.length;)r=n+r;return r}var ne=class extends E{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.v=n,this.a=r}toRGB(){let{h:e,s:t,v:n}=this,r,i,a;if(t===0)r=i=a=n;else{e/=60;let o=Math.floor(e),s=e-o,c=n*(1-t),l=n*(1-t*s),u=n*(1-t*(1-s));switch(o){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;default:r=n,i=c,a=l;break}}return new D(r,i,a,this.a)}toHSL(){return this.toRGB().toHSL()}toBytes(){return this.toRGB().toBytes()}},re=class extends E{constructor(e,t,n,r){super(),this.h=e,this.s=t,this.l=n,this.a=r}toRGB(){let e=this.h/360,t=this.s/100,n=this.l/100,r,i,a;if(t===0)r=i=a=n;else{let o=n<.5?n*(1+t):n+t-n*t,s=2*n-o;r=ie(s,o,e+1/3),i=ie(s,o,e),a=ie(s,o,e-1/3)}return new D(r,i,a,this.a)}toHSV(){return this.toRGB().toHSV()}toBytes(){return this.toRGB().toBytes()}};function ie(e,t,n){let r=n;return r<0&&(r+=1),r>1&&--r,r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function ae(e){return parseFloat(parseFloat(parseInt(e,16)/255).toFixed(3))}function k(e,t){let n,r;if(!e||e===`none`)return null;if(e instanceof E)return e;let i=e.toLowerCase();if(n=T(i))return i=n[1]===`transparent`?new D(1,1,1,0):k(w[n[1]],t),i.match=[n[1]],i;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new O(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new O(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(i))?r=new O(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),ae(n[4]+n[4])):(n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(i))?r=new O(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),ae(n[4])):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(i))?r=new O(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new O(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(i))?r=new D(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(i))?r=new D(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4])):(n=/^color\(\s*srgb\s*([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s*(\/\s+([0-9]*\.?[0-9]+))?\)/.exec(i))&&(r=new D(parseFloat(n[1]),parseFloat(n[2]),parseFloat(n[3]),parseFloat(n[5]||`1`))),r)r.match=n;else if(!t)throw Error(`Cannot parse color: `+i);return r}var oe=class e extends i{constructor(t){if(super(),arguments.length===1){let n=e.formats,r=this.resolveColor(t);for(let e=0;e<n.length;e++){let t=n[e].re,i=n[e].process,a=t.exec(r);if(a){let e=i(a);this.r=e[0],this.g=e[1],this.b=e[2]}}}else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)}toHex(){let e=this.padDigit,t=this.r.toString(16),n=this.g.toString(16),r=this.b.toString(16);return`#`+e(t)+e(n)+e(r)}resolveColor(t){let n=t||`black`;return n.charAt(0)===`#`&&(n=n.substr(1,6)),n=n.replace(/ /g,``),n=n.toLowerCase(),n=e.namedColors[n]||n,n}normalizeByte(e){return e<0||isNaN(e)?0:e>255?255:e}padDigit(e){return e.length===1?`0`+e:e}brightness(e){let t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this}percBrightness(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}isDark(){return this.percBrightness()<180}static fromBytes(e,t,n,r){return new O(e,t,n,r??1)}static fromRGB(e,t,n,r){return new D(e,t,n,r??1)}static fromHSV(e,t,n,r){return new ne(e,t,n,r??1)}static fromHSL(e,t,n,r){return new re(e,t,n,r??1)}};oe.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],oe.namedColors=w;let se=e=>e.ownerDocument.defaultView.getComputedStyle(e),ce=(e,t)=>{let n=document.createElement(`div`);e.parentElement?e.parentElement.appendChild(n):e.appendChild(n),n.style.color=`rgb(from ${t} clamp(0, r, 255) clamp(0, g, 255) clamp(0, b, 255))`;let r=k(se(n).color,!0);return n.remove(),r?r.toCssHex():`#000000`};function le(e,t){let n=se(e).getPropertyValue(t),r=k(n,!0);return r?r.toCssHex():ce(e,n)}var A=class extends i{observers(){return this._observers=this._observers||[],this._observers}addObserver(e){return this._observers?this._observers.push(e):this._observers=[e],this}removeObserver(e){let t=this.observers(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this}trigger(e,t){let n=this._observers;if(n&&!this._suspended)for(let r=0;r<n.length;r++){let i=n[r];i[e]&&i[e](t)}return this}optionsChange(e={}){e.element=this,this.trigger(`optionsChange`,e)}geometryChange(){this.trigger(`geometryChange`,{element:this})}suspend(){return this._suspended=(this._suspended||0)+1,this}resume(){return this._suspended=Math.max((this._suspended||0)-1,0),this}_observerField(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}};let ue={}.toString;var de=class e extends A{constructor(e,t=``){super(),this.prefix=t;for(let t in e){let n=e[t];n=this._wrap(n,t),this[t]=n}}get(e){let t=e.split(`.`),n=this;for(;t.length&&n;){let e=t.shift();n=n[e]}return n}set(e,t){this.get(e)!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))}_set(t,n){let r=t.indexOf(`.`)>=0,i=this,a=t;if(r){let t=a.split(`.`),n=this.prefix;for(;t.length>1;){a=t.shift(),n+=a+`.`;let r=i[a];r||(r=new e({},n),r.addObserver(this),i[a]=r),i=r}a=t[0]}i._clear(a),i[a]=n}_clear(e){let t=this[e];t&&t.removeObserver&&t.removeObserver(this)}_wrap(t,n){let r=ue.call(t),a=t;return a!=null&&r===`[object Object]`&&(!(t instanceof e)&&!(t instanceof i)&&(a=new e(a,this.prefix+n+`.`)),a.addObserver(this)),a}};function fe(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function pe(e){return function(){return this[e]}}function me(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=r.charAt(0).toUpperCase()+r.substring(1,r.length);e[`set`+i]=fe(r),e[`get`+i]=pe(r)}}let he=(e,t)=>{let n=class extends e{};return me(n.prototype,t),n};function ge(e,t){return e.push.apply(e,t),e}let _e={1:`i`,10:`x`,100:`c`,2:`ii`,20:`xx`,200:`cc`,3:`iii`,30:`xxx`,300:`ccc`,4:`iv`,40:`xl`,400:`cd`,5:`v`,50:`l`,500:`d`,6:`vi`,60:`lx`,600:`dc`,7:`vii`,70:`lxx`,700:`dcc`,8:`viii`,80:`lxxx`,800:`dccc`,9:`ix`,90:`xc`,900:`cm`,1e3:`m`};function ve(e){let t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n=``;for(;e>0;)e<t[0]?t.shift():(n+=_e[t[0]],e-=t[0]);return n}function ye(){let e,t,n=new Promise((r,i)=>{e=e=>(n._state=`resolved`,r(e),n),t=e=>(n._state=`rejected`,i(e),n)});return n._state=`pending`,n.resolve=e,n.reject=t,n.state=()=>n._state,n}let be=1;function xe(){return`kdef`+be++}let Se=Math.PI/180,Ce=Number.MAX_VALUE,we=-Number.MAX_VALUE;function Te(e){return e/Se}let j=String.fromCharCode;function Ee(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(55296<=r&&r<=56319){let t=r,i=e.charCodeAt(++n);isNaN(i)||(r=(t-55296)*1024+(i-56320)+65536)}r<128?t+=j(r):r<2048?(t+=j(192|r>>>6),t+=j(128|r&63)):r<65536?(t+=j(224|r>>>12),t+=j(128|r>>>6&63),t+=j(128|r&63)):r<1114111&&(t+=j(240|r>>>18),t+=j(128|r>>>12&63),t+=j(128|r>>>6&63),t+=j(128|r&63))}return t}function De(e){return j(e>>8)+j(e&255)}function Oe(e){let t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r<65535)t+=De(r);else{let e=(r-65536>>10)+55296,n=(r-65536&1023)+56320;t+=De(e),t+=De(n)}}return t}let ke=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;function Ae(e){let t=``,n=0,r=Ee(e);for(;n<r.length;){let e=r.charCodeAt(n++),i=r.charCodeAt(n++),a=r.charCodeAt(n++),o=e>>2,s=(e&3)<<4|i>>4,c=(i&15)<<2|a>>6,l=a&63;isNaN(i)?c=l=64:isNaN(a)&&(l=64),t=t+ke.charAt(o)+ke.charAt(s)+ke.charAt(c)+ke.charAt(l)}return t}function je(e){return(e.x||{}).location===void 0?{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}:{x:e.x.location,y:e.y.location}}function Me(e={}){return e.touch?e.touch.initialTouch:e.target}function Ne(e){return e===``||e===null||e===`none`||e===`transparent`||e===void 0}function M(e){if(e)return e[e.length-1]}function Pe(e,t,n){return Math.max(Math.min(e,n),t)}function Fe(e,t){if(e.length<2)return e.slice();function n(e,n){for(var r=[],i=0,a=0,o=0;i<e.length&&a<n.length;)t(e[i],n[a])<=0?r[o++]=e[i++]:r[o++]=n[a++];return i<e.length&&r.push.apply(r,e.slice(i)),a<n.length&&r.push.apply(r,n.slice(a)),r}return(function e(t){if(t.length<=1)return t;var r=Math.floor(t.length/2),i=t.slice(0,r),a=t.slice(r);return i=e(i),a=e(a),n(i,a)})(e)}function Ie(e){return Promise.all(e)}function Le(e){return e*Se}function Re(e){return e?10**e:1}function N(e,t){let n=Re(t);return Math.round(e*n)/n}function ze(e,t){return e===void 0?t:e}function Be(e,t){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.addEventListener(r[i],t[n],!1)}}function Ve(e){let t=e.getBoundingClientRect(),n=document.documentElement;return{top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function He(e,t){let n={},r=window.getComputedStyle(e)||{},i=Array.isArray(t)?t:[t];for(let e=0;e<i.length;e++){let t=i[e];n[t]=r[t]}return n}function Ue(e){return isNaN(e)?e:e+`px`}function We(e,t){if(t){let{width:n,height:r}=t;n!==void 0&&(e.style.width=Ue(n)),r!==void 0&&(e.style.height=Ue(r))}else{let t=He(e,[`width`,`height`]);return{width:parseInt(t.width,10),height:parseInt(t.height,10)}}}function Ge(e,t={}){for(let n in t){let r=n.trim().split(` `);for(let i=0;i<r.length;i++)e.removeEventListener(r[i],t[n],!1)}}function Ke(e){let{paddingLeft:t,paddingTop:n}=He(e,[`paddingLeft`,`paddingTop`]);return{top:parseFloat(n),left:parseFloat(t)}}var P=class e extends i{constructor(e=0,t=0,n=0,r=0,i=0,a=0){super(),this.a=e,this.b=t,this.c=n,this.d=r,this.e=i,this.f=a}multiplyCopy(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}invert(){let{a:t,b:n,c:r,d:i,e:a,f:o}=this,s=t*i-n*r;return s===0?null:new e(i/s,-n/s,-r/s,t/s,(r*o-i*a)/s,(n*a-t*o)/s)}clone(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)}equals(e){return e?this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f:!1}round(e){return this.a=N(this.a,e),this.b=N(this.b,e),this.c=N(this.c,e),this.d=N(this.d,e),this.e=N(this.e,e),this.f=N(this.f,e),this}toArray(e){let t=[this.a,this.b,this.c,this.d,this.e,this.f];if(e!==void 0)for(let n=0;n<t.length;n++)t[n]=N(t[n],e);return t}toString(e,t=`,`){return this.toArray(e).join(t)}static translate(t,n){return new e(1,0,0,1,t,n)}static unit(){return new e(1,0,0,1,0,0)}static rotate(t,n,r){let i=new e;return i.a=Math.cos(Le(t)),i.b=Math.sin(Le(t)),i.c=-i.b,i.d=i.a,i.e=n-n*i.a+r*i.b||0,i.f=r-r*i.a-n*i.b||0,i}static scale(t,n){return new e(t,0,0,n,0,0)}};P.IDENTITY=P.unit();let qe=/matrix\((.*)\)/;function Je(e){let t=e.match(qe);return t===null||t.length!==2?P.unit():new P(...t[1].split(`,`).map(e=>parseFloat(e)))}function Ye(e){let t=getComputedStyle(e).transform;return t===`none`?P.unit():Je(t)}function Xe(e){if(!e)return P.unit();let t=Ye(e),n=e.parentElement;for(;n;){let e=Ye(n);t=t.multiplyCopy(e),n=n.parentElement}return t.b=t.c=t.e=t.f=0,t}var Ze=class extends i{constructor(e){super(),this._size=e,this._length=0,this._map={}}put(e,t){let n=this._map,r={key:e,value:t};n[e]=r,this._head?(this._tail.newer=r,r.older=this._tail,this._tail=r):this._head=this._tail=r,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++}get(e){let t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}};let Qe=/\r?\n|\r|\t/g;function $e(e){return String(e).replace(Qe,` `)}function et(e){let t=[];for(let n in e)t.push(n+e[n]);return t.sort().join(``)}function tt(e){let t=2166136261;for(let n=0;n<e.length;++n)t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24),t^=e.charCodeAt(n);return t>>>0}function nt(){return{width:0,height:0,baseline:0}}let rt={baselineMarkerSize:1},F;typeof document<`u`&&(F=document.createElement(`div`),F.style.setProperty(`position`,`absolute`,`important`),F.style.setProperty(`top`,`-4000px`,`important`),F.style.setProperty(`width`,`auto`,`important`),F.style.setProperty(`height`,`auto`,`important`),F.style.setProperty(`padding`,`0`,`important`),F.style.setProperty(`margin`,`0`,`important`),F.style.setProperty(`border`,`0`,`important`),F.style.setProperty(`line-height`,`normal`,`important`),F.style.setProperty(`visibility`,`hidden`,`important`),F.style.setProperty(`white-space`,`pre`,`important`));var it=class extends i{constructor(e){super(),this._cache=new Ze(1e3),this.options=Object.assign({},rt,e)}measure(e,t,n={}){if(e==null)return nt();let r=tt(e+et(t)),i=this._cache.get(r);if(i)return i;let a=nt(),o=n.box||F,s=this._baselineMarker().cloneNode(!1);for(let e in t){let n=t[e];n!==void 0&&(o.style[e]=n)}let c=n.normalizeText===!1?String(e):$e(e);return o.textContent=c,o.appendChild(s),document.body.appendChild(o),c.length&&(a.width=o.offsetWidth-this.options.baselineMarkerSize,a.height=o.offsetHeight,a.baseline=s.offsetTop+this.options.baselineMarkerSize),a.width>0&&a.height>0&&this._cache.put(r,a),o.parentNode.removeChild(o),a}_baselineMarker(){let e=document.createElement(`div`);return e.style.display=`inline-block`,e.style.verticalAlign=`baseline`,e.style.width=this.options.baselineMarkerSize+`px`,e.style.height=this.options.baselineMarkerSize+`px`,e.style.overflow=`hidden`,e}};it.current=new it;function at(e,t,n){return it.current.measure(e,t,n)}let ot=()=>typeof window<`u`,st={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)(\.(\d+(\.\d+)?))?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},ct={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},lt={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i},ut={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i},dt=(e,t,n)=>{for(let n in t)if(t.hasOwnProperty(n)&&t[n].test(e))return n;return n===void 0?e:n},ft=e=>{let t,n=[];for(let r in st)if(st.hasOwnProperty(r)){if(n=e.match(st[r]),!n)continue;if(r===`windows`&&`plugins`in window.navigator)return null;let i={};return i.device=r,i.browser=dt(e,ut,`default`),i.name=dt(r,ct),i[i.name]=!0,i.majorVersion=n[2],i.minorVersion=n[3]?n[3].replace(`_`,`.`):`.0`,t=i.minorVersion.replace(`.`,``).substr(0,2),i.flatVersion=i.majorVersion+t+Array(3-(t.length<3?t.length:2)).join(`0`),i.cordova=!0,i.appMode=window.navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||i.cordova,i}return null},pt=e=>{let t=null,n=[];for(let r in lt)if(lt.hasOwnProperty(r)&&(n=e.match(lt[r]),n)){t={},t[r]=!0,t[n[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,t.version=parseInt(document.documentMode||n[2],10);break}return t},mt=ot()&&window.navigator?window.navigator.userAgent:null,ht=mt?pt(mt):null;mt&&ft(mt),ot()&&`ontouchstart`in window,ht&&!ht.chrome&&window.MSPointerEvent,ht&&!ht.chrome&&window.PointerEvent;let gt={};gt.undefined=e=>e;let _t={};_t.undefined=e=>e;let vt=/\/\*[\s\S]*?\*\//g,yt=/([^\s:;]+?)\s*:\s*((?:(?:url\(\s*(?:(?:[^"')\\]|\\.)*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*\)|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^;"'])*?)\s*)(?=;|$)/gi,bt=/"|"|"/gi,xt=/'|'|'/gi;function St(e){return e.replace(bt,`"`).replace(xt,`'`)}function Ct(e){let t={},n=St((e||``).replace(vt,``)),r=yt.exec(n),i,a;for(;r!==null;)i=r[1].trim(),a=r[2].trim(),t[i]=a,r=yt.exec(n);return t}let wt=(e,t)=>{let n=Ct(t);Object.keys(n).forEach(t=>{e.style[t]=n[t]})},Tt=`data-style`,Et=e=>(e||``).replace(/\sstyle=/g,` data-style=`),Dt=e=>{Array.from(e.querySelectorAll(`[data-style]`)).forEach(e=>{let t=e.getAttribute(Tt);e.removeAttribute(Tt),wt(e,t)})},Ot=(e,t)=>{e.innerHTML=Et(t),Dt(e)},kt=(e,t)=>{let n=document.createElement(`div`);Ot(n,t),n.firstElementChild&&e.insertBefore(n.firstElementChild,e.firstChild)};function At(e){return e&&typeof e.matrix==`function`?e.matrix():e}var I=class e extends he(A,[`x`,`y`]){constructor(e,t){super(),this.x=e||0,this.y=t||0}equals(e){return e&&e.x===this.x&&e.y===this.y}clone(){return new e(this.x,this.y)}rotate(t,n){let r=e.create(n)||e.ZERO;return this.transform(P.rotate(t,r.x,r.y))}translate(e,t){return this.x+=e,this.y+=t,this.geometryChange(),this}translateWith(e){return this.translate(e.x,e.y)}move(e,t){return this.x=this.y=0,this.translate(e,t)}scale(e,t=e){return this.x*=e,this.y*=t,this.geometryChange(),this}scaleCopy(e,t){return this.clone().scale(e,t)}transform(e){let t=At(e),{x:n,y:r}=this;return this.x=t.a*n+t.c*r+t.e,this.y=t.b*n+t.d*r+t.f,this.geometryChange(),this}transformCopy(e){let t=this.clone();return e&&t.transform(e),t}distanceTo(e){let t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}round(e){return this.x=N(this.x,e),this.y=N(this.y,e),this.geometryChange(),this}toArray(e){let t=e!==void 0;return[t?N(this.x,e):this.x,t?N(this.y,e):this.y]}toString(e,t=` `){let{x:n,y:r}=this;return e!==void 0&&(n=N(n,e),r=N(r,e)),n+t+r}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static min(){let t=Ce,n=Ce;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.min(r.x,t),n=Math.min(r.y,n)}return new e(t,n)}static max(){let t=we,n=we;for(let e=0;e<arguments.length;e++){let r=arguments[e];t=Math.max(r.x,t),n=Math.max(r.y,n)}return new e(t,n)}static minPoint(){return new e(we,we)}static maxPoint(){return new e(Ce,Ce)}static get ZERO(){return new e(0,0)}},jt=class e extends he(A,[`width`,`height`]){constructor(e,t){super(),this.width=e||0,this.height=t||0}equals(e){return e&&e.width===this.width&&e.height===this.height}clone(){return new e(this.width,this.height)}toArray(e){let t=e!==void 0;return[t?N(this.width,e):this.width,t?N(this.height,e):this.height]}static create(t,n){if(t!==void 0)return t instanceof e?t:arguments.length===1&&t.length===2?new e(t[0],t[1]):new e(t,n)}static get ZERO(){return new e(0,0)}},L=class e extends A{constructor(e=new I,t=new jt,n=0){super(),this.setOrigin(e),this.setSize(t),this.setCornerRadius(n)}clone(){return new e(this.origin.clone(),this.size.clone())}equals(e){return e&&e.origin.equals(this.origin)&&e.size.equals(this.size)}setOrigin(e){return this._observerField(`origin`,I.create(e)),this.geometryChange(),this}getOrigin(){return this.origin}setCornerRadius(e){return this.cornerRadius=Array.isArray(e)?e:[e,e],this.geometryChange(),this}getCornerRadius(){return this.cornerRadius}setSize(e){return this._observerField(`size`,jt.create(e)),this.geometryChange(),this}getSize(){return this.size}width(){return this.size.width}height(){return this.size.height}topLeft(){return this.origin.clone()}bottomRight(){return this.origin.clone().translate(this.width(),this.height())}topRight(){return this.origin.clone().translate(this.width(),0)}bottomLeft(){return this.origin.clone().translate(0,this.height())}center(){return this.origin.clone().translate(this.width()/2,this.height()/2)}bbox(t){let n=this.topLeft().transformCopy(t),r=this.topRight().transformCopy(t),i=this.bottomRight().transformCopy(t),a=this.bottomLeft().transformCopy(t);return e.fromPoints(n,r,i,a)}transformCopy(t){return e.fromPoints(this.topLeft().transform(t),this.bottomRight().transform(t))}expand(e,t=e){return this.size.width+=2*e,this.size.height+=2*t,this.origin.translate(-e,-t),this}expandCopy(e,t){return this.clone().expand(e,t)}containsPoint(e){let t=this.origin,n=this.bottomRight();return!(e.x<t.x||e.y<t.y||n.x<e.x||n.y<e.y)}_isOnPath(e,t){let n=this.expandCopy(t,t),r=this.expandCopy(-t,-t);return n.containsPoint(e)&&!r.containsPoint(e)}static fromPoints(){let t=I.min.apply(null,arguments),n=I.max.apply(null,arguments),r=new jt(n.x-t.x,n.y-t.y);return new e(t,r)}static union(t,n){return e.fromPoints(I.min(t.topLeft(),n.topLeft()),I.max(t.bottomRight(),n.bottomRight()))}static intersect(t,n){let r={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y},i={left:n.topLeft().x,top:n.topLeft().y,right:n.bottomRight().x,bottom:n.bottomRight().y};if(r.left<=i.right&&i.left<=r.right&&r.top<=i.bottom&&i.top<=r.bottom)return e.fromPoints(new I(Math.max(r.left,i.left),Math.max(r.top,i.top)),new I(Math.min(r.right,i.right),Math.min(r.bottom,i.bottom)))}},Mt=class e extends A{constructor(e=P.unit()){super(),this._matrix=e}clone(){return new e(this._matrix.clone())}equals(e){return e&&e._matrix.equals(this._matrix)}translate(e,t){return this._matrix=this._matrix.multiplyCopy(P.translate(e,t)),this._optionsChange(),this}scale(e,t=e,n=null){let r=n;return r&&(r=I.create(r),this._matrix=this._matrix.multiplyCopy(P.translate(r.x,r.y))),this._matrix=this._matrix.multiplyCopy(P.scale(e,t)),r&&(this._matrix=this._matrix.multiplyCopy(P.translate(-r.x,-r.y))),this._optionsChange(),this}rotate(e,t){let n=I.create(t)||I.ZERO;return this._matrix=this._matrix.multiplyCopy(P.rotate(e,n.x,n.y)),this._optionsChange(),this}multiply(e){let t=At(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this}matrix(e){return e?(this._matrix=e,this._optionsChange(),this):this._matrix}_optionsChange(){this.optionsChange({field:`transform`,value:this})}};function R(e){return e===null?null:e instanceof Mt?e:new Mt(e)}let Nt={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Pt=`butt`;var Ft=class extends A{get nodeType(){return`Rect`}constructor(e){super(),this._initOptions(e)}_initOptions(e={}){let{clip:t,transform:n}=e;n&&(e.transform=R(n)),t&&!t.id&&(t.id=xe()),this.options=new de(e),this.options.addObserver(this)}transform(e){if(e!==void 0)this.options.set(`transform`,R(e));else return this.options.get(`transform`)}parentTransform(){let e=this,t;for(;e.parent;){e=e.parent;let n=e.transform();n&&(t=n.matrix().multiplyCopy(t||P.unit()))}if(t)return R(t)}currentTransform(e=this.parentTransform()){let t=At(this.transform()),n=At(e),r;if(r=t&&n?n.multiplyCopy(t):t||n,r)return R(r)}visible(e){return e===void 0?this.options.get(`visible`)!==!1:(this.options.set(`visible`,e),this)}clip(e){let t=this.options;return e===void 0?t.get(`clip`):(e&&!e.id&&(e.id=xe()),t.set(`clip`,e),this)}opacity(e){return e===void 0?ze(this.options.get(`opacity`),1):(this.options.set(`opacity`,e),this)}className(e){return e===void 0?this.options.get(`className`):(this.options.set(`className`,e),this)}clippedBBox(e){let t=this._clippedBBox(e);if(t){let n=this.clip();return n?L.intersect(t,n.bbox(e)):t}}containsPoint(e,t){if(this.visible()){let n=this.currentTransform(t),r=e;return n&&(r=e.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(r)||this._isOnPath&&this._hasStroke()&&this._isOnPath(r)}return!1}_hasFill(){let e=this.options.fill;return e&&(e.nodeType===`Pattern`||!Ne(e.color))}_hasStroke(){let e=this.options.stroke;return e&&e.width>0&&!Ne(e.color)}_clippedBBox(e){return this.bbox(e)}};function It(e,t,n,r){let i=0,a=0;return r&&(i=Math.atan2(r.c*n,r.a*t),r.b!==0&&(a=Math.atan2(r.d*n,r.b*t))),{x:i,y:a}}let Lt=Math.PI/2;var Rt=class e extends he(A,[`radius`]){constructor(e=new I,t=0){super(),this.setCenter(e),this.setRadius(t)}setCenter(e){return this._observerField(`center`,I.create(e)),this.geometryChange(),this}getCenter(){return this.center}equals(e){return e&&e.center.equals(this.center)&&e.radius===this.radius}clone(){return new e(this.center.clone(),this.radius)}pointAt(e){return this._pointAt(Le(e))}bbox(e){let t=It(this.center,this.radius,this.radius,e),n=I.maxPoint(),r=I.minPoint();for(let i=0;i<4;i++){let a=this._pointAt(t.x+i*Lt).transformCopy(e),o=this._pointAt(t.y+i*Lt).transformCopy(e),s=new I(a.x,o.y);n=I.min(n,s),r=I.max(r,s)}return L.fromPoints(n,r)}_pointAt(e){let{center:t,radius:n}=this;return new I(t.x+n*Math.cos(e),t.y+n*Math.sin(e))}containsPoint(e){let{center:t,radius:n}=this;return(e.x-t.x)**2+(e.y-t.y)**2<=n**2}_isOnPath(e,t){let{center:n,radius:r}=this,i=n.distanceTo(e);return r-t<=i&&i<=r+t}};let zt=e=>class extends e{fill(e,t){let n=this.options;if(e!==void 0){if(e&&e.nodeType!==`Gradient`){let r={color:e};t!==void 0&&(r.opacity=t),n.set(`fill`,r)}else n.set(`fill`,e);return this}return n.get(`fill`)}stroke(e,t,n){return e===void 0?this.options.get(`stroke`):(this.options.set(`stroke.color`,e),t!==void 0&&this.options.set(`stroke.width`,t),n!==void 0&&this.options.set(`stroke.opacity`,n),this)}},Bt=P.IDENTITY.toString(),Vt=e=>class extends e{bbox(e){let t=At(this.currentTransform(e)),n=t?t.toString():Bt,r;this._bboxCache&&this._matrixHash===n?r=this._bboxCache.clone():(r=this._bbox(t),this._bboxCache=r?r.clone():null,this._matrixHash=n);let i=this.options.get(`stroke.width`);return i&&r&&r.expand(i/2),r}geometryChange(){delete this._bboxCache,this.trigger(`geometryChange`,{element:this})}};function Ht(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,e),this.geometryChange(),this)}}function Ut(e,t){for(let n=0;n<t.length;n++)e[t[n]]=Ht(t[n])}let Wt=(e,t=[`geometry`])=>{let n=class extends e{};return Ut(n.prototype,t),n};var Gt=class extends zt(Vt(Wt(Ft))){get nodeType(){return`Circle`}constructor(e=new Rt,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}rawBBox(){return this._geometry.bbox()}_bbox(e){return this._geometry.bbox(e)}_containsPoint(e){return this.geometry().containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}};function Kt(e,t,n=10){return N(Math.abs(e-t),n)===0}function qt(e,t,n){return e<t||Kt(e,t,n)}function Jt(e,t,n,r){let i=t.x-e.x,a=r.x-n.x,o=t.y-e.y,s=r.y-n.y,c=e.x-n.x,l=e.y-n.y,u=i*s-a*o,d=(i*l-o*c)/u,f=(a*l-s*c)/u;if(d>=0&&d<=1&&f>=0&&f<=1)return new I(e.x+f*i,e.y+f*o)}let Yt=Math.pow,Xt=[`radiusX`,`radiusY`,`startAngle`,`endAngle`,`anticlockwise`];var Zt=class e extends he(A,Xt){constructor(e=new I,t={}){super(),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation}clone(){return new e(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})}setCenter(e){return this._observerField(`center`,I.create(e)),this.geometryChange(),this}getCenter(){return this.center}pointAt(e){let t=this.center,n=Le(e);return new I(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))}curvePoints(){let e=this.startAngle,t=this.anticlockwise?-1:1,n=[this.pointAt(e)],r=this._arcInterval(),i=r.endAngle-r.startAngle,a=Math.ceil(i/45),o=i/a,s=e,c;this.xRotation&&(c=R().rotate(this.xRotation,this.center));for(let e=1;e<=a;e++){let e=s+t*o,r=this._intervalCurvePoints(s,e,c);n.push(r.cp1,r.cp2,r.p2),s=e}return n}bbox(e){let t=this._arcInterval(),n=t.startAngle,r=t.endAngle,i=It(this.center,this.radiusX,this.radiusY,e),a=Te(i.x),o=Te(i.y),s=this.pointAt(r).transformCopy(e),c=en(a,n),l=en(o,n),u=this.pointAt(n).transformCopy(e),d=I.min(u,s),f=I.max(u,s);for(;c<r||l<r;){let t;c<r&&(t=this.pointAt(c).transformCopy(e),c+=90);let n;l<r&&(n=this.pointAt(l).transformCopy(e),l+=90),u=new I(t.x,n.y),d=I.min(d,u),f=I.max(f,u)}return L.fromPoints(d,f)}_arcInterval(){let{startAngle:e,endAngle:t,anticlockwise:n}=this;if(n){let n=e;e=t,t=n}return(e>t||n&&e===t)&&(t+=360),{startAngle:e,endAngle:t}}_intervalCurvePoints(e,t,n){let r=this.pointAt(e),i=this.pointAt(t),a=this._derivativeAt(e),o=this._derivativeAt(t),s=(Le(t)-Le(e))/3,c=new I(r.x+s*a.x,r.y+s*a.y),l=new I(i.x-s*o.x,i.y-s*o.y);return n&&(r.transform(n),i.transform(n),c.transform(n),l.transform(n)),{p1:r,cp1:c,cp2:l,p2:i}}_derivativeAt(e){let t=Le(e);return new I(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))}containsPoint(e){let t=this._arcInterval(),n=t.endAngle-t.startAngle,{center:r,radiusX:i,radiusY:a}=this,o=r.distanceTo(e),s=Math.atan2(e.y-r.y,e.x-r.x),c=i*a/Math.sqrt(Yt(i,2)*Yt(Math.sin(s),2)+Yt(a,2)*Yt(Math.cos(s),2)),l=this.pointAt(this.startAngle).round(10),u=this.pointAt(this.endAngle).round(10),d=Jt(r,e.round(10),l,u),f;if(n<180)f=d&&qt(r.distanceTo(d),o)&&qt(o,c);else{let n=Qt(r.x,r.y,i,a,e.x,e.y);n!==360&&(n=(360+n)%360);let s=t.startAngle<=n&&n<=t.endAngle;f=s&&qt(o,c)||!s&&(!d||d.equals(e))}return f}_isOnPath(e,t){let n=this._arcInterval(),r=this.center,i=Qt(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return i!==360&&(i=(360+i)%360),n.startAngle<=i&&i<=n.endAngle&&this.pointAt(i).distanceTo(e)<=t}static fromPoints(t,n,r,i,a,o,s){let c=$t({x1:t.x,y1:t.y,x2:n.x,y2:n.y,rx:r,ry:i,largeArc:a,swipe:o,rotation:s});return new e(c.center,{startAngle:c.startAngle,endAngle:c.endAngle,radiusX:c.radiusX,radiusY:c.radiusY,xRotation:c.xRotation,anticlockwise:o===0})}};function Qt(e,t,n,r,i,a){let o=N((i-e)/n,3),s=N((a-t)/r,3);return N(Te(Math.atan2(s,o)))}function $t(e){let{x1:t,y1:n,x2:r,y2:i,rx:a,ry:o,largeArc:s,swipe:c,rotation:l=0}=e,u=Le(l),d=Math.cos(u),f=Math.sin(u),p=d*(t-r)/2+f*(n-i)/2,m=-f*(t-r)/2+d*(n-i)/2,h=s===c?-1:1,g=p**2,_=m**2,v=a**2,y=o**2,b=g/v+_/y;b>1&&(b=Math.sqrt(g/v+_/y),a=b*a,v=a**2,o=b*o,y=o**2);let x=h*Math.sqrt((v*y-v*_-y*g)/(v*_+y*g));isNaN(x)&&(x=0);let S=a*m*x/o,C=-x*(o*p)/a,w=d*S-f*C+(t+r)/2,ee=f*S+d*C+(n+i)/2,T=(p-S)/a,E=(m-C)/o,D=-(p+S)/a,O=-(m+C)/o,te=(E>=0?1:-1)*Te(Math.acos(T/Math.sqrt(T*T+E*E))),ne=N((T*D+E*O)/(Math.sqrt(T*T+E*E)*Math.sqrt(D*D+O*O)),10),re=(T*O-E*D>=0?1:-1)*Te(Math.acos(ne));!c&&re>0&&(re-=360),c&&re<0&&(re+=360);let ie=te+re,ae=ie>=0?1:-1;return ie=Math.abs(ie)%360*ae,{center:new I(w,ee),startAngle:te,endAngle:ie,radiusX:a,radiusY:o,xRotation:l}}function en(e,t){let n=e;for(;n<t;)n+=90;return n}let tn=[].splice,nn=[].slice;var rn=class extends A{constructor(e=[]){super(),this.length=0,this._splice(0,e.length,e)}elements(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)}push(...e){let t=this.length,n=e.length;for(let r=0;r<n;r++)this[t+r]=e[r],e[r].addObserver(this);return this.length=t+n,this._change(),this.length}slice(){return nn.call(this)}pop(){if(this.length>0){let e=this[this.length-1];return this.length--,e.removeObserver(this),this._change(),e}}splice(e,t,...n){let r=this._splice(e,t,n);return this._change(),r}shift(){if(this.length>0){let e=this[0];for(let e=1;e<this.length;e++)this[e-1]=this[e];return this.length--,e.removeObserver(this),this._change(),e}}unshift(...e){let t=e.length;for(let e=this.length-1;e>=0;e--)this[e+t]=this[e];for(let n=0;n<t;n++)this[n]=e[n],e[n].addObserver(this);return this.length+=t,this._change(),this.length}indexOf(e){let t=this.length;for(let n=0;n<t;n++)if(this[n]===e)return n;return-1}_splice(e,t,n){let r=tn.apply(this,[e,t].concat(n));return this._clearObserver(r),this._setObserver(n),r}_add(e){this._setObserver(e),this._change()}_remove(e){this._clearObserver(e),this._change()}_setObserver(e){for(let t=0;t<e.length;t++)e[t].addObserver(this)}_clearObserver(e){for(let t=0;t<e.length;t++)e[t].removeObserver(this)}_change(){}},an=class extends rn{_change(){this.geometryChange()}};function on(e,t,n){let r=Te(Math.atan2(t.y-e.y,t.x-e.x));return n.transformCopy(R().rotate(-r,e)).x<e.x}function sn(e,t,n){let r=1-e;return r**3*n[0][t]+3*r**2*e*n[1][t]+3*e**2*r*n[2][t]+e**3*n[3][t]}function cn(e,t){return[-e[0][t]+3*e[1][t]-3*e[2][t]+e[3][t],3*(e[0][t]-2*e[1][t]+e[2][t]),3*(-e[0][t]+e[1][t]),e[0][t]]}var ln=class e extends i{constructor(e=0,t=0){super(),this.real=e,this.img=t}add(t){return new e(N(this.real+t.real,10),N(this.img+t.img,10))}addConstant(t){return new e(this.real+t,this.img)}negate(){return new e(-this.real,-this.img)}multiply(t){return new e(this.real*t.real-this.img*t.img,this.real*t.img+this.img*t.real)}multiplyConstant(t){return new e(this.real*t,this.img*t)}nthRoot(t){let n=Math.atan2(this.img,this.real),r=Math.sqrt(this.img**2+this.real**2)**(1/t);return new e(r*Math.cos(n/t),r*Math.sin(n/t))}equals(e){return this.real===e.real&&this.img===e.img}isReal(){return this.img===0}};function un(e){return e<0?-1:1}function dn(e,t,n){let r=Math.sqrt(t**2-4*e*n);return[(-t+r)/(2*e),(-t-r)/(2*e)]}function fn(e,t,n,r){if(e===0)return dn(t,n,r);let i=(3*e*n-t**2)/(3*e**2),a=(2*t**3-9*e*t*n+27*e**2*r)/(27*e**3),o=(i/3)**3+(a/2)**2,s=new ln(0,1),c=-t/(3*e),l,u,d,f,p,m,h;o<0?(l=new ln(-a/2,Math.sqrt(-o)).nthRoot(3),u=new ln(-a/2,-Math.sqrt(-o)).nthRoot(3)):(l=-a/2+Math.sqrt(o),l=new ln(un(l)*Math.abs(l)**(1/3)),u=-a/2-Math.sqrt(o),u=new ln(un(u)*Math.abs(u)**(1/3))),d=l.add(u),m=l.add(u).multiplyConstant(-1/2),h=l.add(u.negate()).multiplyConstant(Math.sqrt(3)/2),f=m.add(s.multiply(h)),p=m.add(s.negate().multiply(h));let g=[];return d.isReal()&&g.push(N(d.real+c,10)),f.isReal()&&g.push(N(f.real+c,10)),p.isReal()&&g.push(N(p.real+c,10)),g}function pn(e,t,n,r,i){let a=cn(e,r),o=fn(a[0],a[1],a[2],a[3]-t[r]),s;for(let r=0;r<o.length;r++)if(0<=o[r]&&o[r]<=1&&(s=sn(o[r],n,e),Math.abs(s-t[n])<=i))return!0}function mn(e,t,n){let r=cn(e,`x`),i=fn(r[0],r[1],r[2],r[3]-t.x),a,o,s=0;for(let r=0;r<i.length;r++)a=sn(i[r],`y`,e),o=Kt(a,t.y)||a>t.y,o&&((i[r]===0||i[r]===1)&&n.bottomRight().x>t.x||0<i[r]&&i[r]<1)&&s++;return s}function hn(e,t,n){let r;if(e.x!==t.x){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y),c=i<=n.x&&n.x<a;r=o===s?n.y<=o&&c:c&&(s-o)*((e.x-t.x)*(e.y-t.y)>0?n.x-i:a-n.x)/(a-i)+o-n.y>=0}return+!!r}function gn(e){let t=`_`+e;return function(e){return e===void 0?this[t]:(this._observerField(t,I.create(e)),this.geometryChange(),this)}}function _n(e,t){for(let n=0;n<t.length;n++)e[t[n]]=gn(t[n])}let vn=(e,t)=>{let n=class extends e{};return _n(n.prototype,t),n},yn=[`anchor`,`controlIn`,`controlOut`];var bn=class extends vn(A,yn){constructor(e,t,n){super(),this.anchor(e||new I),this.controlIn(t),this.controlOut(n)}bboxTo(e,t){let n=this.anchor().transformCopy(t),r=e.anchor().transformCopy(t),i;return i=this.controlOut()&&e.controlIn()?this._curveBoundingBox(n,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),r):this._lineBoundingBox(n,r),i}_lineBoundingBox(e,t){return L.fromPoints(e,t)}_curveBoundingBox(e,t,n,r){let i=[e,t,n,r],a=this._curveExtremesFor(i,`x`),o=this._curveExtremesFor(i,`y`),s=xn([a.min,a.max,e.x,r.x]),c=xn([o.min,o.max,e.y,r.y]);return L.fromPoints(new I(s.min,c.min),new I(s.max,c.max))}_curveExtremesFor(e,t){let n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:sn(n.min,t,e),max:sn(n.max,t,e)}}_curveExtremes(e,t,n,r){let i=e-3*t+3*n-r,a=-2*(e-2*t+n),o=e-t,s=Math.sqrt(a*a-4*i*o),c=0,l=1;i===0?a!==0&&(c=l=-o/a):isNaN(s)||(c=(-a+s)/(2*i),l=(-a-s)/(2*i));let u=Math.max(Math.min(c,l),0);(u<0||u>1)&&(u=0);let d=Math.min(Math.max(c,l),1);return(d>1||d<0)&&(d=1),{min:u,max:d}}_intersectionsTo(e,t){let n;return n=this.controlOut()&&e.controlIn()?mn([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):hn(this.anchor(),e.anchor(),t),n}_isOnCurveTo(e,t,n,r){if(this.bboxTo(e).expand(n,n).containsPoint(t)){let i=this.anchor(),a=this.controlOut(),o=e.controlIn(),s=e.anchor();if(r===`start`&&i.distanceTo(t)<=n)return!on(i,a,t);if(r===`end`&&s.distanceTo(t)<=n)return!on(s,o,t);let c=[i,a,o,s];if(pn(c,t,`x`,`y`,n)||pn(c,t,`y`,`x`,n))return!0;let l=R().rotate(45,t),u=[i.transformCopy(l),a.transformCopy(l),o.transformCopy(l),s.transformCopy(l)];return pn(u,t,`x`,`y`,n)||pn(u,t,`y`,`x`,n)}}_isOnLineTo(e,t,n){let r=this.anchor(),i=e.anchor(),a=Te(Math.atan2(i.y-r.y,i.x-r.x));return new L([r.x,r.y-n/2],[r.distanceTo(i),n]).containsPoint(t.transformCopy(R().rotate(-a,r)))}_isOnPathTo(e,t,n,r){let i;return i=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,r):this._isOnLineTo(e,t,n),i}};function xn(e){let t=e.length,n=Ce,r=we;for(let i=0;i<t;i++)r=Math.max(r,e[i]),n=Math.min(n,e[i]);return{min:n,max:r}}let Sn=.333;function Cn(e,t){let n=e.slice(0),r=[],i=n.length;if(i>2&&(wn(0,n),i=n.length),i<2||i===2&&n[0].equals(n[1]))return r;let a=n[0],o=n[1],s=n[2];for(r.push(new bn(a));a.equals(n[i-1]);)t=!0,n.pop(),i--;if(i===2){let e=An(a,o,`x`,`y`);return M(r).controlOut(Mn(e,a,o,`x`,`y`)),r.push(new bn(o,Nn(e,a,o,`x`,`y`))),r}let c,l;if(t){a=n[i-1],o=n[0],s=n[1];let e=On(a,o,s);c=e[1],l=e[0]}else c=Mn(An(a,o,`x`,`y`),a,o,`x`,`y`);let u=c;for(let e=0;e<=i-3;e++)if(wn(e,n),i=n.length,e+3<=i){a=n[e],o=n[e+1],s=n[e+2];let t=On(a,o,s);M(r).controlOut(u),u=t[1];let i=t[0];r.push(new bn(o,i))}if(t){a=n[i-2],o=n[i-1],s=n[0];let e=On(a,o,s);M(r).controlOut(u),r.push(new bn(o,e[0])),M(r).controlOut(e[1]),r.push(new bn(s,l))}else{let e=An(o,s,`x`,`y`);M(r).controlOut(u),r.push(new bn(s,Nn(e,o,s,`x`,`y`)))}return r}function wn(e,t){for(;t[e+1]&&(t[e].equals(t[e+1])||t[e+1].equals(t[e+2]));)t.splice(e+1,1)}function Tn(e,t,n){let r=!1;if(e.x===t.x)r=!0;else if(t.x===n.x)(t.y<n.y&&e.y<=t.y||n.y<t.y&&t.y<=e.y)&&(r=!0);else{let i=Fn(Dn(e,t),n.x);!(e.y<=t.y&&n.y<=i)&&!(t.y<=e.y&&n.y>=i)&&(r=!0)}return r}function En(e,t,n){let r=Fn(Dn(e,t),n.x);return e.x===t.x&&t.x===n.x||N(r,1)===N(n.y,1)}function Dn(e,t){let n=(t.y-e.y)/(t.x-e.x);return[e.y-n*e.x,n]}function On(e,t,n){let r=`x`,i=`y`,a=!1,o=!1,s;if(En(e,t,n))s=An(e,t,`x`,`y`);else{let c={x:jn(e,t,n,`x`),y:jn(e,t,n,`y`)};if(c.x&&c.y)s=An(e,n,`x`,`y`),a=!0;else if(Tn(e,t,n)&&(r=`y`,i=`x`),c[r])s=0;else{let a;a=n[i]<e[i]&&e[i]<=t[i]||e[i]<n[i]&&t[i]<=e[i]?In((n[i]-e[i])*(t[r]-e[r])):-In((n[r]-e[r])*(t[i]-e[i])),s=.01*a,o=!0}}let c=Nn(s,e,t,r,i);if(o){let e=r;r=i,i=e}let l=Mn(s,t,n,r,i);return a&&(kn(e,t,c,s),kn(t,n,l,s)),[c,l]}function kn(e,t,n,r){e.y<t.y?t.y<n.y?(n.x=e.x+(t.y-e.y)/r,n.y=t.y):n.y<e.y&&(n.x=t.x-(t.y-e.y)/r,n.y=e.y):n.y<t.y?(n.x=e.x-(e.y-t.y)/r,n.y=t.y):e.y<n.y&&(n.x=t.x+(e.y-t.y)/r,n.y=e.y)}function An(e,t,n,r){let i=t[n]-e[n],a=t[r]-e[r],o;return o=i===0?0:a/i,o}function jn(e,t,n,r){return n[r]>t[r]&&t[r]>e[r]||n[r]<t[r]&&t[r]<e[r]}function Mn(e,t,n,r,i){let a=t[r],o=(n[r]-a)*Sn;return Pn(a+o,t[i]+o*e,r,i)}function Nn(e,t,n,r,i){let a=t[r],o=n[r],s=(o-a)*Sn;return Pn(o-s,n[i]-s*e,r,i)}function Pn(e,t,n,r){let i=new I;return i[n]=e,i[r]=t,i}function Fn(e,t){let n=e.length,r=0;for(let i=0;i<n;i++)r+=t**+i*e[i];return r}function In(e){return e<=0?-1:1}let Ln={l:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=2){let a=new I(n[i],n[i+1]);t.isRelative&&a.translateWith(r),e.lineTo(a.x,a.y),r.x=a.x,r.y=a.y}},c:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=6){let a=new I(n[i],n[i+1]),o=new I(n[i+2],n[i+3]),s=new I(n[i+4],n[i+5]);t.isRelative&&(o.translateWith(r),a.translateWith(r),s.translateWith(r)),e.curveTo(a,o,s),r.x=s.x,r.y=s.y}},v:function(e,t){let n=t.isRelative?0:t.position.x;Rn(t.parameters,!0,n),this.l(e,t)},h:function(e,t){let n=t.isRelative?0:t.position.y;Rn(t.parameters,!1,n),this.l(e,t)},a:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=7){let a=n[i],o=n[i+1],s=n[i+2],c=n[i+3],l=n[i+4],u=new I(n[i+5],n[i+6]);t.isRelative&&u.translateWith(r),(r.x!==u.x||r.y!==u.y)&&(e.arcTo(u,a,o,c,l,s),r.x=u.x,r.y=u.y)}},s:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`s`||i===`c`)&&(a=M(M(e.paths).segments).controlIn());for(let i=0;i<n.length;i+=4){let o=new I(n[i],n[i+1]),s=new I(n[i+2],n[i+3]),c;t.isRelative&&(o.translateWith(r),s.translateWith(r)),c=a?zn(a,r):r.clone(),a=o,e.curveTo(c,o,s),r.x=s.x,r.y=s.y}},q:function(e,t){let{parameters:n,position:r}=t;for(let i=0;i<n.length;i+=4){let a=new I(n[i],n[i+1]),o=new I(n[i+2],n[i+3]);t.isRelative&&(a.translateWith(r),o.translateWith(r));let s=Vn(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}},t:function(e,t){let{parameters:n,position:r,previousCommand:i}=t,a;(i===`q`||i===`t`)&&(a=M(M(e.paths).segments).controlIn().clone().translateWith(r.scaleCopy(-1/3)).scale(3/2));for(let i=0;i<n.length;i+=2){let o=new I(n[i],n[i+1]);t.isRelative&&o.translateWith(r),a=a?zn(a,r):r.clone();let s=Vn(r,a,o);e.curveTo(s.controlOut,s.controlIn,o),r.x=o.x,r.y=o.y}}};function Rn(e,t,n){let r=+!t;for(let t=0;t<e.length;t+=2)e.splice(t+r,0,n)}function zn(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}let Bn=1/3;function Vn(e,t,n){let r=t.clone().scale(2/3);return{controlOut:r.clone().translateWith(e.scaleCopy(Bn)),controlIn:r.translateWith(n.scaleCopy(Bn))}}let Hn=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,Un=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g;function Wn(e){let t=[];return e.replace(Un,function(e,n){t.push(parseFloat(n))}),t}function Gn(e,t){let n=new I,r;return t.replace(Hn,(t,i,a,o)=>{let s=i.toLowerCase(),c=s===i,l=Wn(a.trim());if(s===`m`&&(c?(n.x+=l[0],n.y+=l[1]):(n.x=l[0],n.y=l[1]),e.moveTo(n.x,n.y),l.length>2&&(s=`l`,l.splice(0,2))),Ln[s])Ln[s](e,{parameters:l,position:n,isRelative:c,previousCommand:r}),o&&o.toLowerCase()===`z`&&e.close();else if(s!==`m`)throw Error(`Error while parsing SVG path. Unsupported command: `+s);r=s}),e}function Kn(e,t,n){let r;for(let i=0;i<e.length;i++){let a=e[i];if(a.visible()){let e=t?a.bbox(n):a.rawBBox();e&&(r=r?L.union(r,e):e)}}return r}function qn(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r];if(i.visible()){let e=i.clippedBBox(t);e&&(n=n?L.union(n,e):e)}}return n}let Jn=e=>(...t)=>t.map(t=>t.toString(e)).join(` `),Yn=(e,t)=>e.controlOut()&&t.controlIn()?`C`:`L`;var z=class e extends zt(Vt(Ft)){get nodeType(){return`Path`}constructor(e){super(e),this.segments=new an,this.segments.addObserver(this),this.options.stroke===void 0&&(this.stroke(`#000`),this.options.stroke.lineJoin===void 0&&this.options.set(`stroke.lineJoin`,`miter`))}moveTo(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this}lineTo(e,t){let n=new bn(t===void 0?e:new I(e,t));return this.segments.push(n),this}curveTo(e,t,n){if(this.segments.length>0){let r=M(this.segments),i=new bn(n,t);this.suspend(),r.controlOut(e),this.resume(),this.segments.push(i)}return this}arc(e,t,n,r,i){if(this.segments.length>0){let a=M(this.segments).anchor(),o=Le(e),s=new Zt(new I(a.x-n*Math.cos(o),a.y-r*Math.sin(o)),{startAngle:e,endAngle:t,radiusX:n,radiusY:r,anticlockwise:i});this._addArcSegments(s)}return this}arcTo(e,t,n,r,i,a){if(this.segments.length>0){let o=M(this.segments).anchor(),s=Zt.fromPoints(o,I.create(e),t,n,r,i,a);this._addArcSegments(s)}return this}_addArcSegments(e){this.suspend();let t=e.curvePoints();for(let e=1;e<t.length;e+=3)this.curveTo(t[e],t[e+1],t[e+2]);this.resume(),this.geometryChange()}close(){return this.options.closed=!0,this.geometryChange(),this}rawBBox(){return this._bbox()}toString(e){let t=``,n=this.segments,r=n.length;if(r>0){let i=[],a=Jn(e),o;for(let e=1;e<r;e++){let t=Yn(n[e-1],n[e]);t!==o&&(o=t,i.push(t)),t===`L`?i.push(a(n[e].anchor())):i.push(a(n[e-1].controlOut(),n[e].controlIn(),n[e].anchor()))}t=`M`+a(n[0].anchor())+` `+i.join(` `),this.options.closed&&(t+=`Z`)}return t}_containsPoint(e){let t=this.segments,n=t.length,r=0,i,a;for(let o=1;o<n;o++)i=t[o-1],a=t[o],r+=i._intersectionsTo(a,e);return(this.options.closed||!t[0].anchor().equals(t[n-1].anchor()))&&(r+=hn(t[0].anchor(),t[n-1].anchor(),e)),r%2!=0}_isOnPath(e,t){let n=this.segments,r=n.length,i=t||this.options.stroke.width;if(r>1){if(n[0]._isOnPathTo(n[1],e,i,`start`))return!0;for(let t=2;t<=r-2;t++)if(n[t-1]._isOnPathTo(n[t],e,i))return!0;if(n[r-2]._isOnPathTo(n[r-1],e,i,`end`))return!0}return!1}_bbox(e){let t=this.segments,n=t.length,r;if(n===1)r=new L(t[0].anchor().transformCopy(e),jt.ZERO);else if(n>0)for(let i=1;i<n;i++){let n=t[i-1].bboxTo(t[i],e);r=r?L.union(r,n):n}return r}static parse(e,t){return Xn.parse(e,t)}static fromRect(t,n){let r=new e(n),[i,a]=t.cornerRadius;if(i===0&&a===0)r.moveTo(t.topLeft()).lineTo(t.topRight()).lineTo(t.bottomRight()).lineTo(t.bottomLeft()).close();else{let{x:e,y:n}=t.origin,o=t.width(),s=t.height();i=Pe(i,0,o/2),a=Pe(a,0,s/2),r.moveTo(e+i,n).lineTo(e+o-i,n).arcTo([e+o,n+a],i,a,!1).lineTo(e+o,n+s-a).arcTo([e+o-i,n+s],i,a,!1).lineTo(e+i,n+s).arcTo([e,n+s-a],i,a,!1).lineTo(e,n+a).arcTo([e+i,n],i,a,!1)}return r}static fromPoints(t,n){if(t){let r=new e(n);for(let e=0;e<t.length;e++){let n=I.create(t[e]);n&&(e===0?r.moveTo(n):r.lineTo(n))}return r}}static curveFromPoints(t,n){if(t){let r=Cn(t),i=new e(n);return i.segments.push.apply(i.segments,r),i}}static fromArc(t,n){let r=new e(n),i=t.startAngle,a=t.pointAt(i);return r.moveTo(a.x,a.y),r.arc(i,t.endAngle,t.radiusX,t.radiusY,t.anticlockwise),r}},Xn=class e extends zt(Vt(Ft)){static parse(t,n){return Gn(new e(n),t)}toString(e){let t=this.paths,n=``;if(t.length>0){let r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(e));n=r.join(` `)}return n}get nodeType(){return`MultiPath`}constructor(e){super(e),this.paths=new an,this.paths.addObserver(this),this.options.stroke===void 0&&this.stroke(`#000`)}moveTo(e,t){let n=new z;return n.moveTo(e,t),this.paths.push(n),this}lineTo(e,t){return this.paths.length>0&&M(this.paths).lineTo(e,t),this}curveTo(e,t,n){return this.paths.length>0&&M(this.paths).curveTo(e,t,n),this}arc(e,t,n,r,i){return this.paths.length>0&&M(this.paths).arc(e,t,n,r,i),this}arcTo(e,t,n,r,i,a){return this.paths.length>0&&M(this.paths).arcTo(e,t,n,r,i,a),this}close(){return this.paths.length>0&&M(this.paths).close(),this}_bbox(e){return Kn(this.paths,!0,e)}rawBBox(){return Kn(this.paths,!1)}_containsPoint(e){let t=this.paths;for(let n=0;n<t.length;n++)if(t[n]._containsPoint(e))return!0;return!1}_isOnPath(e){let t=this.paths,n=this.options.stroke.width;for(let r=0;r<t.length;r++)if(t[r]._isOnPath(e,n))return!0;return!1}_clippedBBox(e){return qn(this.paths,this.currentTransform(e))}};Wt(Ft);var Zn=class extends zt(vn(Ft,[`position`])){get nodeType(){return`Text`}constructor(e,t=new I,n={}){super(n),this.content(e),this.position(t),this.options.font||(this.options.font=`12px sans-serif`),this.options.fill===void 0&&this.fill(`#000`)}content(e){return e===void 0?this.options.get(`content`):(this.options.set(`content`,e),this)}measure(){return at(this.content(),{font:this.options.get(`font`)})}rect(){let e=this.measure();return new L(this.position().clone(),[e.width,e.height])}bbox(e){let t=At(this.currentTransform(e));return this.rect().bbox(t)}rawBBox(){return this.rect().bbox()}_containsPoint(e){return this.rect().containsPoint(e)}},Qn=class extends Wt(Ft,[`rect`]){get nodeType(){return`Image`}constructor(e,t=new L,n={}){super(n),this.src(e),this.rect(t)}src(e){return e===void 0?this.options.get(`src`):(this.options.set(`src`,e),this)}bbox(e){let t=At(this.currentTransform(e));return this._rect.bbox(t)}rawBBox(){return this._rect.bbox()}_containsPoint(e){return this._rect.containsPoint(e)}_hasFill(){return this.src()}};let $n=(e,t)=>class extends e{traverse(e){let n=this[t];for(let t=0;t<n.length;t++){let r=n[t];r.traverse?r.traverse(e):e(r)}return this}};var B=class extends $n(Ft,`children`){get nodeType(){return`Group`}constructor(e){super(e),this.children=[]}childrenChange(e,t,n){this.trigger(`childrenChange`,{action:e,items:t,index:n})}append(){return ge(this.children,arguments),this._reparent(arguments,this),this.childrenChange(`add`,arguments),this}insert(e,t){return this.children.splice(e,0,t),t.parent=this,this.childrenChange(`add`,[t],e),this}insertAt(e,t){return this.insert(t,e)}remove(e){let t=this.children.indexOf(e);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange(`remove`,[e],t)),this}removeAt(e){if(0<=e&&e<this.children.length){let t=this.children[e];this.children.splice(e,1),t.parent=null,this.childrenChange(`remove`,[t],e)}return this}clear(){let e=this.children;return this.children=[],this._reparent(e,null),this.childrenChange(`remove`,e,0),this}bbox(e){return Kn(this.children,!0,this.currentTransform(e))}rawBBox(){return Kn(this.children,!1)}_clippedBBox(e){return qn(this.children,this.currentTransform(e))}currentTransform(e){return Ft.prototype.currentTransform.call(this,e)||null}containsPoint(e,t){if(this.visible()){let n=this.children,r=this.currentTransform(t);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e,r))return!0}return!1}_reparent(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.parent;i&&i!==this&&i.remove&&i.remove(r),r.parent=t}}};function er(e,t,n){let r=n.transform()||R(),i=r.matrix();i.e+=e.x-t.origin.x,i.f+=e.y-t.origin.y,r.matrix(i),n.transform(r)}function tr(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]:n===`end`?t.origin[r]+t.size[i]-e:t.origin[r]+(t.size[i]-e)/2,a}function nr(e,t,n,r,i){let a;return a=n===`start`?t.origin[r]+t.size[i]-e:n===`end`?t.origin[r]:t.origin[r]+(t.size[i]-e)/2,a}let rr={alignContent:`start`,justifyContent:`start`,alignItems:`start`,spacing:0,orientation:`horizontal`,lineSpacing:0,wrap:!0,revers:!1},ir=(e,t)=>{e.forEach(t)},ar=(e,t)=>{let n=e.length;for(let r=n-1;r>=0;r--)t(e[r],r)};(class extends B{constructor(e,t){super(Object.assign({},rr,t)),this._rect=e,this._fieldMap={}}rect(e){return e?(this._rect=e,this):this._rect}appendBreak(){let e=new B;return e._isBreakMarker=!0,this.append(e),this}_initMap(){let e=this.options,t=this._fieldMap;e.orientation===`horizontal`?(t.sizeField=`width`,t.groupsSizeField=`height`,t.groupAxis=`x`,t.groupsAxis=`y`):(t.sizeField=`height`,t.groupsSizeField=`width`,t.groupAxis=`y`,t.groupsAxis=`x`),e.reverse?(this.forEach=ar,this.justifyAlign=nr):(this.forEach=ir,this.justifyAlign=tr)}reflow(){if(!this._rect||this.children.length===0)return;this._initMap(),this.options.transform&&this.transform(null);let e=this.options,t=this._rect,{groups:n,groupsSize:r}=this._initGroups(),{sizeField:i,groupsSizeField:a,groupAxis:o,groupsAxis:s}=this._fieldMap,c=new I,l=new I,u=new jt,d=tr(r,t,e.alignContent,s,a),f,p,m,h=(t,n)=>{let r=p.elements[n];l[o]=f,l[s]=tr(t.size[a],m,e.alignItems,s,a),er(l,t,r),f+=t.size[i]+e.spacing};for(let r=0;r<n.length;r++)p=n[r],c[o]=f=this.justifyAlign(p.size,t,e.justifyContent,o,i),c[s]=d,u[i]=p.size,u[a]=p.lineSize,m=new L(c,u),this.forEach(p.bboxes,h),d+=p.lineSize+e.lineSpacing;if(!e.wrap&&p.size>t.size[i]){let n=t.size[i]/m.size[i],r=m.topLeft().scale(n,n),c=tr(m.size[a]*n,t,e.alignContent,s,a),l=R();o===`x`?l.translate(t.origin.x-r.x,c-r.y):l.translate(c-r.x,t.origin.y-r.y),l.scale(n,n),this.transform(l)}}_initGroups(){let{options:e,children:t}=this,{lineSpacing:n,wrap:r,spacing:i}=e,a=this._fieldMap.sizeField,o=this._newGroup(),s=[],c=function(){s.push(o),l+=o.lineSize+n},l=-n;for(let e=0;e<t.length;e++){let n=t[e],s=t[e].clippedBBox();if(n._isBreakMarker){o.bboxes.length>0&&(c(),o=this._newGroup());continue}n.visible()&&s&&(r&&o.size+s.size[a]+i>this._rect.size[a]?o.bboxes.length===0?(this._addToGroup(o,s,n),c(),o=this._newGroup()):(c(),o=this._newGroup(),this._addToGroup(o,s,n)):this._addToGroup(o,s,n))}return o.bboxes.length&&c(),{groups:s,groupsSize:l}}_addToGroup(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)}_newGroup(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}});var or=class extends zt(Vt(Wt(Ft))){get nodeType(){return`Rect`}constructor(e=new L,t={}){super(t),this.geometry(e),this.options.stroke===void 0&&this.stroke(`#000`)}_bbox(e){return this._geometry.bbox(e)}rawBBox(){return this._geometry.bbox()}_containsPoint(e){return this._geometry.containsPoint(e)}_isOnPath(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}},sr=class extends rn{_change(){this.optionsChange({field:`stops`})}};function cr(e){return function(t){return t===void 0?this.options.get(e):(this.options.set(e,t),this)}}function lr(e,t){for(let n=0;n<t.length;n++)e[t[n]]=cr(t[n])}let ur=(e,t)=>{let n=class extends e{};return lr(n.prototype,t),n},dr=[`offset`,`color`,`opacity`];var fr=class e extends ur(A,dr){constructor(e,t,n){super(),this.options=new de({offset:e,color:t,opacity:n===void 0?1:n}),this.options.addObserver(this)}static create(t){if(t!==void 0){let n;return n=t instanceof e?t:t.length>1?new e(t[0],t[1],t[2]):new e(t.offset,t.color,t.opacity),n}}},pr=class extends A{get nodeType(){return`Gradient`}constructor(e={}){super(),this.stops=new sr(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=xe()}userSpace(e){return e===void 0?this._userSpace:(this._userSpace=e,this.optionsChange(),this)}_createStops(e=[]){let t=[];for(let n=0;n<e.length;n++)t.push(fr.create(e[n]));return t}addStop(e,t,n){this.stops.push(new fr(e,t,n))}removeStop(e){let t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}optionsChange(e){this.trigger(`optionsChange`,{field:`gradient`+(e?`.`+e.field:``),value:this})}geometryChange(){this.optionsChange()}};let mr=[`start`,`end`];var hr=class extends vn(pr,mr){constructor(e={}){super(e),this.start(e.start||new I),this.end(e.end||new I(1,0))}},gr=class extends vn(pr,[`center`]){constructor(e={}){super(e),this.center(e.center||new I),this._radius=e.radius===void 0?1:e.radius,this._fallbackFill=e.fallbackFill}radius(e){return e===void 0?this._radius:(this._radius=e,this.geometryChange(),this)}fallbackFill(e){return e===void 0?this._fallbackFill:(this._fallbackFill=e,this.optionsChange(),this)}},_r=class extends B{get nodeType(){return`Pattern`}constructor(e){super();let{width:t,height:n}=e;this._size=jt.create([t,n]),this.id=xe()}size(e){return e?(this._size=jt.create(e),this):this._size}},vr=r({easeInOutBack:()=>jr,easeInOutCubic:()=>Cr,easeInOutExpo:()=>kr,easeInOutQuad:()=>Tr,easeInOutQuint:()=>Nr,easeInOutSine:()=>Dr,easeOutBack:()=>Ar,easeOutCirc:()=>Er,easeOutCubic:()=>Sr,easeOutElastic:()=>xr,easeOutExpo:()=>Or,easeOutQuad:()=>wr,easeOutQuint:()=>Mr,linear:()=>br,swing:()=>yr});function yr(e){return .5-Math.cos(e*Math.PI)/2}function br(e){return e}function xr(e){return e===0||e===1?e:2**(-10*e)*Math.sin((e-.125)*(1.1*Math.PI)/.5)+1}function Sr(e){return 1-(1-e)**3}function Cr(e){return e<.5?4*e*e*e:1-(-2*e+2)**3/2}function wr(e){return 1-(1-e)**2}function Tr(e){return e<.5?2*e*e:1-(-2*e+2)**2/2}function Er(e){return Math.sqrt(1-(e-1)**2)}function Dr(e){return-(Math.cos(Math.PI*e)-1)/2}function Or(e){return e===1?1:1-2**(-10*e)}function kr(e){return e===0||e===1?e:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}function Ar(e){return 1+2.70158*(e-1)**3+1.70158*(e-1)**2}function jr(e){let t=1.70158*1.525;return e<.5?(2*e)**2*(3.5949095*2*e-t)/2:((2*e-2)**2*(3.5949095*(e*2-2)+t)+2)/2}function Mr(e){return 1-(1-e)**5}function Nr(e){return e<.5?16*e**5:1-(-2*e+2)**5/2}let Pr;var Fr=class e extends i{static get current(){return Pr||=new e,Pr}constructor(){super(),this._items=[]}register(e,t){this._items.push({name:e,type:t})}create(e,t){let n=this._items,r;if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name.toLowerCase()===e){r=n[t];break}}if(r)return new r.type(e,t)}};function Ir(e){return Math.min(1,Math.max(0,e))}function Lr(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;function u(e){return((o*e+a)*e+i)*e}function d(e){return((l*e+c)*e+s)*e}function f(e){return(3*o*e+2*a)*e+i}function p(e){let t=e;for(let n=0;n<8;n++){let n=u(t)-e,r=f(t);if(Math.abs(n)<1e-7)return t;if(Math.abs(r)<1e-7)break;t-=n/r}let n=0,r=1;t=e;for(let t=0;t<24;t++){let t=(n+r)/2,i=u(t);if(Math.abs(i-e)<1e-7)return t;i<e?n=t:r=t}return(n+r)/2}return e=>{let t=Ir(e);return t===0||t===1?t:d(p(t))}}let Rr={duration:500,easing:`swing`};(class extends i{static create(e,t,n){return Fr.current.create(e,t,n)}get options(){return this._options||Rr}set options(e){this._options=e}constructor(e,t){super(),this.options=Object.assign({},this.options,t),this.element=e}setup(){}step(){}play(){let e=this.options;typeof e.easing==`string`&&vr[e.easing]?e.easing=vr[e.easing]:Array.isArray(e.easing)&&e.easing.length===4?e.easing=Lr(...e.easing):e.easing=vr[Rr.easing];let{duration:t,delay:n=0,easing:r}=e,i=S()+n,a=i+t;t===0?(this.step(1),this.abort()):setTimeout(()=>{let e=()=>{if(this._stopped)return;let n=S(),o=Pe(n-i,0,t),s=r(o/t);this.step(s),n<a?d(e):this.abort()};e()},n)}abort(){this._stopped=!0}destroy(){this.abort()}});let zr;(class e extends i{static get current(){return zr||=new e,zr}parse(e,t){return Gn(new Xn(t),e)}});var Br=class extends i{constructor(e){super(),this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())}destroy(){this.srcElement&&this.srcElement.removeObserver(this);let e=this.childNodes;for(let t=0;t<e.length;t++)this.childNodes[t].destroy();this.parent=null}load(){}observe(){this.srcElement&&this.srcElement.addObserver(this)}append(e){this.childNodes.push(e),e.parent=this}insertAt(e,t){this.childNodes.splice(t,0,e),e.parent=this}remove(e,t){let n=e+t;for(let t=e;t<n;t++)this.childNodes[t].removeSelf();this.childNodes.splice(e,t)}removeSelf(){this.clear(),this.destroy()}clear(){this.remove(0,this.childNodes.length)}invalidate(){this.parent&&this.parent.invalidate()}geometryChange(){this.invalidate()}optionsChange(){this.invalidate()}childrenChange(e){e.action===`add`?this.load(e.items,e.index):e.action===`remove`&&this.remove(e.index,e.items.length),this.invalidate()}};let Vr=[`click`,`mouseenter`,`mouseleave`,`mousemove`,`resize`];var Hr=class extends a{constructor(e,t){super(),this.options=Object.assign({},t),this.element=e,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler(`click`),this._mouseenter=this._handler(`mouseenter`),this._mouseleave=this._handler(`mouseleave`),this._mousemove=this._handler(`mousemove`),this._visual=new B,We(e,this.options),this.bind(Vr,this.options),this._enableTracking()}draw(e){this._visual.children.push(e)}clear(){this._visual.children=[]}destroy(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()}eventTarget(e){let t=Me(e),n;for(;!n&&t&&(n=t._kendoNode,t!==this.element);)t=t.parentElement;if(n)return n.srcElement}exportVisual(){return this._visual}getSize(){return We(this.element)}currentSize(e){if(e)this._size=e;else return this._size}setSize(e){We(this.element,e),this.currentSize(e),this._resize()}resize(e){let t=this.getSize(),n=this.currentSize();(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger(`resize`,t))}size(e){if(!e)return this.getSize();this.setSize(e)}suspendTracking(){this._suspendedTracking=!0}resumeTracking(){this._suspendedTracking=!1}_enableTracking(){}_resize(){}_handler(e){return t=>{let n=this.eventTarget(t);n&&!this._suspendedTracking&&this.trigger(e,{element:n,originalEvent:t,type:e})}}_elementOffset(){let e=this.element,t=Ke(e),{left:n,top:r}=Ve(e);return{left:n+t.left,top:r+t.top}}_surfacePoint(e){let t=this._elementOffset(),n=je(e),r=n.x-t.left,i=n.y-t.top,a=Xe(this.element).invert();return new I(r,i).transform(a)}};function V(e,t){return t==null?``:` ${e}="${t}" `}function Ur(e){let t=``;for(let n=0;n<e.length;n++)t+=V(e[n][0],e[n][1]);return t}function Wr(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n][1];r!==void 0&&(t+=e[n][0]+`:`+r+`;`)}if(t!==``)return t}let Gr={},Kr=`none`,qr=(e,t)=>{kt(e,t)},Jr=(e,t)=>{let n=new DOMParser().parseFromString(Et(t),`text/xml`);Dt(n);let r=document.adoptNode(n.documentElement);e.insertBefore(r,e.firstChild)},Yr,Xr=(e,t)=>{if(Yr)return Yr(e,t);if(Yr=qr,typeof document<`u`){let e=document.createElement(`div`),t=typeof DOMParser<`u`;e.innerHTML=`<svg xmlns='http://www.w3.org/2000/svg'></svg>`,t&&e.firstChild.namespaceURI!==`http://www.w3.org/2000/svg`&&(Yr=Jr)}return Yr(e,t)},Zr=`transform`,Qr={clip:`clip-path`,fill:`fill`};function $r(e,t){return e===`clip`||e===`fill`&&(!t||t.nodeType===`Gradient`||t.nodeType===`Pattern`)}var ei=class extends Br{constructor(e,t){super(e),this.definitions={},this.options=t}destroy(){this.element&&=(this.element._kendoNode=null,null),this.clearDefinitions(),super.destroy()}load(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r.children,a=new Gr[r.nodeType](r,this.options);t===void 0?this.append(a):this.insertAt(a,t),a.createDefinitions(),i&&i.length>0&&a.load(i);let o=this.element;o&&a.attachTo(o,t)}}root(){let e=this;for(;e.parent;)e=e.parent;return e}attachTo(e,t){let n=document.createElement(`div`);Xr(n,`<svg xmlns='http://www.w3.org/2000/svg' version='1.1'>`+this.render()+`</svg>`);let r=n.firstChild.firstChild;r&&(t===void 0?e.appendChild(r):e.insertBefore(r,e.childNodes[t]||null),this.setElement(r))}setElement(e){this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this;let t=this.childNodes;for(let n=0;n<t.length;n++){let r=e.childNodes[n];t[n].setElement(r)}}clear(){this.clearDefinitions(),this.element&&(this.element.innerHTML=``);let e=this.childNodes;for(let t=0;t<e.length;t++)e[t].destroy();this.childNodes=[]}removeSelf(){if(this.element){let e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}super.removeSelf()}template(){return this.renderChildren()}render(){return this.template()}renderChildren(){let e=this.childNodes,t=``;for(let n=0;n<e.length;n++)t+=e[n].render();return t}optionsChange(e){let{field:t,value:n}=e;t===`visible`?this.css(`display`,n?``:Kr):Qr[t]&&$r(t,n)?this.updateDefinition(t,n):t===`opacity`?this.attr(`opacity`,n):t===`cursor`?this.css(`cursor`,n):t===`id`&&(n?this.attr(`id`,n):this.removeAttr(`id`)),super.optionsChange(e)}accessibilityOptionsChange(e){let{field:t,value:n}=e;t===`role`?n?this.attr(`role`,n):this.removeAttr(`role`):t===`ariaLabel`?n?this.attr(`aria-label`,_(n)):this.removeAttr(`aria-label`):t===`ariaRoleDescription`?n?this.attr(`aria-roledescription`,_(n)):this.removeAttr(`aria-roledescription`):t===`ariaChecked`?n===void 0?this.removeAttr(`aria-checked`):this.attr(`aria-checked`,n):t===`className`&&this.className(n)}attr(e,t){this.element&&this.element.setAttribute(e,t)}allAttr(e){for(let t=0;t<e.length;t++)this.attr(e[t][0],e[t][1])}toggleAttr(e,t){t?this.attr(e,t):this.removeAttr(e)}css(e,t){this.element&&(this.element.style[e]=t)}allCss(e){for(let t=0;t<e.length;t++)this.css(e[t][0],e[t][1])}className(e){this.element&&(this.element.classList.remove(...this.element.classList),e&&e.split(` `).forEach(e=>{e&&this.element.classList.add(e)}))}removeAttr(e){this.element&&this.element.removeAttribute(e)}mapTransform(e){let t=[];return e&&t.push([Zr,`matrix(`+e.matrix().toString(6)+`)`]),t}renderTransform(){return Ur(this.mapTransform(this.srcElement.transform()))}transformChange(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(Zr)}mapStyle(){let e=this.srcElement.options,t=[[`cursor`,e.cursor]];return e.visible===!1&&t.push([`display`,Kr]),t}renderStyle(){return V(`style`,Wr(this.mapStyle(!0)))}renderOpacity(){return V(`opacity`,this.srcElement.options.opacity)}renderId(){return V(`id`,this.srcElement.options.id)}renderClassName(){return V(`class`,this.srcElement.options.className)}renderRole(){return V(`role`,this.srcElement.options.role)}renderAriaLabel(){let e=this.srcElement.options.ariaLabel;return e&&=_(e),V(`aria-label`,e)}renderAriaRoleDescription(){let e=this.srcElement.options.ariaRoleDescription;return e&&=_(e),V(`aria-roledescription`,e)}renderAriaChecked(){return V(`aria-checked`,this.srcElement.options.ariaChecked)}createDefinitions(){let e=this.srcElement,t=this.definitions;if(e){let n=e.options,r;for(let e in Qr){let i=n.get(e);i&&$r(e,i)&&(t[e]=i,r=!0)}r&&this.definitionChange({action:`add`,definitions:t})}}definitionChange(e){this.parent&&this.parent.definitionChange(e)}updateDefinition(e,t){let n=this.definitions,r=n[e],i=Qr[e],a={};r&&(a[e]=r,this.definitionChange({action:`remove`,definitions:a}),delete n[e]),t?(a[e]=t,this.definitionChange({action:`add`,definitions:a}),n[e]=t,this.attr(i,this.refUrl(t.id))):r&&this.removeAttr(i)}clearDefinitions(){let e=this.definitions;this.definitionChange({action:`remove`,definitions:e}),this.definitions={}}renderDefinitions(){return Ur(this.mapDefinitions())}mapDefinitions(){let e=this.definitions,t=[];for(let n in e){let r=e[n];t.push([Qr[n],this.refUrl(r.id)])}return t}refUrl(e){return`url(#${e})`}},ti=class extends ei{template(){return`<stop ${this.renderOffset()} ${this.renderStyle()} />`}renderOffset(){return V(`offset`,this.srcElement.offset())}mapStyle(){let e=this.srcElement;return[[`stop-color`,e.color()],[`stop-opacity`,e.opacity()]]}optionsChange(e){e.field===`offset`?this.attr(e.field,e.value):(e.field===`color`||e.field===`opacity`)&&this.css(`stop-`+e.field,e.value)}},ni=class extends ei{constructor(e){super(e),this.id=e.id,this.loadStops()}loadStops(){let e=this.srcElement.stops,t=this.element;for(let n=0;n<e.length;n++){let r=new ti(e[n]);this.append(r),t&&r.attachTo(t)}}optionsChange(e){e.field===`gradient.stops`?(Br.prototype.clear.call(this),this.loadStops()):e.field===`gradient`&&this.allAttr(this.mapCoordinates())}renderCoordinates(){return Ur(this.mapCoordinates())}mapSpace(){return[`gradientUnits`,this.srcElement.userSpace()?`userSpaceOnUse`:`objectBoundingBox`]}},ri=class extends ni{template(){return`<linearGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</linearGradient>`}mapCoordinates(){let e=this.srcElement,t=e.start(),n=e.end();return[[`x1`,t.x],[`y1`,t.y],[`x2`,n.x],[`y2`,n.y],this.mapSpace()]}},ii=class extends ni{template(){return`<radialGradient id='${this.id}' ${this.renderCoordinates()}>${this.renderChildren()}</radialGradient>`}mapCoordinates(){let e=this.srcElement,t=e.center(),n=e.radius();return[[`cx`,t.x],[`cy`,t.y],[`r`,n],this.mapSpace()]}},ai=class extends ei{constructor(e){super(e),this.id=e.id,this.load(e.children)}template(){let e=this.srcElement.size().getWidth(),t=this.srcElement.size().getHeight();return`<pattern id='${this.srcElement.id}' width='${e}' height='${t}' patternUnits='userSpaceOnUse'>${this.renderChildren()}</pattern>`}},oi=class extends ei{constructor(e){super(),this.srcElement=e,this.id=e.id,this.load([e])}renderClipRule(){return V(`clip-rule`,`evenodd`)}template(){return`<clipPath ${this.renderClipRule()} id='${this.id}'>${this.renderChildren()}</clipPath>`}},si=class extends ei{constructor(){super(),this.definitionMap={}}attachTo(e){this.element=e}template(){return`<defs>${this.renderChildren()}</defs>`}definitionChange(e){let{definitions:t,action:n}=e;n===`add`?this.addDefinitions(t):n===`remove`&&this.removeDefinitions(t)}createDefinition(e,t){let n;return e===`clip`?n=oi:e===`fill`&&(t instanceof hr?n=ri:t instanceof gr?n=ii:t.nodeType===`Pattern`&&(n=ai)),new n(t)}addDefinitions(e){for(let t in e)this.addDefinition(t,e[t])}addDefinition(e,t){let{element:n,definitionMap:r}=this,i=t.id,a=r[i];if(a)a.count++;else{let a=this.createDefinition(e,t);r[i]={element:a,count:1},this.append(a),n&&a.attachTo(this.element)}}removeDefinitions(e){for(let t in e)this.removeDefinition(e[t])}removeDefinition(e){let t=this.definitionMap,n=e.id,r=t[n];r&&(r.count--,r.count===0&&(this.remove(this.childNodes.indexOf(r.element),1),delete t[n]))}},ci=class extends ei{constructor(e){super(),this.options=e,this.defs=new si}attachTo(e){this.element=e,this.defs.attachTo(e.firstElementChild)}clear(){Br.prototype.clear.call(this)}template(){return this.defs.render()+this.renderChildren()}definitionChange(e){this.defs.definitionChange(e)}};let li={"fill.opacity":`fill-opacity`,"stroke.color":`stroke`,"stroke.width":`stroke-width`,"stroke.opacity":`stroke-opacity`};var ui=class extends ei{geometryChange(){this.attr(`d`,this.renderData()),this.invalidate()}optionsChange(e){switch(e.field){case`fill`:e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr(`fill`);break;case`fill.color`:this.allAttr(this.mapFill({color:e.value}));break;case`stroke`:e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr(`stroke`);break;case`transform`:this.transformChange(e.value);break;default:{let t=li[e.field];t&&this.attr(t,e.value);break}}this.accessibilityOptionsChange(e),super.optionsChange(e)}content(){this.element&&(this.element.textContent=this.srcElement.content())}renderData(){return this.srcElement.toString(3)||void 0}mapStroke(e){let t=[];return e&&!Ne(e.color)?(t.push([`stroke`,e.color]),t.push([`stroke-width`,e.width]),t.push([`stroke-linecap`,this.renderLinecap(e)]),t.push([`stroke-linejoin`,e.lineJoin]),e.opacity!==void 0&&t.push([`stroke-opacity`,e.opacity]),e.dashType!==void 0&&t.push([`stroke-dasharray`,this.renderDashType(e)])):t.push([`stroke`,Kr]),t}renderStroke(){return Ur(this.mapStroke(this.srcElement.options.stroke))}renderDashType(e){let{dashType:t,width:n=1}=e;if(t&&t!==`solid`){let e=Nt[t.toLowerCase()],r=[];for(let t=0;t<e.length;t++)r.push(e[t]*n);return r.join(` `)}}renderLinecap(e){let{dashType:t,lineCap:n}=e;return t&&t!==`solid`?Pt:n}mapFill(e){let t=[];return e&&(e.nodeType===`Gradient`||e.nodeType===`Pattern`)||(e&&!Ne(e.color)?(t.push([`fill`,e.color]),e.opacity!==void 0&&t.push([`fill-opacity`,e.opacity])):t.push([`fill`,Kr])),t}renderFill(){return Ur(this.mapFill(this.srcElement.options.fill))}template(){return`<path ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} ${V(`d`,this.renderData())}${this.renderStroke()}${this.renderFill()}${this.renderDefinitions()}${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></path>`}},di=class extends ui{renderData(){return this.srcElement.toPath().toString(3)}},fi=class extends ui{geometryChange(){let e=this.center();this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.attr(`r`,this.radius()),this.invalidate()}center(){return this.srcElement.geometry().center}radius(){return this.srcElement.geometry().radius}template(){return`<circle ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()}cx='${this.center().x}' cy='${this.center().y}' r='${this.radius()}'${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ${this.renderTransform()} ></circle>`}},pi=class extends ei{template(){return`<g${this.renderId()+this.renderTransform()+this.renderClassName()+this.renderStyle()+this.renderOpacity()+this.renderRole()+this.renderAriaLabel()+this.renderAriaRoleDescription()+this.renderAriaChecked()+this.renderDefinitions()}>${this.renderChildren()}</g>`}optionsChange(e){let{field:t,value:n}=e;t===`transform`&&this.transformChange(n),this.accessibilityOptionsChange(e),super.optionsChange(e)}},mi=class extends ui{geometryChange(){this.allAttr(this.mapPosition()),this.invalidate()}optionsChange(e){e.field===`src`&&this.allAttr(this.mapSource()),super.optionsChange(e)}mapPosition(){let e=this.srcElement.rect(),t=e.topLeft();return[[`x`,t.x],[`y`,t.y],[`width`,e.width()+`px`],[`height`,e.height()+`px`]]}renderPosition(){return Ur(this.mapPosition())}mapSource(e){let t=this.srcElement.src();return e&&(t=_(t)),[[`xlink:href`,t]]}renderSource(){return Ur(this.mapSource(!0))}template(){return`<image preserveAspectRatio='none' ${this.renderId()} ${this.renderStyle()} ${this.renderTransform()} ${this.renderOpacity()}${this.renderPosition()} ${this.renderSource()} ${this.renderDefinitions()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} ></image>`}},hi=class extends ui{renderData(){return this.srcElement.toString(3)||`undefined`}},gi=class extends ui{geometryChange(){let e=this.srcElement.geometry();this.attr(`x`,e.origin.x),this.attr(`y`,e.origin.y),this.attr(`width`,e.size.width),this.attr(`height`,e.size.height),this.attr(`rx`,e.cornerRadius[0]),this.attr(`ry`,e.cornerRadius[1]),this.invalidate()}size(){return this.srcElement.geometry().size}origin(){return this.srcElement.geometry().origin}rx(){return this.srcElement.geometry().cornerRadius[0]}ry(){return this.srcElement.geometry().cornerRadius[1]}template(){return`<rect ${this.renderId()} ${this.renderStyle()} ${this.renderOpacity()} x='${this.origin().x}' y='${this.origin().y}' rx='${this.rx()}' ry='${this.ry()}' width='${this.size().width}' height='${this.size().height}' ${this.renderStroke()} ${this.renderFill()} ${this.renderDefinitions()} ${this.renderTransform()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()} />`}};let _i=/&(?:[a-zA-Z]+|#\d+);/g;function vi(e){if(!e||typeof e!=`string`||!_i.test(e))return e;let t=vi._element;return _i.lastIndex=0,e.replace(_i,e=>(t.innerHTML=e,t.textContent||t.innerText))}typeof document<`u`&&(vi._element=document.createElement(`span`));var yi=class extends ui{geometryChange(){let e=this.pos();this.attr(`x`,e.x),this.attr(`y`,e.y),this.invalidate()}optionsChange(e){e.field===`font`?(this.attr(`style`,Wr(this.mapStyle())),this.geometryChange()):e.field===`content`&&super.content(this.srcElement.content()),super.optionsChange(e)}mapStyle(e){let t=super.mapStyle(e),n=this.srcElement.options.font;return e&&(n=_(n)),t.push([`font`,n],[`white-space`,`pre`]),t}pos(){let e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)}renderContent(){let e=this.srcElement.content();return e=vi(e),e=_(e),$e(e)}renderTextAnchor(){let e;return(this.options||{}).rtl&&!(x.browser.msie||x.browser.edge)&&(e=`end`),V(`text-anchor`,e)}renderPaintOrder(){let e=this.srcElement.options.paintOrder;return e?V(`paint-order`,e):``}template(){return`<text ${this.renderId()} ${this.renderTextAnchor()} ${this.renderStyle()} ${this.renderOpacity()}x='${this.pos().x}' y='${this.pos().y}' ${this.renderStroke()} ${this.renderTransform()} ${this.renderDefinitions()}${this.renderPaintOrder()}${this.renderFill()}${this.renderClassName()} ${this.renderRole()}${this.renderAriaLabel()} ${this.renderAriaRoleDescription()}${this.renderAriaChecked()}>${this.renderContent()}</text>`}};Gr.Arc=di,Gr.Circle=fi,Gr.Group=pi,Gr.Image=mi,Gr.MultiPath=hi,Gr.Path=ui,Gr.Rect=gi,Gr.Text=yi;function bi(e){let t;try{t=e.getScreenCTM?e.getScreenCTM():null}catch{}if(t){let n=-t.e%1,r=-t.f%1,i=e.style;(n!==0||r!==0)&&(i.left=n+`px`,i.top=r+`px`)}}var xi=class extends Hr{get type(){return`svg`}constructor(e,t){super(e,t),this._root=new ci(Object.assign({rtl:He(e,`direction`).direction===`rtl`},this.options)),Xr(this.element,this._template(``)),this._rootElement=this.element.firstElementChild,this._rootElement.style.width=`100%`,this._rootElement.style.height=`100%`,this._rootElement.style.overflow=`hidden`,bi(this._rootElement),this._root.attachTo(this._rootElement),Be(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()}destroy(){this._root&&(this._root.destroy(),this._root=null,this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null,Ge(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),super.destroy()}translate(e){let t=`${Math.round(e.x)} ${Math.round(e.y)} ${this._size.width} ${this._size.height}`;this._offset=e,this._rootElement.setAttribute(`viewBox`,t)}draw(e){super.draw(e),this._root.load([e])}clear(){super.clear(),this._root.clear()}svg(){return`<?xml version='1.0' ?>`+this._template()}exportVisual(){let{_visual:e,_offset:t}=this;if(t){let n=new B;n.children.push(e),n.transform(R().translate(-t.x,-t.y)),e=n}return e}_resize(){this._offset&&this.translate(this._offset)}_template(e){return`<svg ${typeof e==`string`?e:`style='width: 100%; height: 100%; overflow: hidden;' `}xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>${this._root.render()}</svg>`}};let Si={};var Ci=class extends Br{constructor(e){super(e),e&&this.initClip()}initClip(){let e=this.srcElement.clip();e&&(this.clip=e,e.addObserver(this))}clear(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),super.clear()}clearClip(){this.clip&&(this.clip.removeObserver(this),delete this.clip)}setClip(e){this.clip&&(e.beginPath(),new Si[this.clip.nodeType](this.clip).renderPoints(e,this.clip),e.clip(`evenodd`))}optionsChange(e){e.field===`clip`&&(this.clearClip(),this.initClip()),super.optionsChange(e)}setTransform(e){if(this.srcElement){let t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}}loadElements(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],a=i.children,o=new Si[i.nodeType](i,n);a&&a.length>0&&o.load(a,t,n),t===void 0?this.append(o):this.insertAt(o,t)}}load(e,t,n){this.loadElements(e,t,n),this.invalidate()}setOpacity(e){if(this.srcElement){let t=this.srcElement.opacity();t!==void 0&&this.globalAlpha(e,t)}}globalAlpha(e,t){let n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n}visible(){let e=this.srcElement;return!e||e&&e.options.visible!==!1}},wi=class extends $n(Ci,`childNodes`){renderTo(e){if(!this.visible())return;e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e);let t=this.childNodes;for(let n=0;n<t.length;n++){let r=t[n];r.visible()&&r.renderTo(e)}e.restore()}},Ti=class extends $n(wi,`childNodes`){constructor(e,t){super(),this.canvas=e,this.size=t,this.ctx=e.getContext(`2d`);let n=this._invalidate.bind(this);this.invalidate=C(()=>{d(n)},16.666666666666668)}destroy(){super.destroy(),this.canvas=null,this.ctx=null}load(e,t,n){this.loadElements(e,t,n),this._invalidate()}_rescale(e){let{canvas:t,size:n}=this;t.width=n.width*e,t.height=n.height*e,this.ctx.scale(e,e)}_devicePixelRatio(){return typeof window.devicePixelRatio==`number`?window.devicePixelRatio:1}_invalidate(e){if(!this.ctx)return;let t=e&&e.fixedScale?1:this._devicePixelRatio();this._rescale(t),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx)}},Ei=class extends i{constructor(){super(),this.shapes=[]}_add(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this}pointShapes(e){let t=this.shapes,n=t.length,r=[];for(let i=0;i<n;i++)t[i].bbox.containsPoint(e)&&r.push(t[i].shape);return r}insert(e,t){this._add(e,t)}remove(e){let t=this.shapes,n=t.length;for(let r=0;r<n;r++)if(t[r].shape===e){t.splice(r,1);break}}},Di=class e extends Ei{constructor(e){super(),this.children=[],this.rect=e}inBounds(e){let t=this.rect,n=t.bottomRight(),r=e.bottomRight();return t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&r.x<=n.x&&r.y<=n.y}pointShapes(e){let t=this.children,n=t.length,r=super.pointShapes(e);for(let i=0;i<n;i++)ge(r,t[i].pointShapes(e));return r}insert(e,t){let n=this.children,r=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{n.length||this._initChildren();for(let i=0;i<n.length;i++)if(n[i].insert(e,t)){r=!0;break}r||this._add(e,t)}r=!0}return r}_initChildren(){let{rect:t,children:n}=this,r=t.center(),i=t.width()/2,a=t.height()/2;n.push(new e(new L([t.origin.x,t.origin.y],[i,a])),new e(new L([r.x,t.origin.y],[i,a])),new e(new L([t.origin.x,r.y],[i,a])),new e(new L([r.x,r.y],[i,a])))}};let Oi=3e3,ki=BigInt(1e4);var Ai=class extends i{constructor(){super(),this.initRoots()}initRoots(){this.rootMap={},this.root=new Ei,this.rootElements=[]}clear(){let e=this.rootElements;for(let t=0;t<e.length;t++)this.remove(e[t]);this.initRoots()}pointShape(e){let t=(this.rootMap[Math.floor(e.x/Oi)]||{})[Math.floor(e.y/Oi)],n=this.root.pointShapes(e);t&&(n=n.concat(t.pointShapes(e)));let r=Pi(n);this.assignZindex(n,r),n.sort(ji);for(let t=0;t<n.length;t++)if(n[t].containsPoint(e))return n[t]}assignZindex(e,t){let n=Ni(ki,BigInt(t)),r=[],i=BigInt(0);for(let t=0;t<e.length;t++){let a=e[t],o=i,s=n,c=[];for(;a;)c.push(a),a=a.parent;for(;c.length;)a=c.pop(),o+=BigInt((a.parent?a.parent.children:this.rootElements).indexOf(a)+1)*s,s/=ki;e[t]._zIndex=o,r.push(o)}r.sort(Mi);for(let t=0;t<e.length;t++)e[t]._zIndex=r.indexOf(e[t]._zIndex)}optionsChange(e){(e.field===`transform`||e.field===`stroke.width`)&&this.bboxChange(e.element)}geometryChange(e){this.bboxChange(e.element)}bboxChange(e){if(e.nodeType===`Group`)for(let t=0;t<e.children.length;t++)this.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)}add(e){let t=Array.isArray(e)?e.slice(0):[e];ge(this.rootElements,t),this._insert(t)}childrenChange(e){if(e.action===`remove`)for(let t=0;t<e.items.length;t++)this.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0))}_insert(e){let t;for(;e.length>0;)t=e.pop(),t.addObserver(this),t.nodeType===`Group`?ge(e,t.children):this._insertShape(t)}_insertShape(e){let t=e.bbox();if(t){let n=this.getSectors(t),r=n[0][0],i=n[1][0];if(this.inRoot(n))this.root.insert(e,t);else{let n=this.rootMap;n[r]||(n[r]={}),n[r][i]||(n[r][i]=new Di(new L([r*Oi,i*Oi],[Oi,Oi]))),n[r][i].insert(e,t)}}}remove(e){if(e.removeObserver(this),e.nodeType===`Group`){let t=e.children;for(let e=0;e<t.length;e++)this.remove(t[e])}else e._quadNode&&(e._quadNode.remove(e),delete e._quadNode)}inRoot(e){return e[0].length>1||e[1].length>1}getSectors(e){let t=e.bottomRight(),n=Math.floor(t.x/Oi),r=Math.floor(t.y/Oi),i=[[],[]];for(let t=Math.floor(e.origin.x/Oi);t<=n;t++)i[0].push(t);for(let t=Math.floor(e.origin.y/Oi);t<=r;t++)i[1].push(t);return i}};function ji(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function Mi(e,t){return e<t?-1:+(e>t)}function Ni(e,t){let n=e,r=t,i=BigInt(1),a=i;for(;r;)r&i&&(a*=n),r>>=i,r&&(n*=n);return a}function Pi(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=[];for(;r;)i.push(r),r=r.parent;t=Math.max(t,i.length)}return t+1}var Fi=class{constructor(e){e.bind(`mouseenter`,this._mouseenter.bind(this)),e.bind(`mouseleave`,this._mouseleave.bind(this)),this.element=e.element}clear(){this._resetCursor()}destroy(){this._resetCursor(),delete this.element}_mouseenter(e){let t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()}_mouseleave(){this._resetCursor()}_shapeCursor(e){let t=e.element;for(;t&&t.options.cursor===void 0;)t=t.parent;if(t)return t.options.cursor}_getCursor(){if(this.element)return this.element.style.cursor}_setCursor(e){this.element&&(this.element.style.cursor=e,this._current=e)}_resetCursor(){this._current&&(this._setCursor(this._defaultCursor||``),delete this._current)}};function Ii(e,t){let n=t.segments;if(n.length===0)return;let r=n[0],i=r.anchor();e.moveTo(i.x,i.y);for(let t=1;t<n.length;t++){r=n[t],i=r.anchor();let a=n[t-1].controlOut(),o=r.controlIn();a&&o?e.bezierCurveTo(a.x,a.y,o.x,o.y,i.x,i.y):e.lineTo(i.x,i.y)}t.options.closed&&e.closePath()}function Li(e,t){for(let n=0;n<t.length;n++){let r=t[n],i=k(r.color());i.a*=r.opacity(),e.addColorStop(r.offset(),i.toCssRgba())}}var Ri=class extends Ci{renderTo(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()}setFill(e){let t=this.srcElement.options.fill,n=!1;return t&&(t.nodeType===`Gradient`?(this.setGradientFill(e,t),n=!0):t.nodeType===`Pattern`?(this.setPatternFill(e,t),n=!0):Ne(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n}setGradientFill(e,t){let n=this.srcElement.rawBBox(),r;if(t instanceof hr){let n=t.start(),i=t.end();r=e.createLinearGradient(n.x,n.y,i.x,i.y)}else if(t instanceof gr){let n=t.center();r=e.createRadialGradient(n.x,n.y,0,n.x,n.y,t.radius())}Li(r,t.stops),e.save(),t.userSpace()||e.transform(n.width(),0,0,n.height(),n.origin.x,n.origin.y),e.fillStyle=r,e.fill(),e.restore()}setPatternFill(e,t){let n=t.size(),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.getWidth(),r.height=n.getHeight(),this.childNodes.length=0,this.loadElements(t.children);let a=this.childNodes;for(let e=0;e<a.length;e++)a[e].renderTo(i);e.save(),e.fillStyle=e.createPattern(r,`repeat`),e.fill(),e.restore()}setStroke(e){let t=this.srcElement.options.stroke;if(t&&!Ne(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=ze(t.width,1),e.lineJoin=ze(t.lineJoin,e.lineJoin),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0}dashType(){let e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()}setLineDash(e){let t=this.dashType();if(t&&t!==`solid`){let n=Nt[t];e.setLineDash?e.setLineDash(n):(e.mozDash=n,e.webkitLineDash=n)}}setLineCap(e){let t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==`solid`?e.lineCap=Pt:n&&n.lineCap&&(e.lineCap=n.lineCap)}setLineJoin(e){let t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)}renderPoints(e,t){Ii(e,t)}},zi=class extends Ri{renderPoints(e){Ii(e,this.srcElement.toPath())}},Bi=class extends Ri{renderPoints(e){let{center:t,radius:n}=this.srcElement.geometry();e.arc(t.x,t.y,n,0,Math.PI*2)}},Vi=class extends Ri{constructor(e,t){super(e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=ye();let n=this.img=new Image,r=e.src();t&&!/^data:/i.test(r)&&(n.crossOrigin=t),r&&(n.src=r),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)}renderTo(e){this.loading.state()===`resolved`&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())}optionsChange(e){e.field===`src`?(this.loading=ye(),this.img.src=this.srcElement.src()):super.optionsChange(e)}onLoad(){this.loading.resolve(),this.invalidate()}onError(){this.loading.reject(Error(`Unable to load image '`+this.img.src+`'. Check for connectivity and verify CORS headers.`))}drawImage(e){let t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}},Hi=class extends Ri{renderPoints(e){let t=this.srcElement.paths;for(let n=0;n<t.length;n++)Ii(e,t[n])}},Ui=class extends Ri{renderPoints(e){let t=this.srcElement.geometry(),[n,r]=t.cornerRadius;if(n===0&&r===0){let{origin:n,size:r}=t;e.rect(n.x,n.y,r.width,r.height)}else super.renderPoints(e,z.fromRect(t))}},Wi=class extends Ri{renderTo(e){let t=this.srcElement,n=t.position(),r=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign=`left`,t.options.paintOrder===`stroke`?(this.stroke(e,t,n,r),this.fill(e,t,n,r)):(this.fill(e,t,n,r),this.stroke(e,t,n,r)),e.restore()}stroke(e,t,n,r){this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+r.baseline))}fill(e,t,n,r){this.setFill(e)&&e.fillText(t.content(),n.x,n.y+r.baseline)}};Si.Arc=zi,Si.Circle=Bi,Si.Group=wi,Si.Image=Vi,Si.MultiPath=Hi,Si.Path=Ri,Si.Rect=Ui,Si.Text=Wi;var Gi=class extends Hr{get type(){return`canvas`}constructor(e,t){super(e,t),kt(this.element,this._template(this));let n=this.element.firstElementChild;n.style.width=`100%`,n.style.height=`100%`;let r=We(e);n.width=r.width,n.height=r.height,this._rootElement=n,this._root=new Ti(n,r),this._mouseTrackHandler=this._trackMouse.bind(this),Be(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})}destroy(){super.destroy(),this._root&&=(this._root.destroy(),null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),Ge(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler}),this._rootElement&&this._rootElement.parentNode&&this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null}draw(e){super.draw(e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])}clear(){super.clear(),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()}eventTarget(e){if(this._searchTree){let t=this._surfacePoint(e);return this._searchTree.pointShape(t)}}image(){let{_root:e,_rootElement:t}=this,n=[];e.traverse(e=>{e.loading&&n.push(e.loading)});let r=ye(),i=()=>{e._invalidate({fixedScale:!0});try{let e=t.toDataURL();r.resolve(e)}catch(e){r.reject(e)}};return Ie(n).then(i,i),r}suspendTracking(){super.suspendTracking(),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)}resumeTracking(){if(super.resumeTracking(),!this._searchTree){this._searchTree=new Ai;let e=this._root.childNodes,t=[];for(let n=0;n<e.length;n++)t.push(e[n].srcElement);this._searchTree.add(t)}}_resize(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.size=this._size,this._root.invalidate()}_template(){return`<canvas></canvas>`}_enableTracking(){this._searchTree=new Ai,this._cursor=new Fi(this),super._enableTracking()}_trackMouse(e){if(this._suspendedTracking)return;let t=this.eventTarget(e);if(e.type!==`click`){let n=this._currentShape;n&&n!==t&&this.trigger(`mouseleave`,{element:n,originalEvent:e,type:`mouseleave`}),t&&n!==t&&this.trigger(`mouseenter`,{element:t,originalEvent:e,type:`mouseenter`}),this.trigger(`mousemove`,{element:t,originalEvent:e,type:`mousemove`}),this._currentShape=t}else t&&this.trigger(`click`,{element:t,originalEvent:e,type:`click`})}};let Ki,qi,Ji=()=>typeof document<`u`,Yi=()=>Ji()&&document.createElement(`canvas`).getContext,Xi=()=>Ji()&&document.implementation.hasFeature(`http://www.w3.org/TR/SVG11/feature#BasicStructure`,`1.1`);var Zi=class e extends i{static get support(){return qi||={canvas:Yi(),svg:Xi()},qi}static get current(){return Ki||=new e,Ki}constructor(){super(),this._items=[{name:`svg`,type:xi},{name:`canvas`,type:Gi}]}create(e,t){let n=this._items,r=n[0];if(t&&t.type){let e=t.type.toLowerCase();for(let t=0;t<n.length;t++)if(n[t].name===e){r=n[t];break}}if(r)return new r.type(e,t);v(`Warning: Unable to create Kendo UI Drawing Surface. Possible causes:
- The browser does not support SVG and Canvas. User agent: ${navigator.userAgent}`)}};(class extends Hr{static get support(){return Zi.support}static create(e,t){return Zi.current.create(e,t)}});let Qi=typeof Uint8Array<`u`&&x.browser&&(!x.browser.msie||x.browser.version>9),$i=function(){var e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`;return{decode:function(t){for(var n=t.replace(/[^A-Za-z0-9\+\/\=]/g,``),r=0,i=n.length,a=[];r<i;){var o=e.indexOf(n.charAt(r++)),s=e.indexOf(n.charAt(r++)),c=e.indexOf(n.charAt(r++)),l=e.indexOf(n.charAt(r++)),u=o<<2|s>>>4,d=(s&15)<<4|c>>>2,f=(c&3)<<6|l;a.push(u),c!=64&&a.push(d),l!=64&&a.push(f)}return a},encode:function(t){for(var n=0,r=t.length,i=``;n<r;){var a=t[n++],o=t[n++],s=t[n++],c=a>>>2,l=(a&3)<<4|o>>>4,u=(o&15)<<2|s>>>6,d=s&63;n-r==2?u=d=64:n-r==1&&(d=64),i+=e.charAt(c)+e.charAt(l)+e.charAt(u)+e.charAt(d)}return i}}}();function ea(e){var t=0,n=0;e==null?e=Qi?new Uint8Array(256):[]:n=e.length;var r=Qi?function(t){if(t>=e.length){var n=new Uint8Array(Math.max(t+256,e.length*2));n.set(e,0),e=n}}:function(){},i=Qi?function(){return new Uint8Array(e.buffer,0,n)}:function(){return e},a=Qi?function(i){if(typeof i==`string`)return w(i);var a=i.length;r(t+a),e.set(i,t),t+=a,t>n&&(n=t)}:function(e){if(typeof e==`string`)return w(e);for(var t=0;t<e.length;++t)l(e[t])},o=Qi?function(t,n){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+n));var r=new Uint8Array(n);return r.set(new Uint8Array(e.buffer,t,n)),r}:function(t,n){return e.slice(t,t+n)};function s(){return t>=n}function c(){return t<n?e[t++]:0}function l(i){r(t),e[t++]=i&255,t>n&&(n=t)}function u(){return c()<<8|c()}function d(e){l(e>>8),l(e)}function f(){var e=u();return e>=32768?e-65536:e}function p(e){d(e<0?e+65536:e)}function m(){return u()*65536+u()}function h(e){d(e>>>16&65535),d(e&65535)}function g(){var e=m();return e>=2147483648?e-4294967296:e}function _(e){h(e<0?e+4294967296:e)}function v(){return m()/65536}function y(e){h(Math.round(e*65536))}function b(){return g()/65536}function x(e){_(Math.round(e*65536))}function S(e){return ee(e,c)}function C(e){return String.fromCharCode.apply(String,S(e))}function w(e){for(var t=0;t<e.length;++t)l(e.charCodeAt(t))}function ee(e,t){for(var n=Array(e),r=0;r<e;++r)n[r]=t();return n}var T={eof:s,readByte:c,writeByte:l,readShort:u,writeShort:d,readLong:m,writeLong:h,readFixed:v,writeFixed:y,readShort_:f,writeShort_:p,readLong_:g,writeLong_:_,readFixed_:b,writeFixed_:x,read:S,write:a,readString:C,writeString:w,times:ee,get:i,slice:o,offset:function(e){return e==null?t:(t=e,T)},skip:function(e){t+=e},toString:function(){throw Error(`FIX CALLER. BinaryStream is no longer convertible to string!`)},length:function(){return n},saveExcursion:function(e){var n=t;try{return e()}finally{t=n}},writeBase64:function(e){window.atob?w(window.atob(e)):a($i.decode(e))},base64:function(){return $i.encode(i())}};return T}function ta(e){return e.map(function(e){var t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t}).join(``)}var na=class{constructor(e,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=e,this.rawData=e.raw,this.parse(e.raw)}raw(){return this.rawData.slice(this.offset,this.length)}parse(){}};(class extends na{parse(e){e.offset(this.offset),this.version=e.readLong(),this.revision=e.readLong(),this.checkSumAdjustment=e.readLong(),this.magicNumber=e.readLong(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.read(8),this.modified=e.read(8),this.xMin=e.readShort_(),this.yMin=e.readShort_(),this.xMax=e.readShort_(),this.yMax=e.readShort_(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort_(),this.indexToLocFormat=e.readShort_(),this.glyphDataFormat=e.readShort_()}render(e){var t=ea();return t.writeLong(this.version),t.writeLong(this.revision),t.writeLong(0),t.writeLong(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.write(this.created),t.write(this.modified),t.writeShort_(this.xMin),t.writeShort_(this.yMin),t.writeShort_(this.xMax),t.writeShort_(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort_(this.fontDirectionHint),t.writeShort_(e),t.writeShort_(this.glyphDataFormat),t.get()}}),class extends na{parse(e){e.offset(this.offset),this.file.head.indexToLocFormat===0?this.offsets=e.times(this.length/2,function(){return 2*e.readShort()}):this.offsets=e.times(this.length/4,e.readLong)}offsetOf(e){return this.offsets[e]}lengthOf(e){return this.offsets[e+1]-this.offsets[e]}render(e){for(var t=ea(),n=e[e.length-1]>65535,r=0;r<e.length;++r)n?t.writeLong(e[r]):t.writeShort(e[r]/2);return{format:+!!n,table:t.get()}}},class extends na{parse(e){e.offset(this.offset),this.version=e.readLong(),this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort_(),this.minRightSideBearing=e.readShort_(),this.xMaxExtent=e.readShort_(),this.caretSlopeRise=e.readShort_(),this.caretSlopeRun=e.readShort_(),this.caretOffset=e.readShort_(),e.skip(8),this.metricDataFormat=e.readShort_(),this.numOfLongHorMetrics=e.readShort()}render(e){var t=ea();return t.writeLong(this.version),t.writeShort_(this.ascent),t.writeShort_(this.descent),t.writeShort_(this.lineGap),t.writeShort(this.advanceWidthMax),t.writeShort_(this.minLeftSideBearing),t.writeShort_(this.minRightSideBearing),t.writeShort_(this.xMaxExtent),t.writeShort_(this.caretSlopeRise),t.writeShort_(this.caretSlopeRun),t.writeShort_(this.caretOffset),t.write([0,0,0,0,0,0,0,0]),t.writeShort_(this.metricDataFormat),t.writeShort(e.length),t.get()}},class extends na{parse(e){e.offset(this.offset),this.version=e.readLong(),this.numGlyphs=e.readShort(),this.maxPoints=e.readShort(),this.maxContours=e.readShort(),this.maxComponentPoints=e.readShort(),this.maxComponentContours=e.readShort(),this.maxZones=e.readShort(),this.maxTwilightPoints=e.readShort(),this.maxStorage=e.readShort(),this.maxFunctionDefs=e.readShort(),this.maxInstructionDefs=e.readShort(),this.maxStackElements=e.readShort(),this.maxSizeOfInstructions=e.readShort(),this.maxComponentElements=e.readShort(),this.maxComponentDepth=e.readShort()}render(e){var t=ea();return t.writeLong(this.version),t.writeShort(e.length),t.writeShort(this.maxPoints),t.writeShort(this.maxContours),t.writeShort(this.maxComponentPoints),t.writeShort(this.maxComponentContours),t.writeShort(this.maxZones),t.writeShort(this.maxTwilightPoints),t.writeShort(this.maxStorage),t.writeShort(this.maxFunctionDefs),t.writeShort(this.maxInstructionDefs),t.writeShort(this.maxStackElements),t.writeShort(this.maxSizeOfInstructions),t.writeShort(this.maxComponentElements),t.writeShort(this.maxComponentDepth),t.get()}},class extends na{parse(e){e.offset(this.offset);var t=this.file,n=t.hhea;this.metrics=e.times(n.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}});var r=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics;this.leftSideBearings=e.times(r,e.readShort_)}forGlyph(e){var t=this.metrics,n=t.length;return e<n?t[e]:{advance:t[n-1].advance,lsb:this.leftSideBearings[e-n]}}render(e){for(var t=ea(),n=0;n<e.length;++n){var r=this.forGlyph(e[n]);t.writeShort(r.advance),t.writeShort_(r.lsb)}return t.get()}},(function(){var e=`.notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat`.split(/\s+/g);return class extends na{parse(e){e.offset(this.offset),this.format=e.readLong(),this.italicAngle=e.readFixed_(),this.underlinePosition=e.readShort_(),this.underlineThickness=e.readShort_(),this.isFixedPitch=e.readLong(),this.minMemType42=e.readLong(),this.maxMemType42=e.readLong(),this.minMemType1=e.readLong(),this.maxMemType1=e.readLong();var t;switch(this.format){case 65536:case 196608:break;case 131072:t=e.readShort(),this.glyphNameIndex=e.times(t,e.readShort),this.names=[];for(var n=this.offset+this.length;e.offset()<n;)this.names.push(e.readString(e.readByte()));break;case 151552:t=e.readShort(),this.offsets=e.read(t);break;case 262144:this.map=e.times(this.file.maxp.numGlyphs,e.readShort);break}}glyphFor(t){switch(this.format){case 65536:return e[t]||`.notdef`;case 131072:var n=this.glyphNameIndex[t];return n<e.length?e[n]:this.names[n-e.length]||`.notdef`;case 151552:case 196608:return`.notdef`;case 262144:return this.map[t]||65535}}render(t){if(this.format==196608)return this.raw();var n=ea(this.rawData.slice(this.offset,32));n.writeLong(131072),n.offset(32);for(var r=[],i=[],a=0;a<t.length;++a){var o=t[a],s=this.glyphFor(o),c=e.indexOf(s);c>=0?r.push(c):(r.push(e.length+i.length),i.push(s))}for(n.writeShort(t.length),a=0;a<r.length;++a)n.writeShort(r[a]);for(a=0;a<i.length;++a)n.writeByte(i[a].length),n.writeString(i[a]);return n.get()}}})(),class extends na{parse(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))}render(){return this.raw()}};function ra(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ia(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(var r in n)ra(n,r)&&(e[r]=n[r])}}return e}function aa(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)}var oa={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+r),i);return}for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r=0,i,a,o;for(t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o},Buf8:function(e){return new Uint8Array(e)},Buf16:function(e){return new Uint16Array(e)},Buf32:function(e){return new Int32Array(e)}},sa={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)},Buf8:function(e){return Array(e)},Buf16:function(e){return Array(e)},Buf32:function(e){return Array(e)}};let ca=()=>{let e=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;return ca=()=>e,e},la=(e,t,n,r,i)=>(la=ca()?oa.arraySet:sa.arraySet,la(e,t,n,r,i)),ua=e=>(ua=ca()?oa.flattenChunks:sa.flattenChunks,ua(e)),da=e=>(da=ca()?oa.Buf8:sa.Buf8,da(e)),fa=e=>(fa=ca()?oa.Buf16:sa.Buf16,fa(e)),pa=e=>(pa=ca()?oa.Buf32:sa.Buf32,pa(e)),ma=function(){let e=!0;try{String.fromCharCode.apply(null,[0])}catch{e=!1}return ma=()=>e,e},ha=function(){let e=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{e=!1}return ha=()=>e,e},ga=function(e){for(var t=da(256),n=0;n<256;n++)t[n]=n>=252?6:n>=248?5:n>=240?4:n>=224?3:n>=192?2:1;return t[254]=t[254]=1,ga=e=>t[e],t[e]};function _a(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t}function va(e,t){if(t<65534&&(e.subarray&&ha()||!e.subarray&&ma()))return String.fromCharCode.apply(null,aa(e,t));for(var n=``,r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}function ya(e){return va(e,e.length)}function ba(e,t,n,r){for(var i=e&65535|0,a=e>>>16&65535|0,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}function xa(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}let Sa=function(){let e=xa();return Sa=()=>e,e};function Ca(e,t,n,r){var i=Sa(),a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1}var wa={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`};function Ta(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}function Ea(e){for(var t=e.length;--t>=0;)e[t]=0}var Da=0,Oa=1,ka=2,Aa=3,ja=258,Ma=29,Na=256,Pa=Na+1+Ma,Fa=30,Ia=19,La=2*Pa+1,Ra=15,za=16,Ba=7,Va=256,Ha=16,Ua=17,Wa=18,Ga=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ka=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],qa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ja=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ya=512,Xa,Za,Qa,$a,eo,to;function no(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var ro,io,ao;function oo(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function so(e){return e<256?Qa[e]:Qa[256+(e>>>7)]}function co(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function H(e,t,n){e.bi_valid>za-n?(e.bi_buf|=t<<e.bi_valid&65535,co(e,e.bi_buf),e.bi_buf=t>>za-e.bi_valid,e.bi_valid+=n-za):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function lo(e,t,n){H(e,n[t*2],n[t*2+1])}function uo(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function fo(e){e.bi_valid===16?(co(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function po(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=Ra;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<La;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}}function mo(e,t,n){var r=Array(Ra+1),i=0,a,o;for(a=1;a<=Ra;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=uo(r[s]++,s))}}function ho(){var e,t,n,r,i,a=Array(Ra+1);for(Xa=Array((Pa+2)*2),Ea(Xa),Za=Array(Fa*2),Ea(Za),Qa=Array(Ya),Ea(Qa),$a=Array(ja-Aa+1),Ea($a),eo=Array(Ma),Ea(eo),to=Array(Fa),Ea(to),n=0,r=0;r<Ma-1;r++)for(eo[r]=n,e=0;e<1<<Ga[r];e++)$a[n++]=r;for($a[n-1]=r,i=0,r=0;r<16;r++)for(to[r]=i,e=0;e<1<<Ka[r];e++)Qa[i++]=r;for(i>>=7;r<Fa;r++)for(to[r]=i<<7,e=0;e<1<<Ka[r]-7;e++)Qa[256+i++]=r;for(t=0;t<=Ra;t++)a[t]=0;for(e=0;e<=143;)Xa[e*2+1]=8,e++,a[8]++;for(;e<=255;)Xa[e*2+1]=9,e++,a[9]++;for(;e<=279;)Xa[e*2+1]=7,e++,a[7]++;for(;e<=287;)Xa[e*2+1]=8,e++,a[8]++;for(mo(Xa,Pa+1,a),e=0;e<Fa;e++)Za[e*2+1]=5,Za[e*2]=uo(e,5);ro=new no(Xa,Ga,Na+1,Pa,Ra),io=new no(Za,Ka,0,Fa,Ra),ao=new no([],qa,0,Ia,Ba)}function go(e){var t;for(t=0;t<Pa;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Fa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<Ia;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Va*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function _o(e){e.bi_valid>8?co(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function vo(e,t,n,r){_o(e),r&&(co(e,n),co(e,~n)),la(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function yo(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function bo(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&yo(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!yo(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function xo(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?lo(e,i,t):(o=$a[i],lo(e,o+Na+1,t),s=Ga[o],s!==0&&(i-=eo[o],H(e,i,s)),r--,o=so(r),lo(e,o,n),s=Ka[o],s!==0&&(r-=to[o],H(e,r,s)));while(a<e.last_lit);lo(e,Va,t)}function So(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=La,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)bo(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],bo(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,bo(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],po(e,t),mo(n,c,e.bl_count)}function Co(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[Ua*2]++:e.bl_tree[Wa*2]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[Ha*2]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function wo(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do lo(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(lo(e,Ua,e.bl_tree),H(e,s-3,3)):(lo(e,Wa,e.bl_tree),H(e,s-11,7)):(a!==i&&(lo(e,a,e.bl_tree),s--),lo(e,Ha,e.bl_tree),H(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function To(e){var t;for(Co(e,e.dyn_ltree,e.l_desc.max_code),Co(e,e.dyn_dtree,e.d_desc.max_code),So(e,e.bl_desc),t=Ia-1;t>=3&&e.bl_tree[Ja[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Eo(e,t,n,r){var i;for(H(e,t-257,5),H(e,n-1,5),H(e,r-4,4),i=0;i<r;i++)H(e,e.bl_tree[Ja[i]*2+1],3);wo(e,e.dyn_ltree,t-1),wo(e,e.dyn_dtree,n-1)}function Do(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<Na;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0}var Oo=!1;function ko(e){Oo||=(ho(),!0),e.l_desc=new oo(e.dyn_ltree,ro),e.d_desc=new oo(e.dyn_dtree,io),e.bl_desc=new oo(e.bl_tree,ao),e.bi_buf=0,e.bi_valid=0,go(e)}function Ao(e,t,n,r){H(e,(Da<<1)+ +!!r,3),vo(e,t,n,!0)}function jo(e){H(e,Oa<<1,3),lo(e,Va,Xa),fo(e)}function Mo(e,t,n,r){var i,a,o=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=Do(e)),So(e,e.l_desc),So(e,e.d_desc),o=To(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?Ao(e,t,n,r):e.strategy===4||a===i?(H(e,(Oa<<1)+ +!!r,3),xo(e,Xa,Za)):(H(e,(ka<<1)+ +!!r,3),Eo(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),xo(e,e.dyn_ltree,e.dyn_dtree)),go(e),r&&_o(e)}function No(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[($a[n]+Na+1)*2]++,e.dyn_dtree[so(t)*2]++),e.last_lit===e.lit_bufsize-1}var Po=9,Fo=286,Io=30,Lo=19,Ro=2*Fo+1,zo=15,U=3,Bo=258,Vo=Bo+U+1,Ho=32,Uo=42,Wo=69,Go=73,Ko=91,qo=103,Jo=113,Yo=666,W=1,Xo=2,Zo=3,Qo=4,$o=3;function es(e,t){return e.msg=wa[t],t}function ts(e){return(e<<1)-(e>4?9:0)}function ns(e){for(var t=e.length;--t>=0;)e[t]=0}function rs(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(la(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function G(e,t){Mo(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,rs(e.strm)}function K(e,t){e.pending_buf[e.pending++]=t}function is(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function as(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,la(t,e.input,e.next_in,i,n),e.state.wrap===1?e.adler=ba(e.adler,t,i,n):e.state.wrap===2&&(e.adler=Ca(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function os(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Vo?e.strstart-(e.w_size-Vo):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+Bo,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=Bo-(f-r),r=f-Bo,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function ss(e){var t=e.w_size,n,r,i,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Vo)){la(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do i=e.head[--n],e.head[n]=i>=t?i-t:0;while(--r);r=t,n=r;do i=e.prev[--n],e.prev[n]=i>=t?i-t:0;while(--r);a+=t}if(e.strm.avail_in===0)break;if(r=as(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=U)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+U-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<U)););}while(e.lookahead<Vo&&e.strm.avail_in!==0)}function cs(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ss(e),e.lookahead===0&&t===0)return W;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,G(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Vo&&(G(e,!1),e.strm.avail_out===0))return W}return e.insert=0,t===4?(G(e,!0),e.strm.avail_out===0?Zo:Qo):(e.strstart>e.block_start&&(G(e,!1),e.strm.avail_out),W)}function ls(e,t){for(var n,r;;){if(e.lookahead<Vo){if(ss(e),e.lookahead<Vo&&t===0)return W;if(e.lookahead===0)break}if(n=0,e.lookahead>=U&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+U-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Vo&&(e.match_length=os(e,n)),e.match_length>=U)if(r=No(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+U-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=No(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(G(e,!1),e.strm.avail_out===0))return W}return e.insert=e.strstart<U-1?e.strstart:U-1,t===4?(G(e,!0),e.strm.avail_out===0?Zo:Qo):e.last_lit&&(G(e,!1),e.strm.avail_out===0)?W:Xo}function us(e,t){for(var n,r,i;;){if(e.lookahead<Vo){if(ss(e),e.lookahead<Vo&&t===0)return W;if(e.lookahead===0)break}if(n=0,e.lookahead>=U&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+U-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-Vo&&(e.match_length=os(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===U&&e.strstart-e.match_start>4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=No(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+U-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=U-1,e.strstart++,r&&(G(e,!1),e.strm.avail_out===0))return W}else if(e.match_available){if(r=No(e,0,e.window[e.strstart-1]),r&&G(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return W}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=No(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<U-1?e.strstart:U-1,t===4?(G(e,!0),e.strm.avail_out===0?Zo:Qo):e.last_lit&&(G(e,!1),e.strm.avail_out===0)?W:Xo}function ds(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=Bo){if(ss(e),e.lookahead<=Bo&&t===0)return W;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+Bo;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=Bo-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=No(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=No(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(G(e,!1),e.strm.avail_out===0))return W}return e.insert=0,t===4?(G(e,!0),e.strm.avail_out===0?Zo:Qo):e.last_lit&&(G(e,!1),e.strm.avail_out===0)?W:Xo}function fs(e,t){for(var n;;){if(e.lookahead===0&&(ss(e),e.lookahead===0)){if(t===0)return W;break}if(e.match_length=0,n=No(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(G(e,!1),e.strm.avail_out===0))return W}return e.insert=0,t===4?(G(e,!0),e.strm.avail_out===0?Zo:Qo):e.last_lit&&(G(e,!1),e.strm.avail_out===0)?W:Xo}function ps(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}let ms=function(){let e=[new ps(0,0,0,0,cs),new ps(4,4,8,4,ls),new ps(4,5,16,8,ls),new ps(4,6,32,32,ls),new ps(4,4,16,16,us),new ps(8,16,32,32,us),new ps(8,16,128,128,us),new ps(8,32,128,256,us),new ps(32,128,258,1024,us),new ps(32,258,258,4096,us)];return ms=()=>e,e};function hs(e){e.window_size=2*e.w_size,ns(e.head);let t=ms();e.max_lazy_match=t[e.level].max_lazy,e.good_match=t[e.level].good_length,e.nice_match=t[e.level].nice_length,e.max_chain_length=t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0}function gs(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=fa(Ro*2),this.dyn_dtree=fa((2*Io+1)*2),this.bl_tree=fa((2*Lo+1)*2),ns(this.dyn_ltree),ns(this.dyn_dtree),ns(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=fa(zo+1),this.heap=fa(2*Fo+1),ns(this.heap),this.heap_len=0,this.heap_max=0,this.depth=fa(2*Fo+1),ns(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function _s(e){var t;return!e||!e.state?es(e,-2):(e.total_in=e.total_out=0,e.data_type=2,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Uo:Jo,e.adler=t.wrap===2?0:1,t.last_flush=0,ko(t),0)}function vs(e){var t=_s(e);return t===0&&hs(e.state),t}function ys(e,t){return!e||!e.state||e.state.wrap!==2?-2:(e.state.gzhead=t,0)}function bs(e,t,n,r,i,a){if(!e)return-2;var o=1;if(t===-1&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>Po||n!==8||r<8||r>15||t<0||t>9||a<0||a>4)return es(e,-2);r===8&&(r=9);var s=new gs;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+U-1)/U),s.window=da(s.w_size*2),s.head=fa(s.hash_size),s.prev=fa(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=da(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,vs(e)}function xs(e,t){var n,r,i,a;if(!e||!e.state||t>5||t<0)return e?es(e,-2):-2;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===Yo&&t!==4)return es(e,e.avail_out===0?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===Uo)if(r.wrap===2)e.adler=0,K(r,31),K(r,139),K(r,8),r.gzhead?(K(r,+!!r.gzhead.text+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),K(r,r.gzhead.time&255),K(r,r.gzhead.time>>8&255),K(r,r.gzhead.time>>16&255),K(r,r.gzhead.time>>24&255),K(r,r.level===9?2:r.strategy>=2||r.level<2?4:0),K(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(K(r,r.gzhead.extra.length&255),K(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ca(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Wo):(K(r,0),K(r,0),K(r,0),K(r,0),K(r,0),K(r,r.level===9?2:r.strategy>=2||r.level<2?4:0),K(r,$o),r.status=Jo);else{var o=8+(r.w_bits-8<<4)<<8,s=-1;s=r.strategy>=2||r.level<2?0:r.level<6?1:r.level===6?2:3,o|=s<<6,r.strstart!==0&&(o|=Ho),o+=31-o%31,r.status=Jo,is(r,o),r.strstart!==0&&(is(r,e.adler>>>16),is(r,e.adler&65535)),e.adler=1}if(r.status===Wo)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),rs(e),i=r.pending,r.pending===r.pending_buf_size));)K(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Go)}else r.status=Go;if(r.status===Go)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),rs(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?r.gzhead.name.charCodeAt(r.gzindex++)&255:0,K(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=Ko)}else r.status=Ko;if(r.status===Ko)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),rs(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?r.gzhead.comment.charCodeAt(r.gzindex++)&255:0,K(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Ca(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=qo)}else r.status=qo;if(r.status===qo&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&rs(e),r.pending+2<=r.pending_buf_size&&(K(r,e.adler&255),K(r,e.adler>>8&255),e.adler=0,r.status=Jo)):r.status=Jo),r.pending!==0){if(rs(e),e.avail_out===0)return r.last_flush=-1,0}else if(e.avail_in===0&&ts(t)<=ts(n)&&t!==4)return es(e,-5);if(r.status===Yo&&e.avail_in!==0)return es(e,-5);if(e.avail_in!==0||r.lookahead!==0||t!==0&&r.status!==Yo){var c=r.strategy===2?fs(r,t):r.strategy===3?ds(r,t):ms()[r.level].func(r,t);if((c===Zo||c===Qo)&&(r.status=Yo),c===W||c===Zo)return e.avail_out===0&&(r.last_flush=-1),0;if(c===Xo&&(t===1?jo(r):t!==5&&(Ao(r,0,0,!1),t===3&&(ns(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),rs(e),e.avail_out===0))return r.last_flush=-1,0}return t===4?r.wrap<=0?1:(r.wrap===2?(K(r,e.adler&255),K(r,e.adler>>8&255),K(r,e.adler>>16&255),K(r,e.adler>>24&255),K(r,e.total_in&255),K(r,e.total_in>>8&255),K(r,e.total_in>>16&255),K(r,e.total_in>>24&255)):(is(r,e.adler>>>16),is(r,e.adler&65535)),rs(e),r.wrap>0&&(r.wrap=-r.wrap),+(r.pending===0)):0}function Ss(e){var t;return!e||!e.state?-2:(t=e.state.status,t!==Uo&&t!==Wo&&t!==Go&&t!==Ko&&t!==qo&&t!==Jo&&t!==Yo?es(e,-2):(e.state=null,t===Jo?es(e,-3):0))}function Cs(e,t){var n=t.length,r,i,a,o,s,c,l,u;if(!e||!e.state||(r=e.state,o=r.wrap,o===2||o===1&&r.status!==Uo||r.lookahead))return-2;for(o===1&&(e.adler=ba(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(o===0&&(ns(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=da(r.w_size),la(u,t,n-r.w_size,r.w_size,0),t=u,n=r.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=n,e.next_in=0,e.input=t,ss(r);r.lookahead>=U;){i=r.strstart,a=r.lookahead-(U-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[i+U-1])&r.hash_mask,r.prev[i&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=i,i++;while(--a);r.strstart=i,r.lookahead=U-1,ss(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,r.wrap=o,0}var ws=Object.prototype.toString,Ts=class{constructor(e){this.options=ia({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:``},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new Ta,this.strm.avail_out=0;var n=bs(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==0)throw Error(wa[n]);if(t.header&&ys(this.strm,t.header),t.dictionary){var r=typeof t.dictionary==`string`?_a(t.dictionary):ws.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary;if(n=Cs(this.strm,r),n!==0)throw Error(wa[n]);this._dict_set=!0}}push(e,t){var n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?4:0,typeof e==`string`?n.input=_a(e):ws.call(e)===`[object ArrayBuffer]`?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=da(r),n.next_out=0,n.avail_out=r),i=xs(n,a),i!==1&&i!==0)return this.onEnd(i),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(a===4||a===2))&&(this.options.to===`string`?this.onData(ya(aa(n.output,n.next_out))):this.onData(aa(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&i!==1);return a===4?(i=Ss(this.strm),this.onEnd(i),this.ended=!0,i===0):a===2?(this.onEnd(0),n.avail_out=0,!0):!0}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=ua(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg}};function Es(e,t){var n=new Ts(t);if(n.push(e,!0),n.err)throw n.msg||wa[n.err];return n.result}let Ds=Es;function Os(){return!0}x.browser;var ks=0;let As=0;function js(){var e=0,t=ea();function n(){for(var e=0;e<arguments.length;++e){var r=arguments[e];if(r===void 0)throw Error(`Cannot output undefined to PDF`);if(r instanceof zs)r.beforeRender(n),r.render(n);else if(Fs(r))Ls(r,n);else if(Is(r))Rs(r,n);else if(typeof r==`number`){if(isNaN(r))throw Error(`Cannot output NaN to PDF`);var i=r.toFixed(7);i.indexOf(`.`)>=0&&(i=i.replace(/\.?0+$/,``)),i==`-0`&&(i=`0`),t.writeString(i)}else/string|boolean/.test(typeof r)?t.writeString(String(r)):typeof r.get==`function`?t.write(r.get()):typeof r==`object`&&(r?n(new J(r)):t.writeString(`null`))}}return n.writeData=function(e){t.write(e)},n.withIndent=function(t){++e,t(n),--e},n.indent=function(){n(`
`,Ms(``,e*2,` `)),n.apply(null,arguments)},n.offset=function(){return t.offset()},n.toString=function(){throw Error(`FIX CALLER`)},n.get=function(){return t.get()},n.stream=function(){return t},n}function Ms(e,t,n){for(;e.length<t;)e=n+e;return e}function Ns(e,t){return Ms(String(e),t,`0`)}function Ps(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Fs=Array.isArray||function(e){return e instanceof Array};function Is(e){return e instanceof Date}function Ls(e,t){t(`[`),e.length>0&&t.withIndent(function(){for(var n=0;n<e.length;++n)n>0&&n%8==0?t.indent(e[n]):t(` `,e[n])}),t(` ]`)}function Rs(e,t){t(`(D:`,Ns(e.getUTCFullYear(),4),Ns(e.getUTCMonth()+1,2),Ns(e.getUTCDate(),2),Ns(e.getUTCHours(),2),Ns(e.getUTCMinutes(),2),Ns(e.getUTCSeconds(),2),`Z)`)}var zs=class{beforeRender(){}},Bs=class extends zs{constructor(e,t){super(),this.value=e,this.utf16be=!!t}render(e){let t=this.value;if(this.utf16be)t=`þÿ`+Oe(t),t=t.replace(/([\(\)\\])/g,`\\$1`),e(`(`,t,`)`);else{let r=[40];for(var n=0;n<t.length;++n){let e=t.charCodeAt(n)&255;(e==40||e==41||e==92)&&r.push(92),r.push(e)}r.push(41),e.writeData(r)}}toString(){return this.value}},Vs=class extends Bs{constructor(e){super(e),this.value=e}render(e){e(`<`);for(var t=0;t<this.value.length;++t)e(Ns(this.value.charCodeAt(t).toString(16),4));e(`>`)}},Hs=class extends zs{static get(e){return q(e)}constructor(e){super(),this.name=e}render(e){e(`/`+this.escape())}escape(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return`#`+Ns(e.charCodeAt(0).toString(16),2)})}toString(){return this.name}};function q(e){return new Hs(e)}var J=class extends zs{constructor(e){super(),this.props=e}render(e){var t=this.props,n=!0;e(`<<`),e.withIndent(function(){for(var r in t)Ps(t,r)&&!/^_/.test(r)&&(n=!1,e.indent(q(r),` `,t[r]))}),n||e.indent(),e(`>>`)}},Us=class extends zs{constructor(e,t,n){if(super(),typeof e==`string`){var r=ea();r.write(e),e=r}this.data=e,this.props=t||{},this.compress=n}render(e){var t=this.data.get(),n=this.props;this.compress&&Os()&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(q(`FlateDecode`)),t=Ds(t)),n.Length=t.length,e(new J(n),` stream`,`
`),e.writeData(t),e(`
`,`endstream`)}};(class extends J{constructor(){super({Type:q(`Catalog`)})}setPages(e){this.props.Pages=e}}),class extends J{constructor(){super({Type:q(`Pages`),Kids:[],Count:0})}addPage(e){this.props.Kids.push(e),this.props.Count++}},class extends J{constructor(e,t,n){let{width:r,height:i}=e.size(),a=new $s(t._pdf,{});a._content=new Us(js(),null,!0),n(e,a,{}),t._xResources=Object.assign(t._xResources,a._xResources),t._fontResources=Object.assign(t._fontResources,a._fontResources),t._gsResources=Object.assign(t._gsResources,a._gsResources),super({Type:q(`Pattern`),PatternType:1,PaintType:1,TilingType:1,BBox:[0,0,r,i],XStep:r,YStep:i,Matrix:[1,0,0,-1,0,i],Resources:{ExtGState:new J(a._gsResources),XObject:new J(a._xResources),Font:new J(a._fontResources)}}),this._resourceName=q(`P`+ ++As),this.data=a._content.data,this.compress=!0}render(e){Us.prototype.render.call(this,e)}},class extends J{constructor(e){super({Type:q(`Font`),Subtype:q(`Type1`),BaseFont:q(e)}),this._resourceName=q(`F`+ ++ks)}encodeText(e){return new Bs(String(e))}};var Ws=class extends J{constructor(e,t,n){super({}),n=this.props,n.Type=q(`Font`),n.Subtype=q(`Type0`),n.Encoding=q(`Identity-H`),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=q(`F`+ ++ks);var r=t.head;this.name=t.psName;var i=this.scale=t.scale;this.bbox=[r.xMin*i,r.yMin*i,r.xMax*i,r.yMax*i],this.italicAngle=t.post.italicAngle,this.ascent=t.ascent*i,this.descent=t.descent*i,this.lineGap=t.lineGap*i,this.capHeight=t.os2.capHeight||this.ascent,this.xHeight=t.os2.xHeight||0,this.stemV=0,this.familyClass=(t.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=this.familyClass==10,this.flags=!!t.post.isFixedPitch|(this.isSerif?2:0)|(this.isScript?8:0)|(this.italicAngle===0?0:64)|32}encodeText(e){return new Vs(this._sub.encodeText(String(e)))}getTextWidth(e,t){for(var n=0,r=this._font.cmap.codeMap,i=0;i<t.length;++i){var a=r[t.charCodeAt(i)];n+=this._font.widthOfGlyph(a||0)}return n*e/1e3}beforeRender(){var e=this,t=e._sub,n=t.render(),r=new Us(ea(n),{Length1:n.length},!0),i=e._pdf.attach(new J({Type:q(`FontDescriptor`),FontName:q(e._sub.psName),FontBBox:e.bbox,Flags:e.flags,StemV:e.stemV,ItalicAngle:e.italicAngle,Ascent:e.ascent,Descent:e.descent,CapHeight:e.capHeight,XHeight:e.xHeight,FontFile2:e._pdf.attach(r)})),a=t.ncid2ogid,o=t.firstChar,s=t.lastChar,c=[];(function t(n,r){if(n<=s){var i=a[n];i==null?t(n+1):(r||c.push(n,r=[]),r.push(e._font.widthOfGlyph(i)),t(n+1,r))}})(o);var l=new J({Type:q(`Font`),Subtype:q(`CIDFontType2`),BaseFont:q(e._sub.psName),CIDSystemInfo:new J({Registry:new Bs(`Adobe`),Ordering:new Bs(`Identity`),Supplement:0}),FontDescriptor:i,FirstChar:o,LastChar:s,DW:Math.round(e._font.widthOfGlyph(0)),W:c,CIDToGIDMap:e._pdf.attach(e._makeCidToGidMap())}),u=e.props;u.BaseFont=q(e._sub.psName),u.DescendantFonts=[e._pdf.attach(l)];var d=new Gs(o,s,t.subset),f=new Us(js(),null,!0);f.data(d),u.ToUnicode=e._pdf.attach(f)}_makeCidToGidMap(){return new Us(ea(this._sub.cidToGidMap()),null,!0)}},Gs=class extends zs{constructor(e,t,n){super(),this.firstChar=e,this.lastChar=t,this.map=n}render(e){e.indent(`/CIDInit /ProcSet findresource begin`),e.indent(`12 dict begin`),e.indent(`begincmap`),e.indent(`/CIDSystemInfo <<`),e.indent(` /Registry (Adobe)`),e.indent(` /Ordering (UCS)`),e.indent(` /Supplement 0`),e.indent(`>> def`),e.indent(`/CMapName /Adobe-Identity-UCS def`),e.indent(`/CMapType 2 def`),e.indent(`1 begincodespacerange`),e.indent(` <0000><ffff>`),e.indent(`endcodespacerange`);var t=this;e.indent(t.lastChar-t.firstChar+1,` beginbfchar`),e.withIndent(function(){for(var n=t.firstChar;n<=t.lastChar;++n){var r=t.map[n],i=ta([r]);e.indent(`<`,Ns(n.toString(16),4),`>`,`<`);for(var a=0;a<i.length;++a)e(Ns(i.charCodeAt(a).toString(16),4));e(`>`)}}),e.indent(`endbfchar`),e.indent(`endcmap`),e.indent(`CMapName currentdict /CMap defineresource pop`),e.indent(`end`),e.indent(`end`)}};function Ks(e){return e.map(function(e){return Fs(e)?Ks(e):typeof e==`number`?(Math.round(e*1e3)/1e3).toFixed(3):e}).join(` `)}function qs(e,t,n,r,i,a,o){var s=Ks([t,n,r,i,a,o]),c=e.GRAD_COL_FUNCTIONS[s];return c||=e.GRAD_COL_FUNCTIONS[s]=e.attach(new J({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,r],C1:[i,a,o]})),c}function Js(e,t,n){var r=Ks([t,n]),i=e.GRAD_OPC_FUNCTIONS[r];return i||=e.GRAD_OPC_FUNCTIONS[r]=e.attach(new J({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]})),i}function Ys(e,t){var n=!1,r=[],i=[],a=[],o=[],s,c,l,u,d;for(s=1;s<t.length;++s)c=t[s-1],l=t[s],u=c.color,d=l.color,i.push(qs(e,u.r,u.g,u.b,d.r,d.g,d.b)),(u.a<1||d.a<1)&&(n=!0),a.push(l.offset),o.push(0,1);if(n)for(s=1;s<t.length;++s)c=t[s-1],l=t[s],u=c.color,d=l.color,r.push(Js(e,u.a,d.a));return a.pop(),{hasAlpha:n,colors:f(i),opacities:n?f(r):null};function f(e){return e.length==1?e[0]:{FunctionType:3,Functions:e,Domain:[0,1],Bounds:a,Encode:o}}}function Xs(e,t,n,r,i,a){var o,s;if(!a){var c=[t].concat(r);n.forEach(function(e){c.push(e.offset,e.color.r,e.color.g,e.color.b)}),s=Ks(c),o=e.GRAD_COL[s]}return o||(o=new J({Type:q(`Shading`),ShadingType:t?3:2,ColorSpace:q(`DeviceRGB`),Coords:r,Domain:[0,1],Function:i,Extend:[!0,!0]}),e.attach(o),o._resourceName=`S`+ ++ks,s&&(e.GRAD_COL[s]=o)),o}function Zs(e,t,n,r,i,a){var o,s;if(!a){var c=[t].concat(r);n.forEach(function(e){c.push(e.offset,e.color.a)}),s=Ks(c),o=e.GRAD_OPC[s]}return o||(o=new J({Type:q(`ExtGState`),AIS:!1,CA:1,ca:1,SMask:{Type:q(`Mask`),S:q(`Luminosity`),G:e.attach(new Us(`/a0 gs /s0 sh`,{Type:q(`XObject`),Subtype:q(`Form`),FormType:1,BBox:a?[a.left,a.top+a.height,a.left+a.width,a.top]:[0,1,1,0],Group:{Type:q(`Group`),S:q(`Transparency`),CS:q(`DeviceGray`),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:q(`DeviceGray`),Coords:r,Domain:[0,1],ShadingType:t?3:2,Function:i,Extend:[!0,!0]}}}}))}}),e.attach(o),o._resourceName=`O`+ ++ks,s&&(e.GRAD_OPC[s]=o)),o}function Qs(e,t,n){var r=t.type==`radial`,i=Ys(e,t.stops),a=r?[t.start.x,t.start.y,t.start.r,t.end.x,t.end.y,t.end.r]:[t.start.x,t.start.y,t.end.x,t.end.y],o=Xs(e,r,t.stops,a,i.colors,t.userSpace&&n),s=i.hasAlpha?Zs(e,r,t.stops,a,i.opacities,t.userSpace&&n):null;return{hasAlpha:i.hasAlpha,shading:o,opacity:s}}var $s=class extends J{constructor(e,t){super(t),this._pdf=e,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],t=this.props,t.Type=q(`Page`),t.ProcSet=[q(`PDF`),q(`Text`),q(`ImageB`),q(`ImageC`),q(`ImageI`)],t.Resources=new J({Font:new J(this._fontResources),ExtGState:new J(this._gsResources),XObject:new J(this._xResources),Pattern:new J(this._patResources),Shading:new J(this._shResources)}),t.Annots=this._annotations}_out(){this._content.data.apply(null,arguments)}transform(e,t,n,r,i,a){oc(arguments)||(this._matrix=ac(arguments,this._matrix),this._out(e,` `,t,` `,n,` `,r,` `,i,` `,a,` cm`),this._out(`
`))}translate(e,t){this.transform(1,0,0,1,e,t)}scale(e,t){this.transform(e,0,0,t,0,0)}rotate(e){var t=Math.cos(e),n=Math.sin(e);this.transform(t,n,-n,t,0,0)}beginText(){this._textMode=!0,this._out(`BT`,`
`)}endText(){this._textMode=!1,this._out(`ET`,`
`)}_requireTextMode(){if(!this._textMode)throw Error(`Text mode required; call page.beginText() first`)}_requireFont(){if(!this._font)throw Error(`No font selected; call page.setFont() first`)}setFont(e,t){this._requireTextMode(),e==null?e=this._font:e instanceof Ws||(e=this._pdf.getFont(e)),t??=this._fontSize,this._fontResources[e._resourceName]=e,this._font=e,this._fontSize=t,this._out(e._resourceName,` `,t,` Tf`,`
`)}setTextLeading(e){this._requireTextMode(),this._out(e,` TL`,`
`)}setTextRenderingMode(e){this._requireTextMode(),this._out(e,` Tr`,`
`)}showText(e,t){if(this._requireFont(),e.length>1&&t&&this._font instanceof Ws){var n=t/this._font.getTextWidth(this._fontSize,e)*100;this._out(n,` Tz `)}this._out(this._font.encodeText(e),` Tj`,`
`)}showTextNL(e){this._requireFont(),this._out(this._font.encodeText(e),` '`,`
`)}addLink(e,t){var n=this._toPage({x:t.left,y:t.bottom}),r=this._toPage({x:t.right,y:t.top});this._annotations.push(new J({Type:q(`Annot`),Subtype:q(`Link`),Rect:[n.x,n.y,r.x,r.y],Border:[0,0,0],A:new J({Type:q(`Action`),S:q(`URI`),URI:new Bs(e)})}))}setStrokeColor(e,t,n){this._out(e,` `,t,` `,n,` RG`,`
`)}setOpacity(e){this.setFillOpacity(e),this.setStrokeOpacity(e),this._opacity*=e}setStrokeOpacity(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName,` gs`,`
`)}}setFillColor(e,t,n){this._out(e,` `,t,` `,n,` rg`,`
`)}pattern(e,t,n){let r=this._pdf.getPattern(e,this,n);this._patResources[r._resourceName]=r,this._out(`/Pattern cs`,`
`),this._out(r._resourceName,` scn`,`
`),this.rect(t.left,t.top,t.width,t.height),this.fill()}setFillOpacity(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName,` gs`,`
`)}}gradient(e,t){this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),e.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top);var n=Qs(this._pdf,e,t),r=n.shading._resourceName,i;this._shResources[r]=n.shading,n.hasAlpha&&(i=n.opacity._resourceName,this._gsResources[i]=n.opacity,this._out(`/`+i+` gs `)),this._out(`/`+r+` sh`,`
`),this.restore()}setDashPattern(e,t){this._out(e,` `,t,` d`,`
`)}setLineWidth(e){this._out(e,` w`,`
`)}setLineCap(e){this._out(e,` J`,`
`)}setLineJoin(e){this._out(e,` j`,`
`)}setMitterLimit(e){this._out(e,` M`,`
`)}save(){this._contextStack.push(this._context()),this._out(`q`,`
`)}restore(){this._out(`Q`,`
`),this._context(this._contextStack.pop())}moveTo(e,t){this._out(e,` `,t,` m`,`
`)}lineTo(e,t){this._out(e,` `,t,` l`,`
`)}bezier(e,t,n,r,i,a){this._out(e,` `,t,` `,n,` `,r,` `,i,` `,a,` c`,`
`)}bezier1(e,t,n,r){this._out(e,` `,t,` `,n,` `,r,` y`,`
`)}bezier2(e,t,n,r){this._out(e,` `,t,` `,n,` `,r,` v`,`
`)}close(){this._out(`h`,`
`)}rect(e,t,n,r){this._out(e,` `,t,` `,n,` `,r,` re`,`
`)}ellipse(e,t,n,r){function i(t){return e+t}function a(e){return t+e}var o=.5522847498307936;this.moveTo(i(0),a(r)),this.bezier(i(n*o),a(r),i(n),a(r*o),i(n),a(0)),this.bezier(i(n),a(-r*o),i(n*o),a(-r),i(0),a(-r)),this.bezier(i(-n*o),a(-r),i(-n),a(-r*o),i(-n),a(0)),this.bezier(i(-n),a(r*o),i(-n*o),a(r),i(0),a(r))}circle(e,t,n){this.ellipse(e,t,n,n)}stroke(){this._out(`S`,`
`)}nop(){this._out(`n`,`
`)}clip(){this._out(`W n`,`
`)}clipStroke(){this._out(`W S`,`
`)}closeStroke(){this._out(`s`,`
`)}fill(){this._out(`f`,`
`)}fillStroke(){this._out(`B`,`
`)}drawImage(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName,` Do`,`
`))}comment(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out(`% `,e,`
`)})}_context(e){if(e!=null)this._opacity=e.opacity,this._matrix=e.matrix;else return{opacity:this._opacity,matrix:this._matrix}}_toPage(e){var t=this._matrix,n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5];return{x:n*e.x+i*e.y+o,y:r*e.x+a*e.y+s}}};function ec(e){return e.replace(/^\s*(['"])(.*)\1\s*$/,`$2`)}function tc(e){var t=/^\s*((normal|italic)\s+)?(([a-z0-9-]+)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i.exec(e);if(!t)return{fontSize:12,fontFamily:`sans-serif`};var n=t[8]?parseInt(t[8],10):12;return{italic:t[2]&&t[2].toLowerCase()==`italic`,variant:t[4],bold:t[6]&&/bold|[6789]00/i.test(t[6]),fontSize:n,lineHeight:t[12]?t[12]==`normal`?n:parseInt(t[12],10):null,fontFamily:t[14].split(/\s*,\s*/g).map(ec)}}function nc(e){function t(t){return e.bold&&(t+=`|bold`),e.italic&&(t+=`|italic`),t.toLowerCase()}var n=e.fontFamily,r,i;if(n instanceof Array)for(var a=0;a<n.length&&(r=t(n[a]),i=Y[r],!i);++a);else i=Y[n.toLowerCase()];for(;typeof i==`function`;)i=i();return i||=`Times-Roman`,i}var Y={serif:`Times-Roman`,"serif|bold":`Times-Bold`,"serif|italic":`Times-Italic`,"serif|bold|italic":`Times-BoldItalic`,"sans-serif":`Helvetica`,"sans-serif|bold":`Helvetica-Bold`,"sans-serif|italic":`Helvetica-Oblique`,"sans-serif|bold|italic":`Helvetica-BoldOblique`,monospace:`Courier`,"monospace|bold":`Courier-Bold`,"monospace|italic":`Courier-Oblique`,"monospace|bold|italic":`Courier-BoldOblique`,zapfdingbats:`ZapfDingbats`,"zapfdingbats|bold":`ZapfDingbats`,"zapfdingbats|italic":`ZapfDingbats`,"zapfdingbats|bold|italic":`ZapfDingbats`};function rc(e,t){e=e.toLowerCase(),Y[e]=function(){return Y[t]},Y[e+`|bold`]=function(){return Y[t+`|bold`]},Y[e+`|italic`]=function(){return Y[t+`|italic`]},Y[e+`|bold|italic`]=function(){return Y[t+`|bold|italic`]}}rc(`Times New Roman`,`serif`),rc(`Courier New`,`monospace`),rc(`Arial`,`sans-serif`),rc(`Helvetica`,`sans-serif`),rc(`Verdana`,`sans-serif`),rc(`Tahoma`,`sans-serif`),rc(`Georgia`,`sans-serif`),rc(`Monaco`,`monospace`),rc(`Andale Mono`,`monospace`);function ic(e,t){if(arguments.length==1)for(var n in e)Ps(e,n)&&ic(n,e[n]);else switch(e=e.toLowerCase(),Y[e]=t,e){case`dejavu sans`:Y[`sans-serif`]=t;break;case`dejavu sans|bold`:Y[`sans-serif|bold`]=t;break;case`dejavu sans|italic`:Y[`sans-serif|italic`]=t;break;case`dejavu sans|bold|italic`:Y[`sans-serif|bold|italic`]=t;break;case`dejavu serif`:Y.serif=t;break;case`dejavu serif|bold`:Y[`serif|bold`]=t;break;case`dejavu serif|italic`:Y[`serif|italic`]=t;break;case`dejavu serif|bold|italic`:Y[`serif|bold|italic`]=t;break;case`dejavu mono`:Y.monospace=t;break;case`dejavu mono|bold`:Y[`monospace|bold`]=t;break;case`dejavu mono|italic`:Y[`monospace|italic`]=t;break;case`dejavu mono|bold|italic`:Y[`monospace|bold|italic`]=t;break}}function ac(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=t[0],l=t[1],u=t[2],d=t[3],f=t[4],p=t[5];return[n*c+r*u,n*l+r*d,i*c+a*u,i*l+a*d,o*c+s*u+f,o*l+s*d+p]}function oc(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0}let sc={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},cc={dash:[4],dashDot:[4,2,1,2],dot:[1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2],solid:[]},lc={butt:0,round:1,square:2},uc={miter:0,round:1,bevel:2};function dc(e,t){var n=e[t.nodeType];return n?n.call.apply(n,arguments):t}function fc(e,t,n){e.options._pdfDebug&&t.comment(`BEGIN: `+e.options._pdfDebug);var r=e.transform(),i=e.opacity();if(t.save(),i!=null&&i<1&&t.setOpacity(i),pc(e,t,n),mc(e,t,n),r){var a=r.matrix();t.transform(a.a,a.b,a.c,a.d,a.e,a.f)}hc(e,t,n),dc({Path:Sc,MultiPath:Cc,Circle:wc,Arc:Tc,Text:Ec,Image:kc,Group:Oc,Rect:Ac},e,t,n),t.restore(),e.options._pdfDebug&&t.comment(`END: `+e.options._pdfDebug)}function pc(e,t){var n=e.stroke&&e.stroke();if(n){var r=n.color;if(r){if(r=jc(r),r==null)return;t.setStrokeColor(r.r,r.g,r.b),r.a!=1&&t.setStrokeOpacity(r.a)}var i=n.width;if(i!=null){if(i===0)return;t.setLineWidth(i)}var a=n.dashType;a&&t.setDashPattern(cc[a],0);var o=n.lineCap;o&&t.setLineCap(lc[o]);var s=n.lineJoin;s&&t.setLineJoin(uc[s]);var c=n.opacity;c!=null&&t.setStrokeOpacity(c)}}function mc(e,t){var n=e.fill&&e.fill();if(n&&!(n instanceof pr||n instanceof _r)){var r=n.color;if(r){if(r=jc(r),r==null)return;t.setFillColor(r.r,r.g,r.b),r.a!=1&&t.setFillOpacity(r.a)}var i=n.opacity;i!=null&&t.setFillOpacity(i)}}function hc(e,t,n){var r=e.clip();r&&(xc(r,t,n),t.clip())}function gc(e){return e&&(e instanceof pr||e instanceof _r||e.color&&!/^(none|transparent)$/i.test(e.color)&&(e.width==null||e.width>0)&&(e.opacity==null||e.opacity>0))}function _c(e,t,n,r){var i=e.fill();if(i instanceof pr){r?t.clipStroke():t.clip();var a=i instanceof gr,o,s;a?(o={x:i.center().x,y:i.center().y,r:0},s={x:i.center().x,y:i.center().y,r:i.radius()}):(o={x:i.start().x,y:i.start().y},s={x:i.end().x,y:i.end().y});var c=i.stops.elements().map(function(e){var t=e.offset();t=/%$/.test(t)?parseFloat(t)/100:parseFloat(t);var n=jc(e.color());return n.a*=e.opacity(),{offset:t,color:n}});c.unshift(c[0]),c.push(c[c.length-1]);var l={userSpace:i.userSpace(),type:a?`radial`:`linear`,start:o,end:s,stops:c},u=e.rawBBox(),d=u.topLeft(),f=u.getSize();return u={left:d.x,top:d.y,width:f.width,height:f.height},t.gradient(l,u),!0}}function vc(e,t,n,r){let i=e.fill();if(i instanceof _r){r?t.clipStroke():t.clip();let n=e.rawBBox(),a=n.topLeft(),o=n.getSize(),s=e.stroke()?e.stroke().width:0;return t.pattern(i,{left:a.x+s/2,top:a.y+s/2,width:o.width-s,height:o.height-s},Dc),!0}}function yc(e,t,n){gc(e.fill())&&gc(e.stroke())?!_c(e,t,n,!0)&&!vc(e,t,n,!0)&&t.fillStroke():gc(e.fill())?!_c(e,t,n,!1)&&!vc(e,t,n,!1)&&t.fill():gc(e.stroke())?t.stroke():t.nop()}function bc(e,t){var n=e.segments;if(n.length==4&&e.options.closed){for(var r=[],i=0;i<n.length;++i){if(n[i].controlIn())return!1;r[i]=n[i].anchor()}if(r[0].y==r[1].y&&r[1].x==r[2].x&&r[2].y==r[3].y&&r[3].x==r[0].x||r[0].x==r[1].x&&r[1].y==r[2].y&&r[2].x==r[3].x&&r[3].y==r[0].y)return t.rect(r[0].x,r[0].y,r[2].x-r[0].x,r[2].y-r[0].y),!0}}function xc(e,t,n){var r=e.segments;if(r.length!==0&&!bc(e,t,n)){for(var i,a=0;a<r.length;++a){var o=r[a],s=o.anchor();if(!i)t.moveTo(s.x,s.y);else{var c=i.controlOut(),l=o.controlIn();c&&l?t.bezier(c.x,c.y,l.x,l.y,s.x,s.y):t.lineTo(s.x,s.y)}i=o}e.options.closed&&t.close()}}function Sc(e,t,n){xc(e,t,n),yc(e,t,n)}function Cc(e,t,n){for(var r=e.paths,i=0;i<r.length;++i)xc(r[i],t,n);yc(e,t,n)}function wc(e,t,n){var r=e.geometry();t.circle(r.center.x,r.center.y,r.radius),yc(e,t,n)}function Tc(e,t,n){var r=e.geometry().curvePoints();t.moveTo(r[0].x,r[0].y);for(var i=1;i<r.length;)t.bezier(r[i].x,r[i++].y,r[i].x,r[i++].y,r[i].x,r[i++].y);yc(e,t,n)}function Ec(e,t){var n=tc(e.options.font),r=e._position,i;t.transform(1,0,0,-1,r.x,r.y+n.fontSize);let a=r=>{t.beginText(),t.setFont(nc(n),n.fontSize),t.setTextRenderingMode(r),t.showText(e.content(),e._pdfRect?e._pdfRect.width():null)};e.fill()&&e.stroke()?(i=sc.fillAndStroke,e.options.paintOrder===`stroke`&&(a(sc.stroke),i=sc.fill)):e.fill()?i=sc.fill:e.stroke()&&(i=sc.stroke),a(i),t.endText()}function Dc(e,t,n){for(var r=e.children,i=0;i<r.length;++i)fc(r[i],t,n)}function Oc(e,t,n){e._pdfLink&&t.addLink(e._pdfLink.url,e._pdfLink);for(var r=e.children,i=0;i<r.length;++i)fc(r[i],t,n)}function kc(e,t){var n=e.src();if(n){var r=e.rect(),i=r.getOrigin(),a=r.getSize();t.transform(a.width,0,0,-a.height,i.x,i.y+a.height),t.drawImage(n)}}function Ac(e,t,n){var r=e.geometry();let[i,a]=r.cornerRadius;i===0&&a===0?(t.rect(r.origin.x,r.origin.y,r.size.width,r.size.height),yc(e,t,n)):Sc(z.fromRect(r,e.options),t,n)}function jc(e){var t=k(e,!0);return t?t.toRGB():null}let X=x.browser||{};function Mc(e){return Array.prototype.slice.call(e)}var Nc=`KENDO-PSEUDO-ELEMENT`;let Pc=`data-kendo-bullet-type`;var Fc={},Z={};Z._root=Z;let Ic=typeof window<`u`?X.msie||X.edge:!1;var Lc=class extends Zn{constructor(e,t,n){super(e,t.getOrigin(),n),this._pdfRect=t}rect(){return this._pdfRect}rawBBox(){return this._pdfRect}},Rc=typeof Element<`u`&&Element.prototype&&(function(e){return e.matches?function(e,t){return e.matches(t)}:e.webkitMatchesSelector?function(e,t){return e.webkitMatchesSelector(t)}:e.mozMatchesSelector?function(e,t){return e.mozMatchesSelector(t)}:e.msMatchesSelector?function(e,t){return e.msMatchesSelector(t)}:function(e){return[].indexOf.call(document.querySelectorAll(e),this)!==-1}})(Element.prototype);(function(e){return e?function t(n){var r=n.cloneNode(!1);if(n.nodeType==1){var i=e(n),a=e(r),o,s=i.data();for(o in s)a.data(o,s[o]);for(/^canvas$/i.test(n.tagName)?r.getContext(`2d`).drawImage(n,0,0):/^(?:input|select|textarea|option)$/i.test(n.tagName)?(r.removeAttribute(`id`),r.removeAttribute(`name`),/^textarea$/i.test(n.tagName)||(r.value=n.value),r.checked=n.checked,r.selected=n.selected):/^img$/i.test(n.tagName)&&r.removeAttribute(`loading`),n._kendoExportVisual&&(r._kendoExportVisual=n._kendoExportVisual),o=n.firstChild;o;o=o.nextSibling)r.appendChild(t(o))}return r}:function(e){let t=(function e(t){let n=t.cloneNode(!1);t._kendoExportVisual&&(n._kendoExportVisual=t._kendoExportVisual);for(let r=t.firstChild;r;r=r.nextSibling)n.appendChild(e(r));return n})(e),n=e.querySelectorAll(`canvas`);n.length&&Mc(t.querySelectorAll(`canvas`)).forEach((e,t)=>{e.getContext(`2d`).drawImage(n[t],0,0)});let r=e.querySelectorAll(`input, select, textarea, option`);return Mc(t.querySelectorAll(`input, select, textarea, option`)).forEach((e,t)=>{e.removeAttribute(`id`),e.removeAttribute(`name`),/^textarea$/i.test(e.tagName)||(e.value=r[t].value),e.checked=r[t].checked,e.selected=r[t].selected}),Mc(t.querySelectorAll(`img`)).forEach(e=>{e.removeAttribute(`loading`)}),t}})(typeof window<`u`&&window.kendo&&window.kendo.jQuery);var zc=(function(){var e=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,t=/^([-0-9.]+%)/,n=/^([-0-9.]+px)/,r=/^(left|right|top|bottom|to|center)\W/,i=/^([-0-9.]+(deg|grad|rad|turn)|0)/,a=/^(\s+)/,o=/^(\()/,s=/^(\))/,c=/^(,)/,l=/^(url)\(/,u=/^(.*?)\)/,d={},f={};function p(f){var p=f;if(Hc(d,p))return d[p];function m(){var e=a.exec(f);e&&(f=f.substr(e[1].length))}function h(e){m();var t=e.exec(f);if(t)return f=f.substr(t[1].length),t[1]}function g(){var e=k(f,!0),r,i;if(e){let a=/^#[0-9a-f]+/i.exec(f)||/^rgba?\(.*?\)/i.exec(f)||/^..*?\b/.exec(f);return f=f.substr(a[0].length),e=e.toRGB(),(r=h(n))||(i=h(t)),{color:e,length:r,percent:i}}}function _(e){var n,a,l,u=[],d=!1;if(h(o)){if(n=h(i),n==`0`&&(n=`0deg`),n?(n=ul(n),h(c)):(a=h(r),a==`to`?a=h(r):a&&/^-/.test(e)&&(d=!0),l=h(r),h(c)),/-moz-/.test(e)&&n==null&&a==null){var p=h(t),m=h(t);d=!0,p==`0%`?a=`left`:p==`100%`&&(a=`right`),m==`0%`?l=`top`:m==`100%`&&(l=`bottom`),h(c)}for(;f&&!h(s);){var _=g();if(!_)break;u.push(_),h(c)}return{type:`linear`,angle:n,to:a&&l?a+` `+l:a||l||null,stops:u,reverse:d}}}function v(){if(h(o)){var e=h(u);return e=e.replace(/^['"]+|["']+$/g,``),h(s),{type:`url`,url:e}}}var y;return(y=h(e))?y=_(y):(y=h(l))&&(y=v()),d[p]=y||{type:`none`}}return function(e){return Hc(f,e)?f[e]:f[e]=Bc(e).map(p)}})(),Bc=(function(){var e={};return function(t,n){n||=/^\s*,\s*/;var r=t+n;if(Hc(e,r))return e[r];var i=[],a=0,o=0,s=0,c=!1,l;function u(e){return l=e.exec(t.substr(o))}function d(e){return e.replace(/^\s+|\s+$/g,``)}for(;o<t.length;)!c&&u(/^[\(\[\{]/)?(s++,o++):!c&&u(/^[\)\]\}]/)?(s--,o++):!c&&u(/^[\"\']/)?(c=l[0],o++):c==`'`&&u(/^\\\'/)||c==`"`&&u(/^\\\"/)?o+=2:c==`'`&&u(/^\'/)||c==`"`&&u(/^\"/)?(c=!1,o++):u(n)?(!c&&!s&&o>a&&(i.push(d(t.substring(a,o))),a=o+l[0].length),o+=l[0].length):o++;return a<o&&i.push(d(t.substring(a,o))),e[r]=i}})(),Vc=(function(e){return function(t){var n=e[t];return n??=e[t]=at(`Mapq`,{font:t}).height,n}})(Object.create(null));function Hc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Uc(e){return e=`_counter_`+e,Z[e]}function Wc(e){var t=[],n=Z;for(e=`_counter_`+e;n;)Hc(n,e)&&t.push(n[e]),n=Object.getPrototypeOf(n);return t.reverse()}function Gc(e,t){var n=Z;for(e=`_counter_`+e;n&&!Hc(n,e);)n=Object.getPrototypeOf(n);n||=Z._root,n[e]=(n[e]||0)+(t??1)}function Kc(e,t){e=`_counter_`+e,Z[e]=t??0}function qc(e,t,n){for(var r=0;r<e.length;){var i=e[r++],a=parseFloat(e[r]);isNaN(a)?t(i,n):(t(i,a),++r)}}function Jc(e){var t=$(e,`counter-reset`);t&&qc(Bc(t,/^\s+/),Kc,0);var n=$(e,`counter-increment`);n&&qc(Bc(n,/^\s+/),Gc,1)}function Yc(e,t){var n=k(e,!0);return n&&(n=n.toRGB(),t?n=n.toCssRgba():n.a===0&&(n=null)),n}function Xc(e){var t=``;do{var n=e%26;t=String.fromCharCode(97+n)+t,e=Math.floor(e/26)}while(e>0);return t}function Zc(e,t,n){Z=Object.create(Z),Z[e.tagName.toLowerCase()]={element:e,style:t};let r=$(t,`text-decoration`);if(r&&r!=`none`){let n=le(e,`text-decoration-color`);r.split(/\s+/g).forEach(function(e){if(!Z[e]&&(Z[e]=n,e==`underline`)){let e=$(t,`text-underline-offset`);e!=`auto`&&(Z[`underline-offset`]=parseFloat(e))}})}tl(t)&&(Z._stackingContext={element:e,group:n})}function Qc(){Z=Object.getPrototypeOf(Z)}function $c(e){if(Z._clipbox!=null){var t=e.bbox(Z._matrix);Z._clipbox?Z._clipbox=L.intersect(Z._clipbox,t):Z._clipbox=t}}function el(){var e=Z._clipbox;if(e==null)return!0;if(e)return e.width()===0||e.height()===0}function tl(e){function t(t){return $(e,t)}if(t(`transform`)!=`none`||t(`position`)!=`static`||t(`z-index`)!=`auto`||t(`opacity`)<1)return!0}function Q(e,t){return window.getComputedStyle(e,t||null)}function $(e,t,n){var r=e.getPropertyValue(t);return(r==null||r===``)&&(X.webkit?r=e.getPropertyValue(`-webkit-`+t):X.mozilla?r=e.getPropertyValue(`-moz-`+t):X.opera?r=e.getPropertyValue(`-o-`+t):Ic&&(r=e.getPropertyValue(`-ms-`+t))),arguments.length>2&&(r==null||r===``)?n:r}function nl(e,t,n,r){e.setProperty(t,n,r),X.webkit?e.setProperty(`-webkit-`+t,n,r):X.mozilla?e.setProperty(`-moz-`+t,n,r):X.opera?e.setProperty(`-o-`+t,n,r):Ic&&(e.setProperty(`-ms-`+t,n,r),t=`ms`+t.replace(/(^|-)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),e[t]=n)}function rl(e,t,n){return n=`border-`+n,{width:parseFloat($(t,n+`-width`)),style:$(t,n+`-style`),color:le(e,n+`-color`)}}function il(e,t){var n=e.style.cssText,r=t();return wt(e,n),r}function al(e,t){var n=$(e,`border-`+t+`-radius`).split(/\s+/g).map(parseFloat);return n.length==1&&n.push(n[0]),ml({x:n[0],y:n[1]})}function ol(e){var t=e.getBoundingClientRect();return t=sl(t,`border-*-width`,e),t=sl(t,`padding-*`,e),t}function sl(e,t,n){var r,i,a,o,s;return typeof t==`string`?(r=Q(n),i=parseFloat($(r,t.replace(`*`,`top`))),a=parseFloat($(r,t.replace(`*`,`right`))),o=parseFloat($(r,t.replace(`*`,`bottom`))),s=parseFloat($(r,t.replace(`*`,`left`)))):typeof t==`number`&&(i=a=o=s=t),{top:e.top+i,right:e.right-a,bottom:e.bottom-o,left:e.left+s,width:e.right-e.left-a-s,height:e.bottom-e.top-o-i}}function cl(e){var t=$(e,`transform`);if(t==`none`)return null;var n=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(t);if(n){var r=$(e,`transform-origin`);return n=n[1].split(/\s*,\s*/g).map(parseFloat),r=r.split(/\s+/g).map(parseFloat),{matrix:n,origin:r}}}function ll(e){return 180*e/Math.PI%360}function ul(e){var t=parseFloat(e);if(/grad$/.test(e))return Math.PI*t/200;if(/rad$/.test(e))return t;if(/turn$/.test(e))return Math.PI*t*2;if(/deg$/.test(e))return Math.PI*t/180}function dl(e,t){return t=new P(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function fl(e,t){e.clip(t)}function pl(e,t,n,r){for(var i=new Zt([t,n],r).curvePoints(),a=1;a<i.length;)e.curveTo(i[a++],i[a++],i[a++])}function ml(e){return(e.x<=0||e.y<=0)&&(e.x=e.y=0),e}function hl(e,t,n,r,i){var a=Math.max(0,t.x),o=Math.max(0,t.y),s=Math.max(0,n.x),c=Math.max(0,n.y),l=Math.max(0,r.x),u=Math.max(0,r.y),d=Math.max(0,i.x),f=Math.max(0,i.y),p=Math.min(e.width/(a+s),e.height/(c+u),e.width/(l+d),e.height/(f+o));return p<1&&(a*=p,o*=p,s*=p,c*=p,l*=p,u*=p,d*=p,f*=p),{tl:{x:a,y:o},tr:{x:s,y:c},br:{x:l,y:u},bl:{x:d,y:f}}}function gl(e,t,n){var r=Q(e),i=al(r,`top-left`),a=al(r,`top-right`),o=al(r,`bottom-left`),s=al(r,`bottom-right`);if(n==`padding`||n==`content`){var c=rl(e,r,`top`),l=rl(e,r,`right`),u=rl(e,r,`bottom`),d=rl(e,r,`left`);if(i.x-=d.width,i.y-=c.width,a.x-=l.width,a.y-=c.width,s.x-=l.width,s.y-=u.width,o.x-=d.width,o.y-=u.width,n==`content`){var f=parseFloat($(r,`padding-top`)),p=parseFloat($(r,`padding-right`)),m=parseFloat($(r,`padding-bottom`)),h=parseFloat($(r,`padding-left`));i.x-=h,i.y-=f,a.x-=p,a.y-=f,s.x-=p,s.y-=m,o.x-=h,o.y-=m}}return typeof n==`number`&&(i.x-=n,i.y-=n,a.x-=n,a.y-=n,s.x-=n,s.y-=n,o.x-=n,o.y-=n),_l(t,i,a,s,o)}function _l(e,t,n,r,i){var a=hl(e,t,n,r,i),o=a.tl,s=a.tr,c=a.br,l=a.bl,u=new z({fill:null,stroke:null});return u.moveTo(e.left,e.top+o.y),o.x&&pl(u,e.left+o.x,e.top+o.y,{startAngle:-180,endAngle:-90,radiusX:o.x,radiusY:o.y}),u.lineTo(e.right-s.x,e.top),s.x&&pl(u,e.right-s.x,e.top+s.y,{startAngle:-90,endAngle:0,radiusX:s.x,radiusY:s.y}),u.lineTo(e.right,e.bottom-c.y),c.x&&pl(u,e.right-c.x,e.bottom-c.y,{startAngle:0,endAngle:90,radiusX:c.x,radiusY:c.y}),u.lineTo(e.left+l.x,e.bottom),l.x&&pl(u,e.left+l.x,e.bottom-l.y,{startAngle:90,endAngle:180,radiusX:l.x,radiusY:l.y}),u.close()}function vl(e,t){var n=String(parseFloat(e));switch(t){case`decimal-leading-zero`:return n.length<2&&(n=`0`+n),n;case`lower-roman`:return ve(e).toLowerCase();case`upper-roman`:return ve(e).toUpperCase();case`lower-latin`:case`lower-alpha`:return Xc(e-1);case`upper-latin`:case`upper-alpha`:return Xc(e-1).toUpperCase();default:return n}}function yl(e,t){function n(e,t,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,`$2`),Wc(e).map(function(e){return vl(e,t)}).join(n)):vl(Uc(e)||0,t)}var r=Bc(t,/^\s+/),i=[],a;return r.forEach(function(t){var r;(a=/^\s*(["'])(.*)\1\s*$/.exec(t))?i.push(a[2].replace(/\\([0-9a-f]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})):(a=/^\s*counter\((.*?)\)\s*$/.exec(t))?(r=Bc(a[1]),i.push(n(r[0],r[1]))):(a=/^\s*counters\((.*?)\)\s*$/.exec(t))?(r=Bc(a[1]),i.push(n(r[0],r[2],r[1]))):(a=/^\s*attr\((.*?)\)\s*$/.exec(t))?i.push(e.getAttribute(a[1])||``):i.push(t)}),i.join(``)}function bl(e){if(e.cssText)return e.cssText;for(var t=[],n=0;n<e.length;++n)t.push(e[n]+`: `+$(e,e[n]));return t.join(`;
`)}function xl(e,t){if(e.tagName==Nc){Sl(e,t);return}let n=[];function r(t,r){let i=Q(e,t),a=i.content;if(Jc(i),a&&a!=`normal`&&a!=`none`&&i.width!=`0px`){let t=e.ownerDocument.createElement(Nc);wt(t,bl(i)),t.textContent=yl(e,a),e.insertBefore(t,r),n.push(t)}}if(r(`:before`,e.firstChild),r(`:after`,null),n.length>0){let r=e.className;e.className+=` kendo-pdf-hide-pseudo-elements`,Sl(e,t),e.className=r,n.forEach(function(t){e.removeChild(t)})}else Sl(e,t)}function Sl(e,t){var n=Q(e),r=rl(e,n,`top`),i=rl(e,n,`right`),a=rl(e,n,`bottom`),o=rl(e,n,`left`),s=al(n,`top-left`),c=al(n,`top-right`),l=al(n,`bottom-left`),u=al(n,`bottom-right`),d=$(n,`direction`),f=Yc(le(e,`background-color`)),p=zc($(n,`background-image`)),m=Bc($(n,`background-repeat`)),h=Bc($(n,`background-position`)),g=Bc($(n,`background-origin`)),_=Bc($(n,`background-size`)),v,y;Ic&&(v=n.textOverflow,v==`ellipsis`&&(y=e.style.textOverflow,e.style.textOverflow=`clip`)),X.msie&&X.version<10&&(h=Bc(e.currentStyle.backgroundPosition));var b=sl(e.getBoundingClientRect(),`border-*-width`,e);(function(){var e=$(n,`clip`),r=/^\s*rect\((.*)\)\s*$/.exec(e);if(r){var i=r[1].split(/[ ,]+/g),a=i[0]==`auto`?b.top:parseFloat(i[0])+b.top,o=i[1]==`auto`?b.right:parseFloat(i[1])+b.left,s=i[2]==`auto`?b.bottom:parseFloat(i[2])+b.top,c=i[3]==`auto`?b.left:parseFloat(i[3])+b.left,l=new B,u=new z().moveTo(c,a).lineTo(o,a).lineTo(o,s).lineTo(c,s).close();fl(l,u),t.append(l),t=l,$c(u)}})();var x,S,C,w=$(n,`display`);if(w==`table-row`)for(x=[],S=0,C=e.children;S<C.length;++S)x.push(C[S].getBoundingClientRect());else x=e.getClientRects(),x.length==1&&(x=[e.getBoundingClientRect()]);for(x=ee(x),S=0;S<x.length;++S)te(x[S],S===0,S==x.length-1);if(e.tagName==`A`&&e.href&&!/^#?$/.test(e.getAttribute(`href`))&&(!Z._avoidLinks||!Rc(e,Z._avoidLinks))){let n=document.createRange();n.selectNodeContents(e),Mc(n.getClientRects()).forEach(function(n){let r=new B;r._pdfLink={url:e.href,top:n.top,right:n.right,bottom:n.bottom,left:n.left},t.append(r)})}return x.length>0&&w==`list-item`&&!e.getAttribute(`kendo-no-bullet`)&&O(x[0]),(function(){function r(){var n=gl(e,b,`padding`),r=new B;fl(r,n),t.append(r),t=r,$c(n)}(Ol(e)||/^(hidden|auto|scroll)/.test($(n,`overflow`))||/^(hidden|auto|scroll)/.test($(n,`overflow-x`))||/^(hidden|auto|scroll)/.test($(n,`overflow-y`)))&&r()})(),!wl(e,t)&&!Tl(e,t)&&Nl(e,t),Ic&&v==`ellipsis`&&(e.style.textOverflow=y),t;function ee(t){if(/^td$/i.test(e.tagName)){var n=Z.table;if(n&&$(n.style,`border-collapse`)==`collapse`){var r=rl(n.element,n.style,`left`).width,i=rl(n.element,n.style,`top`).width;if(r===0&&i===0)return t;var a=n.element.getBoundingClientRect(),o=n.element.rows[0].cells[0].getBoundingClientRect();if(o.top==a.top||o.left==a.left)return Mc(t).map(function(e){return{left:e.left+r,top:e.top+i,right:e.right+r,bottom:e.bottom+i,height:e.height,width:e.width}})}}return t}function T(e,n,r,i,a,o,s,c){if(r<=0)return;var l,u=new B;dl(u,c),t.append(u),ml(o),ml(s),l=new z({fill:{color:e},stroke:null}),u.append(l),l.moveTo(o.x?Math.max(o.x,i):0,0).lineTo(n-(s.x?Math.max(s.x,a):0),0).lineTo(n-Math.max(s.x,a),r).lineTo(Math.max(o.x,i),r).close(),o.x&&d(i,o,[-1,0,0,1,o.x,0]),s.x&&d(a,s,[1,0,0,1,n-s.x,0]);function d(t,n,i){var a=Math.PI/2*t/(t+r),o={x:n.x-t,y:n.y-r},s=new z({fill:{color:e},stroke:null}).moveTo(0,0);dl(s,i),pl(s,0,n.y,{startAngle:-90,endAngle:-ll(a),radiusX:n.x,radiusY:n.y}),o.x>0&&o.y>0?(s.lineTo(o.x*Math.cos(a),n.y-o.y*Math.sin(a)),pl(s,0,n.y,{startAngle:-ll(a),endAngle:-90,radiusX:o.x,radiusY:o.y,anticlockwise:!0})):o.x>0?s.lineTo(o.x,r).lineTo(0,r):s.lineTo(o.x,r).lineTo(o.x,0),u.append(s.close())}}function E(e){var n=new B;if(fl(n,_l(e,s,c,u,l)),t.append(n),f){var r=new z({fill:{color:f.toCssRgba()},stroke:null});r.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),n.append(r)}for(var i=p.length;--i>=0;)D(n,e,p[i],m[i%m.length],h[i%h.length],g[i%g.length],_[i%_.length])}function D(t,n,r,i,a,o,s){if(!r||r==`none`)return;if(r.type==`url`){var c=Fc[r.url];c&&c.width>0&&c.height>0&&l(t,n,c.width,c.height,function(e,t){e.append(new Qn(r.url,t))})}else if(r.type==`linear`)l(t,n,n.width,n.height,Cl(r));else return;function l(t,n,r,c,l){var u=r/c,d,f=n;if(o==`content-box`?(f=sl(f,`border-*-width`,e),f=sl(f,`padding-*`,e)):o==`padding-box`&&(f=sl(f,`border-*-width`,e)),!/^\s*auto(\s+auto)?\s*$/.test(s))if(s==`contain`)d=Math.min(f.width/r,f.height/c),r*=d,c*=d;else if(s==`cover`)d=Math.max(f.width/r,f.height/c),r*=d,c*=d;else{var p=s.split(/\s+/g);r=/%$/.test(p[0])?f.width*parseFloat(p[0])/100:parseFloat(p[0]),c=p.length==1||p[1]==`auto`?r/u:/%$/.test(p[1])?f.height*parseFloat(p[1])/100:parseFloat(p[1])}var m=String(a);switch(m){case`bottom`:m=`50% 100%`;break;case`top`:m=`50% 0`;break;case`left`:m=`0 50%`;break;case`right`:m=`100% 50%`;break;case`center`:m=`50% 50%`;break}m=m.split(/\s+/),m.length==1&&(m[1]=`50%`),/%$/.test(m[0])?m[0]=parseFloat(m[0])/100*(f.width-r):m[0]=parseFloat(m[0]),/%$/.test(m[1])?m[1]=parseFloat(m[1])/100*(f.height-c):m[1]=parseFloat(m[1]);var h=new L([f.left+m[0],f.top+m[1]],[r,c]);function g(){for(;h.origin.x>n.left;)h.origin.x-=r}function _(){for(;h.origin.y>n.top;)h.origin.y-=c}function v(){for(;h.origin.x<n.right;)l(t,h.clone()),h.origin.x+=r}if(i==`no-repeat`)l(t,h);else if(i==`repeat-x`)g(),v();else if(i==`repeat-y`)for(_();h.origin.y<n.bottom;)l(t,h.clone()),h.origin.y+=c;else if(i==`repeat`){g(),_();for(var y=h.origin.clone();h.origin.y<n.bottom;)h.origin.x=y.x,v(),h.origin.y+=c}}}function O(){var r=$(n,`list-style-type`);if(r==`none`)return;var i=$(n,`list-style-position`);function a(n){il(e,function(){e.style.position=`relative`;var r=e.ownerDocument.createElement(Nc);r.style.position=`absolute`,r.style.boxSizing=`border-box`,i==`outside`?(r.style.width=`6em`,r.style.left=`-6.8em`,r.style.textAlign=`right`):r.style.left=`0px`,n(r),e.insertBefore(r,e.firstChild),Il(r,t),e.removeChild(r)})}function o(t){var n=e.parentNode.children,r=e.getAttribute(`kendo-split-index`);if(r!=null)return t(r|0,n.length);for(var i=0;i<n.length;++i)if(n[i]===e)return t(i,n.length)}switch(r){case`circle`:case`disc`:case`square`:a(function(e){e.innerHTML=` `,e.setAttribute(Pc,r)});break;case`decimal`:case`decimal-leading-zero`:a(function(e){o(function(t){++t,r==`decimal-leading-zero`&&t<10&&(t=`0`+t),e.innerHTML=t+`.`})});break;case`lower-roman`:case`upper-roman`:a(function(e){o(function(t){t=ve(t+1),r==`upper-roman`&&(t=t.toUpperCase()),e.innerHTML=t+`.`})});break;case`lower-latin`:case`lower-alpha`:case`upper-latin`:case`upper-alpha`:a(function(e){o(function(t){t=Xc(t),/^upper/i.test(r)&&(t=t.toUpperCase()),e.innerHTML=t+`.`})});break}}function te(n,f,p){if(n.width===0||n.height===0)return;E(n);var m=o.width>0&&(f&&d==`ltr`||p&&d==`rtl`),h=i.width>0&&(p&&d==`ltr`||f&&d==`rtl`);if(r.width===0&&o.width===0&&i.width===0&&a.width===0)return;if(r.color==i.color&&r.color==a.color&&r.color==o.color&&r.width==i.width&&r.width==a.width&&r.width==o.width&&m&&h){n=sl(n,r.width/2);var g=gl(e,n,r.width/2);g.options.stroke={color:r.color,width:r.width},t.append(g);return}if(s.x===0&&c.x===0&&u.x===0&&l.x===0&&r.width<2&&o.width<2&&i.width<2&&a.width<2){r.width>0&&t.append(new z({stroke:{width:r.width,color:r.color}}).moveTo(n.left,n.top+r.width/2).lineTo(n.right,n.top+r.width/2)),a.width>0&&t.append(new z({stroke:{width:a.width,color:a.color}}).moveTo(n.left,n.bottom-a.width/2).lineTo(n.right,n.bottom-a.width/2)),m&&t.append(new z({stroke:{width:o.width,color:o.color}}).moveTo(n.left+o.width/2,n.top).lineTo(n.left+o.width/2,n.bottom)),h&&t.append(new z({stroke:{width:i.width,color:i.color}}).moveTo(n.right-i.width/2,n.top).lineTo(n.right-i.width/2,n.bottom));return}var _=hl(n,s,c,u,l),v=_.tl,y=_.tr,b=_.br,x=_.bl;T(r.color,n.width,r.width,o.width,i.width,v,y,[1,0,0,1,n.left,n.top]),T(a.color,n.width,a.width,i.width,o.width,b,x,[-1,0,0,-1,n.right,n.bottom]);function S(e){return{x:e.y,y:e.x}}T(o.color,n.height,o.width,a.width,r.width,S(x),S(v),[0,-1,1,0,n.left,n.bottom]),T(i.color,n.height,i.width,r.width,a.width,S(y),S(b),[0,1,-1,0,n.right,n.top])}}function Cl(e){return function(t,n){var r=n.width(),i=n.height();switch(e.type){case`linear`:var a=e.angle==null?Math.PI:e.angle;switch(e.to){case`top`:a=0;break;case`left`:a=-Math.PI/2;break;case`bottom`:a=Math.PI;break;case`right`:a=Math.PI/2;break;case`top left`:case`left top`:a=-Math.atan2(i,r);break;case`top right`:case`right top`:a=Math.atan2(i,r);break;case`bottom left`:case`left bottom`:a=Math.PI+Math.atan2(i,r);break;case`bottom right`:case`right bottom`:a=Math.PI-Math.atan2(i,r);break}e.reverse&&(a-=Math.PI),a%=2*Math.PI,a<0&&(a+=2*Math.PI);var o=Math.abs(r*Math.sin(a))+Math.abs(i*Math.cos(a)),s=Math.atan(r*Math.tan(a)/i),c=Math.sin(s),l=Math.cos(s),u=Math.abs(c)+Math.abs(l),d=u/2*c,f=u/2*l;a>Math.PI/2&&a<=3*Math.PI/2&&(d=-d,f=-f);var p=[],m=0,h=e.stops.map(function(t,n){var r=t.percent;r?r=parseFloat(r)/100:t.length?r=parseFloat(t.length)/o:n===0?r=0:n==e.stops.length-1&&(r=1);var i={color:t.color.toCssRgba(),offset:r};return r==null?p.push({left:m,stop:i}):(m=r,p.forEach(function(e,t){var n=e.stop;n.offset=e.left+(m-e.left)*(t+1)/(p.length+1)}),p=[]),i}),g=[.5-d,.5+f],_=[.5+d,.5-f];t.append(z.fromRect(n).stroke(null).fill(new hr({start:g,end:_,stops:h,userSpace:!1})));break;case`radial`:window.console&&window.console.log&&window.console.log(`Radial gradients are not yet supported in HTML renderer`);break}}}function wl(e,t){let n=null;if(window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr(`role`))){let t=window.kendo.widgetInstance(window.kendo.jQuery(e));t&&(t.exportDOMVisual||t.exportVisual)&&(n=t.exportDOMVisual?t.exportDOMVisual():t.exportVisual())}if(n===null&&e._kendoExportVisual){let t=e.getBoundingClientRect(),r={width:t.width,height:t.height};n=e._kendoExportVisual(r)}if(!n)return!1;let r=new B;r.children.push(n);let i=e.getBoundingClientRect();return r.transform(R().translate(i.left,i.top)),t.append(r),!0}function Tl(e,t){let n=e.getAttribute(Pc);if(!n)return!1;var r=e.getBoundingClientRect();let i=le(e,`color`);if(n===`square`){let e=r.height/5;t.append(new or(new L([r.right-e,r.top+r.height/2.1],[e,e])).fill(i).stroke(i))}else{let e=r.height/7,a=new Gt(new Rt([r.right-e,r.top+(r.height+e)/2],e));n===`circle`?a.stroke(i,.5):a.fill(i).stroke(null),t.append(a)}return!0}function El(e,t,n){var r=ol(e),i=new Qn(t,new L([r.left,r.top],[r.width,r.height]));fl(i,gl(e,r,`content`)),n.append(i)}function Dl(e,t){var n=Q(e),r=Q(t),i=parseFloat($(n,`z-index`)),a=parseFloat($(r,`z-index`)),o=$(n,`position`),s=$(r,`position`);return isNaN(i)&&isNaN(a)?/static|absolute/.test(o)&&/static|absolute/.test(s)?0:o==`static`?-1:+(s==`static`):isNaN(i)?a===0?0:a>0?-1:1:isNaN(a)?i===0?0:i>0?1:-1:parseFloat(i)-parseFloat(a)}function Ol(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function kl(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Al(e,t){Q(e);var n=le(e,`color`),r=e.getBoundingClientRect();e.type==`checkbox`?(t.append(z.fromRect(new L([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(n,1)),e.checked&&t.append(new z().stroke(n,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(t.append(new Gt(new Rt([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(n,1)),e.checked&&t.append(new Gt(new Rt([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(n).stroke(null)))}function jl(e,t){var n=e.tagName.toLowerCase();if(n==`input`&&(e.type==`checkbox`||e.type==`radio`))return Al(e,t);var r=e.parentNode,i=e.ownerDocument,a=i.createElement(Nc),o;if(wt(a,bl(Q(e))),n==`input`&&(a.style.whiteSpace=`pre`),(n==`select`||n==`textarea`)&&(a.style.overflow=`auto`),n==`select`)if(e.multiple)for(var s=0;s<e.options.length;++s)o=i.createElement(Nc),wt(o,bl(Q(e.options[s]))),o.style.display=`block`,o.textContent=e.options[s].textContent,a.appendChild(o);else o=kl(e),o&&(a.textContent=o.textContent);else a.textContent=e.value;r.insertBefore(a,e),a.scrollLeft=e.scrollLeft,a.scrollTop=e.scrollTop,e.style.display=`none`,Nl(a,t),e.style.display=``,r.removeChild(a)}function Ml(e){let t=new window.XMLSerializer,n=t.serializeToString(e);if(X.mozilla&&!(e.getAttribute(`width`)&&e.getAttribute(`height`))){let r=new window.DOMParser().parseFromString(n,`image/svg+xml`).documentElement,i=ol(e);r.setAttribute(`width`,i.width),r.setAttribute(`height`,i.height),n=t.serializeToString(r)}return n}function Nl(e,t){switch(Z._stackingContext.element===e&&(Z._stackingContext.group=t),e.tagName.toLowerCase()){case`img`:El(e,e.src,t);break;case`svg`:El(e,`data:image/svg+xml;base64,${Ae(Ml(e))}`,t);break;case`canvas`:try{El(e,e.toDataURL(`image/png`),t)}catch{}break;case`textarea`:case`input`:case`select`:jl(e,t);break;default:for(var n=[],r=[],i=[],a=e.firstChild;a;a=a.nextSibling)switch(a.nodeType){case 3:/\S/.test(a.data)&&Pl(e,a,t);break;case 1:var o=Q(a),s=$(o,`float`);$(o,`position`)==`static`?s==`none`?n.push(a):r.push(a):i.push(a);break}Fe(n,Dl).forEach(function(e){Il(e,t)}),Fe(r,Dl).forEach(function(e){Il(e,t)}),Fe(i,Dl).forEach(function(e){Il(e,t)})}}function Pl(e,t,n){if(el())return;var r=Q(e);if(parseFloat($(r,`text-indent`))<-500)return;var i=t.data,a=0,o=i.search(/\S\s*$/)+1;if(!o)return;var s=$(r,`font-size`),c=$(r,`line-height`),l=[$(r,`font-style`),$(r,`font-variant`),$(r,`font-weight`),s,$(r,`font-family`)].join(` `);if(s=parseFloat(s),c=parseFloat(c),s===0||isNaN(s))return;var u=le(e,`color`),d=e.ownerDocument.createRange(),f=$(r,`text-align`)==`justify`,p=$(r,`column-count`,1),m=$(r,`white-space`),h=$(r,`text-transform`),g=e.getBoundingClientRect().width/s*5;g===0&&(g=500);var _=null,v=Z.underline,y=Z[`line-through`],b=Z.overline,x=Z[`underline-offset`];for(v&&S(D);!w(););(y||b)&&S(E);return;function S(e){d.selectNode(t);let n=Mc(d.getClientRects());S=e=>n.forEach(e),S(e)}function C(e){if(Ic||X.chrome||X.safari){for(var t=e.getClientRects(),n={top:1/0,right:-1/0,bottom:-1/0,left:1/0},r=!1,i=0;i<t.length;++i){var a=t[i];a.width<=1||a.bottom===_||(n.left=Math.min(a.left,n.left),n.top=Math.min(a.top,n.top),n.right=Math.max(a.right,n.right),n.bottom=Math.max(a.bottom,n.bottom),r=!0)}return r?(n.width=n.right-n.left,n.height=n.bottom-n.top,n):e.getBoundingClientRect()}return e.getBoundingClientRect()}function w(){var e=a,n,r=i.substr(a).search(/\S/);if(a+=r,r<0||a>=o)return!0;d.setStart(t,a),d.setEnd(t,a+1),n=C(d);var s=!1;if((f||p>1)&&(r=i.substr(a).search(/\s/),r>=0)){d.setEnd(t,a+r);var c=C(d);c.bottom==n.bottom&&(n=c,s=!0,a+=r)}if(!s){if(r=(function e(r,i,a){d.setEnd(t,i);var o=C(d);return o.bottom!=n.bottom&&r<i?e(r,r+i>>1,i):o.right==n.right?i:(n=o,i<a?e(i,i+a>>1,a):i)})(a,Math.min(o,a+g),o),r==a)return!0;if(a=r,r=d.toString().search(/\s+$/),r===0)return!1;r>0&&(d.setEnd(t,d.startOffset+r),n=C(d))}Ic&&(n=d.getClientRects()[0]);var l=d.toString();if(!/^(?:pre|pre-wrap)$/i.test(m))l=l.replace(/\s+/g,` `);else if(/\t/.test(l)){var u=0;for(r=e;r<d.startOffset;++r){var h=i.charCodeAt(r);h==9?u+=8-u%8:h==10||h==13?u=0:u++}for(;(r=l.search(` `))>=0;){var v=` `.substr(0,8-(u+r)%8);l=l.substr(0,r)+v+l.substr(r+1)}}s||(_=n.bottom),ee(l,n)}function ee(e,t){if(Ic&&!isNaN(c)){var r=Vc(l),i=(t.top+t.bottom-r)/2;t={top:i,right:t.right,bottom:i+r,left:t.left,height:r,width:t.right-t.left}}switch(h){case`uppercase`:e=e.toUpperCase();break;case`lowercase`:e=e.toLowerCase();break;case`capitalize`:e=e.replace(/(?:^|\s)\S/g,e=>e.toUpperCase());break}var a=new Lc(e,new L([t.left,t.top],[t.width,t.height]),{font:l,fill:{color:u}});n.append(a)}function T(e,t,r,i){if(r){var a=new z({stroke:{width:e,color:r}});i-=e,a.moveTo(t.left,i).lineTo(t.right,i),n.append(a)}}function E(e){let t=s/12;T(t,e,y,e.bottom-e.height/2.7),T(t,e,b,e.top)}function D(e){let t=s/12,n=e.bottom;x==null?n+=t:n+=x,T(t,e,v,n)}}function Fl(e,t,n){var r;n==`auto`?(r=t,n=0):(r=Z._stackingContext.group,n=parseFloat(n));for(var i=r.children,a=0;a<i.length&&!(i[a]._dom_zIndex!=null&&i[a]._dom_zIndex>n);++a);var o=new B;if(r.insert(a,o),o._dom_zIndex=n,r!==t&&Z._clipbox){var s=Z._matrix.invert(),c=Z._clipbox.transformCopy(s);fl(o,z.fromRect(c))}return o}function Il(e,t){var n=Q(e);if(Jc(n),!/^(style|script|link|meta|iframe|col|colgroup)$/i.test(e.tagName)&&Z._clipbox!=null){var r=parseFloat($(n,`opacity`)),i=$(n,`visibility`),a=$(n,`display`);if(r!==0&&i!=`hidden`&&a!=`none`){var o=cl(n),s,c=$(n,`z-index`);(o||r<1)&&c==`auto`&&(c=0),s=Fl(e,t,c),r<1&&s.opacity(r*s.opacity()),Zc(e,n,s),o?il(e,function(){nl(e.style,`transform`,`none`,`important`),nl(e.style,`transition`,`none`,`important`),$(n,`position`)==`static`&&nl(e.style,`position`,`relative`,`important`);var t=e.getBoundingClientRect(),r=t.left+o.origin[0],i=t.top+o.origin[1],a=[1,0,0,1,-r,-i];a=Ll(a,o.matrix),a=Ll(a,[1,0,0,1,r,i]),a=dl(s,a),Z._matrix=Z._matrix.multiplyCopy(a),xl(e,s)}):xl(e,s),Qc()}}}function Ll(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=t[0],l=t[1],u=t[2],d=t[3],f=t[4],p=t[5];return[n*c+r*u,n*l+r*d,i*c+a*u,i*l+a*d,o*c+s*u+f,o*l+s*d+p]}let Rl={id:`color`,name:`Color utils`,category:`framework`,advanced:!0,description:`Color utilities used across components`,depends:[`core`]};window.kendo=window.kendo||{};let zl;function Bl(){return typeof document>`u`?null:(zl||(zl=document.createElement(`span`),zl.setAttribute(`aria-hidden`,`true`),zl.style.cssText=`position:absolute;left:-10000px;top:-10000px;visibility:hidden;pointer-events:none;`,(document.body||document.documentElement).appendChild(zl)),zl)}function Vl(e){if(typeof e!=`string`)return null;let t=Bl();if(!t)return null;let n=t.style.color;if(t.style.color=``,t.style.color=e,!t.style.color)return t.style.color=n,null;let r=k(le(t,`color`),!0);return t.style.color=n,r}function Hl(e,t){let n=k(e,!0);if(n||!e||e===`none`||e instanceof oe)return n||t?n:k(e,t);let r=Vl(e);return r||t?r:k(e,t)}kendo.deepExtend(kendo,{parseColor:Hl,namedColors:w,Color:oe}),e.__meta__=Rl});
//# sourceMappingURL=kendo.color.min.js.map