presenter 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PresenterExport=t():e.PresenterExport=t()}(this,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{exportAllSlides:()=>U,exportCurrentSlideContainer:()=>V,renderCurrentSlide:()=>H,renderPresentationAsImages:()=>M});const n=(()=>{let e=0;return()=>(e+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${e}`)})();function r(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function o(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function i(e,t={}){return{width:t.width||function(e){const t=o(e,"border-left-width"),n=o(e,"border-right-width");return e.clientWidth+t+n}(e),height:t.height||function(e){const t=o(e,"border-top-width"),n=o(e,"border-bottom-width");return e.clientHeight+t+n}(e)}}const a=16384;function c(e){return new Promise(((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e}))}const s=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return null!==n&&(n.constructor.name===t.name||s(n,t))};function l(e,t,o){const i=window.getComputedStyle(e,o),a=i.getPropertyValue("content");if(""===a||"none"===a)return;const c=n();try{t.className=`${t.className} ${c}`}catch(e){return}const s=document.createElement("style");s.appendChild(function(e,t,n){const o=`.${e}:${t}`,i=n.cssText?function(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}(n):function(e){return r(e).map((t=>`${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t)?" !important":""};`)).join(" ")}(n);return document.createTextNode(`${o}{${i}}`)}(c,o,i)),t.appendChild(s)}const u="application/font-woff",d="image/jpeg",h={woff:u,woff2:u,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:d,jpeg:d,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function f(e){const t=function(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}(e).toLowerCase();return h[t]||""}function p(e){return-1!==e.search(/^(data:)/)}function g(e,t){return`data:${t};base64,${e}`}async function m(e,t,n){const r=await fetch(e,t);if(404===r.status)throw new Error(`Resource "${r.url}" not found`);const o=await r.blob();return new Promise(((e,t)=>{const i=new FileReader;i.onerror=t,i.onloadend=()=>{try{e(n({res:r,result:i.result}))}catch(e){t(e)}},i.readAsDataURL(o)}))}const y={};async function w(e,t,n){const r=function(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}(e,t,n.includeQueryParams);if(null!=y[r])return y[r];let o;n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());try{const r=await m(e,n.fetchRequestInit,(({res:e,result:n})=>(t||(t=e.headers.get("Content-Type")||""),function(e){return e.split(/,/)[1]}(n))));o=g(r,t)}catch(t){o=n.imagePlaceholder||"";let r=`Failed to fetch resource: ${e}`;t&&(r="string"==typeof t?t:t.message),r&&console.warn(r)}return y[r]=o,o}const b=e=>null!=e.tagName&&"SLOT"===e.tagName.toUpperCase();async function v(e,t,n){return n||!t.filter||t.filter(e)?Promise.resolve(e).then((e=>async function(e,t){return s(e,HTMLCanvasElement)?async function(e){const t=e.toDataURL();return"data:,"===t?e.cloneNode(!1):c(t)}(e):s(e,HTMLVideoElement)?async function(e,t){if(e.currentSrc){const t=document.createElement("canvas"),n=t.getContext("2d");return t.width=e.clientWidth,t.height=e.clientHeight,null==n||n.drawImage(e,0,0,t.width,t.height),c(t.toDataURL())}const n=e.poster,r=f(n);return c(await w(n,r,t))}(e,t):s(e,HTMLIFrameElement)?async function(e){var t;try{if(null===(t=null==e?void 0:e.contentDocument)||void 0===t?void 0:t.body)return await v(e.contentDocument.body,{},!0)}catch(e){}return e.cloneNode(!1)}(e):e.cloneNode(!1)}(e,t))).then((n=>async function(e,t,n){var o,i;let a=[];return a=b(e)&&e.assignedNodes?r(e.assignedNodes()):s(e,HTMLIFrameElement)&&(null===(o=e.contentDocument)||void 0===o?void 0:o.body)?r(e.contentDocument.body.childNodes):r((null!==(i=e.shadowRoot)&&void 0!==i?i:e).childNodes),0===a.length||s(e,HTMLVideoElement)||await a.reduce(((e,r)=>e.then((()=>v(r,n))).then((e=>{e&&t.appendChild(e)}))),Promise.resolve()),t}(e,n,t))).then((t=>function(e,t){return s(t,Element)&&(function(e,t){const n=t.style;if(!n)return;const o=window.getComputedStyle(e);o.cssText?(n.cssText=o.cssText,n.transformOrigin=o.transformOrigin):r(o).forEach((r=>{let i=o.getPropertyValue(r);if("font-size"===r&&i.endsWith("px")){const e=Math.floor(parseFloat(i.substring(0,i.length-2)))-.1;i=`${e}px`}s(e,HTMLIFrameElement)&&"display"===r&&"inline"===i&&(i="block"),"d"===r&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),n.setProperty(r,i,o.getPropertyPriority(r))}))}(e,t),function(e,t){l(e,t,":before"),l(e,t,":after")}(e,t),function(e,t){s(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),s(e,HTMLInputElement)&&t.setAttribute("value",e.value)}(e,t),function(e,t){if(s(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find((t=>e.value===t.getAttribute("value")));r&&r.setAttribute("selected","")}}(e,t)),t}(e,t))).then((e=>async function(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(0===n.length)return e;const r={};for(let o=0;o<n.length;o++){const i=n[o].getAttribute("xlink:href");if(i){const n=e.querySelector(i),o=document.querySelector(i);n||!o||r[i]||(r[i]=await v(o,t,!0))}}const o=Object.values(r);if(o.length){const t="http://www.w3.org/1999/xhtml",n=document.createElementNS(t,"svg");n.setAttribute("xmlns",t),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";const r=document.createElementNS(t,"defs");n.appendChild(r);for(let e=0;e<o.length;e++)r.appendChild(o[e]);e.appendChild(n)}return e}(e,t))):null}const S=/url\((['"]?)([^'"]+?)\1\)/g,x=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,E=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function C(e){return-1!==e.search(S)}async function P(e,t,n){if(!C(e))return e;const r=function(e,{preferredFontFormat:t}){return t?e.replace(E,(e=>{for(;;){const[n,,r]=x.exec(e)||[];if(!r)return"";if(r===t)return`src: ${n};`}})):e}(e,n),o=function(e){const t=[];return e.replace(S,((e,n,r)=>(t.push(r),e))),t.filter((e=>!p(e)))}(r);return o.reduce(((e,r)=>e.then((e=>async function(e,t,n,r,o){try{const i=n?function(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}(t,n):t,a=f(t);let c;return c=o?g(await o(i),a):await w(i,a,r),e.replace(function(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}(t),`$1${c}$3`)}catch(e){}return e}(e,r,t,n)))),Promise.resolve(r))}async function $(e,t,n){var r;const o=null===(r=t.style)||void 0===r?void 0:r.getPropertyValue(e);if(o){const r=await P(o,null,n);return t.style.setProperty(e,r,t.style.getPropertyPriority(e)),!0}return!1}async function T(e,t){s(e,Element)&&(await async function(e,t){await $("background",e,t)||await $("background-image",e,t),await $("mask",e,t)||await $("mask-image",e,t)}(e,t),await async function(e,t){const n=s(e,HTMLImageElement);if((!n||p(e.src))&&(!s(e,SVGImageElement)||p(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,o=await w(r,f(r),t);await new Promise(((t,r)=>{e.onload=t,e.onerror=r;const i=e;i.decode&&(i.decode=t),"lazy"===i.loading&&(i.loading="eager"),n?(e.srcset="",e.src=o):e.href.baseVal=o}))}(e,t),await async function(e,t){const n=r(e.childNodes).map((e=>T(e,t)));await Promise.all(n).then((()=>e))}(e,t))}const R={};async function N(e){let t=R[e];if(null!=t)return t;const n=await fetch(e);return t={url:e,cssText:await n.text()},R[e]=t,t}async function A(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,o=(n.match(/url\([^)]+\)/g)||[]).map((async o=>{let i=o.replace(r,"$1");return i.startsWith("https://")||(i=new URL(i,e.url).href),m(i,t.fetchRequestInit,(({result:e})=>(n=n.replace(o,`url(${e})`),[o,e])))}));return Promise.all(o).then((()=>n))}function k(e){if(null==e)return[];const t=[];let n=e.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const e=r.exec(n);if(null===e)break;t.push(e[0])}n=n.replace(r,"");const o=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let e=o.exec(n);if(null===e){if(e=i.exec(n),null===e)break;o.lastIndex=i.lastIndex}else i.lastIndex=o.lastIndex;t.push(e[0])}return t}async function L(e,t){const n=null!=t.fontEmbedCSS?t.fontEmbedCSS:t.skipFonts?null:await async function(e,t){const n=await async function(e,t){if(null==e.ownerDocument)throw new Error("Provided element is not within a Document");const n=r(e.ownerDocument.styleSheets),o=await async function(e,t){const n=[],o=[];return e.forEach((n=>{if("cssRules"in n)try{r(n.cssRules||[]).forEach(((e,r)=>{if(e.type===CSSRule.IMPORT_RULE){let i=r+1;const a=N(e.href).then((e=>A(e,t))).then((e=>k(e).forEach((e=>{try{n.insertRule(e,e.startsWith("@import")?i+=1:n.cssRules.length)}catch(t){console.error("Error inserting rule from remote css",{rule:e,error:t})}})))).catch((e=>{console.error("Error loading remote css",e.toString())}));o.push(a)}}))}catch(r){const i=e.find((e=>null==e.href))||document.styleSheets[0];null!=n.href&&o.push(N(n.href).then((e=>A(e,t))).then((e=>k(e).forEach((e=>{i.insertRule(e,n.cssRules.length)})))).catch((e=>{console.error("Error loading remote stylesheet",e)}))),console.error("Error inlining remote css file",r)}})),Promise.all(o).then((()=>(e.forEach((e=>{if("cssRules"in e)try{r(e.cssRules||[]).forEach((e=>{n.push(e)}))}catch(t){console.error(`Error while reading CSS rules from ${e.href}`,t)}})),n)))}(n,t);return function(e){return e.filter((e=>e.type===CSSRule.FONT_FACE_RULE)).filter((e=>C(e.style.getPropertyValue("src"))))}(o)}(e,t);return(await Promise.all(n.map((e=>{const n=e.parentStyleSheet?e.parentStyleSheet.href:null;return P(e.cssText,n,t)})))).join("\n")}(e,t);if(n){const t=document.createElement("style"),r=document.createTextNode(n);t.appendChild(r),e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}}async function O(e,t={}){const{width:n,height:r}=i(e,t),o=await v(e,t,!0);return await L(o,t),await T(o,t),function(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;null!=r&&Object.keys(r).forEach((e=>{n[e]=r[e]}))}(o,t),await async function(e,t,n){const r="http://www.w3.org/2000/svg",o=document.createElementNS(r,"svg"),i=document.createElementNS(r,"foreignObject");return o.setAttribute("width",`${t}`),o.setAttribute("height",`${n}`),o.setAttribute("viewBox",`0 0 ${t} ${n}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),o.appendChild(i),i.appendChild(e),async function(e){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(e))).then(encodeURIComponent).then((e=>`data:image/svg+xml;charset=utf-8,${e}`))}(o)}(o,n,r)}async function j(e,t={}){return(await async function(e,t={}){const{width:n,height:r}=i(e,t),o=await O(e,t),s=await c(o),l=document.createElement("canvas"),u=l.getContext("2d"),d=t.pixelRatio||function(){let e,t;try{t=process}catch(e){}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}(),h=t.canvasWidth||n,f=t.canvasHeight||r;return l.width=h*d,l.height=f*d,t.skipAutoScale||function(e){(e.width>a||e.height>a)&&(e.width>a&&e.height>a?e.width>e.height?(e.height*=a/e.width,e.width=a):(e.width*=a/e.height,e.height=a):e.width>a?(e.height*=a/e.width,e.width=a):(e.width*=a/e.height,e.height=a))}(l),l.style.width=`${h}`,l.style.height=`${f}`,t.backgroundColor&&(u.fillStyle=t.backgroundColor,u.fillRect(0,0,l.width,l.height)),u.drawImage(s,0,0,l.width,l.height),l}(e,t)).toDataURL()}var I=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},D=function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}};function H(e,t){return I(this,void 0,void 0,(function(){var n,r;return D(this,(function(o){switch(o.label){case 0:return[4,j(e.svg,{canvasWidth:e.boundingBox.width/2,canvasHeight:e.boundingBox.height/2})];case 1:return n=o.sent(),(r=document.createElement("a")).download=t,r.href=n,document.body.appendChild(r),r.click(),document.body.removeChild(r),[2]}}))}))}function M(e){return I(this,void 0,void 0,(function(){var t,n,r,o,i,a,c;return D(this,(function(s){switch(s.label){case 0:if(!e)throw new Error("No presentation provided");t=0,n=0,r=e.slides,s.label=1;case 1:if(!(n<r.length))return[3,6];o=r[n],i=0,a=o.getKeyBuilds(),s.label=2;case 2:return i<a.length?(c=a[i],t++,o.render(e,c),[4,H(e,"".concat(String(t).padStart(3,"0"),".png"))]):[3,5];case 3:s.sent(),s.label=4;case 4:return i++,[3,2];case 5:return n++,[3,1];case 6:return[2]}}))}))}function V(e,t,n){return I(this,void 0,void 0,(function(){var r,o,i,a,c,s,l;return D(this,(function(u){switch(u.label){case 0:return r=e.boundingBox,o=r.width,i=r.height,[4,j(e.background,{canvasWidth:o/2,canvasHeight:i/2})];case 1:return a=u.sent(),c=e.additionalElementContainer.querySelector("canvas"),s=c?c.toDataURL():null,[4,j(e.svg,{canvasWidth:o/2,canvasHeight:i/2})];case 2:return l=u.sent(),[4,fetch("".concat(n,"/export"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:t,backgroundDataUrl:a,canvasDataUrl:s,svgDataUrl:l})})];case 3:return u.sent(),[2]}}))}))}function U(e,t){return I(this,void 0,void 0,(function(){var n,r,o,i,a,c,s;return D(this,(function(l){switch(l.label){case 0:if(!e)throw new Error("No presentation provided");n=0,r=0,o=e.slides,l.label=1;case 1:if(!(r<o.length))return[3,6];i=o[r],a=0,c=i.getKeyBuilds(),l.label=2;case 2:return a<c.length?(s=c[a],n++,i.render(e,s),[4,V(e,"".concat(String(n).padStart(3,"0"),".png"),t)]):[3,5];case 3:l.sent(),l.label=4;case 4:return a++,[3,2];case 5:return r++,[3,1];case 6:return[4,fetch("".concat(t,"/generate-pdf"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:"".concat(e.title,".pdf"),images:Array(n).fill(null).map((function(e,t){return"".concat(String(t+1).padStart(3,"0"),".png")}))})})];case 7:return l.sent(),[2]}}))}))}return t})()));
1
+ /*! For license information please see presenter-export.js.LICENSE.txt */
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.PresenterExport=e():t.PresenterExport=e()}(this,(()=>(()=>{var t,e,r,n,i={8937:t=>{"use strict";var e={}.hasOwnProperty,r=/[ -,\.\/:-@\[-\^`\{-~]/,n=/[ -,\.\/:-@\[\]\^`\{-~]/,i=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,a=function t(a,o){"single"!=(o=function(t,r){if(!t)return r;var n={};for(var i in r)n[i]=e.call(t,i)?t[i]:r[i];return n}(o,t.options)).quotes&&"double"!=o.quotes&&(o.quotes="single");for(var s="double"==o.quotes?'"':"'",u=o.isIdentifier,l=a.charAt(0),c="",h=0,f=a.length;h<f;){var d=a.charAt(h++),p=d.charCodeAt(),g=void 0;if(p<32||p>126){if(p>=55296&&p<=56319&&h<f){var m=a.charCodeAt(h++);56320==(64512&m)?p=((1023&p)<<10)+(1023&m)+65536:h--}g="\\"+p.toString(16).toUpperCase()+" "}else g=o.escapeEverything?r.test(d)?"\\"+d:"\\"+p.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(d)?"\\"+p.toString(16).toUpperCase()+" ":"\\"==d||!u&&('"'==d&&s==d||"'"==d&&s==d)||u&&n.test(d)?"\\"+d:d;c+=g}return u&&(/^-[-\d]/.test(c)?c="\\-"+c.slice(1):/\d/.test(l)&&(c="\\3"+l+" "+c.slice(1))),c=c.replace(i,(function(t,e,r){return e&&e.length%2?t:(e||"")+r})),!u&&o.wrap?s+c+s:c};a.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},a.version="3.0.0",t.exports=a},7833:t=>{var e=/[a-z0-9_-]/i,r=/[\s\t]/,n=/[^a-z0-9_-]/i;t.exports={parse:function(t){for(var n,i,a=!0,o=0,s="",u=0,l=[];;){if(i=t[u],0===o){if(!i&&a)break;if(!i&&!a)throw new Error("Parse error");if('"'===i||"'"===i)n=i,o=1,a=!1;else if(r.test(i));else{if(!e.test(i))throw new Error("Parse error");o=3,a=!1,u--}}else if(1===o){if(!i)throw new Error("Parse Error");"\\"===i?o=2:i===n?(l.push(s),s="",o=4):s+=i}else if(2===o){if(i!==n&&"\\"!==i)throw new Error("Parse error");s+=i,o=1}else if(3===o){if(!i){l.push(s);break}e.test(i)?s+=i:","===i?(l.push(s),s="",o=0):r.test(i)?o=5:"\\"===i&&(o=6)}else if(6===o){if(/[0-9a-f]/i.test(i))throw new Error("Parse error");s+=i,o=3}else if(5===o){if(!i){l.push(s);break}if(e.test(i))s+=" "+i,o=3;else if(","===i)l.push(s),s="",o=0;else if(!r.test(i))throw new Error("Parse error")}else if(4===o){if(!i)break;if(","===i)o=0;else if(!r.test(i))throw new Error("Parse error")}u++}return l},stringify:function(t,e){var r=e&&e.quote||'"';if('"'!==r&&"'"!==r)throw new Error("Quote must be `'` or `\"`");for(var i=new RegExp(r,"g"),a=[],o=0;o<t.length;++o){var s=t[o];n.test(s)&&(s=r+(s=s.replace(/\\/g,"\\\\").replace(i,"\\"+r))+r),a.push(s)}return a.join(", ")}}},3230:(t,e,r)=>{"use strict";t.exports=r(823)},2310:t=>{"use strict";var e=2*Math.PI;function r(t,e,r,n){var i=t*r+e*n;return i>1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)}function n(t,e){var r=4/3*Math.tan(e/4),n=Math.cos(t),i=Math.sin(t),a=Math.cos(t+e),o=Math.sin(t+e);return[n,i,n-i*r,i+n*r,a+o*r,o-a*r,a,o]}t.exports=function(t,i,a,o,s,u,l,c,h){var f=Math.sin(h*e/360),d=Math.cos(h*e/360),p=d*(t-a)/2+f*(i-o)/2,g=-f*(t-a)/2+d*(i-o)/2;if(0===p&&0===g)return[];if(0===l||0===c)return[];l=Math.abs(l),c=Math.abs(c);var m=p*p/(l*l)+g*g/(c*c);m>1&&(l*=Math.sqrt(m),c*=Math.sqrt(m));var v=function(t,n,i,a,o,s,u,l,c,h){var f=h*(t-i)/2+c*(n-a)/2,d=-c*(t-i)/2+h*(n-a)/2,p=u*u,g=l*l,m=f*f,v=d*d,b=p*g-p*v-g*m;b<0&&(b=0),b/=p*v+g*m;var y=(b=Math.sqrt(b)*(o===s?-1:1))*u/l*d,w=b*-l/u*f,x=h*y-c*w+(t+i)/2,S=c*y+h*w+(n+a)/2,A=(f-y)/u,N=(d-w)/l,L=(-f-y)/u,k=(-d-w)/l,_=r(1,0,A,N),P=r(A,N,L,k);return 0===s&&P>0&&(P-=e),1===s&&P<0&&(P+=e),[x,S,_,P]}(t,i,a,o,s,u,l,c,f,d),b=[],y=v[2],w=v[3],x=Math.max(Math.ceil(Math.abs(w)/(e/4)),1);w/=x;for(var S=0;S<x;S++)b.push(n(y,w)),y+=w;return b.map((function(t){for(var e=0;e<t.length;e+=2){var r=t[e+0],n=t[e+1],i=d*(r*=l)-f*(n*=c),a=f*r+d*n;t[e+0]=i+v[0],t[e+1]=a+v[1]}return t}))}},7604:t=>{"use strict";var e=1e-10,r=Math.PI/180;function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);this.rx=t,this.ry=e,this.ax=r}n.prototype.transform=function(t){var n=Math.cos(this.ax*r),i=Math.sin(this.ax*r),a=[this.rx*(t[0]*n+t[2]*i),this.rx*(t[1]*n+t[3]*i),this.ry*(-t[0]*i+t[2]*n),this.ry*(-t[1]*i+t[3]*n)],o=a[0]*a[0]+a[2]*a[2],s=a[1]*a[1]+a[3]*a[3],u=((a[0]-a[3])*(a[0]-a[3])+(a[2]+a[1])*(a[2]+a[1]))*((a[0]+a[3])*(a[0]+a[3])+(a[2]-a[1])*(a[2]-a[1])),l=(o+s)/2;if(u<e*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var c=a[0]*a[1]+a[2]*a[3],h=l+(u=Math.sqrt(u))/2,f=l-u/2;return this.ax=Math.abs(c)<e&&Math.abs(h-s)<e?90:180*Math.atan(Math.abs(c)>Math.abs(h-s)?(h-o)/c:c/(h-s))/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(f)):(this.ax+=90,this.rx=Math.sqrt(f),this.ry=Math.sqrt(h)),this},n.prototype.isDegenerate=function(){return this.rx<e*this.ry||this.ry<e*this.rx},t.exports=n},9793:t=>{"use strict";function e(){if(!(this instanceof e))return new e;this.queue=[],this.cache=null}e.prototype.matrix=function(t){return 1===t[0]&&0===t[1]&&0===t[2]&&1===t[3]&&0===t[4]&&0===t[5]||(this.cache=null,this.queue.push(t)),this},e.prototype.translate=function(t,e){return 0===t&&0===e||(this.cache=null,this.queue.push([1,0,0,1,t,e])),this},e.prototype.scale=function(t,e){return 1===t&&1===e||(this.cache=null,this.queue.push([t,0,0,e,0,0])),this},e.prototype.rotate=function(t,e,r){var n,i,a;return 0!==t&&(this.translate(e,r),n=t*Math.PI/180,i=Math.cos(n),a=Math.sin(n),this.queue.push([i,a,-a,i,0,0]),this.cache=null,this.translate(-e,-r)),this},e.prototype.skewX=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,0,Math.tan(t*Math.PI/180),1,0,0])),this},e.prototype.skewY=function(t){return 0!==t&&(this.cache=null,this.queue.push([1,Math.tan(t*Math.PI/180),0,1,0,0])),this},e.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],1===this.queue.length)return this.cache;for(var t=1;t<this.queue.length;t++)this.cache=(e=this.cache,r=this.queue[t],[e[0]*r[0]+e[2]*r[1],e[1]*r[0]+e[3]*r[1],e[0]*r[2]+e[2]*r[3],e[1]*r[2]+e[3]*r[3],e[0]*r[4]+e[2]*r[5]+e[4],e[1]*r[4]+e[3]*r[5]+e[5]]);var e,r;return this.cache},e.prototype.calc=function(t,e,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),[t*(n=this.cache)[0]+e*n[2]+(r?0:n[4]),t*n[1]+e*n[3]+(r?0:n[5])]):[t,e]},t.exports=e},4015:t=>{"use strict";var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function n(t){return t>=48&&t<=57}function i(t){this.index=0,this.path=t,this.max=t.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function a(t){for(;t.index<t.max&&(10===(e=t.path.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&r.indexOf(e)>=0);)t.index++;var e}function o(t){var e=t.path.charCodeAt(t.index);return 48===e?(t.param=0,void t.index++):49===e?(t.param=1,void t.index++):void(t.err="SvgPath: arc flag can be 0 or 1 only (at pos "+t.index+")")}function s(t){var e,r=t.index,i=r,a=t.max,o=!1,s=!1,u=!1,l=!1;if(i>=a)t.err="SvgPath: missed param (at pos "+i+")";else if(43!==(e=t.path.charCodeAt(i))&&45!==e||(e=++i<a?t.path.charCodeAt(i):0),n(e)||46===e){if(46!==e){if(o=48===e,e=++i<a?t.path.charCodeAt(i):0,o&&i<a&&e&&n(e))return void(t.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+r+")");for(;i<a&&n(t.path.charCodeAt(i));)i++,s=!0;e=i<a?t.path.charCodeAt(i):0}if(46===e){for(l=!0,i++;n(t.path.charCodeAt(i));)i++,u=!0;e=i<a?t.path.charCodeAt(i):0}if(101===e||69===e){if(l&&!s&&!u)return void(t.err="SvgPath: invalid float exponent (at pos "+i+")");if(43!==(e=++i<a?t.path.charCodeAt(i):0)&&45!==e||i++,!(i<a&&n(t.path.charCodeAt(i))))return void(t.err="SvgPath: invalid float exponent (at pos "+i+")");for(;i<a&&n(t.path.charCodeAt(i));)i++}t.index=i,t.param=parseFloat(t.path.slice(r,i))+0}else t.err="SvgPath: param should start with 0..9 or `.` (at pos "+i+")"}function u(t){var r,n;n=(r=t.path[t.segmentStart]).toLowerCase();var i=t.data;if("m"===n&&i.length>2&&(t.result.push([r,i[0],i[1]]),i=i.slice(2),n="l",r="m"===r?"l":"L"),"r"===n)t.result.push([r].concat(i));else for(;i.length>=e[n]&&(t.result.push([r].concat(i.splice(0,e[n]))),e[n]););}function l(t){var r,n,i,l,c,h,f=t.max;if(t.segmentStart=t.index,n=97==(32|(r=t.path.charCodeAt(t.index))),function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}(r))if(l=e[t.path[t.index].toLowerCase()],t.index++,a(t),t.data=[],l){for(i=!1;;){for(c=l;c>0;c--){if(!n||3!==c&&4!==c?s(t):o(t),t.err.length)return void u(t);t.data.push(t.param),a(t),i=!1,t.index<f&&44===t.path.charCodeAt(t.index)&&(t.index++,a(t),i=!0)}if(!i){if(t.index>=t.max)break;if(!((h=t.path.charCodeAt(t.index))>=48&&h<=57||43===h||45===h||46===h))break}}u(t)}else u(t);else t.err="SvgPath: bad command "+t.path[t.index]+" (at pos "+t.index+")"}t.exports=function(t){var e=new i(t),r=e.max;for(a(e);e.index<r&&!e.err.length;)l(e);return e.result.length&&("mM".indexOf(e.result[0][0])<0?(e.err="SvgPath: string should start with `M` or `m`",e.result=[]):e.result[0][0]="M"),{err:e.err,segments:e.result}}},823:(t,e,r)=>{"use strict";var n=r(4015),i=r(8778),a=r(9793),o=r(2310),s=r(7604);function u(t){if(!(this instanceof u))return new u(t);var e=n(t);this.segments=e.segments,this.err=e.err,this.__stack=[]}u.from=function(t){if("string"==typeof t)return new u(t);if(t instanceof u){var e=new u("");return e.err=t.err,e.segments=t.segments.map((function(t){return t.slice()})),e.__stack=t.__stack.map((function(t){return a().matrix(t.toArray())})),e}throw new Error("SvgPath.from: invalid param type "+t)},u.prototype.__matrix=function(t){var e,r=this;t.queue.length&&this.iterate((function(n,i,a,o){var u,l,c,h;switch(n[0]){case"v":l=0===(u=t.calc(0,n[1],!0))[0]?["v",u[1]]:["l",u[0],u[1]];break;case"V":l=(u=t.calc(a,n[1],!1))[0]===t.calc(a,o,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":l=0===(u=t.calc(n[1],0,!0))[1]?["h",u[0]]:["l",u[0],u[1]];break;case"H":l=(u=t.calc(n[1],o,!1))[1]===t.calc(a,o,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var f=t.toArray(),d=s(n[1],n[2],n[3]).transform(f);if(f[0]*f[3]-f[1]*f[2]<0&&(n[5]=n[5]?"0":"1"),u=t.calc(n[6],n[7],"a"===n[0]),"A"===n[0]&&n[6]===a&&n[7]===o||"a"===n[0]&&0===n[6]&&0===n[7]){l=["a"===n[0]?"l":"L",u[0],u[1]];break}l=d.isDegenerate()?["a"===n[0]?"l":"L",u[0],u[1]]:[n[0],d.rx,d.ry,d.ax,n[4],n[5],u[0],u[1]];break;case"m":h=i>0,l=["m",(u=t.calc(n[1],n[2],h))[0],u[1]];break;default:for(l=[c=n[0]],h=c.toLowerCase()===c,e=1;e<n.length;e+=2)u=t.calc(n[e],n[e+1],h),l.push(u[0],u[1])}r.segments[i]=l}),!0)},u.prototype.__evaluateStack=function(){var t,e;if(this.__stack.length){if(1===this.__stack.length)return this.__matrix(this.__stack[0]),void(this.__stack=[]);for(t=a(),e=this.__stack.length;--e>=0;)t.matrix(this.__stack[e].toArray());this.__matrix(t),this.__stack=[]}},u.prototype.toString=function(){var t="",e="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var a=this.segments[n],o=a[0];o!==e||"m"===o||"M"===o?("m"===o&&"z"===e&&(t+=" "),t+=o,r=!1):r=!0;for(var s=1;s<a.length;s++){var u=a[s];1===s?r&&u>=0&&(t+=" "):u>=0&&(t+=" "),t+=u}e=o}return t},u.prototype.translate=function(t,e){return this.__stack.push(a().translate(t,e||0)),this},u.prototype.scale=function(t,e){return this.__stack.push(a().scale(t,e||0===e?e:t)),this},u.prototype.rotate=function(t,e,r){return this.__stack.push(a().rotate(t,e||0,r||0)),this},u.prototype.skewX=function(t){return this.__stack.push(a().skewX(t)),this},u.prototype.skewY=function(t){return this.__stack.push(a().skewY(t)),this},u.prototype.matrix=function(t){return this.__stack.push(a().matrix(t)),this},u.prototype.transform=function(t){return t.trim()?(this.__stack.push(i(t)),this):this},u.prototype.round=function(t){var e,r=0,n=0,i=0,a=0;return t=t||0,this.__evaluateStack(),this.segments.forEach((function(o){var s=o[0].toLowerCase()===o[0];switch(o[0]){case"H":case"h":return s&&(o[1]+=i),i=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"V":case"v":return s&&(o[1]+=a),a=o[1]-o[1].toFixed(t),void(o[1]=+o[1].toFixed(t));case"Z":case"z":return i=r,void(a=n);case"M":case"m":return s&&(o[1]+=i,o[2]+=a),i=o[1]-o[1].toFixed(t),a=o[2]-o[2].toFixed(t),r=i,n=a,o[1]=+o[1].toFixed(t),void(o[2]=+o[2].toFixed(t));case"A":case"a":return s&&(o[6]+=i,o[7]+=a),i=o[6]-o[6].toFixed(t),a=o[7]-o[7].toFixed(t),o[1]=+o[1].toFixed(t),o[2]=+o[2].toFixed(t),o[3]=+o[3].toFixed(t+2),o[6]=+o[6].toFixed(t),void(o[7]=+o[7].toFixed(t));default:return e=o.length,s&&(o[e-2]+=i,o[e-1]+=a),i=o[e-2]-o[e-2].toFixed(t),a=o[e-1]-o[e-1].toFixed(t),void o.forEach((function(e,r){r&&(o[r]=+o[r].toFixed(t))}))}})),this},u.prototype.iterate=function(t,e){var r,n,i,a=this.segments,o={},s=!1,u=0,l=0,c=0,h=0;if(e||this.__evaluateStack(),a.forEach((function(e,r){var n=t(e,r,u,l);Array.isArray(n)&&(o[r]=n,s=!0);var i=e[0]===e[0].toLowerCase();switch(e[0]){case"m":case"M":return u=e[1]+(i?u:0),l=e[2]+(i?l:0),c=u,void(h=l);case"h":case"H":return void(u=e[1]+(i?u:0));case"v":case"V":return void(l=e[1]+(i?l:0));case"z":case"Z":return u=c,void(l=h);default:u=e[e.length-2]+(i?u:0),l=e[e.length-1]+(i?l:0)}})),!s)return this;for(i=[],r=0;r<a.length;r++)if(void 0!==o[r])for(n=0;n<o[r].length;n++)i.push(o[r][n]);else i.push(a[r]);return this.segments=i,this},u.prototype.abs=function(){return this.iterate((function(t,e,r,n){var i,a=t[0],o=a.toUpperCase();if(a!==o)switch(t[0]=o,a){case"v":return void(t[1]+=n);case"a":return t[6]+=r,void(t[7]+=n);default:for(i=1;i<t.length;i++)t[i]+=i%2?r:n}}),!0),this},u.prototype.rel=function(){return this.iterate((function(t,e,r,n){var i,a=t[0],o=a.toLowerCase();if(a!==o&&(0!==e||"M"!==a))switch(t[0]=o,a){case"V":return void(t[1]-=n);case"A":return t[6]-=r,void(t[7]-=n);default:for(i=1;i<t.length;i++)t[i]-=i%2?r:n}}),!0),this},u.prototype.unarc=function(){return this.iterate((function(t,e,r,n){var i,a,s,u=[],l=t[0];return"A"!==l&&"a"!==l?null:("a"===l?(a=r+t[6],s=n+t[7]):(a=t[6],s=t[7]),0===(i=o(r,n,a,s,t[4],t[5],t[1],t[2],t[3])).length?[["a"===t[0]?"l":"L",t[6],t[7]]]:(i.forEach((function(t){u.push(["C",t[2],t[3],t[4],t[5],t[6],t[7]])})),u))})),this},u.prototype.unshort=function(){var t,e,r,n,i,a=this.segments;return this.iterate((function(o,s,u,l){var c,h=o[0],f=h.toUpperCase();s&&("T"===f?(c="t"===h,"Q"===(r=a[s-1])[0]?(t=r[1]-u,e=r[2]-l):"q"===r[0]?(t=r[1]-r[3],e=r[2]-r[4]):(t=0,e=0),n=-t,i=-e,c||(n+=u,i+=l),a[s]=[c?"q":"Q",n,i,o[1],o[2]]):"S"===f&&(c="s"===h,"C"===(r=a[s-1])[0]?(t=r[3]-u,e=r[4]-l):"c"===r[0]?(t=r[3]-r[5],e=r[4]-r[6]):(t=0,e=0),n=-t,i=-e,c||(n+=u,i+=l),a[s]=[c?"c":"C",n,i,o[1],o[2],o[3],o[4]]))})),this},t.exports=u},8778:(t,e,r)=>{"use strict";var n=r(9793),i={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},a=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,o=/[\s,]+/;t.exports=function(t){var e,r,s=new n;return t.split(a).forEach((function(t){if(t.length)if(void 0===i[t])switch(r=t.split(o).map((function(t){return+t||0})),e){case"matrix":return void(6===r.length&&s.matrix(r));case"scale":return void(1===r.length?s.scale(r[0],r[0]):2===r.length&&s.scale(r[0],r[1]));case"rotate":return void(1===r.length?s.rotate(r[0],0,0):3===r.length&&s.rotate(r[0],r[1],r[2]));case"translate":return void(1===r.length?s.translate(r[0],0):2===r.length&&s.translate(r[0],r[1]));case"skewX":return void(1===r.length&&s.skewX(r[0]));case"skewY":return void(1===r.length&&s.skewY(r[0]))}else e=t})),s}},2284:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r.d(e,{A:()=>n})}},a={};function o(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return i[t].call(r.exports,r,r.exports,o),r.exports}o.m=i,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);o.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var s=2&n&&r;"object"==typeof s&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>r[t]));return a.default=()=>r,o.d(i,a),i},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,r)=>(o.f[r](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r={},n="presenter:",o.l=(t,e,i,a)=>{if(r[t])r[t].push(e);else{var s,u;if(void 0!==i)for(var l=document.getElementsByTagName("script"),c=0;c<l.length;c++){var h=l[c];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==n+i){s=h;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",n+i),s.src=t),r[t]=[e];var f=(e,n)=>{s.onerror=s.onload=null,clearTimeout(d);var i=r[t];if(delete r[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((t=>t(n))),e)return e(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),u&&document.head.appendChild(s)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={649:0};o.f.j=(e,r)=>{var n=o.o(t,e)?t[e]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=t[e]=[r,i]));r.push(n[2]=i);var a=o.p+o.u(e),s=new Error;o.l(a,(r=>{if(o.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,n[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var n,i,[a,s,u]=r,l=0;if(a.some((e=>0!==t[e]))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);u&&u(o)}for(e&&e(r);l<a.length;l++)i=a[l],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},r=this.webpackChunkpresenter=this.webpackChunkpresenter||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var s={};return(()=>{"use strict";o.r(s),o.d(s,{exportAllSlides:()=>zi,exportCurrentSlideContainer:()=>Ui,exportToPDF:()=>Hi,renderCurrentSlide:()=>Ri,renderPresentationAsImages:()=>Di});var t=o(2284),e=Uint8Array,r=Uint16Array,n=Int32Array,i=new e([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,0,0,0]),a=new e([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,0,0]),u=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=function(t,e){for(var i=new r(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var o=new n(i[30]);for(a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return{b:i,r:o}},c=l(i,2),h=c.b,f=c.r;h[28]=258,f[258]=28;for(var d=l(a,0),p=d.b,g=d.r,m=new r(32768),v=0;v<32768;++v){var b=(43690&v)>>1|(21845&v)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,m[v]=((65280&b)>>8|(255&b)<<8)>>1}var y=function(t,e,n){for(var i=t.length,a=0,o=new r(e);a<i;++a)t[a]&&++o[t[a]-1];var s,u=new r(e);for(a=1;a<e;++a)u[a]=u[a-1]+o[a-1]<<1;if(n){s=new r(1<<e);var l=15-e;for(a=0;a<i;++a)if(t[a])for(var c=a<<4|t[a],h=e-t[a],f=u[t[a]-1]++<<h,d=f|(1<<h)-1;f<=d;++f)s[m[f]>>l]=c}else for(s=new r(i),a=0;a<i;++a)t[a]&&(s[a]=m[u[t[a]-1]++]>>15-t[a]);return s},w=new e(288);for(v=0;v<144;++v)w[v]=8;for(v=144;v<256;++v)w[v]=9;for(v=256;v<280;++v)w[v]=7;for(v=280;v<288;++v)w[v]=8;var x=new e(32);for(v=0;v<32;++v)x[v]=5;var S=y(w,9,0),A=y(w,9,1),N=y(x,5,0),L=y(x,5,1),k=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},_=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(7&e)&r},P=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},F=function(t){return(t+7)/8|0},C=function(t,r,n){return(null==r||r<0)&&(r=0),(null==n||n>t.length)&&(n=t.length),new e(t.subarray(r,n))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],I=function(t,e,r){var n=new Error(e||M[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,I),!r)throw n;return n},j=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},O=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8,t[n+2]|=r>>16},T=function(t,n){for(var i=[],a=0;a<t.length;++a)t[a]&&i.push({s:a,f:t[a]});var o=i.length,s=i.slice();if(!o)return{t:z,l:0};if(1==o){var u=new e(i[0].s+1);return u[i[0].s]=1,{t:u,l:1}}i.sort((function(t,e){return t.f-e.f})),i.push({s:-1,f:25001});var l=i[0],c=i[1],h=0,f=1,d=2;for(i[0]={s:-1,f:l.f+c.f,l,r:c};f!=o-1;)l=i[i[h].f<i[d].f?h++:d++],c=i[h!=f&&i[h].f<i[d].f?h++:d++],i[f++]={s:-1,f:l.f+c.f,l,r:c};var p=s[0].s;for(a=1;a<o;++a)s[a].s>p&&(p=s[a].s);var g=new r(p+1),m=E(i[f-1],g,0);if(m>n){a=0;var v=0,b=m-n,y=1<<b;for(s.sort((function(t,e){return g[e.s]-g[t.s]||t.f-e.f}));a<o;++a){var w=s[a].s;if(!(g[w]>n))break;v+=y-(1<<m-g[w]),g[w]=n}for(v>>=b;v>0;){var x=s[a].s;g[x]<n?v-=1<<n-g[x]++-1:++a}for(;a>=0&&v;--a){var S=s[a].s;g[S]==n&&(--g[S],++v)}m=n}return{t:new e(g),l:m}},E=function(t,e,r){return-1==t.s?Math.max(E(t.l,e,r+1),E(t.r,e,r+1)):e[t.s]=r},B=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new r(++e),i=0,a=t[0],o=1,s=function(t){n[i++]=t},u=1;u<=e;++u)if(t[u]==a&&u!=e)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=t[u]}return{c:n.subarray(0,i),n:e}},q=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},R=function(t,e,r){var n=r.length,i=F(e+2);t[i]=255&n,t[i+1]=n>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<n;++a)t[i+a+4]=r[a];return 8*(i+4+n)},D=function(t,e,n,o,s,l,c,h,f,d,p){j(e,p++,n),++s[256];for(var g=T(s,15),m=g.t,v=g.l,b=T(l,15),A=b.t,L=b.l,k=B(m),_=k.c,P=k.n,F=B(A),C=F.c,M=F.n,I=new r(19),E=0;E<_.length;++E)++I[31&_[E]];for(E=0;E<C.length;++E)++I[31&C[E]];for(var D=T(I,7),U=D.t,z=D.l,H=19;H>4&&!U[u[H-1]];--H);var W,V,G,Y,X=d+5<<3,J=q(s,w)+q(l,x)+c,$=q(s,m)+q(l,A)+c+14+3*H+q(I,U)+2*I[16]+3*I[17]+7*I[18];if(f>=0&&X<=J&&X<=$)return R(e,p,t.subarray(f,f+d));if(j(e,p,1+($<J)),p+=2,$<J){W=y(m,v,0),V=m,G=y(A,L,0),Y=A;var K=y(U,z,0);for(j(e,p,P-257),j(e,p+5,M-1),j(e,p+10,H-4),p+=14,E=0;E<H;++E)j(e,p+3*E,U[u[E]]);p+=3*H;for(var Q=[_,C],Z=0;Z<2;++Z){var tt=Q[Z];for(E=0;E<tt.length;++E){var et=31&tt[E];j(e,p,K[et]),p+=U[et],et>15&&(j(e,p,tt[E]>>5&127),p+=tt[E]>>12)}}}else W=S,V=w,G=N,Y=x;for(E=0;E<h;++E){var rt=o[E];if(rt>255){O(e,p,W[257+(et=rt>>18&31)]),p+=V[et+257],et>7&&(j(e,p,rt>>23&31),p+=i[et]);var nt=31&rt;O(e,p,G[nt]),p+=Y[nt],nt>3&&(O(e,p,rt>>5&8191),p+=a[nt])}else O(e,p,W[rt]),p+=V[rt]}return O(e,p,W[256]),p+V[256]},U=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),z=new e(0),H=function(){var t=1,e=0;return{p:function(r){for(var n=t,i=e,a=0|r.length,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=n+=r[o];n=(65535&n)+15*(n>>16),i=(65535&i)+15*(i>>16)}t=n,e=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(e%=65521))<<8|e>>8}}},W=function(t,o,s,u,l){if(!l&&(l={l:1},o.dictionary)){var c=o.dictionary.subarray(-32768),h=new e(c.length+t.length);h.set(c),h.set(t,c.length),t=h,l.w=c.length}return function(t,o,s,u,l,c){var h=c.z||t.length,d=new e(u+h+5*(1+Math.ceil(h/7e3))+l),p=d.subarray(u,d.length-l),m=c.l,v=7&(c.r||0);if(o){v&&(p[0]=c.r>>3);for(var b=U[o-1],y=b>>13,w=8191&b,x=(1<<s)-1,S=c.p||new r(32768),A=c.h||new r(x+1),N=Math.ceil(s/3),L=2*N,k=function(e){return(t[e]^t[e+1]<<N^t[e+2]<<L)&x},_=new n(25e3),P=new r(288),M=new r(32),I=0,j=0,O=c.i||0,T=0,E=c.w||0,B=0;O+2<h;++O){var q=k(O),z=32767&O,H=A[q];if(S[z]=H,A[q]=z,E<=O){var W=h-O;if((I>7e3||T>24576)&&(W>423||!m)){v=D(t,p,0,_,P,M,j,T,B,O-B,v),T=I=j=0,B=O;for(var V=0;V<286;++V)P[V]=0;for(V=0;V<30;++V)M[V]=0}var G=2,Y=0,X=w,J=z-H&32767;if(W>2&&q==k(O-J))for(var $=Math.min(y,W)-1,K=Math.min(32767,O),Q=Math.min(258,W);J<=K&&--X&&z!=H;){if(t[O+G]==t[O+G-J]){for(var Z=0;Z<Q&&t[O+Z]==t[O+Z-J];++Z);if(Z>G){if(G=Z,Y=J,Z>$)break;var tt=Math.min(J,Z-2),et=0;for(V=0;V<tt;++V){var rt=O-J+V&32767,nt=rt-S[rt]&32767;nt>et&&(et=nt,H=rt)}}}J+=(z=H)-(H=S[z])&32767}if(Y){_[T++]=268435456|f[G]<<18|g[Y];var it=31&f[G],at=31&g[Y];j+=i[it]+a[at],++P[257+it],++M[at],E=O+G,++I}else _[T++]=t[O],++P[t[O]]}}for(O=Math.max(O,E);O<h;++O)_[T++]=t[O],++P[t[O]];v=D(t,p,m,_,P,M,j,T,B,O-B,v),m||(c.r=7&v|p[v/8|0]<<3,v-=7,c.h=A,c.p=S,c.i=O,c.w=E)}else{for(O=c.w||0;O<h+m;O+=65535){var ot=O+65535;ot>=h&&(p[v/8|0]=m,ot=h),v=R(p,v+1,t.subarray(O,ot))}c.i=h}return C(d,0,u+F(v)+l)}(t,null==o.level?6:o.level,null==o.mem?l.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+o.mem,s,u,l)},V=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};function G(t,e){e||(e={});var r=H();r.p(t);var n=W(t,e,e.dictionary?6:2,4);return function(t,e){var r=e.level,n=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=n<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=H();i.p(e.dictionary),V(t,2,i.d())}}(n,e),V(n,n.length-4,r.d()),n}function Y(t,r){return function(t,r,n,o){var s=t.length,l=o?o.length:0;if(!s||r.f&&!r.l)return n||new e(0);var c=!n,f=c||2!=r.i,d=r.i;c&&(n=new e(3*s));var g=function(t){var r=n.length;if(t>r){var i=new e(Math.max(2*r,t));i.set(n),n=i}},m=r.f||0,v=r.p||0,b=r.b||0,w=r.l,x=r.d,S=r.m,N=r.n,M=8*s;do{if(!w){m=_(t,v,1);var j=_(t,v+1,3);if(v+=3,!j){var O=t[(V=F(v)+4)-4]|t[V-3]<<8,T=V+O;if(T>s){d&&I(0);break}f&&g(b+O),n.set(t.subarray(V,T),b),r.b=b+=O,r.p=v=8*T,r.f=m;continue}if(1==j)w=A,x=L,S=9,N=5;else if(2==j){var E=_(t,v,31)+257,B=_(t,v+10,15)+4,q=E+_(t,v+5,31)+1;v+=14;for(var R=new e(q),D=new e(19),U=0;U<B;++U)D[u[U]]=_(t,v+3*U,7);v+=3*B;var z=k(D),H=(1<<z)-1,W=y(D,z,1);for(U=0;U<q;){var V,G=W[_(t,v,H)];if(v+=15&G,(V=G>>4)<16)R[U++]=V;else{var Y=0,X=0;for(16==V?(X=3+_(t,v,3),v+=2,Y=R[U-1]):17==V?(X=3+_(t,v,7),v+=3):18==V&&(X=11+_(t,v,127),v+=7);X--;)R[U++]=Y}}var J=R.subarray(0,E),$=R.subarray(E);S=k(J),N=k($),w=y(J,S,1),x=y($,N,1)}else I(1);if(v>M){d&&I(0);break}}f&&g(b+131072);for(var K=(1<<S)-1,Q=(1<<N)-1,Z=v;;Z=v){var tt=(Y=w[P(t,v)&K])>>4;if((v+=15&Y)>M){d&&I(0);break}if(Y||I(2),tt<256)n[b++]=tt;else{if(256==tt){Z=v,w=null;break}var et=tt-254;if(tt>264){var rt=i[U=tt-257];et=_(t,v,(1<<rt)-1)+h[U],v+=rt}var nt=x[P(t,v)&Q],it=nt>>4;if(nt||I(3),v+=15&nt,$=p[it],it>3&&(rt=a[it],$+=P(t,v)&(1<<rt)-1,v+=rt),v>M){d&&I(0);break}f&&g(b+131072);var at=b+et;if(b<$){var ot=l-$,st=Math.min($,at);for(ot+b<0&&I(3);b<st;++b)n[b]=o[ot+b]}for(;b<at;++b)n[b]=n[b-$]}}r.l=w,r.p=Z,r.b=b,r.f=m,w&&(m=1,r.m=S,r.d=x,r.n=N)}while(!m);return b!=n.length&&c?C(n,0,b):n.subarray(0,b)}(t.subarray(function(t,e){return(8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31)&&I(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&I(6,"invalid zlib data: "+(32&t[1]?"need":"unexpected")+" dictionary"),2+(t[1]>>3&4)}(t,r&&r.dictionary),-4),{i:2},r&&r.out,r&&r.dictionary)}var X="undefined"!=typeof TextDecoder&&new TextDecoder;try{X.decode(z,{stream:!0})}catch(ge){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;var J=function(){return"undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:this}();function $(){J.console&&"function"==typeof J.console.log&&J.console.log.apply(J.console,arguments)}var K={log:$,warn:function(t){J.console&&("function"==typeof J.console.warn?J.console.warn.apply(J.console,arguments):$.call(null,arguments))},error:function(t){J.console&&("function"==typeof J.console.error?J.console.error.apply(J.console,arguments):$(t))}};function Q(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){nt(n.response,e,r)},n.onerror=function(){K.error("could not download file")},n.send()}function Z(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function tt(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var et,rt,nt=J.saveAs||("object"!==("undefined"==typeof window?"undefined":(0,t.A)(window))||window!==J?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var n=J.URL||J.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?Z(i.href)?Q(t,e,r):tt(i,i.target="_blank"):tt(i)):(i.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(i.href)}),4e4),setTimeout((function(){tt(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,n){if(r=r||e.name||"download","string"==typeof e)if(Z(e))Q(e,r,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){tt(i)}))}else navigator.msSaveOrOpenBlob(function(e,r){return void 0===r?r={autoBom:!1}:"object"!==(0,t.A)(r)&&(K.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),r)}:function(e,r,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return Q(e,r,n);var a="application/octet-stream"===e.type,o=/constructor/i.test(J.HTMLElement)||J.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&o)&&"object"===("undefined"==typeof FileReader?"undefined":(0,t.A)(FileReader))){var u=new FileReader;u.onloadend=function(){var t=u.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},u.readAsDataURL(e)}else{var l=J.URL||J.webkitURL,c=l.createObjectURL(e);i?i.location=c:location.href=c,i=null,setTimeout((function(){l.revokeObjectURL(c)}),4e4)}});function it(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={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",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"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",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,a=r[n].process,o=i.exec(t);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r}}function at(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=st(r,n,i,a,e[0],7,-680876936),a=st(a,r,n,i,e[1],12,-389564586),i=st(i,a,r,n,e[2],17,606105819),n=st(n,i,a,r,e[3],22,-1044525330),r=st(r,n,i,a,e[4],7,-176418897),a=st(a,r,n,i,e[5],12,1200080426),i=st(i,a,r,n,e[6],17,-1473231341),n=st(n,i,a,r,e[7],22,-45705983),r=st(r,n,i,a,e[8],7,1770035416),a=st(a,r,n,i,e[9],12,-1958414417),i=st(i,a,r,n,e[10],17,-42063),n=st(n,i,a,r,e[11],22,-1990404162),r=st(r,n,i,a,e[12],7,1804603682),a=st(a,r,n,i,e[13],12,-40341101),i=st(i,a,r,n,e[14],17,-1502002290),r=ut(r,n=st(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=ut(a,r,n,i,e[6],9,-1069501632),i=ut(i,a,r,n,e[11],14,643717713),n=ut(n,i,a,r,e[0],20,-373897302),r=ut(r,n,i,a,e[5],5,-701558691),a=ut(a,r,n,i,e[10],9,38016083),i=ut(i,a,r,n,e[15],14,-660478335),n=ut(n,i,a,r,e[4],20,-405537848),r=ut(r,n,i,a,e[9],5,568446438),a=ut(a,r,n,i,e[14],9,-1019803690),i=ut(i,a,r,n,e[3],14,-187363961),n=ut(n,i,a,r,e[8],20,1163531501),r=ut(r,n,i,a,e[13],5,-1444681467),a=ut(a,r,n,i,e[2],9,-51403784),i=ut(i,a,r,n,e[7],14,1735328473),r=lt(r,n=ut(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=lt(a,r,n,i,e[8],11,-2022574463),i=lt(i,a,r,n,e[11],16,1839030562),n=lt(n,i,a,r,e[14],23,-35309556),r=lt(r,n,i,a,e[1],4,-1530992060),a=lt(a,r,n,i,e[4],11,1272893353),i=lt(i,a,r,n,e[7],16,-155497632),n=lt(n,i,a,r,e[10],23,-1094730640),r=lt(r,n,i,a,e[13],4,681279174),a=lt(a,r,n,i,e[0],11,-358537222),i=lt(i,a,r,n,e[3],16,-722521979),n=lt(n,i,a,r,e[6],23,76029189),r=lt(r,n,i,a,e[9],4,-640364487),a=lt(a,r,n,i,e[12],11,-421815835),i=lt(i,a,r,n,e[15],16,530742520),r=ct(r,n=lt(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ct(a,r,n,i,e[7],10,1126891415),i=ct(i,a,r,n,e[14],15,-1416354905),n=ct(n,i,a,r,e[5],21,-57434055),r=ct(r,n,i,a,e[12],6,1700485571),a=ct(a,r,n,i,e[3],10,-1894986606),i=ct(i,a,r,n,e[10],15,-1051523),n=ct(n,i,a,r,e[1],21,-2054922799),r=ct(r,n,i,a,e[8],6,1873313359),a=ct(a,r,n,i,e[15],10,-30611744),i=ct(i,a,r,n,e[6],15,-1560198380),n=ct(n,i,a,r,e[13],21,1309151649),r=ct(r,n,i,a,e[4],6,-145523070),a=ct(a,r,n,i,e[11],10,-1120210379),i=ct(i,a,r,n,e[2],15,718787259),n=ct(n,i,a,r,e[9],21,-343485551),t[0]=bt(r,t[0]),t[1]=bt(n,t[1]),t[2]=bt(i,t[2]),t[3]=bt(a,t[3])}function ot(t,e,r,n,i,a){return e=bt(bt(e,t),bt(n,a)),bt(e<<i|e>>>32-i,r)}function st(t,e,r,n,i,a,o){return ot(e&r|~e&n,t,e,i,a,o)}function ut(t,e,r,n,i,a,o){return ot(e&n|r&~n,t,e,i,a,o)}function lt(t,e,r,n,i,a,o){return ot(e^r^n,t,e,i,a,o)}function ct(t,e,r,n,i,a,o){return ot(r^(e|~n),t,e,i,a,o)}function ht(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)at(n,ft(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(at(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,at(n,i),n}function ft(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}et=J.atob.bind(J),rt=J.btoa.bind(J);var dt="0123456789abcdef".split("");function pt(t){for(var e="",r=0;r<4;r++)e+=dt[t>>8*r+4&15]+dt[t>>8*r&15];return e}function gt(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function mt(t){return ht(t).map(gt).join("")}var vt="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=pt(t[e]);return t.join("")}(ht("hello"));function bt(t,e){if(vt){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}function yt(t,e){var r,n,i,a;if(t!==r){for(var o=(i=t,a=1+(256/t.length|0),new Array(a+1).join(i)),s=[],u=0;u<256;u++)s[u]=u;var l=0;for(u=0;u<256;u++){var c=s[u];l=(l+c+o.charCodeAt(u))%256,s[u]=s[l],s[l]=c}r=t,n=s}else s=n;var h=e.length,f=0,d=0,p="";for(u=0;u<h;u++)d=(d+(c=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=c,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(u)^o);return p}var wt={print:4,modify:8,copy:16,"annot-forms":32};function xt(t,e,r,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==wt.perm)throw new Error("Invalid permission: "+t);i+=wt[t]})),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(e+this.padding).substr(0,32),o=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=mt(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=yt(this.encryptionKey,this.padding)}function St(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n<r;n++){var i=t.charCodeAt(n);e+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[n]}return e}function At(e){if("object"!==(0,t.A)(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var r={};this.subscribe=function(t,e,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");r.hasOwnProperty(t)||(r[t]={});var i=Math.random().toString(35);return r[t][i]=[e,!!n],i},this.unsubscribe=function(t){for(var e in r)if(r[e][t])return delete r[e][t],0===Object.keys(r[e]).length&&delete r[e],!0;return!1},this.publish=function(t){if(r.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in r[t]){var o=r[t][a];try{o[0].apply(e,n)}catch(t){J.console&&K.error("jsPDF PubSub Error",t.message,t)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function Nt(t){if(!(this instanceof Nt))return new Nt(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function Lt(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function kt(t,e,r,n,i){if(!(this instanceof kt))return new kt(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,Lt.call(this,n,i)}function _t(t,e,r,n,i){if(!(this instanceof _t))return new _t(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,Lt.call(this,n,i)}function Pt(e){var r,n="string"==typeof arguments[0]?arguments[0]:"p",i=arguments[1],a=arguments[2],o=arguments[3],s=[],u=1,l=16,c="S",h=null;"object"===(0,t.A)(e=e||{})&&(n=e.orientation,i=e.unit||i,a=e.format||a,o=e.compress||e.compressPdf||o,null!==(h=e.encryption||null)&&(h.userPassword=h.userPassword||"",h.ownerPassword=h.ownerPassword||"",h.userPermissions=h.userPermissions||[]),u="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(r=e.precision),void 0!==e.floatPrecision&&(l=e.floatPrecision),c=e.defaultPathOperation||"S"),s=e.filters||(!0===o?["FlateEncode"]:s),i=i||"mm",n=(""+(n||"P")).toLowerCase();var f=e.putOnlyUsedFonts||!1,d={},p={internal:{},__private__:{}};p.__private__.PubSub=At;var g="1.3",m=p.__private__.getPdfVersion=function(){return g};p.__private__.setPdfVersion=function(t){g=t};var v={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return v};var b=p.__private__.getPageFormat=function(t){return v[t]};a=a||"a4";var y="compat",w="advanced",x=y;function S(){this.saveGraphicsState(),tt(new Wt(bt,0,0,-bt,0,xr()*bt).toString()+" cm"),this.setFontSize(this.getFontSize()/bt),c="n",x=w}function A(){this.restoreGraphicsState(),c="S",x=y}var N=p.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};p.advancedAPI=function(t){var e=x===y;return e&&S.call(this),"function"!=typeof t||(t(this),e&&A.call(this)),this},p.compatAPI=function(t){var e=x===w;return e&&A.call(this),"function"!=typeof t||(t(this),e&&S.call(this)),this},p.isAdvancedAPI=function(){return x===w};var L,k=function(t){if(x!==w)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},_=p.roundToPrecision=p.__private__.roundToPrecision=function(t,e){var n=r||e;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};L=p.hpf=p.__private__.hpf="number"==typeof l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,l)}:"smart"===l?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return _(t,16)};var P=p.f2=p.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return _(t,2)},F=p.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return _(t,3)},C=p.scale=p.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return x===y?t*bt:x===w?t:void 0},M=function(t){return C(function(t){return x===y?xr()-t:x===w?t:void 0}(t))};p.__private__.setPrecision=p.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var I,j="00000000000000000000000000000000",O=p.__private__.getFileId=function(){return j},T=p.__private__.setFileId=function(t){return j=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():j.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==h&&(Me=new xt(h.userPermissions,h.userPassword,h.ownerPassword,j)),j};p.setFileId=function(t){return T(t),this},p.getFileId=function(){return O()};var E=p.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),a=[r,U(n),"'",U(i),"'"].join("");return["D:",t.getFullYear(),U(t.getMonth()+1),U(t.getDate()),U(t.getHours()),U(t.getMinutes()),U(t.getSeconds()),a].join("")},B=p.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),a=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,r,n,i,a,o,0)},q=p.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=E(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return I=e},R=p.__private__.getCreationDate=function(t){var e=I;return"jsDate"===t&&(e=B(I)),e};p.setCreationDate=function(t){return q(t),this},p.getCreationDate=function(t){return R(t)};var D,U=p.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},z=p.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},H=0,W=[],V=[],G=0,Y=[],X=[],$=!1,Q=V;p.__private__.setCustomOutputDestination=function(t){$=!0,Q=t};var Z=function(t){$||(Q=t)};p.__private__.resetCustomOutputDestination=function(){$=!1,Q=V};var tt=p.__private__.out=function(t){return t=t.toString(),G+=t.length+1,Q.push(t),Q},et=p.__private__.write=function(t){return tt(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},at=p.__private__.getArrayBuffer=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},ot=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return ot};var st=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(t){return st=x===w?t/bt:t,this};var ut,lt=p.__private__.getFontSize=p.getFontSize=function(){return x===y?st:st*bt},ct=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(t){return ct=t,this},p.__private__.getR2L=p.getR2L=function(){return ct};var ht,ft=p.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))ut=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');ut=t}else ut=parseInt(t,10)};p.__private__.getZoomMode=function(){return ut};var dt,pt=p.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');ht=t};p.__private__.getPageMode=function(){return ht};var gt=p.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');dt=t};p.__private__.getLayoutMode=function(){return dt},p.__private__.setDisplayMode=p.setDisplayMode=function(t,e,r){return ft(t),gt(e),pt(r),this};var mt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(t){if(-1===Object.keys(mt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return mt[t]},p.__private__.getDocumentProperties=function(){return mt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(t){for(var e in mt)mt.hasOwnProperty(e)&&t[e]&&(mt[e]=t[e]);return this},p.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(mt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return mt[t]=e};var vt,bt,yt,wt,Lt,Ft={},Ct={},Mt=[],It={},jt={},Ot={},Tt={},Et=null,Bt=0,qt=[],Rt=new At(p),Dt=e.hotfixes||[],Ut={},zt={},Ht=[],Wt=function t(e,r,n,i,a,o){if(!(this instanceof t))return new t(e,r,n,i,a,o);isNaN(e)&&(e=1),isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[e,r,n,i,a,o]};Object.defineProperty(Wt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Wt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Wt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Wt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Wt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(L).join(t)},Wt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,r=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,a=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Wt(e,r,n,i,a,o)},Wt.prototype.decompose=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(t*t+e*e),s=(t/=o)*r+(e/=o)*n;r-=t*s,n-=e*s;var u=Math.sqrt(r*r+n*n);return s/=u,t*(n/=u)<e*(r/=u)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Wt(o,0,0,u,0,0),translate:new Wt(1,0,0,1,i,a),rotate:new Wt(t,e,-e,t,0,0),skew:new Wt(1,0,s,1,0,0)}},Wt.prototype.toString=function(t){return this.join(" ")},Wt.prototype.inversed=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty,o=1/(t*n-e*r),s=n*o,u=-e*o,l=-r*o,c=t*o;return new Wt(s,u,l,c,-s*i-l*a,-u*i-c*a)},Wt.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,r=t.x*this.shy+t.y*this.sy+this.ty;return new pr(e,r)},Wt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new pr(t.x+t.w,t.y+t.h));return new gr(e.x,e.y,r.x-e.x,r.y-e.y)},Wt.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty;return new Wt(t,e,r,n,i,a)},p.Matrix=Wt;var Vt=p.matrixMult=function(t,e){return e.multiply(t)},Gt=new Wt(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Gt;var Yt=function(t,e){if(!jt[t]){var r=(e instanceof kt?"Sh":"P")+(Object.keys(It).length+1).toString(10);e.id=r,jt[t]=r,It[r]=e,Rt.publish("addPattern",e)}};p.ShadingPattern=kt,p.TilingPattern=_t,p.addShadingPattern=function(t,e){return k("addShadingPattern()"),Yt(t,e),this},p.beginTilingPattern=function(t){k("beginTilingPattern()"),vr(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},p.endTilingPattern=function(t,e){k("endTilingPattern()"),e.stream=X[D].join("\n"),Yt(t,e),Rt.publish("endTilingPattern",e),Ht.pop().restore()};var Xt,Jt=p.__private__.newObject=function(){var t=$t();return Kt(t,!0),t},$t=p.__private__.newObjectDeferred=function(){return H++,W[H]=function(){return G},H},Kt=function(t,e){return e="boolean"==typeof e&&e,W[t]=G,e&&tt(t+" 0 obj"),t},Qt=p.__private__.newAdditionalObject=function(){var t={objId:$t(),content:""};return Y.push(t),t},Zt=$t(),te=$t(),ee=p.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var r=parseFloat(e[0]);e=[r,r,r,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return n},re=p.__private__.encodeColorString=function(e){var r;"string"==typeof e&&(e={ch1:e});var n=e.ch1,i=e.ch2,a=e.ch3,o=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var u=new it(n);if(u.ok)n=u.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var l=parseInt(n.substr(1),16);n=l>>16&255,i=l>>8&255,a=255&l}if(void 0===i||void 0===o&&n===i&&i===a)r="string"==typeof n?n+" "+s[0]:2===e.precision?P(n/255)+" "+s[0]:F(n/255)+" "+s[0];else if(void 0===o||"object"===(0,t.A)(o)){if(o&&!isNaN(o.a)&&0===o.a)return["1.","1.","1.",s[1]].join(" ");r="string"==typeof n?[n,i,a,s[1]].join(" "):2===e.precision?[P(n/255),P(i/255),P(a/255),s[1]].join(" "):[F(n/255),F(i/255),F(a/255),s[1]].join(" ")}else r="string"==typeof n?[n,i,a,o,s[2]].join(" "):2===e.precision?[P(n),P(i),P(a),P(o),s[2]].join(" "):[F(n),F(i),F(a),F(o),s[2]].join(" ");return r},ne=p.__private__.getFilters=function(){return s},ie=p.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||ne(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==h&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==h&&(s=Me.encryptor(o,0));var u={};!0===r&&(r=["FlateEncode"]);var l=t.additionalKeyValues||[],c=(u=void 0!==Pt.API.processDataByFilters?Pt.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(l.push({key:"Length",value:u.data.length}),!0===i&&l.push({key:"Length1",value:a})),0!=c.length)if(c.split("/").length-1==1)l.push({key:"Filter",value:c});else{l.push({key:"Filter",value:"["+c+"]"});for(var f=0;f<l.length;f+=1)if("DecodeParms"===l[f].key){for(var d=[],p=0;p<u.reverseChain.split("/").length-1;p+=1)d.push("null");d.push(l[f].value),l[f].value="["+d.join(" ")+"]"}}tt("<<");for(var g=0;g<l.length;g++)tt("/"+l[g].key+" "+l[g].value);tt(">>"),0!==u.data.length&&(tt("stream"),tt(s(u.data)),tt("endstream"))},ae=p.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Kt(n,!0),tt("<</Type /Page"),tt("/Parent "+t.rootDictionaryObjId+" 0 R"),tt("/Resources "+t.resourceDictionaryObjId+" 0 R"),tt("/MediaBox ["+parseFloat(L(t.mediaBox.bottomLeftX))+" "+parseFloat(L(t.mediaBox.bottomLeftY))+" "+L(t.mediaBox.topRightX)+" "+L(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&tt("/CropBox ["+L(t.cropBox.bottomLeftX)+" "+L(t.cropBox.bottomLeftY)+" "+L(t.cropBox.topRightX)+" "+L(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&tt("/BleedBox ["+L(t.bleedBox.bottomLeftX)+" "+L(t.bleedBox.bottomLeftY)+" "+L(t.bleedBox.topRightX)+" "+L(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&tt("/TrimBox ["+L(t.trimBox.bottomLeftX)+" "+L(t.trimBox.bottomLeftY)+" "+L(t.trimBox.topRightX)+" "+L(t.trimBox.topRightY)+"]"),null!==t.artBox&&tt("/ArtBox ["+L(t.artBox.bottomLeftX)+" "+L(t.artBox.bottomLeftY)+" "+L(t.artBox.topRightX)+" "+L(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&tt("/UserUnit "+t.userUnit),Rt.publish("putPage",{objId:n,pageContext:qt[e],pageNumber:e,page:r}),tt("/Contents "+i+" 0 R"),tt(">>"),tt("endobj");var a=r.join("\n");return x===w&&(a+="\nQ"),Kt(i,!0),ie({data:a,filters:ne(),objectId:i}),tt("endobj"),n},oe=p.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Bt;t++)qt[t].objId=$t(),qt[t].contentsObjId=$t();for(t=1;t<=Bt;t++)r.push(ae({number:t,data:X[t],objId:qt[t].objId,contentsObjId:qt[t].contentsObjId,mediaBox:qt[t].mediaBox,cropBox:qt[t].cropBox,bleedBox:qt[t].bleedBox,trimBox:qt[t].trimBox,artBox:qt[t].artBox,userUnit:qt[t].userUnit,rootDictionaryObjId:Zt,resourceDictionaryObjId:te}));Kt(Zt,!0),tt("<</Type /Pages");var n="/Kids [";for(e=0;e<Bt;e++)n+=r[e]+" 0 R ";tt(n+"]"),tt("/Count "+Bt),tt(">>"),tt("endobj"),Rt.publish("postPutPages")},se=function(t){Rt.publish("putFont",{font:t,out:tt,newObject:Jt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Jt(),tt("<<"),tt("/Type /Font"),tt("/BaseFont /"+St(t.postScriptName)),tt("/Subtype /Type1"),"string"==typeof t.encoding&&tt("/Encoding /"+t.encoding),tt("/FirstChar 32"),tt("/LastChar 255"),tt(">>"),tt("endobj"))},ue=function(t){t.objectNumber=Jt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[L(t.x),L(t.y),L(t.x+t.width),L(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var r=t.pages[1].join("\n");ie({data:r,additionalKeyValues:e,objectId:t.objectNumber}),tt("endobj")},le=function(t,e){e||(e=21);var r=Jt(),n=function(t,e){var r,n=[],i=1/(e-1);for(r=0;r<1;r+=i)n.push(r);if(n.push(1),0!=t[0].offset){var a={offset:0,color:t[0].color};t.unshift(a)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var s="",u=0,l=0;l<n.length;l++){for(r=n[l];r>t[u+1].offset;)u++;var c=t[u].offset,h=(r-c)/(t[u+1].offset-c),f=t[u].color,d=t[u+1].color;s+=z(Math.round((1-h)*f[0]+h*d[0]).toString(16))+z(Math.round((1-h)*f[1]+h*d[1]).toString(16))+z(Math.round((1-h)*f[2]+h*d[2]).toString(16))}return s.trim()}(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ie({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),tt("endobj"),t.objectNumber=Jt(),tt("<< /ShadingType "+t.type),tt("/ColorSpace /DeviceRGB");var a="/Coords ["+L(parseFloat(t.coords[0]))+" "+L(parseFloat(t.coords[1]))+" ";2===t.type?a+=L(parseFloat(t.coords[2]))+" "+L(parseFloat(t.coords[3])):a+=L(parseFloat(t.coords[2]))+" "+L(parseFloat(t.coords[3]))+" "+L(parseFloat(t.coords[4]))+" "+L(parseFloat(t.coords[5])),tt(a+="]"),t.matrix&&tt("/Matrix ["+t.matrix.toString()+"]"),tt("/Function "+r+" 0 R"),tt("/Extend [true true]"),tt(">>"),tt("endobj")},ce=function(t,e){var r=$t(),n=Jt();e.push({resourcesOid:r,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(L).join(" ")+"]"}),i.push({key:"XStep",value:L(t.xStep)}),i.push({key:"YStep",value:L(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ie({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),tt("endobj")},he=function(t){for(var e in t.objectNumber=Jt(),tt("<<"),t)switch(e){case"opacity":tt("/ca "+P(t[e]));break;case"stroke-opacity":tt("/CA "+P(t[e]))}tt(">>"),tt("endobj")},fe=function(t){Kt(t.resourcesOid,!0),tt("<<"),tt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in tt("/Font <<"),Ft)Ft.hasOwnProperty(t)&&(!1===f||!0===f&&d.hasOwnProperty(t))&&tt("/"+t+" "+Ft[t].objectNumber+" 0 R");tt(">>")}(),function(){if(Object.keys(It).length>0){for(var t in tt("/Shading <<"),It)It.hasOwnProperty(t)&&It[t]instanceof kt&&It[t].objectNumber>=0&&tt("/"+t+" "+It[t].objectNumber+" 0 R");Rt.publish("putShadingPatternDict"),tt(">>")}}(),function(t){if(Object.keys(It).length>0){for(var e in tt("/Pattern <<"),It)It.hasOwnProperty(e)&&It[e]instanceof p.TilingPattern&&It[e].objectNumber>=0&&It[e].objectNumber<t&&tt("/"+e+" "+It[e].objectNumber+" 0 R");Rt.publish("putTilingPatternDict"),tt(">>")}}(t.objectOid),function(){if(Object.keys(Ot).length>0){var t;for(t in tt("/ExtGState <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t].objectNumber>=0&&tt("/"+t+" "+Ot[t].objectNumber+" 0 R");Rt.publish("putGStateDict"),tt(">>")}}(),function(){for(var t in tt("/XObject <<"),Ut)Ut.hasOwnProperty(t)&&Ut[t].objectNumber>=0&&tt("/"+t+" "+Ut[t].objectNumber+" 0 R");Rt.publish("putXobjectDict"),tt(">>")}(),tt(">>"),tt("endobj")},de=function(t){Ct[t.fontName]=Ct[t.fontName]||{},Ct[t.fontName][t.fontStyle]=t.id},pe=function(t,e,r,n,i){var a={id:"F"+(Object.keys(Ft).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Rt.publish("addFont",{font:a,instance:this}),Ft[a.id]=a,de(a),a.id},ge=p.__private__.pdfEscape=p.pdfEscape=function(t,e){return function(t,e){var r,n,i,a,o,s,u,l,c;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&Ft[vt].metadata&&Ft[vt].metadata[i]&&Ft[vt].metadata[i].encoding&&(a=Ft[vt].metadata[i].encoding,!o&&Ft[vt].encoding&&(o=Ft[vt].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(u=!1,s=[],r=0,n=t.length;r<n;r++)(l=o[t.charCodeAt(r)])?s.push(String.fromCharCode(l)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(u=!0);t=s.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((c=(l=t.charCodeAt(r))>>8)>>8)throw new Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(c),s.push(l-(c<<8))}return String.fromCharCode.apply(void 0,s)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},me=p.__private__.beginPage=function(t){X[++Bt]=[],qt[Bt]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},ye(Bt),Z(X[D])},ve=function(t,e){var r,i,o;switch(n=e||n,"string"==typeof t&&(r=b(t.toLowerCase()),Array.isArray(r)&&(i=r[0],o=r[1])),Array.isArray(t)&&(i=t[0]*bt,o=t[1]*bt),isNaN(i)&&(i=a[0],o=a[1]),(i>14400||o>14400)&&(K.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),o=Math.min(14400,o)),a=[i,o],n.substr(0,1)){case"l":o>i&&(a=[o,i]);break;case"p":i>o&&(a=[o,i])}me(a),Ke(Je),tt(ar),0!==hr&&tt(hr+" J"),0!==fr&&tt(fr+" j"),Rt.publish("addPage",{pageNumber:Bt})},be=function(t){t>0&&t<=Bt&&(X.splice(t,1),qt.splice(t,1),Bt--,D>Bt&&(D=Bt),this.setPage(D))},ye=function(t){t>0&&t<=Bt&&(D=t)},we=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return X.length-1},xe=function(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:Ft[vt].fontName,e=void 0!==e?e:Ft[vt].fontStyle,n=t.toLowerCase(),void 0!==Ct[n]&&void 0!==Ct[n][e]?i=Ct[n][e]:void 0!==Ct[t]&&void 0!==Ct[t][e]?i=Ct[t][e]:!1===r.disableWarning&&K.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=Ct.times[e])&&(i=Ct.times.normal),i},Se=p.__private__.putInfo=function(){var t=Jt(),e=function(t){return t};for(var r in null!==h&&(e=Me.encryptor(t,0)),tt("<<"),tt("/Producer ("+ge(e("jsPDF "+Pt.version))+")"),mt)mt.hasOwnProperty(r)&&mt[r]&&tt("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+ge(e(mt[r]))+")");tt("/CreationDate ("+ge(e(I))+")"),tt(">>"),tt("endobj")},Ae=p.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Zt;switch(Jt(),tt("<<"),tt("/Type /Catalog"),tt("/Pages "+e+" 0 R"),ut||(ut="fullwidth"),ut){case"fullwidth":tt("/OpenAction [3 0 R /FitH null]");break;case"fullheight":tt("/OpenAction [3 0 R /FitV null]");break;case"fullpage":tt("/OpenAction [3 0 R /Fit]");break;case"original":tt("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+ut;"%"===r.substr(r.length-1)&&(ut=parseInt(ut)/100),"number"==typeof ut&&tt("/OpenAction [3 0 R /XYZ null null "+P(ut)+"]")}switch(dt||(dt="continuous"),dt){case"continuous":tt("/PageLayout /OneColumn");break;case"single":tt("/PageLayout /SinglePage");break;case"two":case"twoleft":tt("/PageLayout /TwoColumnLeft");break;case"tworight":tt("/PageLayout /TwoColumnRight")}ht&&tt("/PageMode /"+ht),Rt.publish("putCatalog"),tt(">>"),tt("endobj")},Ne=p.__private__.putTrailer=function(){tt("trailer"),tt("<<"),tt("/Size "+(H+1)),tt("/Root "+H+" 0 R"),tt("/Info "+(H-1)+" 0 R"),null!==h&&tt("/Encrypt "+Me.oid+" 0 R"),tt("/ID [ <"+j+"> <"+j+"> ]"),tt(">>")},Le=p.__private__.putHeader=function(){tt("%PDF-"+g),tt("%ºß¬à")},ke=p.__private__.putXRef=function(){var t="0000000000";tt("xref"),tt("0 "+(H+1)),tt("0000000000 65535 f ");for(var e=1;e<=H;e++)"function"==typeof W[e]?tt((t+W[e]()).slice(-10)+" 00000 n "):void 0!==W[e]?tt((t+W[e]).slice(-10)+" 00000 n "):tt("0000000000 00000 n ")},_e=p.__private__.buildDocument=function(){H=0,G=0,V=[],W=[],Y=[],Zt=$t(),te=$t(),Z(V),Rt.publish("buildDocument"),Le(),oe(),function(){Rt.publish("putAdditionalObjects");for(var t=0;t<Y.length;t++){var e=Y[t];Kt(e.objId,!0),tt(e.content),tt("endobj")}Rt.publish("postPutAdditionalObjects")}(),function(){var t=[];(function(){for(var t in Ft)Ft.hasOwnProperty(t)&&(!1===f||!0===f&&d.hasOwnProperty(t))&&se(Ft[t])})(),function(){var t;for(t in Ot)Ot.hasOwnProperty(t)&&he(Ot[t])}(),function(){for(var t in Ut)Ut.hasOwnProperty(t)&&ue(Ut[t])}(),function(t){var e;for(e in It)It.hasOwnProperty(e)&&(It[e]instanceof kt?le(It[e]):It[e]instanceof _t&&ce(It[e],t))}(t),Rt.publish("putResources"),t.forEach(fe),fe({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Rt.publish("postPutResources")}(),null!==h&&(Me.oid=Jt(),tt("<<"),tt("/Filter /Standard"),tt("/V "+Me.v),tt("/R "+Me.r),tt("/U <"+Me.toHexString(Me.U)+">"),tt("/O <"+Me.toHexString(Me.O)+">"),tt("/P "+Me.P),tt(">>"),tt("endobj")),Se(),Ae();var t=G;return ke(),Ne(),tt("startxref"),tt(""+t),tt("%%EOF"),Z(X[D]),V.join("\n")},Pe=p.__private__.getBlob=function(t){return new Blob([at(t)],{type:"application/pdf"})},Fe=p.output=p.__private__.output=(Xt=function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return _e();case"save":p.save(e.filename);break;case"arraybuffer":return at(_e());case"blob":return Pe(_e());case"bloburi":case"bloburl":if(void 0!==J.URL&&"function"==typeof J.URL.createObjectURL)return J.URL&&J.URL.createObjectURL(Pe(_e()))||void 0;K.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",n=_e();try{r=rt(n)}catch(t){r=rt(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+e.filename+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(J)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",a=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(i=e.pdfObjectUrl,a="");var o='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+i+'"'+a+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",s=J.open();return null!==s&&s.document.write(o),s}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(J)){var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(e.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+e.filename+'" width="500px" height="400px" /></body></html>',l=J.open();if(null!==l){l.document.write(u);var c=this;l.document.documentElement.querySelector("#pdfViewer").onload=function(){l.document.title=e.filename,l.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(c.output("bloburl"))}}return l}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(J))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",e)+'"></iframe></body></html>',f=J.open();if(null!==f&&(f.document.write(h),f.document.title=e.filename),f||"undefined"==typeof safari)return f;break;case"datauri":case"dataurl":return J.document.location.href=this.output("datauristring",e);default:return null}},Xt.foo=function(){try{return Xt.apply(this,arguments)}catch(r){var t=r.stack||"";~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var e="Error in function "+t.split("\n")[0].split("<")[0]+": "+r.message;if(!J.console)throw new Error(e);J.console.error(e,r),J.alert&&alert(e)}},Xt.foo.bar=Xt,Xt.foo),Ce=function(t){return!0===Array.isArray(Dt)&&Dt.indexOf(t)>-1};switch(i){case"pt":bt=1;break;case"mm":bt=72/25.4;break;case"cm":bt=72/2.54;break;case"in":bt=72;break;case"px":bt=1==Ce("px_scaling")?.75:96/72;break;case"pc":case"em":bt=12;break;case"ex":bt=6;break;default:if("number"!=typeof i)throw new Error("Invalid unit: "+i);bt=i}var Me=null;q(),T();var Ie=p.__private__.getPageInfo=p.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:qt[t].objId,pageNumber:t,pageContext:qt[t]}},je=p.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in qt)if(qt[e].objId===t)break;return Ie(e)},Oe=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:qt[D].objId,pageNumber:D,pageContext:qt[D]}};p.addPage=function(){return ve.apply(this,arguments),this},p.setPage=function(){return ye.apply(this,arguments),Z.call(this,X[D]),this},p.insertPage=function(t){return this.addPage(),this.movePage(D,t),this},p.movePage=function(t,e){var r,n;if(t>e){r=X[t],n=qt[t];for(var i=t;i>e;i--)X[i]=X[i-1],qt[i]=qt[i-1];X[e]=r,qt[e]=n,this.setPage(e)}else if(t<e){r=X[t],n=qt[t];for(var a=t;a<e;a++)X[a]=X[a+1],qt[a]=qt[a+1];X[e]=r,qt[e]=n,this.setPage(e)}return this},p.deletePage=function(){return be.apply(this,arguments),this},p.__private__.text=p.text=function(e,r,n,i,a){var o,s,u,l,c,h,f,p,g,m=(i=i||{}).scope||this;if("number"==typeof e&&"number"==typeof r&&("string"==typeof n||Array.isArray(n))){var v=n;n=r,r=e,e=v}if(arguments[3]instanceof Wt==0?(u=arguments[4],l=arguments[5],"object"===(0,t.A)(f=arguments[3])&&null!==f||("string"==typeof u&&(l=u,u=null),"string"==typeof f&&(l=f,f=null),"number"==typeof f&&(u=f,f=null),i={flags:f,angle:u,align:l})):(k("The transform parameter of text() with a Matrix value"),g=a),isNaN(r)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return m;var b,y="",S="number"==typeof i.lineHeightFactor?i.lineHeightFactor:Xe,A=m.internal.scaleFactor;function N(t){return t=t.split("\t").join(Array(i.TabLen||9).join(" ")),ge(t,f)}function _(t){for(var e,r=t.concat(),n=[],i=r.length;i--;)"string"==typeof(e=r.shift())?n.push(e):Array.isArray(t)&&(1===e.length||void 0===e[1]&&void 0===e[2])?n.push(e[0]):n.push([e[0],e[1],e[2]]);return n}function P(t,e){var r;if("string"==typeof t)r=e(t)[0];else if(Array.isArray(t)){for(var n,i,a=t.concat(),o=[],s=a.length;s--;)"string"==typeof(n=a.shift())?o.push(e(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(i=e(n[0],n[1],n[2]),o.push([i[0],i[1],i[2]]));r=o}return r}var F=!1,M=!0;if("string"==typeof e)F=!0;else if(Array.isArray(e)){var I=e.concat();s=[];for(var j,O=I.length;O--;)("string"!=typeof(j=I.shift())||Array.isArray(j)&&"string"!=typeof j[0])&&(M=!1);F=M}if(!1===F)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var T=st/m.internal.scaleFactor,E=T*(S-1);switch(i.baseline){case"bottom":n-=E;break;case"top":n+=T-E;break;case"hanging":n+=T-2*E;break;case"middle":n+=T/2-E}if((h=i.maxWidth||0)>0&&("string"==typeof e?e=m.splitTextToSize(e,h):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(t,e){return t.concat(m.splitTextToSize(e,h))}),[]))),o={text:e,x:r,y:n,options:i,mutex:{pdfEscape:ge,activeFontKey:vt,fonts:Ft,activeFontSize:st}},Rt.publish("preProcessText",o),e=o.text,u=(i=o.options).angle,g instanceof Wt==0&&u&&"number"==typeof u){u*=Math.PI/180,0===i.rotationDirection&&(u=-u),x===w&&(u=-u);var B=Math.cos(u),q=Math.sin(u);g=new Wt(B,q,-q,B,0,0)}else u&&u instanceof Wt&&(g=u);x!==w||g||(g=Gt),void 0!==(c=i.charSpace||lr)&&(y+=L(C(c))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(p=i.horizontalScale)&&(y+=L(100*p)+" Tz\n"),i.lang;var R=-1,D=void 0!==i.renderingMode?i.renderingMode:i.stroke,U=m.internal.getCurrentPageInfo().pageContext;switch(D){case 0:case!1:case"fill":R=0;break;case 1:case!0:case"stroke":R=1;break;case 2:case"fillThenStroke":R=2;break;case 3:case"invisible":R=3;break;case 4:case"fillAndAddForClipping":R=4;break;case 5:case"strokeAndAddPathForClipping":R=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":R=6;break;case 7:case"addToPathForClipping":R=7}var z=void 0!==U.usedRenderingMode?U.usedRenderingMode:-1;-1!==R?y+=R+" Tr\n":-1!==z&&(y+="0 Tr\n"),-1!==R&&(U.usedRenderingMode=R),l=i.align||"left";var H,W=st*S,V=m.internal.pageSize.getWidth(),G=Ft[vt];c=i.charSpace||lr,h=i.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},i.flags);var Y=[],X=function(t){return m.getStringUnitWidth(t,{font:G,charSpace:c,fontSize:st,doKerning:!1})*st/A};if("[object Array]"===Object.prototype.toString.call(e)){var J;s=_(e),"left"!==l&&(H=s.map(X));var $,K=0;if("right"===l){r-=H[0],e=[],O=s.length;for(var Q=0;Q<O;Q++)0===Q?($=er(r),J=rr(n)):($=C(K-H[Q]),J=-W),e.push([s[Q],$,J]),K=H[Q]}else if("center"===l){r-=H[0]/2,e=[],O=s.length;for(var Z=0;Z<O;Z++)0===Z?($=er(r),J=rr(n)):($=C((K-H[Z])/2),J=-W),e.push([s[Z],$,J]),K=H[Z]}else if("left"===l){e=[],O=s.length;for(var et=0;et<O;et++)e.push(s[et])}else if("justify"===l&&"Identity-H"===G.encoding){e=[],O=s.length,h=0!==h?h:V;for(var rt=0,nt=0;nt<O;nt++)if(J=0===nt?rr(n):-W,$=0===nt?er(r):rt,nt<O-1){var it=C((h-H[nt])/(s[nt].split(" ").length-1)),at=s[nt].split(" ");e.push([at[0]+" ",$,J]),rt=0;for(var ot=1;ot<at.length;ot++){var ut=(X(at[ot-1]+" "+at[ot])-X(at[ot]))*A+it;ot==at.length-1?e.push([at[ot],ut,0]):e.push([at[ot]+" ",ut,0]),rt-=ut}}else e.push([s[nt],$,J]);e.push(["",rt,0])}else{if("justify"!==l)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(e=[],O=s.length,h=0!==h?h:V,nt=0;nt<O;nt++)J=0===nt?rr(n):-W,$=0===nt?er(r):0,nt<O-1?Y.push(L(C((h-H[nt])/(s[nt].split(" ").length-1)))):Y.push(0),e.push([s[nt],$,J])}}!0===("boolean"==typeof i.R2L?i.R2L:ct)&&(e=P(e,(function(t,e,r){return[t.split("").reverse().join(""),e,r]}))),o={text:e,x:r,y:n,options:i,mutex:{pdfEscape:ge,activeFontKey:vt,fonts:Ft,activeFontSize:st}},Rt.publish("postProcessText",o),e=o.text,b=o.mutex.isHex||!1;var lt=Ft[vt].encoding;"WinAnsiEncoding"!==lt&&"StandardEncoding"!==lt||(e=P(e,(function(t,e,r){return[N(t),e,r]}))),s=_(e),e=[];for(var ht,ft,dt,pt=Array.isArray(s[0])?1:0,gt="",mt=function(t,e,r){var n="";return r instanceof Wt?(r="number"==typeof i.angle?Vt(r,new Wt(1,0,0,1,t,e)):Vt(new Wt(1,0,0,1,t,e),r),x===w&&(r=Vt(new Wt(1,0,0,-1,0,0),r)),n=r.join(" ")+" Tm\n"):n=L(t)+" "+L(e)+" Td\n",n},bt=0;bt<s.length;bt++){switch(gt="",pt){case 1:dt=(b?"<":"(")+s[bt][0]+(b?">":")"),ht=parseFloat(s[bt][1]),ft=parseFloat(s[bt][2]);break;case 0:dt=(b?"<":"(")+s[bt]+(b?">":")"),ht=er(r),ft=rr(n)}void 0!==Y&&void 0!==Y[bt]&&(gt=Y[bt]+" Tw\n"),0===bt?e.push(gt+mt(ht,ft,g)+dt):0===pt?e.push(gt+dt):1===pt&&e.push(gt+mt(ht,ft,g)+dt)}e=0===pt?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var yt="BT\n/";return yt+=vt+" "+st+" Tf\n",yt+=L(st*S)+" TL\n",yt+=sr+"\n",yt+=y,yt+=e,tt(yt+="ET"),d[vt]=!0,m};var Te=p.__private__.clip=p.clip=function(t){return tt("evenodd"===t?"W*":"W"),this};p.clipEvenOdd=function(){return Te("evenodd")},p.__private__.discardPath=p.discardPath=function(){return tt("n"),this};var Ee=p.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(t){return Ee(t)&&(c=t),this};var Be=p.__private__.getStyle=p.getStyle=function(t){var e=c;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},qe=p.close=function(){return tt("h"),this};p.stroke=function(){return tt("S"),this},p.fill=function(t){return Re("f",t),this},p.fillEvenOdd=function(t){return Re("f*",t),this},p.fillStroke=function(t){return Re("B",t),this},p.fillStrokeEvenOdd=function(t){return Re("B*",t),this};var Re=function(e,r){"object"===(0,t.A)(r)?ze(r,e):tt(e)},De=function(t){null===t||x===w&&void 0===t||(t=Be(t),tt(t))};function Ue(t,e,r,n,i){var a=new _t(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);a.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Yt(o,a),a}var ze=function(t,e){var r=jt[t.key],n=It[r];if(n instanceof kt)tt("q"),tt(He(e)),n.gState&&p.setGState(n.gState),tt(t.matrix.toString()+" cm"),tt("/"+r+" sh"),tt("Q");else if(n instanceof _t){var i=new Wt(1,0,0,-1,0,xr());t.matrix&&(i=i.multiply(t.matrix||Gt),r=Ue.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),tt("q"),tt("/Pattern cs"),tt("/"+r+" scn"),n.gState&&p.setGState(n.gState),tt(e),tt("Q")}},He=function(t){switch(t){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},We=p.moveTo=function(t,e){return tt(L(C(t))+" "+L(M(e))+" m"),this},Ve=p.lineTo=function(t,e){return tt(L(C(t))+" "+L(M(e))+" l"),this},Ge=p.curveTo=function(t,e,r,n,i,a){return tt([L(C(t)),L(M(e)),L(C(r)),L(M(n)),L(C(i)),L(M(a)),"c"].join(" ")),this};p.__private__.line=p.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ee(i))throw new Error("Invalid arguments passed to jsPDF.line");return x===y?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},p.__private__.lines=p.lines=function(t,e,r,n,i,a){var o,s,u,l,c,h,f,d,p,g,m,v;if("number"==typeof t&&(v=r,r=e,e=t,t=v),n=n||[1,1],a=a||!1,isNaN(e)||isNaN(r)||!Array.isArray(t)||!Array.isArray(n)||!Ee(i)||"boolean"!=typeof a)throw new Error("Invalid arguments passed to jsPDF.lines");for(We(e,r),o=n[0],s=n[1],l=t.length,g=e,m=r,u=0;u<l;u++)2===(c=t[u]).length?(g=c[0]*o+g,m=c[1]*s+m,Ve(g,m)):(h=c[0]*o+g,f=c[1]*s+m,d=c[2]*o+g,p=c[3]*s+m,g=c[4]*o+g,m=c[5]*s+m,Ge(h,f,d,p,g,m));return a&&qe(),De(i),this},p.path=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.c;switch(r.op){case"m":We(n[0],n[1]);break;case"l":Ve(n[0],n[1]);break;case"c":Ge.apply(this,n);break;case"h":qe()}}return this},p.__private__.rect=p.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ee(i))throw new Error("Invalid arguments passed to jsPDF.rect");return x===y&&(n=-n),tt([L(C(t)),L(M(e)),L(C(r)),L(C(n)),"re"].join(" ")),De(i),this},p.__private__.triangle=p.triangle=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Ee(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[r-t,n-e],[i-r,a-n],[t-i,e-a]],t,e,[1,1],o,!0),this},p.__private__.roundedRect=p.roundedRect=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Ee(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*r),a=Math.min(a,.5*n),this.lines([[r-2*i,0],[i*s,0,i,a-a*s,i,a],[0,n-2*a],[0,a*s,-i*s,a,-i,a],[2*i-r,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-n],[0,-a*s,i*s,-a,i,-a]],t+i,e,[1,1],o,!0),this},p.__private__.ellipse=p.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ee(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var a=4/3*(Math.SQRT2-1)*r,o=4/3*(Math.SQRT2-1)*n;return We(t+r,e),Ge(t+r,e-o,t+a,e-n,t,e-n),Ge(t-a,e-n,t-r,e-o,t-r,e),Ge(t-r,e+o,t-a,e+n,t,e+n),Ge(t+a,e+n,t+r,e+o,t+r,e),De(i),this},p.__private__.circle=p.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Ee(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},p.setFont=function(t,e,r){return r&&(e=N(e,r)),vt=xe(t,e,{disableWarning:!1}),this};var Ye=p.__private__.getFont=p.getFont=function(){return Ft[xe.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var t,e,r={};for(t in Ct)if(Ct.hasOwnProperty(t))for(e in r[t]=[],Ct[t])Ct[t].hasOwnProperty(e)&&r[t].push(e);return r},p.addFont=function(t,e,r,n,i){var a=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==a.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==a.indexOf(arguments[3])&&(r=N(r,n)),pe.call(this,t,e,r,i=i||"Identity-H")};var Xe,Je=e.lineWidth||.200025,$e=p.__private__.getLineWidth=p.getLineWidth=function(){return Je},Ke=p.__private__.setLineWidth=p.setLineWidth=function(t){return Je=t,tt(L(C(t))+" w"),this};p.__private__.setLineDash=Pt.API.setLineDash=Pt.API.setLineDashPattern=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return L(C(t))})).join(" "),e=L(C(e)),tt("["+t+"] "+e+" d"),this};var Qe=p.__private__.getLineHeight=p.getLineHeight=function(){return st*Xe};p.__private__.getLineHeight=p.getLineHeight=function(){return st*Xe};var Ze=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(Xe=t),this},tr=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Xe};Ze(e.lineHeight);var er=p.__private__.getHorizontalCoordinate=function(t){return C(t)},rr=p.__private__.getVerticalCoordinate=function(t){return x===w?t:qt[D].mediaBox.topRightY-qt[D].mediaBox.bottomLeftY-C(t)},nr=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(t){return L(er(t))},ir=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(t){return L(rr(t))},ar=e.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return ee(ar)},p.__private__.setStrokeColor=p.setDrawColor=function(t,e,r,n){return ar=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),tt(ar),this};var or=e.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return ee(or)},p.__private__.setFillColor=p.setFillColor=function(t,e,r,n){return or=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),tt(or),this};var sr=e.textColor||"0 g",ur=p.__private__.getTextColor=p.getTextColor=function(){return ee(sr)};p.__private__.setTextColor=p.setTextColor=function(t,e,r,n){return sr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var lr=e.charSpace,cr=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(lr||0)};p.__private__.setCharSpace=p.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return lr=t,this};var hr=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(t){var e=p.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return hr=e,tt(e+" J"),this};var fr=0;p.__private__.setLineJoin=p.setLineJoin=function(t){var e=p.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return fr=e,tt(e+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return tt(L(C(t))+" M"),this},p.GState=Nt,p.setGState=function(t){(t="string"==typeof t?Ot[Tt[t]]:dr(null,t)).equals(Et)||(tt("/"+t.id+" gs"),Et=t)};var dr=function(t,e){if(!t||!Tt[t]){var r=!1;for(var n in Ot)if(Ot.hasOwnProperty(n)&&Ot[n].equals(e)){r=!0;break}if(r)e=Ot[n];else{var i="GS"+(Object.keys(Ot).length+1).toString(10);Ot[i]=e,e.id=i}return t&&(Tt[t]=e.id),Rt.publish("addGState",e),e}};p.addGState=function(t,e){return dr(t,e),this},p.saveGraphicsState=function(){return tt("q"),Mt.push({key:vt,size:st,color:sr}),this},p.restoreGraphicsState=function(){tt("Q");var t=Mt.pop();return vt=t.key,st=t.size,sr=t.color,Et=null,this},p.setCurrentTransformationMatrix=function(t){return tt(t.toString()+" cm"),this},p.comment=function(t){return tt("#"+t),this};var pr=function(t,e){var r=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var n=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(t){i=t.toString()}}),this},gr=function(t,e,r,n){pr.call(this,t,e),this.type="rect";var i=r||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var a=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return a},set:function(t){isNaN(t)||(a=parseFloat(t))}}),this},mr=function(){this.page=Bt,this.currentPage=D,this.pages=X.slice(0),this.pagesContext=qt.slice(0),this.x=yt,this.y=wt,this.matrix=Lt,this.width=yr(D),this.height=xr(D),this.outputDestination=Q,this.id="",this.objectNumber=-1};mr.prototype.restore=function(){Bt=this.page,D=this.currentPage,qt=this.pagesContext,X=this.pages,yt=this.x,wt=this.y,Lt=this.matrix,wr(D,this.width),Sr(D,this.height),Q=this.outputDestination};var vr=function(t,e,r,n,i){Ht.push(new mr),Bt=D=0,X=[],yt=t,wt=e,Lt=i,me([r,n])};for(var br in p.beginFormObject=function(t,e,r,n,i){return vr(t,e,r,n,i),this},p.endFormObject=function(t){return function(t){if(zt[t])Ht.pop().restore();else{var e=new mr,r="Xo"+(Object.keys(Ut).length+1).toString(10);e.id=r,zt[t]=r,Ut[r]=e,Rt.publish("addFormObject",e),Ht.pop().restore()}}(t),this},p.doFormObject=function(t,e){var r=Ut[zt[t]];return tt("q"),tt(e.toString()+" cm"),tt("/"+r.id+" Do"),tt("Q"),this},p.getFormObject=function(t){var e=Ut[zt[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},p.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(nt(Pe(_e()),t),"function"==typeof nt.unload&&J.setTimeout&&setTimeout(nt.unload,911),this):new Promise((function(e,r){try{var n=nt(Pe(_e()),t);"function"==typeof nt.unload&&J.setTimeout&&setTimeout(nt.unload,911),e(n)}catch(t){r(t.message)}}))},Pt.API)Pt.API.hasOwnProperty(br)&&("events"===br&&Pt.API.events.length?function(t,e){var r,n,i;for(i=e.length-1;-1!==i;i--)r=e[i][0],n=e[i][1],t.subscribe.apply(t,[r].concat("function"==typeof n?[n]:n))}(Rt,Pt.API.events):p[br]=Pt.API[br]);var yr=p.getPageWidth=function(t){return(qt[t=t||D].mediaBox.topRightX-qt[t].mediaBox.bottomLeftX)/bt},wr=p.setPageWidth=function(t,e){qt[t].mediaBox.topRightX=e*bt+qt[t].mediaBox.bottomLeftX},xr=p.getPageHeight=function(t){return(qt[t=t||D].mediaBox.topRightY-qt[t].mediaBox.bottomLeftY)/bt},Sr=p.setPageHeight=function(t,e){qt[t].mediaBox.topRightY=e*bt+qt[t].mediaBox.bottomLeftY};return p.internal={pdfEscape:ge,getStyle:Be,getFont:Ye,getFontSize:lt,getCharSpace:cr,getTextColor:ur,getLineHeight:Qe,getLineHeightFactor:tr,getLineWidth:$e,write:et,getHorizontalCoordinate:er,getVerticalCoordinate:rr,getCoordinateString:nr,getVerticalCoordinateString:ir,collections:{},newObject:Jt,newAdditionalObject:Qt,newObjectDeferred:$t,newObjectDeferredBegin:Kt,getFilters:ne,putStream:ie,events:Rt,scaleFactor:bt,pageSize:{getWidth:function(){return yr(D)},setWidth:function(t){wr(D,t)},getHeight:function(){return xr(D)},setHeight:function(t){Sr(D,t)}},encryptionOptions:h,encryption:Me,getEncryptor:function(t){return null!==h?Me.encryptor(t,0):function(t){return t}},output:Fe,getNumberOfPages:we,pages:X,out:tt,f2:P,f3:F,getPageInfo:Ie,getPageInfoByObjId:je,getCurrentPageInfo:Oe,getPDFVersion:m,Point:pr,Rectangle:gr,Matrix:Wt,hasHotfix:Ce},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return yr(D)},set:function(t){wr(D,t)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return xr(D)},set:function(t){Sr(D,t)},enumerable:!0,configurable:!0}),function(t){for(var e=0,r=ot.length;e<r;e++){var n=pe.call(this,t[e][0],t[e][1],t[e][2],ot[e][3],!0);!1===f&&(d[n]=!0);var i=t[e][0].split("-");de({id:n,fontName:i[0],fontStyle:i[1]||""})}Rt.publish("addFonts",{fonts:Ft,dictionary:Ct})}.call(p,ot),vt="F1",ve(a,n),Rt.publish("initialized"),p}xt.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},xt.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},xt.prototype.hexToBytes=function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return e.join("")},xt.prototype.processOwnerPassword=function(t,e){return yt(mt(e).substr(0,5),t)},xt.prototype.encryptor=function(t,e){var r=mt(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return yt(r,t)}},Nt.prototype.equals=function(e){var r,n="id,objectNumber,equals";if(!e||(0,t.A)(e)!==(0,t.A)(this))return!1;var i=0;for(r in this)if(!(n.indexOf(r)>=0)){if(this.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;if(this[r]!==e[r])return!1;i++}for(r in e)e.hasOwnProperty(r)&&n.indexOf(r)<0&&i--;return 0===i},Pt.API={events:[]},Pt.version="2.5.2";var Ft=Pt.API,Ct=1,Mt=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},It=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},jt=function(t){return t.toFixed(2)},Ot=function(t){return t.toFixed(5)};Ft.__acroform__={};var Tt=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},Et=function(t){return t*Ct},Bt=function(t){var e=new Zt,r=de.internal.getHeight(t)||0,n=de.internal.getWidth(t)||0;return e.BBox=[0,0,Number(jt(n)),Number(jt(r))],e},qt=Ft.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},Rt=Ft.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},Dt=Ft.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},Ut=Ft.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Dt(t,e-1)},zt=Ft.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return qt(t,e-1)},Ht=Ft.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Rt(t,e-1)},Wt=Ft.__acroform__.calculateCoordinates=function(t,e){var r=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,i=t[0],a=t[1],o=t[2],s=t[3],u={};return u.lowerLeft_X=r(i)||0,u.lowerLeft_Y=n(a+s)||0,u.upperRight_X=r(i+o)||0,u.upperRight_Y=n(a)||0,[Number(jt(u.lowerLeft_X)),Number(jt(u.lowerLeft_Y)),Number(jt(u.upperRight_X)),Number(jt(u.upperRight_Y))]},Vt=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=Gt(t,r),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+i+" "+jt(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=Bt(t);return a.scope=t.scope,a.stream=e.join("\n"),a}},Gt=function(t,e){var r=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},i=(e=")"==(e="("==e.substr(0,1)?e.substr(1):e).substr(e.length-1)?e.substr(0,e.length-1):e).split(" ");i=t.multiline?i.map((function(t){return t.split("\n")})):i.map((function(t){return[t]}));var a=r,o=de.internal.getHeight(t)||0;o=o<0?-o:o;var s=de.internal.getWidth(t)||0;s=s<0?-s:s;var u=function(e,r,n){if(e+1<i.length){var a=r+" "+i[e+1][0];return Yt(a,t,n).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,c,h=Yt("3",t,a).height,f=t.multiline?o-a:(o-h)/2,d=f+=2,p=0,g=0,m=0;if(a<=0){e="(...) Tj\n",e+="% Width of Text: "+Yt(e,t,a=12).width+", FieldWidth:"+s+"\n";break}for(var v="",b=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var w=!1;if(1!==i[y].length&&m!==i[y].length-1){if((h+2)*(b+2)+2>o)continue t;v+=i[y][m],w=!0,g=y,y--}else{v=" "==(v+=i[y][m]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var x=parseInt(y),S=u(x,v,a),A=y>=i.length-1;if(S&&!A){v+=" ",m=0;continue}if(S||A){if(A)g=x;else if(t.multiline&&(h+2)*(b+2)+2>o)continue t}else{if(!t.multiline)continue t;if((h+2)*(b+2)+2>o)continue t;g=x}}for(var N="",L=p;L<=g;L++){var k=i[L];if(t.multiline){if(L===g){N+=k[m]+" ",m=(m+1)%k.length;continue}if(L===p){N+=k[k.length-1]+" ";continue}}N+=k[0]+" "}switch(N=" "==N.substr(N.length-1)?N.substr(0,N.length-1):N,c=Yt(N,t,a).width,t.textAlign){case"right":l=s-c-2;break;case"center":l=(s-c)/2;break;default:l=2}e+=jt(l)+" "+jt(d)+" Td\n",e+="("+Mt(N)+") Tj\n",e+=-jt(l)+" 0 Td\n",d=-(a+2),c=0,p=w?g:g+1,b++,v=""}break}return n.text=e,n.fontSize=a,n},Yt=function(t,e,r){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},Xt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Jt=function(t,e){var r={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===r.type&&t.object===r.object}))&&e.internal.getPageInfo(t.page).pageContext.annotations.push(r)},$t=Ft.__acroform__.arrayToPdfArray=function(e,r,n){var i=function(t){return t};if(Array.isArray(e)){for(var a="[",o=0;o<e.length;o++)switch(0!==o&&(a+=" "),(0,t.A)(e[o])){case"boolean":case"number":case"object":a+=e[o].toString();break;case"string":"/"!==e[o].substr(0,1)?(void 0!==r&&n&&(i=n.internal.getEncryptor(r)),a+="("+Mt(i(e[o].toString()))+")"):a+=e[o].toString()}return a+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},Kt=function(t,e,r){var n=function(t){return t};return void 0!==e&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),"("+Mt(n(t))+")"},Qt=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Qt.prototype.toString=function(){return this.objId+" 0 R"},Qt.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},Qt.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var r in e)if(!1===Object.getOwnPropertyDescriptor(this,e[r]).configurable){var n=e[r],i=this[n];i&&(Array.isArray(i)?t.push({key:n,value:$t(i,this.objId,this.scope)}):i instanceof Qt?(i.scope=this.scope,t.push({key:n,value:i.objId+" 0 R"})):"function"!=typeof i&&t.push({key:n,value:i}))}return t};var Zt=function(){Qt.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};Tt(Zt,Qt);var te=function(){Qt.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Mt(e(t))+")"}},set:function(e){t=e}})};Tt(te,Qt);var ee=function t(){Qt.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(e,3))},set:function(t){!0===Boolean(t)?this.F=zt(e,3):this.F=Ht(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');r=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof le)return;a="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Mt(e(a))+")"},set:function(t){a=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(t){a=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(t){u=t}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===l?50/Ct:l},set:function(t){l=t}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof le||this instanceof he))return Kt(h,this.objId,this.scope)},set:function(t){t=t.toString(),h=t}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof oe==0?Kt(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof oe==0?"("===t.substr(0,1)?It(t.substr(1,t.length-2)):It(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof oe==1?It(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof oe==1?"/"+t:t}});var d=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(d)return d},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof oe==0?Kt(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof oe==0?"("===t.substr(0,1)?It(t.substr(1,t.length-2)):It(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof oe==1?It(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof oe==1?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(t){p=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,1):this.Ff=Ht(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,2):this.Ff=Ht(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,3):this.Ff=Ht(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};Tt(ee,Qt);var re=function(){ee.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return $t(e,this.objId,this.scope)},set:function(t){var r,n;n=[],"string"==typeof(r=t)&&(n=function(t,e,r){r||(r=1);for(var n,i=[];n=e.exec(t);)i.push(n[r]);return i}(r,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,r){for(r=r||!1,t=(t=t||"").toString();-1!==e.indexOf(t)&&(e.splice(e.indexOf(t),1),!1!==r););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,18):this.Ff=Ht(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=zt(this.Ff,19):this.Ff=Ht(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=zt(this.Ff,20),e.sort()):this.Ff=Ht(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,22):this.Ff=Ht(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,23):this.Ff=Ht(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,27):this.Ff=Ht(this.Ff,27)}}),this.hasAppearanceStream=!1};Tt(re,ee);var ne=function(){re.call(this),this.fontName="helvetica",this.combo=!1};Tt(ne,re);var ie=function(){ne.call(this),this.combo=!0};Tt(ie,ne);var ae=function(){ie.call(this),this.edit=!0};Tt(ae,ie);var oe=function(){ee.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,15):this.Ff=Ht(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,16):this.Ff=Ht(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,17):this.Ff=Ht(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,26):this.Ff=Ht(this.Ff,26)}});var e,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(r).length){var e,n=[];for(e in n.push("<<"),r)n.push("/"+e+" ("+Mt(t(r[e]))+")");return n.push(">>"),n.join("\n")}},set:function(e){"object"===(0,t.A)(e)&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(t){"string"==typeof t&&(r.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})};Tt(oe,ee);var se=function(){oe.call(this),this.pushButton=!0};Tt(se,oe);var ue=function(){oe.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};Tt(ue,oe);var le=function(){var e,r;ee.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(t){r=t}});var n,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var e,r=[];for(e in r.push("<<"),i)r.push("/"+e+" ("+Mt(t(i[e]))+")");return r.push(">>"),r.join("\n")},set:function(e){"object"===(0,t.A)(e)&&(i=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(t){"string"==typeof t&&(i.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(t){n=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(t){n="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=de.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Tt(le,ee),ue.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},ue.prototype.createOption=function(t){var e=new le;return e.Parent=this,e.optionName=t,this.Kids.push(e),me.call(this.scope,e),e};var ce=function(){oe.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=de.CheckBox.createAppearanceStream()};Tt(ce,oe);var he=function(){ee.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,13):this.Ff=Ht(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,21):this.Ff=Ht(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,23):this.Ff=Ht(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,24):this.Ff=Ht(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,25):this.Ff=Ht(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,26):this.Ff=Ht(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Tt(he,ee);var fe=function(){he.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ut(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=zt(this.Ff,14):this.Ff=Ht(this.Ff,14)}}),this.password=!0};Tt(fe,he);var de={CheckBox:{createAppearanceStream:function(){return{N:{On:de.CheckBox.YesNormal},D:{On:de.CheckBox.YesPushDown,Off:de.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),a=Gt(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+jt(de.internal.getWidth(t))+" "+jt(de.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+jt(a.fontSize)+" Tf "+i),r.push("BT"),r.push(a.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join("\n"),e},YesNormal:function(t){var e=Bt(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=[],a=de.internal.getHeight(t),o=de.internal.getWidth(t),s=Gt(t,t.caption);return i.push("1 g"),i.push("0 0 "+jt(o)+" "+jt(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+jt(o-1)+" "+jt(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+jt(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+jt(de.internal.getWidth(t))+" "+jt(de.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:de.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=de.RadioButton.Circle.YesNormal,e.D[t]=de.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=Bt(t);e.scope=t.scope;var r=[],n=de.internal.getWidth(t)<=de.internal.getHeight(t)?de.internal.getWidth(t)/4:de.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=de.internal.Bezier_C,a=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+Ot(de.internal.getWidth(t)/2)+" "+Ot(de.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=[],n=de.internal.getWidth(t)<=de.internal.getHeight(t)?de.internal.getWidth(t)/4:de.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*de.internal.Bezier_C).toFixed(5)),o=Number((n*de.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Ot(de.internal.getWidth(t)/2)+" "+Ot(de.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+Ot(de.internal.getWidth(t)/2)+" "+Ot(de.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=[],n=de.internal.getWidth(t)<=de.internal.getHeight(t)?de.internal.getWidth(t)/4:de.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*de.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+Ot(de.internal.getWidth(t)/2)+" "+Ot(de.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),r.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),r.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),r.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:de.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=de.RadioButton.Cross.YesNormal,e.D[t]=de.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=Bt(t);e.scope=t.scope;var r=[],n=de.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+jt(de.internal.getWidth(t)-2)+" "+jt(de.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(jt(n.x1.x)+" "+jt(n.x1.y)+" m"),r.push(jt(n.x2.x)+" "+jt(n.x2.y)+" l"),r.push(jt(n.x4.x)+" "+jt(n.x4.y)+" m"),r.push(jt(n.x3.x)+" "+jt(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=de.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+jt(de.internal.getWidth(t))+" "+jt(de.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+jt(de.internal.getWidth(t)-2)+" "+jt(de.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(jt(r.x1.x)+" "+jt(r.x1.y)+" m"),n.push(jt(r.x2.x)+" "+jt(r.x2.y)+" l"),n.push(jt(r.x4.x)+" "+jt(r.x4.y)+" m"),n.push(jt(r.x3.x)+" "+jt(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=Bt(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+jt(de.internal.getWidth(t))+" "+jt(de.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};de.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=de.internal.getWidth(t),r=de.internal.getHeight(t),n=Math.min(e,r);return{x1:{x:(e-n)/2,y:(r-n)/2+n},x2:{x:(e-n)/2+n,y:(r-n)/2},x3:{x:(e-n)/2,y:(r-n)/2},x4:{x:(e-n)/2+n,y:(r-n)/2+n}}}},de.internal.getWidth=function(e){var r=0;return"object"===(0,t.A)(e)&&(r=Et(e.Rect[2])),r},de.internal.getHeight=function(e){var r=0;return"object"===(0,t.A)(e)&&(r=Et(e.Rect[3])),r};var pe,ge,me=Ft.addField=function(e){if(function(e,r){if(r.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(ee.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(Xt)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Ct=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new te,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",(function(){var t;(t=e).internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})),e.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.objId=void 0,n.hasAnnotation&&Jt(n,t)}}(e)})),e.internal.events.subscribe("putCatalog",(function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)})),e.internal.events.subscribe("postPutPages",(function(r){!function(e,r){var n=!e;for(var i in e||(r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||r.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(i)){var a=e[i],o=[],s=a.Rect;if(a.Rect&&(a.Rect=Wt(a.Rect,r)),r.internal.newObjectDeferredBegin(a.objId,!0),a.DA=de.createDefaultAppearanceStream(a),"object"===(0,t.A)(a)&&"function"==typeof a.getKeyValueListForStream&&(o=a.getKeyValueListForStream()),a.Rect=s,a.hasAppearanceStream&&!a.appearanceStreamContent){var u=Vt(a);o.push({key:"AP",value:"<</N "+u+">>"}),r.internal.acroformPlugin.xForms.push(u)}if(a.appearanceStreamContent){var l="";for(var c in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(c)){var h=a.appearanceStreamContent[c];if(l+="/"+c+" ",l+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var i in h)if(h.hasOwnProperty(i)){var f=h[i];"function"==typeof f&&(f=f.call(r,a)),l+="/"+i+" "+f+" ",r.internal.acroformPlugin.xForms.indexOf(f)>=0||r.internal.acroformPlugin.xForms.push(f)}}else"function"==typeof(f=h)&&(f=f.call(r,a)),l+="/"+i+" "+f,r.internal.acroformPlugin.xForms.indexOf(f)>=0||r.internal.acroformPlugin.xForms.push(f);l+=">>"}o.push({key:"AP",value:"<<\n"+l+">>"})}r.internal.putStream({additionalKeyValues:o,objectId:a.objId}),r.internal.out("endobj")}n&&function(e,r){for(var n in e)if(e.hasOwnProperty(n)){var i=n,a=e[n];r.internal.newObjectDeferredBegin(a.objId,!0),"object"===(0,t.A)(a)&&"function"==typeof a.putStream&&a.putStream(),delete e[i]}}(r.internal.acroformPlugin.xForms,r)}(r,e)})),e.internal.acroformPlugin.isInitialized=!0}}(this,e),!(e instanceof ee))throw new Error("Invalid argument passed to jsPDF.addField.");var r;return(r=e).scope.internal.acroformPlugin.printedOut&&(r.scope.internal.acroformPlugin.printedOut=!1,r.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),r.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(r),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};function ve(t){return t.reduce((function(t,e,r){return t[e]=r,t}),{})}Ft.AcroFormChoiceField=re,Ft.AcroFormListBox=ne,Ft.AcroFormComboBox=ie,Ft.AcroFormEditBox=ae,Ft.AcroFormButton=oe,Ft.AcroFormPushButton=se,Ft.AcroFormRadioButton=ue,Ft.AcroFormCheckBox=ce,Ft.AcroFormTextField=he,Ft.AcroFormPasswordField=fe,Ft.AcroFormAppearance=de,Ft.AcroForm={ChoiceField:re,ListBox:ne,ComboBox:ie,EditBox:ae,Button:oe,PushButton:se,RadioButton:ue,CheckBox:ce,TextField:he,PasswordField:fe,Appearance:de},Pt.AcroForm={ChoiceField:re,ListBox:ne,ComboBox:ie,EditBox:ae,Button:oe,PushButton:se,RadioButton:ue,CheckBox:ce,TextField:he,PasswordField:fe,Appearance:de},Pt.AcroForm,function(e){e.__addimage__={};var r="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(t,e){var i,a,o,s,u,l=r;if("RGBA"===(e=e||r)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(A(t))for(u in n)for(o=n[u],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(void 0!==o[i][a]&&o[i][a]!==t[a]){s=!1;break}if(!0===s){l=u;break}}else for(u in n)for(o=n[u],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(void 0!==o[i][a]&&o[i][a]!==t.charCodeAt(a)){s=!1;break}if(!0===s){l=u;break}}return l===r&&e!==r&&(l=e),l},a=function t(e){for(var r=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);e.objectId=this.internal.newObject();var a=[];if(a.push({key:"Type",value:"/XObject"}),a.push({key:"Subtype",value:"/Image"}),a.push({key:"Width",value:e.width}),a.push({key:"Height",value:e.height}),e.colorSpace===v.INDEXED?a.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(e.palette.length/3-1)+" "+("sMask"in e&&void 0!==e.sMask?e.objectId+2:e.objectId+1)+" 0 R]"}):(a.push({key:"ColorSpace",value:"/"+e.colorSpace}),e.colorSpace===v.DEVICE_CMYK&&a.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),a.push({key:"BitsPerComponent",value:e.bitsPerComponent}),"decodeParameters"in e&&void 0!==e.decodeParameters&&a.push({key:"DecodeParms",value:"<<"+e.decodeParameters+">>"}),"transparency"in e&&Array.isArray(e.transparency)){for(var o="",s=0,u=e.transparency.length;s<u;s++)o+=e.transparency[s]+" "+e.transparency[s]+" ";a.push({key:"Mask",value:"["+o+"]"})}void 0!==e.sMask&&a.push({key:"SMask",value:e.objectId+1+" 0 R"});var l=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:a,alreadyAppliedFilters:l,objectId:e.objectId}),r("endobj"),"sMask"in e&&void 0!==e.sMask){var c="/Predictor "+e.predictor+" /Colors 1 /BitsPerComponent "+e.bitsPerComponent+" /Columns "+e.width,h={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:e.bitsPerComponent,decodeParameters:c,data:e.sMask};"filter"in e&&(h.filter=e.filter),t.call(this,h)}if(e.colorSpace===v.INDEXED){var f=this.internal.newObject();n({data:L(new Uint8Array(e.palette)),objectId:f}),r("endobj")}},o=function(){var t=this.internal.collections.addImage_images;for(var e in t)a.call(this,t[e])},s=function(){var t,e=this.internal.collections.addImage_images,r=this.internal.write;for(var n in e)r("/I"+(t=e[n]).index,t.objectId,"0","R")},u=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},l=function(){var t=this.internal.collections.addImage_images;return u.call(this),t},c=function(){return Object.keys(this.internal.collections.addImage_images).length},h=function(t){return"function"==typeof e["process"+t.toUpperCase()]},f=function(e){return"object"===(0,t.A)(e)&&1===e.nodeType},d=function(t,r){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return et(unescape(n).split("base64,").pop());var i=e.loadFile(n,!0);if(void 0!==i)return i}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var a;switch(r){case"PNG":a="image/png";break;case"WEBP":a="image/webp";break;default:a="image/jpeg"}return et(t.toDataURL(a,1).split("base64,").pop())}},p=function(t){var e=this.internal.collections.addImage_images;if(e)for(var r in e)if(t===e[r].alias)return e[r]},g=function(t,e,r){return t||e||(t=-96,e=-96),t<0&&(t=-1*r.width*72/t/this.internal.scaleFactor),e<0&&(e=-1*r.height*72/e/this.internal.scaleFactor),0===t&&(t=e*r.width/r.height),0===e&&(e=t*r.height/r.width),[t,e]},m=function(t,e,r,n,i,a){var o=g.call(this,r,n,i),s=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,c=l.call(this);if(r=o[0],n=o[1],c[i.index]=i,a){a*=Math.PI/180;var h=Math.cos(a),f=Math.sin(a),d=function(t){return t.toFixed(4)},p=[d(h),d(f),d(-1*f),d(h),0,0,"cm"]}this.internal.write("q"),a?(this.internal.write([1,"0","0",1,s(t),u(e+n),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([s(r),"0","0",s(n),"0","0","cm"].join(" "))):this.internal.write([s(r),"0","0",s(n),s(t),u(e+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},v=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var b=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},y=e.__addimage__.sHashCode=function(t){var e,r,n=0;if("string"==typeof t)for(r=t.length,e=0;e<r;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;else if(A(t))for(r=t.byteLength/2,e=0;e<r;e++)n=(n<<5)-n+t[e],n|=0;return n},w=e.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(e=!1),e},x=e.__addimage__.extractImageFromDataUrl=function(t){var e=(t=t||"").split("base64,"),r=null;if(2===e.length){var n=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(e[0]);Array.isArray(n)&&(r={mimeType:n[1],charset:n[2],data:e[1]})}return r},S=e.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};e.__addimage__.isArrayBuffer=function(t){return S()&&t instanceof ArrayBuffer};var A=e.__addimage__.isArrayBufferView=function(t){return S()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},N=e.__addimage__.binaryStringToUint8Array=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r},L=e.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",r=A(t)?t:new Uint8Array(t),n=0;n<r.length;n+=8192)e+=String.fromCharCode.apply(null,r.subarray(n,n+8192));return e};e.addImage=function(){var e,n,i,a,o,s,l,c,h;if("number"==typeof arguments[1]?(n=r,i=arguments[1],a=arguments[2],o=arguments[3],s=arguments[4],l=arguments[5],c=arguments[6],h=arguments[7]):(n=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],l=arguments[6],c=arguments[7],h=arguments[8]),"object"===(0,t.A)(e=arguments[0])&&!f(e)&&"imageData"in e){var d=e;e=d.imageData,n=d.format||n||r,i=d.x||i||0,a=d.y||a||0,o=d.w||d.width||o,s=d.h||d.height||s,l=d.alias||l,c=d.compression||c,h=d.rotation||d.angle||h}var p=this.internal.getFilters();if(void 0===c&&-1!==p.indexOf("FlateEncode")&&(c="SLOW"),isNaN(i)||isNaN(a))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var g=k.call(this,e,n,l,c);return m.call(this,i,a,o,s,g,h),this};var k=function(t,n,a,o){var s,u,l;if("string"==typeof t&&i(t)===r){t=unescape(t);var g=_(t,!1);(""!==g||void 0!==(g=e.loadFile(t,!0)))&&(t=g)}if(f(t)&&(t=d(t,n)),n=i(t,n),!h(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(l=a)||0===l.length)&&(a=function(t){return"string"==typeof t||A(t)?y(t):A(t.data)?y(t.data):null}(t)),(s=p.call(this,a))||(S()&&(t instanceof Uint8Array||"RGBA"===n||(u=t,t=N(t))),s=this["process"+n.toUpperCase()](t,c.call(this),a,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:b.NONE}(o),u)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},_=e.__addimage__.convertBase64ToBinaryString=function(t,e){var r;e="boolean"!=typeof e||e;var n,i="";if("string"==typeof t){n=null!==(r=x(t))?r.data:t;try{i=et(n)}catch(t){if(e)throw w(n)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return i};e.getImageProperties=function(t){var n,a,o="";if(f(t)&&(t=d(t)),"string"==typeof t&&i(t)===r&&(""===(o=_(t,!1))&&(o=e.loadFile(t)||""),t=o),a=i(t),!h(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(!S()||t instanceof Uint8Array||(t=N(t)),!(n=this["process"+a.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=a,n}}(Pt.API),pe=Pt.API,ge=function(t){if(void 0!==t&&""!=t)return!0},Pt.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),pe.events.push(["putPage",function(t){for(var e,r,n,i=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(t.objId),s=t.pageContext.annotations,u=!1,l=0;l<s.length&&!u;l++)switch((e=s[l]).type){case"link":(ge(e.options.url)||ge(e.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var c=0;c<s.length;c++){e=s[c];var h=this.internal.pdfEscape,f=this.internal.getEncryptor(t.objId);switch(e.type){case"reference":this.internal.write(" "+e.object.objId+" 0 R ");break;case"text":var d=this.internal.newAdditionalObject(),p=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(d.objId),m=e.title||"Note";n="<</Type /Annot /Subtype /Text "+(r="/Rect ["+i(e.bounds.x)+" "+a(e.bounds.y+e.bounds.h)+" "+i(e.bounds.x+e.bounds.w)+" "+a(e.bounds.y)+"] ")+"/Contents ("+h(g(e.contents))+")",n+=" /Popup "+p.objId+" 0 R",n+=" /P "+o.objId+" 0 R",n+=" /T ("+h(g(m))+") >>",d.content=n;var v=d.objId+" 0 R";n="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+i(e.bounds.x+30)+" "+a(e.bounds.y+e.bounds.h)+" "+i(e.bounds.x+e.bounds.w+30)+" "+a(e.bounds.y)+"] ")+" /Parent "+v,e.open&&(n+=" /Open true"),n+=" >>",p.content=n,this.internal.write(d.objId,"0 R",p.objId,"0 R");break;case"freetext":r="/Rect ["+i(e.bounds.x)+" "+a(e.bounds.y)+" "+i(e.bounds.x+e.bounds.w)+" "+a(e.bounds.y+e.bounds.h)+"] ";var b=e.color||"#000000";n="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+h(f(e.contents))+")",n+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+b+")",n+=" /Border [0 0 0]",n+=" >>",this.internal.write(n);break;case"link":if(e.options.name){var y=this.annotations._nameMap[e.options.name];e.options.pageNumber=y.page,e.options.top=y.y}else e.options.top||(e.options.top=0);if(r="/Rect ["+e.finalBounds.x+" "+e.finalBounds.y+" "+e.finalBounds.w+" "+e.finalBounds.h+"] ",n="",e.options.url)n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+h(f(e.options.url))+") >>";else if(e.options.pageNumber)switch(n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(e.options.pageNumber).objId+" 0 R",e.options.magFactor=e.options.magFactor||"XYZ",e.options.magFactor){case"Fit":n+=" /Fit]";break;case"FitH":n+=" /FitH "+e.options.top+"]";break;case"FitV":e.options.left=e.options.left||0,n+=" /FitV "+e.options.left+"]";break;default:var w=a(e.options.top);e.options.left=e.options.left||0,void 0===e.options.zoom&&(e.options.zoom=0),n+=" /XYZ "+e.options.left+" "+w+" "+e.options.zoom+"]"}""!=n&&(n+=" >>",this.internal.write(n))}}this.internal.write("]")}}]),pe.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},pe.link=function(t,e,r,n,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(t),y:s(e),w:o(t+r),h:s(e+n)},options:i,type:"link"})},pe.textWithLink=function(t,e,r,n){var i,a,o=this.getTextWidth(t),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){a=n.maxWidth;var u=this.splitTextToSize(t,a).length;i=Math.ceil(s*u)}else a=o,i=s;return this.text(t,e,r,n),r+=.2*s,"center"===n.align&&(e-=o/2),"right"===n.align&&(e-=o),this.link(e,r-s,a,i,n),o},pe.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var a=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},o=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},s=t.__arabicParser__.isArabicEndLetter=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length<=2},u=t.__arabicParser__.isArabicAlfLetter=function(t){return o(t)&&i.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=1};var l=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return o(t)&&a(t)&&e[t.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&a(t)&&4==e[t.charCodeAt(0)].length},h=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=r,i="",a=0;for(e=0;e<t.length;e+=1)void 0!==n[t.charCodeAt(e)]?(a++,"number"==typeof(n=n[t.charCodeAt(e)])&&(i+=String.fromCharCode(n),n=r,a=0),e===t.length-1&&(n=r,i+=t.charAt(e-(a-1)),e-=a-1,a=0)):(n=r,i+=t.charAt(e-a),e-=a,a=0);return i};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==n[t.charCodeAt(0)]};var f=t.__arabicParser__.getCorrectForm=function(t,e,r){return o(t)?!1===a(t)?-1:!l(t)||!o(e)&&!o(r)||!o(r)&&s(e)||s(t)&&!o(e)||s(t)&&u(e)||s(t)&&s(e)?0:c(t)&&o(e)&&!s(e)&&o(r)&&l(r)?3:s(t)||!o(r)?1:2:-1},d=function(t){var r=0,n=0,i=0,a="",s="",u="",l=(t=t||"").split("\\s+"),c=[];for(r=0;r<l.length;r+=1){for(c.push(""),n=0;n<l[r].length;n+=1)a=l[r][n],s=l[r][n-1],u=l[r][n+1],o(a)?(i=f(a,s,u),c[r]+=-1!==i?String.fromCharCode(e[a.charCodeAt(0)][i]):a):c[r]+=a;c[r]=h(c[r])}return c.join(" ")},p=t.__arabicParser__.processArabic=t.processArabic=function(){var t,e="string"==typeof arguments[0]?arguments[0]:arguments[0].text,r=[];if(Array.isArray(e)){var n=0;for(r=[],n=0;n<e.length;n+=1)Array.isArray(e[n])?r.push([d(e[n][0]),e[n][1],e[n][2]]):r.push([d(e[n])]);t=r}else t=d(e);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",p])}(Pt.API),Pt.API.autoPrint=function(t){var e;return"javascript"===((t=t||{}).variant=t.variant||"non-conform",t.variant)?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",(function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){this.internal.out("/OpenAction "+e+" 0 R")}))),this},function(t){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,e){var r;if("2d"!==(t=t||"2d"))return null;for(r in e)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=e[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Pt.API),function(e){var r={left:0,top:0,bottom:0,right:0},n=!1,i=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},r),this.internal.__cell__.margins.width=this.getPageWidth(),a.call(this))},a=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var e=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var r=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a},set:function(t){a=t}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(t){return i.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},e.getTextDimensions=function(t,e){i.call(this);var r=(e=e||{}).fontSize||this.getFontSize(),n=e.font||this.getFont(),a=e.scaleFactor||this.internal.scaleFactor,o=0,s=0,u=0,l=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}var c=e.maxWidth;c>0?"string"==typeof t?t=this.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(l.splitTextToSize(e,c))}),[])):t=Array.isArray(t)?t:[t];for(var h=0;h<t.length;h++)o<(u=this.getStringUnitWidth(t[h],{font:n})*r)&&(o=u);return 0!==o&&(s=t.length),{w:o/=a,h:Math.max((s*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){i.call(this),this.addPage();var t=this.internal.__cell__.margins||r;return this.internal.__cell__.lastCell=new o(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=e.cell=function(){var t;t=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),i.call(this);var e=this.internal.__cell__.lastCell,a=this.internal.__cell__.padding,s=this.internal.__cell__.margins||r,u=this.internal.__cell__.tableHeaderRow,l=this.internal.__cell__.printHeaders;return void 0!==e.lineNumber&&(e.lineNumber===t.lineNumber?(t.x=(e.x||0)+(e.width||0),t.y=e.y||0):e.y+e.height+t.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=s.top,l&&u&&(this.printHeaderRow(t.lineNumber,!0),t.y+=u[0].height)):t.y=e.y+e.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===n?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-a,t.y+a,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+a,{align:"center",baseline:"top",maxWidth:t.width-a-a}):this.text(t.text,t.x+a,t.y+a,{align:"left",baseline:"top",maxWidth:t.width-a-a})),this.internal.__cell__.lastCell=t,this};e.table=function(e,n,l,c,h){if(i.call(this),!l)throw new Error("No data for PDF table.");var f,d,p,g,m=[],v=[],b=[],y={},w={},x=[],S=[],A=(h=h||{}).autoSize||!1,N=!1!==h.printHeaders,L=h.css&&void 0!==h.css["font-size"]?16*h.css["font-size"]:h.fontSize||12,k=h.margins||Object.assign({width:this.getPageWidth()},r),_="number"==typeof h.padding?h.padding:3,P=h.headerBackgroundColor||"#c8c8c8",F=h.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=N,this.internal.__cell__.margins=k,this.internal.__cell__.table_font_size=L,this.internal.__cell__.padding=_,this.internal.__cell__.headerBackgroundColor=P,this.internal.__cell__.headerTextColor=F,this.setFontSize(L),null==c)v=m=Object.keys(l[0]),b=m.map((function(){return"left"}));else if(Array.isArray(c)&&"object"===(0,t.A)(c[0]))for(m=c.map((function(t){return t.name})),v=c.map((function(t){return t.prompt||t.name||""})),b=c.map((function(t){return t.align||"left"})),f=0;f<c.length;f+=1)w[c[f].name]=c[f].width*(19.049976/25.4);else Array.isArray(c)&&"string"==typeof c[0]&&(v=m=c,b=m.map((function(){return"left"})));if(A||Array.isArray(c)&&"string"==typeof c[0])for(f=0;f<m.length;f+=1){for(y[g=m[f]]=l.map((function(t){return t[g]})),this.setFont(void 0,"bold"),x.push(this.getTextDimensions(v[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=y[g],this.setFont(void 0,"normal"),p=0;p<d.length;p+=1)x.push(this.getTextDimensions(d[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[g]=Math.max.apply(null,x)+_+_,x=[]}if(N){var C={};for(f=0;f<m.length;f+=1)C[m[f]]={},C[m[f]].text=v[f],C[m[f]].align=b[f];var M=u.call(this,C,w);S=m.map((function(t){return new o(e,n,w[t],M,C[t].text,void 0,C[t].align)})),this.setTableHeaderRow(S),this.printHeaderRow(1,!1)}var I=c.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(f=0;f<l.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:l[f]},this);var j=u.call(this,l[f],w);for(p=0;p<m.length;p+=1){var O=l[f][m[p]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:p,data:O},this),s.call(this,new o(e,n,w[m[p]],j,O,f+2,I[m[p]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var u=function(t,e){var r=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(t).map((function(n){var i=t[n];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,e[n]-r-r)}),this).map((function(t){return this.getLineHeightFactor()*t.length*n/i+r+r}),this).reduce((function(t,e){return Math.max(t,e)}),0)};e.setTableHeaderRow=function(t){i.call(this),this.internal.__cell__.tableHeaderRow=t},e.printHeaderRow=function(t,e){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var r;if(n=!0,"function"==typeof this.internal.__cell__.headerFunction){var a=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(a[0],a[1],a[2],a[3],void 0,-1)}this.setFont(void 0,"bold");for(var u=[],l=0;l<this.internal.__cell__.tableHeaderRow.length;l+=1){r=this.internal.__cell__.tableHeaderRow[l].clone(),e&&(r.y=this.internal.__cell__.margins.top||0,u.push(r)),r.lineNumber=t;var c=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,r),this.setTextColor(c)}u.length>0&&this.setTableHeaderRow(u),this.setFont(void 0,"normal"),n=!1}}(Pt.API);var be={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ye=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],we=ve(ye),xe=[100,200,300,400,500,600,700,800,900],Se=ve(xe);function Ae(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return be[t=t||"normal"]?t:"normal"}(t.style),n=function(t){return t?"number"==typeof t?t>=100&&t<=900&&t%100==0?t:400:/^\d00$/.test(t)?parseInt(t):"bold"===t?700:400:400}(t.weight),i=function(t){return"number"==typeof we[t=t||"normal"]?t:"normal"}(t.stretch);return{family:e,style:r,weight:n,stretch:i,src:t.src||[],ref:t.ref||{name:e,style:[i,r,n].join(" ")}}}function Ne(t,e,r,n){var i;for(i=r;i>=0&&i<e.length;i+=n)if(t[e[i]])return t[e[i]];for(i=r;i>=0&&i<e.length;i-=n)if(t[e[i]])return t[e[i]]}var Le={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},ke={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function _e(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Pe(t){return t.trimLeft()}function Fe(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function Ce(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===e?null:[e[0],t.substring(e[0].length)]}var Me,Ie,je,Oe=["times"];!function(e){var r,n,i,a,o,s,u,l,c,h=function(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new l,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new s,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new s,this.lineDashOffset=t.lineDashOffset||0,this.lineDash=t.lineDash||[],this.margin=t.margin||[0,0,0,0],this.prevPageLastElemOffset=t.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new f(this),r=this.internal.f2,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,s=this.internal.Point,u=this.internal.Rectangle,l=this.internal.Matrix,c=new h}]);var f=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var e=t;Object.defineProperty(this,"pdf",{get:function(){return e}});var r=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return r},set:function(t){r=Boolean(t)}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(t){n=Boolean(t)}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(t){isNaN(t)||(i=t)}});var a=0;Object.defineProperty(this,"posY",{get:function(){return a},set:function(t){isNaN(t)||(a=t)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(t){var e;"number"==typeof t?e=[t,t,t,t]:((e=new Array(4))[0]=t[0],e[1]=t.length>=2?t[1]:e[0],e[2]=t.length>=3?t[2]:e[0],e[3]=t.length>=4?t[3]:e[1]),c.margin=e}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(t){o=t}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(t){s=t}});var u=[];Object.defineProperty(this,"pageBreaks",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(t){t instanceof h&&(c=t)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(t){c.path=t}});var l=[];Object.defineProperty(this,"ctxStack",{get:function(){return l},set:function(t){l=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=d(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=d(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var f=null;function p(t,e){if(null===f){var r=function(t){var e=[];return Object.keys(t).forEach((function(r){t[r].forEach((function(t){var n=null;switch(t){case"bold":n={family:r,weight:"bold"};break;case"italic":n={family:r,style:"italic"};break;case"bolditalic":n={family:r,weight:"bold",style:"italic"};break;case"":case"normal":n={family:r}}null!==n&&(n.ref={name:r,style:t},e.push(n))}))})),e}(t.getFontList());f=function(t){for(var e={},r=0;r<t.length;++r){var n=Ae(t[r]),i=n.family,a=n.stretch,o=n.style,s=n.weight;e[i]=e[i]||{},e[i][a]=e[i][a]||{},e[i][a][o]=e[i][a][o]||{},e[i][a][o][s]=n}return e}(r.concat(e))}return f}var g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(t){f=null,g=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))){var r=e[1],n=(e[2],e[3]),i=e[4],a=(e[5],e[6]),o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===o?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(t){var e,r,n=[],i=t.trim();if(""===i)return Oe;if(i in ke)return[ke[i]];for(;""!==i;){switch(r=null,e=(i=Pe(i)).charAt(0)){case'"':case"'":r=Fe(i.substring(1),e);break;default:r=Ce(i)}if(null===r)return Oe;if(n.push(r[0]),""!==(i=Pe(r[1]))&&","!==i.charAt(0))return Oe;i=i.replace(/^,/,"")}return n}(a);if(this.fontFaces){var u=function(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},Le,r.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=Ae(e[s])).family]&&(a.family=i[a.family]),t.hasOwnProperty(a.family)){o=t[a.family];break}if(!(o=o||t[n]))throw new Error("Could not find a font-family for the rule '"+_e(a)+"' and default family '"+n+"'.");if(o=function(t,e){if(e[t])return e[t];var r=we[t],n=r<=we.normal?-1:1,i=Ne(e,ye,r,n);if(!i)throw new Error("Could not find a matching font-stretch value for "+t);return i}(a.stretch,o),o=function(t,e){if(e[t])return e[t];for(var r=be[t],n=0;n<r.length;++n)if(e[r[n]])return e[r[n]];throw new Error("Could not find a matching font-style for "+t)}(a.style,o),!(o=function(t,e){if(e[t])return e[t];if(400===t&&e[500])return e[500];if(500===t&&e[400])return e[400];var r=Se[t],n=Ne(e,xe,r,t<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+t);return n}(a.weight,o)))throw new Error("Failed to resolve a font for the rule '"+_e(a)+"'.");return o}(p(this.pdf,this.fontFaces),s.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})));this.pdf.setFont(u.ref.name,u.ref.style)}else{var l="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(l="bold"),"italic"===r&&(l+="italic"),0===l.length&&(l="normal");for(var c="",h={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},f=0;f<s.length;f++){if(void 0!==this.pdf.internal.getFont(s[f],l,{noFallback:!0,disableWarning:!0})){c=s[f];break}if("bolditalic"===l&&void 0!==this.pdf.internal.getFont(s[f],"bold",{noFallback:!0,disableWarning:!0}))c=s[f],l="bold";else if(void 0!==this.pdf.internal.getFont(s[f],"normal",{noFallback:!0,disableWarning:!0})){c=s[f],l="normal";break}}if(""===c)for(var d=0;d<s.length;d++)if(h[s[d]]){c=h[s[d]];break}c=""===c?"Times":c,this.pdf.setFont(c,l)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(t){this.ctx.lineDashOffset=t,q.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,q.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};f.prototype.setLineDash=function(t){this.lineDash=t},f.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},f.prototype.fill=function(){x.call(this,"fill",!1)},f.prototype.stroke=function(){x.call(this,"stroke",!1)},f.prototype.beginPath=function(){this.path=[{type:"begin"}]},f.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw K.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(t,e)},f.prototype.closePath=function(){var e=new s(0,0),r=0;for(r=this.path.length-1;-1!==r;r--)if("begin"===this.path[r].type&&"object"===(0,t.A)(this.path[r+1])&&"number"==typeof this.path[r+1].x){e=new s(this.path[r+1].x,this.path[r+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(e.x,e.y)},f.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw K.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(r.x,r.y)},f.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),x.call(this,null,!0)},f.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw K.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new s(r,n)),a=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"qct",x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new s(i.x,i.y)},f.prototype.bezierCurveTo=function(t,e,r,n,i,a){if(isNaN(i)||isNaN(a)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw K.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var o=this.ctx.transform.applyToPoint(new s(i,a)),u=this.ctx.transform.applyToPoint(new s(t,e)),l=this.ctx.transform.applyToPoint(new s(r,n));this.path.push({type:"bct",x1:u.x,y1:u.y,x2:l.x,y2:l.y,x:o.x,y:o.y}),this.ctx.lastPoint=new s(o.x,o.y)},f.prototype.arc=function(t,e,r,n,i,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw K.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(a=Boolean(a),!this.ctx.transform.isIdentity){var o=this.ctx.transform.applyToPoint(new s(t,e));t=o.x,e=o.y;var u=this.ctx.transform.applyToPoint(new s(0,r)),l=this.ctx.transform.applyToPoint(new s(0,0));r=Math.sqrt(Math.pow(u.x-l.x,2)+Math.pow(u.y-l.y,2))}Math.abs(i-n)>=2*Math.PI&&(n=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:r,startAngle:n,endAngle:i,counterclockwise:a})},f.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},f.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw K.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+r,e),this.lineTo(t,e)},f.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw K.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,r,n),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},f.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw K.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");g.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},f.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw K.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,r,n))},f.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("q");if(this.pdf.setPage(e),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},f.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("Q");this.pdf.setPage(e),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},f.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(t){var e,r,n,i;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))e=0,r=0,n=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==a)e=parseInt(a[1]),r=parseInt(a[2]),n=parseInt(a[3]),i=1;else if(null!==(a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))e=parseInt(a[1]),r=parseInt(a[2]),n=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,"string"==typeof t&&"#"!==t.charAt(0)){var o=new it(t);t=o.ok?o.toHex():"#000000"}4===t.length?(e=t.substring(1,2),e+=e,r=t.substring(2,3),r+=r,n=t.substring(3,4),n+=n):(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7)),e=parseInt(e,16),r=parseInt(r,16),n=parseInt(n,16)}}return{r:e,g:r,b:n,a:i,style:t}},p=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},g=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};f.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw K.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!p.call(this)){var i=T(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;F.call(this,{text:t,x:e,y:r,scale:a,angle:i,align:this.textAlign,maxWidth:n})}},f.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw K.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!g.call(this)){n=isNaN(n)?void 0:n;var i=T(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;F.call(this,{text:t,x:e,y:r,scale:a,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},f.prototype.measureText=function(t){if("string"!=typeof t)throw K.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,r=this.pdf.internal.scaleFactor,n=e.internal.getFontSize(),i=e.getStringUnitWidth(t)*n/e.internal.scaleFactor;return new function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this}({width:i*=Math.round(96*r/72*1e4)/1e4})},f.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw K.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new l(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},f.prototype.rotate=function(t){if(isNaN(t))throw K.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new l(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},f.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw K.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new l(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(r)},f.prototype.transform=function(t,e,r,n,i,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a))throw K.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var o=new l(t,e,r,n,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},f.prototype.setTransform=function(t,e,r,n,i,a){t=isNaN(t)?1:t,e=isNaN(e)?0:e,r=isNaN(r)?0:r,n=isNaN(n)?1:n,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new l(t,e,r,n,i,a)};var m=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};f.prototype.drawImage=function(t,e,r,n,i,a,o,s,c){var h=this.pdf.getImageProperties(t),f=1,d=1,p=1,g=1;void 0!==n&&void 0!==s&&(p=s/n,g=c/i,f=h.width/n*s/n,d=h.height/i*c/i),void 0===a&&(a=e,o=r,e=0,r=0),void 0!==n&&void 0===s&&(s=n,c=i),void 0===n&&void 0===s&&(s=h.width,c=h.height);for(var b,x=this.ctx.transform.decompose(),A=T(x.rotate.shx),N=new l,L=(N=(N=(N=N.multiply(x.translate)).multiply(x.skew)).multiply(x.scale)).applyToRectangle(new u(a-e*p,o-r*g,n*f,i*d)),k=v.call(this,L),_=[],P=0;P<k.length;P+=1)-1===_.indexOf(k[P])&&_.push(k[P]);if(w(_),this.autoPaging)for(var F=_[0],C=_[_.length-1],M=F;M<C+1;M++){this.pdf.setPage(M);var I=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],j=1===M?this.posY+this.margin[0]:this.margin[0],O=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],E=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],B=1===M?0:O+(M-2)*E;if(0!==this.ctx.clip_path.length){var q=this.path;b=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(b,this.posX+this.margin[3],-B+j+this.ctx.prevPageLastElemOffset),S.call(this,"fill",!0),this.path=q}var R=JSON.parse(JSON.stringify(L));R=y([R],this.posX+this.margin[3],-B+j+this.ctx.prevPageLastElemOffset)[0];var D=(M>F||M<C)&&m.call(this);D&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],I,E,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",R.x,R.y,R.w,R.h,null,null,A),D&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(t,"JPEG",L.x,L.y,L.w,L.h,null,null,A)};var v=function(t,e,r){var n=[];e=e||this.pdf.internal.pageSize.width,r=r||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+i)/r)+1);break;case"arc":n.push(Math.floor((t.y+i-t.radius)/r)+1),n.push(Math.floor((t.y+i+t.radius)/r)+1);break;case"qct":var a=E(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor((a.y+i)/r)+1),n.push(Math.floor((a.y+a.h+i)/r)+1);break;case"bct":var o=B(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor((o.y+i)/r)+1),n.push(Math.floor((o.y+o.h+i)/r)+1);break;case"rect":n.push(Math.floor((t.y+i)/r)+1),n.push(Math.floor((t.y+t.h+i)/r)+1)}for(var s=0;s<n.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<n[s];)b.call(this);return n},b=function(){var t=this.fillStyle,e=this.strokeStyle,r=this.font,n=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=r,this.lineCap=n,this.lineWidth=i,this.lineJoin=a},y=function(t,e,r){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=e,t[n].y2+=r;case"qct":t[n].x1+=e,t[n].y1+=r;default:t[n].x+=e,t[n].y+=r}return t},w=function(t){return t.sort((function(t,e){return t-e}))},x=function(t,e){for(var r,n,i=this.fillStyle,a=this.strokeStyle,o=this.lineCap,s=this.lineWidth,u=Math.abs(s*this.ctx.transform.scaleX),l=this.lineJoin,c=JSON.parse(JSON.stringify(this.path)),h=JSON.parse(JSON.stringify(this.path)),f=[],d=0;d<h.length;d++)if(void 0!==h[d].x)for(var p=v.call(this,h[d]),g=0;g<p.length;g+=1)-1===f.indexOf(p[g])&&f.push(p[g]);for(var x=0;x<f.length;x++)for(;this.pdf.internal.getNumberOfPages()<f[x];)b.call(this);if(w(f),this.autoPaging)for(var A=f[0],N=f[f.length-1],L=A;L<N+1;L++){this.pdf.setPage(L),this.fillStyle=i,this.strokeStyle=a,this.lineCap=o,this.lineWidth=u,this.lineJoin=l;var k=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],_=1===L?this.posY+this.margin[0]:this.margin[0],P=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],F=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],C=1===L?0:P+(L-2)*F;if(0!==this.ctx.clip_path.length){var M=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(r,this.posX+this.margin[3],-C+_+this.ctx.prevPageLastElemOffset),S.call(this,t,!0),this.path=M}if(n=JSON.parse(JSON.stringify(c)),this.path=y(n,this.posX+this.margin[3],-C+_+this.ctx.prevPageLastElemOffset),!1===e||0===L){var I=(L>A||L<N)&&m.call(this);I&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],k,F,null).clip().discardPath()),S.call(this,t,e),I&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=u,S.call(this,t,e),this.lineWidth=s;this.path=c},S=function(t,e){if(("stroke"!==t||e||!g.call(this))&&("stroke"===t||e||!p.call(this))){for(var r,n,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:s,deltas:[],abs:[]});break;case"lt":var u=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(r=[s.x-a[o-1].x,s.y-a[o-1].y],u>0))for(;u>=0;u--)if(!0!==i[u-1].close&&!0!==i[u-1].begin){i[u-1].deltas.push(r),i[u-1].abs.push(s);break}break;case"bct":r=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(r);break;case"qct":var l=a[o-1].x+2/3*(s.x1-a[o-1].x),c=a[o-1].y+2/3*(s.y1-a[o-1].y),h=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),d=s.x,m=s.y;r=[l-a[o-1].x,c-a[o-1].y,h-a[o-1].x,f-a[o-1].y,d-a[o-1].x,m-a[o-1].y],i[i.length-1].deltas.push(r);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}n=e?null:"stroke"===t?"stroke":"fill";for(var v=!1,b=0;b<i.length;b++)if(i[b].arc)for(var y=i[b].abs,w=0;w<y.length;w++){var x=y[w];"arc"===x.type?L.call(this,x.x,x.y,x.radius,x.startAngle,x.endAngle,x.counterclockwise,void 0,e,!v):C.call(this,x.x,x.y),v=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),v=!1;else if(!0!==i[b].begin){var S=i[b].start.x,A=i[b].start.y;M.call(this,i[b].deltas,S,A),v=!0}n&&k.call(this,n),e&&_.call(this)}},A=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,r=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-r;case"top":return t+e-r;case"hanging":return t+e-2*r;case"middle":return t+e/2-r;default:return t}},N=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};f.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},f.prototype.createPattern=function(){return this.createLinearGradient()},f.prototype.createRadialGradient=function(){return this.createLinearGradient()};var L=function(t,e,r,n,i,a,o,s,u){for(var l=j.call(this,r,n,i,a),c=0;c<l.length;c++){var h=l[c];0===c&&(u?P.call(this,h.x1+t,h.y1+e):C.call(this,h.x1+t,h.y1+e)),I.call(this,t,e,h.x2,h.y2,h.x3,h.y3,h.x4,h.y4)}s?_.call(this):k.call(this,o)},k=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},_=function(){this.pdf.clip(),this.pdf.discardPath()},P=function(t,e){this.pdf.internal.out(n(t)+" "+i(e)+" m")},F=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;default:e="left"}var r=this.pdf.getTextDimensions(t.text),n=A.call(this,t.y),i=N.call(this,n)-r.h,a=this.ctx.transform.applyToPoint(new s(t.x,n)),o=this.ctx.transform.decompose(),c=new l;c=(c=(c=c.multiply(o.translate)).multiply(o.skew)).multiply(o.scale);for(var h,f,d,p=this.ctx.transform.applyToRectangle(new u(t.x,n,r.w,r.h)),g=c.applyToRectangle(new u(t.x,i,r.w,r.h)),b=v.call(this,g),x=[],L=0;L<b.length;L+=1)-1===x.indexOf(b[L])&&x.push(b[L]);if(w(x),this.autoPaging)for(var k=x[0],_=x[x.length-1],P=k;P<_+1;P++){this.pdf.setPage(P);var F=1===P?this.posY+this.margin[0]:this.margin[0],C=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[2],I=M-this.margin[0],j=this.pdf.internal.pageSize.width-this.margin[1],O=j-this.margin[3],T=1===P?0:C+(P-2)*I;if(0!==this.ctx.clip_path.length){var E=this.path;h=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(h,this.posX+this.margin[3],-1*T+F),S.call(this,"fill",!0),this.path=E}var B=y([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-T+F+this.ctx.prevPageLastElemOffset)[0];t.scale>=.01&&(f=this.pdf.internal.getFontSize(),this.pdf.setFontSize(f*t.scale),d=this.lineWidth,this.lineWidth=d*t.scale);var q="text"!==this.autoPaging;if(q||B.y+B.h<=M){if(q||B.y>=F&&B.x<=j){var R=q?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||j-B.x)[0],D=y([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-T+F+this.ctx.prevPageLastElemOffset)[0],U=q&&(P>k||P<_)&&m.call(this);U&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],O,I,null).clip().discardPath()),this.pdf.text(R,D.x,D.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),U&&this.pdf.restoreGraphicsState()}}else B.y<M&&(this.ctx.prevPageLastElemOffset+=M-B.y);t.scale>=.01&&(this.pdf.setFontSize(f),this.lineWidth=d)}else t.scale>=.01&&(f=this.pdf.internal.getFontSize(),this.pdf.setFontSize(f*t.scale),d=this.lineWidth,this.lineWidth=d*t.scale),this.pdf.text(t.text,a.x+this.posX,a.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(f),this.lineWidth=d)},C=function(t,e,r,a){r=r||0,a=a||0,this.pdf.internal.out(n(t+r)+" "+i(e+a)+" l")},M=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},I=function(t,e,n,i,s,u,l,c){this.pdf.internal.out([r(a(n+t)),r(o(i+e)),r(a(s+t)),r(o(u+e)),r(a(l+t)),r(o(c+e)),"c"].join(" "))},j=function(t,e,r,n){for(var i=2*Math.PI,a=Math.PI/2;e>r;)e-=i;var o=Math.abs(r-e);o<i&&n&&(o=i-o);for(var s=[],u=n?-1:1,l=e;o>1e-5;){var c=l+u*Math.min(o,a);s.push(O.call(this,t,l,c)),o-=Math.abs(c-l),l=c}return s},O=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=i,s=-a,u=o*o+s*s,l=u+o*i+s*a,c=4/3*(Math.sqrt(2*u*l)-l)/(o*a-s*i),h=o-c*s,f=s+c*o,d=h,p=-f,g=n+e,m=Math.cos(g),v=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:h*m-f*v,y2:h*v+f*m,x3:d*m-p*v,y3:d*v+p*m,x4:t*Math.cos(r),y4:t*Math.sin(r)}},T=function(t){return 180*t/Math.PI},E=function(t,e,r,n,i,a){var o=t+.5*(r-t),s=e+.5*(n-e),l=i+.5*(r-i),c=a+.5*(n-a),h=Math.min(t,i,o,l),f=Math.max(t,i,o,l),d=Math.min(e,a,s,c),p=Math.max(e,a,s,c);return new u(h,d,f-h,p-d)},B=function(t,e,r,n,i,a,o,s){var l,c,h,f,d,p,g,m,v,b,y,w,x,S,A=r-t,N=n-e,L=i-r,k=a-n,_=o-i,P=s-a;for(c=0;c<41;c++)v=(g=(h=t+(l=c/40)*A)+l*((d=r+l*L)-h))+l*(d+l*(i+l*_-d)-g),b=(m=(f=e+l*N)+l*((p=n+l*k)-f))+l*(p+l*(a+l*P-p)-m),0==c?(y=v,w=b,x=v,S=b):(y=Math.min(y,v),w=Math.min(w,b),x=Math.max(x,v),S=Math.max(S,b));return new u(Math.round(y),Math.round(w),Math.round(x-y),Math.round(S-w))},q=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t,e,r=(t=this.ctx.lineDash,e=this.ctx.lineDashOffset,JSON.stringify({lineDash:t,lineDashOffset:e}));this.prevLineDash!==r&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=r)}}}(Pt.API),function(t){var e=function(t){var e,r,n,i,a,o,s,u,l,c;for(/[^\x00-\xFF]/.test(t),r=[],n=0,i=(t+=e="\0\0\0\0".slice(t.length%4||4)).length;i>n;n+=4)0!==(a=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(o=(a=((a=((a=((a=(a-(c=a%85))/85)-(l=a%85))/85)-(u=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,u+33,l+33,c+33)):r.push(122);return function(t,e){for(var r=e;r>0;r--)t.pop()}(r,e.length),String.fromCharCode.apply(String,r)+"~>"},r=function(t){var e,r,n,i,a,o=String,s="length",u=255,l="charCodeAt",c="slice",h="replace";for(t[c](-2),t=t[c](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[c](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[l](i)-33)+614125*(t[l](i+1)-33)+7225*(t[l](i+2)-33)+85*(t[l](i+3)-33)+(t[l](i+4)-33),n.push(u&r>>24,u&r>>16,u&r>>8,u&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),o.fromCharCode.apply(o,n)},n=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var r="",n=0;n<t.length;n+=2)r+=String.fromCharCode("0x"+(t[n]+t[n+1]));return r},i=function(t){for(var e=new Uint8Array(t.length),r=t.length;r--;)e[r]=t.charCodeAt(r);return(e=G(e)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,a){var o=0,s=t||"",u=[];for("string"==typeof(a=a||[])&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":s=r(s),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=e(s),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=n(s),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">",u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:s,reverseChain:u.reverse().join(" ")}}}(Pt.API),function(t){t.loadFile=function(t,e,r){return function(t,e,r){e=!1!==e,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,e,r){var n=new XMLHttpRequest,i=0,a=function(t){var e=t.length,r=[],n=String.fromCharCode;for(i=0;i<e;i+=1)r.push(n(255&t.charCodeAt(i)));return r.join("")};if(n.open("GET",t,!e),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(n.onload=function(){200===n.status?r(a(this.responseText)):r(void 0)}),n.send(null),e&&200===n.status)return a(n.responseText)}(t,e,r)}catch(t){}return n}(t,e,r)},t.loadImageFile=t.loadFile}(Pt.API),function(e){function r(){return(J.html2canvas?Promise.resolve(J.html2canvas):o.e(354).then(o.t.bind(o,354,23))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function n(){return(J.DOMPurify?Promise.resolve(J.DOMPurify):o.e(838).then(o.t.bind(o,2838,23))).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var i=function(e){var r=(0,t.A)(e);return"undefined"===r?"undefined":"string"===r||e instanceof String?"string":"number"===r||e instanceof Number?"number":"function"===r||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===r?"object":"unknown"},a=function(t,e){var r=document.createElement(t);for(var n in e.className&&(r.className=e.className),e.innerHTML&&e.dompurify&&(r.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)r.style[n]=e.style[n];return r},s=function t(e){var r=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),r);return(n=n.setProgress(1,t,1,[t])).set(e)};(s.prototype=Object.create(Promise.prototype)).constructor=s,s.convert=function(t,e){return t.__proto__=e||s.prototype,t},s.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},s.prototype.from=function(t,e){return this.then((function(){switch(e=e||function(t){switch(i(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.then(n).then((function(e){return this.set({src:a("div",{innerHTML:t,dompurify:e})})}));case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}}))},s.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},s.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var t={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=function t(e,r){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),i=e.firstChild;i;i=i.nextSibling)!0!==r&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(t(i,r));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",(function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft}),!0)),n}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=a("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=a("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(a("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},s.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(r).then((function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},s.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(r).then((function(t){var e=this.opt.jsPDF,r=this.opt.fontFaces,n="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:n,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=r,r)for(var a=0;a<r.length;++a){var o=r[a],s=o.src.find((function(t){return"truetype"===t.format}));s&&e.addFont(s.url,o.ref.name,o.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,e.context2d.save(!0),t(this.prop.container,i)})).then((function(t){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},s.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t}))},s.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},s.prototype.output=function(t,e,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},s.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,e)}))},s.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}}))},s.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},s.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},s.prototype.set=function(t){if("object"!==i(t))return this;var e=Object.keys(t||{}).map((function(e){if(e in s.template.prop)return function(){this.prop[e]=t[e]};switch(e){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[e]=t[e]}}}),this);return this.then((function(){return this.thenList(e)}))},s.prototype.get=function(t,e){return this.then((function(){var r=t in s.template.prop?this.prop[t]:this.opt[t];return e?e(r):r}))},s.prototype.setMargin=function(t){return this.then((function(){switch(i(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t})).then(this.setPageSize)},s.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then((function(){(t=t||Pt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},s.prototype.setProgress=function(t,e,r,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},s.prototype.updateProgress=function(t,e,r,n){return this.setProgress(t?this.progress.val+t:null,e||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},s.prototype.then=function(t,e){var r=this;return this.thenCore(t,e,(function(t,e){return r.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(e){return r.updateProgress(null,t),e})).then(t,e).then((function(t){return r.updateProgress(1),t}))}))},s.prototype.thenCore=function(t,e,r){r=r||Promise.prototype.then,t&&(t=t.bind(this)),e&&(e=e.bind(this));var n=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:s.convert(Object.assign({},this),Promise.prototype),i=r.call(n,t,e);return s.convert(i,this.__proto__)},s.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},s.prototype.thenList=function(t){var e=this;return t.forEach((function(t){e=e.thenCore(t)})),e},s.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return s.convert(e,this)},s.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},s.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},s.prototype.using=s.prototype.set,s.prototype.saveAs=s.prototype.save,s.prototype.export=s.prototype.output,s.prototype.run=s.prototype.then,Pt.getPageSize=function(e,r,n){if("object"===(0,t.A)(e)){var i=e;e=i.orientation,r=i.unit||r,n=i.format||n}r=r||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var a,o=(""+n).toLowerCase(),s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(r){case"pt":a=1;break;case"mm":a=72/25.4;break;case"cm":a=72/2.54;break;case"in":a=72;break;case"px":a=.75;break;case"pc":case"em":a=12;break;case"ex":a=6;break;default:throw"Invalid unit: "+r}var u,l=0,c=0;if(s.hasOwnProperty(o))l=s[o][1]/a,c=s[o][0]/a;else try{l=n[1],c=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",c>l&&(u=c,c=l,l=u);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",l>c&&(u=c,c=l,l=u)}return{width:c,height:l,unit:r,k:a,orientation:e}},e.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Ae):null;var r=new s(e);return e.worker?r:r.from(t).doCallback()}}(Pt.API),Pt.API.addJS=function(t){return je=t,this.internal.events.subscribe("postPutResources",(function(){Me=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Me+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Ie=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+je+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Me&&void 0!==Ie&&this.internal.out("/Names <</JavaScript "+Me+" 0 R>>")})),this},function(t){var e;t.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),i=0;i<n.length;i++){var a=n[i],o=r.exec(a);if(null!=o){var s=o[1];t.internal.newObjectDeferredBegin(s,!1)}t.internal.write(a)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,l=[];for(i=0;i<u;i++){var c=t.internal.newObject();l.push(c);var h=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+h.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<l.length;i++)t.internal.write("(page_"+(i+1)+")"+l[i]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,r){var n={title:e,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var r=0;r<e.children.length;r++)this.genIds_r(e.children[r])},t.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),t.children.length>0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(e){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<e.children.length;n++){var i=e.children[n];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(e)),n>0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n<e.children.length-1&&this.line("/Next "+this.makeRef(e.children[n+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line("/Count "+a),i.options&&i.options.pageNumber){var o=t.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var s=0;s<e.children.length;s++)this.renderItems(e.children[s])},t.outline.line=function(t){this.ctx.val+=t+"\r\n"},t.outline.makeRef=function(t){return t.id+" 0 R"},t.outline.makeString=function(e){return"("+t.internal.pdfEscape(e)+")"},t.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},t.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var r=0;r<e.children.length;r++)t.count++,this.count_r(t,e.children[r]);return t.count}}])}(Pt.API),function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,r,n,i,a,o){var s,u=this.decode.DCT_DECODE,l=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=a||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(s=function(t){for(var r,n=256*t.charCodeAt(4)+t.charCodeAt(5),i=t.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=n,-1!==e.indexOf(t.charCodeAt(o+1))){r=256*t.charCodeAt(o+5)+t.charCodeAt(o+6),a={width:256*t.charCodeAt(o+7)+t.charCodeAt(o+8),height:r,numcomponents:t.charCodeAt(o+9)};break}n=256*t.charCodeAt(o+2)+t.charCodeAt(o+3)}return a}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:t,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:u,index:r,alias:n}}return l}}(Pt.API);var Te,Ee,Be,qe,Re,De=function(){var t,e,r;function n(t){var e,r,n,i,a,o,s,u,l,c,h,f,d,p;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},o=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":o&&this.animation.frames.push(o),this.pos+=4,o={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},a=this.readUInt16(),i=this.readUInt16()||100,o.delay=1e3*a/i,o.disposeOp=this.data[this.pos++],o.blendOp=this.data[this.pos++],o.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=o?o.data:void 0)||this.imgData,f=0;0<=e?f<e:f>e;0<=e?++f:--f)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>n)throw new Error("More transparent colors than palette size");if((c=n-this.transparency.indexed.length)>0)for(d=0;0<=c?d<c:d>c;0<=c?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(h=this.read(e)).indexOf(0),u=String.fromCharCode.apply(String,h.slice(0,s)),this.text[u]=String.fromCharCode.apply(String,h.slice(s+1));break;case"IEND":return o&&this.animation.frames.push(o),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(p=this.colorType)||6===p,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e=this.pixelBitlength/8,r=new Uint8Array(this.width*this.height*e),n=0,i=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function a(a,o,s,u){var l,c,h,f,d,p,g,m,v,b,y,w,x,S,A,N,L,k,_,P,F,C=Math.ceil((i.width-a)/s),M=Math.ceil((i.height-o)/u),I=i.width==C&&i.height==M;for(S=e*C,w=I?r:new Uint8Array(S*M),p=t.length,x=0,c=0;x<M&&n<p;){switch(t[n++]){case 0:for(f=L=0;L<S;f=L+=1)w[c++]=t[n++];break;case 1:for(f=k=0;k<S;f=k+=1)l=t[n++],d=f<e?0:w[c-e],w[c++]=(l+d)%256;break;case 2:for(f=_=0;_<S;f=_+=1)l=t[n++],h=(f-f%e)/e,A=x&&w[(x-1)*S+h*e+f%e],w[c++]=(A+l)%256;break;case 3:for(f=P=0;P<S;f=P+=1)l=t[n++],h=(f-f%e)/e,d=f<e?0:w[c-e],A=x&&w[(x-1)*S+h*e+f%e],w[c++]=(l+Math.floor((d+A)/2))%256;break;case 4:for(f=F=0;F<S;f=F+=1)l=t[n++],h=(f-f%e)/e,d=f<e?0:w[c-e],0===x?A=N=0:(A=w[(x-1)*S+h*e+f%e],N=h&&w[(x-1)*S+(h-1)*e+f%e]),g=d+A-N,m=Math.abs(g-d),b=Math.abs(g-A),y=Math.abs(g-N),v=m<=b&&m<=y?d:b<=y?A:N,w[c++]=(l+v)%256;break;default:throw new Error("Invalid filter algorithm: "+t[n-1])}if(!I){var j=((o+x*u)*i.width+a)*e,O=x*S;for(f=0;f<C;f+=1){for(var T=0;T<e;T+=1)r[j++]=w[O++];j+=(s-1)*e}}x++}}return t=Y(t),1==i.interlaceMethod?(a(0,0,8,8),a(4,0,8,8),a(0,4,4,8),a(2,0,4,4),a(0,2,2,4),a(1,0,2,2),a(0,1,1,2)):a(0,0,1,1),r},n.prototype.decodePalette=function(){var t,e,r,n,i,a,o,s,u;for(r=this.palette,a=this.transparency.indexed||[],i=new Uint8Array((a.length||0)+r.length),n=0,t=0,e=o=0,s=r.length;o<s;e=o+=3)i[n++]=r[e],i[n++]=r[e+1],i[n++]=r[e+2],i[n++]=null!=(u=a[t++])?u:255;return i},n.prototype.copyToImageData=function(t,e){var r,n,i,a,o,s,u,l,c,h,f;if(n=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),l=(i=t.data||t).length,o=c||e,a=s=0,1===n)for(;a<l;)u=c?4*e[a/4]:s,h=o[u++],i[a++]=h,i[a++]=h,i[a++]=h,i[a++]=r?o[u++]:255,s=u;else for(;a<l;)u=c?4*e[a/4]:s,i[a++]=o[u++],i[a++]=o[u++],i[a++]=o[u++],i[a++]=r?o[u++]:255,s=u},n.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var i=function(){if("[object Window]"===Object.prototype.toString.call(J)){try{e=J.document.createElement("canvas"),r=e.getContext("2d")}catch(t){return!1}return!0}return!1};return i(),t=function(t){var n;if(!0===i())return r.width=t.width,r.height=t.height,r.clearRect(0,0,t.width,t.height),r.putImageData(t,0,0),(n=new Image).src=e.toDataURL(),n;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(e){var r,n,i,a,o,s,u,l;if(this.animation){for(l=[],n=o=0,s=(u=this.animation.frames).length;o<s;n=++o)r=u[n],i=e.createImageData(r.width,r.height),a=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,a),r.imageData=i,l.push(r.image=t(i));return l}},n.prototype.renderFrame=function(t,e){var r,n,i;return r=(n=this.animation.frames)[e],i=n[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?t.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&t.putImageData(i.imageData,i.xOffset,i.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,n,i,a,o,s=this;return r=0,o=this.animation,i=o.numFrames,n=o.frames,a=o.numPlays,(e=function(){var o,u;if(o=r++%i,u=n[o],s.renderFrame(t,o),i>1&&r/i<a)return s.animation._timeout=setTimeout(e,u.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},n}();function Ue(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,i=t[e++],a=i>>7,o=1<<1+(7&i);t[e++],t[e++];var s=null,u=null;a&&(s=e,u=o,e+=3*o);var l=!0,c=[],h=0,f=null,d=0,p=null;for(this.width=r,this.height=n;l&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,p=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((_=t[e++])>=0))throw Error("Invalid block size");if(0===_)break;e+=_}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];h=t[e++]|t[e++]<<8,f=t[e++],!(1&g)&&(f=null),d=g>>2&7,e++;break;case 254:for(;;){if(!((_=t[e++])>=0))throw Error("Invalid block size");if(0===_)break;e+=_}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var m=t[e++]|t[e++]<<8,v=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++],x=w>>6&1,S=1<<1+(7&w),A=s,N=u,L=!1;w>>7&&(L=!0,A=e,N=S,e+=3*S);var k=e;for(e++;;){var _;if(!((_=t[e++])>=0))throw Error("Invalid block size");if(0===_)break;e+=_}c.push({x:m,y:v,width:b,height:y,has_local_palette:L,palette_offset:A,palette_size:N,data_offset:k,data_length:e-k,transparent_index:f,interlaced:!!x,delay:h,disposal:d});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=c.length)throw new Error("Frame index out of range.");return c[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);ze(t,i.data_offset,o,a);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var l=i.width,c=r-l,h=l,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*c;!0===i.interlaced&&(g+=4*r*7);for(var m=8,v=0,b=o.length;v<b;++v){var y=o[v];if(0===h&&(h=l,(p+=g)>=d&&(g=4*c+4*r*(m-1),p=f+(l+c)*(m<<1),m>>=1)),y===u)p+=4;else{var w=t[s+3*y],x=t[s+3*y+1],S=t[s+3*y+2];n[p++]=S,n[p++]=x,n[p++]=w,n[p++]=255}--h}},this.decodeAndBlitFrameRGBA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);ze(t,i.data_offset,o,a);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var l=i.width,c=r-l,h=l,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*c;!0===i.interlaced&&(g+=4*r*7);for(var m=8,v=0,b=o.length;v<b;++v){var y=o[v];if(0===h&&(h=l,(p+=g)>=d&&(g=4*c+4*r*(m-1),p=f+(l+c)*(m<<1),m>>=1)),y===u)p+=4;else{var w=t[s+3*y],x=t[s+3*y+1],S=t[s+3*y+2];n[p++]=w,n[p++]=x,n[p++]=S,n[p++]=255}--h}}}function ze(t,e,r,n){for(var i=t[e++],a=1<<i,o=a+1,s=o+1,u=i+1,l=(1<<u)-1,c=0,h=0,f=0,d=t[e++],p=new Int32Array(4096),g=null;;){for(;c<16&&0!==d;)h|=t[e++]<<c,c+=8,1===d?d=t[e++]:--d;if(c<u)break;var m=h&l;if(h>>=u,c-=u,m!==a){if(m===o)break;for(var v=m<s?m:g,b=0,y=v;y>a;)y=p[y]>>8,++b;var w=y;if(f+b+(v!==m?1:0)>n)return void K.log("Warning, gif stream longer than expected.");r[f++]=w;var x=f+=b;for(v!==m&&(r[f++]=w),y=v;b--;)y=p[y],r[--x]=255&y,y>>=8;null!==g&&s<4096&&(p[s++]=g<<8|w,s>=l+1&&u<12&&(++u,l=l<<1|1)),g=m}else s=o+1,l=(1<<(u=i+1))-1,g=null}return f!==n&&K.log("Warning, gif stream shorter than expected."),r}function He(t){var e,r,n,i,a,o=Math.floor,s=new Array(64),u=new Array(64),l=new Array(64),c=new Array(64),h=new Array(65535),f=new Array(65535),d=new Array(64),p=new Array(64),g=[],m=0,v=7,b=new Array(64),y=new Array(64),w=new Array(64),x=new Array(256),S=new Array(2048),A=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],N=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],k=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],_=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],P=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],F=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],M=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function I(t,e){for(var r=0,n=0,i=new Array,a=1;a<=16;a++){for(var o=1;o<=t[a];o++)i[e[n]]=[],i[e[n]][0]=r,i[e[n]][1]=a,n++,r++;r*=2}return i}function j(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(m|=1<<v),r--,--v<0&&(255==m?(O(255),O(0)):O(m),v=7,m=0)}function O(t){g.push(t)}function T(t){O(t>>8&255),O(255&t)}function E(t,e,r,n,i){for(var a,o=i[0],s=i[240],u=function(t,e){var r,n,i,a,o,s,u,l,c,h,f=0;for(c=0;c<8;++c){r=t[f],n=t[f+1],i=t[f+2],a=t[f+3],o=t[f+4],s=t[f+5],u=t[f+6];var p=r+(l=t[f+7]),g=r-l,m=n+u,v=n-u,b=i+s,y=i-s,w=a+o,x=a-o,S=p+w,A=p-w,N=m+b,L=m-b;t[f]=S+N,t[f+4]=S-N;var k=.707106781*(L+A);t[f+2]=A+k,t[f+6]=A-k;var _=.382683433*((S=x+y)-(L=v+g)),P=.5411961*S+_,F=1.306562965*L+_,C=.707106781*(N=y+v),M=g+C,I=g-C;t[f+5]=I+P,t[f+3]=I-P,t[f+1]=M+F,t[f+7]=M-F,f+=8}for(f=0,c=0;c<8;++c){r=t[f],n=t[f+8],i=t[f+16],a=t[f+24],o=t[f+32],s=t[f+40],u=t[f+48];var j=r+(l=t[f+56]),O=r-l,T=n+u,E=n-u,B=i+s,q=i-s,R=a+o,D=a-o,U=j+R,z=j-R,H=T+B,W=T-B;t[f]=U+H,t[f+32]=U-H;var V=.707106781*(W+z);t[f+16]=z+V,t[f+48]=z-V;var G=.382683433*((U=D+q)-(W=E+O)),Y=.5411961*U+G,X=1.306562965*W+G,J=.707106781*(H=q+E),$=O+J,K=O-J;t[f+40]=K+Y,t[f+24]=K-Y,t[f+8]=$+X,t[f+56]=$-X,f++}for(c=0;c<64;++c)h=t[c]*e[c],d[c]=h>0?h+.5|0:h-.5|0;return d}(t,e),l=0;l<64;++l)p[A[l]]=u[l];var c=p[0]-r;r=p[0],0==c?j(n[0]):(j(n[f[a=32767+c]]),j(h[a]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return j(o),r;for(var m,v=1;v<=g;){for(var b=v;0==p[v]&&v<=g;)++v;var y=v-b;if(y>=16){m=y>>4;for(var w=1;w<=m;++w)j(s);y&=15}a=32767+p[v],j(i[(y<<4)+f[a]]),j(h[a]),v++}return 63!=g&&j(o),r}function B(t){t=Math.min(Math.max(t,1),100),a!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=o((e[r]*t+50)/100);n=Math.min(Math.max(n,1),255),s[A[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var h=o((i[a]*t+50)/100);h=Math.min(Math.max(h,1),255),u[A[a]]=h}for(var f=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,p=0;p<8;p++)for(var g=0;g<8;g++)l[d]=1/(s[A[d]]*f[p]*f[g]*8),c[d]=1/(u[A[d]]*f[p]*f[g]*8),d++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),a=t)}this.encode=function(t,a){a&&B(a),g=new Array,m=0,v=7,T(65496),T(65504),T(16),O(74),O(70),O(73),O(70),O(0),O(1),O(1),O(0),T(1),T(1),O(0),O(0),function(){T(65499),T(132),O(0);for(var t=0;t<64;t++)O(s[t]);O(1);for(var e=0;e<64;e++)O(u[e])}(),function(t,e){T(65472),T(17),O(8),T(e),T(t),O(3),O(1),O(17),O(0),O(2),O(17),O(1),O(3),O(17),O(1)}(t.width,t.height),function(){T(65476),T(418),O(0);for(var t=0;t<16;t++)O(N[t+1]);for(var e=0;e<=11;e++)O(L[e]);O(16);for(var r=0;r<16;r++)O(k[r+1]);for(var n=0;n<=161;n++)O(_[n]);O(1);for(var i=0;i<16;i++)O(P[i+1]);for(var a=0;a<=11;a++)O(F[a]);O(17);for(var o=0;o<16;o++)O(C[o+1]);for(var s=0;s<=161;s++)O(M[s])}(),T(65498),T(12),O(3),O(1),O(0),O(2),O(17),O(3),O(17),O(0),O(63),O(0);var o=0,h=0,f=0;m=0,v=7,this.encode.displayName="_encode_";for(var d,p,x,A,I,q,R,D,U,z=t.data,H=t.width,W=t.height,V=4*H,G=0;G<W;){for(d=0;d<V;){for(I=V*G+d,R=-1,D=0,U=0;U<64;U++)q=I+(D=U>>3)*V+(R=4*(7&U)),G+D>=W&&(q-=V*(G+1+D-W)),d+R>=V&&(q-=d+R-V+4),p=z[q++],x=z[q++],A=z[q++],b[U]=(S[p]+S[x+256|0]+S[A+512|0]>>16)-128,y[U]=(S[p+768|0]+S[x+1024|0]+S[A+1280|0]>>16)-128,w[U]=(S[p+1280|0]+S[x+1536|0]+S[A+1792|0]>>16)-128;o=E(b,l,o,e,n),h=E(y,c,h,r,i),f=E(w,c,f,r,i),d+=32}G+=8}if(v>=0){var Y=[];Y[1]=v+1,Y[0]=(1<<v+1)-1,j(Y)}return T(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)x[e]=t(e)}(),e=I(N,L),r=I(P,F),n=I(k,_),i=I(C,M),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var n=t;n<e;n++)f[32767+n]=r,h[32767+n]=[],h[32767+n][1]=r,h[32767+n][0]=n;for(var i=-(e-1);i<=-t;i++)f[32767+i]=r,h[32767+i]=[],h[32767+i][1]=r,h[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)S[t]=19595*t,S[t+256|0]=38470*t,S[t+512|0]=7471*t+32768,S[t+768|0]=-11059*t,S[t+1024|0]=-21709*t,S[t+1280|0]=32768*t+8421375,S[t+1536|0]=-27439*t,S[t+1792|0]=-5329*t}(),B(t)}function We(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Ve(t){function e(t){if(!t)throw Error("assert :P")}function r(t,e,r){for(var n=0;4>n;n++)if(t[e+n]!=r.charCodeAt(n))return!0;return!1}function n(t,e,r,n,i){for(var a=0;a<i;a++)t[e+a]=r[n+a]}function i(t,e,r,n){for(var i=0;i<n;i++)t[e+i]=r}function a(t){return new Int32Array(t)}function o(t,e){for(var r=[],n=0;n<t;n++)r.push(new e);return r}function s(t,e){var r=[];return function t(r,n,i){for(var a=i[n],o=0;o<a&&(r.push(i.length>n+1?[]:new e),!(i.length<n+1));o++)t(r[o],n+1,i)}(r,0,t),r}var u=function(){var t=this;function u(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function l(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function c(t,r,n,i,o){if(e(2328>=o),512>=o)var s=a(512);else if(null==(s=a(o)))return 0;return function(t,r,n,i,o,s){var c,f,d=r,p=1<<n,g=a(16),m=a(16);for(e(0!=o),e(null!=i),e(null!=t),e(0<n),f=0;f<o;++f){if(15<i[f])return 0;++g[i[f]]}if(g[0]==o)return 0;for(m[1]=0,c=1;15>c;++c){if(g[c]>1<<c)return 0;m[c+1]=m[c]+g[c]}for(f=0;f<o;++f)c=i[f],0<i[f]&&(s[m[c]++]=f);if(1==m[15])return(i=new h).g=0,i.value=s[0],l(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,x=1,S=1,A=1<<n;for(f=0,c=1,o=2;c<=n;++c,o<<=1){if(x+=S<<=1,0>(S-=g[c]))return 0;for(;0<g[c];--g[c])(i=new h).g=c,i.value=s[f++],l(t,d+w,o,A,i),w=u(w,c)}for(c=n+1,o=2;15>=c;++c,o<<=1){if(x+=S<<=1,0>(S-=g[c]))return 0;for(;0<g[c];--g[c]){if(i=new h,(w&y)!=b){for(d+=A,v=1<<(b=c)-n;15>b&&!(0>=(v-=g[b]));)++b,v<<=1;p+=A=1<<(v=b-n),t[r+(b=w&y)].g=v+n,t[r+b].value=d-r-b}i.g=c-n,i.value=s[f++],l(t,d+(w>>n),o,A,i),w=u(w,c)}}return x!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function h(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,h),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(qr,f)}function p(t,r,n,i){e(null!=t),e(null!=r),e(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,k(t)}function g(t,e){for(var r=0;0<e--;)r|=P(t,128)<<e;return r}function m(t,e){var r=g(t,e);return _(t)?-r:r}function v(t,r,n,i){var a,o=0;for(e(null!=t),e(null!=r),e(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),a=0;a<i;++a)o+=r[n+a]<<8*a;t.Ra=o,t.bb=i,t.oa=r,t.pa=n}function b(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<Ur-8>>>0,++t.bb,t.u-=8;A(t)&&(t.h=1,t.u=0)}function y(t,r){if(e(0<=r),!t.h&&r<=Dr){var n=S(t)&Rr[r];return t.u+=r,b(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function x(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function S(t){return t.Ra>>>(t.u&Ur-1)>>>0}function A(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>Ur}function N(t,e){t.u=e,t.h=A(t)}function L(t){t.u>=zr&&(e(t.u>=zr),b(t))}function k(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function _(t){return g(t,1)}function P(t,e){var r=t.Ca;0>t.b&&k(t);var n=t.b,i=r*e>>>8,a=(t.I>>>n>i)+0;for(a?(r-=i,t.I-=i+1<<n>>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+Hr[n],t.b-=n,t.Ca=(r<<n)-1,a}function F(t,e,r){t[e+0]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function C(t,e){return t[e+0]|t[e+1]<<8}function M(t,e){return C(t,e)|t[e+2]<<16}function I(t,e){return C(t,e)|C(t,e+2)<<16}function j(t,r){var n=1<<r;return e(null!=t),e(0<r),t.X=a(n),null==t.X?0:(t.Mb=32-r,t.Xa=r,1)}function O(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function T(){this.X=[],this.Xa=this.Mb=0}function E(t,r,n,i){e(null!=n),e(null!=i);var a=n[0],o=i[0];return 0==a&&(a=(t*o+r/2)/r),0==o&&(o=(r*a+t/2)/t),0>=a||0>=o?0:(n[0]=a,i[0]=o,1)}function B(t,e){return t+(1<<e)-1>>>e}function q(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function R(e,r){t[r]=function(r,n,i,a,o,s,u){var l;for(l=0;l<o;++l){var c=t[e](s[u+l-1],i,a+l);s[u+l]=q(r[n+l],c)}}}function D(){this.ud=this.hd=this.jd=0}function U(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function z(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function H(t,e){return z(t+(t-e+.5>>1))}function W(t,e,r){return Math.abs(e-r)-Math.abs(t-r)}function V(t,e,r,n,i,a,o){for(n=a[o-1],r=0;r<i;++r)a[o+r]=n=q(t[e+r],n)}function G(t,e,r,n,i){var a;for(a=0;a<r;++a){var o=t[e+a],s=o>>8&255,u=16711935&(u=(u=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+u>>>0}}function Y(t,e){e.jd=255&t,e.hd=t>>8&255,e.ud=t>>16&255}function X(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],u=s>>>8,l=s,c=255&(c=(c=s>>>16)+((t.jd<<24>>24)*(u<<24>>24)>>>5));l=255&(l=(l+=(t.hd<<24>>24)*(u<<24>>24)>>>5)+((t.ud<<24>>24)*(c<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(c<<16)+l}}function J(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,u,l,c){for(n=u;n<l;++n)for(u=0;u<c;++u)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,u,l,c){var h=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>h)for(e=(1<<e.b)-1,p=(1<<h)-1;r<o;++r){var g,m=0;for(g=0;g<f;++g)g&e||(m=i(s[u++])),l[c++]=a(d[m&p]),m>>=h}else t["VP8LMapColor"+n](s,u,d,p,l,c,r,o,f)}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=255&a}}function K(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=a>>16&255,n[i++]=a>>8&255,n[i++]=255&a,n[i++]=a>>24&255}}function Q(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=240&o|o>>28&15;n[i++]=a,n[i++]=o}}function Z(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[i++]=a,n[i++]=o}}function tt(t,e,r,n,i){for(r=e+r;e<r;){var a=t[e++];n[i++]=255&a,n[i++]=a>>8&255,n[i++]=a>>16&255}}function et(t,e,r,i,a,o){if(0==o)for(r=e+r;e<r;)F(i,((o=t[e++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else n(i,a,t,e,r)}function rt(e,r){t[r][0]=t[e+"0"],t[r][1]=t[e+"1"],t[r][2]=t[e+"2"],t[r][3]=t[e+"3"],t[r][4]=t[e+"4"],t[r][5]=t[e+"5"],t[r][6]=t[e+"6"],t[r][7]=t[e+"7"],t[r][8]=t[e+"8"],t[r][9]=t[e+"9"],t[r][10]=t[e+"10"],t[r][11]=t[e+"11"],t[r][12]=t[e+"12"],t[r][13]=t[e+"13"],t[r][14]=t[e+"0"],t[r][15]=t[e+"0"]}function nt(t){return t==Hn||t==Wn||t==Vn||t==Gn}function it(){this.eb=[],this.size=this.A=this.fb=0}function at(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new at,this.sd=null}function st(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ut(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function lt(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ct(t,e){var r=t.T,i=e.ba.f.RGBA,a=i.eb,o=i.fb+t.ka*i.A,s=vi[e.ba.S],u=t.y,l=t.O,c=t.f,h=t.N,f=t.ea,d=t.W,p=e.cc,g=e.dc,m=e.Mc,v=e.Nc,b=t.ka,y=t.ka+t.T,w=t.U,x=w+1>>1;for(0==b?s(u,l,null,null,c,h,f,d,c,h,f,d,a,o,null,null,w):(s(e.ec,e.fc,u,l,p,g,m,v,c,h,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=c,g=h,m=f,v=d,h+=t.Rc,d+=t.Rc,o+=2*i.A,s(u,(l+=2*t.fa)-t.fa,u,l,p,g,m,v,c,h,f,d,a,o-i.A,a,o,w);return l+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,u,l,w),n(e.cc,e.dc,c,h,x),n(e.Mc,e.Nc,f,d,x),r--):1&y||s(u,l,null,null,c,h,f,d,c,h,f,d,a,o+i.A,null,null,w),r}function ht(t,r,n){var i=t.F,a=[t.J];if(null!=i){var o=t.U,s=r.ba.S,u=s==Dn||s==Vn;r=r.ba.f.RGBA;var l=[0],c=t.ka;l[0]=t.T,t.Kb&&(0==c?--l[0]:(--c,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(l[0]=t.o-t.j-c));var h=r.eb;c=r.fb+c*r.A,t=Ln(i,a[0],t.width,o,l,h,c+(u?0:3),r.A),e(n==l),t&&nt(s)&&An(h,c,u,o,l,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==Bn||r==Rn||r==Dn||r==Un||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Tr(e.Oa,t,i?11:12))return 0;if(i&&nt(r)&&br(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=lt,t.Kb){if(r=t.U+1>>1,e.memory=a(t.U+2*r),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+r,e.Ib=ct,br()}}else alert("todo:EmitYUV");i&&(e.Jb=ht,n&&mr())}if(n&&!Mi){for(t=0;256>t;++t)Ii[t]=89858*(t-128)+ki>>Li,Ti[t]=-22014*(t-128)+ki,Oi[t]=-45773*(t-128),ji[t]=113618*(t-128)+ki>>Li;for(t=_i;t<Pi;++t)e=76283*(t-16)+ki>>Li,Ei[t-_i]=Vt(e,255),Bi[t-_i]=Vt(e+8>>4,15);Mi=1}return 1}function dt(t){var r=t.ma,n=t.U,i=t.T;return e(!(1&t.ka)),0>=n||0>=i?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function pt(t){t.ma.memory=null}function gt(t,e,r,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,r[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function mt(t,e){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<<r)+y(e,r)+1}function vt(t,e){return 120<e?e-120:1<=(r=((r=Qn[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=S(r),i=t[e+=255&n].g-8;return 0<i&&(N(r,r.u+8),n=S(r),e+=t[e].value,e+=n&(1<<i)-1),N(r,r.u+t[e].g),t[e].value}function yt(t,r,n){return n.g+=t.g,n.value+=t.value<<r>>>0,e(8>=n.g),t.g}function wt(t,r,n){var i=t.xc;return e((r=0==i?0:t.vc[t.md*(n>>i)+(r>>i)])<t.Wb),t.Ya[r]}function xt(t,r,i,a){var o=t.ab,s=t.c*r,u=t.C;r=u+r;var l=i,c=a;for(a=t.Ta,i=t.Ua;0<o--;){var h=t.gc[o],f=u,d=r,p=l,g=c,m=(c=a,l=i,h.Ea);switch(e(f<d),e(d<=h.nc),h.hc){case 2:Gr(p,g,(d-f)*m,c,l);break;case 0:var v=f,b=d,y=c,w=l,x=(k=h).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,x-1,y,w+1),g+=x,w+=x,++v);for(var S=1<<k.b,A=S-1,N=B(x,k.b),L=k.K,k=k.w+(v>>k.b)*N;v<b;){var _=L,P=k,F=1;for(Vr(p,g,y,w-x,1,y,w);F<x;){var C=(F&~A)+S;C>x&&(C=x),(0,Kr[_[P++]>>8&15])(p,g+ +F,y,w+F-x,C-F,y,w+F),F=C}g+=x,w+=x,++v&A||(k+=N)}d!=h.nc&&n(c,l-m,c,l+(d-f-1)*m,m);break;case 1:for(m=p,b=g,x=(p=h.Ea)-(w=p&~(y=(g=1<<h.b)-1)),v=B(p,h.b),S=h.K,h=h.w+(f>>h.b)*v;f<d;){for(A=S,N=h,L=new D,k=b+w,_=b+p;b<k;)Y(A[N++],L),Qr(L,m,b,g,c,l),b+=g,l+=g;b<_&&(Y(A[N++],L),Qr(L,m,b,x,c,l),b+=x,l+=x),++f&y||(h+=v)}break;case 3:if(p==c&&g==l&&0<h.b){for(b=c,p=m=l+(d-f)*m-(w=(d-f)*B(h.Ea,h.b)),g=c,y=l,v=[],w=(x=w)-1;0<=w;--w)v[w]=g[y+w];for(w=x-1;0<=w;--w)b[p+w]=v[w];Yr(h,f,d,c,m,c,l)}else Yr(h,f,d,p,g,c,l)}l=a,c=i}c!=i&&n(a,i,l,c,s)}function St(t,r){var n=t.V,i=t.Ba+t.c*t.C,a=r-t.C;if(e(r<=t.l.o),e(16>=a),0<a){var o=t.l,s=t.Ta,u=t.Ua,l=o.width;if(xt(t,a,n,i),a=u=[u],e((n=t.C)<(i=r)),e(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var c=o.j-n;n=o.j,a[0]+=c*l}if(n>=i?n=0:(a[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=i-n,n=1),n){if(u=u[0],11>(n=t.ca).S){var h=n.f.RGBA,f=(i=n.S,a=o.U,o=o.T,c=h.eb,h.A),d=o;for(h=h.fb+t.Ma*h.A;0<d--;){var p=s,g=u,m=a,v=c,b=h;switch(i){case En:Zr(p,g,m,v,b);break;case Bn:tn(p,g,m,v,b);break;case Hn:tn(p,g,m,v,b),An(v,b,0,m,1,0);break;case qn:nn(p,g,m,v,b);break;case Rn:et(p,g,m,v,b,1);break;case Wn:et(p,g,m,v,b,1),An(v,b,0,m,1,0);break;case Dn:et(p,g,m,v,b,0);break;case Vn:et(p,g,m,v,b,0),An(v,b,1,m,1,0);break;case Un:en(p,g,m,v,b);break;case Gn:en(p,g,m,v,b),Nn(v,b,m,1,0);break;case zn:rn(p,g,m,v,b);break;default:e(0)}u+=l,h+=f}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");e(t.Ma<=n.height)}}t.C=r,e(t.C<=t.i)}function At(t){var e;if(0<t.ua)return 0;for(e=0;e<t.Wb;++e){var r=t.Ya[e].G,n=t.Ya[e].H;if(0<r[1][n[1]+0].g||0<r[2][n[2]+0].g||0<r[3][n[3]+0].g)return 0}return 1}function Nt(t,r,n,i,a,o){if(0!=t.Z){var s=t.qd,u=t.rd;for(e(null!=mi[t.Z]);r<n;++r)mi[t.Z](s,u,i,a,i,a,o),s=i,u=a,a+=o;t.qd=s,t.rd=u}}function Lt(t,r){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;if(i=t.C<i?i:t.C,e(r<=t.l.o),r>i){var a=t.l.width,o=n.ca,s=n.tb+a*i,u=t.V,l=t.Ba+t.c*i,c=t.gc;e(1==t.ab),e(3==c[0].hc),Jr(c[0],i,r,u,l,o,s),Nt(n,i,r,o,s,a)}t.C=t.Ma=r}function kt(t,r,n,i,a,o,s){var u=t.$/i,l=t.$%i,c=t.m,h=t.s,f=n+t.$,d=f;a=n+i*a;var p=n+i*o,g=280+h.ua,m=t.Pb?u:16777216,v=0<h.ua?h.Wa:null,b=h.wc,y=f<p?wt(h,l,u):null;e(t.C<o),e(p<=a);var w=!1;t:for(;;){for(;w||f<p;){var x=0;if(u>=m){var k=f-n;e((m=t).Pb),m.wd=m.m,m.xd=k,0<m.s.ua&&O(m.s.Wa,m.s.vb),m=u+ti}if(l&b||(y=wt(h,l,u)),e(null!=y),y.Qb&&(r[f]=y.qb,w=!0),!w)if(L(c),y.jc){x=c,k=r;var _=f,P=y.pd[S(x)&qr-1];e(y.jc),256>P.g?(N(x,x.u+P.g),k[_]=P.value,x=0):(N(x,x.u+P.g-256),e(256<=P.value),x=P.value),0==x&&(w=!0)}else x=bt(y.G[0],y.H[0],c);if(c.h)break;if(w||256>x){if(!w)if(y.nd)r[f]=(y.qb|x<<8)>>>0;else{if(L(c),w=bt(y.G[1],y.H[1],c),L(c),k=bt(y.G[2],y.H[2],c),_=bt(y.G[3],y.H[3],c),c.h)break;r[f]=(_<<24|w<<16|x<<8|k)>>>0}if(w=!1,++f,++l>=i&&(l=0,++u,null!=s&&u<=o&&!(u%16)&&s(t,u),null!=v))for(;d<f;)x=r[d++],v.X[(506832829*x&4294967295)>>>v.Mb]=x}else if(280>x){if(x=mt(x-256,c),k=bt(y.G[4],y.H[4],c),L(c),k=vt(i,k=mt(k,c)),c.h)break;if(f-n<k||a-f<x)break t;for(_=0;_<x;++_)r[f+_]=r[f+_-k];for(f+=x,l+=x;l>=i;)l-=i,++u,null!=s&&u<=o&&!(u%16)&&s(t,u);if(e(f<=a),l&b&&(y=wt(h,l,u)),null!=v)for(;d<f;)x=r[d++],v.X[(506832829*x&4294967295)>>>v.Mb]=x}else{if(!(x<g))break t;for(w=x-280,e(null!=v);d<f;)x=r[d++],v.X[(506832829*x&4294967295)>>>v.Mb]=x;x=f,e(!(w>>>(k=v).Xa)),r[x]=k.X[w],w=!0}w||e(c.h==A(c))}if(t.Pb&&c.h&&f<a)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&O(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=s&&s(t,u>o?o:u),t.a=0,t.$=f-n}return 1}return t.a=3,0}function _t(t){e(null!=t),t.vc=null,t.yc=null,t.Ya=null;var r=t.Wa;null!=r&&(r.X=null),t.vb=null,e(null!=t)}function Pt(){var e=new or;return null==e?null:(e.a=0,e.xb=gi,rt("Predictor","VP8LPredictors"),rt("Predictor","VP8LPredictors_C"),rt("PredictorAdd","VP8LPredictorsAdd"),rt("PredictorAdd","VP8LPredictorsAdd_C"),Gr=G,Qr=X,Zr=$,tn=K,en=Q,rn=Z,nn=tt,t.VP8LMapColor32b=Xr,t.VP8LMapColor8b=$r,e)}function Ft(t,r,n,s,u){var l=1,f=[t],p=[r],g=s.m,m=s.s,v=null,b=0;t:for(;;){if(n)for(;l&&y(g,1);){var w=f,x=p,A=s,k=1,_=A.m,P=A.gc[A.ab],F=y(_,2);if(A.Oc&1<<F)l=0;else{switch(A.Oc|=1<<F,P.hc=F,P.Ea=w[0],P.nc=x[0],P.K=[null],++A.ab,e(4>=A.ab),F){case 0:case 1:P.b=y(_,3)+2,k=Ft(B(P.Ea,P.b),B(P.nc,P.b),0,A,P.K),P.K=P.K[0];break;case 3:var C,M=y(_,8)+1,I=16<M?0:4<M?1:2<M?2:3;if(w[0]=B(P.Ea,I),P.b=I,C=k=Ft(M,1,0,A,P.K)){var O,T=M,E=P,R=1<<(8>>E.b),D=a(R);if(null==D)C=0;else{var U=E.K[0],z=E.w;for(D[0]=E.K[0][0],O=1;O<1*T;++O)D[O]=q(U[z+O],D[O-1]);for(;O<4*R;++O)D[O]=0;E.K[0]=null,E.K[0]=D,C=1}}k=C;break;case 2:break;default:e(0)}l=k}}if(f=f[0],p=p[0],l&&y(g,1)&&!(l=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}var H;if(H=l)e:{var W,V,G,Y=s,X=f,J=p,$=b,K=n,Q=Y.m,Z=Y.s,tt=[null],et=1,rt=0,nt=Zn[$];r:for(;;){if(K&&y(Q,1)){var it=y(Q,3)+2,at=B(X,it),ot=B(J,it),st=at*ot;if(!Ft(at,ot,0,Y,tt))break r;for(tt=tt[0],Z.xc=it,W=0;W<st;++W){var ut=tt[W]>>8&65535;tt[W]=ut,ut>=et&&(et=ut+1)}}if(Q.h)break r;for(V=0;5>V;++V){var lt=Jn[V];!V&&0<$&&(lt+=1<<$),rt<lt&&(rt=lt)}var ct=o(et*nt,h),ht=et,ft=o(ht,d);if(null==ft)var dt=null;else e(65536>=ht),dt=ft;var pt=a(rt);if(null==dt||null==pt||null==ct){Y.a=1;break r}var gt=ct;for(W=G=0;W<et;++W){var mt=dt[W],vt=mt.G,bt=mt.H,wt=0,xt=1,St=0;for(V=0;5>V;++V){lt=Jn[V],vt[V]=gt,bt[V]=G,!V&&0<$&&(lt+=1<<$);n:{var At,Nt=lt,Lt=Y,Pt=pt,Ct=gt,Mt=G,It=0,jt=Lt.m,Ot=y(jt,1);if(i(Pt,0,0,Nt),Ot){var Tt=y(jt,1)+1,Et=y(jt,1),Bt=y(jt,0==Et?1:8);Pt[Bt]=1,2==Tt&&(Pt[Bt=y(jt,8)]=1);var qt=1}else{var Rt=a(19),Dt=y(jt,4)+4;if(19<Dt){Lt.a=3;var Ut=0;break n}for(At=0;At<Dt;++At)Rt[Kn[At]]=y(jt,3);var zt=void 0,Ht=void 0,Wt=Lt,Vt=Rt,Gt=Nt,Yt=Pt,Xt=0,Jt=Wt.m,$t=8,Kt=o(128,h);i:for(;c(Kt,0,7,Vt,19);){if(y(Jt,1)){var Qt=2+2*y(Jt,3);if((zt=2+y(Jt,Qt))>Gt)break i}else zt=Gt;for(Ht=0;Ht<Gt&&zt--;){L(Jt);var Zt=Kt[0+(127&S(Jt))];N(Jt,Jt.u+Zt.g);var te=Zt.value;if(16>te)Yt[Ht++]=te,0!=te&&($t=te);else{var ee=16==te,re=te-16,ne=Xn[re],ie=y(Jt,Yn[re])+ne;if(Ht+ie>Gt)break i;for(var ae=ee?$t:0;0<ie--;)Yt[Ht++]=ae}}Xt=1;break i}Xt||(Wt.a=3),qt=Xt}(qt=qt&&!jt.h)&&(It=c(Ct,Mt,8,Pt,Nt)),qt&&0!=It?Ut=It:(Lt.a=3,Ut=0)}if(0==Ut)break r;if(xt&&1==$n[V]&&(xt=0==gt[G].g),wt+=gt[G].g,G+=Ut,3>=V){var oe,se=pt[0];for(oe=1;oe<lt;++oe)pt[oe]>se&&(se=pt[oe]);St+=se}}if(mt.nd=xt,mt.Qb=0,xt&&(mt.qb=(vt[3][bt[3]+0].value<<24|vt[1][bt[1]+0].value<<16|vt[2][bt[2]+0].value)>>>0,0==wt&&256>vt[0][bt[0]+0].value&&(mt.Qb=1,mt.qb+=vt[0][bt[0]+0].value<<8)),mt.jc=!mt.Qb&&6>St,mt.jc){var ue,le=mt;for(ue=0;ue<qr;++ue){var ce=ue,he=le.pd[ce],fe=le.G[0][le.H[0]+ce];256<=fe.value?(he.g=fe.g+256,he.value=fe.value):(he.g=0,he.value=0,ce>>=yt(fe,8,he),ce>>=yt(le.G[1][le.H[1]+ce],16,he),ce>>=yt(le.G[2][le.H[2]+ce],0,he),yt(le.G[3][le.H[3]+ce],24,he))}}}Z.vc=tt,Z.Wb=et,Z.Ya=dt,Z.yc=ct,H=1;break e}H=0}if(!(l=H)){s.a=3;break t}if(0<b){if(m.ua=1<<b,!j(m.Wa,b)){s.a=1,l=0;break t}}else m.ua=0;var de=s,pe=f,ge=p,me=de.s,ve=me.xc;if(de.c=pe,de.i=ge,me.md=B(pe,ve),me.wc=0==ve?-1:(1<<ve)-1,n){s.xb=pi;break t}if(null==(v=a(f*p))){s.a=1,l=0;break t}l=(l=kt(s,v,0,f,p,p,null))&&!g.h;break t}return l?(null!=u?u[0]=v:(e(null==v),e(n)),s.$=0,n||_t(m)):_t(m),l}function Ct(t,r){var n=t.c*t.i,i=n+r+16*r;return e(t.c<=r),t.V=a(i),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+r,1)}function Mt(t,r){var n=t.C,i=r-n,a=t.V,o=t.Ba+t.c*n;for(e(r<=t.l.o);0<i;){var s=16<i?16:i,u=t.l.ma,l=t.l.width,c=l*s,h=u.ca,f=u.tb+l*n,d=t.Ta,p=t.Ua;xt(t,s,a,o),kn(d,p,h,f,c),Nt(u,n,n+s,h,f,l),i-=s,a+=s*t.c,n+=s}e(n==r),t.C=t.Ma=r}function It(){this.ub=this.yd=this.td=this.Rb=0}function jt(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ot(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Tt(){this.Yb=function(){var t=[];return function t(e,r,n){for(var i=n[r],a=0;a<i&&(e.push(n.length>r+1?[]:0),!(n.length<r+1));a++)t(e[a],r+1,n)}(t,0,[3,11]),t}()}function Et(){this.jb=a(3),this.Wc=s([4,8],Tt),this.Xc=s([4,17],Tt)}function Bt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function qt(){this.ld=this.La=this.dd=this.tc=0}function Rt(){this.Na=this.la=0}function Dt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ut(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function zt(){this.uc=this.M=this.Nb=0,this.wa=Array(new qt),this.Y=0,this.ya=Array(new Ut),this.aa=0,this.l=new Gt}function Ht(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Wt(){this.cb=this.a=0,this.sc="",this.m=new w,this.Od=new It,this.Kc=new jt,this.ed=new Bt,this.Qa=new Ot,this.Ic=this.$c=this.Aa=0,this.D=new zt,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,w),this.ia=0,this.pb=o(4,Dt),this.Pa=new Et,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ht),this.Hd=0,this.rb=Array(new Rt),this.sb=0,this.wa=Array(new qt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ut),this.L=this.aa=0,this.gd=s([4,2],qt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Vt(t,e){return 0>t?0:t>e?e:t}function Gt(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Yt(){var t=new Wt;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,ni||(ni=Kt)),t}function Xt(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function Jt(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function $t(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Xt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,a=r.w,o=r.ha;if(4>o)return Xt(t,7,"Truncated header.");var s=n[a+0]|n[a+1]<<8|n[a+2]<<16,u=t.Od;if(u.Rb=!(1&s),u.td=s>>1&7,u.yd=s>>4&1,u.ub=s>>5,3<u.td)return Xt(t,3,"Incorrect keyframe parameters.");if(!u.yd)return Xt(t,4,"Frame not displayable.");a+=3,o-=3;var l=t.Kc;if(u.Rb){if(7>o)return Xt(t,7,"cannot parse picture header");if(!Jt(n,a,o))return Xt(t,3,"Bad code word");l.c=16383&(n[a+4]<<8|n[a+3]),l.Td=n[a+4]>>6,l.i=16383&(n[a+6]<<8|n[a+5]),l.Ud=n[a+6]>>6,a+=7,o-=7,t.za=l.c+15>>4,t.Ub=l.i+15>>4,r.width=l.c,r.height=l.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,i((s=t.Pa).jb,0,255,s.jb.length),e(null!=(s=t.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(u.ub>o)return Xt(t,7,"bad partition length");p(s=t.m,n,a,u.ub),a+=u.ub,o-=u.ub,u.Rb&&(l.Ld=_(s),l.Kd=_(s)),l=t.Qa;var c,h=t.Pa;if(e(null!=s),e(null!=l),l.Cb=_(s),l.Cb){if(l.Bb=_(s),_(s)){for(l.Fb=_(s),c=0;4>c;++c)l.Zb[c]=_(s)?m(s,7):0;for(c=0;4>c;++c)l.Lb[c]=_(s)?m(s,6):0}if(l.Bb)for(c=0;3>c;++c)h.jb[c]=_(s)?g(s,8):255}else l.Bb=0;if(s.Ka)return Xt(t,3,"cannot parse segment header");if((l=t.ed).zd=_(s),l.Tb=g(s,6),l.wb=g(s,3),l.Pc=_(s),l.Pc&&_(s)){for(h=0;4>h;++h)_(s)&&(l.vd[h]=m(s,6));for(h=0;4>h;++h)_(s)&&(l.od[h]=m(s,6))}if(t.L=0==l.Tb?0:l.zd?1:2,s.Ka)return Xt(t,3,"cannot parse filter header");var f=o;if(o=c=a,a=c+f,l=f,t.Xb=(1<<g(t.m,2))-1,f<3*(h=t.Xb))n=7;else{for(c+=3*h,l-=3*h,f=0;f<h;++f){var d=n[o+0]|n[o+1]<<8|n[o+2]<<16;d>l&&(d=l),p(t.Jc[+f],n,c,d),c+=d,l-=d,o+=3}p(t.Jc[+h],n,c,l),n=c<a?0:5}if(0!=n)return Xt(t,n,"cannot parse partitions");for(n=g(c=t.m,7),o=_(c)?m(c,4):0,a=_(c)?m(c,4):0,l=_(c)?m(c,4):0,h=_(c)?m(c,4):0,c=_(c)?m(c,4):0,f=t.Qa,d=0;4>d;++d){if(f.Cb){var v=f.Zb[d];f.Fb||(v+=n)}else{if(0<d){t.pb[d]=t.pb[0];continue}v=n}var b=t.pb[d];b.Sc[0]=ei[Vt(v+o,127)],b.Sc[1]=ri[Vt(v+0,127)],b.Eb[0]=2*ei[Vt(v+a,127)],b.Eb[1]=101581*ri[Vt(v+l,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ei[Vt(v+h,117)],b.Qc[1]=ri[Vt(v+c,127)],b.lc=v+c}if(!u.Rb)return Xt(t,4,"Not a key frame.");for(_(s),u=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(a=0;3>a;++a)for(l=0;11>l;++l)h=P(s,li[n][o][a][l])?g(s,8):si[n][o][a][l],u.Wc[n][o].Yb[a][l]=h;for(o=0;17>o;++o)u.Xc[n][o]=u.Wc[n][ci[o]]}return t.kc=_(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function Kt(t,e,r,n,i,a,o){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!P(t,s[r+0]))return i;for(;!P(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var u=e[i+1].Yb;if(P(t,s[r+2])){var l=t,c=0;if(P(l,(f=s)[(h=r)+3]))if(P(l,f[h+6])){for(s=0,h=2*(c=P(l,f[h+8]))+(f=P(l,f[h+9+c])),c=0,f=ii[h];f[s];++s)c+=c+P(l,f[s]);c+=3+(8<<h)}else P(l,f[h+7])?(c=7+2*P(l,165),c+=P(l,145)):c=5+P(l,159);else c=P(l,f[h+4])?3+P(l,f[h+5]):2;s=u[2]}else c=1,s=u[1];u=o+ai[i],0>(l=t).b&&k(l);var h,f=l.b,d=(h=l.Ca>>1)-(l.I>>f)>>31;--l.b,l.Ca+=d,l.Ca|=1,l.I-=(h+1&d)<<f,a[u]=((c^d)-d)*n[(0<i)+0]}return 16}function Qt(t){var e=t.rb[t.sb-1];e.la=0,e.Na=0,i(t.zc,0,0,t.zc.length),t.ja=0}function Zt(t,r){if(null==t)return 0;if(null==r)return Xt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!$t(t,r))return 0;if(e(t.cb),null==r.ac||r.ac(r)){r.ob&&(t.L=0);var s=Ri[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=r.v-s>>4,t.zb=r.j-s>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=r.o+15+s>>4,t.Hb=r.va+15+s>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var u=t.ed;for(s=0;4>s;++s){var l;if(t.Qa.Cb){var c=t.Qa.Lb[s];t.Qa.Fb||(c+=u.Tb)}else c=u.Tb;for(l=0;1>=l;++l){var h=t.gd[s][l],f=c;if(u.Pc&&(f+=u.vd[0],l&&(f+=u.od[0])),0<(f=0>f?0:63<f?63:f)){var d=f;0<u.wb&&(d=4<u.wb?d>>2:d>>1)>9-u.wb&&(d=9-u.wb),1>d&&(d=1),h.dd=d,h.tc=2*f+d,h.ld=40<=f?2:15<=f?1:0}else h.tc=0;h.La=l}}}s=0}else Xt(t,6,"Frame setup failed"),s=t.a;if(s=0==s){if(s){t.$c=0,0<t.Aa||(t.Ic=Ui);t:{s=t.Ic,u=4*(d=t.za);var p=32*d,g=d+1,m=0<t.L?d*(0<t.Aa?2:1):0,v=(2==t.Aa?2:1)*d;if((h=u+832+(l=3*(16*s+Ri[t.L])/2*p)+(c=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=h)s=0;else{if(h>t.Vb){if(t.Vb=0,t.Ec=a(h),t.Fc=0,null==t.Ec){s=Xt(t,1,"no memory during frame initialization.");break t}t.Vb=h}h=t.Ec,f=t.Fc,t.Ac=h,t.Bc=f,f+=u,t.Gd=o(p,Ht),t.Hd=0,t.rb=o(g+1,Rt),t.sb=1,t.wa=m?o(m,qt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=d),e(!0),t.oc=h,t.pc=f,f+=832,t.ya=o(v,Ut),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=d),t.R=16*d,t.B=8*d,d=(p=Ri[t.L])*t.R,p=p/2*t.B,t.sa=h,t.ta=f+d,t.qa=t.sa,t.ra=t.ta+16*s*t.R+p,t.Ha=t.qa,t.Ia=t.ra+8*s*t.B+p,t.$c=0,f+=l,t.mb=c?h:null,t.nb=c?f:null,e(f+c<=t.Fc+t.Vb),Qt(t),i(t.Ac,t.Bc,0,u),s=1}}if(s){if(r.ka=0,r.y=t.sa,r.O=t.ta,r.f=t.qa,r.N=t.ra,r.ea=t.Ha,r.Vd=t.Ia,r.fa=t.R,r.Rc=t.B,r.F=null,r.J=0,!Mn){for(s=-255;255>=s;++s)_n[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)Pn[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Fn[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Cn[255+s]=0>s?0:255<s?255:s;Mn=1}an=le,on=ae,un=oe,ln=se,cn=ue,sn=ie,hn=Xe,fn=Je,dn=Qe,pn=Ze,gn=$e,mn=Ke,vn=tr,bn=er,yn=ze,wn=He,xn=We,Sn=Ve,fi[0]=Ne,fi[1]=he,fi[2]=Se,fi[3]=Ae,fi[4]=Le,fi[5]=_e,fi[6]=ke,fi[7]=Pe,fi[8]=Ce,fi[9]=Fe,hi[0]=ve,hi[1]=de,hi[2]=pe,hi[3]=ge,hi[4]=be,hi[5]=ye,hi[6]=we,di[0]=Oe,di[1]=fe,di[2]=Me,di[3]=Ie,di[4]=Ee,di[5]=Te,di[6]=Be,s=1}else s=0}s&&(s=function(t,r){for(t.M=0;t.M<t.Va;++t.M){var o,s=t.Jc[t.M&t.Xb],u=t.m,l=t;for(o=0;o<l.za;++o){var c=u,h=l,f=h.Ac,d=h.Bc+4*o,p=h.zc,g=h.ya[h.aa+o];if(h.Qa.Bb?g.$b=P(c,h.Pa.jb[0])?2+P(c,h.Pa.jb[2]):P(c,h.Pa.jb[1]):g.$b=0,h.kc&&(g.Ad=P(c,h.Bd)),g.Za=!P(c,145)+0,g.Za){var m=g.Ob,v=0;for(h=0;4>h;++h){var b,y=p[0+h];for(b=0;4>b;++b){y=ui[f[d+b]][y];for(var w=oi[P(c,y[0])];0<w;)w=oi[2*w+P(c,y[w])];y=-w,f[d+b]=y}n(m,v,f,d,4),v+=4,p[0+h]=y}}else y=P(c,156)?P(c,128)?1:3:P(c,163)?2:0,g.Ob[0]=y,i(f,d,y,4),i(p,0,y,4);g.Dd=P(c,142)?P(c,114)?P(c,183)?1:3:2:0}if(l.m.Ka)return Xt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(l=s,c=(u=t).rb[u.sb-1],f=u.rb[u.sb+u.ja],o=u.ya[u.aa+u.ja],d=u.kc?o.Ad:0)c.la=f.la=0,o.Za||(c.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var x,S;if(c=f,f=l,d=u.Pa.Xc,p=u.ya[u.aa+u.ja],g=u.pb[p.$b],h=p.ad,m=0,v=u.rb[u.sb-1],y=b=0,i(h,m,0,384),p.Za)var A=0,N=d[3];else{w=a(16);var L=c.Na+v.Na;if(L=ni(f,d[1],L,g.Eb,0,w,0),c.Na=v.Na=(0<L)+0,1<L)an(w,0,h,m);else{var k=w[0]+3>>3;for(w=0;256>w;w+=16)h[m+w]=k}A=1,N=d[0]}var _=15&c.la,F=15&v.la;for(w=0;4>w;++w){var C=1&F;for(k=S=0;4>k;++k)_=_>>1|(C=(L=ni(f,N,L=C+(1&_),g.Sc,A,h,m))>A)<<7,S=S<<2|(3<L?3:1<L?2:0!=h[m+0]),m+=16;_>>=4,F=F>>1|C<<7,b=(b<<8|S)>>>0}for(N=_,A=F>>4,x=0;4>x;x+=2){for(S=0,_=c.la>>4+x,F=v.la>>4+x,w=0;2>w;++w){for(C=1&F,k=0;2>k;++k)L=C+(1&_),_=_>>1|(C=0<(L=ni(f,d[2],L,g.Qc,0,h,m)))<<3,S=S<<2|(3<L?3:1<L?2:0!=h[m+0]),m+=16;_>>=2,F=F>>1|C<<5}y|=S<<4*x,N|=_<<4<<x,A|=(240&F)<<x}c.la=N,v.la=A,p.Hc=b,p.Gc=y,p.ia=43690&y?0:g.ia,d=!(b|y)}if(0<u.L&&(u.wa[u.Y+u.ja]=u.gd[o.$b][o.Za],u.wa[u.Y+u.ja].La|=!d),l.Ka)return Xt(t,7,"Premature end-of-file encountered.")}if(Qt(t),u=r,l=1,o=(s=t).D,c=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=c,jr(s,o),l=1,o=(S=s.D).Nb,c=(y=Ri[s.L])*s.R,f=y/2*s.B,w=16*o*s.R,k=8*o*s.B,d=s.sa,p=s.ta-c+w,g=s.qa,h=s.ra-f+k,m=s.Ha,v=s.Ia-f+k,F=0==(_=S.M),b=_>=s.Va-1,2==s.Aa&&jr(s,S),S.uc)for(C=(L=s).D.M,e(L.D.uc),S=L.yb;S<L.Hb;++S){A=S,N=C;var M=(I=(U=L).D).Nb;x=U.R;var I=I.wa[I.Y+A],j=U.sa,O=U.ta+16*M*x+16*A,T=I.dd,E=I.tc;if(0!=E)if(e(3<=E),1==U.L)0<A&&wn(j,O,x,E+4),I.La&&Sn(j,O,x,E),0<N&&yn(j,O,x,E+4),I.La&&xn(j,O,x,E);else{var B=U.B,q=U.qa,R=U.ra+8*M*B+8*A,D=U.Ha,U=U.Ia+8*M*B+8*A;M=I.ld,0<A&&(fn(j,O,x,E+4,T,M),pn(q,R,D,U,B,E+4,T,M)),I.La&&(mn(j,O,x,E,T,M),bn(q,R,D,U,B,E,T,M)),0<N&&(hn(j,O,x,E+4,T,M),dn(q,R,D,U,B,E+4,T,M)),I.La&&(gn(j,O,x,E,T,M),vn(q,R,D,U,B,E,T,M))}}if(s.ia&&alert("todo:DitherRow"),null!=u.put){if(S=16*_,_=16*(_+1),F?(u.y=s.sa,u.O=s.ta+w,u.f=s.qa,u.N=s.ra+k,u.ea=s.Ha,u.W=s.Ia+k):(S-=y,u.y=d,u.O=p,u.f=g,u.N=h,u.ea=m,u.W=v),b||(_-=y),_>u.o&&(_=u.o),u.F=null,u.J=null,null!=s.Fa&&0<s.Fa.length&&S<_&&(u.J=hr(s,u,S,_-S),u.F=s.mb,null==u.F&&0==u.F.length)){l=Xt(s,3,"Could not decode alpha data.");break t}S<u.j&&(y=u.j-S,S=u.j,e(!(1&y)),u.O+=s.R*y,u.N+=s.B*(y>>1),u.W+=s.B*(y>>1),null!=u.F&&(u.J+=u.width*y)),S<_&&(u.O+=u.v,u.N+=u.v>>1,u.W+=u.v>>1,null!=u.F&&(u.J+=u.v),u.ka=S-u.j,u.U=u.va-u.v,u.T=_-S,l=u.put(u))}o+1!=s.Ic||b||(n(s.sa,s.ta-c,d,p+16*s.R,c),n(s.qa,s.ra-f,g,h+8*s.B,f),n(s.Ha,s.Ia-f,m,v+8*s.B,f))}if(!l)return Xt(t,6,"Output aborted.")}return 1}(t,r)),null!=r.bc&&r.bc(r),s&=1}return s?(t.cb=0,s):0}function te(t,e,r,n,i){i=t[e+r+32*n]+(i>>3),t[e+r+32*n]=-256&i?0>i?0:255:i}function ee(t,e,r,n,i,a){te(t,e,0,r,n+i),te(t,e,1,r,n+a),te(t,e,2,r,n-a),te(t,e,3,r,n-i)}function re(t){return(20091*t>>16)+t}function ne(t,e,r,n){var i,o=0,s=a(16);for(i=0;4>i;++i){var u=t[e+0]+t[e+8],l=t[e+0]-t[e+8],c=(35468*t[e+4]>>16)-re(t[e+12]),h=re(t[e+4])+(35468*t[e+12]>>16);s[o+0]=u+h,s[o+1]=l+c,s[o+2]=l-c,s[o+3]=u-h,o+=4,e++}for(i=o=0;4>i;++i)u=(t=s[o+0]+4)+s[o+8],l=t-s[o+8],c=(35468*s[o+4]>>16)-re(s[o+12]),te(r,n,0,0,u+(h=re(s[o+4])+(35468*s[o+12]>>16))),te(r,n,1,0,l+c),te(r,n,2,0,l-c),te(r,n,3,0,u-h),o++,n+=32}function ie(t,e,r,n){var i=t[e+0]+4,a=35468*t[e+4]>>16,o=re(t[e+4]),s=35468*t[e+1]>>16;ee(r,n,0,i+o,t=re(t[e+1]),s),ee(r,n,1,i+a,t,s),ee(r,n,2,i-a,t,s),ee(r,n,3,i-o,t,s)}function ae(t,e,r,n,i){ne(t,e,r,n),i&&ne(t,e+16,r,n+4)}function oe(t,e,r,n){on(t,e+0,r,n,1),on(t,e+32,r,n+128,1)}function se(t,e,r,n){var i;for(t=t[e+0]+4,i=0;4>i;++i)for(e=0;4>e;++e)te(r,n,e,i,t)}function ue(t,e,r,n){t[e+0]&&ln(t,e+0,r,n),t[e+16]&&ln(t,e+16,r,n+4),t[e+32]&&ln(t,e+32,r,n+128),t[e+48]&&ln(t,e+48,r,n+128+4)}function le(t,e,r,n){var i,o=a(16);for(i=0;4>i;++i){var s=t[e+0+i]+t[e+12+i],u=t[e+4+i]+t[e+8+i],l=t[e+4+i]-t[e+8+i],c=t[e+0+i]-t[e+12+i];o[0+i]=s+u,o[8+i]=s-u,o[4+i]=c+l,o[12+i]=c-l}for(i=0;4>i;++i)s=(t=o[0+4*i]+3)+o[3+4*i],u=o[1+4*i]+o[2+4*i],l=o[1+4*i]-o[2+4*i],c=t-o[3+4*i],r[n+0]=s+u>>3,r[n+16]=c+l>>3,r[n+32]=s-u>>3,r[n+48]=c-l>>3,n+=64}function ce(t,e,r){var n,i=e-32,a=On,o=255-t[i-1];for(n=0;n<r;++n){var s,u=a,l=o+t[e-1];for(s=0;s<r;++s)t[e+s]=u[l+t[i+s]];e+=32}}function he(t,e){ce(t,e,4)}function fe(t,e){ce(t,e,8)}function de(t,e){ce(t,e,16)}function pe(t,e){var r;for(r=0;16>r;++r)n(t,e+32*r,t,e-32,16)}function ge(t,e){var r;for(r=16;0<r;--r)i(t,e,t[e-1],16),e+=32}function me(t,e,r){var n;for(n=0;16>n;++n)i(e,r+32*n,t,16)}function ve(t,e){var r,n=16;for(r=0;16>r;++r)n+=t[e-1+32*r]+t[e+r-32];me(n>>5,t,e)}function be(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e-1+32*r];me(n>>4,t,e)}function ye(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e+r-32];me(n>>4,t,e)}function we(t,e){me(128,t,e)}function xe(t,e,r){return t+2*e+r+2>>2}function Se(t,e){var r,i=e-32;for(i=new Uint8Array([xe(t[i-1],t[i+0],t[i+1]),xe(t[i+0],t[i+1],t[i+2]),xe(t[i+1],t[i+2],t[i+3]),xe(t[i+2],t[i+3],t[i+4])]),r=0;4>r;++r)n(t,e+32*r,i,0,i.length)}function Ae(t,e){var r=t[e-1],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96];F(t,e+0,16843009*xe(t[e-1-32],r,n)),F(t,e+32,16843009*xe(r,n,i)),F(t,e+64,16843009*xe(n,i,a)),F(t,e+96,16843009*xe(i,a,a))}function Ne(t,e){var r,n=4;for(r=0;4>r;++r)n+=t[e+r-32]+t[e-1+32*r];for(n>>=3,r=0;4>r;++r)i(t,e+32*r,n,4)}function Le(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1-32],o=t[e+0-32],s=t[e+1-32],u=t[e+2-32],l=t[e+3-32];t[e+0+96]=xe(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=xe(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=xe(a,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=xe(o,a,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=xe(s,o,a),t[e+3+32]=t[e+2+0]=xe(u,s,o),t[e+3+0]=xe(l,u,s)}function ke(t,e){var r=t[e+1-32],n=t[e+2-32],i=t[e+3-32],a=t[e+4-32],o=t[e+5-32],s=t[e+6-32],u=t[e+7-32];t[e+0+0]=xe(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=xe(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=xe(n,i,a),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=xe(i,a,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=xe(a,o,s),t[e+3+64]=t[e+2+96]=xe(o,s,u),t[e+3+96]=xe(s,u,u)}function _e(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1-32],o=t[e+0-32],s=t[e+1-32],u=t[e+2-32],l=t[e+3-32];t[e+0+0]=t[e+1+64]=a+o+1>>1,t[e+1+0]=t[e+2+64]=o+s+1>>1,t[e+2+0]=t[e+3+64]=s+u+1>>1,t[e+3+0]=u+l+1>>1,t[e+0+96]=xe(i,n,r),t[e+0+64]=xe(n,r,a),t[e+0+32]=t[e+1+96]=xe(r,a,o),t[e+1+32]=t[e+2+96]=xe(a,o,s),t[e+2+32]=t[e+3+96]=xe(o,s,u),t[e+3+32]=xe(s,u,l)}function Pe(t,e){var r=t[e+0-32],n=t[e+1-32],i=t[e+2-32],a=t[e+3-32],o=t[e+4-32],s=t[e+5-32],u=t[e+6-32],l=t[e+7-32];t[e+0+0]=r+n+1>>1,t[e+1+0]=t[e+0+64]=n+i+1>>1,t[e+2+0]=t[e+1+64]=i+a+1>>1,t[e+3+0]=t[e+2+64]=a+o+1>>1,t[e+0+32]=xe(r,n,i),t[e+1+32]=t[e+0+96]=xe(n,i,a),t[e+2+32]=t[e+1+96]=xe(i,a,o),t[e+3+32]=t[e+2+96]=xe(a,o,s),t[e+3+64]=xe(o,s,u),t[e+3+96]=xe(s,u,l)}function Fe(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96];t[e+0+0]=r+n+1>>1,t[e+2+0]=t[e+0+32]=n+i+1>>1,t[e+2+32]=t[e+0+64]=i+a+1>>1,t[e+1+0]=xe(r,n,i),t[e+3+0]=t[e+1+32]=xe(n,i,a),t[e+3+32]=t[e+1+64]=xe(i,a,a),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=a}function Ce(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],a=t[e-1+96],o=t[e-1-32],s=t[e+0-32],u=t[e+1-32],l=t[e+2-32];t[e+0+0]=t[e+2+32]=r+o+1>>1,t[e+0+32]=t[e+2+64]=n+r+1>>1,t[e+0+64]=t[e+2+96]=i+n+1>>1,t[e+0+96]=a+i+1>>1,t[e+3+0]=xe(s,u,l),t[e+2+0]=xe(o,s,u),t[e+1+0]=t[e+3+32]=xe(r,o,s),t[e+1+32]=t[e+3+64]=xe(n,r,o),t[e+1+64]=t[e+3+96]=xe(i,n,r),t[e+1+96]=xe(a,i,n)}function Me(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function Ie(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function je(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function Oe(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];je(n>>4,t,e)}function Te(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];je(n>>3,t,e)}function Ee(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];je(n>>3,t,e)}function Be(t,e){je(128,t,e)}function qe(t,e,r){var n=t[e-r],i=t[e+0],a=3*(i-n)+In[1020+t[e-2*r]-t[e+r]],o=jn[112+(a+4>>3)];t[e-r]=On[255+n+jn[112+(a+3>>3)]],t[e+0]=On[255+i-o]}function Re(t,e,r,n){var i=t[e+0],a=t[e+r];return Tn[255+t[e-2*r]-t[e-r]]>n||Tn[255+a-i]>n}function De(t,e,r,n){return 4*Tn[255+t[e-r]-t[e+0]]+Tn[255+t[e-2*r]-t[e+r]]<=n}function Ue(t,e,r,n,i){var a=t[e-3*r],o=t[e-2*r],s=t[e-r],u=t[e+0],l=t[e+r],c=t[e+2*r],h=t[e+3*r];return 4*Tn[255+s-u]+Tn[255+o-l]>n?0:Tn[255+t[e-4*r]-a]<=i&&Tn[255+a-o]<=i&&Tn[255+o-s]<=i&&Tn[255+h-c]<=i&&Tn[255+c-l]<=i&&Tn[255+l-u]<=i}function ze(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)De(t,e+n,r,i)&&qe(t,e+n,r)}function He(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)De(t,e+n*r,1,i)&&qe(t,e+n*r,1)}function We(t,e,r,n){var i;for(i=3;0<i;--i)ze(t,e+=4*r,r,n)}function Ve(t,e,r,n){var i;for(i=3;0<i;--i)He(t,e+=4,r,n)}function Ge(t,e,r,n,i,a,o,s){for(a=2*a+1;0<i--;){if(Ue(t,e,r,a,o))if(Re(t,e,r,s))qe(t,e,r);else{var u=t,l=e,c=r,h=u[l-2*c],f=u[l-c],d=u[l+0],p=u[l+c],g=u[l+2*c],m=27*(b=In[1020+3*(d-f)+In[1020+h-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;u[l-3*c]=On[255+u[l-3*c]+b],u[l-2*c]=On[255+h+v],u[l-c]=On[255+f+m],u[l+0]=On[255+d-m],u[l+c]=On[255+p-v],u[l+2*c]=On[255+g-b]}e+=n}}function Ye(t,e,r,n,i,a,o,s){for(a=2*a+1;0<i--;){if(Ue(t,e,r,a,o))if(Re(t,e,r,s))qe(t,e,r);else{var u=t,l=e,c=r,h=u[l-c],f=u[l+0],d=u[l+c],p=jn[112+(4+(g=3*(f-h))>>3)],g=jn[112+(g+3>>3)],m=p+1>>1;u[l-2*c]=On[255+u[l-2*c]+m],u[l-c]=On[255+h+g],u[l+0]=On[255+f-p],u[l+c]=On[255+d-m]}e+=n}}function Xe(t,e,r,n,i,a){Ge(t,e,r,1,16,n,i,a)}function Je(t,e,r,n,i,a){Ge(t,e,1,r,16,n,i,a)}function $e(t,e,r,n,i,a){var o;for(o=3;0<o;--o)Ye(t,e+=4*r,r,1,16,n,i,a)}function Ke(t,e,r,n,i,a){var o;for(o=3;0<o;--o)Ye(t,e+=4,1,r,16,n,i,a)}function Qe(t,e,r,n,i,a,o,s){Ge(t,e,i,1,8,a,o,s),Ge(r,n,i,1,8,a,o,s)}function Ze(t,e,r,n,i,a,o,s){Ge(t,e,1,i,8,a,o,s),Ge(r,n,1,i,8,a,o,s)}function tr(t,e,r,n,i,a,o,s){Ye(t,e+4*i,i,1,8,a,o,s),Ye(r,n+4*i,i,1,8,a,o,s)}function er(t,e,r,n,i,a,o,s){Ye(t,e+4,1,i,8,a,o,s),Ye(r,n+4,1,i,8,a,o,s)}function rr(){this.ba=new ot,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function nr(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ir(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ar(){this.ua=0,this.Wa=new T,this.vb=new T,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new h}function or(){this.xb=this.a=0,this.l=new Gt,this.ca=new ot,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new x,this.Pb=0,this.wd=new x,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ar,this.ab=0,this.gc=o(4,ir),this.Oc=0}function sr(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ur(t,e,r,n,i,a,o){for(t=null==t?0:t[e+0],e=0;e<o;++e)i[a+e]=t+r[n+e]&255,t=i[a+e]}function lr(t,e,r,n,i,a,o){var s;if(null==t)ur(null,null,r,n,i,a,o);else for(s=0;s<o;++s)i[a+s]=t[e+s]+r[n+s]&255}function cr(t,e,r,n,i,a,o){if(null==t)ur(null,null,r,n,i,a,o);else{var s,u=t[e+0],l=u,c=u;for(s=0;s<o;++s)l=c+(u=t[e+s])-l,c=r[n+s]+(-256&l?0>l?0:255:l)&255,l=u,i[a+s]=c}}function hr(t,r,i,o){var s=r.width,u=r.o;if(e(null!=t&&null!=r),0>i||0>=o||i+o>u)return null;if(!t.Cc){if(null==t.ga){var l;if(t.ga=new sr,(l=null==t.ga)||(l=r.width*r.o,e(0==t.Gb.length),t.Gb=a(l),t.Uc=0,null==t.Gb?l=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,l=1),l=!l),!l){l=t.ga;var c=t.Fa,h=t.P,f=t.qc,d=t.mb,p=t.nb,g=h+1,m=f-1,b=l.l;if(e(null!=c&&null!=d&&null!=r),mi[0]=null,mi[1]=ur,mi[2]=lr,mi[3]=cr,l.ca=d,l.tb=p,l.c=r.width,l.i=r.height,e(0<l.c&&0<l.i),1>=f)r=0;else if(l.$a=3&c[h+0],l.Z=c[h+0]>>2&3,l.Lc=c[h+0]>>4&3,h=c[h+0]>>6&3,0>l.$a||1<l.$a||4<=l.Z||1<l.Lc||h)r=0;else if(b.put=dt,b.ac=ft,b.bc=pt,b.ma=l,b.width=r.width,b.height=r.height,b.Da=r.Da,b.v=r.v,b.va=r.va,b.j=r.j,b.o=r.o,l.$a)t:{e(1==l.$a),r=Pt();e:for(;;){if(null==r){r=0;break t}if(e(null!=l),l.mc=r,r.c=l.c,r.i=l.i,r.l=l.l,r.l.ma=l,r.l.width=l.c,r.l.height=l.i,r.a=0,v(r.m,c,g,m),!Ft(l.c,l.i,1,r,null))break e;if(1==r.ab&&3==r.gc[0].hc&&At(r.s)?(l.ic=1,c=r.c*r.i,r.Ta=null,r.Ua=0,r.V=a(c),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(l.ic=0,r=Ct(r,l.c)),!r)break e;r=1;break t}l.mc=null,r=0}else r=m>=l.c*l.i;l=!r}if(l)return null;1!=t.ga.Lc?t.Ga=0:o=u-i}e(null!=t.ga),e(i+o<=u);t:{if(r=(c=t.ga).c,u=c.l.o,0==c.$a){if(g=t.rc,m=t.Vc,b=t.Fa,h=t.P+1+i*r,f=t.mb,d=t.nb+i*r,e(h<=t.P+t.qc),0!=c.Z)for(e(null!=mi[c.Z]),l=0;l<o;++l)mi[c.Z](g,m,b,h,f,d,r),g=f,m=d,d+=r,h+=r;else for(l=0;l<o;++l)n(f,d,b,h,r),g=f,m=d,d+=r,h+=r;t.rc=g,t.Vc=m}else{if(e(null!=c.mc),r=i+o,e(null!=(l=c.mc)),e(r<=l.i),l.C>=r)r=1;else if(c.ic||mr(),c.ic){c=l.V,g=l.Ba,m=l.c;var y=l.i,w=(b=1,h=l.$/m,f=l.$%m,d=l.m,p=l.s,l.$),x=m*y,S=m*r,N=p.wc,k=w<S?wt(p,f,h):null;e(w<=x),e(r<=y),e(At(p));e:for(;;){for(;!d.h&&w<S;){if(f&N||(k=wt(p,f,h)),e(null!=k),L(d),256>(y=bt(k.G[0],k.H[0],d)))c[g+w]=y,++w,++f>=m&&(f=0,++h<=r&&!(h%16)&&Lt(l,h));else{if(!(280>y)){b=0;break e}y=mt(y-256,d);var _,P=bt(k.G[4],k.H[4],d);if(L(d),!(w>=(P=vt(m,P=mt(P,d)))&&x-w>=y)){b=0;break e}for(_=0;_<y;++_)c[g+w+_]=c[g+w+_-P];for(w+=y,f+=y;f>=m;)f-=m,++h<=r&&!(h%16)&&Lt(l,h);w<S&&f&N&&(k=wt(p,f,h))}e(d.h==A(d))}Lt(l,h>r?r:h);break e}!b||d.h&&w<x?(b=0,l.a=d.h?5:3):l.$=w,r=b}else r=kt(l,l.V,l.Ba,l.c,l.i,r,Mt);if(!r){o=0;break t}}i+o>=u&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+i*s}function fr(t,e,r,n,i,a){for(;0<i--;){var o,s=t,u=e+(r?1:0),l=t,c=e+(r?0:3);for(o=0;o<n;++o){var h=l[c+4*o];255!=h&&(h*=32897,s[u+4*o+0]=s[u+4*o+0]*h>>23,s[u+4*o+1]=s[u+4*o+1]*h>>23,s[u+4*o+2]=s[u+4*o+2]*h>>23)}e+=a}}function dr(t,e,r,n,i){for(;0<n--;){var a;for(a=0;a<r;++a){var o=t[e+2*a+0],s=15&(l=t[e+2*a+1]),u=4369*s,l=(240&l|l>>4)*u>>16;t[e+2*a+0]=(240&o|o>>4)*u>>16&240|(15&o|o<<4)*u>>16>>4&15,t[e+2*a+1]=240&l|s}e+=i}}function pr(t,e,r,n,i,a,o,s){var u,l,c=255;for(l=0;l<i;++l){for(u=0;u<n;++u){var h=t[e+u];a[o+4*u]=h,c&=h}e+=r,o+=s}return 255!=c}function gr(t,e,r,n,i){var a;for(a=0;a<i;++a)r[n+a]=t[e+a]>>8}function mr(){An=fr,Nn=dr,Ln=pr,kn=gr}function vr(r,n,i){t[r]=function(t,r,a,o,s,u,l,c,h,f,d,p,g,m,v,b,y){var w,x=y-1>>1,S=s[u+0]|l[c+0]<<16,A=h[f+0]|d[p+0]<<16;e(null!=t);var N=3*S+A+131074>>2;for(n(t[r+0],255&N,N>>16,g,m),null!=a&&(N=3*A+S+131074>>2,n(a[o+0],255&N,N>>16,v,b)),w=1;w<=x;++w){var L=s[u+w]|l[c+w]<<16,k=h[f+w]|d[p+w]<<16,_=S+L+A+k+524296,P=_+2*(L+A)>>3;N=P+S>>1,S=(_=_+2*(S+k)>>3)+L>>1,n(t[r+2*w-1],255&N,N>>16,g,m+(2*w-1)*i),n(t[r+2*w-0],255&S,S>>16,g,m+(2*w-0)*i),null!=a&&(N=_+A>>1,S=P+k>>1,n(a[o+2*w-1],255&N,N>>16,v,b+(2*w-1)*i),n(a[o+2*w+0],255&S,S>>16,v,b+(2*w+0)*i)),S=L,A=k}1&y||(N=3*S+A+131074>>2,n(t[r+y-1],255&N,N>>16,g,m+(y-1)*i),null!=a&&(N=3*A+S+131074>>2,n(a[o+y-1],255&N,N>>16,v,b+(y-1)*i)))}}function br(){vi[En]=bi,vi[Bn]=wi,vi[qn]=yi,vi[Rn]=xi,vi[Dn]=Si,vi[Un]=Ai,vi[zn]=Ni,vi[Hn]=wi,vi[Wn]=xi,vi[Vn]=Si,vi[Gn]=Ai}function yr(t){return t&~Ci?0>t?0:255:t>>Fi}function wr(t,e){return yr((19077*t>>8)+(26149*e>>8)-14234)}function xr(t,e,r){return yr((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function Sr(t,e){return yr((19077*t>>8)+(33050*e>>8)-17685)}function Ar(t,e,r,n,i){n[i+0]=wr(t,r),n[i+1]=xr(t,e,r),n[i+2]=Sr(t,e)}function Nr(t,e,r,n,i){n[i+0]=Sr(t,e),n[i+1]=xr(t,e,r),n[i+2]=wr(t,r)}function Lr(t,e,r,n,i){var a=xr(t,e,r);e=a<<3&224|Sr(t,e)>>3,n[i+0]=248&wr(t,r)|a>>5,n[i+1]=e}function kr(t,e,r,n,i){var a=240&Sr(t,e)|15;n[i+0]=240&wr(t,r)|xr(t,e,r)>>4,n[i+1]=a}function _r(t,e,r,n,i){n[i+0]=255,Ar(t,e,r,n,i+1)}function Pr(t,e,r,n,i){Nr(t,e,r,n,i),n[i+3]=255}function Fr(t,e,r,n,i){Ar(t,e,r,n,i),n[i+3]=255}function Vt(t,e){return 0>t?0:t>e?e:t}function Cr(e,r,n){t[e]=function(t,e,i,a,o,s,u,l,c){for(var h=l+(-2&c)*n;l!=h;)r(t[e+0],i[a+0],o[s+0],u,l),r(t[e+1],i[a+0],o[s+0],u,l+n),e+=2,++a,++s,l+=2*n;1&c&&r(t[e+0],i[a+0],o[s+0],u,l)}}function Mr(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function Ir(t,e,r,n,i){switch(t>>>30){case 3:on(e,r,n,i,0);break;case 2:sn(e,r,n,i);break;case 1:ln(e,r,n,i)}}function jr(t,e){var r,a,o=e.M,s=e.Nb,u=t.oc,l=t.pc+40,c=t.oc,h=t.pc+584,f=t.oc,d=t.pc+600;for(r=0;16>r;++r)u[l+32*r-1]=129;for(r=0;8>r;++r)c[h+32*r-1]=129,f[d+32*r-1]=129;for(0<o?u[l-1-32]=c[h-1-32]=f[d-1-32]=129:(i(u,l-32-1,127,21),i(c,h-32-1,127,9),i(f,d-32-1,127,9)),a=0;a<t.za;++a){var p=e.ya[e.aa+a];if(0<a){for(r=-1;16>r;++r)n(u,l+32*r-4,u,l+32*r+12,4);for(r=-1;8>r;++r)n(c,h+32*r-4,c,h+32*r+4,4),n(f,d+32*r-4,f,d+32*r+4,4)}var g=t.Gd,m=t.Hd+a,v=p.ad,b=p.Hc;if(0<o&&(n(u,l-32,g[m].y,0,16),n(c,h-32,g[m].f,0,8),n(f,d-32,g[m].ea,0,8)),p.Za){var y=u,w=l-32+16;for(0<o&&(a>=t.za-1?i(y,w,g[m].y[15],4):n(y,w,g[m+1].y,0,4)),r=0;4>r;r++)y[w+128+r]=y[w+256+r]=y[w+384+r]=y[w+0+r];for(r=0;16>r;++r,b<<=2)y=u,w=l+qi[r],fi[p.Ob[r]](y,w),Ir(b,v,16*+r,y,w)}else if(y=Mr(a,o,p.Ob[0]),hi[y](u,l),0!=b)for(r=0;16>r;++r,b<<=2)Ir(b,v,16*+r,u,l+qi[r]);for(r=p.Gc,y=Mr(a,o,p.Dd),di[y](c,h),di[y](f,d),b=v,y=c,w=h,255&(p=0|r)&&(170&p?un(b,256,y,w):cn(b,256,y,w)),p=f,b=d,255&(r>>=8)&&(170&r?un(v,320,p,b):cn(v,320,p,b)),o<t.Ub-1&&(n(g[m].y,0,u,l+480,16),n(g[m].f,0,c,h+224,8),n(g[m].ea,0,f,d+224,8)),r=8*s*t.B,g=t.sa,m=t.ta+16*a+16*s*t.R,v=t.qa,p=t.ra+8*a+r,b=t.Ha,y=t.Ia+8*a+r,r=0;16>r;++r)n(g,m+r*t.R,u,l+32*r,16);for(r=0;8>r;++r)n(v,p+r*t.B,c,h+32*r,8),n(b,y+r*t.B,f,d+32*r,8)}}function Or(t,n,i,a,o,s,u,l,c){var h=[0],f=[0],d=0,p=null!=c?c.kd:0,g=null!=c?c:new nr;if(null==t||12>i)return 7;g.data=t,g.w=n,g.ha=i,n=[n],i=[i],g.gb=[g.gb];t:{var m=n,b=i,y=g.gb;if(e(null!=t),e(null!=b),e(null!=y),y[0]=0,12<=b[0]&&!r(t,m[0],"RIFF")){if(r(t,m[0]+8,"WEBP")){y=3;break t}var w=I(t,m[0]+4);if(12>w||4294967286<w){y=3;break t}if(p&&w>b[0]-8){y=7;break t}y[0]=w,m[0]+=12,b[0]-=12}y=0}if(0!=y)return y;for(w=0<g.gb[0],i=i[0];;){t:{var S=t;b=n,y=i;var A=h,N=f,L=m=[0];if((P=d=[d])[0]=0,8>y[0])y=7;else{if(!r(S,b[0],"VP8X")){if(10!=I(S,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var k=I(S,b[0]+8),_=1+M(S,b[0]+12);if(2147483648<=_*(S=1+M(S,b[0]+15))){y=3;break t}null!=L&&(L[0]=k),null!=A&&(A[0]=_),null!=N&&(N[0]=S),b[0]+=18,y[0]-=18,P[0]=1}y=0}}if(d=d[0],m=m[0],0!=y)return y;if(b=!!(2&m),!w&&d)return 3;if(null!=s&&(s[0]=!!(16&m)),null!=u&&(u[0]=b),null!=l&&(l[0]=0),u=h[0],m=f[0],d&&b&&null==c){y=0;break}if(4>i){y=7;break}if(w&&d||!w&&!d&&!r(t,n[0],"ALPH")){i=[i],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{k=t,y=n,w=i;var P=g.gb;A=g.na,N=g.P,L=g.Sa,_=22,e(null!=k),e(null!=w),S=y[0];var F=w[0];for(e(null!=A),e(null!=L),A[0]=null,N[0]=null,L[0]=0;;){if(y[0]=S,w[0]=F,8>F){y=7;break t}var C=I(k,S+4);if(4294967286<C){y=3;break t}var j=8+C+1&-2;if(_+=j,0<P&&_>P){y=3;break t}if(!r(k,S,"VP8 ")||!r(k,S,"VP8L")){y=0;break t}if(F[0]<j){y=7;break t}r(k,S,"ALPH")||(A[0]=k,N[0]=S+8,L[0]=C),S+=j,F-=j}}if(i=i[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],0!=y)break}i=[i],g.Ja=[g.Ja],g.xa=[g.xa];t:if(P=t,y=n,w=i,A=g.gb[0],N=g.Ja,L=g.xa,k=y[0],S=!r(P,k,"VP8 "),_=!r(P,k,"VP8L"),e(null!=P),e(null!=w),e(null!=N),e(null!=L),8>w[0])y=7;else{if(S||_){if(P=I(P,k+4),12<=A&&P>A-12){y=3;break t}if(p&&P>w[0]-8){y=7;break t}N[0]=P,y[0]+=8,w[0]-=8,L[0]=_}else L[0]=5<=w[0]&&47==P[k+0]&&!(P[k+4]>>5),N[0]=w[0];y=0}if(i=i[0],g.Ja=g.Ja[0],g.xa=g.xa[0],n=n[0],0!=y)break;if(4294967286<g.Ja)return 3;if(null==l||b||(l[0]=g.xa?2:1),u=[u],m=[m],g.xa){if(5>i){y=7;break}l=u,p=m,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],P=[0],A=[0],v(N=new x,t,n,i),gt(N,w,P,A)?(null!=l&&(l[0]=w[0]),null!=p&&(p[0]=P[0]),null!=b&&(b[0]=A[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}l=m,null==t||10>i||!Jt(t,n+3,i-3)?t=0:(p=t[n+0]|t[n+1]<<8|t[n+2]<<16,b=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=g.Ja||!b||!t?t=0:(u&&(u[0]=b),l&&(l[0]=t),t=1))}if(!t)return 3;if(u=u[0],m=m[0],d&&(h[0]!=u||f[0]!=m))return 3;null!=c&&(c[0]=g,c.offset=n-c.w,e(4294967286>n-c.w),e(c.offset==c.ha-i));break}return 0==y||7==y&&d&&null==c?(null!=s&&(s[0]|=null!=g.na&&0<g.na.length),null!=a&&(a[0]=u),null!=o&&(o[0]=m),0):y}function Tr(t,e,r){var n=e.width,i=e.height,a=0,o=0,s=n,u=i;if(e.Da=null!=t&&0<t.Da,e.Da&&(s=t.cd,u=t.bd,a=t.v,o=t.j,11>r||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=u||a+s>n||o+u>i))return 0;if(e.v=a,e.j=o,e.va=a+s,e.o=o+u,e.U=s,e.T=u,e.da=null!=t&&0<t.da,e.da){if(!E(s,u,r=[t.ib],a=[t.hb]))return 0;e.ib=r[0],e.hb=a[0]}return e.ob=null!=t&&t.ob,e.Kb=null==t||!t.Sd,e.da&&(e.ob=e.ib<3*n/4&&e.hb<3*i/4,e.Kb=0),1}function Er(t){if(null==t)return 2;if(11>t.S){var e=t.f.RGBA;e.fb+=(t.height-1)*e.A,e.A=-e.A}else e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb);return 0}function Br(t,e,r,n){if(null==n||0>=t||0>=e)return 2;if(null!=r){if(r.Da){var i=r.cd,o=r.bd,s=-2&r.v,u=-2&r.j;if(0>s||0>u||0>=i||0>=o||s+i>t||u+o>e)return 2;t=i,e=o}if(r.da){if(!E(t,e,i=[r.ib],o=[r.hb]))return 2;t=i[0],e=o[0]}}n.width=t,n.height=e;t:{var l=n.width,c=n.height;if(t=n.S,0>=l||0>=c||!(t>=En&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=o=i=e=0;var h=(u=l*zi[t])*c;if(11>t||(o=(c+1)/2*(e=(l+1)/2),12==t&&(s=(i=l)*c)),null==(c=a(h+2*o+s))){t=1;break t}n.sd=c,11>t?((l=n.f.RGBA).eb=c,l.fb=0,l.A=u,l.size=h):((l=n.f.kb).y=c,l.O=0,l.fa=u,l.Fd=h,l.f=c,l.N=0+h,l.Ab=e,l.Cd=o,l.ea=c,l.W=0+h+o,l.Db=e,l.Ed=o,12==t&&(l.F=c,l.J=0+h+2*o),l.Tc=s,l.lb=i)}if(e=1,i=n.S,o=n.width,s=n.height,i>=En&&13>i)if(11>i)t=n.f.RGBA,e&=(u=Math.abs(t.A))*(s-1)+o<=t.size,e&=u>=o*zi[i],e&=null!=t.eb;else{t=n.f.kb,u=(o+1)/2,h=(s+1)/2,l=Math.abs(t.fa),c=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(s-1)+o;e&=l*(s-1)+o<=t.Fd,e&=c*(h-1)+u<=t.Cd,e=(e&=f*(h-1)+u<=t.Ed)&l>=o&c>=u&f>=u,e&=null!=t.y,e&=null!=t.f,e&=null!=t.ea,12==i&&(e&=d>=o,e&=p<=t.Tc,e&=null!=t.F)}else e=0;t=e?0:2}}return 0!=t||null!=r&&r.fd&&(t=Er(n)),t}var qr=64,Rr=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Dr=24,Ur=32,zr=8,Hr=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];R("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,e,r){return e[r+0]},t.Predictor3=function(t,e,r){return e[r+1]},t.Predictor4=function(t,e,r){return e[r-1]},t.Predictor5=function(t,e,r){return U(U(t,e[r+1]),e[r+0])},t.Predictor6=function(t,e,r){return U(t,e[r-1])},t.Predictor7=function(t,e,r){return U(t,e[r+0])},t.Predictor8=function(t,e,r){return U(e[r-1],e[r+0])},t.Predictor9=function(t,e,r){return U(e[r+0],e[r+1])},t.Predictor10=function(t,e,r){return U(U(t,e[r-1]),U(e[r+0],e[r+1]))},t.Predictor11=function(t,e,r){var n=e[r+0];return 0>=W(n>>24&255,t>>24&255,(e=e[r-1])>>24&255)+W(n>>16&255,t>>16&255,e>>16&255)+W(n>>8&255,t>>8&255,e>>8&255)+W(255&n,255&t,255&e)?n:t},t.Predictor12=function(t,e,r){var n=e[r+0];return(z((t>>24&255)+(n>>24&255)-((e=e[r-1])>>24&255))<<24|z((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|z((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|z((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,r){var n=e[r-1];return(H((t=U(t,e[r+0]))>>24&255,n>>24&255)<<24|H(t>>16&255,n>>16&255)<<16|H(t>>8&255,n>>8&255)<<8|H(255&t,255&n))>>>0};var Wr=t.PredictorAdd0;t.PredictorAdd1=V,R("Predictor2","PredictorAdd2"),R("Predictor3","PredictorAdd3"),R("Predictor4","PredictorAdd4"),R("Predictor5","PredictorAdd5"),R("Predictor6","PredictorAdd6"),R("Predictor7","PredictorAdd7"),R("Predictor8","PredictorAdd8"),R("Predictor9","PredictorAdd9"),R("Predictor10","PredictorAdd10"),R("Predictor11","PredictorAdd11"),R("Predictor12","PredictorAdd12"),R("Predictor13","PredictorAdd13");var Vr=t.PredictorAdd2;J("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),J("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Gr,Yr=t.ColorIndexInverseTransform,Xr=t.MapARGB,Jr=t.VP8LColorIndexInverseTransformAlpha,$r=t.MapAlpha,Kr=t.VP8LPredictorsAdd=[];Kr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Qr,Zr,tn,en,rn,nn,an,on,sn,un,ln,cn,hn,fn,dn,pn,gn,mn,vn,bn,yn,wn,xn,Sn,An,Nn,Ln,kn,_n=a(511),Pn=a(2041),Fn=a(225),Cn=a(767),Mn=0,In=Pn,jn=Fn,On=Cn,Tn=_n,En=0,Bn=1,qn=2,Rn=3,Dn=4,Un=5,zn=6,Hn=7,Wn=8,Vn=9,Gn=10,Yn=[2,3,7],Xn=[3,3,11],Jn=[280,256,256,256,40],$n=[0,1,1,1,0],Kn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Qn=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Zn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],ti=8,ei=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ri=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ni=null,ii=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],ai=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],oi=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],si=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],ui=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],li=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ci=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],hi=[],fi=[],di=[],pi=1,gi=2,mi=[],vi=[];vr("UpsampleRgbLinePair",Ar,3),vr("UpsampleBgrLinePair",Nr,3),vr("UpsampleRgbaLinePair",Fr,4),vr("UpsampleBgraLinePair",Pr,4),vr("UpsampleArgbLinePair",_r,4),vr("UpsampleRgba4444LinePair",kr,2),vr("UpsampleRgb565LinePair",Lr,2);var bi=t.UpsampleRgbLinePair,yi=t.UpsampleBgrLinePair,wi=t.UpsampleRgbaLinePair,xi=t.UpsampleBgraLinePair,Si=t.UpsampleArgbLinePair,Ai=t.UpsampleRgba4444LinePair,Ni=t.UpsampleRgb565LinePair,Li=16,ki=1<<Li-1,_i=-227,Pi=482,Fi=6,Ci=(256<<Fi)-1,Mi=0,Ii=a(256),ji=a(256),Oi=a(256),Ti=a(256),Ei=a(Pi-_i),Bi=a(Pi-_i);Cr("YuvToRgbRow",Ar,3),Cr("YuvToBgrRow",Nr,3),Cr("YuvToRgbaRow",Fr,4),Cr("YuvToBgraRow",Pr,4),Cr("YuvToArgbRow",_r,4),Cr("YuvToRgba4444Row",kr,2),Cr("YuvToRgb565Row",Lr,2);var qi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ri=[0,2,8],Di=[8,7,6,4,4,2,2,2,1,1,1,1],Ui=1;this.WebPDecodeRGBA=function(t,r,n,i,a){var o=Bn,s=new rr,u=new ot;s.ba=u,u.S=o,u.width=[u.width],u.height=[u.height];var l=u.width,c=u.height,h=new st;if(null==h||null==t)var f=2;else e(null!=h),f=Or(t,r,n,h.width,h.height,h.Pd,h.Qd,h.format,null);if(0!=f?l=0:(null!=l&&(l[0]=h.width[0]),null!=c&&(c[0]=h.height[0]),l=1),l){u.width=u.width[0],u.height=u.height[0],null!=i&&(i[0]=u.width),null!=a&&(a[0]=u.height);t:{if(i=new Gt,(a=new nr).data=t,a.w=r,a.ha=n,a.kd=1,r=[0],e(null!=a),(0==(t=Or(a.data,a.w,a.ha,null,null,null,r,null,a))||7==t)&&r[0]&&(t=4),0==(r=t)){if(e(null!=s),i.data=a.data,i.w=a.w+a.offset,i.ha=a.ha-a.offset,i.put=dt,i.ac=ft,i.bc=pt,i.ma=s,a.xa){if(null==(t=Pt())){s=1;break t}if(function(t,r){var n=[0],i=[0],a=[0];e:for(;;){if(null==t)return 0;if(null==r)return t.a=2,0;if(t.l=r,t.a=0,v(t.m,r.data,r.w,r.ha),!gt(t.m,n,i,a)){t.a=3;break e}if(t.xb=gi,r.width=n[0],r.height=i[0],!Ft(n[0],i[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,i)){if(i=0==(r=Br(i.width,i.height,s.Oa,s.ba))){e:{i=t;r:for(;;){if(null==i){i=0;break e}if(e(null!=i.s.yc),e(null!=i.s.Ya),e(0<i.s.Wb),e(null!=(n=i.l)),e(null!=(a=n.ma)),0!=i.xb){if(i.ca=a.ba,i.tb=a.tb,e(null!=i.ca),!Tr(a.Oa,n,Rn)){i.a=2;break r}if(!Ct(i,n.width))break r;if(n.da)break r;if((n.da||nt(i.ca.S))&&mr(),11>i.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=i.ca.f.kb.F&&mr()),i.Pb&&0<i.s.ua&&null==i.s.vb.X&&!j(i.s.vb,i.s.Wa.Xa)){i.a=1;break r}i.xb=0}if(!kt(i,i.V,i.Ba,i.c,i.i,n.o,St))break r;a.Dc=i.Ma,i=1;break e}e(0!=i.a),i=0}i=!i}i&&(r=t.a)}else r=t.a}else{if(null==(t=new Yt)){s=1;break t}if(t.Fa=a.na,t.P=a.P,t.qc=a.Sa,$t(t,i)){if(0==(r=Br(i.width,i.height,s.Oa,s.ba))){if(t.Aa=0,n=s.Oa,e(null!=(a=t)),null!=n){if(0<(l=0>(l=n.Md)?0:100<l?255:255*l/100)){for(c=h=0;4>c;++c)12>(f=a.pb[c]).lc&&(f.ia=l*Di[0>f.lc?0:f.lc]>>3),h|=f.ia;h&&(alert("todo:VP8InitRandom"),a.ia=1)}a.Ga=n.Id,100<a.Ga?a.Ga=100:0>a.Ga&&(a.Ga=0)}Zt(t,i)||(r=t.a)}}else r=t.a}0==r&&null!=s.Oa&&s.Oa.fd&&(r=Er(s.ba))}s=r}o=0!=s?null:11>o?u.f.RGBA.eb:u.f.kb.y}else o=null;return o};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(t,e){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[e++]);return r}function c(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16)>>>0}function h(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new u;var f=[0],d=[0],p=[],g=new u,m=t,v=function(t,e){var r={},n=0,i=!1,a=0,o=0;if(r.frames=[],!function(t,e){for(var r=0;r<4;r++)if(t[e+r]!="RIFF".charCodeAt(r))return!0;return!1}(t,e)){var s,u;for(h(t,e+=4),e+=8;e<t.length;){var f=l(t,e),d=h(t,e+=4);e+=4;var p=d+(1&d);switch(f){case"VP8 ":case"VP8L":void 0===r.frames[n]&&(r.frames[n]={}),(v=r.frames[n]).src_off=i?o:e-8,v.src_size=a+d+8,n++,i&&(i=!1,a=0,o=0);break;case"VP8X":(v=r.header={}).feature_flags=t[e];var g=e+4;v.canvas_width=1+c(t,g),g+=3,v.canvas_height=1+c(t,g),g+=3;break;case"ALPH":i=!0,a=p+8,o=e-8;break;case"ANIM":(v=r.header).bgcolor=h(t,e),g=e+4,v.loop_count=(s=t)[(u=g)+0]|s[u+1]<<8,g+=2;break;case"ANMF":var m,v;(v=r.frames[n]={}).offset_x=2*c(t,e),e+=3,v.offset_y=2*c(t,e),e+=3,v.width=1+c(t,e),e+=3,v.height=1+c(t,e),e+=3,v.duration=c(t,e),e+=3,m=t[e++],v.dispose=1&m,v.blend=m>>1&1}"ANMF"!=f&&(e+=p)}return r}}(m,0);v.response=m,v.rgbaoutput=!0,v.dataurl=!1;var b=v.header?v.header:null,y=v.frames?v.frames:null;if(b){b.loop_counter=b.loop_count,f=[b.canvas_height],d=[b.canvas_width];for(var w=0;w<y.length&&0!=y[w].blend;w++);}var x=y[0],S=g.WebPDecodeRGBA(m,x.src_off,x.src_size,d,f);x.rgba=S,x.imgwidth=d[0],x.imgheight=f[0];for(var A=0;A<d[0]*f[0]*4;A++)p[A]=S[A];return this.width=d,this.height=f,this.data=p,this}!function(t){var e=function(e,n,u,l){var c=4,h=a;switch(l){case t.image_compression.FAST:c=1,h=i;break;case t.image_compression.MEDIUM:c=6,h=o;break;case t.image_compression.SLOW:c=9,h=s}var f=G(e=r(e,n,u,h),{level:c});return t.__addimage__.arrayBufferToBinaryString(f)},r=function(t,e,r,n){for(var i,a,o,s=t.length/e,u=new Uint8Array(t.length+s),h=l(),f=0;f<s;f+=1){if(o=f*e,i=t.subarray(o,o+e),n)u.set(n(i,r,a),o+f);else{for(var d,p=h.length,g=[];d<p;d+=1)g[d]=h[d](i,r,a);var m=c(g.concat());u.set(g[m],o+f)}a=i}return u},n=function(t){var e=Array.apply([],t);return e.unshift(0),e},i=function(t,e){var r,n=[],i=t.length;n[0]=1;for(var a=0;a<i;a+=1)r=t[a-e]||0,n[a+1]=t[a]-r+256&255;return n},a=function(t,e,r){var n,i=[],a=t.length;i[0]=2;for(var o=0;o<a;o+=1)n=r&&r[o]||0,i[o+1]=t[o]-n+256&255;return i},o=function(t,e,r){var n,i,a=[],o=t.length;a[0]=3;for(var s=0;s<o;s+=1)n=t[s-e]||0,i=r&&r[s]||0,a[s+1]=t[s]+256-(n+i>>>1)&255;return a},s=function(t,e,r){var n,i,a,o,s=[],l=t.length;s[0]=4;for(var c=0;c<l;c+=1)n=t[c-e]||0,i=r&&r[c]||0,a=r&&r[c-e]||0,o=u(n,i,a),s[c+1]=t[c]-o+256&255;return s},u=function(t,e,r){if(t===e&&e===r)return t;var n=Math.abs(e-r),i=Math.abs(t-r),a=Math.abs(t+e-r-r);return n<=i&&n<=a?t:i<=a?e:r},l=function(){return[n,i,a,o,s]},c=function(t){var e=t.map((function(t){return t.reduce((function(t,e){return t+Math.abs(e)}),0)}));return e.indexOf(Math.min.apply(null,e))};t.processPNG=function(r,n,i,a){var o,s,u,l,c,h,f,d,p,g,m,v,b,y,w,x=this.decode.FLATE_DECODE,S="";if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){if(r=(u=new De(r)).imgData,s=u.bits,o=u.colorSpace,c=u.colors,-1!==[4,6].indexOf(u.colorType)){if(8===u.bits){p=(d=32==u.pixelBitlength?new Uint32Array(u.decodePixels().buffer):16==u.pixelBitlength?new Uint16Array(u.decodePixels().buffer):new Uint8Array(u.decodePixels().buffer)).length,m=new Uint8Array(p*u.colors),g=new Uint8Array(p);var A,N=u.pixelBitlength-u.bits;for(y=0,w=0;y<p;y++){for(b=d[y],A=0;A<N;)m[w++]=b>>>A&255,A+=u.bits;g[y]=b>>>A&255}}if(16===u.bits){p=(d=new Uint32Array(u.decodePixels().buffer)).length,m=new Uint8Array(p*(32/u.pixelBitlength)*u.colors),g=new Uint8Array(p*(32/u.pixelBitlength)),v=u.colors>1,y=0,w=0;for(var L=0;y<p;)b=d[y++],m[w++]=b>>>0&255,v&&(m[w++]=b>>>16&255,b=d[y++],m[w++]=b>>>0&255),g[L++]=b>>>16&255;s=8}a!==t.image_compression.NONE?(r=e(m,u.width*u.colors,u.colors,a),f=e(g,u.width,1,a)):(r=m,f=g,x=void 0)}if(3===u.colorType&&(o=this.color_spaces.INDEXED,h=u.palette,u.transparency.indexed)){var k=u.transparency.indexed,_=0;for(y=0,p=k.length;y<p;++y)_+=k[y];if((_/=255)==p-1&&-1!==k.indexOf(0))l=[k.indexOf(0)];else if(_!==p){for(d=u.decodePixels(),g=new Uint8Array(d.length),y=0,p=d.length;y<p;y++)g[y]=k[d[y]];f=e(g,u.width,1)}}var P=function(e){var r;switch(e){case t.image_compression.FAST:r=11;break;case t.image_compression.MEDIUM:r=13;break;case t.image_compression.SLOW:r=14;break;default:r=12}return r}(a);return x===this.decode.FLATE_DECODE&&(S="/Predictor "+P+" "),S+="/Colors "+c+" /BitsPerComponent "+s+" /Columns "+u.width,(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:i,data:r,index:n,filter:x,decodeParameters:S,transparency:l,palette:h,sMask:f,predictor:P,width:u.width,height:u.height,bitsPerComponent:s,colorSpace:o}}}}(Pt.API),function(t){t.processGIF89A=function(e,r,n,i){var a=new Ue(e),o=a.width,s=a.height,u=[];a.decodeAndBlitFrameRGBA(0,u);var l={data:u,width:o,height:s},c=new He(100).encode(l,100);return t.processJPEG.call(this,c,r,n,i)},t.processGIF87A=t.processGIF89A}(Pt.API),We.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:r,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},We.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(t){K.log("bit decode error:"+t)}},We.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[a>>7-s&1];this.data[o+4*s]=u.blue,this.data[o+4*s+1]=u.green,this.data[o+4*s+2]=u.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},We.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<t;i++){var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*i*4,s=a>>4,u=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[u],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},We.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+4*n;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}0!==t&&(this.pos+=4-t)}},We.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,u=(a>>10&e)/e*255|0,l=a>>15?255:0,c=n*this.width*4+4*i;this.data[c]=u,this.data[c+1]=s,this.data[c+2]=o,this.data[c+3]=l}this.pos+=t}},We.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,u=(o>>5&r)/r*255|0,l=(o>>11)/e*255|0,c=i*this.width*4+4*a;this.data[c]=l,this.data[c+1]=u,this.data[c+2]=s,this.data[c+3]=255}this.pos+=t}},We.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*r;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},We.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=n,this.data[s+3]=o}},We.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,r,n,i){var a=new We(e,!1),o=a.width,s=a.height,u={data:a.getData(),width:o,height:s},l=new He(100).encode(u,100);return t.processJPEG.call(this,l,r,n,i)}}(Pt.API),Ve.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,r,n,i){var a=new Ve(e,!1),o=a.width,s=a.height,u={data:a.getData(),width:o,height:s},l=new He(100).encode(u,100);return t.processJPEG.call(this,l,r,n,i)}}(Pt.API),Pt.API.processRGBA=function(t,e,r){for(var n=t.data,i=n.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,u=0,l=0;l<i;l+=4){var c=n[l],h=n[l+1],f=n[l+2],d=n[l+3];a[s++]=c,a[s++]=h,a[s++]=f,o[u++]=d}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},Pt.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")})),this.internal.languageSettings.isSubscribed=!0)),this},Te=Pt.API,Ee=Te.getCharWidthsArray=function(e,r){var n,i,a=(r=r||{}).font||this.internal.getFont(),o=r.fontSize||this.internal.getFontSize(),s=r.charSpace||this.internal.getCharSpace(),u=r.widths?r.widths:a.metadata.Unicode.widths,l=u.fof?u.fof:1,c=r.kerning?r.kerning:a.metadata.Unicode.kerning,h=c.fof?c.fof:1,f=!1!==r.doKerning,d=0,p=e.length,g=0,m=u[0]||l,v=[];for(n=0;n<p;n++)i=e.charCodeAt(n),"function"==typeof a.metadata.widthOfString?v.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(i))+s*(1e3/o)||0)/1e3):(d=f&&"object"===(0,t.A)(c[i])&&!isNaN(parseInt(c[i][g],10))?c[i][g]/h:0,v.push((u[i]||m)/l+d)),g=i;return v},Be=Te.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return Te.processArabic&&(t=Te.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:Ee.apply(this,arguments).reduce((function(t,e){return t+e}),0)},qe=function(t,e,r,n){for(var i=[],a=0,o=t.length,s=0;a!==o&&s+e[a]<r;)s+=e[a],a++;i.push(t.slice(0,a));var u=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(t.slice(u,a)),s=0,u=a),s+=e[a],a++;return u!==a&&i.push(t.slice(u,a)),i},Re=function(t,e,r){r||(r={});var n,i,a,o,s,u,l,c=[],h=[c],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=Ee.apply(this,[" ",r])[0];if(u=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(u).join(" "),b=[];g.map((function(t){(t=t.split(/\s*\n/)).length>1?b=b.concat(t.map((function(t,e){return(e&&t.length?"\n":"")+t}))):b.push(t[0])})),g=b,u=Be.apply(this,[v,r])}for(a=0,o=g.length;a<o;a++){var y=0;if(n=g[a],u&&"\n"==n[0]&&(n=n.substr(1),y=1),f+d+(p=(i=Ee.apply(this,[n,r])).reduce((function(t,e){return t+e}),0))>e||y){if(p>e){for(s=qe.apply(this,[n,i,e-(f+d),e]),c.push(s.shift()),c=[s.pop()];s.length;)h.push([s.shift()]);p=i.slice(n.length-(c[0]?c[0].length:0)).reduce((function(t,e){return t+e}),0)}else c=[n];h.push(c),f=p+u,d=m}else c.push(n),f+=d+p,d=m}return l=u?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},h.map(l)},Te.splitTextToSize=function(t,e,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),a=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle);return e.metadata.Unicode?{widths:e.metadata.Unicode.widths||{0:1},kerning:e.metadata.Unicode.kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=r.lineIndent;var s,u,l=[];for(s=0,u=n.length;s<u;s++)l=l.concat(Re.apply(this,[n[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var r="klmnopqrstuvwxyz",n={},i={},a=0;a<16;a++)n[r[a]]="0123456789abcdef"[a],i["0123456789abcdef"[a]]=r[a];var o=function(t){return"0x"+parseInt(t,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var r,n,a,u,l=["{"];for(var c in e){if(r=e[c],isNaN(parseInt(c,10))?n="'"+c+"'":(c=parseInt(c,10),n=(n=o(c).slice(2)).slice(0,-1)+i[n.slice(-1)]),"number"==typeof r)r<0?(a=o(r).slice(3),u="-"):(a=o(r).slice(2),u=""),a=u+a.slice(0,-1)+i[a.slice(-1)];else{if("object"!==(0,t.A)(r))throw new Error("Don't know what to do with value type "+(0,t.A)(r)+".");a=s(r)}l.push(n+a)}return l.push("}"),l.join("")},u=e.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,r,i,a,o={},s=1,u=o,l=[],c="",h="",f=t.length-1,d=1;d<f;d+=1)"'"==(a=t[d])?e?(i=e.join(""),e=void 0):e=[]:e?e.push(a):"{"==a?(l.push([u,i]),u={},i=void 0):"}"==a?((r=l.pop())[0][r[1]]=u,i=void 0,u=r[0]):"-"==a?s=-1:void 0===i?n.hasOwnProperty(a)?(c+=n[a],i=parseInt(c,16)*s,s=1,c=""):c+=a:n.hasOwnProperty(a)?(h+=n[a],u[i]=parseInt(h,16)*s,s=1,i=void 0,h=""):h+=a;return o},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},h={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(t){var e=t.font,r=h.Unicode[e.postScriptName];r&&(e.metadata.Unicode={},e.metadata.Unicode.widths=r.widths,e.metadata.Unicode.kerning=r.kerning);var n=c.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(Pt.API),function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r};t.API.events.push(["addFont",function(r){var n=void 0,i=r.font,a=r.instance;if(!i.isStandardFont){if(void 0===a)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(n=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(r,n){n=/^\x00\x01\x00\x00/.test(n)?e(n):e(et(n)),r.metadata=t.API.TTFFont.open(n),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}(i,n)}}])}(Pt),function(){function t(){return(J.canvg?Promise.resolve(J.canvg):o.e(661).then(o.bind(o,661))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Pt.API.addSvgAsImage=function(e,r,n,i,a,o,s,u){if(isNaN(r)||isNaN(n))throw K.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(a))throw K.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=a;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return t().then((function(t){return t.fromString(c,e,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){f.addImage(l.toDataURL("image/jpeg",1),r,n,i,a,s,u)}))}}(),Pt.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},Pt.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),l=[],c=0,h=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=u.length;for(f=0;f<p;f+=1)n[u[f]].value=n[u[f]].defaultValue,n[u[f]].explicitSet=!1}if("object"===(0,t.A)(e))for(a in e)if(o=e[a],d(u,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(c=0;c<o.length;c+=1)if(i=!0,1===o[c].length&&"number"==typeof o[c][0])l.push(String(o[c]-1));else if(o[c].length>1){for(h=0;h<o[c].length;h+=1)"number"!=typeof o[c][h]&&(i=!1);!0===i&&l.push([o[c][0]-1,o[c][1]-1].join(" "))}n[a].value="["+l.join(" ")+"]"}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(t){var e=function(){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',e=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),r=unescape(encodeURIComponent(t)),n=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),a=unescape(encodeURIComponent("</x:xmpmeta>")),o=r.length+n.length+i.length+e.length+a.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(e+r+n+i+a),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};t.addMetadata=function(t,n){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceuri:n||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",e)),this}}(Pt.API),function(t){var e=t.API,r=e.pdfEscape16=function(t,e){for(var r,n=e.metadata.Unicode.widths,i=["","0","00","000","0000"],a=[""],o=0,s=t.length;o<s;++o){if(r=e.metadata.characterToGlyph(t.charCodeAt(o)),e.metadata.glyIdsUsed.push(r),e.metadata.toUnicode[r]=t.charCodeAt(o),-1==n.indexOf(r)&&(n.push(r),n.push([parseInt(e.metadata.widthOfGlyph(r),10)])),"0"==r)return a.join("");r=r.toString(16),a.push(i[4-r.length],r)}return a.join("")},n=function(t){var e,r,n,i,a,o,s;for(a="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],o=0,s=(r=Object.keys(t).sort((function(t,e){return t-e}))).length;o<s;o++)e=r[o],n.length>=100&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(i=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+i+">"));return n.length&&(a+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),a+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,a=e.newObject,o=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"Identity-H"===r.encoding){for(var s=r.metadata.Unicode.widths,u=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),l="",c=0;c<u.length;c++)l+=String.fromCharCode(u[c]);var h=a();o({data:l,addLength1:!0,objectId:h}),i("endobj");var f=a();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:f}),i("endobj");var d=a();i("<<"),i("/Type /FontDescriptor"),i("/FontName /"+St(r.fontName)),i("/FontFile2 "+h+" 0 R"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/Flags "+r.metadata.flags),i("/StemV "+r.metadata.stemV),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i(">>"),i("endobj");var p=a();i("<<"),i("/Type /Font"),i("/BaseFont /"+St(r.fontName)),i("/FontDescriptor "+d+" 0 R"),i("/W "+t.API.PDFObject.convert(s)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+r.encoding+")"),i(">>"),i(">>"),i("endobj"),r.objectNumber=a(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+f+" 0 R"),i("/BaseFont /"+St(r.fontName)),i("/Encoding /"+r.encoding),i("/DescendantFonts ["+p+" 0 R]"),i(">>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]),e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,a=e.newObject,o=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===r.encoding){for(var s=r.metadata.rawData,u="",l=0;l<s.length;l++)u+=String.fromCharCode(s[l]);var c=a();o({data:u,addLength1:!0,objectId:c}),i("endobj");var h=a();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:h}),i("endobj");var f=a();i("<<"),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i("/StemV "+r.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+c+" 0 R"),i("/Flags 96"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+St(r.fontName)),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i(">>"),i("endobj"),r.objectNumber=a();for(var d=0;d<r.metadata.hmtx.widths.length;d++)r.metadata.hmtx.widths[d]=parseInt(r.metadata.hmtx.widths[d]*(1e3/r.metadata.head.unitsPerEm));i("<</Subtype/TrueType/Type/Font/ToUnicode "+h+" 0 R/BaseFont/"+St(r.fontName)+"/FontDescriptor "+f+" 0 R/Encoding/"+r.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(r.metadata.hmtx.widths)+">>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]);var i=function(t){var e,n=t.text||"",i=t.x,a=t.y,o=t.options||{},s=t.mutex||{},u=s.pdfEscape,l=s.activeFontKey,c=s.fonts,h=l,f="",d=0,p="",g=c[h].encoding;if("Identity-H"!==c[h].encoding)return{text:n,x:i,y:a,options:o,mutex:s};for(p=n,h=l,Array.isArray(n)&&(p=n[0]),d=0;d<p.length;d+=1)c[h].metadata.hasOwnProperty("cmap")&&(e=c[h].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]),e||p[d].charCodeAt(0)<256&&c[h].metadata.hasOwnProperty("Unicode")?f+=p[d]:f+="";var m="";return parseInt(h.slice(1))<14||"WinAnsiEncoding"===g?m=u(f,h).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(m=r(f,c[h])),s.isHex=!0,{text:m,x:i,y:a,options:o,mutex:s}};e.events.push(["postProcessText",function(t){var e=t.text||"",r=[],n={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){var a=0;for(a=0;a<e.length;a+=1)Array.isArray(e[a])&&3===e[a].length?r.push([i(Object.assign({},n,{text:e[a][0]})).text,e[a][1],e[a][2]]):r.push(i(Object.assign({},n,{text:e[a]})).text);t.text=r}else t.text=i(Object.assign({},n,{text:e})).text}])}(Pt),function(t){var e=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,r){return e.call(this),this.internal.vFS[t]=r,this},t.getFileFromVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(Pt.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,o,s,u,l=e,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},d={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,v=0;this.__bidiEngine__={};var b=function(t){var e=t.charCodeAt(),r=e>>8,n=d[r];return void 0!==n?l[256*n+(255&e)]:252===r||253===r?"AL":g.test(r)?"L":8===r?"R":"N"},y=function(t){for(var e,r=0;r<t.length;r++){if("L"===(e=b(t.charAt(r))))return!1;if("R"===e)return!0}return!1},w=function(t,e,o,s){var u,l,c,h,f=e[s];switch(f){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":case"BN":f="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(u=o[s-1])&&"AN"!==u||"EN"!==(l=e[s+1])&&"AN"!==l?f="N":m&&(l="AN"),f=l===u?l:"N";break;case"ES":f="EN"===(u=s>0?o[s-1]:"B")&&s+1<e.length&&"EN"===e[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===o[s-1]){f="EN";break}if(m){f="N";break}for(c=s+1,h=e.length;c<h&&"ET"===e[c];)c++;f=c<h&&"EN"===e[c]?"EN":"N";break;case"NSM":if(i&&!a){for(h=e.length,c=s+1;c<h&&"NSM"===e[c];)c++;if(c<h){var d=t[s],p=d>=1425&&d<=2303||64286===d;if(u=e[c],p&&("R"===u||"AL"===u)){f="R";break}}}f=s<1||"B"===(u=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N"}return f},x=function(t,e,r){var n=t.split("");return r&&S(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},S=function(t,e,i){var a,o,s,u,l,d=-1,p=t.length,g=0,y=[],x=v?h:c,S=[];for(m=!1,r=!1,n=!1,o=0;o<p;o++)S[o]=b(t[o]);for(s=0;s<p;s++){if(l=g,y[s]=w(t,S,y,s),a=240&(g=x[l][f[y[s]]]),g&=15,e[s]=u=x[g][5],a>0)if(16===a){for(o=d;o<s;o++)e[o]=1;d=-1}else d=-1;if(x[g][6])-1===d&&(d=s);else if(d>-1){for(o=d;o<s;o++)e[o]=u;d=-1}"B"===S[s]&&(e[s]=0),i.hiLevel|=u}n&&function(t,e,r){for(var n=0;n<r;n++)if("S"===t[n]){e[n]=v;for(var i=n-1;i>=0&&"WS"===t[i];i--)e[i]=v}}(S,e,p)},A=function(t,e,n,i,a){if(!(a.hiLevel<t)){if(1===t&&1===v&&!r)return e.reverse(),void(n&&n.reverse());for(var o,s,u,l,c=e.length,h=0;h<c;){if(i[h]>=t){for(u=h+1;u<c&&i[u]>=t;)u++;for(l=h,s=u-1;l<s;l++,s--)o=e[l],e[l]=e[s],e[s]=o,n&&(o=n[l],n[l]=n[s],n[s]=o);h=u}h++}}},N=function(t,e,r){var n=t.split(""),i={hiLevel:v};return r||(r=[]),S(n,r,i),function(t,e,r){if(0!==r.hiLevel&&u)for(var n,i=0;i<t.length;i++)1===e[i]&&(n=p.indexOf(t[i]))>=0&&(t[i]=p[n+1])}(n,r,i),A(2,n,e,r,i),A(1,n,e,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r<t.length;r++)e[r]=r;void 0===a&&(a=y(t)),void 0===s&&(s=y(t))}(t,e),i||!o||s)if(i&&o&&a^s)v=a?1:0,t=x(t,e,r);else if(!i&&o&&s)v=a?1:0,t=N(t,e,r),t=x(t,e);else if(!i||a||o||s){if(i&&!o&&a^s)t=x(t,e),a?(v=0,t=N(t,e,r)):(v=1,t=N(t,e,r),t=x(t,e));else if(i&&a&&!o&&s)v=1,t=N(t,e,r),t=x(t,e);else if(!i&&!o&&a^s){var n=u;a?(v=1,t=N(t,e,r),v=0,u=!1,t=N(t,e,r),u=n):(v=0,t=N(t,e,r),t=x(t,e),v=1,u=!1,t=N(t,e,r),u=n,t=x(t,e))}}else v=0,t=N(t,e,r);else v=a?1:0,t=N(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,a=t.isInputRtl,s=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text,n=(t.x,t.y,t.options||{}),i=(t.mutex,n.lang,[]);if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,r.setOptions(n),"[object Array]"===Object.prototype.toString.call(e)){var a=0;for(i=[],a=0;a<e.length;a+=1)"[object Array]"===Object.prototype.toString.call(e[a])?i.push([r.doBidiReorder(e[a][0]),e[a][1],e[a][2]]):i.push([r.doBidiReorder(e[a])]);t.text=i}else t.text=r.doBidiReorder(e);r.setOptions({isInputVisual:!0})}])}(Pt),Pt.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new Ye(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new fr(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new Xe(this.contents),this.head=new Ke(this),this.name=new ir(this),this.cmap=new Ze(this),this.toUnicode={},this.hhea=new tr(this),this.maxp=new ar(this),this.hmtx=new or(this),this.post=new rr(this),this.os2=new er(this),this.loca=new hr(this),this.glyf=new ur(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,e,r,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var e,r,n,i;for(i=[],e=0,r=(n=this.bbox).length;e<r;e++)t=n[e],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),!!(32768&(e=n>>16))&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,r){var n,i,a,o;for(a=0,i=0,o=(t=""+t).length;0<=o?i<o:i>o;i=0<=o?++i:--i)n=t.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return a*(e/1e3)},t.prototype.lineHeight=function(t,e){var r;return null==e&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},t}();var Ge,Ye=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(t){var e,r,n;for(n=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,r,n,i,a,o,s;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*i+65536*a+256*o+s},t.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(this.writeByte(e));return i},t}(),Xe=function(){var t;function e(t){var e,r,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},r=0,n=this.tableCount;0<=n?r<n:r>n;r=0<=n?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var r,n,i,a,o,s,u,l,c,h,f,d,p;for(p in f=Object.keys(e).length,s=Math.log(2),c=16*Math.floor(Math.log(f)/s),a=Math.floor(c/s),l=16*f-c,(n=new Ye).writeInt(this.scalarType),n.writeShort(f),n.writeShort(c),n.writeShort(a),n.writeShort(l),i=16*f,u=n.pos+i,o=null,d=[],e)for(h=e[p],n.writeString(p),n.writeInt(t(h)),n.writeInt(u),n.writeInt(h.length),d=d.concat(h),"head"===p&&(o=u),u+=h.length;u%4;)d.push(0),u++;return n.write(d),r=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(r),n.data},t=function(t){var e,r,n,i;for(t=sr.call(t);t.length%4;)t.push(0);for(n=new Ye(t),r=0,e=0,i=t.length;e<i;e=e+=4)r+=n.readUInt32();return 4294967295&r},e}(),Je={}.hasOwnProperty,$e=function(t,e){for(var r in e)Je.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};Ge=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var Ke=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="head",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},t.prototype.encode=function(t){var e;return(e=new Ye).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},t}(),Qe=function(){function t(t,e){var r,n,i,a,o,s,u,l,c,h,f,d,p,g,m,v,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=t.readByte();break;case 4:for(f=t.readUInt16(),h=f/2,t.pos+=6,i=function(){var e,r;for(r=[],s=e=0;0<=h?e<h:e>h;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,p=function(){var e,r;for(r=[],s=e=0;0<=h?e<h:e>h;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=h?e<h:e>h;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),l=function(){var e,r;for(r=[],s=e=0;0<=h?e<h:e>h;s=0<=h?++e:--e)r.push(t.readUInt16());return r}(),n=(this.length-t.pos+this.offset)/2,o=function(){var e,r;for(r=[],s=e=0;0<=n?e<n:e>n;s=0<=n?++e:--e)r.push(t.readUInt16());return r}(),s=m=0,b=i.length;m<b;s=++m)for(g=i[s],r=v=d=p[s];d<=g?v<=g:v>=g;r=d<=g?++v:--v)0===l[s]?a=r+u[s]:0!==(a=o[l[s]/2+(r-d)-(h-s)]||0)&&(a+=u[s]),this.codeMap[r]=65535&a}t.pos=c}return t.encode=function(t,e){var r,n,i,a,o,s,u,l,c,h,f,d,p,g,m,v,b,y,w,x,S,A,N,L,k,_,P,F,C,M,I,j,O,T,E,B,q,R,D,U,z,H,W,V,G,Y;switch(F=new Ye,a=Object.keys(t).sort((function(t,e){return t-e})),e){case"macroman":for(p=0,g=function(){var t=[];for(d=0;d<256;++d)t.push(0);return t}(),v={0:0},i={},C=0,O=a.length;C<O;C++)null==v[W=t[n=a[C]]]&&(v[W]=++p),i[n]={old:t[n],new:v[t[n]]},g[n]=v[t[n]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(g),{charMap:i,subtable:F.data,maxGlyphID:p+1};case"unicode":for(_=[],c=[],b=0,v={},r={},m=u=null,M=0,T=a.length;M<T;M++)null==v[w=t[n=a[M]]]&&(v[w]=++b),r[n]={old:w,new:v[w]},o=v[w]-n,null!=m&&o===u||(m&&c.push(m),_.push(n),u=o),m=n;for(m&&c.push(m),c.push(65535),_.push(65535),L=2*(N=_.length),A=2*Math.pow(Math.log(N)/Math.LN2,2),h=Math.log(A/2)/Math.LN2,S=2*N-A,s=[],x=[],f=[],d=I=0,E=_.length;I<E;d=++I){if(k=_[d],l=c[d],65535===k){s.push(0),x.push(0);break}if(k-(P=r[k].new)>=32768)for(s.push(0),x.push(2*(f.length+N-d)),n=j=k;k<=l?j<=l:j>=l;n=k<=l?++j:--j)f.push(r[n].new);else s.push(P-k),x.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*N+2*f.length),F.writeUInt16(0),F.writeUInt16(L),F.writeUInt16(A),F.writeUInt16(h),F.writeUInt16(S),z=0,B=c.length;z<B;z++)n=c[z],F.writeUInt16(n);for(F.writeUInt16(0),H=0,q=_.length;H<q;H++)n=_[H],F.writeUInt16(n);for(V=0,R=s.length;V<R;V++)o=s[V],F.writeUInt16(o);for(G=0,D=x.length;G<D;G++)y=x[G],F.writeUInt16(y);for(Y=0,U=f.length;Y<U;Y++)p=f[Y],F.writeUInt16(p);return{charMap:r,subtable:F.data,maxGlyphID:b+1}}},t}(),Ze=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="cmap",t.prototype.parse=function(t){var e,r,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=n?r<n:r>n;r=0<=n?++r:--r)e=new Qe(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},t.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=Qe.encode(t,e),(n=new Ye).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},t}(),tr=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="hhea",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},t}(),er=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),rr=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="post",t.prototype.parse=function(t){var e,r,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(r=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)e=t.readByte(),n.push(this.names.push(t.readString(e)));return n;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 262144:return this.map=function(){var e,r,n;for(n=[],i=e=0,r=this.file.maxp.numGlyphs;0<=r?e<r:e>r;i=0<=r?++e:--e)n.push(t.readUInt32());return n}.call(this)}},t}(),nr=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},ir=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="name",t.prototype.parse=function(t){var e,r,n,i,a,o,s,u,l,c,h;for(t.pos=this.offset,t.readShort(),e=t.readShort(),o=t.readShort(),r=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(s={},i=l=0,c=r.length;l<c;i=++l)n=r[i],t.pos=n.offset,u=t.readString(n.length),a=new nr(u,n),null==s[h=n.nameID]&&(s[h]=[]),s[n.nameID].push(a);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},t}(),ar=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="maxp",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},t}(),or=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="hmtx",t.prototype.parse=function(t){var e,r,n,i,a,o,s;for(t.pos=this.offset,this.metrics=[],e=0,o=this.file.hhea.numberOfMetrics;0<=o?e<o:e>o;e=0<=o?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,i;for(i=[],e=r=0;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push(t.readInt16());return i}(),this.widths=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.metrics).length;t<e;t++)i=r[t],n.push(i.advance);return n}.call(this),r=this.widths[this.widths.length-1],s=[],e=a=0;0<=n?a<n:a>n;e=0<=n?++a:--a)s.push(this.widths.push(r));return s},t.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},t}(),sr=[].slice,ur=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,u,l,c;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+r,a=(o=new Ye(e.read(n))).readShort(),u=o.readShort(),c=o.readShort(),s=o.readShort(),l=o.readShort(),this.cache[t]=-1===a?new cr(o,u,c,s,l):new lr(o,a,u,c,s,l),this.cache[t]))},t.prototype.encode=function(t,e,r){var n,i,a,o,s;for(a=[],i=[],o=0,s=e.length;o<s;o++)n=t[e[o]],i.push(a.length),n&&(a=a.concat(n.encode(r)));return i.push(a.length),{table:a,offsets:i}},t}(),lr=function(){function t(t,e,r,n,i,a){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=a,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),cr=function(){function t(t,e,r,n,i){var a,o;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return t.prototype.encode=function(){var t,e,r;for(e=new Ye(sr.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),hr=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return $e(t,Ge),t.prototype.tag="loca",t.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=0===e?function(){var e,n;for(n=[],r=0,e=this.length;r<e;r+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var e,n;for(n=[],r=0,e=this.length;r<e;r+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),n=0,i=0,a=0;a<r.length;++a)if(r[a]=n,i<e.length&&e[i]==a){++i,r[a]=n;var o=this.offsets[a],s=this.offsets[a+1]-o;s>0&&(n+=s)}for(var u=new Array(4*r.length),l=0;l<r.length;++l)u[4*l+3]=255&r[l],u[4*l+2]=(65280&r[l])>>8,u[4*l+1]=(16711680&r[l])>>16,u[4*l]=(4278190080&r[l])>>24;return u},t}(),fr=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,r,n,i;for(e in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=n[r];return t},t.prototype.glyphsFor=function(t){var e,r,n,i,a,o,s;for(n={},a=0,o=t.length;a<o;a++)n[i=t[a]]=this.font.glyf.glyphFor(i);for(i in e=[],n)(null!=(r=n[i])?r.compound:void 0)&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(i in s=this.glyphsFor(e))r=s[i],n[i]=r;return n},t.prototype.encode=function(t,e){var r,n,i,a,o,s,u,l,c,h,f,d,p,g,m;for(n in r=Ze.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),f={0:0},m=r.charMap)f[(s=m[n]).old]=s.new;for(d in h=r.maxGlyphID,a)d in f||(f[d]=h++);return l=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),c=Object.keys(l).sort((function(t,e){return t-e})),p=function(){var t,e,r;for(r=[],t=0,e=c.length;t<e;t++)o=c[t],r.push(l[o]);return r}(),i=this.font.glyf.encode(a,p,f),u=this.font.loca.encode(i.offsets,p),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},t}();Pt.API.PDFObject=function(){var t;function e(){}return t=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},e.convert=function(r){var n,i,a,o;if(Array.isArray(r))return"["+function(){var t,i,a;for(a=[],t=0,i=r.length;t<i;t++)n=r[t],a.push(e.convert(n));return a}().join(" ")+"]";if("string"==typeof r)return"/"+r;if(null!=r?r.isString:void 0)return"("+r+")";if(r instanceof Date)return"(D:"+t(r.getUTCFullYear(),4)+t(r.getUTCMonth(),2)+t(r.getUTCDate(),2)+t(r.getUTCHours(),2)+t(r.getUTCMinutes(),2)+t(r.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(r)){for(i in a=["<<"],r)o=r[i],a.push("/"+i+" "+e.convert(o));return a.push(">>"),a.join("\n")}return""+r},e}();const dr=Pt;var pr=o(8937),gr=o.n(pr),mr=o(7833),vr=o.n(mr),br=o(3230),yr=o.n(br),wr=function(t){var e,r,n=t,i={a:0,b:0,c:0},a=[];return e=function(e,r){var o,s,u,l,c,h;if(e.test(n))for(s=0,u=(o=n.match(e)).length;s<u;s+=1)i[r]+=1,l=o[s],c=n.indexOf(l),h=l.length,a.push({selector:t.substr(c,h),type:r,index:c,length:h}),n=n.replace(l,Array(h+1).join(" "))},r=function(t){var e,r,i,a;if(t.test(n))for(r=0,i=(e=n.match(t)).length;r<i;r+=1)a=e[r],n=n.replace(a,Array(a.length+1).join("A"))},r(/\\[0-9A-Fa-f]{6}\s?/g),r(/\\[0-9A-Fa-f]{1,5}\s/g),r(/\\./g),function(){var t,e,r,i,a=/{[^]*/gm;if(a.test(n))for(e=0,r=(t=n.match(a)).length;e<r;e+=1)i=t[e],n=n.replace(i,Array(i.length+1).join(" "))}(),e(/(\[[^\]]+\])/g,"b"),e(/(#[^\#\s\+>~\.\[:\)]+)/g,"a"),e(/(\.[^\s\+>~\.\[:\)]+)/g,"b"),e(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,"c"),e(/(:(?!not|global|local)[\w-]+\([^\)]*\))/gi,"b"),e(/(:(?!not|global|local)[^\s\+>~\.\[:]+)/g,"b"),n=(n=(n=(n=(n=(n=n.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," ")).replace(/:not/g," ")).replace(/:local/g," ")).replace(/:global/g," ")).replace(/[\(\)]/g," "),e(/([^\s\+>~\.\[:]+)/g,"c"),a.sort((function(t,e){return t.index-e.index})),{selector:t,specificity:"0,"+i.a.toString()+","+i.b.toString()+","+i.c.toString(),specificityArray:[0,i.a,i.b,i.c],parts:a}},xr=function(t,e){return(xr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function Sr(t,e){function r(){this.constructor=t}xr(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var Ar=function(){return(Ar=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Nr(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))}function Lr(t,e){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}var kr=function(){function t(t){if(this.a=void 0,this.r=0,this.g=0,this.b=0,this.simpleColors={},this.colorDefs=[],this.ok=!1,t){for(var e in"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase(),this.simpleColors={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",feldspar:"d19275",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",lightslateblue:"8470ff",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",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},this.simpleColors)t==e&&(t=this.simpleColors[e]);this.colorDefs=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}];for(var r=0;r<this.colorDefs.length;r++){var n=this.colorDefs[r].re,i=this.colorDefs[r].process,a=n.exec(t);if(a){var o=i(a);this.r=o[0],this.g=o[1],this.b=o[2],this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b}}return t.prototype.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},t.prototype.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+(this.a||"1")+")"},t.prototype.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},t.prototype.getHelpXML=function(){for(var e=[],r=0;r<this.colorDefs.length;r++)for(var n=this.colorDefs[r].example,i=0;i<n.length;i++)e[e.length]=n[i];for(var a in this.simpleColors)e[e.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),r=0;r<e.length;r++)try{var s=document.createElement("li"),u=new t(e[r]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),l.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+e[r]+" -> "+u.toRGB()+" -> "+u.toHex());s.appendChild(l),s.appendChild(c),o.appendChild(s)}catch(t){}return o},t}(),_r=function(){function t(t){this.color=t}return t.prototype.getFillData=function(t,e){return Nr(this,void 0,void 0,(function(){return Lr(this,(function(t){return[2,void 0]}))}))},t}(),Pr=function(){function t(){this.xmlSpace="",this.fill=null,this.fillOpacity=1,this.fontFamily="",this.fontSize=16,this.fontStyle="",this.fontWeight="",this.opacity=1,this.stroke=null,this.strokeDasharray=null,this.strokeDashoffset=0,this.strokeLinecap="",this.strokeLinejoin="",this.strokeMiterlimit=4,this.strokeOpacity=1,this.strokeWidth=1,this.alignmentBaseline="",this.textAnchor="",this.visibility="",this.color=null}return t.prototype.clone=function(){var e=new t;return e.xmlSpace=this.xmlSpace,e.fill=this.fill,e.fillOpacity=this.fillOpacity,e.fontFamily=this.fontFamily,e.fontSize=this.fontSize,e.fontStyle=this.fontStyle,e.fontWeight=this.fontWeight,e.opacity=this.opacity,e.stroke=this.stroke,e.strokeDasharray=this.strokeDasharray,e.strokeDashoffset=this.strokeDashoffset,e.strokeLinecap=this.strokeLinecap,e.strokeLinejoin=this.strokeLinejoin,e.strokeMiterlimit=this.strokeMiterlimit,e.strokeOpacity=this.strokeOpacity,e.strokeWidth=this.strokeWidth,e.textAnchor=this.textAnchor,e.alignmentBaseline=this.alignmentBaseline,e.visibility=this.visibility,e.color=this.color,e},t.default=function(){var e=new t;return e.xmlSpace="default",e.fill=new _r(new kr("rgb(0, 0, 0)")),e.fillOpacity=1,e.fontFamily="times",e.fontSize=16,e.fontStyle="normal",e.fontWeight="normal",e.opacity=1,e.stroke=null,e.strokeDasharray=null,e.strokeDashoffset=0,e.strokeLinecap="butt",e.strokeLinejoin="miter",e.strokeMiterlimit=4,e.strokeOpacity=1,e.strokeWidth=1,e.alignmentBaseline="baseline",e.textAnchor="start",e.visibility="visible",e.color=new kr("rgb(0, 0, 0)"),e},t}(),Fr=function(){function t(t,e){var r,n,i;this.pdf=t,this.svg2pdfParameters=e.svg2pdfParameters,this.attributeState=e.attributeState?e.attributeState.clone():Pr.default(),this.viewport=e.viewport,this.refsHandler=e.refsHandler,this.styleSheets=e.styleSheets,this.textMeasure=e.textMeasure,this.transform=null!==(r=e.transform)&&void 0!==r?r:this.pdf.unitMatrix,this.withinClipPath=null!==(n=e.withinClipPath)&&void 0!==n&&n,this.withinUse=null!==(i=e.withinUse)&&void 0!==i&&i}return t.prototype.clone=function(e){var r,n,i,a;return void 0===e&&(e={}),new t(this.pdf,{svg2pdfParameters:this.svg2pdfParameters,attributeState:e.attributeState?e.attributeState.clone():this.attributeState.clone(),viewport:null!==(r=e.viewport)&&void 0!==r?r:this.viewport,refsHandler:this.refsHandler,styleSheets:this.styleSheets,textMeasure:this.textMeasure,transform:null!==(n=e.transform)&&void 0!==n?n:this.transform,withinClipPath:null!==(i=e.withinClipPath)&&void 0!==i?i:this.withinClipPath,withinUse:null!==(a=e.withinUse)&&void 0!==a?a:this.withinUse})},t}(),Cr=function(){function t(e){this.renderedElements={},this.idMap=e,this.idPrefix=String(t.instanceCounter++)}return t.prototype.getRendered=function(t,e,r){return Nr(this,void 0,void 0,(function(){var n,i;return Lr(this,(function(a){switch(a.label){case 0:return n=this.generateKey(t,e),this.renderedElements.hasOwnProperty(n)?[2,this.renderedElements[t]]:(i=this.get(t),this.renderedElements[n]=i,[4,r(i)]);case 1:return a.sent(),[2,i]}}))}))},t.prototype.get=function(t){return this.idMap[gr()(t,{isIdentifier:!0})]},t.prototype.generateKey=function(t,e){return this.idPrefix+"|"+t+"|"+(e||new kr("rgb(0,0,0)")).toRGBA()},t.instanceCounter=0,t}();function Mr(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function Ir(t,e){return[2/3*(e[0]-t[0])+t[0],2/3*(e[1]-t[1])+t[1]]}function jr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function Or(t,e){return jr([e[0]-t[0],e[1]-t[1]])}function Tr(t,e){return[t[0]+e[0],t[1]+e[1]]}function Er(t,e){var r=t[0],n=t[1];return[e.a*r+e.c*n+e.e,e.b*r+e.d*n+e.f]}var Br=function(){function t(){this.segments=[]}return t.prototype.moveTo=function(t,e){return this.segments.push(new qr(t,e)),this},t.prototype.lineTo=function(t,e){return this.segments.push(new Rr(t,e)),this},t.prototype.curveTo=function(t,e,r,n,i,a){return this.segments.push(new Dr(t,e,r,n,i,a)),this},t.prototype.close=function(){return this.segments.push(new Ur),this},t.prototype.transform=function(t){this.segments.forEach((function(e){if(e instanceof qr||e instanceof Rr||e instanceof Dr){var r=Er([e.x,e.y],t);e.x=r[0],e.y=r[1]}if(e instanceof Dr){var n=Er([e.x1,e.y1],t),i=Er([e.x2,e.y2],t);e.x1=n[0],e.y1=n[1],e.x2=i[0],e.y2=i[1]}}))},t.prototype.draw=function(t){var e=t.pdf;this.segments.forEach((function(t){t instanceof qr?e.moveTo(t.x,t.y):t instanceof Rr?e.lineTo(t.x,t.y):t instanceof Dr?e.curveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y):e.close()}))},t}(),qr=function(t,e){this.x=t,this.y=e},Rr=function(t,e){this.x=t,this.y=e},Dr=function(t,e,r,n,i,a){this.x1=t,this.y1=e,this.x2=r,this.y2=n,this.x=i,this.y=a},Ur=function(){};function zr(t,e){return e.split(",").indexOf((t.nodeName||t.tagName).toLowerCase())>=0}function Hr(t,e,r,n){var i;return void 0===n&&(n=r),(null===(i=t.style)||void 0===i?void 0:i.getPropertyValue(n))||e.getPropertyValue(t,n)||t.hasAttribute(r)&&t.getAttribute(r)||void 0}function Wr(t,e,r){if("none"===Hr(t.element,r.styleSheets,"display"))return!1;var n=e,i=Hr(t.element,r.styleSheets,"visibility");return i&&(n="hidden"!==i),n}function Vr(t,e,r){var n=Wr(t,e,r);return 0!==t.element.childNodes.length&&(t.children.forEach((function(t){t.isVisible(n,r)&&(n=!0)})),n)}var Gr=function(){function t(){this.markers=[]}return t.prototype.addMarker=function(t){this.markers.push(t)},t.prototype.draw=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a,o,s;return Lr(this,(function(u){switch(u.label){case 0:e=0,u.label=1;case 1:return e<this.markers.length?(r=this.markers[e],n=void 0,i=r.angle,a=r.anchor,o=Math.cos(i),s=Math.sin(i),n=t.pdf.Matrix(o,s,-s,o,a[0],a[1]),n=t.pdf.matrixMult(t.pdf.Matrix(t.attributeState.strokeWidth,0,0,t.attributeState.strokeWidth,0,0),n),n=t.pdf.matrixMult(n,t.transform),t.pdf.saveGraphicsState(),[4,t.refsHandler.getRendered(r.id,null,(function(e){return e.apply(t)}))]):[3,4];case 2:u.sent(),t.pdf.doFormObject(r.id,n),t.pdf.restoreGraphicsState(),u.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},t}(),Yr=function(t,e,r){this.id=t,this.anchor=e,this.angle=r},Xr=/url\(["']?#([^"']+)["']?\)/,Jr={bottom:"bottom","text-bottom":"bottom",top:"top","text-top":"top",hanging:"hanging",middle:"middle",central:"middle",center:"middle",mathematical:"middle",ideographic:"ideographic",alphabetic:"alphabetic",baseline:"alphabetic"};function $r(t,e){var r;return(r=t&&t.toString().match(/^([\-0-9.]+)em$/))?parseFloat(r[1])*e:(r=t&&t.toString().match(/^([\-0-9.]+)(px|)$/))?parseFloat(r[1]):0}function Kr(t){return Jr[t]||"alphabetic"}function Qr(t){for(var e,r=[],n=/[+-]?(?:(?:\d+\.?\d*)|(?:\d*\.?\d+))(?:[eE][+-]?\d+)?/g;e=n.exec(t);)r.push(parseFloat(e[0]));return r}function Zr(t,e){if("transparent"===t){var r=new kr("rgb(0,0,0)");return r.a=0,r}if("currentcolor"===t.toLowerCase())return e||new kr("rgb(0,0,0)");var n=/\s*rgba\(((?:[^,\)]*,){3}[^,\)]*)\)\s*/.exec(t);if(n){var i=Qr(n[1]),a=new kr("rgb("+i.slice(0,3).join(",")+")");return a.a=i[3],a}return new kr(t)}var tn,en={"sans-serif":"helvetica",verdana:"helvetica",arial:"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",serif:"times",cursive:"times",fantasy:"times"},rn=(tn=dr.version.split("."),2===parseFloat(tn[0])&&3===parseFloat(tn[1]));function nn(t,e){return rn?400==e?"italic"==t?"italic":"normal":700==e&&"italic"!==t?"bold":t+""+e:400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"}function an(t,e){if("none"===Hr(e.element,t.styleSheets,"display"))return[0,0,0,0];var r=[0,0,0,0];return e.children.forEach((function(e){var n=e.getBoundingBox(t);r=[Math.min(r[0],n[0]),Math.min(r[1],n[1]),Math.max(r[0]+r[2],n[0]+n[2])-Math.min(r[0],n[0]),Math.max(r[1]+r[3],n[1]+n[3])-Math.min(r[1],n[1])]})),r}function on(t,e){var r=parseFloat,n=r(t.getAttribute("x1"))||r(Hr(t,e.styleSheets,"x"))||r(Hr(t,e.styleSheets,"cx"))-r(Hr(t,e.styleSheets,"r"))||0,i=r(t.getAttribute("x2"))||n+r(Hr(t,e.styleSheets,"width"))||r(Hr(t,e.styleSheets,"cx"))+r(Hr(t,e.styleSheets,"r"))||0,a=r(t.getAttribute("y1"))||r(Hr(t,e.styleSheets,"y"))||r(Hr(t,e.styleSheets,"cy"))-r(Hr(t,e.styleSheets,"r"))||0,o=r(t.getAttribute("y2"))||a+r(Hr(t,e.styleSheets,"height"))||r(Hr(t,e.styleSheets,"cy"))+r(Hr(t,e.styleSheets,"r"))||0;return[Math.min(n,i),Math.min(a,o),Math.max(n,i)-Math.min(n,i),Math.max(a,o)-Math.min(a,o)]}function sn(t,e,r,n,i,a,o,s){void 0===s&&(s=!1);var u,l,c=e[0],h=e[1],f=e[2],d=e[3],p=i/f,g=a/d,m=t.getAttribute("preserveAspectRatio");if(m){var v=m.split(" ");"defer"===v[0]&&(v=v.slice(1)),u=v[0],l=v[1]||"meet"}else u="xMidYMid",l="meet";if("none"!==u&&("meet"===l?p=g=Math.min(p,g):"slice"===l&&(p=g=Math.max(p,g))),s)return o.pdf.Matrix(p,0,0,g,0,0);var b=r-c*p,y=n-h*g;u.indexOf("xMid")>=0?b+=(i-f*p)/2:u.indexOf("xMax")>=0&&(b+=i-f*p),u.indexOf("YMid")>=0?y+=(a-d*g)/2:u.indexOf("YMax")>=0&&(y+=a-d*g);var w=o.pdf.Matrix(1,0,0,1,b,y),x=o.pdf.Matrix(p,0,0,g,0,0);return o.pdf.matrixMult(x,w)}function un(t,e){if(!t||"none"===t)return e.pdf.unitMatrix;for(var r,n,i=/^[\s,]*matrix\(([^)]+)\)\s*/,a=/^[\s,]*translate\(([^)]+)\)\s*/,o=/^[\s,]*rotate\(([^)]+)\)\s*/,s=/^[\s,]*scale\(([^)]+)\)\s*/,u=/^[\s,]*skewX\(([^)]+)\)\s*/,l=/^[\s,]*skewY\(([^)]+)\)\s*/,c=e.pdf.unitMatrix;t.length>0&&t.length!==n;){n=t.length;var h=i.exec(t);if(h&&(r=Qr(h[1]),c=e.pdf.matrixMult(e.pdf.Matrix(r[0],r[1],r[2],r[3],r[4],r[5]),c),t=t.substr(h[0].length)),h=o.exec(t)){r=Qr(h[1]);var f=Math.PI*r[0]/180;if(c=e.pdf.matrixMult(e.pdf.Matrix(Math.cos(f),Math.sin(f),-Math.sin(f),Math.cos(f),0,0),c),r[1]||r[2]){var d=e.pdf.Matrix(1,0,0,1,r[1],r[2]),p=e.pdf.Matrix(1,0,0,1,-r[1],-r[2]);c=e.pdf.matrixMult(p,e.pdf.matrixMult(c,d))}t=t.substr(h[0].length)}(h=a.exec(t))&&(r=Qr(h[1]),c=e.pdf.matrixMult(e.pdf.Matrix(1,0,0,1,r[0],r[1]||0),c),t=t.substr(h[0].length)),(h=s.exec(t))&&((r=Qr(h[1]))[1]||(r[1]=r[0]),c=e.pdf.matrixMult(e.pdf.Matrix(r[0],0,0,r[1],0,0),c),t=t.substr(h[0].length)),(h=u.exec(t))&&(r=parseFloat(h[1]),r*=Math.PI/180,c=e.pdf.matrixMult(e.pdf.Matrix(1,0,Math.tan(r),1,0,0),c),t=t.substr(h[0].length)),(h=l.exec(t))&&(r=parseFloat(h[1]),r*=Math.PI/180,c=e.pdf.matrixMult(e.pdf.Matrix(1,Math.tan(r),0,1,0,0),c),t=t.substr(h[0].length))}return c}var ln=function(){function t(t,e){this.element=t,this.children=e,this.parent=null}return t.prototype.setParent=function(t){this.parent=t},t.prototype.getParent=function(){return this.parent},t.prototype.getBoundingBox=function(t){return"none"===Hr(this.element,t.styleSheets,"display")?[0,0,0,0]:this.getBoundingBoxCore(t)},t.prototype.computeNodeTransform=function(t){var e=this.computeNodeTransformCore(t),r=Hr(this.element,t.styleSheets,"transform");return r?t.pdf.matrixMult(e,un(r,t)):e},t}(),cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.render=function(t){return Promise.resolve()},e.prototype.getBoundingBoxCore=function(t){return[]},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e}(ln),hn=function(t){function e(e,r,n){var i=t.call(this,r,n)||this;return i.pdfGradientType=e,i.contextColor=void 0,i}return Sr(e,t),e.prototype.apply=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a,o;return Lr(this,(function(s){return(e=this.element.getAttribute("id"))?(r=this.getStops(t.styleSheets),n=0,i=!1,r.forEach((function(t){var e=t.opacity;e&&1!==e&&(n+=e,i=!0)})),i&&(a=new Nt({opacity:n/r.length})),o=new kt(this.pdfGradientType,this.getCoordinates(),r,a),t.pdf.addShadingPattern(e,o),[2]):[2]}))}))},e.prototype.getStops=function(t){var r=this;if(this.stops)return this.stops;if(void 0===this.contextColor){this.contextColor=null;for(var n=this;n;){var i=Hr(n.element,t,"color");if(i){this.contextColor=Zr(i,null);break}n=n.getParent()}}var a=[];return this.children.forEach((function(n){if("stop"===n.element.tagName.toLowerCase()){var i=Hr(n.element,t,"color"),o=Zr(Hr(n.element,t,"stop-color")||"",i?Zr(i,null):r.contextColor),s=parseFloat(Hr(n.element,t,"stop-opacity")||"1");a.push({offset:e.parseGradientOffset(n.element.getAttribute("offset")||"0"),color:[o.r,o.g,o.b],opacity:s})}})),this.stops=a},e.prototype.getBoundingBoxCore=function(t){return on(this.element,t)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e.parseGradientOffset=function(t){var e=parseFloat(t);return!isNaN(e)&&t.indexOf("%")>=0?e/100:e},e}(cn),fn=function(t){function e(e,r){return t.call(this,"axial",e,r)||this}return Sr(e,t),e.prototype.getCoordinates=function(){return[parseFloat(this.element.getAttribute("x1")||"0"),parseFloat(this.element.getAttribute("y1")||"0"),parseFloat(this.element.getAttribute("x2")||"1"),parseFloat(this.element.getAttribute("y2")||"0")]},e}(hn),dn=function(t){function e(e,r){return t.call(this,"radial",e,r)||this}return Sr(e,t),e.prototype.getCoordinates=function(){var t=this.element.getAttribute("cx"),e=this.element.getAttribute("cy"),r=this.element.getAttribute("fx"),n=this.element.getAttribute("fy");return[parseFloat(r||t||"0.5"),parseFloat(n||e||"0.5"),0,parseFloat(t||"0.5"),parseFloat(e||"0.5"),parseFloat(this.element.getAttribute("r")||"0.5")]},e}(hn),pn=function(){function t(t,e){this.key=t,this.gradient=e}return t.prototype.getFillData=function(t,e){return Nr(this,void 0,void 0,(function(){var r,n,i;return Lr(this,(function(a){switch(a.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,(function(t){return t.apply(new Fr(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))}))];case 1:return a.sent(),this.gradient.element.hasAttribute("gradientUnits")&&"objectboundingbox"!==this.gradient.element.getAttribute("gradientUnits").toLowerCase()?r=e.pdf.unitMatrix:(n=t.getBoundingBox(e),r=e.pdf.Matrix(n[2],0,0,n[3],n[0],n[1])),i=un(Hr(this.gradient.element,e.styleSheets,"gradientTransform","transform"),e),[2,{key:this.key,matrix:e.pdf.matrixMult(i,r)}]}}))}))},t}(),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.apply=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a;return Lr(this,(function(o){switch(o.label){case 0:if(!(e=this.element.getAttribute("id")))return[2];r=this.getBoundingBox(t),n=new _t([r[0],r[1],r[0]+r[2],r[1]+r[3]],r[2],r[3]),t.pdf.beginTilingPattern(n),i=0,a=this.children,o.label=1;case 1:return i<a.length?[4,a[i].render(new Fr(t.pdf,{attributeState:t.attributeState,refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}))]:[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return t.pdf.endTilingPattern(e,n),[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return on(this.element,t)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e}(cn),mn=function(){function t(t,e){this.key=t,this.pattern=e}return t.prototype.getFillData=function(t,e){return Nr(this,void 0,void 0,(function(){var r,n,i,a,o,s,u,l,c,h,f,d;return Lr(this,(function(p){switch(p.label){case 0:return[4,e.refsHandler.getRendered(this.key,null,(function(t){return t.apply(new Fr(e.pdf,{refsHandler:e.refsHandler,textMeasure:e.textMeasure,styleSheets:e.styleSheets,viewport:e.viewport,svg2pdfParameters:e.svg2pdfParameters}))}))];case 1:return p.sent(),r={key:this.key,boundingBox:void 0,xStep:0,yStep:0,matrix:void 0},i=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternUnits")&&"objectboundingbox"!==this.pattern.element.getAttribute("patternUnits").toLowerCase()||(n=t.getBoundingBox(e),i=e.pdf.Matrix(1,0,0,1,n[0],n[1]),o=this.pattern.getBoundingBox(e),s=o[0]*n[0]||0,u=o[1]*n[1]||0,l=o[2]*n[2]||0,c=o[3]*n[3]||0,r.boundingBox=[s,u,s+l,u+c],r.xStep=l,r.yStep=c),a=e.pdf.unitMatrix,this.pattern.element.hasAttribute("patternContentUnits")&&"objectboundingbox"===this.pattern.element.getAttribute("patternContentUnits").toLowerCase()&&(n||(n=t.getBoundingBox(e)),a=e.pdf.Matrix(n[2],0,0,n[3],0,0),o=r.boundingBox||this.pattern.getBoundingBox(e),s=o[0]/n[0]||0,u=o[1]/n[1]||0,l=o[2]/n[2]||0,c=o[3]/n[3]||0,r.boundingBox=[s,u,s+l,u+c],r.xStep=l,r.yStep=c),h=e.pdf.unitMatrix,(f=Hr(this.pattern.element,e.styleSheets,"patternTransform","transform"))&&(h=un(f,e)),d=a,d=e.pdf.matrixMult(d,i),d=e.pdf.matrixMult(d,h),d=e.pdf.matrixMult(d,e.transform),r.matrix=d,[2,r]}}))}))},t}();function vn(t,e,r){var n=r||e.element,i=Hr(n,t.styleSheets,"color");if(i){var a=Zr(i,t.attributeState.color);a.ok?t.attributeState.color=a:t.attributeState.color=new kr("rgb(0,0,0)")}var o=Hr(n,t.styleSheets,"visibility");o&&(t.attributeState.visibility=o);var s=Hr(n,t.styleSheets,"fill");s&&(t.attributeState.fill=function(t,e){var r=Xr.exec(t);if(r){var n=r[1],i=e.refsHandler.get(n);return i&&(i instanceof fn||i instanceof dn)?function(t,e,r){var n=e.getStops(r.styleSheets);if(0===n.length)return null;if(1===n.length){var i=n[0].color,a=new kr;return a.ok=!0,a.r=i[0],a.g=i[1],a.b=i[2],a.a=n[0].opacity,new _r(a)}return new pn(t,e)}(n,i,e):i&&i instanceof gn?new mn(n,i):new _r(new kr("rgb(0, 0, 0)"))}var a=Zr(t,e.attributeState.color);return a.ok?new _r(a):null}(s,t));var u=Hr(n,t.styleSheets,"fill-opacity");u&&(t.attributeState.fillOpacity=parseFloat(u));var l=Hr(n,t.styleSheets,"stroke-opacity");l&&(t.attributeState.strokeOpacity=parseFloat(l));var c=Hr(n,t.styleSheets,"opacity");c&&(t.attributeState.opacity=parseFloat(c));var h=Hr(n,t.styleSheets,"stroke-width");void 0!==h&&""!==h&&(t.attributeState.strokeWidth=Math.abs(parseFloat(h)));var f=Hr(n,t.styleSheets,"stroke");if(f)if("none"===f)t.attributeState.stroke=null;else{var d=Zr(f,t.attributeState.color);d.ok&&(t.attributeState.stroke=new _r(d))}var p=Hr(n,t.styleSheets,"stroke-linecap");p&&(t.attributeState.strokeLinecap=p);var g=Hr(n,t.styleSheets,"stroke-linejoin");g&&(t.attributeState.strokeLinejoin=g);var m=Hr(n,t.styleSheets,"stroke-dasharray");if(m){var v=parseInt(Hr(n,t.styleSheets,"stroke-dashoffset")||"0");t.attributeState.strokeDasharray=Qr(m),t.attributeState.strokeDashoffset=v}var b=Hr(n,t.styleSheets,"stroke-miterlimit");void 0!==b&&""!==b&&(t.attributeState.strokeMiterlimit=parseFloat(b));var y=n.getAttribute("xml:space");y&&(t.attributeState.xmlSpace=y);var w=Hr(n,t.styleSheets,"font-weight");w&&(t.attributeState.fontWeight=w);var x=Hr(n,t.styleSheets,"font-style");x&&(t.attributeState.fontStyle=x);var S=Hr(n,t.styleSheets,"font-family");if(S){var A=vr().parse(S);t.attributeState.fontFamily=function(t,e,r){var n=nn(t.fontStyle,t.fontWeight),i=r.pdf.getFontList(),a="";return e.some((function(t){var e=i[t];return e&&e.indexOf(n)>=0?(a=t,!0):(t=t.toLowerCase(),!!en.hasOwnProperty(t)&&(a=t,!0))}))||(a="times"),a}(t.attributeState,A,t)}var N=Hr(n,t.styleSheets,"font-size");if(N){var L=t.pdf.getFontSize();t.attributeState.fontSize=$r(N,L)}var k=Hr(n,t.styleSheets,"vertical-align")||Hr(n,t.styleSheets,"alignment-baseline");if(k){var _=k.match(/(baseline|text-bottom|alphabetic|ideographic|middle|central|mathematical|text-top|bottom|center|top|hanging)/);_&&(t.attributeState.alignmentBaseline=_[0])}var P=Hr(n,t.styleSheets,"text-anchor");P&&(t.attributeState.textAnchor=P)}function bn(t,e,r){var n=1,i=1;n*=t.attributeState.fillOpacity,n*=t.attributeState.opacity,t.attributeState.fill instanceof _r&&void 0!==t.attributeState.fill.color.a&&(n*=t.attributeState.fill.color.a),i*=t.attributeState.strokeOpacity,i*=t.attributeState.opacity,t.attributeState.stroke instanceof _r&&void 0!==t.attributeState.stroke.color.a&&(i*=t.attributeState.stroke.color.a);var a,o,s=n<1,u=i<1;if(zr(r,"use")?(s=!0,u=!0,n*=t.attributeState.fill?1:0,i*=t.attributeState.stroke?1:0):t.withinUse&&(t.attributeState.fill!==e.attributeState.fill?(s=!0,n*=t.attributeState.fill?1:0):s&&!t.attributeState.fill&&(n=0),t.attributeState.stroke!==e.attributeState.stroke?(u=!0,i*=t.attributeState.stroke?1:0):u&&!t.attributeState.stroke&&(i=0)),s||u){var l={};s&&(l.opacity=n),u&&(l["stroke-opacity"]=i),t.pdf.setGState(new Nt(l))}if(t.attributeState.fill&&t.attributeState.fill!==e.attributeState.fill&&t.attributeState.fill instanceof _r&&t.attributeState.fill.color.ok&&!zr(r,"text")&&t.pdf.setFillColor(t.attributeState.fill.color.r,t.attributeState.fill.color.g,t.attributeState.fill.color.b),t.attributeState.strokeWidth!==e.attributeState.strokeWidth&&t.pdf.setLineWidth(t.attributeState.strokeWidth),t.attributeState.stroke!==e.attributeState.stroke&&t.attributeState.stroke instanceof _r&&t.pdf.setDrawColor(t.attributeState.stroke.color.r,t.attributeState.stroke.color.g,t.attributeState.stroke.color.b),t.attributeState.strokeLinecap!==e.attributeState.strokeLinecap&&t.pdf.setLineCap(t.attributeState.strokeLinecap),t.attributeState.strokeLinejoin!==e.attributeState.strokeLinejoin&&t.pdf.setLineJoin(t.attributeState.strokeLinejoin),t.attributeState.strokeDasharray===e.attributeState.strokeDasharray&&t.attributeState.strokeDashoffset===e.attributeState.strokeDashoffset||!t.attributeState.strokeDasharray||t.pdf.setLineDashPattern(t.attributeState.strokeDasharray,t.attributeState.strokeDashoffset),t.attributeState.strokeMiterlimit!==e.attributeState.strokeMiterlimit&&t.pdf.setLineMiterLimit(t.attributeState.strokeMiterlimit),t.attributeState.fontFamily!==e.attributeState.fontFamily&&(a=en.hasOwnProperty(t.attributeState.fontFamily)?en[t.attributeState.fontFamily]:t.attributeState.fontFamily),t.attributeState.fill&&t.attributeState.fill!==e.attributeState.fill&&t.attributeState.fill instanceof _r&&t.attributeState.fill.color.ok){var c=t.attributeState.fill.color;t.pdf.setTextColor(c.r,c.g,c.b)}t.attributeState.fontWeight===e.attributeState.fontWeight&&t.attributeState.fontStyle===e.attributeState.fontStyle||(o=nn(t.attributeState.fontStyle,t.attributeState.fontWeight)),void 0===a&&void 0===o||(void 0===a&&(a=en.hasOwnProperty(t.attributeState.fontFamily)?en[t.attributeState.fontFamily]:t.attributeState.fontFamily),t.pdf.setFont(a,o)),t.attributeState.fontSize!==e.attributeState.fontSize&&t.pdf.setFontSize(t.attributeState.fontSize*t.pdf.internal.scaleFactor)}function yn(t,e,r){var n=Xr.exec(t);if(n){var i=n[1];return r.refsHandler.get(i)||void 0}}function wn(t,e,r){return Nr(this,void 0,void 0,(function(){var n,i;return Lr(this,(function(a){switch(a.label){case 0:return n=r.clone(),e.element.hasAttribute("clipPathUnits")&&"objectboundingbox"===e.element.getAttribute("clipPathUnits").toLowerCase()&&(i=t.getBoundingBox(r),n.transform=r.pdf.matrixMult(r.pdf.Matrix(i[2],0,0,i[3],i[0],i[1]),r.transform)),[4,e.apply(n)];case 1:return a.sent(),[2]}}))}))}var xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.render=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i;return Lr(this,(function(a){switch(a.label){case 0:return this.isVisible("hidden"!==t.attributeState.visibility,t)?((e=t.clone()).transform=e.pdf.matrixMult(this.computeNodeTransform(e),t.transform),vn(e,this),r=Hr(this.element,e.styleSheets,"clip-path"),(n=r&&"none"!==r)?(i=yn(r,0,e))?i.isVisible(!0,e)?(e.pdf.saveGraphicsState(),[4,wn(this,i,e)]):[3,2]:[3,4]:[3,5]):[2];case 1:return a.sent(),[3,3];case 2:return[2];case 3:return[3,5];case 4:n=!1,a.label=5;case 5:return e.withinClipPath||e.pdf.saveGraphicsState(),bn(e,t,this.element),[4,this.renderCore(e)];case 6:return a.sent(),e.withinClipPath||e.pdf.restoreGraphicsState(),n&&e.pdf.restoreGraphicsState(),[2]}}))}))},e}(ln),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e}(xn),An=function(t){function e(e,r,n){var i=t.call(this,r,n)||this;return i.cachedPath=null,i.hasMarkers=e,i}return Sr(e,t),e.prototype.renderCore=function(t){return Nr(this,void 0,void 0,(function(){var e;return Lr(this,(function(r){switch(r.label){case 0:return null===(e=this.getCachedPath(t))||0===e.segments.length?[2]:(t.withinClipPath?e.transform(t.transform):t.pdf.setCurrentTransformationMatrix(t.transform),e.draw(t),[4,this.fillOrStroke(t)]);case 1:return r.sent(),this.hasMarkers?[4,this.drawMarkers(t,e)]:[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},e.prototype.getCachedPath=function(t){return this.cachedPath||(this.cachedPath=this.getPath(t))},e.prototype.drawMarkers=function(t,e){return Nr(this,void 0,void 0,(function(){return Lr(this,(function(r){switch(r.label){case 0:return[4,this.getMarkers(e,t).draw(t.clone({transform:t.pdf.unitMatrix}))];case 1:return r.sent(),[2]}}))}))},e.prototype.fillOrStroke=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a;return Lr(this,(function(o){switch(o.label){case 0:return t.withinClipPath?[2]:(e=t.attributeState.fill,r=t.attributeState.stroke&&0!==t.attributeState.strokeWidth,e?[4,e.getFillData(this,t)]:[3,2]);case 1:return i=o.sent(),[3,3];case 2:i=void 0,o.label=3;case 3:return n=i,a="evenodd"===Hr(this.element,t.styleSheets,"fill-rule"),e&&r||t.withinUse?a?t.pdf.fillStrokeEvenOdd(n):t.pdf.fillStroke(n):e?a?t.pdf.fillEvenOdd(n):t.pdf.fill(n):r?t.pdf.stroke():t.pdf.discardPath(),[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){var e=this.getCachedPath(t);if(!e||!e.segments.length)return[0,0,0,0];for(var r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=0,s=0,u=0;u<e.segments.length;u++){var l=e.segments[u];(l instanceof qr||l instanceof Rr||l instanceof Dr)&&(o=l.x,s=l.y),l instanceof Dr?(r=Math.min(r,o,l.x1,l.x2,l.x),i=Math.max(i,o,l.x1,l.x2,l.x),n=Math.min(n,s,l.y1,l.y2,l.y),a=Math.max(a,s,l.y1,l.y2,l.y)):(r=Math.min(r,o),i=Math.max(i,o),n=Math.min(n,s),a=Math.max(a,s))}return[r,n,i-r,a-n]},e.prototype.getMarkers=function(t,e){var r=Hr(this.element,e.styleSheets,"marker-start"),n=Hr(this.element,e.styleSheets,"marker-mid"),i=Hr(this.element,e.styleSheets,"marker-end"),a=new Gr;if(r||n||i){i&&(i=Nn(i)),r&&(r=Nn(r)),n&&(n=Nn(n));for(var o=t.segments,s=[1,0],u=void 0,l=!1,c=[1,0],h=!1,f=function(t){var e=o[t],f=r&&(1===t||!(o[t]instanceof qr)&&o[t-1]instanceof qr);f&&o.forEach((function(e,r){if(!h&&e instanceof Ur&&r>t){var n=o[r-1];h=(n instanceof qr||n instanceof Rr||n instanceof Dr)&&n}}));var d=i&&(t===o.length-1||!(o[t]instanceof qr)&&o[t+1]instanceof qr),p=n&&t>0&&!(1===t&&o[t-1]instanceof qr),g=o[t-1]||null;if(g instanceof qr||g instanceof Rr||g instanceof Dr)if(e instanceof Dr)f&&a.addMarker(new Yr(r,[g.x,g.y],Mr(h?[h.x,h.y]:[g.x,g.y],[e.x1,e.y1]))),d&&a.addMarker(new Yr(i,[e.x,e.y],Mr([e.x2,e.y2],[e.x,e.y]))),p&&(u=Or([g.x,g.y],[e.x1,e.y1]),u=g instanceof qr?u:jr(Tr(s,u)),a.addMarker(new Yr(n,[g.x,g.y],Math.atan2(u[1],u[0])))),s=Or([e.x2,e.y2],[e.x,e.y]);else if(e instanceof qr||e instanceof Rr){if(u=Or([g.x,g.y],[e.x,e.y]),f){var m=h?Or([h.x,h.y],[e.x,e.y]):u;a.addMarker(new Yr(r,[g.x,g.y],Math.atan2(m[1],m[0])))}d&&a.addMarker(new Yr(i,[e.x,e.y],Math.atan2(u[1],u[0]))),p&&(m=e instanceof qr?s:g instanceof qr?u:jr(Tr(s,u)),a.addMarker(new Yr(n,[g.x,g.y],Math.atan2(m[1],m[0])))),s=u}else e instanceof Ur&&(u=Or([g.x,g.y],[l.x,l.y]),p&&(m=g instanceof qr?u:jr(Tr(s,u)),a.addMarker(new Yr(n,[g.x,g.y],Math.atan2(m[1],m[0])))),d&&(m=jr(Tr(u,c)),a.addMarker(new Yr(i,[l.x,l.y],Math.atan2(m[1],m[0])))),s=u);else{l=e instanceof qr&&e;var v=o[t+1];(v instanceof qr||v instanceof Rr||v instanceof Dr)&&(c=Or([l.x,l.y],[v.x,v.y]))}},d=0;d<o.length;d++)f(d)}return a},e}(Sn);function Nn(t){var e=Xr.exec(t);return e&&e[1]||void 0}var Ln=function(t){function e(e,r){return t.call(this,!0,e,r)||this}return Sr(e,t),e.prototype.getPath=function(t){if(t.withinClipPath||null===t.attributeState.stroke)return null;var e=parseFloat(this.element.getAttribute("x1")||"0"),r=parseFloat(this.element.getAttribute("y1")||"0"),n=parseFloat(this.element.getAttribute("x2")||"0"),i=parseFloat(this.element.getAttribute("y2")||"0");return e||n||r||i?(new Br).moveTo(e,r).lineTo(n,i):null},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e.prototype.fillOrStroke=function(e){return Nr(this,void 0,void 0,(function(){return Lr(this,(function(r){switch(r.label){case 0:return e.attributeState.fill=null,[4,t.prototype.fillOrStroke.call(this,e)];case 1:return r.sent(),[2]}}))}))},e}(An),kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.apply=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a;return Lr(this,(function(o){switch(o.label){case 0:return this.isVisible("hidden"!==t.attributeState.visibility,t)?((e=t.clone()).transform=e.pdf.unitMatrix,vn(e,this),(r=Hr(this.element,e.styleSheets,"clip-path"))&&"none"!==r&&(n=yn(r,0,e))?n.isVisible(!0,e)?[4,wn(this,n,e)]:[3,2]:[3,3]):[2];case 1:return o.sent(),[3,3];case 2:return[2];case 3:bn(e,t,this.element),i=0,a=this.children,o.label=4;case 4:return i<a.length?[4,a[i].render(e)]:[3,7];case 5:o.sent(),o.label=6;case 6:return i++,[3,4];case 7:return[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return an(t,this)},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e.prototype.computeNodeTransformCore=function(t){var e=parseFloat(Hr(this.element,t.styleSheets,"x")||"0"),r=parseFloat(Hr(this.element,t.styleSheets,"y")||"0"),n=this.element.getAttribute("viewBox");if(n){var i=Qr(n),a=parseFloat(Hr(this.element,t.styleSheets,"width")||Hr(this.element.ownerSVGElement,t.styleSheets,"width")||n[2]),o=parseFloat(Hr(this.element,t.styleSheets,"height")||Hr(this.element.ownerSVGElement,t.styleSheets,"height")||n[3]);return sn(this.element,i,e,r,a,o,t)}return t.pdf.Matrix(1,0,0,1,e,r)},e}(cn),_n=function(t,e){this.width=t,this.height=e},Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.renderCore=function(t){return Nr(this,void 0,void 0,(function(){var r,n,i,a,o,s,u,l,c,h,f,d,p;return Lr(this,(function(g){switch(g.label){case 0:return r=parseFloat,(n=this.element.getAttribute("href")||this.element.getAttribute("xlink:href"))?(i=n.substring(1),a=t.refsHandler.get(i),o=zr(a.element,"symbol,svg")&&a.element.hasAttribute("viewBox"),s=r(Hr(this.element,t.styleSheets,"x")||"0"),u=r(Hr(this.element,t.styleSheets,"y")||"0"),l=void 0,c=void 0,o?(l=r(Hr(this.element,t.styleSheets,"width")||Hr(a.element,t.styleSheets,"width")||"0"),c=r(Hr(this.element,t.styleSheets,"height")||Hr(a.element,t.styleSheets,"height")||"0"),s+=r(Hr(a.element,t.styleSheets,"x")||"0"),u+=r(Hr(a.element,t.styleSheets,"y")||"0"),f=Qr(a.element.getAttribute("viewBox")),h=sn(a.element,f,s,u,l,c,t)):h=t.pdf.Matrix(1,0,0,1,s,u),d=new Fr(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,withinUse:!0,viewport:o?new _n(l,c):t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}),p=t.attributeState.color,[4,t.refsHandler.getRendered(i,p,(function(t){return e.renderReferencedNode(t,i,p,d)}))]):[2];case 1:return g.sent(),t.pdf.saveGraphicsState(),t.pdf.setCurrentTransformationMatrix(t.transform),o&&"visible"!==Hr(a.element,t.styleSheets,"overflow")&&(t.pdf.rect(s,u,l,c),t.pdf.clip().discardPath()),t.pdf.doFormObject(t.refsHandler.generateKey(i,p),h),t.pdf.restoreGraphicsState(),[2]}}))}))},e.renderReferencedNode=function(t,e,r,n){return Nr(this,void 0,void 0,(function(){var i;return Lr(this,(function(a){switch(a.label){case 0:return i=[(i=t.getBoundingBox(n))[0]-.5*i[2],i[1]-.5*i[3],2*i[2],2*i[3]],n.attributeState.color=r,n.pdf.beginFormObject(i[0],i[1],i[2],i[3],n.pdf.unitMatrix),t instanceof kn?[4,t.apply(n)]:[3,2];case 1:return a.sent(),[3,4];case 2:return[4,t.render(n)];case 3:a.sent(),a.label=4;case 4:return n.pdf.endFormObject(n.refsHandler.generateKey(e,r)),[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return on(this.element,t)},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e}(Sn),Fn=function(t){function e(e,r){return t.call(this,!1,e,r)||this}return Sr(e,t),e.prototype.getPath=function(t){var e=parseFloat(Hr(this.element,t.styleSheets,"width")||"0"),r=parseFloat(Hr(this.element,t.styleSheets,"height")||"0");if(!isFinite(e)||e<=0||!isFinite(r)||r<=0)return null;var n=Hr(this.element,t.styleSheets,"rx"),i=Hr(this.element,t.styleSheets,"ry"),a=Math.min(parseFloat(n||i||"0"),.5*e),o=Math.min(parseFloat(i||n||"0"),.5*r),s=parseFloat(Hr(this.element,t.styleSheets,"x")||"0"),u=parseFloat(Hr(this.element,t.styleSheets,"y")||"0"),l=4/3*(Math.SQRT2-1);return 0===a&&0===o?(new Br).moveTo(s,u).lineTo(s+e,u).lineTo(s+e,u+r).lineTo(s,u+r).close():(new Br).moveTo(s+=a,u).lineTo(s+=e-2*a,u).curveTo(s+a*l,u,s+a,u+(o-o*l),s+=a,u+=o).lineTo(s,u+=r-2*o).curveTo(s,u+o*l,s-a*l,u+o,s-=a,u+=o).lineTo(s+=2*a-e,u).curveTo(s-a*l,u,s-a,u-o*l,s-=a,u-=o).lineTo(s,u+=2*o-r).curveTo(s,u-o*l,s+a*l,u-o,s+=a,u-=o).close()},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e}(An),Cn=function(t){function e(e,r){return t.call(this,!1,e,r)||this}return Sr(e,t),e.prototype.getPath=function(t){var e=this.getRx(t),r=this.getRy(t);if(!isFinite(e)||r<=0||!isFinite(r)||r<=0)return null;var n=parseFloat(Hr(this.element,t.styleSheets,"cx")||"0"),i=parseFloat(Hr(this.element,t.styleSheets,"cy")||"0"),a=4/3*(Math.SQRT2-1)*e,o=4/3*(Math.SQRT2-1)*r;return(new Br).moveTo(n+e,i).curveTo(n+e,i-o,n+a,i-r,n,i-r).curveTo(n-a,i-r,n-e,i-o,n-e,i).curveTo(n-e,i+o,n-a,i+r,n,i+r).curveTo(n+a,i+r,n+e,i+o,n+e,i)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e}(An),Mn=function(t){function e(e,r){return t.call(this,e,r)||this}return Sr(e,t),e.prototype.getRx=function(t){return parseFloat(Hr(this.element,t.styleSheets,"rx")||"0")},e.prototype.getRy=function(t){return parseFloat(Hr(this.element,t.styleSheets,"ry")||"0")},e}(Cn);function In(t){var e="invisible",r=t.stroke&&0!==t.strokeWidth,n=t.fill;return n&&r?e="fillThenStroke":n?e="fill":r&&(e="stroke"),e}function jn(t){return t.replace(/[\n\r]/g,"")}function On(t){return t.replace(/[\t]/g," ")}function Tn(t){return t.replace(/ +/g," ")}function En(t,e,r){switch(Hr(t,r.styleSheets,"text-transform")){case"uppercase":return e.toUpperCase();case"lowercase":return e.toLowerCase();default:return e}}var Bn=function(){function t(t,e,r,n){this.textNode=t,this.texts=[],this.textNodes=[],this.contexts=[],this.textAnchor=e,this.originX=r,this.originY=n,this.textMeasures=[]}return t.prototype.setX=function(t){this.originX=t},t.prototype.setY=function(t){this.originY=t},t.prototype.add=function(t,e,r){this.texts.push(e),this.textNodes.push(t),this.contexts.push(r)},t.prototype.rightTrimText=function(){for(var t=this.texts.length-1;t>=0;t--)if("default"===this.contexts[t].attributeState.xmlSpace&&(this.texts[t]=this.texts[t].replace(/\s+$/,"")),this.texts[t].match(/[^\s]/))return!1;return!0},t.prototype.measureText=function(t){for(var e=0;e<this.texts.length;e++)this.textMeasures.push({width:t.textMeasure.measureTextWidth(this.texts[e],this.contexts[e].attributeState),length:this.texts[e].length})},t.prototype.put=function(e,r){var n,i,a,o,s=[],u=[],l=[],c=this.originX,h=this.originY,f=c,d=c;for(n=0;n<this.textNodes.length;n++){i=this.textNodes[n],a=this.contexts[n],o=this.textMeasures[n]||{width:e.textMeasure.measureTextWidth(this.texts[n],this.contexts[n].attributeState),length:this.texts[n].length};var p=c,g=h;if("#text"!==i.nodeName&&!s.includes(i)){s.push(i);var m=t.resolveRelativePositionAttribute(i,"dx");null!==m&&(p+=$r(m,a.attributeState.fontSize));var v=t.resolveRelativePositionAttribute(i,"dy");null!==v&&(g+=$r(v,a.attributeState.fontSize))}u[n]=p,l[n]=g,c=p+o.width+o.length*r,h=g,f=Math.min(f,p),d=Math.max(d,c)}var b=0;switch(this.textAnchor){case"start":b=0;break;case"middle":b=(d-f)/2;break;case"end":b=d-f}for(n=0;n<this.textNodes.length;n++)if(i=this.textNodes[n],a=this.contexts[n],"#text"===i.nodeName||"hidden"!==a.attributeState.visibility){e.pdf.saveGraphicsState(),bn(a,e,i);var y=a.attributeState.alignmentBaseline,w=In(a.attributeState);e.pdf.text(this.texts[n],u[n]-b,l[n],{baseline:Kr(y),angle:e.transform,renderingMode:"fill"===w?void 0:w,charSpace:0===r?void 0:r}),e.pdf.restoreGraphicsState()}return[c,h]},t.resolveRelativePositionAttribute=function(t,e){for(var r,n=t;n&&zr(n,"tspan");){if(n.hasAttribute(e))return n.getAttribute(e);if((null===(r=t.parentElement)||void 0===r?void 0:r.firstChild)!==t)break;n=n.parentElement}return null},t}(),qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.processTSpans=function(t,e,r,n,i,a){for(var o=r.pdf.getFontSize(),s=r.attributeState.xmlSpace,u=!0,l=!1,c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];if(h.textContent){var f=h.textContent;if("#text"===h.nodeName){var d=jn(f);d=On(d),"default"===s&&(d=Tn(d),u&&d.match(/^\s/)&&(l=!0),d.match(/[^\s]/)&&(u=!1),a.prevText.match(/\s$/)&&(d=d.replace(/^\s+/,"")));var p=En(e,d,r);i.add(e,p,r),a.prevText=f,a.prevContext=r}else if(zr(h,"title"));else if(zr(h,"tspan")){var g=h,m=g.getAttribute("x");if(null!==m){var v=$r(m,o);i=new Bn(this,Hr(g,r.styleSheets,"text-anchor")||r.attributeState.textAnchor,v,0),n.push({type:"y",chunk:i})}var b=g.getAttribute("y");if(null!==b){var y=$r(b,o);i=new Bn(this,Hr(g,r.styleSheets,"text-anchor")||r.attributeState.textAnchor,0,y),n.push({type:"x",chunk:i})}var w=r.clone();vn(w,t,g),this.processTSpans(t,g,w,n,i,a)}}}return l},e.prototype.renderCore=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a,o,s,u,l,c,h,f,d,p,g,m,v,b,y,w,x,S,A;return Lr(this,(function(N){if(t.pdf.saveGraphicsState(),e=0,r=0,n=1,i=t.pdf.getFontSize(),a=$r(this.element.getAttribute("x"),i),o=$r(this.element.getAttribute("y"),i),s=$r(this.element.getAttribute("dx"),i),u=$r(this.element.getAttribute("dy"),i),l=parseFloat(this.element.getAttribute("textLength")||"0"),c=t.attributeState.visibility,0===this.element.childElementCount)h=this.element.textContent||"",f=function(t,e){return t=On(t=jn(t)),"default"===e.xmlSpace&&(t=Tn(t=t.trim())),t}(h,t.attributeState),d=En(this.element,f,t),e=t.textMeasure.getTextOffset(d,t.attributeState),l>0&&(p=t.textMeasure.measureTextWidth(d,t.attributeState),"default"===t.attributeState.xmlSpace&&h.match(/^\s/)&&(n=0),r=(l-p)/(d.length-n)||0),"visible"===c&&(g=t.attributeState.alignmentBaseline,m=In(t.attributeState),t.pdf.text(d,a+s-e,o+u,{baseline:Kr(g),angle:t.transform,renderingMode:"fill"===m?void 0:m,charSpace:0===r?void 0:r}));else{for(v=[],b=new Bn(this,t.attributeState.textAnchor,a+s,o+u),v.push({type:"",chunk:b}),y=this.processTSpans(this,this.element,t,v,b,{prevText:" ",prevContext:t}),n=y?0:1,w=!0,x=v.length-1;x>=0;x--)w&&(w=v[x].chunk.rightTrimText());l>0&&(S=0,A=0,v.forEach((function(e){var r=e.chunk;r.measureText(t),r.textMeasures.forEach((function(t){var e=t.width,r=t.length;S+=e,A+=r}))})),r=(l-S)/(A-n)),v.reduce((function(e,n){var i=n.type,a=n.chunk;return"x"===i?a.setX(e[0]):"y"===i&&a.setY(e[1]),a.put(t,r)}),[0,0])}return t.pdf.restoreGraphicsState(),[2]}))}))},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e.prototype.getBoundingBoxCore=function(t){return on(this.element,t)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e}(Sn),Rn=function(t){function e(e,r){return t.call(this,!0,e,r)||this}return Sr(e,t),e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e.prototype.getPath=function(t){var e,r,n=new(yr())(Hr(this.element,t.styleSheets,"d")||"").unshort().unarc().abs(),i=new Br;return n.iterate((function(t){switch(t[0]){case"M":i.moveTo(t[1],t[2]);break;case"L":i.lineTo(t[1],t[2]);break;case"H":i.lineTo(t[1],r);break;case"V":i.lineTo(e,t[1]);break;case"C":i.curveTo(t[1],t[2],t[3],t[4],t[5],t[6]);break;case"Q":var n=Ir([e,r],[t[1],t[2]]),a=Ir([t[3],t[4]],[t[1],t[2]]);i.curveTo(n[0],n[1],a[0],a[1],t[3],t[4]);break;case"Z":i.close()}switch(t[0]){case"M":case"L":e=t[1],r=t[2];break;case"H":e=t[1];break;case"V":r=t[1];break;case"C":e=t[5],r=t[6];break;case"Q":e=t[3],r=t[4]}})),i},e}(An),Dn=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,((?:.|\s)*)$/i,Un=function(t){function e(r,n){var i=t.call(this,r,n)||this;return i.imageLoadingPromise=null,i.imageUrl=i.element.getAttribute("xlink:href")||i.element.getAttribute("href"),i.imageUrl&&(i.imageLoadingPromise=e.fetchImageData(i.imageUrl)),i}return Sr(e,t),e.prototype.renderCore=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a,o,s,u,l,c,h,f;return Lr(this,(function(d){switch(d.label){case 0:return this.imageLoadingPromise?(t.pdf.setCurrentTransformationMatrix(t.transform),e=parseFloat(Hr(this.element,t.styleSheets,"width")||"0"),r=parseFloat(Hr(this.element,t.styleSheets,"height")||"0"),n=parseFloat(Hr(this.element,t.styleSheets,"x")||"0"),i=parseFloat(Hr(this.element,t.styleSheets,"y")||"0"),!isFinite(e)||e<=0||!isFinite(r)||r<=0?[2]:[4,this.imageLoadingPromise]):[2];case 1:return a=d.sent(),o=a.data,0!==(s=a.format).indexOf("svg")?[3,3]:(u=new DOMParser,l=u.parseFromString(o,"image/svg+xml").firstElementChild,(!(c=this.element.getAttribute("preserveAspectRatio"))||c.indexOf("defer")<0||!l.getAttribute("preserveAspectRatio"))&&l.setAttribute("preserveAspectRatio",c||""),l.setAttribute("x",String(n)),l.setAttribute("y",String(i)),l.setAttribute("width",String(e)),l.setAttribute("height",String(r)),[4,Qn(l,h={}).render(new Fr(t.pdf,{refsHandler:new Cr(h),styleSheets:t.styleSheets,viewport:new _n(e,r),svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}))]);case 2:return d.sent(),[2];case 3:f="data:image/"+s+";base64,"+btoa(o);try{t.pdf.addImage(f,"",n,i,e,r)}catch(t){"object"==typeof console&&console.warn&&console.warn("Could not load image "+this.imageUrl+". \n"+t)}d.label=4;case 4:return[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return on(this.element,t)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e.fetchImageData=function(t){return Nr(this,void 0,void 0,(function(){var r,n,i,a,o;return Lr(this,(function(s){switch(s.label){case 0:if(!(i=t.match(Dn)))return[3,1];if(a=i[2],"image"!==(o=a.split("/"))[0])throw new Error("Unsupported image URL: "+t);return n=o[1],r=i[5],"base64"===i[4]?(r=r.replace(/\s/g,""),r=atob(r)):r=decodeURIComponent(r),[3,3];case 1:return[4,e.fetchImage(t)];case 2:r=s.sent(),n=t.substring(t.lastIndexOf(".")+1),s.label=3;case 3:return[2,{data:r,format:n}]}}))}))},e.fetchImage=function(t){return new Promise((function(e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200!==n.status)throw new Error("Error "+n.status+": Failed to load image '"+t+"'");for(var r=new Uint8Array(n.response),i="",a=0;a<r.length;a++)i+=String.fromCharCode(r[a]);e(i)},n.onerror=r,n.onabort=r,n.send(null)}))},e.getMimeType=function(t){switch(t=t.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";default:return"image/"+t}},e}(Sn),zn=function(t){function e(e,r,n){var i=t.call(this,!0,r,n)||this;return i.closed=e,i}return Sr(e,t),e.prototype.getPath=function(t){if(!this.element.hasAttribute("points")||""===this.element.getAttribute("points"))return null;var r=e.parsePointsString(this.element.getAttribute("points")),n=new Br;if(r.length<1)return n;n.moveTo(r[0][0],r[0][1]);for(var i=1;i<r.length;i++)n.lineTo(r[i][0],r[i][1]);return this.closed&&n.close(),n},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.parsePointsString=function(t){for(var e=Qr(t),r=[],n=0;n<e.length-1;n+=2){var i=e[n],a=e[n+1];r.push([i,a])}return r},e}(An),Hn=function(t){function e(e,r){return t.call(this,!0,e,r)||this}return Sr(e,t),e}(zn),Wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.render=function(t){return Promise.resolve()},e.prototype.getBoundingBoxCore=function(t){return[0,0,0,0]},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e.prototype.isVisible=function(t,e){return Wr(this,t,e)},e}(ln),Vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.apply=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a;return Lr(this,(function(o){switch(o.label){case 0:e=this.computeNodeTransform(t),r=this.getBoundingBox(t),t.pdf.beginFormObject(r[0],r[1],r[2],r[3],e),function(t){var e=t.attributeState,r=t.pdf,n=1,i=1;n*=e.fillOpacity,n*=e.opacity,e.fill instanceof _r&&void 0!==e.fill.color.a&&(n*=e.fill.color.a),i*=e.strokeOpacity,i*=e.opacity,e.stroke instanceof _r&&void 0!==e.stroke.color.a&&(i*=e.stroke.color.a);var a,o={};if(o.opacity=n,o["stroke-opacity"]=i,r.setGState(new Nt(o)),e.fill&&e.fill instanceof _r&&e.fill.color.ok?r.setFillColor(e.fill.color.r,e.fill.color.g,e.fill.color.b):r.setFillColor(0,0,0),r.setLineWidth(e.strokeWidth),e.stroke instanceof _r?r.setDrawColor(e.stroke.color.r,e.stroke.color.g,e.stroke.color.b):r.setDrawColor(0,0,0),r.setLineCap(e.strokeLinecap),r.setLineJoin(e.strokeLinejoin),e.strokeDasharray?r.setLineDashPattern(e.strokeDasharray,e.strokeDashoffset):r.setLineDashPattern([],0),r.setLineMiterLimit(e.strokeMiterlimit),a=en.hasOwnProperty(e.fontFamily)?en[e.fontFamily]:e.fontFamily,e.fill&&e.fill instanceof _r&&e.fill.color.ok){var s=e.fill.color;r.setTextColor(s.r,s.g,s.b)}else r.setTextColor(0,0,0);var u="";"bold"===e.fontWeight&&(u="bold"),"italic"===e.fontStyle&&(u+="italic"),""===u&&(u="normal"),void 0!==a||void 0!==u?(void 0===a&&(a=en.hasOwnProperty(e.fontFamily)?en[e.fontFamily]:e.fontFamily),r.setFont(a,u)):r.setFont("helvetica",u),r.setFontSize(e.fontSize*r.internal.scaleFactor)}(n=new Fr(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure})),i=0,a=this.children,o.label=1;case 1:return i<a.length?[4,a[i].render(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return i++,[3,1];case 4:return t.pdf.endFormObject(this.element.getAttribute("id")),[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){var e,r=this.element.getAttribute("viewBox");return r&&(e=Qr(r)),[e&&e[0]||0,e&&e[1]||0,e&&e[2]||parseFloat(this.element.getAttribute("markerWidth")||"3"),e&&e[3]||parseFloat(this.element.getAttribute("markerHeight")||"3")]},e.prototype.computeNodeTransformCore=function(t){var e,r=parseFloat(this.element.getAttribute("refX")||"0"),n=parseFloat(this.element.getAttribute("refY")||"0"),i=this.element.getAttribute("viewBox");if(i){var a=Qr(i);e=sn(this.element,a,0,0,parseFloat(this.element.getAttribute("markerWidth")||"3"),parseFloat(this.element.getAttribute("markerHeight")||"3"),t,!0),e=t.pdf.matrixMult(t.pdf.Matrix(1,0,0,1,-r,-n),e)}else e=t.pdf.Matrix(1,0,0,1,-r,-n);return e},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e}(cn),Gn=function(t){function e(e,r){return t.call(this,e,r)||this}return Sr(e,t),e.prototype.getR=function(t){var e;return null!==(e=this.r)&&void 0!==e?e:this.r=parseFloat(Hr(this.element,t.styleSheets,"r")||"0")},e.prototype.getRx=function(t){return this.getR(t)},e.prototype.getRy=function(t){return this.getR(t)},e}(Cn),Yn=function(t){function e(e,r){return t.call(this,!1,e,r)||this}return Sr(e,t),e}(zn),Xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.renderCore=function(t){return Nr(this,void 0,void 0,(function(){var e,r;return Lr(this,(function(n){switch(n.label){case 0:e=0,r=this.children,n.label=1;case 1:return e<r.length?[4,r[e].render(t)]:[3,4];case 2:n.sent(),n.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return an(t,this)},e}(xn),Jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e.prototype.render=function(e){return Nr(this,void 0,void 0,(function(){var r,n,i,a,o;return Lr(this,(function(s){switch(s.label){case 0:return this.isVisible("hidden"!==e.attributeState.visibility,e)?(r=this.getX(e),n=this.getY(e),i=this.getWidth(e),a=this.getHeight(e),e.pdf.saveGraphicsState(),o=e.transform,this.element.hasAttribute("transform")&&(o=e.pdf.matrixMult(un(this.element.getAttribute("transform"),e),o)),e.pdf.setCurrentTransformationMatrix(o),e.withinUse||"visible"===Hr(this.element,e.styleSheets,"overflow")||e.pdf.rect(r,n,i,a).clip().discardPath(),[4,t.prototype.render.call(this,e.clone({transform:e.pdf.unitMatrix,viewport:e.withinUse?e.viewport:new _n(i,a)}))]):[2];case 1:return s.sent(),e.pdf.restoreGraphicsState(),[2]}}))}))},e.prototype.computeNodeTransform=function(t){return this.computeNodeTransformCore(t)},e.prototype.computeNodeTransformCore=function(t){if(t.withinUse)return t.pdf.unitMatrix;var e,r=this.getX(t),n=this.getY(t),i=this.getViewBox();if(i){var a=this.getWidth(t),o=this.getHeight(t);e=sn(this.element,i,r,n,a,o,t)}else e=t.pdf.Matrix(1,0,0,1,r,n);return e},e.prototype.getWidth=function(t){if(void 0!==this.width)return this.width;var e,r,n=t.svg2pdfParameters;if(this.isOutermostSvg(t))if(null!=n.width)e=n.width;else if(r=Hr(this.element,t.styleSheets,"width"))e=parseFloat(r);else{var i=this.getViewBox();if(i&&(null!=n.height||Hr(this.element,t.styleSheets,"height"))){var a=i[2]/i[3];e=this.getHeight(t)*a}else e=Math.min(300,t.viewport.width,2*t.viewport.height)}else e=(r=Hr(this.element,t.styleSheets,"width"))?parseFloat(r):t.viewport.width;return this.width=e},e.prototype.getHeight=function(t){if(void 0!==this.height)return this.height;var e,r,n=t.svg2pdfParameters;if(this.isOutermostSvg(t))if(null!=n.height)e=n.height;else if(r=Hr(this.element,t.styleSheets,"height"))e=parseFloat(r);else{var i=this.getViewBox();if(i){var a=i[2]/i[3];e=this.getWidth(t)/a}else e=Math.min(150,t.viewport.width/2,t.viewport.height)}else e=(r=Hr(this.element,t.styleSheets,"height"))?parseFloat(r):t.viewport.height;return this.height=e},e.prototype.getX=function(t){if(void 0!==this.x)return this.x;if(this.isOutermostSvg(t))return this.x=0;var e=Hr(this.element,t.styleSheets,"x");return this.x=e?parseFloat(e):0},e.prototype.getY=function(t){if(void 0!==this.y)return this.y;if(this.isOutermostSvg(t))return this.y=0;var e=Hr(this.element,t.styleSheets,"y");return this.y=e?parseFloat(e):0},e.prototype.getViewBox=function(){if(void 0!==this.viewBox)return this.viewBox;var t=this.element.getAttribute("viewBox");return this.viewBox=t?Qr(t):void 0},e.prototype.isOutermostSvg=function(t){return t.svg2pdfParameters.element===this.element},e}(Xn),$n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e.prototype.computeNodeTransformCore=function(t){return t.pdf.unitMatrix},e}(Xn),Kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sr(e,t),e.prototype.apply=function(t){return Nr(this,void 0,void 0,(function(){var e,r,n;return Lr(this,(function(i){switch(i.label){case 0:if(!this.isVisible(!0,t))return[2];e=t.pdf.matrixMult(this.computeNodeTransform(t),t.transform),t.pdf.setCurrentTransformationMatrix(e),r=0,n=this.children,i.label=1;case 1:return r<n.length?[4,n[r].render(new Fr(t.pdf,{refsHandler:t.refsHandler,styleSheets:t.styleSheets,viewport:t.viewport,withinClipPath:!0,svg2pdfParameters:t.svg2pdfParameters,textMeasure:t.textMeasure}))]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return t.pdf.clip().discardPath(),t.pdf.setCurrentTransformationMatrix(e.inversed()),[2]}}))}))},e.prototype.getBoundingBoxCore=function(t){return an(t,this)},e.prototype.isVisible=function(t,e){return Vr(this,t,e)},e}(cn);function Qn(t,e){var r,n=[];switch(function(t,e){for(var r=[],n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];"#"!==i.nodeName.charAt(0)&&r.push(i)}for(n=0;n<r.length;n++)e(0,r[n])}(t,(function(t,r){return n.push(Qn(r,e))})),t.tagName.toLowerCase()){case"a":case"g":r=new $n(t,n);break;case"circle":r=new Gn(t,n);break;case"clippath":r=new Kn(t,n);break;case"ellipse":r=new Mn(t,n);break;case"lineargradient":r=new fn(t,n);break;case"image":r=new Un(t,n);break;case"line":r=new Ln(t,n);break;case"marker":r=new Vn(t,n);break;case"path":r=new Rn(t,n);break;case"pattern":r=new gn(t,n);break;case"polygon":r=new Hn(t,n);break;case"polyline":r=new Yn(t,n);break;case"radialgradient":r=new dn(t,n);break;case"rect":r=new Fn(t,n);break;case"svg":r=new Jn(t,n);break;case"symbol":r=new kn(t,n);break;case"text":r=new qn(t,n);break;case"use":r=new Pn(t,n);break;default:r=new Wn(t,n)}if(null!=e&&r.element.hasAttribute("id")){var i=gr()(r.element.id,{isIdentifier:!0});e[i]=e[i]||r}return r.children.forEach((function(t){return t.setParent(r)})),r}var Zn=function(){function t(t,e){this.rootSvg=t,this.loadExternalSheets=e,this.styleSheets=[]}return t.prototype.load=function(){return Nr(this,void 0,void 0,(function(){var t;return Lr(this,(function(e){switch(e.label){case 0:return[4,this.collectStyleSheetTexts()];case 1:return t=e.sent(),this.parseCssSheets(t),[2]}}))}))},t.prototype.collectStyleSheetTexts=function(){return Nr(this,void 0,void 0,(function(){var e,r,n,i,a;return Lr(this,(function(o){switch(o.label){case 0:if(e=[],this.loadExternalSheets&&this.rootSvg.ownerDocument)for(i=0;i<this.rootSvg.ownerDocument.childNodes.length;i++)"xml-stylesheet"===(r=this.rootSvg.ownerDocument.childNodes[i]).nodeName&&"string"==typeof r.data&&e.push(t.loadSheet(r.data.match(/href=["'].*?["']/)[0].split("=")[1].slice(1,-1)));for(n=this.rootSvg.querySelectorAll("style,link"),i=0;i<n.length;i++)zr(a=n[i],"style")?e.push(a.textContent):this.loadExternalSheets&&zr(a,"link")&&"stylesheet"===a.getAttribute("rel")&&a.hasAttribute("href")&&e.push(t.loadSheet(a.getAttribute("href")));return[4,Promise.all(e)];case 1:return[2,o.sent().filter((function(t){return null!==t}))]}}))}))},t.prototype.parseCssSheets=function(e){for(var r=document.implementation.createHTMLDocument(""),n=0,i=e;n<i.length;n++){var a=i[n],o=r.createElement("style");o.textContent=a,r.body.appendChild(o);var s=o.sheet;if(s instanceof CSSStyleSheet){for(var u=s.cssRules.length-1;u>=0;u--){var l=s.cssRules[u];if(l instanceof CSSStyleRule){var c=l;if(c.selectorText.indexOf(",")>=0){s.deleteRule(u);for(var h=c.cssText.substring(c.selectorText.length),f=t.splitSelectorAtCommas(c.selectorText),d=0;d<f.length;d++)s.insertRule(f[d]+h,u+d)}}else s.deleteRule(u)}this.styleSheets.push(s)}}},t.splitSelectorAtCommas=function(t){for(var e,r=/,|["']/g,n=/[^\\]["]/g,i=/[^\\][']/g,a=[],o="initial",s=-1,u=n,l=0;l<t.length;)switch(o){case"initial":r.lastIndex=l,(e=r.exec(t))?(","===e[0]?(a.push(t.substring(s+1,r.lastIndex-1).trim()),s=r.lastIndex-1):(o="withinQuotes",u='"'===e[0]?n:i),l=r.lastIndex):(a.push(t.substring(s+1).trim()),l=t.length);break;case"withinQuotes":u.lastIndex=l,(e=u.exec(t))&&(l=u.lastIndex,o="initial")}return a},t.loadSheet=function(t){return new Promise((function(e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="text",n.onload=function(){200!==n.status&&r(new Error("Error "+n.status+": Failed to load '"+t+"'")),e(n.responseText)},n.onerror=r,n.onabort=r,n.send(null)})).catch((function(){return null}))},t.prototype.getPropertyValue=function(t,e){for(var r=[],n=0,i=this.styleSheets;n<i.length;n++)for(var a=i[n],o=0;o<a.cssRules.length;o++){var s=a.cssRules[o];s.style.getPropertyValue(e)&&t.matches(s.selectorText)&&r.push(s)}if(0!==r.length)return r.reduce((function(t,r){return 1===(i=r,(a=(n=t).style.getPropertyPriority(e))!==i.style.getPropertyPriority(e)?"important"===a?1:-1:function(t,e){var r,n,i;if("string"==typeof t){if(-1!==t.indexOf(","))throw"Invalid CSS selector";r=wr(t).specificityArray}else{if(!Array.isArray(t))throw"Invalid CSS selector or specificity array";if(4!==t.filter((function(t){return"number"==typeof t})).length)throw"Invalid specificity array";r=t}if("string"==typeof e){if(-1!==e.indexOf(","))throw"Invalid CSS selector";n=wr(e).specificityArray}else{if(!Array.isArray(e))throw"Invalid CSS selector or specificity array";if(4!==e.filter((function(t){return"number"==typeof t})).length)throw"Invalid specificity array";n=e}for(i=0;i<4;i+=1){if(r[i]<n[i])return-1;if(r[i]>n[i])return 1}return 0}(n.selectorText,i.selectorText))?t:r;var n,i,a})).style.getPropertyValue(e)||void 0},t}(),ti=function(){function t(){this.measureMethods={}}return t.prototype.getTextOffset=function(t,e){var r=e.textAnchor;if("start"===r)return 0;var n=this.measureTextWidth(t,e),i=0;switch(r){case"end":i=n;break;case"middle":i=n/2}return i},t.prototype.measureTextWidth=function(t,e){if(0===t.length)return 0;var r=e.fontFamily;return this.getMeasureFunction(r).call(this,t,e.fontFamily,e.fontSize+"px",e.fontStyle,e.fontWeight)},t.prototype.getMeasurementTextNode=function(){if(!this.textMeasuringTextElement){this.textMeasuringTextElement=document.createElementNS("http://www.w3.org/2000/svg","text");var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.appendChild(this.textMeasuringTextElement),t.style.setProperty("position","absolute"),t.style.setProperty("visibility","hidden"),document.body.appendChild(t)}return this.textMeasuringTextElement},t.prototype.canvasTextMeasure=function(t,e,r,n,i){var a=document.createElement("canvas").getContext("2d");return null!=a?(a.font=[n,i,r,e].join(" "),a.measureText(t).width):0},t.prototype.svgTextMeasure=function(t,e,r,n,i,a){void 0===a&&(a=this.getMeasurementTextNode());var o=a;return o.setAttribute("font-family",e),o.setAttribute("font-size",r),o.setAttribute("font-style",n),o.setAttribute("font-weight",i),o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.textContent=t,o.getBBox().width},t.prototype.getMeasureFunction=function(e){var r=this.measureMethods[e];if(!r){var n=this.canvasTextMeasure(t.testString,e,"16px","normal","normal"),i=this.svgTextMeasure(t.testString,e,"16px","normal","normal");r=Math.abs(n-i)<t.epsilon?this.canvasTextMeasure:this.svgTextMeasure,this.measureMethods[e]=r}return r},t.prototype.cleanupTextMeasuring=function(){if(this.textMeasuringTextElement){var t=this.textMeasuringTextElement.parentNode;t&&document.body.removeChild(t),this.textMeasuringTextElement=void 0}},t.testString="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!\"$%&/()=?'\\+*-_.:,;^}][{#~|<>",t.epsilon=.1,t}();Pt.API.svg=function(t,e){return void 0===e&&(e={}),function(t,e,r){var n,i,a;return void 0===r&&(r={}),Nr(this,void 0,void 0,(function(){var o,s,u,l,c,h,f,d,p,g,m;return Lr(this,(function(v){switch(v.label){case 0:return o=null!==(n=r.x)&&void 0!==n?n:0,s=null!==(i=r.y)&&void 0!==i?i:0,u=null!==(a=r.loadExternalStyleSheets)&&void 0!==a&&a,c=new Cr(l={}),[4,(h=new Zn(t,u)).load()];case 1:return v.sent(),f=new _n(e.internal.pageSize.getWidth(),e.internal.pageSize.getHeight()),d=Ar(Ar({},r),{element:t}),p=new ti,g=new Fr(e,{refsHandler:c,styleSheets:h,viewport:f,svg2pdfParameters:d,textMeasure:p}),e.advancedAPI(),e.saveGraphicsState(),e.setCurrentTransformationMatrix(e.Matrix(1,0,0,1,o,s)),e.setLineWidth(g.attributeState.strokeWidth),m=g.attributeState.fill.color,e.setFillColor(m.r,m.g,m.b),e.setFont(g.attributeState.fontFamily),e.setFontSize(g.attributeState.fontSize*e.internal.scaleFactor),[4,Qn(t,l).render(g)];case 2:return v.sent(),e.restoreGraphicsState(),e.compatAPI(),g.textMeasure.cleanupTextMeasuring(),[2,e]}}))}))}(t,this,e)};const ei=(()=>{let t=0;return()=>(t+=1,`u${`0000${(Math.random()*36**4|0).toString(36)}`.slice(-4)}${t}`)})();function ri(t){const e=[];for(let r=0,n=t.length;r<n;r++)e.push(t[r]);return e}function ni(t,e){const r=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return r?parseFloat(r.replace("px","")):0}function ii(t,e={}){return{width:e.width||function(t){const e=ni(t,"border-left-width"),r=ni(t,"border-right-width");return t.clientWidth+e+r}(t),height:e.height||function(t){const e=ni(t,"border-top-width"),r=ni(t,"border-bottom-width");return t.clientHeight+e+r}(t)}}const ai=16384;function oi(t){return new Promise(((e,r)=>{const n=new Image;n.decode=()=>e(n),n.onload=()=>e(n),n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=t}))}const si=(t,e)=>{if(t instanceof e)return!0;const r=Object.getPrototypeOf(t);return null!==r&&(r.constructor.name===e.name||si(r,e))};function ui(t,e,r){const n=window.getComputedStyle(t,r),i=n.getPropertyValue("content");if(""===i||"none"===i)return;const a=ei();try{e.className=`${e.className} ${a}`}catch(t){return}const o=document.createElement("style");o.appendChild(function(t,e,r){const n=`.${t}:${e}`,i=r.cssText?function(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}(r):function(t){return ri(t).map((e=>`${e}: ${t.getPropertyValue(e)}${t.getPropertyPriority(e)?" !important":""};`)).join(" ")}(r);return document.createTextNode(`${n}{${i}}`)}(a,r,n)),e.appendChild(o)}const li="application/font-woff",ci="image/jpeg",hi={woff:li,woff2:li,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ci,jpeg:ci,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function fi(t){const e=function(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}(t).toLowerCase();return hi[e]||""}function di(t){return-1!==t.search(/^(data:)/)}function pi(t,e){return`data:${e};base64,${t}`}async function gi(t,e,r){const n=await fetch(t,e);if(404===n.status)throw new Error(`Resource "${n.url}" not found`);const i=await n.blob();return new Promise(((t,e)=>{const a=new FileReader;a.onerror=e,a.onloadend=()=>{try{t(r({res:n,result:a.result}))}catch(t){e(t)}},a.readAsDataURL(i)}))}const mi={};async function vi(t,e,r){const n=function(t,e,r){let n=t.replace(/\?.*/,"");return r&&(n=t),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}(t,e,r.includeQueryParams);if(null!=mi[n])return mi[n];let i;r.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());try{const n=await gi(t,r.fetchRequestInit,(({res:t,result:r})=>(e||(e=t.headers.get("Content-Type")||""),function(t){return t.split(/,/)[1]}(r))));i=pi(n,e)}catch(e){i=r.imagePlaceholder||"";let n=`Failed to fetch resource: ${t}`;e&&(n="string"==typeof e?e:e.message),n&&console.warn(n)}return mi[n]=i,i}const bi=t=>null!=t.tagName&&"SLOT"===t.tagName.toUpperCase();async function yi(t,e,r){return r||!e.filter||e.filter(t)?Promise.resolve(t).then((t=>async function(t,e){return si(t,HTMLCanvasElement)?async function(t){const e=t.toDataURL();return"data:,"===e?t.cloneNode(!1):oi(e)}(t):si(t,HTMLVideoElement)?async function(t,e){if(t.currentSrc){const e=document.createElement("canvas"),r=e.getContext("2d");return e.width=t.clientWidth,e.height=t.clientHeight,null==r||r.drawImage(t,0,0,e.width,e.height),oi(e.toDataURL())}const r=t.poster,n=fi(r);return oi(await vi(r,n,e))}(t,e):si(t,HTMLIFrameElement)?async function(t){var e;try{if(null===(e=null==t?void 0:t.contentDocument)||void 0===e?void 0:e.body)return await yi(t.contentDocument.body,{},!0)}catch(t){}return t.cloneNode(!1)}(t):t.cloneNode(!1)}(t,e))).then((r=>async function(t,e,r){var n,i;let a=[];return a=bi(t)&&t.assignedNodes?ri(t.assignedNodes()):si(t,HTMLIFrameElement)&&(null===(n=t.contentDocument)||void 0===n?void 0:n.body)?ri(t.contentDocument.body.childNodes):ri((null!==(i=t.shadowRoot)&&void 0!==i?i:t).childNodes),0===a.length||si(t,HTMLVideoElement)||await a.reduce(((t,n)=>t.then((()=>yi(n,r))).then((t=>{t&&e.appendChild(t)}))),Promise.resolve()),e}(t,r,e))).then((e=>function(t,e){return si(e,Element)&&(function(t,e){const r=e.style;if(!r)return;const n=window.getComputedStyle(t);n.cssText?(r.cssText=n.cssText,r.transformOrigin=n.transformOrigin):ri(n).forEach((i=>{let a=n.getPropertyValue(i);if("font-size"===i&&a.endsWith("px")){const t=Math.floor(parseFloat(a.substring(0,a.length-2)))-.1;a=`${t}px`}si(t,HTMLIFrameElement)&&"display"===i&&"inline"===a&&(a="block"),"d"===i&&e.getAttribute("d")&&(a=`path(${e.getAttribute("d")})`),r.setProperty(i,a,n.getPropertyPriority(i))}))}(t,e),function(t,e){ui(t,e,":before"),ui(t,e,":after")}(t,e),function(t,e){si(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),si(t,HTMLInputElement)&&e.setAttribute("value",t.value)}(t,e),function(t,e){if(si(t,HTMLSelectElement)){const r=e,n=Array.from(r.children).find((e=>t.value===e.getAttribute("value")));n&&n.setAttribute("selected","")}}(t,e)),e}(t,e))).then((t=>async function(t,e){const r=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===r.length)return t;const n={};for(let i=0;i<r.length;i++){const a=r[i].getAttribute("xlink:href");if(a){const r=t.querySelector(a),i=document.querySelector(a);r||!i||n[a]||(n[a]=await yi(i,e,!0))}}const i=Object.values(n);if(i.length){const e="http://www.w3.org/1999/xhtml",r=document.createElementNS(e,"svg");r.setAttribute("xmlns",e),r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.overflow="hidden",r.style.display="none";const n=document.createElementNS(e,"defs");r.appendChild(n);for(let t=0;t<i.length;t++)n.appendChild(i[t]);t.appendChild(r)}return t}(t,e))):null}const wi=/url\((['"]?)([^'"]+?)\1\)/g,xi=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Si=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Ai(t){return-1!==t.search(wi)}async function Ni(t,e,r){if(!Ai(t))return t;const n=function(t,{preferredFontFormat:e}){return e?t.replace(Si,(t=>{for(;;){const[r,,n]=xi.exec(t)||[];if(!n)return"";if(n===e)return`src: ${r};`}})):t}(t,r),i=function(t){const e=[];return t.replace(wi,((t,r,n)=>(e.push(n),t))),e.filter((t=>!di(t)))}(n);return i.reduce(((t,n)=>t.then((t=>async function(t,e,r,n,i){try{const a=r?function(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),e&&(n.href=e),i.href=t,i.href}(e,r):e,o=fi(e);let s;return s=i?pi(await i(a),o):await vi(a,o,n),t.replace(function(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}(e),`$1${s}$3`)}catch(t){}return t}(t,n,e,r)))),Promise.resolve(n))}async function Li(t,e,r){var n;const i=null===(n=e.style)||void 0===n?void 0:n.getPropertyValue(t);if(i){const n=await Ni(i,null,r);return e.style.setProperty(t,n,e.style.getPropertyPriority(t)),!0}return!1}async function ki(t,e){si(t,Element)&&(await async function(t,e){await Li("background",t,e)||await Li("background-image",t,e),await Li("mask",t,e)||await Li("mask-image",t,e)}(t,e),await async function(t,e){const r=si(t,HTMLImageElement);if((!r||di(t.src))&&(!si(t,SVGImageElement)||di(t.href.baseVal)))return;const n=r?t.src:t.href.baseVal,i=await vi(n,fi(n),e);await new Promise(((e,n)=>{t.onload=e,t.onerror=n;const a=t;a.decode&&(a.decode=e),"lazy"===a.loading&&(a.loading="eager"),r?(t.srcset="",t.src=i):t.href.baseVal=i}))}(t,e),await async function(t,e){const r=ri(t.childNodes).map((t=>ki(t,e)));await Promise.all(r).then((()=>t))}(t,e))}const _i={};async function Pi(t){let e=_i[t];if(null!=e)return e;const r=await fetch(t);return e={url:t,cssText:await r.text()},_i[t]=e,e}async function Fi(t,e){let r=t.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map((async i=>{let a=i.replace(n,"$1");return a.startsWith("https://")||(a=new URL(a,t.url).href),gi(a,e.fetchRequestInit,(({result:t})=>(r=r.replace(i,`url(${t})`),[i,t])))}));return Promise.all(i).then((()=>r))}function Ci(t){if(null==t)return[];const e=[];let r=t.replace(/(\/\*[\s\S]*?\*\/)/gi,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const t=n.exec(r);if(null===t)break;e.push(t[0])}r=r.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=i.exec(r);if(null===t){if(t=a.exec(r),null===t)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;e.push(t[0])}return e}async function Mi(t,e){const r=null!=e.fontEmbedCSS?e.fontEmbedCSS:e.skipFonts?null:await async function(t,e){const r=await async function(t,e){if(null==t.ownerDocument)throw new Error("Provided element is not within a Document");const r=ri(t.ownerDocument.styleSheets),n=await async function(t,e){const r=[],n=[];return t.forEach((r=>{if("cssRules"in r)try{ri(r.cssRules||[]).forEach(((t,i)=>{if(t.type===CSSRule.IMPORT_RULE){let a=i+1;const o=Pi(t.href).then((t=>Fi(t,e))).then((t=>Ci(t).forEach((t=>{try{r.insertRule(t,t.startsWith("@import")?a+=1:r.cssRules.length)}catch(e){console.error("Error inserting rule from remote css",{rule:t,error:e})}})))).catch((t=>{console.error("Error loading remote css",t.toString())}));n.push(o)}}))}catch(i){const a=t.find((t=>null==t.href))||document.styleSheets[0];null!=r.href&&n.push(Pi(r.href).then((t=>Fi(t,e))).then((t=>Ci(t).forEach((t=>{a.insertRule(t,r.cssRules.length)})))).catch((t=>{console.error("Error loading remote stylesheet",t)}))),console.error("Error inlining remote css file",i)}})),Promise.all(n).then((()=>(t.forEach((t=>{if("cssRules"in t)try{ri(t.cssRules||[]).forEach((t=>{r.push(t)}))}catch(e){console.error(`Error while reading CSS rules from ${t.href}`,e)}})),r)))}(r,e);return function(t){return t.filter((t=>t.type===CSSRule.FONT_FACE_RULE)).filter((t=>Ai(t.style.getPropertyValue("src"))))}(n)}(t,e);return(await Promise.all(r.map((t=>{const r=t.parentStyleSheet?t.parentStyleSheet.href:null;return Ni(t.cssText,r,e)})))).join("\n")}(t,e);if(r){const e=document.createElement("style"),n=document.createTextNode(r);e.appendChild(n),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}async function Ii(t,e={}){const{width:r,height:n}=ii(t,e),i=await yi(t,e,!0);return await Mi(i,e),await ki(i,e),function(t,e){const{style:r}=t;e.backgroundColor&&(r.backgroundColor=e.backgroundColor),e.width&&(r.width=`${e.width}px`),e.height&&(r.height=`${e.height}px`);const n=e.style;null!=n&&Object.keys(n).forEach((t=>{r[t]=n[t]}))}(i,e),await async function(t,e,r){const n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),a=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${e} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(t),async function(t){return Promise.resolve().then((()=>(new XMLSerializer).serializeToString(t))).then(encodeURIComponent).then((t=>`data:image/svg+xml;charset=utf-8,${t}`))}(i)}(i,r,n)}async function ji(t,e={}){return(await async function(t,e={}){const{width:r,height:n}=ii(t,e),i=await Ii(t,e),a=await oi(i),o=document.createElement("canvas"),s=o.getContext("2d"),u=e.pixelRatio||function(){let t,e;try{e=process}catch(t){}const r=e&&e.env?e.env.devicePixelRatio:null;return r&&(t=parseInt(r,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}(),l=e.canvasWidth||r,c=e.canvasHeight||n;return o.width=l*u,o.height=c*u,e.skipAutoScale||function(t){(t.width>ai||t.height>ai)&&(t.width>ai&&t.height>ai?t.width>t.height?(t.height*=ai/t.width,t.width=ai):(t.width*=ai/t.height,t.height=ai):t.width>ai?(t.height*=ai/t.width,t.width=ai):(t.width*=ai/t.height,t.height=ai))}(o),o.style.width=`${l}`,o.style.height=`${c}`,e.backgroundColor&&(s.fillStyle=e.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}(t,e)).toDataURL()}var Oi=function(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))},Ti=function(t,e){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};function Ei(t){return Oi(this,void 0,void 0,(function(){var e;return Ti(this,(function(r){return(e=new FileReader).readAsDataURL(t),[2,new Promise((function(t){e.onloadend=function(){t(e.result)}}))]}))}))}var Bi=function(t,e,r,n){return new(r||(r=Promise))((function(i,a){function o(t){try{u(n.next(t))}catch(t){a(t)}}function s(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,s)}u((n=n.apply(t,e||[])).next())}))},qi=function(t,e){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}};function Ri(t,e){return Bi(this,void 0,void 0,(function(){var r,n;return qi(this,(function(i){switch(i.label){case 0:return[4,ji(t.svg,{canvasWidth:t.boundingBox.width/2,canvasHeight:t.boundingBox.height/2})];case 1:return r=i.sent(),(n=document.createElement("a")).download=e,n.href=r,document.body.appendChild(n),n.click(),document.body.removeChild(n),[2]}}))}))}function Di(t){return Bi(this,void 0,void 0,(function(){var e,r,n,i,a,o,s;return qi(this,(function(u){switch(u.label){case 0:if(!t)throw new Error("No presentation provided");e=0,r=0,n=t.slides,u.label=1;case 1:if(!(r<n.length))return[3,6];i=n[r],a=0,o=i.getKeyBuilds(),u.label=2;case 2:return a<o.length?(s=o[a],e++,i.render(t,s),[4,Ri(t,"".concat(String(e).padStart(3,"0"),".png"))]):[3,5];case 3:u.sent(),u.label=4;case 4:return a++,[3,2];case 5:return r++,[3,1];case 6:return[2]}}))}))}function Ui(t,e,r){return Bi(this,void 0,void 0,(function(){var n,i,a,o,s,u,l;return qi(this,(function(c){switch(c.label){case 0:return n=t.boundingBox,i=n.width,a=n.height,[4,ji(t.background,{canvasWidth:i/2,canvasHeight:a/2})];case 1:return o=c.sent(),s=t.additionalElementContainer.querySelector("canvas"),u=s?s.toDataURL():null,[4,ji(t.svg,{canvasWidth:i/2,canvasHeight:a/2})];case 2:return l=c.sent(),[4,fetch("".concat(r,"/export"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:e,backgroundDataUrl:o,canvasDataUrl:u,svgDataUrl:l})})];case 3:return c.sent(),[2]}}))}))}function zi(t,e){return Bi(this,void 0,void 0,(function(){var r,n,i,a,o,s,u;return qi(this,(function(l){switch(l.label){case 0:if(!t)throw new Error("No presentation provided");r=0,n=0,i=t.slides,l.label=1;case 1:if(!(n<i.length))return[3,6];a=i[n],o=0,s=a.getKeyBuilds(),l.label=2;case 2:return o<s.length?(u=s[o],r++,a.render(t,u),[4,Ui(t,"".concat(String(r).padStart(3,"0"),".png"),e)]):[3,5];case 3:l.sent(),l.label=4;case 4:return o++,[3,2];case 5:return n++,[3,1];case 6:return[4,fetch("".concat(e,"/generate-pdf"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:"".concat(t.title,".pdf"),images:Array(r).fill(null).map((function(t,e){return"".concat(String(e+1).padStart(3,"0"),".png")}))})})];case 7:return l.sent(),[2]}}))}))}function Hi(t){return Bi(this,arguments,void 0,(function(t,e){var r,n,i,a,o,s,u,l,c,h,f,d,p,g,m,v,b,y,w,x,S,A,N;return void 0===e&&(e=!1),qi(this,(function(L){switch(L.label){case 0:if(e&&!confirm("Download slides as PDF?"))return[2];r=t.options,n=r.width,i=r.height,a=new dr({orientation:"landscape",unit:"px",format:[n,i],hotfixes:["px_scaling"]}),o=0,s=t.options.fonts,L.label=1;case 1:return o<s.length?(u=s[o],[4,fetch(u.url)]):[3,6];case 2:return l=L.sent(),h=Ei,[4,l.blob()];case 3:return[4,h.apply(void 0,[L.sent()])];case 4:c=L.sent().split(",")[1],f=u.fontFamily,d=null!==(A=u.fontStyle)&&void 0!==A?A:"normal",p=null!==(N=u.fontWeight)&&void 0!==N?N:"normal",g="".concat(f,"-").concat(d,"-").concat(p,".ttf"),a.addFileToVFS(g,c),a.addFont(g,f,d,p),L.label=5;case 5:return o++,[3,1];case 6:m=!0,v=0,b=t.slides,L.label=7;case 7:if(!(v<b.length))return[3,12];y=b[v],w=0,x=y.getKeyBuilds(),L.label=8;case 8:return w<x.length?(S=x[w],y.render(t,S),t.svg.querySelectorAll("svg").forEach((function(t){"0"===t.style.opacity&&t.remove()})),m?m=!1:a.addPage([n,i],"landscape"),a.setFillColor(t.options.backgroundColor),a.rect(0,0,n,i,"F"),[4,a.svg(t.svg,{x:0,y:0,width:n,height:i})]):[3,11];case 9:L.sent(),L.label=10;case 10:return w++,[3,8];case 11:return v++,[3,7];case 12:return a.save("".concat(t.title,".pdf")),[2]}}))}))}})(),s})()));